]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Renaming Fill in Split : Unit tests cgt/split V9_3_0b1
authorClarisse GENRAULT - DEN/DANS/DM2S/STMF/LGLS - 2012/10/01 <cg246364@is231796.intra.cea.fr>
Thu, 14 Mar 2019 15:34:48 +0000 (16:34 +0100)
committerClarisse GENRAULT - DEN/DANS/DM2S/STMF/LGLS - 2012/10/01 <cg246364@is231796.intra.cea.fr>
Thu, 14 Mar 2019 15:34:48 +0000 (16:34 +0100)
src/FeaturesPlugin/Test/TestSplitSolidEdge.py [new file with mode: 0755]

diff --git a/src/FeaturesPlugin/Test/TestSplitSolidEdge.py b/src/FeaturesPlugin/Test/TestSplitSolidEdge.py
new file mode 100755 (executable)
index 0000000..6f9e0e9
--- /dev/null
@@ -0,0 +1,47 @@
+# Copyright (C) 2014-2019  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
+#
+
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Sketch_1 = model.addSketch(Part_1_doc, model.selection("FACE", "Box_1_1/Front"))
+SketchLine_1 = Sketch_1.addLine(4, 10, 7, 0)
+SketchProjection_1 = Sketch_1.addProjection(model.selection("EDGE", "[Box_1_1/Front][Box_1_1/Top]"), False)
+SketchLine_2 = SketchProjection_1.createdFeature()
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchLine_2.result())
+SketchProjection_2 = Sketch_1.addProjection(model.selection("EDGE", "[Box_1_1/Front][Box_1_1/Bottom]"), False)
+SketchLine_3 = SketchProjection_2.createdFeature()
+SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_3.result())
+model.do()
+Edge_1 = model.addEdge(Part_1_doc, [model.selection("EDGE", "Sketch_1/SketchLine_1")])
+Split_1 = model.addSplit(Part_1_doc, [model.selection("SOLID", "Box_1_1")], [model.selection("EDGE", "Edge_1_1")])
+model.do()
+
+model.checkResult(Split_1, model, 1, [0], [1], [7], [30], [60])
+model.testHaveNamingSubshapes(Split_1, model, Part_1_doc)
+
+model.end()
+
+assert(model.checkPythonDump())