From: dbv Date: Mon, 29 Aug 2016 06:52:45 +0000 (+0300) Subject: Test case for Split feature X-Git-Tag: V_2.5.0~123 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=40b43cf85896c1046045e39fb9f2cab5d5dad9cd;p=modules%2Fshaper.git Test case for Split feature --- diff --git a/src/SketchAPI/SketchAPI_Sketch.cpp b/src/SketchAPI/SketchAPI_Sketch.cpp index ad2e2b55d..6b1731aba 100644 --- a/src/SketchAPI/SketchAPI_Sketch.cpp +++ b/src/SketchAPI/SketchAPI_Sketch.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -119,11 +120,11 @@ void SketchAPI_Sketch::setExternal(std::shared_ptr thePlaneObje //-------------------------------------------------------------------------------------- void SketchAPI_Sketch::setValue( - const std::shared_ptr & theConstraint, + const std::shared_ptr & 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_Sketch::addRotation( } //-------------------------------------------------------------------------------------- -std::shared_ptr SketchAPI_Sketch::setAngle( +std::shared_ptr SketchAPI_Sketch::addSplit(const ModelHighAPI_Reference& theFeature, + const ModelHighAPI_RefAttr& thePoint1, + const ModelHighAPI_RefAttr& thePoint2) +{ + std::shared_ptr 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 SketchAPI_Sketch::setAngle( const ModelHighAPI_RefAttr & theLine1, const ModelHighAPI_RefAttr & theLine2, const ModelHighAPI_Double & theValue) @@ -436,10 +450,10 @@ std::shared_ptr 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 SketchAPI_Sketch::setAngleComplementary( +std::shared_ptr SketchAPI_Sketch::setAngleComplementary( const ModelHighAPI_RefAttr & theLine1, const ModelHighAPI_RefAttr & theLine2, const ModelHighAPI_Double & theValue) @@ -453,10 +467,10 @@ std::shared_ptr 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 SketchAPI_Sketch::setAngleBackward( +std::shared_ptr SketchAPI_Sketch::setAngleBackward( const ModelHighAPI_RefAttr & theLine1, const ModelHighAPI_RefAttr & theLine2, const ModelHighAPI_Double & theValue) @@ -470,10 +484,10 @@ std::shared_ptr 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 SketchAPI_Sketch::setCoincident( +std::shared_ptr SketchAPI_Sketch::setCoincident( const ModelHighAPI_RefAttr & thePoint1, const ModelHighAPI_RefAttr & thePoint2) { @@ -482,10 +496,10 @@ std::shared_ptr 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 SketchAPI_Sketch::setCollinear( +std::shared_ptr SketchAPI_Sketch::setCollinear( const ModelHighAPI_RefAttr & theLine1, const ModelHighAPI_RefAttr & theLine2) { @@ -494,10 +508,10 @@ std::shared_ptr 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 SketchAPI_Sketch::setDistance( +std::shared_ptr SketchAPI_Sketch::setDistance( const ModelHighAPI_RefAttr & thePoint, const ModelHighAPI_RefAttr & thePointOrLine, const ModelHighAPI_Double & theValue) @@ -508,10 +522,10 @@ std::shared_ptr 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 SketchAPI_Sketch::setEqual( +std::shared_ptr SketchAPI_Sketch::setEqual( const ModelHighAPI_RefAttr & theObject1, const ModelHighAPI_RefAttr & theObject2) { @@ -520,10 +534,10 @@ std::shared_ptr 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 SketchAPI_Sketch::setFillet( +std::shared_ptr SketchAPI_Sketch::setFillet( const std::list & thePoints, const ModelHighAPI_Double & theRadius) { @@ -532,30 +546,30 @@ std::shared_ptr 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 SketchAPI_Sketch::setFixed( +std::shared_ptr SketchAPI_Sketch::setFixed( const ModelHighAPI_RefAttr & theObject) { std::shared_ptr 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 SketchAPI_Sketch::setHorizontal( +std::shared_ptr SketchAPI_Sketch::setHorizontal( const ModelHighAPI_RefAttr & theLine) { std::shared_ptr 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 SketchAPI_Sketch::setLength( +std::shared_ptr SketchAPI_Sketch::setLength( const ModelHighAPI_RefAttr & theLine, const ModelHighAPI_Double & theValue) { @@ -564,10 +578,10 @@ std::shared_ptr 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 SketchAPI_Sketch::setMiddlePoint( +std::shared_ptr SketchAPI_Sketch::setMiddlePoint( const ModelHighAPI_RefAttr & thePoint, const ModelHighAPI_RefAttr & theLine) { @@ -576,10 +590,10 @@ std::shared_ptr 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 SketchAPI_Sketch::setParallel( +std::shared_ptr SketchAPI_Sketch::setParallel( const ModelHighAPI_RefAttr & theLine1, const ModelHighAPI_RefAttr & theLine2) { @@ -588,10 +602,10 @@ std::shared_ptr 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 SketchAPI_Sketch::setPerpendicular( +std::shared_ptr SketchAPI_Sketch::setPerpendicular( const ModelHighAPI_RefAttr & theLine1, const ModelHighAPI_RefAttr & theLine2) { @@ -600,10 +614,10 @@ std::shared_ptr 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 SketchAPI_Sketch::setRadius( +std::shared_ptr SketchAPI_Sketch::setRadius( const ModelHighAPI_RefAttr & theCircleOrArc, const ModelHighAPI_Double & theValue) { @@ -612,10 +626,10 @@ std::shared_ptr 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 SketchAPI_Sketch::setTangent( +std::shared_ptr SketchAPI_Sketch::setTangent( const ModelHighAPI_RefAttr & theLine, const ModelHighAPI_RefAttr & theCircle) { @@ -624,17 +638,17 @@ std::shared_ptr 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 SketchAPI_Sketch::setVertical( +std::shared_ptr SketchAPI_Sketch::setVertical( const ModelHighAPI_RefAttr & theLine) { std::shared_ptr aFeature = compositeFeature()->addFeature(SketchPlugin_ConstraintVertical::ID()); fillAttribute(theLine, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A())); aFeature->execute(); - return aFeature; + return InterfacePtr(new ModelHighAPI_Interface(aFeature)); } //-------------------------------------------------------------------------------------- diff --git a/src/SketchAPI/SketchAPI_Sketch.h b/src/SketchAPI/SketchAPI_Sketch.h index 545095521..462f1de1e 100644 --- a/src/SketchAPI/SketchAPI_Sketch.h +++ b/src/SketchAPI/SketchAPI_Sketch.h @@ -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 addSplit( + const ModelHighAPI_Reference& theFeature, + const ModelHighAPI_RefAttr& thePoint1, + const ModelHighAPI_RefAttr& thePoint2); + /// Set angle SKETCHAPI_EXPORT - std::shared_ptr setAngle( + std::shared_ptr setAngle( const ModelHighAPI_RefAttr & theLine1, const ModelHighAPI_RefAttr & theLine2, const ModelHighAPI_Double & theValue); /// Set complementary angle SKETCHAPI_EXPORT - std::shared_ptr setAngleComplementary( + std::shared_ptr setAngleComplementary( const ModelHighAPI_RefAttr & theLine1, const ModelHighAPI_RefAttr & theLine2, const ModelHighAPI_Double & theValue); /// Set backward angle (= 360 - angle) SKETCHAPI_EXPORT - std::shared_ptr setAngleBackward( + std::shared_ptr setAngleBackward( const ModelHighAPI_RefAttr & theLine1, const ModelHighAPI_RefAttr & theLine2, const ModelHighAPI_Double & theValue); /// Set coincident SKETCHAPI_EXPORT - std::shared_ptr setCoincident( + std::shared_ptr setCoincident( const ModelHighAPI_RefAttr & thePoint1, const ModelHighAPI_RefAttr & thePoint2); /// Set collinear SKETCHAPI_EXPORT - std::shared_ptr setCollinear( + std::shared_ptr setCollinear( const ModelHighAPI_RefAttr & theLine1, const ModelHighAPI_RefAttr & theLine2); /// Set distance SKETCHAPI_EXPORT - std::shared_ptr setDistance( + std::shared_ptr setDistance( const ModelHighAPI_RefAttr & thePoint, const ModelHighAPI_RefAttr & thePointOrLine, const ModelHighAPI_Double & theValue); /// Set equal SKETCHAPI_EXPORT - std::shared_ptr setEqual( + std::shared_ptr setEqual( const ModelHighAPI_RefAttr & theObject1, const ModelHighAPI_RefAttr & theObject2); /// Set fillet SKETCHAPI_EXPORT - std::shared_ptr setFillet( + std::shared_ptr setFillet( const std::list & thePoints, const ModelHighAPI_Double & theRadius); /// Set fixed SKETCHAPI_EXPORT - std::shared_ptr setFixed( + std::shared_ptr setFixed( const ModelHighAPI_RefAttr & theObject); /// Set horizontal SKETCHAPI_EXPORT - std::shared_ptr setHorizontal( + std::shared_ptr setHorizontal( const ModelHighAPI_RefAttr & theLine); /// Set length SKETCHAPI_EXPORT - std::shared_ptr setLength( + std::shared_ptr setLength( const ModelHighAPI_RefAttr & theLine, const ModelHighAPI_Double & theValue); /// Set middle SKETCHAPI_EXPORT - std::shared_ptr setMiddlePoint( + std::shared_ptr setMiddlePoint( const ModelHighAPI_RefAttr & thePoint, const ModelHighAPI_RefAttr & theLine); /// Set parallel SKETCHAPI_EXPORT - std::shared_ptr setParallel( + std::shared_ptr setParallel( const ModelHighAPI_RefAttr & theLine1, const ModelHighAPI_RefAttr & theLine2); /// Set perpendicular SKETCHAPI_EXPORT - std::shared_ptr setPerpendicular( + std::shared_ptr setPerpendicular( const ModelHighAPI_RefAttr & theLine1, const ModelHighAPI_RefAttr & theLine2); /// Set radius SKETCHAPI_EXPORT - std::shared_ptr setRadius( + std::shared_ptr setRadius( const ModelHighAPI_RefAttr & theCircleOrArc, const ModelHighAPI_Double & theValue); /// Set tangent SKETCHAPI_EXPORT - std::shared_ptr setTangent( + std::shared_ptr setTangent( const ModelHighAPI_RefAttr & theLine, const ModelHighAPI_RefAttr & theCircle); /// Set vertical SKETCHAPI_EXPORT - std::shared_ptr setVertical( + std::shared_ptr setVertical( const ModelHighAPI_RefAttr & theLine); /// Set constraint value SKETCHAPI_EXPORT void setValue( - const std::shared_ptr & theConstraint, + const std::shared_ptr & theConstraint, const ModelHighAPI_Double & theValue); // TODO(spo): rename to selectFaces() or faces() (or add faces() -> list to SWIG) diff --git a/src/SketchPlugin/CMakeLists.txt b/src/SketchPlugin/CMakeLists.txt index 9016965a7..c0d06f3bf 100644 --- a/src/SketchPlugin/CMakeLists.txt +++ b/src/SketchPlugin/CMakeLists.txt @@ -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 index 000000000..aa140610c --- /dev/null +++ b/src/SketchPlugin/Test/TestSplit.py @@ -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())