]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Test case for Split feature
authordbv <dbv@opencascade.com>
Mon, 29 Aug 2016 06:52:45 +0000 (09:52 +0300)
committerdbv <dbv@opencascade.com>
Mon, 29 Aug 2016 06:52:45 +0000 (09:52 +0300)
src/SketchAPI/SketchAPI_Sketch.cpp
src/SketchAPI/SketchAPI_Sketch.h
src/SketchPlugin/CMakeLists.txt
src/SketchPlugin/Test/TestSplit.py [new file with mode: 0644]

index ad2e2b55d2e96fa4bd26b95d5b9cd8cee212be22..6b1731aba941e5d6adb767c8821df8e0890e2ed5 100644 (file)
@@ -22,6 +22,7 @@
 #include <SketchPlugin_ConstraintPerpendicular.h>
 #include <SketchPlugin_ConstraintRadius.h>
 #include <SketchPlugin_ConstraintRigid.h>
+#include <SketchPlugin_ConstraintSplit.h>
 #include <SketchPlugin_ConstraintTangent.h>
 #include <SketchPlugin_ConstraintVertical.h>
 #include <SketcherPrs_Tools.h>
@@ -119,11 +120,11 @@ void SketchAPI_Sketch::setExternal(std::shared_ptr<ModelAPI_Object> thePlaneObje
 
 //--------------------------------------------------------------------------------------
 void SketchAPI_Sketch::setValue(
-    const std::shared_ptr<ModelAPI_Feature> & theConstraint,
+    const std::shared_ptr<ModelHighAPI_Interface> & theConstraint,
     const ModelHighAPI_Double & theValue)
 {
   // TODO(spo): check somehow that the feature is a constraint or eliminate crash if the feature have no real attribute VALUE
-  fillAttribute(theValue, theConstraint->real(SketchPlugin_Constraint::VALUE()));
+  fillAttribute(theValue, theConstraint->feature()->real(SketchPlugin_Constraint::VALUE()));
 
 //  theConstraint->execute();
 }
@@ -423,7 +424,20 @@ std::shared_ptr<SketchAPI_Rotation> SketchAPI_Sketch::addRotation(
 }
 
 //--------------------------------------------------------------------------------------
-std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setAngle(
+std::shared_ptr<ModelHighAPI_Interface> SketchAPI_Sketch::addSplit(const ModelHighAPI_Reference& theFeature,
+                                                             const ModelHighAPI_RefAttr& thePoint1,
+                                                             const ModelHighAPI_RefAttr& thePoint2)
+{
+  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_ConstraintSplit::ID());
+  fillAttribute(theFeature, aFeature->reference(SketchPlugin_Constraint::VALUE()));
+  fillAttribute(thePoint1, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
+  fillAttribute(thePoint2, aFeature->refattr(SketchPlugin_Constraint::ENTITY_B()));
+  //aFeature->execute();
+  return InterfacePtr(new ModelHighAPI_Interface(aFeature));
+}
+
+//--------------------------------------------------------------------------------------
+std::shared_ptr<ModelHighAPI_Interface> SketchAPI_Sketch::setAngle(
     const ModelHighAPI_RefAttr & theLine1,
     const ModelHighAPI_RefAttr & theLine2,
     const ModelHighAPI_Double & theValue)
@@ -436,10 +450,10 @@ std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setAngle(
   fillAttribute(theLine2, aFeature->refattr(SketchPlugin_Constraint::ENTITY_B()));
   fillAttribute(theValue, aFeature->real(SketchPlugin_Constraint::VALUE()));
   aFeature->execute();
-  return aFeature;
+  return InterfacePtr(new ModelHighAPI_Interface(aFeature));
 }
 
-std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setAngleComplementary(
+std::shared_ptr<ModelHighAPI_Interface> SketchAPI_Sketch::setAngleComplementary(
     const ModelHighAPI_RefAttr & theLine1,
     const ModelHighAPI_RefAttr & theLine2,
     const ModelHighAPI_Double & theValue)
@@ -453,10 +467,10 @@ std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setAngleComplementary(
   fillAttribute(theLine2, aFeature->refattr(SketchPlugin_Constraint::ENTITY_B()));
 //  fillAttribute(theValue, aFeature->real(SketchPlugin_Constraint::VALUE()));
   aFeature->execute();
-  return aFeature;
+  return InterfacePtr(new ModelHighAPI_Interface(aFeature));
 }
 
-std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setAngleBackward(
+std::shared_ptr<ModelHighAPI_Interface> SketchAPI_Sketch::setAngleBackward(
     const ModelHighAPI_RefAttr & theLine1,
     const ModelHighAPI_RefAttr & theLine2,
     const ModelHighAPI_Double & theValue)
@@ -470,10 +484,10 @@ std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setAngleBackward(
   fillAttribute(theLine2, aFeature->refattr(SketchPlugin_Constraint::ENTITY_B()));
 //  fillAttribute(theValue, aFeature->real(SketchPlugin_Constraint::VALUE()));
   aFeature->execute();
-  return aFeature;
+  return InterfacePtr(new ModelHighAPI_Interface(aFeature));
 }
 
-std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setCoincident(
+std::shared_ptr<ModelHighAPI_Interface> SketchAPI_Sketch::setCoincident(
     const ModelHighAPI_RefAttr & thePoint1,
     const ModelHighAPI_RefAttr & thePoint2)
 {
@@ -482,10 +496,10 @@ std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setCoincident(
   fillAttribute(thePoint1, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
   fillAttribute(thePoint2, aFeature->refattr(SketchPlugin_Constraint::ENTITY_B()));
   aFeature->execute();
-  return aFeature;
+  return InterfacePtr(new ModelHighAPI_Interface(aFeature));
 }
 
-std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setCollinear(
+std::shared_ptr<ModelHighAPI_Interface> SketchAPI_Sketch::setCollinear(
     const ModelHighAPI_RefAttr & theLine1,
     const ModelHighAPI_RefAttr & theLine2)
 {
@@ -494,10 +508,10 @@ std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setCollinear(
   fillAttribute(theLine1, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
   fillAttribute(theLine2, aFeature->refattr(SketchPlugin_Constraint::ENTITY_B()));
   aFeature->execute();
-  return aFeature;
+  return InterfacePtr(new ModelHighAPI_Interface(aFeature));
 }
 
-std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setDistance(
+std::shared_ptr<ModelHighAPI_Interface> SketchAPI_Sketch::setDistance(
     const ModelHighAPI_RefAttr & thePoint,
     const ModelHighAPI_RefAttr & thePointOrLine,
     const ModelHighAPI_Double & theValue)
@@ -508,10 +522,10 @@ std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setDistance(
   fillAttribute(thePointOrLine, aFeature->refattr(SketchPlugin_Constraint::ENTITY_B()));
   fillAttribute(theValue, aFeature->real(SketchPlugin_Constraint::VALUE()));
   aFeature->execute();
-  return aFeature;
+  return InterfacePtr(new ModelHighAPI_Interface(aFeature));
 }
 
-std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setEqual(
+std::shared_ptr<ModelHighAPI_Interface> SketchAPI_Sketch::setEqual(
     const ModelHighAPI_RefAttr & theObject1,
     const ModelHighAPI_RefAttr & theObject2)
 {
@@ -520,10 +534,10 @@ std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setEqual(
   fillAttribute(theObject1, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
   fillAttribute(theObject2, aFeature->refattr(SketchPlugin_Constraint::ENTITY_B()));
   aFeature->execute();
-  return aFeature;
+  return InterfacePtr(new ModelHighAPI_Interface(aFeature));
 }
 
-std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setFillet(
+std::shared_ptr<ModelHighAPI_Interface> SketchAPI_Sketch::setFillet(
     const std::list<ModelHighAPI_RefAttr> & thePoints,
     const ModelHighAPI_Double & theRadius)
 {
@@ -532,30 +546,30 @@ std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setFillet(
   fillAttribute(thePoints, aFeature->data()->refattrlist(SketchPlugin_Constraint::ENTITY_A()));
   fillAttribute(theRadius, aFeature->real(SketchPlugin_Constraint::VALUE()));
   aFeature->execute();
-  return aFeature;
+  return InterfacePtr(new ModelHighAPI_Interface(aFeature));
 }
 
-std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setFixed(
+std::shared_ptr<ModelHighAPI_Interface> SketchAPI_Sketch::setFixed(
     const ModelHighAPI_RefAttr & theObject)
 {
   std::shared_ptr<ModelAPI_Feature> aFeature =
       compositeFeature()->addFeature(SketchPlugin_ConstraintRigid::ID());
   fillAttribute(theObject, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
   aFeature->execute();
-  return aFeature;
+  return InterfacePtr(new ModelHighAPI_Interface(aFeature));
 }
 
-std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setHorizontal(
+std::shared_ptr<ModelHighAPI_Interface> SketchAPI_Sketch::setHorizontal(
     const ModelHighAPI_RefAttr & theLine)
 {
   std::shared_ptr<ModelAPI_Feature> aFeature =
       compositeFeature()->addFeature(SketchPlugin_ConstraintHorizontal::ID());
   fillAttribute(theLine, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
   aFeature->execute();
-  return aFeature;
+  return InterfacePtr(new ModelHighAPI_Interface(aFeature));
 }
 
-std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setLength(
+std::shared_ptr<ModelHighAPI_Interface> SketchAPI_Sketch::setLength(
     const ModelHighAPI_RefAttr & theLine,
     const ModelHighAPI_Double & theValue)
 {
@@ -564,10 +578,10 @@ std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setLength(
   fillAttribute(theLine, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
   fillAttribute(theValue, aFeature->real(SketchPlugin_Constraint::VALUE()));
   aFeature->execute();
-  return aFeature;
+  return InterfacePtr(new ModelHighAPI_Interface(aFeature));
 }
 
-std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setMiddlePoint(
+std::shared_ptr<ModelHighAPI_Interface> SketchAPI_Sketch::setMiddlePoint(
     const ModelHighAPI_RefAttr & thePoint,
     const ModelHighAPI_RefAttr & theLine)
 {
@@ -576,10 +590,10 @@ std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setMiddlePoint(
   fillAttribute(thePoint, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
   fillAttribute(theLine, aFeature->refattr(SketchPlugin_Constraint::ENTITY_B()));
   aFeature->execute();
-  return aFeature;
+  return InterfacePtr(new ModelHighAPI_Interface(aFeature));
 }
 
-std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setParallel(
+std::shared_ptr<ModelHighAPI_Interface> SketchAPI_Sketch::setParallel(
     const ModelHighAPI_RefAttr & theLine1,
     const ModelHighAPI_RefAttr & theLine2)
 {
@@ -588,10 +602,10 @@ std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setParallel(
   fillAttribute(theLine1, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
   fillAttribute(theLine2, aFeature->refattr(SketchPlugin_Constraint::ENTITY_B()));
   aFeature->execute();
-  return aFeature;
+  return InterfacePtr(new ModelHighAPI_Interface(aFeature));
 }
 
-std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setPerpendicular(
+std::shared_ptr<ModelHighAPI_Interface> SketchAPI_Sketch::setPerpendicular(
     const ModelHighAPI_RefAttr & theLine1,
     const ModelHighAPI_RefAttr & theLine2)
 {
@@ -600,10 +614,10 @@ std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setPerpendicular(
   fillAttribute(theLine1, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
   fillAttribute(theLine2, aFeature->refattr(SketchPlugin_Constraint::ENTITY_B()));
   aFeature->execute();
-  return aFeature;
+  return InterfacePtr(new ModelHighAPI_Interface(aFeature));
 }
 
-std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setRadius(
+std::shared_ptr<ModelHighAPI_Interface> SketchAPI_Sketch::setRadius(
     const ModelHighAPI_RefAttr & theCircleOrArc,
     const ModelHighAPI_Double & theValue)
 {
@@ -612,10 +626,10 @@ std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setRadius(
   fillAttribute(theCircleOrArc, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
   fillAttribute(theValue, aFeature->real(SketchPlugin_Constraint::VALUE()));
   aFeature->execute();
-  return aFeature;
+  return InterfacePtr(new ModelHighAPI_Interface(aFeature));
 }
 
-std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setTangent(
+std::shared_ptr<ModelHighAPI_Interface> SketchAPI_Sketch::setTangent(
     const ModelHighAPI_RefAttr & theLine,
     const ModelHighAPI_RefAttr & theCircle)
 {
@@ -624,17 +638,17 @@ std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setTangent(
   fillAttribute(theLine, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
   fillAttribute(theCircle, aFeature->refattr(SketchPlugin_Constraint::ENTITY_B()));
   aFeature->execute();
-  return aFeature;
+  return InterfacePtr(new ModelHighAPI_Interface(aFeature));
 }
 
-std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setVertical(
+std::shared_ptr<ModelHighAPI_Interface> SketchAPI_Sketch::setVertical(
     const ModelHighAPI_RefAttr & theLine)
 {
   std::shared_ptr<ModelAPI_Feature> aFeature =
       compositeFeature()->addFeature(SketchPlugin_ConstraintVertical::ID());
   fillAttribute(theLine, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
   aFeature->execute();
-  return aFeature;
+  return InterfacePtr(new ModelHighAPI_Interface(aFeature));
 }
 
 //--------------------------------------------------------------------------------------
index 545095521762a3209bf3e5306123323bbaa9db17..462f1de1e9244f79b6f4c22aafa4273c9159dfe1 100644 (file)
@@ -23,6 +23,7 @@ class ModelAPI_Object;
 class ModelHighAPI_Double;
 class ModelHighAPI_Integer;
 class ModelHighAPI_RefAttr;
+class ModelHighAPI_Reference;
 class ModelHighAPI_Selection;
 class SketchAPI_Arc;
 class SketchAPI_Circle;
@@ -245,113 +246,120 @@ public:
       const ModelHighAPI_Integer & theNumberOfObjects,
       bool theFullValue = false);
 
+  /// Add split
+  SKETCHAPI_EXPORT
+  std::shared_ptr<ModelHighAPI_Interface> addSplit(
+      const ModelHighAPI_Reference& theFeature,
+      const ModelHighAPI_RefAttr& thePoint1,
+      const ModelHighAPI_RefAttr& thePoint2);
+
   /// Set angle
   SKETCHAPI_EXPORT
-  std::shared_ptr<ModelAPI_Feature> setAngle(
+  std::shared_ptr<ModelHighAPI_Interface> setAngle(
       const ModelHighAPI_RefAttr & theLine1,
       const ModelHighAPI_RefAttr & theLine2,
       const ModelHighAPI_Double & theValue);
 
   /// Set complementary angle
   SKETCHAPI_EXPORT
-  std::shared_ptr<ModelAPI_Feature> setAngleComplementary(
+  std::shared_ptr<ModelHighAPI_Interface> setAngleComplementary(
       const ModelHighAPI_RefAttr & theLine1,
       const ModelHighAPI_RefAttr & theLine2,
       const ModelHighAPI_Double & theValue);
 
   /// Set backward angle (= 360 - angle)
   SKETCHAPI_EXPORT
-  std::shared_ptr<ModelAPI_Feature> setAngleBackward(
+  std::shared_ptr<ModelHighAPI_Interface> setAngleBackward(
       const ModelHighAPI_RefAttr & theLine1,
       const ModelHighAPI_RefAttr & theLine2,
       const ModelHighAPI_Double & theValue);
 
   /// Set coincident
   SKETCHAPI_EXPORT
-  std::shared_ptr<ModelAPI_Feature> setCoincident(
+  std::shared_ptr<ModelHighAPI_Interface> setCoincident(
       const ModelHighAPI_RefAttr & thePoint1,
       const ModelHighAPI_RefAttr & thePoint2);
 
   /// Set collinear
   SKETCHAPI_EXPORT
-  std::shared_ptr<ModelAPI_Feature> setCollinear(
+  std::shared_ptr<ModelHighAPI_Interface> setCollinear(
       const ModelHighAPI_RefAttr & theLine1,
       const ModelHighAPI_RefAttr & theLine2);
 
   /// Set distance
   SKETCHAPI_EXPORT
-  std::shared_ptr<ModelAPI_Feature> setDistance(
+  std::shared_ptr<ModelHighAPI_Interface> setDistance(
       const ModelHighAPI_RefAttr & thePoint,
       const ModelHighAPI_RefAttr & thePointOrLine,
       const ModelHighAPI_Double & theValue);
 
   /// Set equal
   SKETCHAPI_EXPORT
-  std::shared_ptr<ModelAPI_Feature> setEqual(
+  std::shared_ptr<ModelHighAPI_Interface> setEqual(
       const ModelHighAPI_RefAttr & theObject1,
       const ModelHighAPI_RefAttr & theObject2);
 
   /// Set fillet
   SKETCHAPI_EXPORT
-  std::shared_ptr<ModelAPI_Feature> setFillet(
+  std::shared_ptr<ModelHighAPI_Interface> setFillet(
       const std::list<ModelHighAPI_RefAttr> & thePoints,
       const ModelHighAPI_Double & theRadius);
 
   /// Set fixed
   SKETCHAPI_EXPORT
-  std::shared_ptr<ModelAPI_Feature> setFixed(
+  std::shared_ptr<ModelHighAPI_Interface> setFixed(
       const ModelHighAPI_RefAttr & theObject);
 
   /// Set horizontal
   SKETCHAPI_EXPORT
-  std::shared_ptr<ModelAPI_Feature> setHorizontal(
+  std::shared_ptr<ModelHighAPI_Interface> setHorizontal(
       const ModelHighAPI_RefAttr & theLine);
 
   /// Set length
   SKETCHAPI_EXPORT
-  std::shared_ptr<ModelAPI_Feature> setLength(
+  std::shared_ptr<ModelHighAPI_Interface> setLength(
       const ModelHighAPI_RefAttr & theLine,
       const ModelHighAPI_Double & theValue);
 
   /// Set middle
   SKETCHAPI_EXPORT
-  std::shared_ptr<ModelAPI_Feature> setMiddlePoint(
+  std::shared_ptr<ModelHighAPI_Interface> setMiddlePoint(
       const ModelHighAPI_RefAttr & thePoint,
       const ModelHighAPI_RefAttr & theLine);
 
   /// Set parallel
   SKETCHAPI_EXPORT
-  std::shared_ptr<ModelAPI_Feature> setParallel(
+  std::shared_ptr<ModelHighAPI_Interface> setParallel(
       const ModelHighAPI_RefAttr & theLine1,
       const ModelHighAPI_RefAttr & theLine2);
 
   /// Set perpendicular
   SKETCHAPI_EXPORT
-  std::shared_ptr<ModelAPI_Feature> setPerpendicular(
+  std::shared_ptr<ModelHighAPI_Interface> setPerpendicular(
       const ModelHighAPI_RefAttr & theLine1,
       const ModelHighAPI_RefAttr & theLine2);
 
   /// Set radius
   SKETCHAPI_EXPORT
-  std::shared_ptr<ModelAPI_Feature> setRadius(
+  std::shared_ptr<ModelHighAPI_Interface> setRadius(
       const ModelHighAPI_RefAttr & theCircleOrArc,
       const ModelHighAPI_Double & theValue);
 
   /// Set tangent
   SKETCHAPI_EXPORT
-  std::shared_ptr<ModelAPI_Feature> setTangent(
+  std::shared_ptr<ModelHighAPI_Interface> setTangent(
       const ModelHighAPI_RefAttr & theLine,
       const ModelHighAPI_RefAttr & theCircle);
 
   /// Set vertical
   SKETCHAPI_EXPORT
-  std::shared_ptr<ModelAPI_Feature> setVertical(
+  std::shared_ptr<ModelHighAPI_Interface> setVertical(
       const ModelHighAPI_RefAttr & theLine);
 
   /// Set constraint value
   SKETCHAPI_EXPORT
   void setValue(
-      const std::shared_ptr<ModelAPI_Feature> & theConstraint,
+      const std::shared_ptr<ModelHighAPI_Interface> & theConstraint,
       const ModelHighAPI_Double & theValue);
 
   // TODO(spo): rename to selectFaces() or faces() (or add faces() -> list to SWIG)
index 9016965a711ecce2d44d93df076b1bde69cde62f..c0d06f3bfea910ff9dd9c922bf27c5ebae959d9d 100644 (file)
@@ -140,5 +140,6 @@ ADD_UNIT_TESTS(TestSketchPointLine.py
                TestFillet.py
                TestRectangle.py
                TestProjection.py
+               TestSplit.py
                TestHighload.py
                TestSnowflake.py)
diff --git a/src/SketchPlugin/Test/TestSplit.py b/src/SketchPlugin/Test/TestSplit.py
new file mode 100644 (file)
index 0000000..aa14061
--- /dev/null
@@ -0,0 +1,128 @@
+import model
+
+from ModelAPI import *
+
+SketchPointId = 'SketchPoint'
+SketchLineId = 'SketchLine'
+SketchArcId = 'SketchArc'
+SketchConstraintCoincidenceId = 'SketchConstraintCoincidence'
+SketchConstraintParallelId = 'SketchConstraintParallel'
+SketchConstraintTangentId = 'SketchConstraintTangent'
+SketchConstraintEqualId = 'SketchConstraintEqual'
+
+# Test split on line with one point
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchLine_1 = Sketch_1.addLine(0, 50, 100, 50)
+SketchPoint_1 = Sketch_1.addPoint(50, 50)
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchPoint_1.coordinates(), SketchLine_1.result()[0])
+Sketch_1.addSplit(SketchLine_1, SketchPoint_1.coordinates(), SketchLine_1.endPoint())
+model.do()
+
+Sketch_1_feature = featureToCompositeFeature(Sketch_1.feature())
+idList = []
+for index in range(Sketch_1_feature.numberOfSubs()):
+  idList.append(Sketch_1_feature.subFeature(index).getKind())
+
+assert(idList.count(SketchLineId) == 2)
+assert(idList.count(SketchPointId) == 1)
+assert(idList.count(SketchConstraintCoincidenceId) == 2)
+assert(idList.count(SketchConstraintParallelId) == 1)
+# 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())
+model.do()
+
+Sketch_1_feature = featureToCompositeFeature(Sketch_1.feature())
+idList = []
+for index in range(Sketch_1_feature.numberOfSubs()):
+  idList.append(Sketch_1_feature.subFeature(index).getKind())
+
+assert(idList.count(SketchLineId) == 3)
+assert(idList.count(SketchPointId) == 2)
+assert(idList.count(SketchConstraintCoincidenceId) == 4)
+assert(idList.count(SketchConstraintParallelId) == 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())
+model.do()
+
+Sketch_1_feature = featureToCompositeFeature(Sketch_1.feature())
+idList = []
+for index in range(Sketch_1_feature.numberOfSubs()):
+  idList.append(Sketch_1_feature.subFeature(index).getKind())
+
+assert(idList.count(SketchArcId) == 2)
+assert(idList.count(SketchPointId) == 2)
+assert(idList.count(SketchConstraintCoincidenceId) == 2)
+assert(idList.count(SketchConstraintTangentId) == 1)
+# 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())
+model.do()
+
+Sketch_1_feature = featureToCompositeFeature(Sketch_1.feature())
+idList = []
+for index in range(Sketch_1_feature.numberOfSubs()):
+  idList.append(Sketch_1_feature.subFeature(index).getKind())
+
+assert(idList.count(SketchArcId) == 2)
+assert(idList.count(SketchPointId) == 1)
+assert(idList.count(SketchConstraintCoincidenceId) == 2)
+assert(idList.count(SketchConstraintEqualId) == 1)
+assert(idList.count(SketchConstraintTangentId) == 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())
+model.do()
+
+Sketch_1_feature = featureToCompositeFeature(Sketch_1.feature())
+idList = []
+for index in range(Sketch_1_feature.numberOfSubs()):
+  idList.append(Sketch_1_feature.subFeature(index).getKind())
+
+assert(idList.count(SketchArcId) == 3)
+assert(idList.count(SketchPointId) == 2)
+assert(idList.count(SketchConstraintCoincidenceId) == 4)
+assert(idList.count(SketchConstraintEqualId) == 2)
+assert(idList.count(SketchConstraintTangentId) == 2)
+# Test end
+
+model.end()
+
+assert(model.checkPythonDump())