From: vsv Date: Wed, 26 Sep 2018 13:38:02 +0000 (+0300) Subject: Merge branch 'master' of https://codev-tuleap.cea.fr/plugins/git/salome/shaper X-Git-Tag: CEA_2018-2~66 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0dcd1410a2576891475386459d068c2cd63caa09;hp=7d1e9f5709a3ad2d4c0409f801cb0068cc3f0437;p=modules%2Fshaper.git Merge branch 'master' of https://codev-tuleap.cea.fr/plugins/git/salome/shaper --- diff --git a/build_Salome_rel.bat b/build_Salome_rel.bat index 65c1439ba..e3e2149c1 100644 --- a/build_Salome_rel.bat +++ b/build_Salome_rel.bat @@ -3,11 +3,11 @@ REM Find absolute path to ROOT_DIR @SET PARENT_DIR=%~dp0.. @SET ROOT_DIR= -pushd %PARENT_DIR%\.. +pushd %PARENT_DIR% @SET ROOT_DIR=%CD% popd -@SET SRC_DIR=%ROOT_DIR%\sources\shaper +@SET SRC_DIR=%ROOT_DIR%\sources call %SRC_DIR%\env_Salome.bat mkdir %ROOT_DIR%\build diff --git a/salomeRun_rel.bat b/salomeRun_rel.bat index 9d776d623..03ab278f6 100644 --- a/salomeRun_rel.bat +++ b/salomeRun_rel.bat @@ -3,7 +3,7 @@ REM Find absolute path to ROOT_DIR @SET PARENT_DIR=%~dp0.. @SET ROOT_DIR= -pushd %PARENT_DIR%\.. +pushd %PARENT_DIR% @SET ROOT_DIR=%CD% popd diff --git a/src/FeaturesPlugin/CMakeLists.txt b/src/FeaturesPlugin/CMakeLists.txt index b118cd42e..907c7f260 100644 --- a/src/FeaturesPlugin/CMakeLists.txt +++ b/src/FeaturesPlugin/CMakeLists.txt @@ -351,4 +351,18 @@ ADD_UNIT_TESTS(TestExtrusion.py TestPartitionSubCompsolidWithPlane3.py TestPartitionSubCompsolidWithPlane4.py TestPartitionSubCompsolidWithPlane5.py + TestBooleanFuse_Vertex_Vertex.py + TestBooleanFuse_VertexCompound_VertexCompound.py + TestBooleanFuse_Edge_Edge.py + TestBooleanFuse_EdgeCompound_EdgeCompound.py + TestBooleanFuse_Wire_Wire.py + TestBooleanFuse_WireCompound_WireCompound.py + TestBooleanFuse_Face_Face.py + TestBooleanFuse_FaceCompound_FaceCompound.py + TestBooleanFuse_Shell_Shell.py + TestBooleanFuse_ShellCompound_ShellCompound.py + TestBooleanFuse_Solid_Solid.py + TestBooleanFuse_SolidCompound_SolidCompound.py + TestBooleanFuse_CompSolid_CompSolid.py + TestBooleanFuse_CompSolidCompound_CompSolidCompound.py ) diff --git a/src/FeaturesPlugin/FeaturesPlugin_BooleanFuse.cpp b/src/FeaturesPlugin/FeaturesPlugin_BooleanFuse.cpp index 341eb82ba..0f1ac4f72 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_BooleanFuse.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_BooleanFuse.cpp @@ -317,54 +317,63 @@ void FeaturesPlugin_BooleanFuse::execute() } //================================================================================================== -void FeaturesPlugin_BooleanFuse::loadNamingDS(std::shared_ptr theResultBody, - const std::shared_ptr theBaseShape, - const ListOfShape& theTools, - const std::shared_ptr theResultShape, - GeomAlgoAPI_MakeShape& theMakeShape, - GeomAPI_DataMapOfShapeShape& theMapOfShapes) +void FeaturesPlugin_BooleanFuse::loadNamingDS(ResultBodyPtr theResultBody, + const GeomShapePtr theBaseShape, + const ListOfShape& theTools, + const GeomShapePtr theResultShape, + GeomAlgoAPI_MakeShape& theMakeShape, + GeomAPI_DataMapOfShapeShape& theMapOfShapes) { //load result if (theBaseShape->isEqual(theResultShape)) { theResultBody->store(theResultShape, false); } else { - const int aModifyTag = 1; - const int aModifyEdgeTag = 2; - const int aModifyFaceTag = 3; + const int aModifyVTag = 1; + const int aModifyETag = 2; + const int aModifyFTag = 3; const int aDeletedTag = 4; /// sub solids will be placed at labels 5, 6, etc. if result is compound of solids const int aSubsolidsTag = 5; theResultBody->storeModified(theBaseShape, theResultShape, aSubsolidsTag); - const std::string aModName = "Modified"; + const std::string aModVName = "Modified_Vertex"; const std::string aModEName = "Modified_Edge"; const std::string aModFName = "Modified_Face"; + theResultBody->loadAndOrientModifiedShapes(&theMakeShape, theBaseShape, GeomAPI_Shape::VERTEX, + aModifyVTag, aModVName, theMapOfShapes, false, + false, true); theResultBody->loadAndOrientModifiedShapes(&theMakeShape, theBaseShape, GeomAPI_Shape::EDGE, - aModifyEdgeTag, aModEName, theMapOfShapes, false, + aModifyETag, aModEName, theMapOfShapes, false, false, true); theResultBody->loadAndOrientModifiedShapes(&theMakeShape, theBaseShape, GeomAPI_Shape::FACE, - aModifyFaceTag, aModFName, theMapOfShapes, false, + aModifyFTag, aModFName, theMapOfShapes, false, false, true); + + theResultBody->loadDeletedShapes(&theMakeShape, theBaseShape, + GeomAPI_Shape::VERTEX, aDeletedTag); + theResultBody->loadDeletedShapes(&theMakeShape, theBaseShape, + GeomAPI_Shape::EDGE, aDeletedTag); theResultBody->loadDeletedShapes(&theMakeShape, theBaseShape, GeomAPI_Shape::FACE, aDeletedTag); - int aTag; - std::string aName; - for (ListOfShape::const_iterator - anIter = theTools.begin(); anIter != theTools.end(); anIter++) { - if ((*anIter)->shapeType() <= GeomAPI_Shape::FACE) { - aTag = aModifyFaceTag; - aName = aModFName; - } else { - aTag = aModifyEdgeTag; - aName = aModEName; - } - theResultBody->loadAndOrientModifiedShapes(&theMakeShape, *anIter, - aName == aModEName ? GeomAPI_Shape::EDGE - : GeomAPI_Shape::FACE, - aTag, aName, theMapOfShapes, false, false, true); + for (ListOfShape::const_iterator anIter = theTools.begin(); anIter != theTools.end(); anIter++) + { + theResultBody->loadAndOrientModifiedShapes(&theMakeShape, *anIter, GeomAPI_Shape::VERTEX, + aModifyVTag, aModVName, theMapOfShapes, false, + false, true); + + theResultBody->loadAndOrientModifiedShapes(&theMakeShape, *anIter, GeomAPI_Shape::EDGE, + aModifyETag, aModEName, theMapOfShapes, false, + false, true); + + theResultBody->loadAndOrientModifiedShapes(&theMakeShape, *anIter, GeomAPI_Shape::FACE, + aModifyFTag, aModFName, theMapOfShapes, false, + false, true); + + theResultBody->loadDeletedShapes(&theMakeShape, *anIter, GeomAPI_Shape::VERTEX, aDeletedTag); + theResultBody->loadDeletedShapes(&theMakeShape, *anIter, GeomAPI_Shape::EDGE, aDeletedTag); theResultBody->loadDeletedShapes(&theMakeShape, *anIter, GeomAPI_Shape::FACE, aDeletedTag); } } diff --git a/src/FeaturesPlugin/Test/Test1467.py b/src/FeaturesPlugin/Test/Test1467.py index 929c9f10a..9347af3ff 100644 --- a/src/FeaturesPlugin/Test/Test1467.py +++ b/src/FeaturesPlugin/Test/Test1467.py @@ -38,28 +38,21 @@ Sketch_1 = model.addSketch(Part_1_doc, model.standardPlane("YOZ")) SketchLine_1 = Sketch_1.addLine(14.65001594578831, -16.75950688440132, 21.53989436538019, 4.084511469683225) SketchLine_1.setName("SketchLine_2") SketchLine_1.result().setName("SketchLine_1") -SketchLine_1.result().setColor(225, 0, 0) SketchLine_2 = Sketch_1.addLine(21.53989436538019, 4.084511469683225, 17.92440575878417, 20.67042582762886) SketchLine_2.setName("SketchLine_3") SketchLine_2.result().setName("SketchLine_3") -SketchLine_2.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) SketchConstraintCoincidence_1.setName("SketchConstraintCoincidence_2") SketchLine_3 = Sketch_1.addLine(17.92440575878417, 20.67042582762886, 6.041293582700577, 31.26820121140768) SketchLine_3.setName("SketchLine_4") SketchLine_3.result().setName("SketchLine_4") -SketchLine_3.result().setColor(225, 0, 0) SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) SketchConstraintCoincidence_2.setName("SketchConstraintCoincidence_3") SketchArc_1 = Sketch_1.addArc(15.73021805614924, 42.13223372900752, 6.041293582700577, 31.26820121140768, 1.302016307518145, 40.2010542198842, True) -SketchArc_1.result().setColor(225, 0, 0) -SketchArc_1.results()[1].setColor(225, 0, 0) SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchArc_1.startPoint(), SketchLine_3.endPoint()) SketchConstraintCoincidence_3.setName("SketchConstraintCoincidence_4") SketchConstraintTangent_1 = Sketch_1.setTangent(SketchArc_1.results()[1], SketchLine_3.result()) SketchArc_2 = Sketch_1.addArc(5.884297127208473, -13.86204556507233, 14.65001594578831, -16.75950688440132, -3.31891814825968, -14.59275556007859, True) -SketchArc_2.result().setColor(225, 0, 0) -SketchArc_2.results()[1].setColor(225, 0, 0) SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchArc_2.startPoint(), SketchLine_1.startPoint()) SketchConstraintCoincidence_4.setName("SketchConstraintCoincidence_9") SketchConstraintTangent_2 = Sketch_1.setTangent(SketchArc_2.results()[1], SketchLine_1.result()) diff --git a/src/FeaturesPlugin/Test/Test2588.py b/src/FeaturesPlugin/Test/Test2588.py index e3b23f779..b0a4da97f 100644 --- a/src/FeaturesPlugin/Test/Test2588.py +++ b/src/FeaturesPlugin/Test/Test2588.py @@ -28,11 +28,8 @@ Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("YOZ")) SketchCircle_1 = Sketch_1.addCircle(0, 0, 2) -SketchCircle_1.result().setColor(225, 0, 0) -SketchCircle_1.results()[1].setColor(225, 0, 0) SketchProjection_1 = Sketch_1.addProjection(model.selection("VERTEX", "PartSet/Origin"), False) SketchPoint_1 = SketchProjection_1.createdFeature() -SketchPoint_1.result().setColor(170, 0, 225) SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchCircle_1.center(), SketchAPI_Point(SketchPoint_1).coordinates()) SketchConstraintRadius_1 = Sketch_1.setRadius(SketchCircle_1.results()[1], 2) model.do() diff --git a/src/FeaturesPlugin/Test/Test2596.py b/src/FeaturesPlugin/Test/Test2596.py index f64c564a3..529861ae1 100644 --- a/src/FeaturesPlugin/Test/Test2596.py +++ b/src/FeaturesPlugin/Test/Test2596.py @@ -26,18 +26,12 @@ Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchCircle_1 = Sketch_1.addCircle(-32.04974271012008, 18.88336192109778, 25.20058663660772) -SketchCircle_1.result().setColor(225, 0, 0) -SketchCircle_1.results()[1].setColor(225, 0, 0) model.do() Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchLine_1 = Sketch_2.addLine(22.00171526586623, 64.27272727272731, -86.7941680960549, 64.27272727272731) -SketchLine_1.result().setColor(225, 0, 0) SketchLine_2 = Sketch_2.addLine(-86.7941680960549, 64.27272727272731, -86.7941680960549, -27.54545454545455) -SketchLine_2.result().setColor(225, 0, 0) SketchLine_3 = Sketch_2.addLine(-86.7941680960549, -27.54545454545455, 22.00171526586623, -27.54545454545455) -SketchLine_3.result().setColor(225, 0, 0) SketchLine_4 = Sketch_2.addLine(22.00171526586623, -27.54545454545455, 22.00171526586623, 64.27272727272731) -SketchLine_4.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_2.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint()) SketchConstraintCoincidence_2 = Sketch_2.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) SketchConstraintCoincidence_3 = Sketch_2.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) diff --git a/src/FeaturesPlugin/Test/TestBooleanCommon_CompSolidCompound_CompSolidCompound.py b/src/FeaturesPlugin/Test/TestBooleanCommon_CompSolidCompound_CompSolidCompound.py index 7403d06d7..c74354f89 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCommon_CompSolidCompound_CompSolidCompound.py +++ b/src/FeaturesPlugin/Test/TestBooleanCommon_CompSolidCompound_CompSolidCompound.py @@ -26,69 +26,49 @@ 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(-20.89528643446688, 23.53376279136156, -12.17630887873155, 30.26420160631515) -SketchLine_1.result().setColor(225, 0, 0) SketchLine_2 = Sketch_1.addLine(-12.17630887873155, 30.26420160631515, -3.763260360039565, 22.15708212466651) -SketchLine_2.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) SketchLine_3 = Sketch_1.addLine(-3.763260360039565, 22.15708212466651, -11.56445080464485, 13.8969981244962) -SketchLine_3.result().setColor(225, 0, 0) SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) SketchLine_4 = Sketch_1.addLine(-11.56445080464485, 13.8969981244962, -20.89528643446688, 23.53376279136156) -SketchLine_4.result().setColor(225, 0, 0) SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint()) SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchLine_4.endPoint()) SketchLine_5 = Sketch_1.addLine(-20.89528643446688, 23.53376279136156, -3.763260360039565, 22.15708212466651) -SketchLine_5.result().setColor(225, 0, 0) SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchLine_5.startPoint()) SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_5.endPoint()) SketchLine_6 = Sketch_1.addLine(7.862043047607545, 23.07486923579655, 15.35730445516949, 31.02902419892351) -SketchLine_6.result().setColor(225, 0, 0) SketchLine_7 = Sketch_1.addLine(15.35730445516949, 31.02902419892351, 24.53517556646984, 20.93336597649314) -SketchLine_7.result().setColor(225, 0, 0) SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint()) SketchLine_8 = Sketch_1.addLine(24.53517556646984, 20.93336597649314, 17.03991415890789, 12.67328197632283) -SketchLine_8.result().setColor(225, 0, 0) SketchConstraintCoincidence_8 = Sketch_1.setCoincident(SketchLine_7.endPoint(), SketchLine_8.startPoint()) SketchLine_9 = Sketch_1.addLine(17.03991415890789, 12.67328197632283, 7.862043047607545, 23.07486923579655) -SketchLine_9.result().setColor(225, 0, 0) SketchConstraintCoincidence_9 = Sketch_1.setCoincident(SketchLine_8.endPoint(), SketchLine_9.startPoint()) SketchConstraintCoincidence_10 = Sketch_1.setCoincident(SketchLine_6.startPoint(), SketchLine_9.endPoint()) SketchLine_10 = Sketch_1.addLine(7.862043047607545, 23.07486923579655, 24.53517556646984, 20.93336597649314) -SketchLine_10.result().setColor(225, 0, 0) SketchConstraintCoincidence_11 = Sketch_1.setCoincident(SketchLine_6.startPoint(), SketchLine_10.startPoint()) SketchConstraintCoincidence_12 = Sketch_1.setCoincident(SketchLine_7.endPoint(), SketchLine_10.endPoint()) model.do() Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchLine_11 = Sketch_2.addLine(-6.516621693429666, 11.60253034667112, -9.88184110090646, 19.09779175423307) -SketchLine_11.result().setColor(225, 0, 0) SketchLine_12 = Sketch_2.addLine(-9.88184110090646, 19.09779175423307, -1.162863545171131, 18.94482723571139) -SketchLine_12.result().setColor(225, 0, 0) SketchConstraintCoincidence_13 = Sketch_2.setCoincident(SketchLine_11.endPoint(), SketchLine_12.startPoint()) SketchLine_13 = Sketch_2.addLine(-1.162863545171131, 18.94482723571139, 0.8256751956106094, 13.43810456893119) -SketchLine_13.result().setColor(225, 0, 0) SketchConstraintCoincidence_14 = Sketch_2.setCoincident(SketchLine_12.endPoint(), SketchLine_13.startPoint()) SketchLine_14 = Sketch_2.addLine(0.8256751956106094, 13.43810456893119, -6.516621693429666, 11.60253034667112) -SketchLine_14.result().setColor(225, 0, 0) SketchConstraintCoincidence_15 = Sketch_2.setCoincident(SketchLine_13.endPoint(), SketchLine_14.startPoint()) SketchConstraintCoincidence_16 = Sketch_2.setCoincident(SketchLine_11.startPoint(), SketchLine_14.endPoint()) SketchLine_15 = Sketch_2.addLine(-1.162863545171131, 18.94482723571139, -6.516621693429666, 11.60253034667112) -SketchLine_15.result().setColor(225, 0, 0) SketchConstraintCoincidence_17 = Sketch_2.setCoincident(SketchLine_12.endPoint(), SketchLine_15.startPoint()) SketchConstraintCoincidence_18 = Sketch_2.setCoincident(SketchLine_11.startPoint(), SketchLine_15.endPoint()) SketchLine_16 = Sketch_2.addLine(6.332397862390824, 16.34443042084296, 15.35730445516949, 18.79186271718972) -SketchLine_16.result().setColor(225, 0, 0) SketchLine_17 = Sketch_2.addLine(15.35730445516949, 18.79186271718972, 12.75690764030107, 10.22584967997607) -SketchLine_17.result().setColor(225, 0, 0) SketchConstraintCoincidence_19 = Sketch_2.setCoincident(SketchLine_16.endPoint(), SketchLine_17.startPoint()) SketchLine_18 = Sketch_2.addLine(12.75690764030107, 10.22584967997607, 6.179433343869151, 7.778417383629304) -SketchLine_18.result().setColor(225, 0, 0) SketchConstraintCoincidence_20 = Sketch_2.setCoincident(SketchLine_17.endPoint(), SketchLine_18.startPoint()) SketchLine_19 = Sketch_2.addLine(6.179433343869151, 7.778417383629304, 6.332397862390824, 16.34443042084296) -SketchLine_19.result().setColor(225, 0, 0) SketchConstraintCoincidence_21 = Sketch_2.setCoincident(SketchLine_18.endPoint(), SketchLine_19.startPoint()) SketchConstraintCoincidence_22 = Sketch_2.setCoincident(SketchLine_16.startPoint(), SketchLine_19.endPoint()) SketchLine_20 = Sketch_2.addLine(6.332397862390824, 16.34443042084296, 12.75690764030107, 10.22584967997607) -SketchLine_20.result().setColor(225, 0, 0) SketchConstraintCoincidence_23 = Sketch_2.setCoincident(SketchLine_16.startPoint(), SketchLine_20.startPoint()) SketchConstraintCoincidence_24 = Sketch_2.setCoincident(SketchLine_17.endPoint(), SketchLine_20.endPoint()) model.do() diff --git a/src/FeaturesPlugin/Test/TestBooleanCommon_CompSolidCompound_Face.py b/src/FeaturesPlugin/Test/TestBooleanCommon_CompSolidCompound_Face.py index 5e761e566..4ed9772d1 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCommon_CompSolidCompound_Face.py +++ b/src/FeaturesPlugin/Test/TestBooleanCommon_CompSolidCompound_Face.py @@ -26,13 +26,9 @@ 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(-21.66024096385543, 40.92621620645053, -77.63614457831326, 40.92621620645053) -SketchLine_1.result().setColor(225, 0, 0) SketchLine_2 = Sketch_1.addLine(-77.63614457831326, 40.92621620645053, -77.63614457831326, 1.907518733308514) -SketchLine_2.result().setColor(225, 0, 0) SketchLine_3 = Sketch_1.addLine(-77.63614457831326, 1.907518733308514, -21.66024096385543, 1.907518733308514) -SketchLine_3.result().setColor(225, 0, 0) SketchLine_4 = Sketch_1.addLine(-21.66024096385543, 1.907518733308514, -21.66024096385543, 40.92621620645053) -SketchLine_4.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint()) SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) @@ -42,13 +38,9 @@ SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result()) SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result()) SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result()) SketchLine_5 = Sketch_1.addLine(65.46746987951809, 41.25025618940838, 10.46506024096384, 41.25025618940838) -SketchLine_5.result().setColor(225, 0, 0) SketchLine_6 = Sketch_1.addLine(10.46506024096384, 41.25025618940838, 10.46506024096384, -1.337003177360179) -SketchLine_6.result().setColor(225, 0, 0) SketchLine_7 = Sketch_1.addLine(10.46506024096384, -1.337003177360179, 65.46746987951809, -1.337003177360179) -SketchLine_7.result().setColor(225, 0, 0) SketchLine_8 = Sketch_1.addLine(65.46746987951809, -1.337003177360179, 65.46746987951809, 41.25025618940838) -SketchLine_8.result().setColor(225, 0, 0) SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_8.endPoint(), SketchLine_5.startPoint()) SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint()) SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint()) @@ -58,23 +50,17 @@ SketchConstraintVertical_3 = Sketch_1.setVertical(SketchLine_6.result()) SketchConstraintHorizontal_4 = Sketch_1.setHorizontal(SketchLine_7.result()) SketchConstraintVertical_4 = Sketch_1.setVertical(SketchLine_8.result()) SketchLine_9 = Sketch_1.addLine(-54.27228915662651, 40.92621620645053, -55.24578313253012, 1.907518733308514) -SketchLine_9.result().setColor(225, 0, 0) SketchConstraintCoincidence_9 = Sketch_1.setCoincident(SketchLine_9.startPoint(), SketchLine_1.result()) SketchConstraintCoincidence_10 = Sketch_1.setCoincident(SketchLine_9.endPoint(), SketchLine_3.result()) SketchLine_10 = Sketch_1.addLine(31.88192771084336, 41.25025618940838, 30.42168674698797, -1.337003177360179) -SketchLine_10.result().setColor(225, 0, 0) SketchConstraintCoincidence_11 = Sketch_1.setCoincident(SketchLine_10.startPoint(), SketchLine_5.result()) SketchConstraintCoincidence_12 = Sketch_1.setCoincident(SketchLine_10.endPoint(), SketchLine_7.result()) model.do() Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchLine_11 = Sketch_2.addLine(19.22650602409638, 27.01445783132531, -12.83325439216414, 27.01445783132531) -SketchLine_11.result().setColor(225, 0, 0) SketchLine_12 = Sketch_2.addLine(-12.83325439216414, 27.01445783132531, -12.83325439216414, 11.0281619215649) -SketchLine_12.result().setColor(225, 0, 0) SketchLine_13 = Sketch_2.addLine(-12.83325439216414, 11.0281619215649, 19.22650602409638, 11.0281619215649) -SketchLine_13.result().setColor(225, 0, 0) SketchLine_14 = Sketch_2.addLine(19.22650602409638, 11.0281619215649, 19.22650602409638, 27.01445783132531) -SketchLine_14.result().setColor(225, 0, 0) SketchConstraintCoincidence_13 = Sketch_2.setCoincident(SketchLine_14.endPoint(), SketchLine_11.startPoint()) SketchConstraintCoincidence_14 = Sketch_2.setCoincident(SketchLine_11.endPoint(), SketchLine_12.startPoint()) SketchConstraintCoincidence_15 = Sketch_2.setCoincident(SketchLine_12.endPoint(), SketchLine_13.startPoint()) diff --git a/src/FeaturesPlugin/Test/TestBooleanCommon_CompSolidCompound_Shell.py b/src/FeaturesPlugin/Test/TestBooleanCommon_CompSolidCompound_Shell.py index 74c10c929..474ee4f0d 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCommon_CompSolidCompound_Shell.py +++ b/src/FeaturesPlugin/Test/TestBooleanCommon_CompSolidCompound_Shell.py @@ -26,13 +26,9 @@ 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(-21.66024096385543, 40.92621620645053, -77.63614457831326, 40.92621620645053) -SketchLine_1.result().setColor(225, 0, 0) SketchLine_2 = Sketch_1.addLine(-77.63614457831326, 40.92621620645053, -77.63614457831326, 1.907518733308514) -SketchLine_2.result().setColor(225, 0, 0) SketchLine_3 = Sketch_1.addLine(-77.63614457831326, 1.907518733308514, -21.66024096385543, 1.907518733308514) -SketchLine_3.result().setColor(225, 0, 0) SketchLine_4 = Sketch_1.addLine(-21.66024096385543, 1.907518733308514, -21.66024096385543, 40.92621620645053) -SketchLine_4.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint()) SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) @@ -42,13 +38,9 @@ SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result()) SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result()) SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result()) SketchLine_5 = Sketch_1.addLine(65.46746987951809, 41.25025618940838, 10.46506024096384, 41.25025618940838) -SketchLine_5.result().setColor(225, 0, 0) SketchLine_6 = Sketch_1.addLine(10.46506024096384, 41.25025618940838, 10.46506024096384, -1.337003177360179) -SketchLine_6.result().setColor(225, 0, 0) SketchLine_7 = Sketch_1.addLine(10.46506024096384, -1.337003177360179, 65.46746987951809, -1.337003177360179) -SketchLine_7.result().setColor(225, 0, 0) SketchLine_8 = Sketch_1.addLine(65.46746987951809, -1.337003177360179, 65.46746987951809, 41.25025618940838) -SketchLine_8.result().setColor(225, 0, 0) SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_8.endPoint(), SketchLine_5.startPoint()) SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint()) SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint()) @@ -58,23 +50,17 @@ SketchConstraintVertical_3 = Sketch_1.setVertical(SketchLine_6.result()) SketchConstraintHorizontal_4 = Sketch_1.setHorizontal(SketchLine_7.result()) SketchConstraintVertical_4 = Sketch_1.setVertical(SketchLine_8.result()) SketchLine_9 = Sketch_1.addLine(-54.27228915662651, 40.92621620645053, -55.24578313253012, 1.907518733308514) -SketchLine_9.result().setColor(225, 0, 0) SketchConstraintCoincidence_9 = Sketch_1.setCoincident(SketchLine_9.startPoint(), SketchLine_1.result()) SketchConstraintCoincidence_10 = Sketch_1.setCoincident(SketchLine_9.endPoint(), SketchLine_3.result()) SketchLine_10 = Sketch_1.addLine(31.88192771084336, 41.25025618940838, 30.42168674698797, -1.337003177360179) -SketchLine_10.result().setColor(225, 0, 0) SketchConstraintCoincidence_11 = Sketch_1.setCoincident(SketchLine_10.startPoint(), SketchLine_5.result()) SketchConstraintCoincidence_12 = Sketch_1.setCoincident(SketchLine_10.endPoint(), SketchLine_7.result()) model.do() Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchLine_11 = Sketch_2.addLine(19.22650602409638, 26.41583731352732, -12.83325439216414, 26.41583731352732) -SketchLine_11.result().setColor(225, 0, 0) SketchLine_12 = Sketch_2.addLine(-12.83325439216414, 26.41583731352732, -12.83325439216414, 12.07337391600091) -SketchLine_12.result().setColor(225, 0, 0) SketchLine_13 = Sketch_2.addLine(-12.83325439216414, 12.07337391600091, 19.22650602409638, 12.07337391600091) -SketchLine_13.result().setColor(225, 0, 0) SketchLine_14 = Sketch_2.addLine(19.22650602409638, 12.07337391600091, 19.22650602409638, 26.41583731352732) -SketchLine_14.result().setColor(225, 0, 0) SketchConstraintCoincidence_13 = Sketch_2.setCoincident(SketchLine_14.endPoint(), SketchLine_11.startPoint()) SketchConstraintCoincidence_14 = Sketch_2.setCoincident(SketchLine_11.endPoint(), SketchLine_12.startPoint()) SketchConstraintCoincidence_15 = Sketch_2.setCoincident(SketchLine_12.endPoint(), SketchLine_13.startPoint()) @@ -84,7 +70,6 @@ SketchConstraintVertical_5 = Sketch_2.setVertical(SketchLine_12.result()) SketchConstraintHorizontal_6 = Sketch_2.setHorizontal(SketchLine_13.result()) SketchConstraintVertical_6 = Sketch_2.setVertical(SketchLine_14.result()) SketchLine_15 = Sketch_2.addLine(0.2648302996693306, 26.41583731352732, -0.2234771832481639, 12.07337391600092) -SketchLine_15.result().setColor(225, 0, 0) SketchConstraintCoincidence_17 = Sketch_2.setCoincident(SketchLine_15.startPoint(), SketchLine_11.result()) SketchConstraintCoincidence_18 = Sketch_2.setCoincident(SketchLine_15.endPoint(), SketchLine_13.result()) model.do() diff --git a/src/FeaturesPlugin/Test/TestBooleanCommon_CompSolid_CompSolid.py b/src/FeaturesPlugin/Test/TestBooleanCommon_CompSolid_CompSolid.py index 7e8a9b906..30e2a876b 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCommon_CompSolid_CompSolid.py +++ b/src/FeaturesPlugin/Test/TestBooleanCommon_CompSolid_CompSolid.py @@ -26,13 +26,9 @@ 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(47.26932589060148, 52.61651755566245, -44.41221948537944, 52.61651755566245) -SketchLine_1.result().setColor(225, 0, 0) SketchLine_2 = Sketch_1.addLine(-44.41221948537944, 52.61651755566245, -44.41221948537944, -26.74931734128092) -SketchLine_2.result().setColor(225, 0, 0) SketchLine_3 = Sketch_1.addLine(-44.41221948537944, -26.74931734128092, 47.26932589060148, -26.74931734128092) -SketchLine_3.result().setColor(225, 0, 0) SketchLine_4 = Sketch_1.addLine(47.26932589060148, -26.74931734128092, 47.26932589060148, 52.61651755566245) -SketchLine_4.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint()) SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) @@ -42,19 +38,14 @@ SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result()) SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result()) SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result()) SketchLine_5 = Sketch_1.addLine(7.069530544036858, 52.61651755566245, 10.55455403994589, -26.74931734128092) -SketchLine_5.result().setColor(225, 0, 0) SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_5.startPoint(), SketchLine_1.result()) SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_3.result()) model.do() Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchLine_6 = Sketch_2.addLine(95.24043941744291, 32.97847252814945, 25.14447162912627, 32.97847252814945) -SketchLine_6.result().setColor(225, 0, 0) SketchLine_7 = Sketch_2.addLine(25.14447162912627, 32.97847252814945, 25.14447162912627, -11.61656767103746) -SketchLine_7.result().setColor(225, 0, 0) SketchLine_8 = Sketch_2.addLine(25.14447162912627, -11.61656767103746, 95.24043941744291, -11.61656767103746) -SketchLine_8.result().setColor(225, 0, 0) SketchLine_9 = Sketch_2.addLine(95.24043941744291, -11.61656767103746, 95.24043941744291, 32.97847252814945) -SketchLine_9.result().setColor(225, 0, 0) SketchConstraintCoincidence_7 = Sketch_2.setCoincident(SketchLine_9.endPoint(), SketchLine_6.startPoint()) SketchConstraintCoincidence_8 = Sketch_2.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint()) SketchConstraintCoincidence_9 = Sketch_2.setCoincident(SketchLine_7.endPoint(), SketchLine_8.startPoint()) @@ -64,7 +55,6 @@ SketchConstraintVertical_3 = Sketch_2.setVertical(SketchLine_7.result()) SketchConstraintHorizontal_4 = Sketch_2.setHorizontal(SketchLine_8.result()) SketchConstraintVertical_4 = Sketch_2.setVertical(SketchLine_9.result()) SketchLine_10 = Sketch_2.addLine(63.78513134811883, 32.97847252814945, 65.47170548447893, -11.61656767103746) -SketchLine_10.result().setColor(225, 0, 0) SketchConstraintCoincidence_11 = Sketch_2.setCoincident(SketchLine_10.startPoint(), SketchLine_6.result()) SketchConstraintCoincidence_12 = Sketch_2.setCoincident(SketchLine_10.endPoint(), SketchLine_8.result()) model.do() diff --git a/src/FeaturesPlugin/Test/TestBooleanCommon_CompSolid_Face.py b/src/FeaturesPlugin/Test/TestBooleanCommon_CompSolid_Face.py index c81d3ab52..8799458b1 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCommon_CompSolid_Face.py +++ b/src/FeaturesPlugin/Test/TestBooleanCommon_CompSolid_Face.py @@ -26,13 +26,9 @@ 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(21.16527496861552, 26.63979884904572, -22.80735826270614, 26.63979884904572) -SketchLine_1.result().setColor(225, 0, 0) SketchLine_2 = Sketch_1.addLine(-22.80735826270614, 26.63979884904572, -22.80735826270614, -13.87637783487681) -SketchLine_2.result().setColor(225, 0, 0) SketchLine_3 = Sketch_1.addLine(-22.80735826270614, -13.87637783487681, 21.16527496861552, -13.87637783487681) -SketchLine_3.result().setColor(225, 0, 0) SketchLine_4 = Sketch_1.addLine(21.16527496861552, -13.87637783487681, 21.16527496861552, 26.63979884904572) -SketchLine_4.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint()) SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) @@ -42,19 +38,14 @@ SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result()) SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result()) SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result()) SketchLine_5 = Sketch_1.addLine(-2.257333687264361, 26.63979884904572, -2.257333687264361, -13.87637783487681) -SketchLine_5.result().setColor(225, 0, 0) SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_5.startPoint(), SketchLine_1.result()) SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_3.result()) model.do() Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchLine_6 = Sketch_2.addLine(29.6987556208597, 11.4175813298688, 13.10955704685832, 11.4175813298688) -SketchLine_6.result().setColor(225, 0, 0) SketchLine_7 = Sketch_2.addLine(13.10955704685832, 11.4175813298688, 13.10955704685832, -4.852594194632538) -SketchLine_7.result().setColor(225, 0, 0) SketchLine_8 = Sketch_2.addLine(13.10955704685832, -4.852594194632538, 29.6987556208597, -4.852594194632538) -SketchLine_8.result().setColor(225, 0, 0) SketchLine_9 = Sketch_2.addLine(29.6987556208597, -4.852594194632538, 29.6987556208597, 11.4175813298688) -SketchLine_9.result().setColor(225, 0, 0) SketchConstraintCoincidence_7 = Sketch_2.setCoincident(SketchLine_9.endPoint(), SketchLine_6.startPoint()) SketchConstraintCoincidence_8 = Sketch_2.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint()) SketchConstraintCoincidence_9 = Sketch_2.setCoincident(SketchLine_7.endPoint(), SketchLine_8.startPoint()) diff --git a/src/FeaturesPlugin/Test/TestBooleanCommon_CompSolid_Shell.py b/src/FeaturesPlugin/Test/TestBooleanCommon_CompSolid_Shell.py index 6666e20f8..f43929d82 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCommon_CompSolid_Shell.py +++ b/src/FeaturesPlugin/Test/TestBooleanCommon_CompSolid_Shell.py @@ -26,13 +26,9 @@ 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(15.15938358623833, 14.4352070421809, -11.43137169301882, 14.4352070421809) -SketchLine_1.result().setColor(225, 0, 0) SketchLine_2 = Sketch_1.addLine(-11.43137169301882, 14.4352070421809, -11.43137169301882, -6.935604568322221) -SketchLine_2.result().setColor(225, 0, 0) SketchLine_3 = Sketch_1.addLine(-11.43137169301882, -6.935604568322221, 15.15938358623833, -6.935604568322221) -SketchLine_3.result().setColor(225, 0, 0) SketchLine_4 = Sketch_1.addLine(15.15938358623833, -6.935604568322221, 15.15938358623833, 14.4352070421809) -SketchLine_4.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint()) SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) @@ -42,19 +38,14 @@ SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result()) SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result()) SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result()) SketchLine_5 = Sketch_1.addLine(1.934351860046943, 14.4352070421809, 2.075043686921314, -6.935604568322221) -SketchLine_5.result().setColor(225, 0, 0) SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_5.startPoint(), SketchLine_1.result()) SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_3.result()) model.do() Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchLine_6 = Sketch_2.addLine(26.29086071781277, 6.827405438264643, 9.220324256871813, 6.827405438264643) -SketchLine_6.result().setColor(225, 0, 0) SketchLine_7 = Sketch_2.addLine(9.220324256871813, 6.827405438264643, 9.220324256871813, -3.640935176083419) -SketchLine_7.result().setColor(225, 0, 0) SketchLine_8 = Sketch_2.addLine(9.220324256871813, -3.640935176083419, 26.29086071781277, -3.640935176083419) -SketchLine_8.result().setColor(225, 0, 0) SketchLine_9 = Sketch_2.addLine(26.29086071781277, -3.640935176083419, 26.29086071781277, 6.827405438264643) -SketchLine_9.result().setColor(225, 0, 0) SketchConstraintCoincidence_7 = Sketch_2.setCoincident(SketchLine_9.endPoint(), SketchLine_6.startPoint()) SketchConstraintCoincidence_8 = Sketch_2.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint()) SketchConstraintCoincidence_9 = Sketch_2.setCoincident(SketchLine_7.endPoint(), SketchLine_8.startPoint()) @@ -64,7 +55,6 @@ SketchConstraintVertical_3 = Sketch_2.setVertical(SketchLine_7.result()) SketchConstraintHorizontal_4 = Sketch_2.setHorizontal(SketchLine_8.result()) SketchConstraintVertical_4 = Sketch_2.setVertical(SketchLine_9.result()) SketchLine_10 = Sketch_2.addLine(18.73204224198193, 6.827405438264643, 19.20309616379092, -3.640935176083419) -SketchLine_10.result().setColor(225, 0, 0) SketchConstraintCoincidence_11 = Sketch_2.setCoincident(SketchLine_10.startPoint(), SketchLine_6.result()) SketchConstraintCoincidence_12 = Sketch_2.setCoincident(SketchLine_10.endPoint(), SketchLine_8.result()) model.do() diff --git a/src/FeaturesPlugin/Test/TestBooleanCommon_EdgeCompound_EdgeCompound.py b/src/FeaturesPlugin/Test/TestBooleanCommon_EdgeCompound_EdgeCompound.py index 8dfee9bee..ad29cd18d 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCommon_EdgeCompound_EdgeCompound.py +++ b/src/FeaturesPlugin/Test/TestBooleanCommon_EdgeCompound_EdgeCompound.py @@ -26,15 +26,11 @@ 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(-77.19749092035903, 24.18794374198263, -26.50243221408208, 23.76942369170098) -SketchLine_1.result().setColor(225, 0, 0) SketchLine_2 = Sketch_1.addLine(-52.21940522238806, 23.98173370989996, -68.62380444441784, 24.11716249058297) -SketchLine_2.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_2.startPoint(), SketchLine_1.result()) SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_1.result()) SketchLine_3 = Sketch_1.addLine(9.658082674231901, 24.38959180621407, 76.00931510902234, 24.79203653255435) -SketchLine_3.result().setColor(225, 0, 0) SketchLine_4 = Sketch_1.addLine(31.27467463593981, 24.52070441885453, 55.13167389667986, 24.6654059290823) -SketchLine_4.result().setColor(225, 0, 0) SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_4.startPoint(), SketchLine_3.result()) SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_3.result()) model.do() diff --git a/src/FeaturesPlugin/Test/TestBooleanCommon_Edge_Edge.py b/src/FeaturesPlugin/Test/TestBooleanCommon_Edge_Edge.py index d1e0aca8a..69b8e39f8 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCommon_Edge_Edge.py +++ b/src/FeaturesPlugin/Test/TestBooleanCommon_Edge_Edge.py @@ -26,9 +26,7 @@ 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(-57.23353499871462, -2.917111725546991, 40.54932729918568, 17.67239476025231) -SketchLine_1.result().setColor(225, 0, 0) SketchLine_2 = Sketch_1.addLine(-81.47249047471176, -8.020952206935315, 40.54932729918568, 17.67239476025231) -SketchLine_2.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_2.startPoint(), SketchLine_1.result()) SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.endPoint()) model.do() diff --git a/src/FeaturesPlugin/Test/TestBooleanCommon_FaceCompound_FaceCompound.py b/src/FeaturesPlugin/Test/TestBooleanCommon_FaceCompound_FaceCompound.py index 4b1790bb1..23195447d 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCommon_FaceCompound_FaceCompound.py +++ b/src/FeaturesPlugin/Test/TestBooleanCommon_FaceCompound_FaceCompound.py @@ -26,13 +26,9 @@ 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(-26.91983967935873, 43.92184368737476, -89.26052104208418, 43.92184368737476) -SketchLine_1.result().setColor(225, 0, 0) SketchLine_2 = Sketch_1.addLine(-89.26052104208418, 43.92184368737476, -89.26052104208418, 10.32264529058116) -SketchLine_2.result().setColor(225, 0, 0) SketchLine_3 = Sketch_1.addLine(-89.26052104208418, 10.32264529058116, -26.91983967935873, 10.32264529058116) -SketchLine_3.result().setColor(225, 0, 0) SketchLine_4 = Sketch_1.addLine(-26.91983967935873, 10.32264529058116, -26.91983967935873, 43.92184368737476) -SketchLine_4.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint()) SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) @@ -42,13 +38,9 @@ SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result()) SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result()) SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result()) SketchLine_5 = Sketch_1.addLine(92.09418837675352, 44.32665330661324, 12.75150300601203, 44.32665330661324) -SketchLine_5.result().setColor(225, 0, 0) SketchLine_6 = Sketch_1.addLine(12.75150300601203, 44.32665330661324, 12.75150300601203, 10.32264529058116) -SketchLine_6.result().setColor(225, 0, 0) SketchLine_7 = Sketch_1.addLine(12.75150300601203, 10.32264529058116, 92.09418837675352, 10.32264529058116) -SketchLine_7.result().setColor(225, 0, 0) SketchLine_8 = Sketch_1.addLine(92.09418837675352, 10.32264529058116, 92.09418837675352, 44.32665330661324) -SketchLine_8.result().setColor(225, 0, 0) SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_8.endPoint(), SketchLine_5.startPoint()) SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint()) SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint()) @@ -60,13 +52,9 @@ SketchConstraintVertical_4 = Sketch_1.setVertical(SketchLine_8.result()) model.do() Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchLine_9 = Sketch_2.addLine(-44.32665330661324, 21.65731462925853, -65.78156312625251, 21.65731462925853) -SketchLine_9.result().setColor(225, 0, 0) SketchLine_10 = Sketch_2.addLine(-65.78156312625251, 21.65731462925853, -65.78156312625251, -10.72745490981964) -SketchLine_10.result().setColor(225, 0, 0) SketchLine_11 = Sketch_2.addLine(-65.78156312625251, -10.72745490981964, -44.32665330661324, -10.72745490981964) -SketchLine_11.result().setColor(225, 0, 0) SketchLine_12 = Sketch_2.addLine(-44.32665330661324, -10.72745490981964, -44.32665330661324, 21.65731462925853) -SketchLine_12.result().setColor(225, 0, 0) SketchConstraintCoincidence_9 = Sketch_2.setCoincident(SketchLine_12.endPoint(), SketchLine_9.startPoint()) SketchConstraintCoincidence_10 = Sketch_2.setCoincident(SketchLine_9.endPoint(), SketchLine_10.startPoint()) SketchConstraintCoincidence_11 = Sketch_2.setCoincident(SketchLine_10.endPoint(), SketchLine_11.startPoint()) @@ -76,13 +64,9 @@ SketchConstraintVertical_5 = Sketch_2.setVertical(SketchLine_10.result()) SketchConstraintHorizontal_6 = Sketch_2.setHorizontal(SketchLine_11.result()) SketchConstraintVertical_6 = Sketch_2.setVertical(SketchLine_12.result()) SketchLine_13 = Sketch_2.addLine(64.56713426853709, 24.08617234468937, 42.70741482965934, 24.08617234468937) -SketchLine_13.result().setColor(225, 0, 0) SketchLine_14 = Sketch_2.addLine(42.70741482965934, 24.08617234468937, 42.70741482965934, -10.32264529058116) -SketchLine_14.result().setColor(225, 0, 0) SketchLine_15 = Sketch_2.addLine(42.70741482965934, -10.32264529058116, 64.56713426853709, -10.32264529058116) -SketchLine_15.result().setColor(225, 0, 0) SketchLine_16 = Sketch_2.addLine(64.56713426853709, -10.32264529058116, 64.56713426853709, 24.08617234468937) -SketchLine_16.result().setColor(225, 0, 0) SketchConstraintCoincidence_13 = Sketch_2.setCoincident(SketchLine_16.endPoint(), SketchLine_13.startPoint()) SketchConstraintCoincidence_14 = Sketch_2.setCoincident(SketchLine_13.endPoint(), SketchLine_14.startPoint()) SketchConstraintCoincidence_15 = Sketch_2.setCoincident(SketchLine_14.endPoint(), SketchLine_15.startPoint()) diff --git a/src/FeaturesPlugin/Test/TestBooleanCommon_Face_Face.py b/src/FeaturesPlugin/Test/TestBooleanCommon_Face_Face.py index 75ef3b7cc..0c2edd99d 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCommon_Face_Face.py +++ b/src/FeaturesPlugin/Test/TestBooleanCommon_Face_Face.py @@ -26,13 +26,9 @@ 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(24.08617234468939, 57.68537074148297, -74.28256513026052, 57.68537074148297) -SketchLine_1.result().setColor(225, 0, 0) SketchLine_2 = Sketch_1.addLine(-74.28256513026052, 57.68537074148297, -74.28256513026052, 13.96593186372746) -SketchLine_2.result().setColor(225, 0, 0) SketchLine_3 = Sketch_1.addLine(-74.28256513026052, 13.96593186372746, 24.08617234468939, 13.96593186372746) -SketchLine_3.result().setColor(225, 0, 0) SketchLine_4 = Sketch_1.addLine(24.08617234468939, 13.96593186372746, 24.08617234468939, 57.68537074148297) -SketchLine_4.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint()) SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) @@ -44,13 +40,9 @@ SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result()) model.do() Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchLine_5 = Sketch_2.addLine(-6.679358717434877, 28.9438877755511, -34.20641282565131, 28.9438877755511) -SketchLine_5.result().setColor(225, 0, 0) SketchLine_6 = Sketch_2.addLine(-34.20641282565131, 28.9438877755511, -34.20641282565131, -14.37074148296594) -SketchLine_6.result().setColor(225, 0, 0) SketchLine_7 = Sketch_2.addLine(-34.20641282565131, -14.37074148296594, -6.679358717434877, -14.37074148296594) -SketchLine_7.result().setColor(225, 0, 0) SketchLine_8 = Sketch_2.addLine(-6.679358717434877, -14.37074148296594, -6.679358717434877, 28.9438877755511) -SketchLine_8.result().setColor(225, 0, 0) SketchConstraintCoincidence_5 = Sketch_2.setCoincident(SketchLine_8.endPoint(), SketchLine_5.startPoint()) SketchConstraintCoincidence_6 = Sketch_2.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint()) SketchConstraintCoincidence_7 = Sketch_2.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint()) diff --git a/src/FeaturesPlugin/Test/TestBooleanCommon_ShellCompound_ShellCompound.py b/src/FeaturesPlugin/Test/TestBooleanCommon_ShellCompound_ShellCompound.py index fe5ec1c33..8cb5b9078 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCommon_ShellCompound_ShellCompound.py +++ b/src/FeaturesPlugin/Test/TestBooleanCommon_ShellCompound_ShellCompound.py @@ -26,13 +26,9 @@ 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(-11.4055110220441, 59.07236770836705, -90.54579158316633, 59.07236770836705) -SketchLine_1.result().setColor(225, 0, 0) SketchLine_2 = Sketch_1.addLine(-90.54579158316633, 59.07236770836705, -90.54579158316633, 18.29259905792451) -SketchLine_2.result().setColor(225, 0, 0) SketchLine_3 = Sketch_1.addLine(-90.54579158316633, 18.29259905792451, -11.4055110220441, 18.29259905792451) -SketchLine_3.result().setColor(225, 0, 0) SketchLine_4 = Sketch_1.addLine(-11.4055110220441, 18.29259905792451, -11.4055110220441, 59.07236770836705) -SketchLine_4.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint()) SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) @@ -42,13 +38,9 @@ SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result()) SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result()) SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result()) SketchLine_5 = Sketch_1.addLine(116.15, 58.70699100906781, 29.5612224448898, 58.70699100906781) -SketchLine_5.result().setColor(225, 0, 0) SketchLine_6 = Sketch_1.addLine(29.5612224448898, 58.70699100906781, 29.5612224448898, 16.80919541788544) -SketchLine_6.result().setColor(225, 0, 0) SketchLine_7 = Sketch_1.addLine(29.5612224448898, 16.80919541788544, 116.15, 16.80919541788544) -SketchLine_7.result().setColor(225, 0, 0) SketchLine_8 = Sketch_1.addLine(116.15, 16.80919541788544, 116.15, 58.70699100906781) -SketchLine_8.result().setColor(225, 0, 0) SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_8.endPoint(), SketchLine_5.startPoint()) SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint()) SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint()) @@ -58,23 +50,17 @@ SketchConstraintVertical_3 = Sketch_1.setVertical(SketchLine_6.result()) SketchConstraintHorizontal_4 = Sketch_1.setHorizontal(SketchLine_7.result()) SketchConstraintVertical_4 = Sketch_1.setVertical(SketchLine_8.result()) SketchLine_9 = Sketch_1.addLine(-51.44118236472945, 59.07236770836705, -50.51012024048097, 18.29259905792451) -SketchLine_9.result().setColor(225, 0, 0) SketchConstraintCoincidence_9 = Sketch_1.setCoincident(SketchLine_9.startPoint(), SketchLine_1.result()) SketchConstraintCoincidence_10 = Sketch_1.setCoincident(SketchLine_9.endPoint(), SketchLine_3.result()) SketchLine_10 = Sketch_1.addLine(72.85561122244489, 16.80919541788544, 73.32114228456915, 58.70699100906781) -SketchLine_10.result().setColor(225, 0, 0) SketchConstraintCoincidence_11 = Sketch_1.setCoincident(SketchLine_10.startPoint(), SketchLine_7.result()) SketchConstraintCoincidence_12 = Sketch_1.setCoincident(SketchLine_10.endPoint(), SketchLine_5.result()) model.do() Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchLine_11 = Sketch_2.addLine(-33.65512410802471, 32.35440881763527, -66.62101906518004, 32.35440881763527) -SketchLine_11.result().setColor(225, 0, 0) SketchLine_12 = Sketch_2.addLine(-66.62101906518004, 32.35440881763527, -66.62101906518004, -10.93997995991984) -SketchLine_12.result().setColor(225, 0, 0) SketchLine_13 = Sketch_2.addLine(-66.62101906518004, -10.93997995991984, -33.65512410802471, -10.93997995991984) -SketchLine_13.result().setColor(225, 0, 0) SketchLine_14 = Sketch_2.addLine(-33.65512410802471, -10.93997995991984, -33.65512410802471, 32.35440881763527) -SketchLine_14.result().setColor(225, 0, 0) SketchConstraintCoincidence_13 = Sketch_2.setCoincident(SketchLine_14.endPoint(), SketchLine_11.startPoint()) SketchConstraintCoincidence_14 = Sketch_2.setCoincident(SketchLine_11.endPoint(), SketchLine_12.startPoint()) SketchConstraintCoincidence_15 = Sketch_2.setCoincident(SketchLine_12.endPoint(), SketchLine_13.startPoint()) @@ -84,17 +70,12 @@ SketchConstraintVertical_5 = Sketch_2.setVertical(SketchLine_12.result()) SketchConstraintHorizontal_6 = Sketch_2.setHorizontal(SketchLine_13.result()) SketchConstraintVertical_6 = Sketch_2.setVertical(SketchLine_14.result()) SketchLine_15 = Sketch_2.addLine(-66.62101906518004, 10.47444889779559, -33.6551241080247, 9.543386773547091) -SketchLine_15.result().setColor(225, 0, 0) SketchConstraintCoincidence_17 = Sketch_2.setCoincident(SketchLine_15.startPoint(), SketchLine_12.result()) SketchConstraintCoincidence_18 = Sketch_2.setCoincident(SketchLine_15.endPoint(), SketchLine_14.result()) SketchLine_16 = Sketch_2.addLine(86.07316931157348, 30.95781563126252, 62.43123950606181, 30.95781563126252) -SketchLine_16.result().setColor(225, 0, 0) SketchLine_17 = Sketch_2.addLine(62.43123950606181, 30.95781563126252, 62.43123950606181, -14.66422845691383) -SketchLine_17.result().setColor(225, 0, 0) SketchLine_18 = Sketch_2.addLine(62.43123950606181, -14.66422845691383, 86.07316931157348, -14.66422845691383) -SketchLine_18.result().setColor(225, 0, 0) SketchLine_19 = Sketch_2.addLine(86.07316931157348, -14.66422845691383, 86.07316931157348, 30.95781563126252) -SketchLine_19.result().setColor(225, 0, 0) SketchConstraintCoincidence_19 = Sketch_2.setCoincident(SketchLine_19.endPoint(), SketchLine_16.startPoint()) SketchConstraintCoincidence_20 = Sketch_2.setCoincident(SketchLine_16.endPoint(), SketchLine_17.startPoint()) SketchConstraintCoincidence_21 = Sketch_2.setCoincident(SketchLine_17.endPoint(), SketchLine_18.startPoint()) @@ -104,7 +85,6 @@ SketchConstraintVertical_7 = Sketch_2.setVertical(SketchLine_17.result()) SketchConstraintHorizontal_8 = Sketch_2.setHorizontal(SketchLine_18.result()) SketchConstraintVertical_8 = Sketch_2.setVertical(SketchLine_19.result()) SketchLine_20 = Sketch_2.addLine(62.43123950606181, 3.491482965931855, 86.07316931157347, 4.888076152304602) -SketchLine_20.result().setColor(225, 0, 0) SketchConstraintCoincidence_23 = Sketch_2.setCoincident(SketchLine_20.startPoint(), SketchLine_17.result()) SketchConstraintCoincidence_24 = Sketch_2.setCoincident(SketchLine_20.endPoint(), SketchLine_19.result()) model.do() diff --git a/src/FeaturesPlugin/Test/TestBooleanCommon_Shell_Shell.py b/src/FeaturesPlugin/Test/TestBooleanCommon_Shell_Shell.py index 3d2ce8998..5930b955e 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCommon_Shell_Shell.py +++ b/src/FeaturesPlugin/Test/TestBooleanCommon_Shell_Shell.py @@ -26,13 +26,9 @@ 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(-8.703406813627256, 48.70884844011781, -89.26052104208418, 48.70884844011781) -SketchLine_1.result().setColor(225, 0, 0) SketchLine_2 = Sketch_1.addLine(-89.26052104208418, 48.70884844011781, -89.26052104208418, 1.699676379809279) -SketchLine_2.result().setColor(225, 0, 0) SketchLine_3 = Sketch_1.addLine(-89.26052104208418, 1.699676379809279, -8.703406813627256, 1.699676379809279) -SketchLine_3.result().setColor(225, 0, 0) SketchLine_4 = Sketch_1.addLine(-8.703406813627256, 1.699676379809279, -8.703406813627256, 48.70884844011781) -SketchLine_4.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint()) SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) @@ -42,19 +38,14 @@ SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result()) SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result()) SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result()) SketchLine_5 = Sketch_1.addLine(-50.39879759519037, 48.70884844011781, -49.99398797595192, 1.699676379809278) -SketchLine_5.result().setColor(225, 0, 0) SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_5.startPoint(), SketchLine_1.result()) SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_3.result()) model.do() Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchLine_6 = Sketch_2.addLine(-27.69909819639279, -33.75100200400802, -61.96570844393754, -33.75100200400802) -SketchLine_6.result().setColor(225, 0, 0) SketchLine_7 = Sketch_2.addLine(-61.96570844393754, -33.75100200400802, -61.96570844393754, 19.31953907815632) -SketchLine_7.result().setColor(225, 0, 0) SketchLine_8 = Sketch_2.addLine(-61.96570844393754, 19.31953907815632, -27.69909819639279, 19.31953907815632) -SketchLine_8.result().setColor(225, 0, 0) SketchLine_9 = Sketch_2.addLine(-27.69909819639279, 19.31953907815632, -27.69909819639279, -33.75100200400802) -SketchLine_9.result().setColor(225, 0, 0) SketchConstraintCoincidence_7 = Sketch_2.setCoincident(SketchLine_9.endPoint(), SketchLine_6.startPoint()) SketchConstraintCoincidence_8 = Sketch_2.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint()) SketchConstraintCoincidence_9 = Sketch_2.setCoincident(SketchLine_7.endPoint(), SketchLine_8.startPoint()) @@ -64,7 +55,6 @@ SketchConstraintVertical_3 = Sketch_2.setVertical(SketchLine_7.result()) SketchConstraintHorizontal_4 = Sketch_2.setHorizontal(SketchLine_8.result()) SketchConstraintVertical_4 = Sketch_2.setVertical(SketchLine_9.result()) SketchLine_10 = Sketch_2.addLine(-61.96570844393754, -12.80210420841683, -27.69909819639279, -13.26763527054108) -SketchLine_10.result().setColor(225, 0, 0) SketchConstraintCoincidence_11 = Sketch_2.setCoincident(SketchLine_10.startPoint(), SketchLine_7.result()) SketchConstraintCoincidence_12 = Sketch_2.setCoincident(SketchLine_10.endPoint(), SketchLine_9.result()) model.do() diff --git a/src/FeaturesPlugin/Test/TestBooleanCommon_SolidCompound_Face.py b/src/FeaturesPlugin/Test/TestBooleanCommon_SolidCompound_Face.py index f94339f30..29b3e9109 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCommon_SolidCompound_Face.py +++ b/src/FeaturesPlugin/Test/TestBooleanCommon_SolidCompound_Face.py @@ -26,13 +26,9 @@ 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(-8.142167372244474, 30.79863310370742, -42.12686596943888, 30.79863310370742) -SketchLine_1.result().setColor(225, 0, 0) SketchLine_2 = Sketch_1.addLine(-42.12686596943888, 30.79863310370742, -42.12686596943888, -6.018123709919844) -SketchLine_2.result().setColor(225, 0, 0) SketchLine_3 = Sketch_1.addLine(-42.12686596943888, -6.018123709919844, -8.142167372244474, -6.018123709919844) -SketchLine_3.result().setColor(225, 0, 0) SketchLine_4 = Sketch_1.addLine(-8.142167372244474, -6.018123709919844, -8.142167372244474, 30.79863310370742) -SketchLine_4.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint()) SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) @@ -42,13 +38,9 @@ SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result()) SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result()) SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result()) SketchLine_5 = Sketch_1.addLine(49.91502606462924, 30.79863310370742, 15.22231291332662, 30.79863310370742) -SketchLine_5.result().setColor(225, 0, 0) SketchLine_6 = Sketch_1.addLine(15.22231291332662, 30.79863310370742, 15.22231291332662, -5.310109155811627) -SketchLine_6.result().setColor(225, 0, 0) SketchLine_7 = Sketch_1.addLine(15.22231291332662, -5.310109155811627, 49.91502606462924, -5.310109155811627) -SketchLine_7.result().setColor(225, 0, 0) SketchLine_8 = Sketch_1.addLine(49.91502606462924, -5.310109155811627, 49.91502606462924, 30.79863310370742) -SketchLine_8.result().setColor(225, 0, 0) SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_8.endPoint(), SketchLine_5.startPoint()) SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint()) SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint()) @@ -61,13 +53,9 @@ model.do() Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection(), 10, 10) Sketch_2 = model.addSketch(Part_1_doc, model.standardPlane("XOY")) SketchLine_9 = Sketch_2.addLine(32.99903071986655, 54.47604223124301, -21.74338409862735, 54.47604223124301) -SketchLine_9.result().setColor(225, 0, 0) SketchLine_10 = Sketch_2.addLine(-21.74338409862735, 54.47604223124301, -21.74338409862735, -10.16156298864041) -SketchLine_10.result().setColor(225, 0, 0) SketchLine_11 = Sketch_2.addLine(-21.74338409862735, -10.16156298864041, 32.99903071986655, -10.16156298864041) -SketchLine_11.result().setColor(225, 0, 0) SketchLine_12 = Sketch_2.addLine(32.99903071986655, -10.16156298864041, 32.99903071986655, 54.47604223124301) -SketchLine_12.result().setColor(225, 0, 0) SketchConstraintCoincidence_9 = Sketch_2.setCoincident(SketchLine_12.endPoint(), SketchLine_9.startPoint()) SketchConstraintCoincidence_10 = Sketch_2.setCoincident(SketchLine_9.endPoint(), SketchLine_10.startPoint()) SketchConstraintCoincidence_11 = Sketch_2.setCoincident(SketchLine_10.endPoint(), SketchLine_11.startPoint()) diff --git a/src/FeaturesPlugin/Test/TestBooleanCommon_SolidCompound_Shell.py b/src/FeaturesPlugin/Test/TestBooleanCommon_SolidCompound_Shell.py index 4f571f1cd..7435166fd 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCommon_SolidCompound_Shell.py +++ b/src/FeaturesPlugin/Test/TestBooleanCommon_SolidCompound_Shell.py @@ -26,13 +26,9 @@ 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(-29.34869739478959, 31.37274549098196, -65.37675350701403, 31.37274549098196) -SketchLine_1.result().setColor(225, 0, 0) SketchLine_2 = Sketch_1.addLine(-65.37675350701403, 31.37274549098196, -65.37675350701403, -6.274549098196388) -SketchLine_2.result().setColor(225, 0, 0) SketchLine_3 = Sketch_1.addLine(-65.37675350701403, -6.274549098196388, -29.34869739478959, -6.274549098196388) -SketchLine_3.result().setColor(225, 0, 0) SketchLine_4 = Sketch_1.addLine(-29.34869739478959, -6.274549098196388, -29.34869739478959, 31.37274549098196) -SketchLine_4.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint()) SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) @@ -42,13 +38,9 @@ SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result()) SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result()) SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result()) SketchLine_5 = Sketch_1.addLine(41.08817635270542, 32.5871743486974, 11.5370741482966, 32.5871743486974) -SketchLine_5.result().setColor(225, 0, 0) SketchLine_6 = Sketch_1.addLine(11.5370741482966, 32.5871743486974, 11.5370741482966, -8.703406813627252) -SketchLine_6.result().setColor(225, 0, 0) SketchLine_7 = Sketch_1.addLine(11.5370741482966, -8.703406813627252, 41.08817635270542, -8.703406813627252) -SketchLine_7.result().setColor(225, 0, 0) SketchLine_8 = Sketch_1.addLine(41.08817635270542, -8.703406813627252, 41.08817635270542, 32.5871743486974) -SketchLine_8.result().setColor(225, 0, 0) SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_8.endPoint(), SketchLine_5.startPoint()) SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint()) SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint()) @@ -60,25 +52,18 @@ SketchConstraintVertical_4 = Sketch_1.setVertical(SketchLine_8.result()) model.do() Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchLine_9 = Sketch_2.addLine(-36.83851213815001, 4.871192068212162, -37.23534778672252, 23.01200273357838) -SketchLine_9.result().setColor(225, 0, 0) SketchLine_10 = Sketch_2.addLine(-37.23534778672252, 23.01200273357838, -8.095368404429529, 22.8820142517576) -SketchLine_10.result().setColor(225, 0, 0) SketchConstraintCoincidence_9 = Sketch_2.setCoincident(SketchLine_9.endPoint(), SketchLine_10.startPoint()) SketchLine_11 = Sketch_2.addLine(-8.095368404429529, 22.8820142517576, 20.86605178109317, 22.08563377543123) -SketchLine_11.result().setColor(225, 0, 0) SketchConstraintCoincidence_10 = Sketch_2.setCoincident(SketchLine_10.endPoint(), SketchLine_11.startPoint()) SketchLine_12 = Sketch_2.addLine(20.86605178109317, 22.08563377543123, 22.14286343998464, -2.004860047909258) -SketchLine_12.result().setColor(225, 0, 0) SketchConstraintCoincidence_11 = Sketch_2.setCoincident(SketchLine_11.endPoint(), SketchLine_12.startPoint()) SketchLine_13 = Sketch_2.addLine(22.14286343998464, -2.004860047909258, -4.857114760245733, -1.198368777231491) -SketchLine_13.result().setColor(225, 0, 0) SketchConstraintCoincidence_12 = Sketch_2.setCoincident(SketchLine_12.endPoint(), SketchLine_13.startPoint()) SketchLine_14 = Sketch_2.addLine(-4.857114760245733, -1.198368777231491, -36.83851213815001, 4.871192068212162) -SketchLine_14.result().setColor(225, 0, 0) SketchConstraintCoincidence_13 = Sketch_2.setCoincident(SketchLine_13.endPoint(), SketchLine_14.startPoint()) SketchConstraintCoincidence_14 = Sketch_2.setCoincident(SketchLine_9.startPoint(), SketchLine_14.endPoint()) SketchLine_15 = Sketch_2.addLine(-4.857114760245733, -1.198368777231491, -8.095368404429529, 22.8820142517576) -SketchLine_15.result().setColor(225, 0, 0) SketchConstraintCoincidence_15 = Sketch_2.setCoincident(SketchLine_13.endPoint(), SketchLine_15.startPoint()) SketchConstraintCoincidence_16 = Sketch_2.setCoincident(SketchLine_10.endPoint(), SketchLine_15.endPoint()) model.do() diff --git a/src/FeaturesPlugin/Test/TestBooleanCommon_SolidCompound_SolidCompound.py b/src/FeaturesPlugin/Test/TestBooleanCommon_SolidCompound_SolidCompound.py index ec915c18a..37bf47049 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCommon_SolidCompound_SolidCompound.py +++ b/src/FeaturesPlugin/Test/TestBooleanCommon_SolidCompound_SolidCompound.py @@ -26,13 +26,9 @@ 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(-10.72745490981964, 42.70741482965933, -40.27855711422846, 42.70741482965933) -SketchLine_1.result().setColor(225, 0, 0) SketchLine_2 = Sketch_1.addLine(-40.27855711422846, 42.70741482965933, -40.27855711422846, 9.513026052104207) -SketchLine_2.result().setColor(225, 0, 0) SketchLine_3 = Sketch_1.addLine(-40.27855711422846, 9.513026052104207, -10.72745490981964, 9.513026052104207) -SketchLine_3.result().setColor(225, 0, 0) SketchLine_4 = Sketch_1.addLine(-10.72745490981964, 9.513026052104207, -10.72745490981964, 42.70741482965933) -SketchLine_4.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint()) SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) @@ -42,13 +38,9 @@ SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result()) SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result()) SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result()) SketchLine_5 = Sketch_1.addLine(51.61322645290581, 42.70741482965933, 15.98997995991983, 42.70741482965933) -SketchLine_5.result().setColor(225, 0, 0) SketchLine_6 = Sketch_1.addLine(15.98997995991983, 42.70741482965933, 15.98997995991983, 8.298597194388774) -SketchLine_6.result().setColor(225, 0, 0) SketchLine_7 = Sketch_1.addLine(15.98997995991983, 8.298597194388774, 51.61322645290581, 8.298597194388774) -SketchLine_7.result().setColor(225, 0, 0) SketchLine_8 = Sketch_1.addLine(51.61322645290581, 8.298597194388774, 51.61322645290581, 42.70741482965933) -SketchLine_8.result().setColor(225, 0, 0) SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_8.endPoint(), SketchLine_5.startPoint()) SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint()) SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint()) @@ -60,13 +52,9 @@ SketchConstraintVertical_4 = Sketch_1.setVertical(SketchLine_8.result()) model.do() Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchLine_9 = Sketch_2.addLine(-17.20440881763527, 19.22845691382766, -33.80160320641282, 19.22845691382766) -SketchLine_9.result().setColor(225, 0, 0) SketchLine_10 = Sketch_2.addLine(-33.80160320641282, 19.22845691382766, -33.80160320641282, -6.679358717434865) -SketchLine_10.result().setColor(225, 0, 0) SketchLine_11 = Sketch_2.addLine(-33.80160320641282, -6.679358717434865, -17.20440881763527, -6.679358717434865) -SketchLine_11.result().setColor(225, 0, 0) SketchLine_12 = Sketch_2.addLine(-17.20440881763527, -6.679358717434865, -17.20440881763527, 19.22845691382766) -SketchLine_12.result().setColor(225, 0, 0) SketchConstraintCoincidence_9 = Sketch_2.setCoincident(SketchLine_12.endPoint(), SketchLine_9.startPoint()) SketchConstraintCoincidence_10 = Sketch_2.setCoincident(SketchLine_9.endPoint(), SketchLine_10.startPoint()) SketchConstraintCoincidence_11 = Sketch_2.setCoincident(SketchLine_10.endPoint(), SketchLine_11.startPoint()) @@ -76,13 +64,9 @@ SketchConstraintVertical_5 = Sketch_2.setVertical(SketchLine_10.result()) SketchConstraintHorizontal_6 = Sketch_2.setHorizontal(SketchLine_11.result()) SketchConstraintVertical_6 = Sketch_2.setVertical(SketchLine_12.result()) SketchLine_13 = Sketch_2.addLine(41.4929859719439, 21.25250501002005, 26.51503006012023, 21.25250501002005) -SketchLine_13.result().setColor(225, 0, 0) SketchLine_14 = Sketch_2.addLine(26.51503006012023, 21.25250501002005, 26.51503006012023, -9.917835671342685) -SketchLine_14.result().setColor(225, 0, 0) SketchLine_15 = Sketch_2.addLine(26.51503006012023, -9.917835671342685, 41.4929859719439, -9.917835671342685) -SketchLine_15.result().setColor(225, 0, 0) SketchLine_16 = Sketch_2.addLine(41.4929859719439, -9.917835671342685, 41.4929859719439, 21.25250501002005) -SketchLine_16.result().setColor(225, 0, 0) SketchConstraintCoincidence_13 = Sketch_2.setCoincident(SketchLine_16.endPoint(), SketchLine_13.startPoint()) SketchConstraintCoincidence_14 = Sketch_2.setCoincident(SketchLine_13.endPoint(), SketchLine_14.startPoint()) SketchConstraintCoincidence_15 = Sketch_2.setCoincident(SketchLine_14.endPoint(), SketchLine_15.startPoint()) diff --git a/src/FeaturesPlugin/Test/TestBooleanCommon_Solid_Face.py b/src/FeaturesPlugin/Test/TestBooleanCommon_Solid_Face.py index 2ae30c037..36cee473d 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCommon_Solid_Face.py +++ b/src/FeaturesPlugin/Test/TestBooleanCommon_Solid_Face.py @@ -26,8 +26,6 @@ Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchCircle_1 = Sketch_1.addCircle(-19.01903137581643, 2.528314065029049, 44.55011038017909) -SketchCircle_1.result().setColor(225, 0, 0) -SketchCircle_1.results()[1].setColor(225, 0, 0) model.do() Face_1 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2f")]) Sphere_1 = model.addSphere(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), 10) diff --git a/src/FeaturesPlugin/Test/TestBooleanCommon_Solid_Shell.py b/src/FeaturesPlugin/Test/TestBooleanCommon_Solid_Shell.py index 26b19081b..c9364c2bc 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCommon_Solid_Shell.py +++ b/src/FeaturesPlugin/Test/TestBooleanCommon_Solid_Shell.py @@ -26,13 +26,9 @@ 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(35.42084168336675, 22.87174348697394, -27.32464929859721, 22.87174348697394) -SketchLine_1.result().setColor(225, 0, 0) SketchLine_2 = Sketch_1.addLine(-27.32464929859721, 22.87174348697394, -27.32464929859721, -13.08560194713185) -SketchLine_2.result().setColor(225, 0, 0) SketchLine_3 = Sketch_1.addLine(-27.32464929859721, -13.08560194713185, 35.42084168336675, -13.08560194713185) -SketchLine_3.result().setColor(225, 0, 0) SketchLine_4 = Sketch_1.addLine(35.42084168336675, -13.08560194713185, 35.42084168336675, 22.87174348697394) -SketchLine_4.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint()) SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) @@ -42,7 +38,6 @@ SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result()) SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result()) SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result()) SketchLine_5 = Sketch_1.addLine(4.250501002003999, 22.87174348697394, 4.250501002003999, -13.08560194713185) -SketchLine_5.result().setColor(225, 0, 0) SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_5.startPoint(), SketchLine_1.result()) SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_3.result()) model.do() diff --git a/src/FeaturesPlugin/Test/TestBooleanCommon_VertexCompound_VertexCompound.py b/src/FeaturesPlugin/Test/TestBooleanCommon_VertexCompound_VertexCompound.py index 498ce29bf..e3389a117 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCommon_VertexCompound_VertexCompound.py +++ b/src/FeaturesPlugin/Test/TestBooleanCommon_VertexCompound_VertexCompound.py @@ -26,11 +26,8 @@ Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchPoint_1 = Sketch_1.addPoint(-28.13426853707415, 23.27655310621242) -SketchPoint_1.result().setColor(225, 0, 0) SketchPoint_2 = Sketch_1.addPoint(10.32264529058116, 23.27655310621242) -SketchPoint_2.result().setColor(225, 0, 0) SketchPoint_3 = Sketch_1.addPoint(47.56513026052106, 23.27655310621242) -SketchPoint_3.result().setColor(225, 0, 0) model.do() Vertex_1 = model.addVertex(Part_1_doc, [model.selection("VERTEX", "Sketch_1/Vertex-SketchPoint_1"), model.selection("VERTEX", "Sketch_1/Vertex-SketchPoint_2")]) Vertex_2 = model.addVertex(Part_1_doc, [model.selection("VERTEX", "Sketch_1/Vertex-SketchPoint_2"), model.selection("VERTEX", "Sketch_1/Vertex-SketchPoint_3")]) diff --git a/src/FeaturesPlugin/Test/TestBooleanCommon_Vertex_Vertex.py b/src/FeaturesPlugin/Test/TestBooleanCommon_Vertex_Vertex.py index 3bf2a002b..c89dda3f3 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCommon_Vertex_Vertex.py +++ b/src/FeaturesPlugin/Test/TestBooleanCommon_Vertex_Vertex.py @@ -26,18 +26,14 @@ Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Sketch_1 = model.addSketch(Part_1_doc, model.standardPlane("XOY")) SketchPoint_1 = Sketch_1.addPoint(15.05904629113425, 12.50050543761873) -SketchPoint_1.result().setColor(225, 0, 0) SketchPoint_2 = Sketch_1.addPoint(47.25352258215165, 31.63008715695855) -SketchPoint_2.result().setColor(225, 0, 0) model.do() Vertex_1 = model.addVertex(Part_1_doc, [model.selection("VERTEX", "Sketch_1/Vertex-SketchPoint_1"), model.selection("VERTEX", "Sketch_1/Vertex-SketchPoint_2")]) Common_1 = model.addCommon(Part_1_doc, [model.selection("VERTEX", "Vertex_1_1"), model.selection("VERTEX", "Vertex_1_2")]) Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchPoint_3 = Sketch_2.addPoint(15.05904629113425, 12.50050543761873) -SketchPoint_3.result().setColor(225, 0, 0) SketchProjection_1 = Sketch_2.addProjection(model.selection("VERTEX", "Sketch_1/Vertex-SketchPoint_1"), False) SketchPoint_4 = SketchProjection_1.createdFeature() -SketchPoint_4.result().setColor(170, 0, 225) SketchConstraintCoincidence_1 = Sketch_2.setCoincident(SketchPoint_3.coordinates(), SketchPoint_4.result()) model.do() Vertex_2 = model.addVertex(Part_1_doc, [model.selection("VERTEX", "Sketch_2/Vertex-SketchPoint_3-SketchProjection_1-SketchPoint_4")]) diff --git a/src/FeaturesPlugin/Test/TestBooleanCommon_WireCompound_WireCompound.py b/src/FeaturesPlugin/Test/TestBooleanCommon_WireCompound_WireCompound.py index b8c8d5032..5d06579a2 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCommon_WireCompound_WireCompound.py +++ b/src/FeaturesPlugin/Test/TestBooleanCommon_WireCompound_WireCompound.py @@ -28,44 +28,32 @@ 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(-88.6588483815807, 35.68247765805569, -60.62456998069012, -7.998839850308682) -SketchLine_1.result().setColor(225, 0, 0) SketchLine_2 = Sketch_1.addLine(-60.62456998069012, -7.998839850308682, -33.24225154261096, 37.63835754648991) -SketchLine_2.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) SketchLine_3 = Sketch_1.addLine(22.82630525917019, 37.63835754648991, 47.60078384600371, -9.954719738742909) -SketchLine_3.result().setColor(225, 0, 0) SketchLine_4 = Sketch_1.addLine(47.60078384600371, -9.954719738742909, 74.33114232127146, 36.3344376208671) -SketchLine_4.result().setColor(225, 0, 0) SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint()) model.do() Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchLine_5 = Sketch_2.addLine(-75.23467769579756, 14.76574658950986, -60.62456998069012, -7.998839850308684) -SketchLine_5.result().setColor(225, 0, 0) SketchProjection_1 = Sketch_2.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"), False) SketchLine_6 = SketchProjection_1.createdFeature() -SketchLine_6.result().setColor(170, 0, 225) SketchConstraintCoincidence_3 = Sketch_2.setCoincident(SketchLine_5.startPoint(), SketchLine_6.result()) SketchConstraintCoincidence_4 = Sketch_2.setCoincident(SketchAPI_Line(SketchLine_6).endPoint(), SketchLine_5.endPoint()) SketchLine_7 = Sketch_2.addLine(-60.62456998069012, -7.998839850308684, -47.51524103341781, 13.8500417284785) -SketchLine_7.result().setColor(225, 0, 0) SketchConstraintCoincidence_5 = Sketch_2.setCoincident(SketchLine_5.endPoint(), SketchLine_7.startPoint()) SketchProjection_2 = Sketch_2.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchLine_2"), False) SketchLine_8 = SketchProjection_2.createdFeature() -SketchLine_8.result().setColor(170, 0, 225) SketchConstraintCoincidence_6 = Sketch_2.setCoincident(SketchLine_7.endPoint(), SketchLine_8.result()) SketchLine_9 = Sketch_2.addLine(35.74952364371219, 12.81217486039606, 47.60078384600371, -9.954719738742909) -SketchLine_9.result().setColor(225, 0, 0) SketchProjection_3 = Sketch_2.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchLine_3"), False) SketchLine_10 = SketchProjection_3.createdFeature() -SketchLine_10.result().setColor(170, 0, 225) SketchConstraintCoincidence_7 = Sketch_2.setCoincident(SketchLine_9.startPoint(), SketchLine_10.result()) SketchConstraintCoincidence_8 = Sketch_2.setCoincident(SketchAPI_Line(SketchLine_10).endPoint(), SketchLine_9.endPoint()) SketchLine_11 = Sketch_2.addLine(47.60078384600371, -9.954719738742909, 64.13719888777418, 18.68151118724985) -SketchLine_11.result().setColor(225, 0, 0) SketchConstraintCoincidence_9 = Sketch_2.setCoincident(SketchLine_9.endPoint(), SketchLine_11.startPoint()) SketchProjection_4 = Sketch_2.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchLine_4"), False) SketchLine_12 = SketchProjection_4.createdFeature() -SketchLine_12.result().setColor(170, 0, 225) SketchConstraintCoincidence_10 = Sketch_2.setCoincident(SketchLine_11.endPoint(), SketchLine_12.result()) model.do() Wire_1 = model.addWire(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_2")]) diff --git a/src/FeaturesPlugin/Test/TestBooleanCommon_Wire_Wire.py b/src/FeaturesPlugin/Test/TestBooleanCommon_Wire_Wire.py index 41da10124..0e802ce83 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCommon_Wire_Wire.py +++ b/src/FeaturesPlugin/Test/TestBooleanCommon_Wire_Wire.py @@ -28,25 +28,19 @@ 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(-44.32557091040492, 34.37855773243287, -1.296213364851963, -18.43019925529121) -SketchLine_1.result().setColor(225, 0, 0) SketchLine_2 = Sketch_1.addLine(-1.296213364851963, -18.43019925529121, 39.1253043294554, 29.81483799275304) -SketchLine_2.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) model.do() Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchLine_3 = Sketch_2.addLine(-15.313984501828, -1.226571041729713, -1.296213364851965, -18.43019925529121) -SketchLine_3.result().setColor(225, 0, 0) SketchProjection_1 = Sketch_2.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"), False) SketchLine_4 = SketchProjection_1.createdFeature() -SketchLine_4.result().setColor(170, 0, 225) SketchConstraintCoincidence_2 = Sketch_2.setCoincident(SketchLine_3.startPoint(), SketchLine_4.result()) SketchConstraintCoincidence_3 = Sketch_2.setCoincident(SketchAPI_Line(SketchLine_4).endPoint(), SketchLine_3.endPoint()) SketchLine_5 = Sketch_2.addLine(-1.296213364851965, -18.43019925529121, 20.70651786493702, 7.831125115747244) -SketchLine_5.result().setColor(225, 0, 0) SketchConstraintCoincidence_4 = Sketch_2.setCoincident(SketchLine_3.endPoint(), SketchLine_5.startPoint()) SketchProjection_2 = Sketch_2.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchLine_2"), False) SketchLine_6 = SketchProjection_2.createdFeature() -SketchLine_6.result().setColor(170, 0, 225) SketchConstraintCoincidence_5 = Sketch_2.setCoincident(SketchLine_5.endPoint(), SketchLine_6.result()) model.do() Wire_1 = model.addWire(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_2")]) diff --git a/src/FeaturesPlugin/Test/TestBooleanCut_CompSolidCompound_CompSolidCompound.py b/src/FeaturesPlugin/Test/TestBooleanCut_CompSolidCompound_CompSolidCompound.py index 637dbfba8..3df97a612 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCut_CompSolidCompound_CompSolidCompound.py +++ b/src/FeaturesPlugin/Test/TestBooleanCut_CompSolidCompound_CompSolidCompound.py @@ -26,33 +26,21 @@ Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchCircle_1 = Sketch_1.addCircle(-65.75962883650391, 1.812165175943577, 20.84344758927215) -SketchCircle_1.result().setColor(225, 0, 0) -SketchCircle_1.results()[1].setColor(225, 0, 0) SketchLine_1 = Sketch_1.addLine(-64.98081644495703, 22.64105757725738, -64.58019600110421, -18.99788637597517) -SketchLine_1.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchCircle_1.results()[1]) SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchCircle_1.results()[1]) SketchCircle_2 = Sketch_1.addCircle(62.53870966583226, 1.604010602289747, 23.75523331537361) -SketchCircle_2.result().setColor(225, 0, 0) -SketchCircle_2.results()[1].setColor(225, 0, 0) SketchLine_2 = Sketch_1.addLine(63.75890236666707, 25.3278854890081, 63.76050419996562, -22.11978184293701) -SketchLine_2.result().setColor(225, 0, 0) SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.startPoint(), SketchCircle_2.results()[1]) SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchCircle_2.results()[1]) model.do() Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchCircle_3 = Sketch_2.addCircle(-32.47294132465983, 2.220594155120791, 24.592292084386) -SketchCircle_3.result().setColor(225, 0, 0) -SketchCircle_3.results()[1].setColor(225, 0, 0) SketchLine_3 = Sketch_2.addLine(-57.05151402373072, 3.041930894979393, -7.893787575150295, 1.41683366733466) -SketchLine_3.result().setColor(225, 0, 0) SketchConstraintCoincidence_5 = Sketch_2.setCoincident(SketchLine_3.startPoint(), SketchCircle_3.results()[1]) SketchConstraintCoincidence_6 = Sketch_2.setCoincident(SketchLine_3.endPoint(), SketchCircle_3.results()[1]) SketchCircle_4 = Sketch_2.addCircle(107.0005131452338, 2.231606536656211, 32.56614591098422) -SketchCircle_4.result().setColor(225, 0, 0) -SketchCircle_4.results()[1].setColor(225, 0, 0) SketchLine_4 = Sketch_2.addLine(74.45658844157124, 3.434446666454839, 139.5031967571015, 0.1995097076777023) -SketchLine_4.result().setColor(225, 0, 0) SketchConstraintCoincidence_7 = Sketch_2.setCoincident(SketchLine_4.startPoint(), SketchCircle_4.results()[1]) SketchConstraintCoincidence_8 = Sketch_2.setCoincident(SketchLine_4.endPoint(), SketchCircle_4.results()[1]) model.do() diff --git a/src/FeaturesPlugin/Test/TestBooleanCut_CompSolid_CompSolid.py b/src/FeaturesPlugin/Test/TestBooleanCut_CompSolid_CompSolid.py index ba402dfd8..5d20e521f 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCut_CompSolid_CompSolid.py +++ b/src/FeaturesPlugin/Test/TestBooleanCut_CompSolid_CompSolid.py @@ -26,19 +26,13 @@ Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchCircle_1 = Sketch_1.addCircle(-23.21770404974615, 0.697956782029321, 35.59095357943583) -SketchCircle_1.result().setColor(225, 0, 0) -SketchCircle_1.results()[1].setColor(225, 0, 0) SketchLine_1 = Sketch_1.addLine(-23.86759161364122, 36.28297642299413, -22.5735889911581, -34.88716781357743) -SketchLine_1.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchCircle_1.results()[1]) SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchCircle_1.results()[1]) model.do() Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchCircle_2 = Sketch_2.addCircle(32.08143103297851, 1.286314091165838, 40.2404383217231) -SketchCircle_2.result().setColor(225, 0, 0) -SketchCircle_2.results()[1].setColor(225, 0, 0) SketchLine_2 = Sketch_2.addLine(-8.153954725266397, 0.6486549270159857, 72.23884334545456, 3.869938036363647) -SketchLine_2.result().setColor(225, 0, 0) SketchConstraintCoincidence_3 = Sketch_2.setCoincident(SketchLine_2.startPoint(), SketchCircle_2.results()[1]) SketchConstraintCoincidence_4 = Sketch_2.setCoincident(SketchLine_2.endPoint(), SketchCircle_2.results()[1]) model.do() diff --git a/src/FeaturesPlugin/Test/TestBooleanCut_EdgeCompound_EdgeCompound.py b/src/FeaturesPlugin/Test/TestBooleanCut_EdgeCompound_EdgeCompound.py index 32d12c819..45674c700 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCut_EdgeCompound_EdgeCompound.py +++ b/src/FeaturesPlugin/Test/TestBooleanCut_EdgeCompound_EdgeCompound.py @@ -26,13 +26,9 @@ 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(-13.70458696967078, 45.46669742770666, 15.88340489230536, 45.46669742770666) -SketchLine_1.result().setColor(225, 0, 0) SketchLine_2 = Sketch_1.addLine(-13.21145377197118, 31.16583469441819, 14.89713849690615, 31.41240129326799) -SketchLine_2.result().setColor(225, 0, 0) SketchLine_3 = Sketch_1.addLine(-5.074756009927738, 49.65832960815328, -4.828189411077946, 26.48106931627197) -SketchLine_3.result().setColor(225, 0, 0) SketchLine_4 = Sketch_1.addLine(7.993273729111718, 49.41176300930348, 8.23984032796152, 26.48106931627197) -SketchLine_4.result().setColor(225, 0, 0) model.do() Compound_1 = model.addCompound(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_2")]) Compound_2 = model.addCompound(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchLine_3"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_4")]) diff --git a/src/FeaturesPlugin/Test/TestBooleanCut_EdgeCompound_Solid.py b/src/FeaturesPlugin/Test/TestBooleanCut_EdgeCompound_Solid.py index 9376fce69..9d51ddc1c 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCut_EdgeCompound_Solid.py +++ b/src/FeaturesPlugin/Test/TestBooleanCut_EdgeCompound_Solid.py @@ -26,21 +26,15 @@ 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(-28.62948623265935, 53.77363153293705, 40.23707952134417, 53.11775947813702) -SketchLine_1.result().setColor(225, 0, 0) SketchLine_2 = Sketch_1.addLine(-26.66187006825925, 26.22700523133564, 40.89295157614425, 26.22700523133564) -SketchLine_2.result().setColor(225, 0, 0) model.do() Compound_1 = model.addCompound(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_2")]) Extrusion_1 = model.addExtrusion(Part_1_doc, [], model.selection(), 10, 10) Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchLine_3 = Sketch_2.addLine(14.6580693841429, 60.98822413573743, -10.2650686982584, 60.98822413573743) -SketchLine_3.result().setColor(225, 0, 0) SketchLine_4 = Sketch_2.addLine(-10.2650686982584, 60.98822413573743, -10.2650686982584, 18.35654057373522) -SketchLine_4.result().setColor(225, 0, 0) SketchLine_5 = Sketch_2.addLine(-10.2650686982584, 18.35654057373522, 14.6580693841429, 18.35654057373522) -SketchLine_5.result().setColor(225, 0, 0) SketchLine_6 = Sketch_2.addLine(14.6580693841429, 18.35654057373522, 14.6580693841429, 60.98822413573743) -SketchLine_6.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_2.setCoincident(SketchLine_6.endPoint(), SketchLine_3.startPoint()) SketchConstraintCoincidence_2 = Sketch_2.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint()) SketchConstraintCoincidence_3 = Sketch_2.setCoincident(SketchLine_4.endPoint(), SketchLine_5.startPoint()) diff --git a/src/FeaturesPlugin/Test/TestBooleanCut_Edge_Edge.py b/src/FeaturesPlugin/Test/TestBooleanCut_Edge_Edge.py index 45e866763..ccd2c2c30 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCut_Edge_Edge.py +++ b/src/FeaturesPlugin/Test/TestBooleanCut_Edge_Edge.py @@ -26,9 +26,7 @@ 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(-25.12006861063466, 20.61578044596912, 27.54545454545454, 58.72898799313897) -SketchLine_1.result().setColor(225, 0, 0) SketchLine_2 = Sketch_1.addLine(-19.22984562607204, 56.30360205831907, 22.69468267581474, 22.00171526586621) -SketchLine_2.result().setColor(225, 0, 0) model.do() Edge_1 = model.addEdge(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchLine_2"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_1")]) Cut_1 = model.addCut(Part_1_doc, [model.selection("EDGE", "Edge_1_1")], [model.selection("EDGE", "Edge_1_2")]) diff --git a/src/FeaturesPlugin/Test/TestBooleanCut_Edge_Face.py b/src/FeaturesPlugin/Test/TestBooleanCut_Edge_Face.py index 4a22aa58a..5e8d25fe1 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCut_Edge_Face.py +++ b/src/FeaturesPlugin/Test/TestBooleanCut_Edge_Face.py @@ -26,17 +26,12 @@ 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(-30.96793587174349, 41.08817635270543, 39.4689378757515, 41.4929859719439) -SketchLine_1.result().setColor(225, 0, 0) model.do() Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchLine_2 = Sketch_2.addLine(13.96593186372747, 52.01803607214429, -9.917835671342695, 52.01803607214429) -SketchLine_2.result().setColor(225, 0, 0) SketchLine_3 = Sketch_2.addLine(-9.917835671342695, 52.01803607214429, -9.917835671342695, 27.32464929859719) -SketchLine_3.result().setColor(225, 0, 0) SketchLine_4 = Sketch_2.addLine(-9.917835671342695, 27.32464929859719, 13.96593186372747, 27.32464929859719) -SketchLine_4.result().setColor(225, 0, 0) SketchLine_5 = Sketch_2.addLine(13.96593186372747, 27.32464929859719, 13.96593186372747, 52.01803607214429) -SketchLine_5.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_2.setCoincident(SketchLine_5.endPoint(), SketchLine_2.startPoint()) SketchConstraintCoincidence_2 = Sketch_2.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) SketchConstraintCoincidence_3 = Sketch_2.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint()) diff --git a/src/FeaturesPlugin/Test/TestBooleanCut_FaceCompound_FaceCompound.py b/src/FeaturesPlugin/Test/TestBooleanCut_FaceCompound_FaceCompound.py index d1dfcbd98..d3c727e67 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCut_FaceCompound_FaceCompound.py +++ b/src/FeaturesPlugin/Test/TestBooleanCut_FaceCompound_FaceCompound.py @@ -26,19 +26,11 @@ Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchCircle_1 = Sketch_1.addCircle(-49.71737993138937, 2.062011149228122, 25.20652382544127) -SketchCircle_1.result().setColor(225, 0, 0) -SketchCircle_1.results()[1].setColor(225, 0, 0) SketchCircle_2 = Sketch_1.addCircle(41.46933533447686, 0.6873370497427074, 27.03914027119833) -SketchCircle_2.result().setColor(225, 0, 0) -SketchCircle_2.results()[1].setColor(225, 0, 0) model.do() Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchCircle_3 = Sketch_2.addCircle(-15.35052744425385, 1.145561749571189, 23.35148318113706) -SketchCircle_3.result().setColor(225, 0, 0) -SketchCircle_3.results()[1].setColor(225, 0, 0) SketchCircle_4 = Sketch_2.addCircle(82.70955831903943, -3.436685248713552, 26.06650182177207) -SketchCircle_4.result().setColor(225, 0, 0) -SketchCircle_4.results()[1].setColor(225, 0, 0) model.do() Face_1 = model.addFace(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchCircle_1_2"), model.selection("EDGE", "Sketch_1/Edge-SketchCircle_2_2")]) Face_2 = model.addFace(Part_1_doc, [model.selection("EDGE", "Sketch_2/Edge-SketchCircle_3_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_4_2")]) diff --git a/src/FeaturesPlugin/Test/TestBooleanCut_Face_Face.py b/src/FeaturesPlugin/Test/TestBooleanCut_Face_Face.py index 7fd82e502..f314c44d5 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCut_Face_Face.py +++ b/src/FeaturesPlugin/Test/TestBooleanCut_Face_Face.py @@ -26,17 +26,12 @@ Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchCircle_1 = Sketch_1.addCircle(-6.063464837049752, 0.8662092624356818, 32.2304349637617) -SketchCircle_1.result().setColor(225, 0, 0) -SketchCircle_1.results()[1].setColor(225, 0, 0) model.do() Face_1 = model.addFace(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchCircle_1_2")]) Sketch_2 = model.addSketch(Part_1_doc, model.standardPlane("XOY")) SketchProjection_1 = Sketch_2.addProjection(model.selection("VERTEX", "PartSet/Origin"), False) SketchPoint_1 = SketchProjection_1.createdFeature() -SketchPoint_1.result().setColor(170, 0, 225) SketchCircle_2 = Sketch_2.addCircle(33.45888578231592, 3.635557519489646, 33.65582143213236) -SketchCircle_2.result().setColor(225, 0, 0) -SketchCircle_2.results()[1].setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_2.setCoincident(SketchPoint_1.result(), SketchCircle_2.results()[1]) model.do() Face_2 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchCircle_2_2f")]) diff --git a/src/FeaturesPlugin/Test/TestBooleanCut_Face_Solid.py b/src/FeaturesPlugin/Test/TestBooleanCut_Face_Solid.py index 319a5927f..bd0752f91 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCut_Face_Solid.py +++ b/src/FeaturesPlugin/Test/TestBooleanCut_Face_Solid.py @@ -26,19 +26,13 @@ Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchCircle_1 = Sketch_1.addCircle(-8.850181926352695, 1.062021831162306, 46.73432400996293) -SketchCircle_1.result().setColor(225, 0, 0) -SketchCircle_1.results()[1].setColor(225, 0, 0) model.do() Face_1 = model.addFace(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchCircle_1_2")]) Sketch_2 = model.addSketch(Part_1_doc, model.standardPlane("XOY")) SketchLine_1 = Sketch_2.addLine(64.95207814695526, 55.29739830292169, -8.272875875352462, 55.29739830292169) -SketchLine_1.result().setColor(225, 0, 0) SketchLine_2 = Sketch_2.addLine(-8.272875875352462, 55.29739830292169, -8.272875875352462, -5.036618941767999) -SketchLine_2.result().setColor(225, 0, 0) SketchLine_3 = Sketch_2.addLine(-8.272875875352462, -5.036618941767999, 64.95207814695526, -5.036618941767999) -SketchLine_3.result().setColor(225, 0, 0) SketchLine_4 = Sketch_2.addLine(64.95207814695526, -5.036618941767999, 64.95207814695526, 55.29739830292169) -SketchLine_4.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_2.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint()) SketchConstraintCoincidence_2 = Sketch_2.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) SketchConstraintCoincidence_3 = Sketch_2.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) diff --git a/src/FeaturesPlugin/Test/TestBooleanCut_ShellCompound_ShellCompound.py b/src/FeaturesPlugin/Test/TestBooleanCut_ShellCompound_ShellCompound.py index 03369877d..9bed1636b 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCut_ShellCompound_ShellCompound.py +++ b/src/FeaturesPlugin/Test/TestBooleanCut_ShellCompound_ShellCompound.py @@ -26,33 +26,21 @@ Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchCircle_1 = Sketch_1.addCircle(-174.3348611545506, 14.32227876658794, 70.49121821473575) -SketchCircle_1.result().setColor(225, 0, 0) -SketchCircle_1.results()[1].setColor(225, 0, 0) SketchLine_1 = Sketch_1.addLine(-170.8787982705978, 84.72872358712971, -177.6798961073988, -56.0895283864863) -SketchLine_1.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchCircle_1.results()[1]) SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchCircle_1.results()[1]) SketchCircle_2 = Sketch_1.addCircle(156.5938368884866, -3.269359348234124, 86.69415181338225) -SketchCircle_2.result().setColor(225, 0, 0) -SketchCircle_2.results()[1].setColor(225, 0, 0) SketchLine_2 = Sketch_1.addLine(159.264749945663, 83.38363934242156, 152.8285624017236, -89.88170642808817) -SketchLine_2.result().setColor(225, 0, 0) SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.startPoint(), SketchCircle_2.results()[1]) SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchCircle_2.results()[1]) model.do() Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchCircle_3 = Sketch_2.addCircle(-63.56168377478743, 4.78844798363732, 75.55300890562218) -SketchCircle_3.result().setColor(225, 0, 0) -SketchCircle_3.results()[1].setColor(225, 0, 0) SketchCircle_4 = Sketch_2.addCircle(322.6564034385849, -22.92418256149703, 118.030609731015) -SketchCircle_4.result().setColor(225, 0, 0) -SketchCircle_4.results()[1].setColor(225, 0, 0) SketchLine_3 = Sketch_2.addLine(-138.9405630492767, 9.915017403336009, 11.9830331245263, 5.907779612586542) -SketchLine_3.result().setColor(225, 0, 0) SketchConstraintCoincidence_5 = Sketch_2.setCoincident(SketchLine_3.startPoint(), SketchCircle_3.results()[1]) SketchConstraintCoincidence_6 = Sketch_2.setCoincident(SketchLine_3.endPoint(), SketchCircle_3.results()[1]) SketchLine_4 = Sketch_2.addLine(207.6267015097382, 3.521847530670962, 440.2647819790861, -32.89885701981125) -SketchLine_4.result().setColor(225, 0, 0) SketchConstraintCoincidence_7 = Sketch_2.setCoincident(SketchLine_4.startPoint(), SketchCircle_4.results()[1]) SketchConstraintCoincidence_8 = Sketch_2.setCoincident(SketchLine_4.endPoint(), SketchCircle_4.results()[1]) model.do() diff --git a/src/FeaturesPlugin/Test/TestBooleanCut_Shell_Shell.py b/src/FeaturesPlugin/Test/TestBooleanCut_Shell_Shell.py index bb7786af6..0757d3a9b 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCut_Shell_Shell.py +++ b/src/FeaturesPlugin/Test/TestBooleanCut_Shell_Shell.py @@ -26,19 +26,13 @@ Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchCircle_1 = Sketch_1.addCircle(-32.92409574173262, 1.332083115848444, 52.41665939244462) -SketchCircle_1.result().setColor(225, 0, 0) -SketchCircle_1.results()[1].setColor(225, 0, 0) SketchLine_1 = Sketch_1.addLine(-32.3899127495535, 53.7460204836366, -32.9246838934834, -51.08457627329644) -SketchLine_1.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchCircle_1.results()[1]) SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchCircle_1.results()[1]) model.do() Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchCircle_2 = Sketch_2.addCircle(52.19056504290929, 1.630574981545157, 59.89949304384059) -SketchCircle_2.result().setColor(225, 0, 0) -SketchCircle_2.results()[1].setColor(225, 0, 0) SketchLine_2 = Sketch_2.addLine(112.0898160449407, 1.460291967886176, -7.70480537031941, 0.9278161529026914) -SketchLine_2.result().setColor(225, 0, 0) SketchConstraintCoincidence_3 = Sketch_2.setCoincident(SketchLine_2.startPoint(), SketchCircle_2.results()[1]) SketchConstraintCoincidence_4 = Sketch_2.setCoincident(SketchLine_2.endPoint(), SketchCircle_2.results()[1]) model.do() diff --git a/src/FeaturesPlugin/Test/TestBooleanCut_SolidCompound_SolidCompound.py b/src/FeaturesPlugin/Test/TestBooleanCut_SolidCompound_SolidCompound.py index 90dc152e8..987532453 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCut_SolidCompound_SolidCompound.py +++ b/src/FeaturesPlugin/Test/TestBooleanCut_SolidCompound_SolidCompound.py @@ -26,19 +26,11 @@ Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchCircle_1 = Sketch_1.addCircle(-64.66755707084829, 12.13132840151158, 21.07964902130243) -SketchCircle_1.result().setColor(225, 0, 0) -SketchCircle_1.results()[1].setColor(225, 0, 0) SketchCircle_2 = Sketch_1.addCircle(45.61684376247555, 1.775642744728198, 22.96122819474142) -SketchCircle_2.result().setColor(225, 0, 0) -SketchCircle_2.results()[1].setColor(225, 0, 0) model.do() Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchCircle_3 = Sketch_2.addCircle(-36.49725872565889, 7.160803013521951, 17.872664608039) -SketchCircle_3.result().setColor(225, 0, 0) -SketchCircle_3.results()[1].setColor(225, 0, 0) SketchCircle_4 = Sketch_2.addCircle(78.03127953954764, -3.93858425080257, 22.76570299983515) -SketchCircle_4.result().setColor(225, 0, 0) -SketchCircle_4.results()[1].setColor(225, 0, 0) model.do() Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection(), 10, 0) Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_2")], model.selection(), 20, 20) diff --git a/src/FeaturesPlugin/Test/TestBooleanCut_Solid_Solid.py b/src/FeaturesPlugin/Test/TestBooleanCut_Solid_Solid.py index 456005d4d..602d704bf 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCut_Solid_Solid.py +++ b/src/FeaturesPlugin/Test/TestBooleanCut_Solid_Solid.py @@ -26,13 +26,9 @@ 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(15.58517034068135, 30.56312625250501, -33.39679358717434, 30.56312625250501) -SketchLine_1.result().setColor(225, 0, 0) SketchLine_2 = Sketch_1.addLine(-33.39679358717434, 30.56312625250501, -33.39679358717434, -16.39478957915832) -SketchLine_2.result().setColor(225, 0, 0) SketchLine_3 = Sketch_1.addLine(-33.39679358717434, -16.39478957915832, 15.58517034068135, -16.39478957915832) -SketchLine_3.result().setColor(225, 0, 0) SketchLine_4 = Sketch_1.addLine(15.58517034068135, -16.39478957915832, 15.58517034068135, 30.56312625250501) -SketchLine_4.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint()) SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) @@ -44,13 +40,9 @@ SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result()) model.do() Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchLine_5 = Sketch_2.addLine(35.01603206412826, 45.13627254509017, -8.298597194388776, 45.13627254509017) -SketchLine_5.result().setColor(225, 0, 0) SketchLine_6 = Sketch_2.addLine(-8.298597194388776, 45.13627254509017, -8.298597194388776, 6.679358717434865) -SketchLine_6.result().setColor(225, 0, 0) SketchLine_7 = Sketch_2.addLine(-8.298597194388776, 6.679358717434865, 35.01603206412826, 6.679358717434865) -SketchLine_7.result().setColor(225, 0, 0) SketchLine_8 = Sketch_2.addLine(35.01603206412826, 6.679358717434865, 35.01603206412826, 45.13627254509017) -SketchLine_8.result().setColor(225, 0, 0) SketchConstraintCoincidence_5 = Sketch_2.setCoincident(SketchLine_8.endPoint(), SketchLine_5.startPoint()) SketchConstraintCoincidence_6 = Sketch_2.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint()) SketchConstraintCoincidence_7 = Sketch_2.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint()) diff --git a/src/FeaturesPlugin/Test/TestBooleanCut_VertexCompound_Solid.py b/src/FeaturesPlugin/Test/TestBooleanCut_VertexCompound_Solid.py index 337eeb9fa..681a33893 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCut_VertexCompound_Solid.py +++ b/src/FeaturesPlugin/Test/TestBooleanCut_VertexCompound_Solid.py @@ -26,25 +26,17 @@ Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchPoint_1 = Sketch_1.addPoint(-61.63122212692967, 34.13774013722127) -SketchPoint_1.result().setColor(225, 0, 0) SketchPoint_2 = Sketch_1.addPoint(-27.26436963979418, 34.59596483704974) -SketchPoint_2.result().setColor(225, 0, 0) SketchPoint_3 = Sketch_1.addPoint(25.43147084048027, 34.59596483704974) -SketchPoint_3.result().setColor(225, 0, 0) SketchPoint_4 = Sketch_1.addPoint(54.29962692967411, 33.67951543739281) -SketchPoint_4.result().setColor(225, 0, 0) model.do() Compound_1_objects = [model.selection("VERTEX", "Sketch_1/Vertex-SketchPoint_1"), model.selection("VERTEX", "Sketch_1/Vertex-SketchPoint_2"), model.selection("VERTEX", "Sketch_1/Vertex-SketchPoint_3"), model.selection("VERTEX", "Sketch_1/Vertex-SketchPoint_4")] Compound_1 = model.addCompound(Part_1_doc, Compound_1_objects) Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchLine_1 = Sketch_2.addLine(42.11715050385933, 45.75316349699826, -43.32915483490565, 45.75316349699826) -SketchLine_1.result().setColor(225, 0, 0) SketchLine_2 = Sketch_2.addLine(-43.32915483490565, 45.75316349699826, -43.32915483490565, 20.90707471054887) -SketchLine_2.result().setColor(225, 0, 0) SketchLine_3 = Sketch_2.addLine(-43.32915483490565, 20.90707471054887, 42.11715050385933, 20.90707471054887) -SketchLine_3.result().setColor(225, 0, 0) SketchLine_4 = Sketch_2.addLine(42.11715050385933, 20.90707471054887, 42.11715050385933, 45.75316349699826) -SketchLine_4.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_2.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint()) SketchConstraintCoincidence_2 = Sketch_2.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) SketchConstraintCoincidence_3 = Sketch_2.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) diff --git a/src/FeaturesPlugin/Test/TestBooleanCut_VertexCompound_VertexCompound.py b/src/FeaturesPlugin/Test/TestBooleanCut_VertexCompound_VertexCompound.py index f56fcff01..702fa1e9c 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCut_VertexCompound_VertexCompound.py +++ b/src/FeaturesPlugin/Test/TestBooleanCut_VertexCompound_VertexCompound.py @@ -26,13 +26,9 @@ Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchPoint_1 = Sketch_1.addPoint(-61.63122212692967, 34.13774013722127) -SketchPoint_1.result().setColor(225, 0, 0) SketchPoint_2 = Sketch_1.addPoint(-27.26436963979418, 34.59596483704974) -SketchPoint_2.result().setColor(225, 0, 0) SketchPoint_3 = Sketch_1.addPoint(25.43147084048027, 34.59596483704974) -SketchPoint_3.result().setColor(225, 0, 0) SketchPoint_4 = Sketch_1.addPoint(54.29962692967411, 33.67951543739281) -SketchPoint_4.result().setColor(225, 0, 0) model.do() Compound_1_objects = [model.selection("VERTEX", "Sketch_1/Vertex-SketchPoint_1"), model.selection("VERTEX", "Sketch_1/Vertex-SketchPoint_2"), model.selection("VERTEX", "Sketch_1/Vertex-SketchPoint_3"), model.selection("VERTEX", "Sketch_1/Vertex-SketchPoint_4")] Compound_1 = model.addCompound(Part_1_doc, Compound_1_objects) diff --git a/src/FeaturesPlugin/Test/TestBooleanCut_Vertex_Vertex.py b/src/FeaturesPlugin/Test/TestBooleanCut_Vertex_Vertex.py index 0d046ff38..cc53f7725 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCut_Vertex_Vertex.py +++ b/src/FeaturesPlugin/Test/TestBooleanCut_Vertex_Vertex.py @@ -26,9 +26,7 @@ Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchPoint_1 = Sketch_1.addPoint(0, 50) -SketchPoint_1.result().setColor(225, 0, 0) SketchPoint_2 = Sketch_1.addPoint(0, 25) -SketchPoint_2.result().setColor(225, 0, 0) model.do() Vertex_1 = model.addVertex(Part_1_doc, [model.selection("VERTEX", "Sketch_1/Vertex-SketchPoint_1")]) Vertex_2 = model.addVertex(Part_1_doc, [model.selection("VERTEX", "Sketch_1/Vertex-SketchPoint_1")]) diff --git a/src/FeaturesPlugin/Test/TestBooleanCut_WireCompound_WireCompound.py b/src/FeaturesPlugin/Test/TestBooleanCut_WireCompound_WireCompound.py index 2f6ecf084..baf9bc921 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCut_WireCompound_WireCompound.py +++ b/src/FeaturesPlugin/Test/TestBooleanCut_WireCompound_WireCompound.py @@ -26,26 +26,18 @@ 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(-64.96569468267583, 22.00171526586621, -41.05831903945112, 55.95711835334479) -SketchLine_1.result().setColor(225, 0, 0) SketchLine_2 = Sketch_1.addLine(-41.05831903945112, 55.95711835334479, -23.04116638078903, 21.65523156089195) -SketchLine_2.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) SketchLine_3 = Sketch_1.addLine(14.72555746140652, 19.92281303602059, 33.43567753001715, 55.95711835334479) -SketchLine_3.result().setColor(225, 0, 0) SketchLine_4 = Sketch_1.addLine(33.43567753001715, 55.95711835334479, 50.75986277873073, 22.69468267581476) -SketchLine_4.result().setColor(225, 0, 0) SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint()) model.do() Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchLine_5 = Sketch_2.addLine(-67.39108061749573, 66.6981132075472, -42.44425385934821, 35.51457975986279) -SketchLine_5.result().setColor(225, 0, 0) SketchLine_6 = Sketch_2.addLine(-42.44425385934821, 35.51457975986279, -16.1114922813036, 69.1234991423671) -SketchLine_6.result().setColor(225, 0, 0) SketchConstraintCoincidence_3 = Sketch_2.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint()) SketchLine_7 = Sketch_2.addLine(12.64665523156088, 66.6981132075472, 35.16809605488852, 36.5540308747856) -SketchLine_7.result().setColor(225, 0, 0) SketchLine_8 = Sketch_2.addLine(35.16809605488852, 36.5540308747856, 52.49228130360206, 66.35162950257292) -SketchLine_8.result().setColor(225, 0, 0) SketchConstraintCoincidence_4 = Sketch_2.setCoincident(SketchLine_7.endPoint(), SketchLine_8.startPoint()) model.do() Wire_1 = model.addWire(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_2")]) diff --git a/src/FeaturesPlugin/Test/TestBooleanCut_Wire_Face.py b/src/FeaturesPlugin/Test/TestBooleanCut_Wire_Face.py index 769b64fdf..9739b75fa 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCut_Wire_Face.py +++ b/src/FeaturesPlugin/Test/TestBooleanCut_Wire_Face.py @@ -26,18 +26,13 @@ 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(-26.15951972555746, 50.06689536878219, -17.15094339622642, 14.37907375643225) -SketchLine_1.result().setColor(225, 0, 0) SketchLine_2 = Sketch_1.addLine(-17.15094339622642, 14.37907375643225, 26.85248713550602, 14.72555746140652) -SketchLine_2.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) SketchLine_3 = Sketch_1.addLine(26.85248713550602, 14.72555746140652, 34.47512864493997, 50.41337907375645) -SketchLine_3.result().setColor(225, 0, 0) SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) model.do() Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchCircle_1 = Sketch_2.addCircle(3.984562607204112, 58.72898799313897, 38.16357190022508) -SketchCircle_1.result().setColor(225, 0, 0) -SketchCircle_1.results()[1].setColor(225, 0, 0) model.do() Wire_1_objects = [model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_2"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_3")] Wire_1 = model.addWire(Part_1_doc, Wire_1_objects) diff --git a/src/FeaturesPlugin/Test/TestBooleanCut_Wire_Wire.py b/src/FeaturesPlugin/Test/TestBooleanCut_Wire_Wire.py index 262a79d71..0944b7ea5 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCut_Wire_Wire.py +++ b/src/FeaturesPlugin/Test/TestBooleanCut_Wire_Wire.py @@ -26,17 +26,12 @@ 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(-67.98180952066137, 66.89107262893774, -22.72663773945906, 26.22700523133564) -SketchLine_1.result().setColor(225, 0, 0) SketchLine_2 = Sketch_1.addLine(-22.72663773945906, 26.22700523133564, 31.71074280894377, 25.5711331765356) -SketchLine_2.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) SketchLine_3 = Sketch_1.addLine(31.71074280894377, 25.5711331765356, 74.99829842574599, 68.85868879333785) -SketchLine_3.result().setColor(225, 0, 0) SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) SketchLine_4 = Sketch_1.addLine(-58.79960075346089, 25.5711331765356, 3.508244452542322, 60.3323520809374) -SketchLine_4.result().setColor(225, 0, 0) SketchLine_5 = Sketch_1.addLine(3.508244452542322, 60.3323520809374, 63.1926014393454, 22.94764495733547) -SketchLine_5.result().setColor(225, 0, 0) SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_5.startPoint()) model.do() Wire_1_objects = [model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_2"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_3")] diff --git a/src/FeaturesPlugin/Test/TestBooleanFuse_CompSolidCompound_CompSolidCompound.py b/src/FeaturesPlugin/Test/TestBooleanFuse_CompSolidCompound_CompSolidCompound.py new file mode 100644 index 000000000..ca8aae00d --- /dev/null +++ b/src/FeaturesPlugin/Test/TestBooleanFuse_CompSolidCompound_CompSolidCompound.py @@ -0,0 +1,93 @@ +## Copyright (C) 2014-2017 CEA/DEN, EDF R&D +## +## This library is free software; you can redistribute it and/or +## modify it under the terms of the GNU Lesser General Public +## License as published by the Free Software Foundation; either +## version 2.1 of the License, or (at your option) any later version. +## +## This library is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public +## License along with this library; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +## +## See http:##www.salome-platform.org/ or +## email : webmaster.salome@opencascade.com +## + +from salome.shaper import model + +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(-81.42367066895368, 33.08919382504288, -49.89365351629502, 58.72898799313894) +SketchLine_2 = Sketch_1.addLine(-49.89365351629502, 58.72898799313894, -14.89879931389364, 32.04974271012008) +SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) +SketchLine_3 = Sketch_1.addLine(-14.89879931389364, 32.04974271012008, -45.04288164665522, 2.598627787307022) +SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) +SketchLine_4 = Sketch_1.addLine(-45.04288164665522, 2.598627787307022, -81.42367066895368, 33.08919382504288) +SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint()) +SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchLine_4.endPoint()) +SketchLine_5 = Sketch_1.addLine(-49.89365351629502, 58.72898799313894, -45.04288164665522, 2.598627787307022) +SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_5.startPoint()) +SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_5.endPoint()) +SketchLine_6 = Sketch_1.addLine(40.88507718696397, 37.93996569468268, 70.33619210977699, 65.31217838765009) +SketchLine_7 = Sketch_1.addLine(70.33619210977699, 65.31217838765009, 91.81818181818181, 33.43567753001717) +SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint()) +SketchLine_8 = Sketch_1.addLine(91.81818181818181, 33.43567753001717, 59.24871355060034, 6.756432246998279) +SketchConstraintCoincidence_8 = Sketch_1.setCoincident(SketchLine_7.endPoint(), SketchLine_8.startPoint()) +SketchLine_9 = Sketch_1.addLine(59.24871355060034, 6.756432246998279, 40.88507718696397, 37.93996569468268) +SketchConstraintCoincidence_9 = Sketch_1.setCoincident(SketchLine_8.endPoint(), SketchLine_9.startPoint()) +SketchConstraintCoincidence_10 = Sketch_1.setCoincident(SketchLine_6.startPoint(), SketchLine_9.endPoint()) +SketchLine_10 = Sketch_1.addLine(70.33619210977699, 65.31217838765009, 59.24871355060034, 6.756432246998279) +SketchConstraintCoincidence_11 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_10.startPoint()) +SketchConstraintCoincidence_12 = Sketch_1.setCoincident(SketchLine_8.endPoint(), SketchLine_10.endPoint()) +model.do() +Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchLine_11 = Sketch_2.addLine(-24.25385934819896, -5.370497427101204, -36.03430531732418, 28.93138936535163) +SketchLine_12 = Sketch_2.addLine(-36.03430531732418, 28.93138936535163, -6.23670668953688, 16.80445969125213) +SketchConstraintCoincidence_13 = Sketch_2.setCoincident(SketchLine_11.endPoint(), SketchLine_12.startPoint()) +SketchLine_13 = Sketch_2.addLine(-6.23670668953688, 16.80445969125213, -4.850771869639785, -14.37907375643225) +SketchConstraintCoincidence_14 = Sketch_2.setCoincident(SketchLine_12.endPoint(), SketchLine_13.startPoint()) +SketchLine_14 = Sketch_2.addLine(-4.850771869639785, -14.37907375643225, -24.25385934819896, -5.370497427101204) +SketchConstraintCoincidence_15 = Sketch_2.setCoincident(SketchLine_13.endPoint(), SketchLine_14.startPoint()) +SketchConstraintCoincidence_16 = Sketch_2.setCoincident(SketchLine_11.startPoint(), SketchLine_14.endPoint()) +SketchLine_15 = Sketch_2.addLine(-24.25385934819896, -5.370497427101204, -6.23670668953688, 16.80445969125213) +SketchConstraintCoincidence_17 = Sketch_2.setCoincident(SketchLine_11.startPoint(), SketchLine_15.startPoint()) +SketchConstraintCoincidence_18 = Sketch_2.setCoincident(SketchLine_12.endPoint(), SketchLine_15.endPoint()) +SketchLine_16 = Sketch_2.addLine(32.22298456260721, 12.30017152658662, 55.78387650085761, 33.78216123499142) +SketchLine_17 = Sketch_2.addLine(55.78387650085761, 33.78216123499142, 51.27958833619211, 2.252144082332767) +SketchConstraintCoincidence_19 = Sketch_2.setCoincident(SketchLine_16.endPoint(), SketchLine_17.startPoint()) +SketchLine_18 = Sketch_2.addLine(51.27958833619211, 2.252144082332767, 27.71869639794167, -15.41852487135506) +SketchConstraintCoincidence_20 = Sketch_2.setCoincident(SketchLine_17.endPoint(), SketchLine_18.startPoint()) +SketchLine_19 = Sketch_2.addLine(27.71869639794167, -15.41852487135506, 32.22298456260721, 12.30017152658662) +SketchConstraintCoincidence_21 = Sketch_2.setCoincident(SketchLine_18.endPoint(), SketchLine_19.startPoint()) +SketchConstraintCoincidence_22 = Sketch_2.setCoincident(SketchLine_16.startPoint(), SketchLine_19.endPoint()) +SketchLine_20 = Sketch_2.addLine(32.22298456260721, 12.30017152658662, 51.27958833619211, 2.252144082332767) +SketchConstraintCoincidence_23 = Sketch_2.setCoincident(SketchLine_16.startPoint(), SketchLine_20.startPoint()) +SketchConstraintCoincidence_24 = Sketch_2.setCoincident(SketchLine_17.endPoint(), SketchLine_20.endPoint()) +model.do() +Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection(), 100, 0) +Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_2")], model.selection(), 50, -20) +Compound_1 = model.addCompound(Part_1_doc, [model.selection("COMPSOLID", "Extrusion_1_1"), model.selection("COMPSOLID", "Extrusion_1_2")]) +Compound_2 = model.addCompound(Part_1_doc, [model.selection("COMPSOLID", "Extrusion_2_1"), model.selection("COMPSOLID", "Extrusion_2_2")]) +Fuse_1 = model.addFuse(Part_1_doc, [model.selection("COMPOUND", "Compound_1_1"), model.selection("COMPOUND", "Compound_2_1")], True) +model.testHaveNamingSubshapes(Fuse_1, model, Part_1_doc) +model.do() +model.end() + +from GeomAPI import GeomAPI_Shape + +model.testNbResults(Fuse_1, 1) +model.testNbSubResults(Fuse_1, [2]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.SOLID, [2]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.FACE, [24]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.EDGE, [108]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.VERTEX, [216]) + +assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestBooleanFuse_CompSolid_CompSolid.py b/src/FeaturesPlugin/Test/TestBooleanFuse_CompSolid_CompSolid.py new file mode 100644 index 000000000..a5d5577e0 --- /dev/null +++ b/src/FeaturesPlugin/Test/TestBooleanFuse_CompSolid_CompSolid.py @@ -0,0 +1,69 @@ +## Copyright (C) 2014-2017 CEA/DEN, EDF R&D +## +## This library is free software; you can redistribute it and/or +## modify it under the terms of the GNU Lesser General Public +## License as published by the Free Software Foundation; either +## version 2.1 of the License, or (at your option) any later version. +## +## This library is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public +## License along with this library; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +## +## See http:##www.salome-platform.org/ or +## email : webmaster.salome@opencascade.com +## + + +from salome.shaper import model + +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(-87.19866468842729, 38.44668397626113, -52.3191988130564, 59.05727744807122) +SketchLine_2 = Sketch_1.addLine(-52.3191988130564, 59.05727744807122, -10.30529673590503, 36.86125370919882) +SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) +SketchLine_3 = Sketch_1.addLine(-10.30529673590503, 36.86125370919882, -59.45363501483681, 10.70165430267062) +SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) +SketchLine_4 = Sketch_1.addLine(-59.45363501483681, 10.70165430267062, -87.19866468842729, 38.44668397626113) +SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint()) +SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchLine_4.endPoint()) +SketchLine_5 = Sketch_1.addLine(-52.3191988130564, 59.05727744807122, -59.45363501483681, 10.70165430267062) +SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_5.startPoint()) +SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_5.endPoint()) +model.do() +Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchLine_6 = Sketch_2.addLine(-44.00943641618498, -5.404667630057807, -42.4652456647399, 37.06057803468208) +SketchLine_7 = Sketch_2.addLine(-42.4652456647399, 37.06057803468208, -11.58143063583817, 13.12562138728323) +SketchConstraintCoincidence_7 = Sketch_2.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint()) +SketchLine_8 = Sketch_2.addLine(-11.58143063583817, 13.12562138728323, -16.2140028901734, -17.75819364161849) +SketchConstraintCoincidence_8 = Sketch_2.setCoincident(SketchLine_7.endPoint(), SketchLine_8.startPoint()) +SketchLine_9 = Sketch_2.addLine(-16.2140028901734, -17.75819364161849, -44.00943641618498, -5.404667630057807) +SketchConstraintCoincidence_9 = Sketch_2.setCoincident(SketchLine_8.endPoint(), SketchLine_9.startPoint()) +SketchConstraintCoincidence_10 = Sketch_2.setCoincident(SketchLine_6.startPoint(), SketchLine_9.endPoint()) +SketchLine_10 = Sketch_2.addLine(-44.00943641618498, -5.404667630057807, -11.58143063583817, 13.12562138728323) +SketchConstraintCoincidence_11 = Sketch_2.setCoincident(SketchLine_6.startPoint(), SketchLine_10.startPoint()) +SketchConstraintCoincidence_12 = Sketch_2.setCoincident(SketchLine_7.endPoint(), SketchLine_10.endPoint()) +model.do() +Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_1"), model.selection("COMPOUND", "Sketch_2")], model.selection(), 10, 0) +Fuse_1 = model.addFuse(Part_1_doc, [model.selection("COMPSOLID", "Extrusion_1_1"), model.selection("COMPSOLID", "Extrusion_1_2")], True) +model.testHaveNamingSubshapes(Fuse_1, model, Part_1_doc) +model.do() +model.end() + +from GeomAPI import GeomAPI_Shape + +model.testNbResults(Fuse_1, 1) +model.testNbSubResults(Fuse_1, [1]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.SOLID, [1]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.FACE, [11]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.EDGE, [54]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.VERTEX, [108]) + +assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestBooleanFuse_EdgeCompound_EdgeCompound.py b/src/FeaturesPlugin/Test/TestBooleanFuse_EdgeCompound_EdgeCompound.py new file mode 100644 index 000000000..14a1cb140 --- /dev/null +++ b/src/FeaturesPlugin/Test/TestBooleanFuse_EdgeCompound_EdgeCompound.py @@ -0,0 +1,53 @@ +## Copyright (C) 2014-2017 CEA/DEN, EDF R&D +## +## This library is free software; you can redistribute it and/or +## modify it under the terms of the GNU Lesser General Public +## License as published by the Free Software Foundation; either +## version 2.1 of the License, or (at your option) any later version. +## +## This library is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public +## License along with this library; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +## +## See http:##www.salome-platform.org/ or +## email : webmaster.salome@opencascade.com +## + +from salome.shaper import model + +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(-71.60846560846564, -5.878306878306883, -32.06349206349206, 30.99470899470901) +SketchLine_2 = Sketch_1.addLine(17.63492063492066, -11.75661375661376, 49.16402116402119, 24.04761904761905) +model.do() +Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchLine_3 = Sketch_2.addLine(-70.53968253968257, 29.92592592592593, -31.52910052910054, -5.343915343915344) +SketchLine_4 = Sketch_2.addLine(14.96296296296294, 26.18518518518519, 50.23280423280426, -8.015873015873021) +model.do() +Edge_1_objects = [model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_2"), model.selection("EDGE", "Sketch_2/Edge-SketchLine_3"), model.selection("EDGE", "Sketch_2/Edge-SketchLine_4")] +Edge_1 = model.addEdge(Part_1_doc, Edge_1_objects) +Compound_1 = model.addCompound(Part_1_doc, [model.selection("EDGE", "Edge_1_1"), model.selection("EDGE", "Edge_1_2")]) +Compound_2 = model.addCompound(Part_1_doc, [model.selection("EDGE", "Edge_1_3"), model.selection("EDGE", "Edge_1_4")]) +Fuse_1 = model.addFuse(Part_1_doc, [model.selection("COMPOUND", "Compound_1_1"), model.selection("COMPOUND", "Compound_2_1")]) +model.testHaveNamingSubshapes(Fuse_1, model, Part_1_doc) +model.do() +model.end() + +from GeomAPI import GeomAPI_Shape + +model.testNbResults(Fuse_1, 1) +model.testNbSubResults(Fuse_1, [8]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.SOLID, [0]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.FACE, [0]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.EDGE, [8]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.VERTEX, [16]) + +assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestBooleanFuse_Edge_Edge.py b/src/FeaturesPlugin/Test/TestBooleanFuse_Edge_Edge.py new file mode 100644 index 000000000..3a3a78be3 --- /dev/null +++ b/src/FeaturesPlugin/Test/TestBooleanFuse_Edge_Edge.py @@ -0,0 +1,48 @@ +## Copyright (C) 2014-2017 CEA/DEN, EDF R&D +## +## This library is free software; you can redistribute it and/or +## modify it under the terms of the GNU Lesser General Public +## License as published by the Free Software Foundation; either +## version 2.1 of the License, or (at your option) any later version. +## +## This library is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public +## License along with this library; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +## +## See http:##www.salome-platform.org/ or +## email : webmaster.salome@opencascade.com +## + +from salome.shaper import model + +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(-37.40740740740741, -11.75661375661376, 41.14814814814816, 42.75132275132275) +model.do() +Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchLine_2 = Sketch_2.addLine(-24.04761904761907, 40.07936507936508, 39.54497354497357, -14.96296296296296) +model.do() +Edge_1 = model.addEdge(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"), model.selection("EDGE", "Sketch_2/Edge-SketchLine_2")]) +Fuse_1 = model.addFuse(Part_1_doc, [model.selection("EDGE", "Edge_1_2"), model.selection("EDGE", "Edge_1_1")]) +model.testHaveNamingSubshapes(Fuse_1, model, Part_1_doc) +model.do() +model.end() + +from GeomAPI import GeomAPI_Shape + +model.testNbResults(Fuse_1, 1) +model.testNbSubResults(Fuse_1, [4]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.SOLID, [0]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.FACE, [0]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.EDGE, [4]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.VERTEX, [8]) + +assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestBooleanFuse_FaceCompound_FaceCompound.py b/src/FeaturesPlugin/Test/TestBooleanFuse_FaceCompound_FaceCompound.py new file mode 100644 index 000000000..d9cebddfd --- /dev/null +++ b/src/FeaturesPlugin/Test/TestBooleanFuse_FaceCompound_FaceCompound.py @@ -0,0 +1,55 @@ +## Copyright (C) 2014-2017 CEA/DEN, EDF R&D +## +## This library is free software; you can redistribute it and/or +## modify it under the terms of the GNU Lesser General Public +## License as published by the Free Software Foundation; either +## version 2.1 of the License, or (at your option) any later version. +## +## This library is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public +## License along with this library; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +## +## See http:##www.salome-platform.org/ or +## email : webmaster.salome@opencascade.com +## + +from salome.shaper import model + +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")) +SketchCircle_1 = Sketch_1.addCircle(-35.3684929577465, 31.98214788732393, 24.26807713993482) +SketchCircle_2 = Sketch_1.addCircle(51.92395774647893, 31.22962676056337, 25.62994603225585) +model.do() +Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchCircle_3 = Sketch_2.addCircle(-36.12101408450705, -7.148950704225357, 25.24032590912034) +SketchCircle_4 = Sketch_2.addCircle(51.92395774647893, -12.41659859154929, 31.3630728131964) +model.do() +Face_1 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2f")]) +Face_2 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_2_2f")]) +Face_3 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchCircle_3_2f")]) +Face_4 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchCircle_4_2f")]) +Compound_1 = model.addCompound(Part_1_doc, [model.selection("FACE", "Face_1_1"), model.selection("FACE", "Face_2_1")]) +Compound_2 = model.addCompound(Part_1_doc, [model.selection("FACE", "Face_3_1"), model.selection("FACE", "Face_4_1")]) +Fuse_1 = model.addFuse(Part_1_doc, [model.selection("COMPOUND", "Compound_1_1"), model.selection("COMPOUND", "Compound_2_1")], True) +model.testHaveNamingSubshapes(Fuse_1, model, Part_1_doc) +model.do() +model.end() + +from GeomAPI import GeomAPI_Shape + +model.testNbResults(Fuse_1, 1) +model.testNbSubResults(Fuse_1, [2]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.SOLID, [0]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.FACE, [2]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.EDGE, [4]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.VERTEX, [8]) + +assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestBooleanFuse_Face_Face.py b/src/FeaturesPlugin/Test/TestBooleanFuse_Face_Face.py new file mode 100644 index 000000000..a7f012ab2 --- /dev/null +++ b/src/FeaturesPlugin/Test/TestBooleanFuse_Face_Face.py @@ -0,0 +1,50 @@ +## Copyright (C) 2014-2017 CEA/DEN, EDF R&D +## +## This library is free software; you can redistribute it and/or +## modify it under the terms of the GNU Lesser General Public +## License as published by the Free Software Foundation; either +## version 2.1 of the License, or (at your option) any later version. +## +## This library is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public +## License along with this library; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +## +## See http:##www.salome-platform.org/ or +## email : webmaster.salome@opencascade.com +## + + +from salome.shaper import model + +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")) +SketchCircle_1 = Sketch_1.addCircle(-12.81989708404803, 27.54545454545454, 25.29331046312177) +model.do() +Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchCircle_2 = Sketch_2.addCircle(22.86792452830187, 26.50600343053173, 30.90704565816075) +model.do() +Face_1 = model.addFace(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchCircle_1_2")]) +Face_2 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchCircle_2_2f")]) +Fuse_1 = model.addFuse(Part_1_doc, [model.selection("FACE", "Face_1_1"), model.selection("FACE", "Face_2_1")], True) +model.testHaveNamingSubshapes(Fuse_1, model, Part_1_doc) +model.do() +model.end() + +from GeomAPI import GeomAPI_Shape + +model.testNbResults(Fuse_1, 1) +model.testNbSubResults(Fuse_1, [1]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.SOLID, [0]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.FACE, [1]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.EDGE, [2]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.VERTEX, [4]) + +assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestBooleanFuse_ShellCompound_ShellCompound.py b/src/FeaturesPlugin/Test/TestBooleanFuse_ShellCompound_ShellCompound.py new file mode 100644 index 000000000..f275588b9 --- /dev/null +++ b/src/FeaturesPlugin/Test/TestBooleanFuse_ShellCompound_ShellCompound.py @@ -0,0 +1,93 @@ +## Copyright (C) 2014-2017 CEA/DEN, EDF R&D +## +## This library is free software; you can redistribute it and/or +## modify it under the terms of the GNU Lesser General Public +## License as published by the Free Software Foundation; either +## version 2.1 of the License, or (at your option) any later version. +## +## This library is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public +## License along with this library; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +## +## See http:##www.salome-platform.org/ or +## email : webmaster.salome@opencascade.com +## + +from salome.shaper import model + +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(-83.2865672209026, 26.7937406175772, -53.58748123515441, 47.45397434679335) +SketchLine_2 = Sketch_1.addLine(-53.58748123515441, 47.45397434679335, -26.47092446555818, 25.50247600950118) +SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) +SketchLine_3 = Sketch_1.addLine(-26.47092446555818, 25.50247600950118, -53.58748123515441, 5.487874584323028) +SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) +SketchLine_4 = Sketch_1.addLine(-53.58748123515441, 5.487874584323028, -83.2865672209026, 26.7937406175772) +SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint()) +SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchLine_4.endPoint()) +SketchLine_5 = Sketch_1.addLine(-53.58748123515441, 47.45397434679335, -53.58748123515441, 5.487874584323028) +SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_5.startPoint()) +SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_5.endPoint()) +SketchLine_6 = Sketch_1.addLine(24.53402755344418, 35.83259287410926, 55.52437814726837, 51.32776817102136) +SketchLine_7 = Sketch_1.addLine(55.52437814726837, 51.32776817102136, 87.16036104513063, 32.60443135391922) +SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint()) +SketchLine_8 = Sketch_1.addLine(87.16036104513063, 32.60443135391922, 53.58748123515437, 16.46362375296911) +SketchConstraintCoincidence_8 = Sketch_1.setCoincident(SketchLine_7.endPoint(), SketchLine_8.startPoint()) +SketchLine_9 = Sketch_1.addLine(53.58748123515437, 16.46362375296911, 24.53402755344418, 35.83259287410926) +SketchConstraintCoincidence_9 = Sketch_1.setCoincident(SketchLine_8.endPoint(), SketchLine_9.startPoint()) +SketchConstraintCoincidence_10 = Sketch_1.setCoincident(SketchLine_6.startPoint(), SketchLine_9.endPoint()) +SketchLine_10 = Sketch_1.addLine(55.52437814726837, 51.32776817102136, 53.58748123515437, 16.46362375296911) +SketchConstraintCoincidence_11 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_10.startPoint()) +SketchConstraintCoincidence_12 = Sketch_1.setCoincident(SketchLine_8.endPoint(), SketchLine_10.endPoint()) +model.do() +Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchLine_11 = Sketch_2.addLine(-85.86909643705464, 4.842242280285022, -62.62633349168645, 26.7937406175772) +SketchLine_12 = Sketch_2.addLine(-62.62633349168645, 26.7937406175772, -65.20886270783846, -2.259713064133024) +SketchConstraintCoincidence_13 = Sketch_2.setCoincident(SketchLine_11.endPoint(), SketchLine_12.startPoint()) +SketchLine_13 = Sketch_2.addLine(-65.20886270783846, -2.259713064133024, -83.9321995249406, -14.52672684085511) +SketchConstraintCoincidence_14 = Sketch_2.setCoincident(SketchLine_12.endPoint(), SketchLine_13.startPoint()) +SketchLine_14 = Sketch_2.addLine(-83.9321995249406, -14.52672684085511, -85.86909643705464, 4.842242280285022) +SketchConstraintCoincidence_15 = Sketch_2.setCoincident(SketchLine_13.endPoint(), SketchLine_14.startPoint()) +SketchConstraintCoincidence_16 = Sketch_2.setCoincident(SketchLine_11.startPoint(), SketchLine_14.endPoint()) +SketchLine_15 = Sketch_2.addLine(-85.86909643705464, 4.842242280285022, -65.20886270783846, -2.259713064133024) +SketchConstraintCoincidence_17 = Sketch_2.setCoincident(SketchLine_11.startPoint(), SketchLine_15.startPoint()) +SketchConstraintCoincidence_18 = Sketch_2.setCoincident(SketchLine_12.endPoint(), SketchLine_15.endPoint()) +SketchLine_16 = Sketch_2.addLine(31.63598289786226, 11.9441976247031, 44.54862897862235, 33.25006365795723) +SketchLine_17 = Sketch_2.addLine(44.54862897862235, 33.25006365795723, 52.29621662707837, 8.070403800475056) +SketchConstraintCoincidence_19 = Sketch_2.setCoincident(SketchLine_16.endPoint(), SketchLine_17.startPoint()) +SketchLine_18 = Sketch_2.addLine(52.29621662707837, 8.070403800475056, 32.28161520190027, -12.58982992874109) +SketchConstraintCoincidence_20 = Sketch_2.setCoincident(SketchLine_17.endPoint(), SketchLine_18.startPoint()) +SketchLine_19 = Sketch_2.addLine(32.28161520190027, -12.58982992874109, 31.63598289786226, 11.9441976247031) +SketchConstraintCoincidence_21 = Sketch_2.setCoincident(SketchLine_18.endPoint(), SketchLine_19.startPoint()) +SketchConstraintCoincidence_22 = Sketch_2.setCoincident(SketchLine_16.startPoint(), SketchLine_19.endPoint()) +SketchLine_20 = Sketch_2.addLine(31.63598289786226, 11.9441976247031, 52.29621662707837, 8.070403800475056) +SketchConstraintCoincidence_23 = Sketch_2.setCoincident(SketchLine_16.startPoint(), SketchLine_20.startPoint()) +SketchConstraintCoincidence_24 = Sketch_2.setCoincident(SketchLine_17.endPoint(), SketchLine_20.endPoint()) +model.do() +Shell_1_objects = [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_4r-SketchLine_5r"), model.selection("FACE", "Sketch_1/Face-SketchLine_2r-SketchLine_3r-SketchLine_5f"), model.selection("FACE", "Sketch_1/Face-SketchLine_6r-SketchLine_9r-SketchLine_10r"), model.selection("FACE", "Sketch_1/Face-SketchLine_7r-SketchLine_8r-SketchLine_10f"), model.selection("FACE", "Sketch_2/Face-SketchLine_11r-SketchLine_12r-SketchLine_15f"), model.selection("FACE", "Sketch_2/Face-SketchLine_13r-SketchLine_14r-SketchLine_15r"), model.selection("FACE", "Sketch_2/Face-SketchLine_16r-SketchLine_17r-SketchLine_20f"), model.selection("FACE", "Sketch_2/Face-SketchLine_18r-SketchLine_19r-SketchLine_20r")] +Shell_1 = model.addShell(Part_1_doc, Shell_1_objects) +Compound_1 = model.addCompound(Part_1_doc, [model.selection("SHELL", "Shell_1_1"), model.selection("SHELL", "Shell_1_2")]) +Compound_2 = model.addCompound(Part_1_doc, [model.selection("SHELL", "Shell_1_3"), model.selection("SHELL", "Shell_1_4")]) +Fuse_1 = model.addFuse(Part_1_doc, [model.selection("COMPOUND", "Compound_1_1"), model.selection("COMPOUND", "Compound_2_1")]) +model.testHaveNamingSubshapes(Fuse_1, model, Part_1_doc) +model.do() +model.end() + +from GeomAPI import GeomAPI_Shape + +model.testNbResults(Fuse_1, 1) +model.testNbSubResults(Fuse_1, [4]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.SOLID, [0]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.FACE, [8]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.EDGE, [5]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.VERTEX, [2]) + +assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestBooleanFuse_Shell_Shell.py b/src/FeaturesPlugin/Test/TestBooleanFuse_Shell_Shell.py new file mode 100644 index 000000000..495756723 --- /dev/null +++ b/src/FeaturesPlugin/Test/TestBooleanFuse_Shell_Shell.py @@ -0,0 +1,69 @@ +## Copyright (C) 2014-2017 CEA/DEN, EDF R&D +## +## This library is free software; you can redistribute it and/or +## modify it under the terms of the GNU Lesser General Public +## License as published by the Free Software Foundation; either +## version 2.1 of the License, or (at your option) any later version. +## +## This library is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public +## License along with this library; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +## +## See http:##www.salome-platform.org/ or +## email : webmaster.salome@opencascade.com +## + +from salome.shaper import model + +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(-82.64093491686459, 27.4393729216152, -55.52437814726841, 47.45397434679335) +SketchLine_2 = Sketch_1.addLine(-55.52437814726841, 47.45397434679335, -29.69908598574823, 30.02190213776723) +SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) +SketchLine_3 = Sketch_1.addLine(-29.69908598574823, 30.02190213776723, -54.2331135391924, 7.424771496437049) +SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) +SketchLine_4 = Sketch_1.addLine(-54.2331135391924, 7.424771496437049, -82.64093491686459, 27.4393729216152) +SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint()) +SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchLine_4.endPoint()) +SketchLine_5 = Sketch_1.addLine(-55.52437814726841, 47.45397434679335, -54.2331135391924, 7.424771496437049) +SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_5.startPoint()) +SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_5.endPoint()) +model.do() +Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchLine_6 = Sketch_2.addLine(-84.57783182897859, 11.29856532066509, -63.91759809976246, 28.73063752969122) +SketchLine_7 = Sketch_2.addLine(-63.91759809976246, 28.73063752969122, -60.68943657957245, -4.196609976247029) +SketchConstraintCoincidence_7 = Sketch_2.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint()) +SketchLine_8 = Sketch_2.addLine(-60.68943657957245, -4.196609976247029, -84.57783182897859, -14.52672684085511) +SketchConstraintCoincidence_8 = Sketch_2.setCoincident(SketchLine_7.endPoint(), SketchLine_8.startPoint()) +SketchLine_9 = Sketch_2.addLine(-84.57783182897859, -14.52672684085511, -84.57783182897859, 11.29856532066509) +SketchConstraintCoincidence_9 = Sketch_2.setCoincident(SketchLine_8.endPoint(), SketchLine_9.startPoint()) +SketchConstraintCoincidence_10 = Sketch_2.setCoincident(SketchLine_6.startPoint(), SketchLine_9.endPoint()) +SketchLine_10 = Sketch_2.addLine(-84.57783182897859, 11.29856532066509, -60.68943657957245, -4.196609976247029) +SketchConstraintCoincidence_11 = Sketch_2.setCoincident(SketchLine_6.startPoint(), SketchLine_10.startPoint()) +SketchConstraintCoincidence_12 = Sketch_2.setCoincident(SketchLine_7.endPoint(), SketchLine_10.endPoint()) +model.do() +Shell_1_objects = [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_4r-SketchLine_5r"), model.selection("FACE", "Sketch_1/Face-SketchLine_2r-SketchLine_3r-SketchLine_5f"), model.selection("FACE", "Sketch_2/Face-SketchLine_6r-SketchLine_7r-SketchLine_10f"), model.selection("FACE", "Sketch_2/Face-SketchLine_8r-SketchLine_9r-SketchLine_10r")] +Shell_1 = model.addShell(Part_1_doc, Shell_1_objects) +Fuse_1 = model.addFuse(Part_1_doc, [model.selection("SHELL", "Shell_1_1"), model.selection("SHELL", "Shell_1_2")], True) +model.testHaveNamingSubshapes(Fuse_1, model, Part_1_doc) +model.do() +model.end() + +from GeomAPI import GeomAPI_Shape + +model.testNbResults(Fuse_1, 1) +model.testNbSubResults(Fuse_1, [2]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.SOLID, [0]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.FACE, [4]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.EDGE, [18]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.VERTEX, [36]) + +assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestBooleanFuse_SolidCompound_SolidCompound.py b/src/FeaturesPlugin/Test/TestBooleanFuse_SolidCompound_SolidCompound.py new file mode 100644 index 000000000..3cd98f2ef --- /dev/null +++ b/src/FeaturesPlugin/Test/TestBooleanFuse_SolidCompound_SolidCompound.py @@ -0,0 +1,98 @@ +## Copyright (C) 2014-2017 CEA/DEN, EDF R&D +## +## This library is free software; you can redistribute it and/or +## modify it under the terms of the GNU Lesser General Public +## License as published by the Free Software Foundation; either +## version 2.1 of the License, or (at your option) any later version. +## +## This library is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public +## License along with this library; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +## +## See http:##www.salome-platform.org/ or +## email : webmaster.salome@opencascade.com +## + + +from salome.shaper import model + +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(-26.93407123287669, 40.82195171232873, -80.80221369863011, 40.82195171232873) +SketchLine_2 = Sketch_1.addLine(-80.80221369863011, 40.82195171232873, -80.80221369863011, -8.837742123287665) +SketchLine_3 = Sketch_1.addLine(-80.80221369863011, -8.837742123287665, -26.93407123287669, -8.837742123287665) +SketchLine_4 = Sketch_1.addLine(-26.93407123287669, -8.837742123287665, -26.93407123287669, 40.82195171232873) +SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint()) +SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) +SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) +SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint()) +SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_1.result()) +SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result()) +SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result()) +SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result()) +SketchLine_5 = Sketch_1.addLine(91.74418013698632, 40.82195171232873, 36.19265821917805, 40.82195171232873) +SketchLine_6 = Sketch_1.addLine(36.19265821917805, 40.82195171232873, 36.19265821917805, -15.57125993150685) +SketchLine_7 = Sketch_1.addLine(36.19265821917805, -15.57125993150685, 91.74418013698632, -15.57125993150685) +SketchLine_8 = Sketch_1.addLine(91.74418013698632, -15.57125993150685, 91.74418013698632, 40.82195171232873) +SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_8.endPoint(), SketchLine_5.startPoint()) +SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint()) +SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint()) +SketchConstraintCoincidence_8 = Sketch_1.setCoincident(SketchLine_7.endPoint(), SketchLine_8.startPoint()) +SketchConstraintHorizontal_3 = Sketch_1.setHorizontal(SketchLine_5.result()) +SketchConstraintVertical_3 = Sketch_1.setVertical(SketchLine_6.result()) +SketchConstraintHorizontal_4 = Sketch_1.setHorizontal(SketchLine_7.result()) +SketchConstraintVertical_4 = Sketch_1.setVertical(SketchLine_8.result()) +model.do() +Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection(), 100, 0) +Sketch_2 = model.addSketch(Part_1_doc, model.standardPlane("XOY")) +SketchLine_9 = Sketch_2.addLine(-14.30872534246576, 22.30477773972602, -41.24279657534246, 22.30477773972602) +SketchLine_10 = Sketch_2.addLine(-41.24279657534246, 22.30477773972602, -41.24279657534246, 1.262534589041107) +SketchLine_11 = Sketch_2.addLine(-41.24279657534246, 1.262534589041107, -14.30872534246576, 1.262534589041107) +SketchLine_12 = Sketch_2.addLine(-14.30872534246576, 1.262534589041107, -14.30872534246576, 22.30477773972602) +SketchConstraintCoincidence_9 = Sketch_2.setCoincident(SketchLine_12.endPoint(), SketchLine_9.startPoint()) +SketchConstraintCoincidence_10 = Sketch_2.setCoincident(SketchLine_9.endPoint(), SketchLine_10.startPoint()) +SketchConstraintCoincidence_11 = Sketch_2.setCoincident(SketchLine_10.endPoint(), SketchLine_11.startPoint()) +SketchConstraintCoincidence_12 = Sketch_2.setCoincident(SketchLine_11.endPoint(), SketchLine_12.startPoint()) +SketchConstraintHorizontal_5 = Sketch_2.setHorizontal(SketchLine_9.result()) +SketchConstraintVertical_5 = Sketch_2.setVertical(SketchLine_10.result()) +SketchConstraintHorizontal_6 = Sketch_2.setHorizontal(SketchLine_11.result()) +SketchConstraintVertical_6 = Sketch_2.setVertical(SketchLine_12.result()) +SketchLine_13 = Sketch_2.addLine(123.7283897260274, 22.30477773972602, 74.91038561643839, 22.30477773972602) +SketchLine_14 = Sketch_2.addLine(74.91038561643839, 22.30477773972602, 74.91038561643839, -0.4208448630136968) +SketchLine_15 = Sketch_2.addLine(74.91038561643839, -0.4208448630136968, 123.7283897260274, -0.4208448630136968) +SketchLine_16 = Sketch_2.addLine(123.7283897260274, -0.4208448630136968, 123.7283897260274, 22.30477773972602) +SketchConstraintCoincidence_13 = Sketch_2.setCoincident(SketchLine_16.endPoint(), SketchLine_13.startPoint()) +SketchConstraintCoincidence_14 = Sketch_2.setCoincident(SketchLine_13.endPoint(), SketchLine_14.startPoint()) +SketchConstraintCoincidence_15 = Sketch_2.setCoincident(SketchLine_14.endPoint(), SketchLine_15.startPoint()) +SketchConstraintCoincidence_16 = Sketch_2.setCoincident(SketchLine_15.endPoint(), SketchLine_16.startPoint()) +SketchConstraintHorizontal_7 = Sketch_2.setHorizontal(SketchLine_13.result()) +SketchConstraintVertical_7 = Sketch_2.setVertical(SketchLine_14.result()) +SketchConstraintHorizontal_8 = Sketch_2.setHorizontal(SketchLine_15.result()) +SketchConstraintVertical_8 = Sketch_2.setVertical(SketchLine_16.result()) +model.do() +Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_2")], model.selection(), 40, -20) +Compound_1 = model.addCompound(Part_1_doc, [model.selection("SOLID", "Extrusion_1_1"), model.selection("SOLID", "Extrusion_1_2")]) +Compound_2 = model.addCompound(Part_1_doc, [model.selection("SOLID", "Extrusion_2_1"), model.selection("SOLID", "Extrusion_2_2")]) +Fuse_1 = model.addFuse(Part_1_doc, [model.selection("COMPOUND", "Compound_1_1"), model.selection("COMPOUND", "Compound_2_1")]) +model.testHaveNamingSubshapes(Fuse_1, model, Part_1_doc) +model.do() +model.end() + +from GeomAPI import GeomAPI_Shape + +model.testNbResults(Fuse_1, 1) +model.testNbSubResults(Fuse_1, [2]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.SOLID, [2]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.FACE, [22]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.EDGE, [96]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.VERTEX, [192]) + +assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestBooleanFuse_Solid_Solid.py b/src/FeaturesPlugin/Test/TestBooleanFuse_Solid_Solid.py new file mode 100644 index 000000000..809ff19f6 --- /dev/null +++ b/src/FeaturesPlugin/Test/TestBooleanFuse_Solid_Solid.py @@ -0,0 +1,71 @@ +## Copyright (C) 2014-2017 CEA/DEN, EDF R&D +## +## This library is free software; you can redistribute it and/or +## modify it under the terms of the GNU Lesser General Public +## License as published by the Free Software Foundation; either +## version 2.1 of the License, or (at your option) any later version. +## +## This library is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public +## License along with this library; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +## +## See http:##www.salome-platform.org/ or +## email : webmaster.salome@opencascade.com +## + +from salome.shaper import model + +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(-22.17495711835335, 33.08919382504288, -50.93310463121783, 33.08919382504288) +SketchLine_2 = Sketch_1.addLine(-50.93310463121783, 33.08919382504288, -50.93310463121783, 7.102915951972556) +SketchLine_3 = Sketch_1.addLine(-50.93310463121783, 7.102915951972556, -22.17495711835335, 7.102915951972556) +SketchLine_4 = Sketch_1.addLine(-22.17495711835335, 7.102915951972556, -22.17495711835335, 33.08919382504288) +SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint()) +SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) +SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) +SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint()) +SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_1.result()) +SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result()) +SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result()) +SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result()) +model.do() +Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_2f-SketchLine_3f-SketchLine_4f")], model.selection(), 50, 0) +Sketch_2 = model.addSketch(Part_1_doc, model.standardPlane("XOY")) +SketchLine_5 = Sketch_2.addLine(-38.01624011480907, 11.11021000825241, -18.03083750064881, 11.11021000825241) +SketchLine_6 = Sketch_2.addLine(-18.03083750064881, 11.11021000825241, -18.03083750064881, 22.05701811772883) +SketchLine_7 = Sketch_2.addLine(-18.03083750064881, 22.05701811772883, -38.01624011480907, 22.05701811772883) +SketchLine_8 = Sketch_2.addLine(-38.01624011480907, 22.05701811772883, -38.01624011480907, 11.11021000825241) +SketchConstraintCoincidence_5 = Sketch_2.setCoincident(SketchLine_8.endPoint(), SketchLine_5.startPoint()) +SketchConstraintCoincidence_6 = Sketch_2.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint()) +SketchConstraintCoincidence_7 = Sketch_2.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint()) +SketchConstraintCoincidence_8 = Sketch_2.setCoincident(SketchLine_7.endPoint(), SketchLine_8.startPoint()) +SketchConstraintHorizontal_3 = Sketch_2.setHorizontal(SketchLine_5.result()) +SketchConstraintVertical_3 = Sketch_2.setVertical(SketchLine_6.result()) +SketchConstraintHorizontal_4 = Sketch_2.setHorizontal(SketchLine_7.result()) +SketchConstraintVertical_4 = Sketch_2.setVertical(SketchLine_8.result()) +model.do() +Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_2/Wire-SketchLine_5f-SketchLine_6f-SketchLine_7f-SketchLine_8f")], model.selection(), 30, -20) +Fuse_1 = model.addFuse(Part_1_doc, [model.selection("SOLID", "Extrusion_1_1"), model.selection("SOLID", "Extrusion_2_1")]) +model.testHaveNamingSubshapes(Fuse_1, model, Part_1_doc) +model.do() +model.end() + +from GeomAPI import GeomAPI_Shape + +model.testNbResults(Fuse_1, 1) +model.testNbSubResults(Fuse_1, [0]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.SOLID, [1]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.FACE, [11]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.EDGE, [48]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.VERTEX, [96]) + +assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestBooleanFuse_VertexCompound_VertexCompound.py b/src/FeaturesPlugin/Test/TestBooleanFuse_VertexCompound_VertexCompound.py new file mode 100644 index 000000000..3a497f317 --- /dev/null +++ b/src/FeaturesPlugin/Test/TestBooleanFuse_VertexCompound_VertexCompound.py @@ -0,0 +1,51 @@ +## Copyright (C) 2014-2017 CEA/DEN, EDF R&D +## +## This library is free software; you can redistribute it and/or +## modify it under the terms of the GNU Lesser General Public +## License as published by the Free Software Foundation; either +## version 2.1 of the License, or (at your option) any later version. +## +## This library is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public +## License along with this library; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +## +## See http:##www.salome-platform.org/ or +## email : webmaster.salome@opencascade.com +## + +from salome.shaper import model + +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")) +SketchPoint_1 = Sketch_1.addPoint(-22.97883597883597, 19.23809523809524) +SketchPoint_2 = Sketch_1.addPoint(18.16931216931219, 17.1005291005291) +SketchPoint_3 = Sketch_1.addPoint(-19.77248677248678, -16.03174603174603) +SketchPoint_4 = Sketch_1.addPoint(21.37566137566138, -16.03174603174603) +model.do() +Vertex_1_objects = [model.selection("VERTEX", "Sketch_1/Vertex-SketchPoint_3"), model.selection("VERTEX", "Sketch_1/Vertex-SketchPoint_1"), model.selection("VERTEX", "Sketch_1/Vertex-SketchPoint_4"), model.selection("VERTEX", "Sketch_1/Vertex-SketchPoint_2")] +Vertex_1 = model.addVertex(Part_1_doc, Vertex_1_objects) +Compound_1 = model.addCompound(Part_1_doc, [model.selection("VERTEX", "Vertex_1_1"), model.selection("VERTEX", "Vertex_1_2")]) +Compound_2 = model.addCompound(Part_1_doc, [model.selection("VERTEX", "Vertex_1_3"), model.selection("VERTEX", "Vertex_1_4")]) +Fuse_1 = model.addFuse(Part_1_doc, [model.selection("COMPOUND", "Compound_1_1"), model.selection("COMPOUND", "Compound_2_1")]) +model.testHaveNamingSubshapes(Fuse_1, model, Part_1_doc) +model.do() +model.end() + +from GeomAPI import GeomAPI_Shape + +model.testNbResults(Fuse_1, 1) +model.testNbSubResults(Fuse_1, [4]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.SOLID, [0]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.FACE, [0]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.EDGE, [0]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.VERTEX, [4]) + +assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestBooleanFuse_Vertex_Vertex.py b/src/FeaturesPlugin/Test/TestBooleanFuse_Vertex_Vertex.py new file mode 100644 index 000000000..70ce3aad8 --- /dev/null +++ b/src/FeaturesPlugin/Test/TestBooleanFuse_Vertex_Vertex.py @@ -0,0 +1,46 @@ +## Copyright (C) 2014-2017 CEA/DEN, EDF R&D +## +## This library is free software; you can redistribute it and/or +## modify it under the terms of the GNU Lesser General Public +## License as published by the Free Software Foundation; either +## version 2.1 of the License, or (at your option) any later version. +## +## This library is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public +## License along with this library; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +## +## See http:##www.salome-platform.org/ or +## email : webmaster.salome@opencascade.com +## + +from salome.shaper import model + +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")) +SketchPoint_1 = Sketch_1.addPoint(-6.078627161807992, -0.4501231771005025) +SketchPoint_2 = Sketch_1.addPoint(7.482208269631659, 3.929326826374309) +model.do() +Vertex_1 = model.addVertex(Part_1_doc, [model.selection("VERTEX", "Sketch_1/Vertex-SketchPoint_2"), model.selection("VERTEX", "Sketch_1/Vertex-SketchPoint_1")]) +Fuse_1 = model.addFuse(Part_1_doc, [model.selection("VERTEX", "Vertex_1_1"), model.selection("VERTEX", "Vertex_1_2")]) +model.testHaveNamingSubshapes(Fuse_1, model, Part_1_doc) +model.do() +model.end() + +from GeomAPI import GeomAPI_Shape + +model.testNbResults(Fuse_1, 1) +model.testNbSubResults(Fuse_1, [2]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.SOLID, [0]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.FACE, [0]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.EDGE, [0]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.VERTEX, [2]) + +assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestBooleanFuse_WireCompound_WireCompound.py b/src/FeaturesPlugin/Test/TestBooleanFuse_WireCompound_WireCompound.py new file mode 100644 index 000000000..b7473f690 --- /dev/null +++ b/src/FeaturesPlugin/Test/TestBooleanFuse_WireCompound_WireCompound.py @@ -0,0 +1,64 @@ +## Copyright (C) 2014-2017 CEA/DEN, EDF R&D +## +## This library is free software; you can redistribute it and/or +## modify it under the terms of the GNU Lesser General Public +## License as published by the Free Software Foundation; either +## version 2.1 of the License, or (at your option) any later version. +## +## This library is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public +## License along with this library; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +## +## See http:##www.salome-platform.org/ or +## email : webmaster.salome@opencascade.com +## + + +from salome.shaper import model + +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(-74.539241607565, 22.811578250591, -50.12121418439715, 49.79992434988179) +SketchLine_2 = Sketch_1.addLine(-50.12121418439715, 49.79992434988179, -29.55866477541372, 23.45415791962174) +SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) +SketchLine_3 = Sketch_1.addLine(15.42191205673757, 24.09673758865247, 34.69930212765959, 49.15734468085105) +SketchLine_4 = Sketch_1.addLine(34.69930212765959, 49.15734468085105, 59.75990921985817, 26.02447659574467) +SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint()) +model.do() +Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchLine_5 = Sketch_2.addLine(-79.03729929078014, 52.37024302600472, -50.76379385342788, 26.6670562647754) +SketchLine_6 = Sketch_2.addLine(-50.76379385342788, 26.6670562647754, -25.70318676122931, 53.65540236406619) +SketchConstraintCoincidence_3 = Sketch_2.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint()) +SketchLine_7 = Sketch_2.addLine(13.49417304964538, 51.08508368794326, 35.98446146572105, 27.95221560283687) +SketchLine_8 = Sketch_2.addLine(35.98446146572105, 27.95221560283687, 53.3341125295508, 47.87218534278959) +SketchConstraintCoincidence_4 = Sketch_2.setCoincident(SketchLine_7.endPoint(), SketchLine_8.startPoint()) +model.do() +Wire_1 = model.addWire(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_2")]) +Wire_2 = model.addWire(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchLine_3"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_4")]) +Wire_3 = model.addWire(Part_1_doc, [model.selection("EDGE", "Sketch_2/Edge-SketchLine_5"), model.selection("EDGE", "Sketch_2/Edge-SketchLine_6")]) +Wire_4 = model.addWire(Part_1_doc, [model.selection("EDGE", "Sketch_2/Edge-SketchLine_7"), model.selection("EDGE", "Sketch_2/Edge-SketchLine_8")]) +Compound_1 = model.addCompound(Part_1_doc, [model.selection("WIRE", "Wire_1_1"), model.selection("WIRE", "Wire_2_1")]) +Compound_2 = model.addCompound(Part_1_doc, [model.selection("WIRE", "Wire_3_1"), model.selection("WIRE", "Wire_4_1")]) +Fuse_1 = model.addFuse(Part_1_doc, [model.selection("COMPOUND", "Compound_1_1"), model.selection("COMPOUND", "Compound_2_1")]) +model.testHaveNamingSubshapes(Fuse_1, model, Part_1_doc) +model.do() +model.end() + +from GeomAPI import GeomAPI_Shape + +model.testNbResults(Fuse_1, 1) +model.testNbSubResults(Fuse_1, [4]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.SOLID, [0]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.FACE, [0]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.EDGE, [16]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.VERTEX, [32]) + +assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestBooleanFuse_Wire_Wire.py b/src/FeaturesPlugin/Test/TestBooleanFuse_Wire_Wire.py new file mode 100644 index 000000000..0cb778f8e --- /dev/null +++ b/src/FeaturesPlugin/Test/TestBooleanFuse_Wire_Wire.py @@ -0,0 +1,53 @@ +## Copyright (C) 2014-2017 CEA/DEN, EDF R&D +## +## This library is free software; you can redistribute it and/or +## modify it under the terms of the GNU Lesser General Public +## License as published by the Free Software Foundation; either +## version 2.1 of the License, or (at your option) any later version. +## +## This library is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public +## License along with this library; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +## +## See http:##www.salome-platform.org/ or +## email : webmaster.salome@opencascade.com +## + +from salome.shaper import model + +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(-31.34514549929152, 46.39906406145125, -4.124361249906777, 13.81661018718769) +SketchLine_2 = Sketch_1.addLine(-4.124361249906777, 13.81661018718769, 21.85911462450594, 45.98662793646056) +SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) +model.do() +Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchLine_3 = Sketch_2.addLine(-23.92129524945932, 7.630068312327553, -4.124361249906777, 34.02598031173091) +SketchLine_4 = Sketch_2.addLine(-4.124361249906777, 34.02598031173091, 14.43526437467373, 6.392759937355498) +SketchConstraintCoincidence_2 = Sketch_2.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint()) +model.do() +Wire_1 = model.addWire(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_2")]) +Wire_2 = model.addWire(Part_1_doc, [model.selection("EDGE", "Sketch_2/Edge-SketchLine_3"), model.selection("EDGE", "Sketch_2/Edge-SketchLine_4")]) +Fuse_1 = model.addFuse(Part_1_doc, [model.selection("WIRE", "Wire_1_1"), model.selection("WIRE", "Wire_2_1")]) +model.testHaveNamingSubshapes(Fuse_1, model, Part_1_doc) +model.do() +model.end() + +from GeomAPI import GeomAPI_Shape + +model.testNbResults(Fuse_1, 1) +model.testNbSubResults(Fuse_1, [2]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.SOLID, [0]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.FACE, [0]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.EDGE, [8]) +model.testNbSubShapes(Fuse_1, GeomAPI_Shape.VERTEX, [16]) + +assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/TestBooleanSmash_Face_Face.py b/src/FeaturesPlugin/Test/TestBooleanSmash_Face_Face.py index 5ac6d4743..06198375b 100644 --- a/src/FeaturesPlugin/Test/TestBooleanSmash_Face_Face.py +++ b/src/FeaturesPlugin/Test/TestBooleanSmash_Face_Face.py @@ -26,13 +26,9 @@ Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchCircle_1 = Sketch_1.addCircle(-31.7032590051458, 14.72555746140652, 29.35516607310447) -SketchCircle_1.result().setColor(225, 0, 0) -SketchCircle_1.results()[1].setColor(225, 0, 0) model.do() Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchCircle_2 = Sketch_2.addCircle(12.30017152658664, 14.37907375643225, 29.61574408620473) -SketchCircle_2.result().setColor(225, 0, 0) -SketchCircle_2.results()[1].setColor(225, 0, 0) model.do() Face_1 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2f"), model.selection("FACE", "Sketch_2/Face-SketchCircle_2_2f")]) Smash_1 = model.addSmash(Part_1_doc, [model.selection("FACE", "Face_1_1")], [model.selection("FACE", "Face_1_2")]) diff --git a/src/FeaturesPlugin/Test/TestPartitionSubCompsolidWithFace1.py b/src/FeaturesPlugin/Test/TestPartitionSubCompsolidWithFace1.py index 1e178975d..086680d49 100644 --- a/src/FeaturesPlugin/Test/TestPartitionSubCompsolidWithFace1.py +++ b/src/FeaturesPlugin/Test/TestPartitionSubCompsolidWithFace1.py @@ -36,10 +36,7 @@ model.do() Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection(), "ExtrusionMax", "ExtrusionMin") Sketch_2 = model.addSketch(Part_1_doc, model.standardPlane("XOY")) SketchArc_1 = Sketch_2.addArc(10.01336797518561, 24.95055816041118, 7.898114670281987, -23.85096600991564, 58.22303946797933, 32.81761798074749, False) -SketchArc_1.result().setColor(225, 0, 0) -SketchArc_1.results()[1].setColor(225, 0, 0) SketchLine_1 = Sketch_2.addLine(58.22303949051827, 32.8176179844255, 7.898114670281987, -23.85096600991564) -SketchLine_1.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_2.setCoincident(SketchArc_1.endPoint(), SketchLine_1.startPoint()) SketchConstraintCoincidence_2 = Sketch_2.setCoincident(SketchArc_1.startPoint(), SketchLine_1.endPoint()) model.do() diff --git a/src/FeaturesPlugin/Test/TestPartitionSubCompsolidWithFace2.py b/src/FeaturesPlugin/Test/TestPartitionSubCompsolidWithFace2.py index df19bc5b2..3ed42aa9c 100644 --- a/src/FeaturesPlugin/Test/TestPartitionSubCompsolidWithFace2.py +++ b/src/FeaturesPlugin/Test/TestPartitionSubCompsolidWithFace2.py @@ -36,10 +36,7 @@ model.do() Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection(), "ExtrusionMax", "ExtrusionMin") Sketch_2 = model.addSketch(Part_1_doc, model.standardPlane("XOY")) SketchArc_1 = Sketch_2.addArc(10.01336797518561, 24.95055816041118, 7.898114670281987, -23.85096600991564, 58.22303946797933, 32.81761798074749, False) -SketchArc_1.result().setColor(225, 0, 0) -SketchArc_1.results()[1].setColor(225, 0, 0) SketchLine_1 = Sketch_2.addLine(58.22303949051827, 32.8176179844255, 7.898114670281987, -23.85096600991564) -SketchLine_1.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_2.setCoincident(SketchArc_1.endPoint(), SketchLine_1.startPoint()) SketchConstraintCoincidence_2 = Sketch_2.setCoincident(SketchArc_1.startPoint(), SketchLine_1.endPoint()) model.do() diff --git a/src/FeaturesPlugin/Test/TestPartitionSubCompsolidWithFace3.py b/src/FeaturesPlugin/Test/TestPartitionSubCompsolidWithFace3.py index 2c8626bcd..93b708ca6 100644 --- a/src/FeaturesPlugin/Test/TestPartitionSubCompsolidWithFace3.py +++ b/src/FeaturesPlugin/Test/TestPartitionSubCompsolidWithFace3.py @@ -36,10 +36,7 @@ model.do() Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection(), "ExtrusionMax", "ExtrusionMin") Sketch_2 = model.addSketch(Part_1_doc, model.standardPlane("XOY")) SketchArc_1 = Sketch_2.addArc(10.01336797518561, 24.95055816041118, 7.898114670281987, -23.85096600991564, 58.22303946797933, 32.81761798074749, False) -SketchArc_1.result().setColor(225, 0, 0) -SketchArc_1.results()[1].setColor(225, 0, 0) SketchLine_1 = Sketch_2.addLine(58.22303949051827, 32.8176179844255, 7.898114670281987, -23.85096600991564) -SketchLine_1.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_2.setCoincident(SketchArc_1.endPoint(), SketchLine_1.startPoint()) SketchConstraintCoincidence_2 = Sketch_2.setCoincident(SketchArc_1.startPoint(), SketchLine_1.endPoint()) model.do() diff --git a/src/FeaturesPlugin/Test/TestPartitionSubCompsolidWithFace4.py b/src/FeaturesPlugin/Test/TestPartitionSubCompsolidWithFace4.py index fd2d4ab24..c2e0b8045 100644 --- a/src/FeaturesPlugin/Test/TestPartitionSubCompsolidWithFace4.py +++ b/src/FeaturesPlugin/Test/TestPartitionSubCompsolidWithFace4.py @@ -36,10 +36,7 @@ model.do() Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection(), "ExtrusionMax", "ExtrusionMin") Sketch_2 = model.addSketch(Part_1_doc, model.standardPlane("XOY")) SketchArc_1 = Sketch_2.addArc(10.01336797518561, 24.95055816041118, 7.898114670281987, -23.85096600991564, 58.22303946797933, 32.81761798074749, False) -SketchArc_1.result().setColor(225, 0, 0) -SketchArc_1.results()[1].setColor(225, 0, 0) SketchLine_1 = Sketch_2.addLine(58.22303949051827, 32.8176179844255, 7.898114670281987, -23.85096600991564) -SketchLine_1.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_2.setCoincident(SketchArc_1.endPoint(), SketchLine_1.startPoint()) SketchConstraintCoincidence_2 = Sketch_2.setCoincident(SketchArc_1.startPoint(), SketchLine_1.endPoint()) model.do() diff --git a/src/FeaturesPlugin/Test/TestPartitionSubCompsolidWithFace5.py b/src/FeaturesPlugin/Test/TestPartitionSubCompsolidWithFace5.py index fd3539cac..d1bc8fa05 100644 --- a/src/FeaturesPlugin/Test/TestPartitionSubCompsolidWithFace5.py +++ b/src/FeaturesPlugin/Test/TestPartitionSubCompsolidWithFace5.py @@ -36,10 +36,7 @@ model.do() Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection(), "ExtrusionMax", "ExtrusionMin") Sketch_2 = model.addSketch(Part_1_doc, model.standardPlane("XOY")) SketchArc_1 = Sketch_2.addArc(10.01336797518561, 24.95055816041118, 7.898114670281987, -23.85096600991564, 58.22303946797933, 32.81761798074749, False) -SketchArc_1.result().setColor(225, 0, 0) -SketchArc_1.results()[1].setColor(225, 0, 0) SketchLine_1 = Sketch_2.addLine(58.22303949051827, 32.8176179844255, 7.898114670281987, -23.85096600991564) -SketchLine_1.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_2.setCoincident(SketchArc_1.endPoint(), SketchLine_1.startPoint()) SketchConstraintCoincidence_2 = Sketch_2.setCoincident(SketchArc_1.startPoint(), SketchLine_1.endPoint()) model.do() diff --git a/src/FeaturesPlugin/boolean_fuse_widget.xml b/src/FeaturesPlugin/boolean_fuse_widget.xml index 149c79b84..952ff6eb0 100644 --- a/src/FeaturesPlugin/boolean_fuse_widget.xml +++ b/src/FeaturesPlugin/boolean_fuse_widget.xml @@ -28,7 +28,7 @@ email : webmaster.salome@opencascade.com @@ -41,7 +41,7 @@ email : webmaster.salome@opencascade.com @@ -51,7 +51,7 @@ email : webmaster.salome@opencascade.com diff --git a/src/GeomAPI/Test/TestSphere.py b/src/GeomAPI/Test/TestSphere.py index 043270f6f..961ed55e1 100644 --- a/src/GeomAPI/Test/TestSphere.py +++ b/src/GeomAPI/Test/TestSphere.py @@ -81,7 +81,6 @@ ParamAngle = model.addParameter(Part_1_doc, "Angle", "30") ParamAperture = model.addParameter(Part_1_doc, "Aperture", "360") Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchArc_1 = Sketch_1.addArc(0, 0, 0, -50, 0, 50, False) -SketchArc_1.results()[1].setColor(225, 0, 0) SketchLine_1 = Sketch_1.addLine(0, 50, 0, -50) SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchArc_1.endPoint(), SketchLine_1.startPoint()) SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchArc_1.startPoint(), SketchLine_1.endPoint())