X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FFeaturesPlugin%2FTest%2FTest2419_2.py;h=33d0a3c8fdfd3734d1cd84ad6ce4cd3a6cf780ed;hb=2f26d9737227d2d79cfac070c2235c18d47ef40d;hp=07b640049b1914ec7913730437fb1b5cf8152108;hpb=c4eab94a20a0d93100549a210582d46409fec1cc;p=modules%2Fshaper.git diff --git a/src/FeaturesPlugin/Test/Test2419_2.py b/src/FeaturesPlugin/Test/Test2419_2.py index 07b640049..33d0a3c8f 100644 --- a/src/FeaturesPlugin/Test/Test2419_2.py +++ b/src/FeaturesPlugin/Test/Test2419_2.py @@ -1,4 +1,4 @@ -# Copyright (C) 2014-2019 CEA/DEN, EDF R&D +# Copyright (C) 2014-2020 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 @@ -17,8 +17,6 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -# -*- coding: utf-8 -*- - from salome.shaper import model model.begin() @@ -109,7 +107,7 @@ Group_2.result().setName("acier") Group_2.result().setColor(170, 85, 0) Sketch_3 = model.addSketch(Part_1_doc, model.standardPlane("XOY")) SketchLine_11 = Sketch_3.addLine(40, 0, 30, 0) -SketchProjection_1 = Sketch_3.addProjection(model.selection("VERTEX", "[Face_4_1/Edge_6][Face_4_1/Edge_7]"), False) +SketchProjection_1 = Sketch_3.addProjection(model.selection("VERTEX", "Face_4_1/Modified_Vertex&Sketch_1/SketchLine_9_StartVertex&Sketch_1/SketchLine_7_EndVertex"), False) SketchPoint_1 = SketchProjection_1.createdFeature() SketchConstraintCoincidence_19 = Sketch_3.setCoincident(SketchLine_11.endPoint(), SketchPoint_1.result()) SketchConstraintCoincidence_19.setName("SketchConstraintCoincidence_19") @@ -142,24 +140,24 @@ Recover_2 = model.addRecover(Part_1_doc, LinearCopy_1, [Face_5.result()]) Translation_2 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_2_1")], model.selection("VERTEX", "Sketch_3/SketchLine_11_EndVertex"), model.selection("VERTEX", "Sketch_1/SketchLine_3_EndVertex")) LinearCopy_3 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_2_1")], model.selection("EDGE", "PartSet/OX"), "length_assemblage", 4) Recover_3 = model.addRecover(Part_1_doc, LinearCopy_1, [Face_5.result()]) -Translation_3 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_3_1")], model.selection("VERTEX", "Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "[LinearCopy_3_1_1/ME:Translated_Edge&Face_5_1/Edge_1]e[LinearCopy_3_1_1/ME:Translated_Edge&Face_5_1/Edge_4]e")) +Translation_3 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_3_1")], model.selection("VERTEX", "Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "LinearCopy_3_1_1/MV:Translated&Sketch_3/SketchLine_13_EndVertex&Sketch_3/SketchLine_14_StartVertex")) LinearCopy_4 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_3_1")], model.selection("EDGE", "PartSet/OX"), "length_assemblage", 3) Recover_4 = model.addRecover(Part_1_doc, LinearCopy_1, [Face_5.result()]) Translation_4 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_4_1")], model.selection("VERTEX", "Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "Sketch_1/SketchLine_1_StartVertex")) LinearCopy_5 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_4_1")], model.selection("EDGE", "PartSet/OX"), "length_assemblage", 2) Partition_1 = model.addPartition(Part_1_doc, [model.selection("FACE", "Face_1_1"), model.selection("FACE", "Face_2_1")]) -Fill_1_objects_2 = [model.selection("FACE", "Face_3_1"), model.selection("FACE", "Face_3_2"), model.selection("FACE", "Face_3_3"), model.selection("FACE", "Face_3_4"), model.selection("FACE", "Face_3_5"), model.selection("FACE", "Face_3_6"), model.selection("FACE", "Face_3_7"), model.selection("FACE", "Face_3_8"), model.selection("FACE", "Face_3_9"), model.selection("FACE", "Face_3_10"), model.selection("FACE", "Face_3_11"), model.selection("FACE", "Face_3_12"), model.selection("FACE", "Face_4_1"), model.selection("COMPOUND", "LinearCopy_1_1"), model.selection("COMPOUND", "LinearCopy_2_1"), model.selection("COMPOUND", "LinearCopy_3_1"), model.selection("COMPOUND", "LinearCopy_4_1"), model.selection("COMPOUND", "LinearCopy_5_1")] -Fill_1 = model.addFill(Part_1_doc, [model.selection("COMPOUND", "Partition_1_1")], Fill_1_objects_2) +Split_1_objects_2 = [model.selection("FACE", "Face_3_1"), model.selection("FACE", "Face_3_2"), model.selection("FACE", "Face_3_3"), model.selection("FACE", "Face_3_4"), model.selection("FACE", "Face_3_5"), model.selection("FACE", "Face_3_6"), model.selection("FACE", "Face_3_7"), model.selection("FACE", "Face_3_8"), model.selection("FACE", "Face_3_9"), model.selection("FACE", "Face_3_10"), model.selection("FACE", "Face_3_11"), model.selection("FACE", "Face_3_12"), model.selection("FACE", "Face_4_1"), model.selection("COMPOUND", "LinearCopy_1_1"), model.selection("COMPOUND", "LinearCopy_2_1"), model.selection("COMPOUND", "LinearCopy_3_1"), model.selection("COMPOUND", "LinearCopy_4_1"), model.selection("COMPOUND", "LinearCopy_5_1")] +Split_1 = model.addSplit(Part_1_doc, [model.selection("COMPOUND", "Partition_1_1")], Split_1_objects_2) model.do() model.end() from GeomAPI import GeomAPI_Shape -model.testNbResults(Fill_1, 1) -model.testNbSubResults(Fill_1, [60]) -model.testNbSubShapes(Fill_1, GeomAPI_Shape.SOLID, [0]) -model.testNbSubShapes(Fill_1, GeomAPI_Shape.FACE, [60]) -model.testNbSubShapes(Fill_1, GeomAPI_Shape.EDGE, [273]) -model.testNbSubShapes(Fill_1, GeomAPI_Shape.VERTEX, [546]) +model.testNbResults(Split_1, 1) +model.testNbSubResults(Split_1, [60]) +model.testNbSubShapes(Split_1, GeomAPI_Shape.SOLID, [0]) +model.testNbSubShapes(Split_1, GeomAPI_Shape.FACE, [60]) +model.testNbSubShapes(Split_1, GeomAPI_Shape.EDGE, [273]) +model.testNbSubShapes(Split_1, GeomAPI_Shape.VERTEX, [546]) assert(model.checkPythonDump())