Exemplo n.º 1
0
 def createModel(self):
     edges = self.createEdges()
     wire = makeWireFromEdges(edges)
     aFace = makeFaceFromWire(wire)
     extrudeDir = self.length * self.wDir  # extrudeDir is a numpy array
     prism = makePrismFromFace(aFace, extrudeDir)
     return prism
Exemplo n.º 2
0
 def createModel(self):
     Pnt = getGpPt(self.secOrigin)
     edges = makeEdgesFromPoints(self.points)
     wire = makeWireFromEdges(edges)
     aFace = makeFaceFromWire(wire)
     extrudeDir = self.L * (self.wDir)  # extrudeDir is a numpy array
     prism = makePrismFromFace(aFace, extrudeDir)
     return prism
Exemplo n.º 3
0
    def createModel(self):

        edges = makeEdgesFromPoints(self.points)
        wire = makeWireFromEdges(edges)
        aFace = makeFaceFromWire(wire)
        extrudeDir = -self.T * self.shaftDir  # extrudeDir is a numpy array
        boltHead = makePrismFromFace(aFace, extrudeDir)
        cylOrigin = self.origin
        boltCylinder = BRepPrimAPI_MakeCylinder(gp_Ax2(getGpPt(cylOrigin), getGpDir(self.shaftDir)), self.r, self.H).Shape()

        whole_Bolt = BRepAlgoAPI_Fuse(boltHead, boltCylinder).Shape()

        return whole_Bolt
Exemplo n.º 4
0
    def createModel(self):

        edges = makeEdgesFromPoints(self.points)
        wire = makeWireFromEdges(edges)
        aFace = makeFaceFromWire(wire)
        extrudeDir = self.T * self.wDir  # extrudeDir is a numpy array
        prism = makePrismFromFace(aFace, extrudeDir)

        cylOrigin = self.secOrigin
        innerCyl = BRepPrimAPI_MakeCylinder(
            gp_Ax2(getGpPt(cylOrigin), getGpDir(self.wDir)), self.r1,
            self.H).Shape()

        result_shape = BRepAlgoAPI_Cut(prism, innerCyl).Shape()

        return result_shape
Exemplo n.º 5
0
 def createModel(self):
     
     edges = makeEdgesFromPoints(self.points)
     wire = makeWireFromEdges(edges)
     aFace = makeFaceFromWire(wire)
     extrudeDir = self.T * self.wDir # extrudeDir is a numpy array
     prism =  makePrismFromFace(aFace, extrudeDir)
             
     cylOrigin = self.secOrigin
     innerCyl = BRepPrimAPI_MakeCylinder(gp_Ax2(getGpPt(cylOrigin), getGpDir(self.wDir)), self.r1, self.H).Shape()
     
     result_shape = BRepAlgoAPI_Cut(prism, innerCyl).Shape() 
     
     return result_shape
 
         
Exemplo n.º 6
0
    def createModel(self):
        
        edges = makeEdgesFromPoints(self.points)
        wire = makeWireFromEdges(edges)
        aFace = makeFaceFromWire(wire)
        extrudeDir = -self.T * self.shaftDir # extrudeDir is a numpy array
        boltHead =  makePrismFromFace(aFace, extrudeDir)
        cylOrigin = self.origin
        boltCylinder = BRepPrimAPI_MakeCylinder(gp_Ax2(getGpPt(cylOrigin), getGpDir(self.shaftDir)), self.r, self.H).Shape()
        
        whole_Bolt = BRepAlgoAPI_Fuse(boltHead,boltCylinder).Shape()
        
        return whole_Bolt