Add coolant feature to Ops

This commit is contained in:
Daniel Wood
2019-08-28 19:33:36 +01:00
parent 8b0e244ed4
commit bdcccc08b1
7 changed files with 8 additions and 8 deletions

View File

@@ -80,7 +80,7 @@ class ObjectOp(PathOp.ObjectOp):
def opFeatures(self, obj):
'''opFeatures(obj) ... calls circularHoleFeatures(obj) and ORs in the standard features required for processing circular holes.
Do not overwrite, implement circularHoleFeatures(obj) instead'''
return PathOp.FeatureTool | PathOp.FeatureDepths | PathOp.FeatureHeights | PathOp.FeatureBaseFaces | self.circularHoleFeatures(obj)
return PathOp.FeatureTool | PathOp.FeatureDepths | PathOp.FeatureHeights | PathOp.FeatureBaseFaces | self.circularHoleFeatures(obj) | PathOp.FeatureCoolant
def circularHoleFeatures(self, obj):
'''circularHoleFeatures(obj) ... overwrite to add operations specific features.
@@ -143,7 +143,7 @@ class ObjectOp(PathOp.ObjectOp):
return shape.Curve.Radius * 2
if shape.ShapeType == 'Face':
for i in range(len(shape.Edges)):
for i in range(len(shape.Edges)):
if (type(shape.Edges[i].Curve) == Part.Circle and
shape.Edges[i].Curve.Radius * 2 < shape.BoundBox.XLength*1.1 and
shape.Edges[i].Curve.Radius * 2 > shape.BoundBox.XLength*0.9):