コード例 #1
0
ファイル: interfaceTools.py プロジェクト: fcourchesne/DDA
 def generateBolts4Tunnel2(centerX , centerY , halfWidth , halfHeight \
                   , arcHeight , boltLength , boltLength2 , boltsDistance ):
     import DDACalcTools
     bolts = DDACalcTools.pyBolts()
     print bolts.size()
     DDACalcTools.calcBolts4Type2Tunnel( float(centerX) , float(centerY) , float(halfWidth), float(halfHeight) \
         , float(arcHeight) , float(boltLength) , float(boltLength2) , float(boltsDistance) , bolts)
     
     return TunnelBoltsGenerator._convert2BoltElements(bolts)
コード例 #2
0
    def generateBolts4Tunnel2(centerX , centerY , halfWidth , halfHeight \
                      , arcHeight , boltLength , boltLength2 , boltsDistance ):
        import DDACalcTools
        bolts = DDACalcTools.pyBolts()
        print bolts.size()
        DDACalcTools.calcBolts4Type2Tunnel( float(centerX) , float(centerY) , float(halfWidth), float(halfHeight) \
            , float(arcHeight) , float(boltLength) , float(boltLength2) , float(boltsDistance) , bolts)

        return TunnelBoltsGenerator._convert2BoltElements(bolts)
コード例 #3
0
ファイル: interfaceTools.py プロジェクト: lainegates/FreeCAD
 def generateBolts(centerX , centerY , halfWidth , halfHeight \
                   , arcRadius , boltsDistance , boltLength , boltLength2 ):
     import DDACalcTools
     bolts = DDACalcTools.pyBolts()
     print bolts.size()
     DDACalcTools.calcBolts4Type2Tunnel( centerX , centerY , halfWidth, halfHeight \
         , arcRadius , boltLength , boltLength2 , boltsDistance , bolts)
     
     from loadDataTools import BoltElement
     resultBolts=[]
     for bolt in bolts:
         p1 = ( bolt.startPoint.x , bolt.startPoint.y , 0 )
         p2 = ( bolt.endPoint.x , bolt.endPoint.y , 0 )
         resultBolts.append(BoltElement(p1 , p2 , 0 , 0 , 0))
         print "(%lf , %lf) (%lf , %lf)"%(bolt.startPoint.x  \
                 ,bolt.startPoint.y , bolt.endPoint.x,bolt.endPoint.y)
     return resultBolts
コード例 #4
0
ファイル: interfaceTools.py プロジェクト: silverriver/DDA
 def generateBolts(centerX , centerY , halfWidth , halfHeight \
                   , arcRadius , boltsDistance , boltLength , boltLength2 ):
     import DDACalcTools
     bolts = DDACalcTools.pyBolts()
     print bolts.size()
     DDACalcTools.calcBolts4Type2Tunnel( centerX , centerY , halfWidth, halfHeight \
         , arcRadius , boltLength , boltLength2 , boltsDistance , bolts)
     
     from loadDataTools import BoltElement
     resultBolts=[]
     for bolt in bolts:
         p1 = ( bolt.startPoint.x , bolt.startPoint.y , 0 )
         p2 = ( bolt.endPoint.x , bolt.endPoint.y , 0 )
         resultBolts.append(BoltElement(p1 , p2 , 0 , 0 , 0))
         print "(%lf , %lf) (%lf , %lf)"%(bolt.startPoint.x  \
                 ,bolt.startPoint.y , bolt.endPoint.x,bolt.endPoint.y)
     return resultBolts