summaryrefslogtreecommitdiff
path: root/Connections/Shear/Finplate/bolt.py
diff options
context:
space:
mode:
authordeepa-chaudhari2015-06-08 23:23:34 +0530
committerdeepa-chaudhari2015-06-08 23:23:34 +0530
commit4d9df2cc747de8af9234bf105cc052d3fd5681d7 (patch)
tree36779a36e76d01ef4af01c9fbc1c9a39a1faaded /Connections/Shear/Finplate/bolt.py
parenta57cb415d3873120a89e3bd71aac75afba4c4a74 (diff)
downloadOsdagLive-4d9df2cc747de8af9234bf105cc052d3fd5681d7.tar.gz
OsdagLive-4d9df2cc747de8af9234bf105cc052d3fd5681d7.tar.bz2
OsdagLive-4d9df2cc747de8af9234bf105cc052d3fd5681d7.zip
arranging nutbolt assembly
Diffstat (limited to 'Connections/Shear/Finplate/bolt.py')
-rw-r--r--Connections/Shear/Finplate/bolt.py14
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