Exemplo n.º 1
0
 def dbgSphere(self, pt):
     """
     TODO : know why sphere is appended to the model, if no reason than remove sphere from all the cad files (by Anand Swaroop)
     :param pt: pt of origin for the nut bol placement
     :return: returns the sphere
     """
     return BRepPrimAPI_MakeSphere(getGpPt(pt), 0.1).Shape()
Exemplo n.º 2
0
 def create_model(self):
     Pnt = getGpPt(self.sec_origin)
     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 create_model(self):
     edges = makeEdgesFromPoints(self.points)
     wire = makeWireFromEdges(edges)
     aFace = makeFaceFromWire(wire)
     coneOrigin = self.sec_origin
     revolve_axis = gp_Ax1(getGpPt(coneOrigin), getGpDir(self.wDir))
     aSweep = BRepPrimAPI_MakeRevol(aFace, revolve_axis,
                                    math.radians(self.coneAngle)).Shape()
     return aSweep
Exemplo n.º 4
0
    def create_model(self):
        Pnt = getGpPt(self.sec_origin)
        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


# b = 5
# h = 5
# L = 50
#
# channel = FilletWeld(b,h,L)
# # angles = channel.place()
# point = channel.compute_params()
# prism = channel.create_model()
# display.DisplayShape(prism, update=True)
# display.ExportToImage('./CAD_image.png')
# display.DisableAntiAliasing()
# start_display()
Exemplo n.º 5
0
 def dbgSphere(self, pt):
     return BRepPrimAPI_MakeSphere(getGpPt(pt), 0.1).Shape()