# Test end
# Test split on line with two points
-Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
-SketchLine_1 = Sketch_1.addLine(0, 50, 100, 50)
-SketchPoint_1 = Sketch_1.addPoint(25, 50)
-SketchPoint_2 = Sketch_1.addPoint(75, 50)
-SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchPoint_1.coordinates(), SketchLine_1.result()[0])
-SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchLine_1.result()[0])
-Sketch_1.addSplit(SketchLine_1, SketchPoint_1.coordinates(), SketchPoint_2.coordinates())
+Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchLine_2_1 = Sketch_2.addLine(0, 50, 100, 50)
+SketchPoint_2_1 = Sketch_2.addPoint(25, 50)
+SketchPoint_2_2 = Sketch_2.addPoint(75, 50)
+SketchConstraintCoincidence_2_1 = Sketch_2.setCoincident(SketchPoint_2_1.coordinates(), SketchLine_2_1.result()[0])
+SketchConstraintCoincidence_2_2 = Sketch_2.setCoincident(SketchPoint_2_2.coordinates(), SketchLine_2_1.result()[0])
+Sketch_2.addSplit(SketchLine_2_1, SketchPoint_2_1.coordinates(), SketchPoint_2_2.coordinates())
model.do()
-Sketch_1_feature = featureToCompositeFeature(Sketch_1.feature())
+Sketch_2_feature = featureToCompositeFeature(Sketch_2.feature())
idList = []
-for index in range(Sketch_1_feature.numberOfSubs()):
- idList.append(Sketch_1_feature.subFeature(index).getKind())
+for index in range(Sketch_2_feature.numberOfSubs()):
+ idList.append(Sketch_2_feature.subFeature(index).getKind())
assert(idList.count(SketchLineId) == 3)
assert(idList.count(SketchPointId) == 2)
# Test end
# Test split on circle with two points
-Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
-SketchCircle_1 = Sketch_1.addCircle(50, 50, 50)
-SketchPoint_1 = Sketch_1.addPoint(50, 0)
-SketchPoint_2 = Sketch_1.addPoint(50, 100)
-SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchPoint_1.coordinates(), SketchCircle_1.result()[0])
-SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchCircle_1.result()[0])
-Sketch_1.addSplit(SketchCircle_1, SketchPoint_1.coordinates(), SketchPoint_2.coordinates())
+Sketch_3 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchCircle_3_1 = Sketch_3.addCircle(50, 50, 50)
+SketchPoint_3_1 = Sketch_3.addPoint(50, 0)
+SketchPoint_3_2 = Sketch_3.addPoint(50, 100)
+SketchConstraintCoincidence_3_1 = Sketch_3.setCoincident(SketchPoint_3_1.coordinates(), SketchCircle_3_1.result()[0])
+SketchConstraintCoincidence_3_2 = Sketch_3.setCoincident(SketchPoint_3_2.coordinates(), SketchCircle_3_1.result()[0])
+Sketch_3.addSplit(SketchCircle_3_1, SketchPoint_3_1.coordinates(), SketchPoint_3_2.coordinates())
model.do()
-Sketch_1_feature = featureToCompositeFeature(Sketch_1.feature())
+Sketch_3_feature = featureToCompositeFeature(Sketch_3.feature())
idList = []
-for index in range(Sketch_1_feature.numberOfSubs()):
- idList.append(Sketch_1_feature.subFeature(index).getKind())
+for index in range(Sketch_3_feature.numberOfSubs()):
+ idList.append(Sketch_3_feature.subFeature(index).getKind())
assert(idList.count(SketchArcId) == 2)
assert(idList.count(SketchPointId) == 2)
# Test end
# Test split on arc with one point
-Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
-SketchArc_1 = Sketch_1.addArc(50, 50, 0, 50, 100, 50, True)
-Sketch_1.setFixed(SketchArc_1.startPoint())
-Sketch_1.setFixed(SketchArc_1.endPoint())
-Sketch_1.setRadius(SketchArc_1, 50)
-SketchPoint_1 = Sketch_1.addPoint(50, 100)
-SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchPoint_1.coordinates(), SketchArc_1.result()[0])
-Sketch_1.addSplit(SketchArc_1, SketchPoint_1.coordinates(), SketchArc_1.endPoint())
+Sketch_4 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchArc_4_1 = Sketch_4.addArc(50, 50, 0, 50, 100, 50, True)
+Sketch_4.setFixed(SketchArc_4_1.startPoint())
+Sketch_4.setFixed(SketchArc_4_1.endPoint())
+Sketch_4.setRadius(SketchArc_4_1, 50)
+SketchPoint_4_1 = Sketch_4.addPoint(50, 100)
+SketchConstraintCoincidence_4_1 = Sketch_4.setCoincident(SketchPoint_4_1.coordinates(), SketchArc_4_1.result()[0])
+Sketch_4.addSplit(SketchArc_4_1, SketchPoint_4_1.coordinates(), SketchArc_4_1.endPoint())
model.do()
-Sketch_1_feature = featureToCompositeFeature(Sketch_1.feature())
+Sketch_4_feature = featureToCompositeFeature(Sketch_4.feature())
idList = []
-for index in range(Sketch_1_feature.numberOfSubs()):
- idList.append(Sketch_1_feature.subFeature(index).getKind())
+for index in range(Sketch_4_feature.numberOfSubs()):
+ idList.append(Sketch_4_feature.subFeature(index).getKind())
assert(idList.count(SketchArcId) == 2)
assert(idList.count(SketchPointId) == 1)
# Test end
# Test split on arc with two points
-Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
-SketchArc_1 = Sketch_1.addArc(50, 50, 0, 50, 100, 50, True)
-Sketch_1.setFixed(SketchArc_1.startPoint())
-Sketch_1.setFixed(SketchArc_1.endPoint())
-Sketch_1.setRadius(SketchArc_1, 50)
-SketchPoint_1 = Sketch_1.addPoint(25, 93.301270189222)
-SketchPoint_2 = Sketch_1.addPoint(75, 93.301270189222)
-SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchPoint_1.coordinates(), SketchArc_1.result()[0])
-SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchArc_1.result()[0])
-Sketch_1.addSplit(SketchArc_1, SketchPoint_1.coordinates(), SketchPoint_2.coordinates())
+Sketch_5 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchArc_5_1 = Sketch_5.addArc(50, 50, 0, 50, 100, 50, True)
+Sketch_5.setFixed(SketchArc_5_1.startPoint())
+Sketch_5.setFixed(SketchArc_5_1.endPoint())
+Sketch_5.setRadius(SketchArc_5_1, 50)
+SketchPoint_5_1 = Sketch_5.addPoint(25, 93.301270189222)
+SketchPoint_5_2 = Sketch_5.addPoint(75, 93.301270189222)
+SketchConstraintCoincidence_5_1 = Sketch_5.setCoincident(SketchPoint_5_1.coordinates(), SketchArc_5_1.result()[0])
+SketchConstraintCoincidence_5_1 = Sketch_5.setCoincident(SketchPoint_5_2.coordinates(), SketchArc_5_1.result()[0])
+Sketch_5.addSplit(SketchArc_5_1, SketchPoint_5_1.coordinates(), SketchPoint_5_2.coordinates())
model.do()
-Sketch_1_feature = featureToCompositeFeature(Sketch_1.feature())
+Sketch_5_feature = featureToCompositeFeature(Sketch_5.feature())
idList = []
-for index in range(Sketch_1_feature.numberOfSubs()):
- idList.append(Sketch_1_feature.subFeature(index).getKind())
+for index in range(Sketch_5_feature.numberOfSubs()):
+ idList.append(Sketch_5_feature.subFeature(index).getKind())
assert(idList.count(SketchArcId) == 3)
assert(idList.count(SketchPointId) == 2)