Salome HOME
Unit test for moving group after BuildPlugin_Face feature
[modules/shaper.git] / src / BuildPlugin / Test / TestSubShapes.py
index 1453d8af7ddfa14f4ac3cef5c4a488529f2a8be9..b10358a4cfc814abb49bd93fa6d109c5e90371d7 100644 (file)
@@ -1,3 +1,23 @@
+## 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<mailto:webmaster.salome@opencascade.com>
+##
+
 # Initialization of the test
 from ModelAPI import *
 from GeomDataAPI import *
@@ -8,8 +28,8 @@ import random
 
 def createPoint(theSketchFeature):
     aSketchPointFeature = theSketchFeature.addFeature("SketchPoint")
-    aPointCoordindates = geomDataAPI_Point2D(aSketchPointFeature.attribute("PointCoordindates"))
-    aPointCoordindates.setValue(random.uniform(0, 50), random.uniform(0, 50))
+    aPointCoordinates = geomDataAPI_Point2D(aSketchPointFeature.attribute("PointCoordinates"))
+    aPointCoordinates.setValue(random.uniform(0, 50), random.uniform(0, 50))
     return aSketchPointFeature
 
 def createLine(theSketchFeature):
@@ -140,9 +160,9 @@ SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchCircle_1.center(),
 SketchPoint_1 = Sketch_1.addPoint(-490.566037735849, 50.600343053173)
 SketchPoint_2 = Sketch_1.addPoint(-423.670668953688, 50.600343053173)
 model.do()
-Face_1 = model.addFace(Part_1_doc, [model.selection("WIRE", "Sketch_1/Wire-SketchCircle_1_2f")])
-Face_2 = model.addFace(Part_1_doc, [model.selection("WIRE", "Sketch_1/Wire-SketchCircle_2_2r")])
-SubShapes_1 = model.addSubShapes(Part_1_doc, model.selection("FACE", "Face_1_1"), [model.selection("VERTEX", "Sketch_1/Vertex-SketchPoint_1"), model.selection("VERTEX", "Sketch_1/Vertex-SketchPoint_2")])
+Face_1 = model.addFace(Part_1_doc, [model.selection("EDGE", "Sketch_1/SketchCircle_1_2")])
+Face_2 = model.addFace(Part_1_doc, [model.selection("EDGE", "Sketch_1/SketchCircle_2_2")])
+SubShapes_1 = model.addSubShapes(Part_1_doc, model.selection("FACE", "Face_1_1"), [model.selection("VERTEX", "Sketch_1/SketchPoint_1"), model.selection("VERTEX", "Sketch_1/SketchPoint_2")])
 SubShapes_1.setBaseShape(model.selection("FACE", "Face_2_1"))
 model.end()