Salome HOME
Fixed ConstructionPlugin tests.
[modules/shaper.git] / src / ConstructionPlugin / Test / TestPoint_IntersectLines.py
index f3b08471afcb13373e704090d330aa15934c9a02..239d4eadd3007404d11ea68aefe4f0792d2bd840 100644 (file)
@@ -23,7 +23,6 @@ Test case for Construction Point feature by lines intersection.
 """
 
 from salome.shaper import model
-from GeomAPI import *
 
 model.begin()
 partSet = model.moduleDocument()
@@ -35,11 +34,13 @@ SketchPoint_1 = SketchProjection_1.createdFeature()
 SketchLine_1 = Sketch_1.addLine(-50, 50, 50, 50)
 model.do()
 Box_1 = model.addBox(Part_1_doc, 25, 100, 100)
-Point_2 = model.addPoint(Part_1_doc, model.selection("EDGE", "Box_1_1/Back&Box_1_1/Bottom"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"))
-Point_3 = model.addPoint(Part_1_doc, model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"), model.selection("EDGE", "Box_1_1/Front&Box_1_1/Bottom"))
+Point_2 = model.addPoint(Part_1_doc, model.selection("EDGE", "[Box_1_1/Back][Box_1_1/Bottom]"), model.selection("EDGE", "Sketch_1/SketchLine_1"))
+Point_3 = model.addPoint(Part_1_doc, model.selection("EDGE", "Sketch_1/SketchLine_1"), model.selection("EDGE", "[Box_1_1/Front][Box_1_1/Bottom]"))
 model.do()
 model.end()
 
+from GeomAPI import GeomAPI_Vertex
+
 assert (len(Point_2.results()) > 0)
 rightPosition = GeomAPI_Vertex(0, 50, 0)
 assert(rightPosition.isEqual(Point_2.results()[0].resultSubShapePair()[0].shape()))