print "Check Fillet"
aLine = []
anArc = []
- aSize = theObjects.size()
- for i in range (0, aSize):
- feat = ModelAPI_Feature.feature(theObjects.object(i))
+ aSize = len(theObjects)
+ for feat in theObjects:
assert(feat is not None)
if (feat.getKind() == "SketchLine"):
aLine.append(feat)
aSession.startOperation()
aFeaturesList = createSketch1(aSketchFeature)
aSession.finishOperation()
+aSketchSubFeatures = []
+for aSubIndex in range(0, aSketchFeature.numberOfSubs()):
+ aSketchSubFeatures.append(aSketchFeature.subFeature(aSubIndex))
#=========================================================================
# Global variables
#=========================================================================
aRadius = aFillet.real("ConstraintValue")
aRadius.setValue(FILLET_RADIUS1)
aFillet.execute()
-aResObjects = aFillet.reflist("ConstraintEntityB")
+aResObjects = []
+for aSubIndex in range(0, aSketchFeature.numberOfSubs()):
+ aSubFeature = aSketchFeature.subFeature(aSubIndex)
+ if aSubFeature not in aSketchSubFeatures:
+ if aSubFeature.getKind() == "SketchLine":
+ aResObjects.insert(0, aSubFeature)
+ elif aSubFeature.getKind() == "SketchArc":
+ aResObjects.append(aSubFeature)
#=========================================================================
# Verify the objects of fillet are created
#=========================================================================
aSession.startOperation()
aFeaturesList = createSketch2(aSketchFeature)
aSession.finishOperation()
+aSketchSubFeatures = []
+for aSubIndex in range(0, aSketchFeature.numberOfSubs()):
+ aSketchSubFeatures.append(aSketchFeature.subFeature(aSubIndex))
#=========================================================================
# Create the Fillet
#=========================================================================
aRadius = aFillet.real("ConstraintValue")
aRadius.setValue(FILLET_RADIUS1)
aFillet.execute()
-aResObjects = aFillet.reflist("ConstraintEntityB")
+aResObjects = []
+for aSubIndex in range(0, aSketchFeature.numberOfSubs()):
+ aSubFeature = aSketchFeature.subFeature(aSubIndex)
+ if aSubFeature not in aSketchSubFeatures:
+ if aSubFeature.getKind() == "SketchLine":
+ aResObjects.insert(0, aSubFeature)
+ elif aSubFeature.getKind() == "SketchArc":
+ aResObjects.append(aSubFeature)
#=========================================================================
# Verify the objects of fillet are created
#=========================================================================