diff options
Diffstat (limited to 'Connections/Shear/Finplate/bolt.py')
-rw-r--r-- | Connections/Shear/Finplate/bolt.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Connections/Shear/Finplate/bolt.py b/Connections/Shear/Finplate/bolt.py index b3d654a..4badc86 100644 --- a/Connections/Shear/Finplate/bolt.py +++ b/Connections/Shear/Finplate/bolt.py @@ -10,7 +10,10 @@ from OCC.BRepPrimAPI import BRepPrimAPI_MakeCylinder from OCC.BRepAlgo import BRepAlgo_BooleanOperations from OCC.gp import gp_Pnt, gp_Dir, gp_Pln, gp_Ax2 from OCC.BRepAlgoAPI import BRepAlgoAPI_Fuse - +from OCC.BRepFilletAPI import BRepFilletAPI_MakeFillet +from OCC.TopAbs import TopAbs_EDGE +from OCC.TopoDS import topods +from OCC.TopExp import TopExp_Explorer class Bolt(object): # @@ -55,10 +58,19 @@ class Bolt(object): aFace = makeFaceFromWire(wire) extrudeDir = self.T * self.wDir # extrudeDir is a numpy array boltHead = makePrismFromFace(aFace, extrudeDir) + mkFillet = BRepFilletAPI_MakeFillet(boltHead) + anEdgeExplorer = TopExp_Explorer(boltHead, TopAbs_EDGE) + while anEdgeExplorer.More(): + aEdge = topods.Edge(anEdgeExplorer.Current()) + mkFillet.Add(self.T / 17. , aEdge) + anEdgeExplorer.Next() + + boltHead = mkFillet.Shape() cylOrigin = self.secOrigin + self.T * self.wDir boltCylinder = BRepPrimAPI_MakeCylinder(gp_Ax2(getGpPt(cylOrigin), getGpDir(self.wDir)), self.r, self.H).Shape() whole_Bolt = BRepAlgoAPI_Fuse(boltHead,boltCylinder).Shape() + mkFillet = BRepFilletAPI_MakeFillet(whole_Bolt) return whole_Bolt |