1 ## Copyright (C) 2014-2017 CEA/DEN, EDF R&D
3 ## This library is free software; you can redistribute it and/or
4 ## modify it under the terms of the GNU Lesser General Public
5 ## License as published by the Free Software Foundation; either
6 ## version 2.1 of the License, or (at your option) any later version.
8 ## This library is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 ## Lesser General Public License for more details.
13 ## You should have received a copy of the GNU Lesser General Public
14 ## License along with this library; if not, write to the Free Software
15 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 ## See http:##www.salome-platform.org/ or
18 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
22 TestFilletInteracting.py
23 Unit test of SketchPlugin_Fillet feature.
24 In scope of interaction with another constraints applied to filleted features.
28 from GeomDataAPI import *
29 from ModelAPI import *
32 from salome.shaper import model
34 __updated__ = "2017-03-06"
36 def isArcLineSmooth(theArc, theLine, theTolerance):
37 aCenter = geomDataAPI_Point2D(theArc.attribute("center_point"))
38 aDistance = model.distancePointLine(aCenter, theLine)
39 aRadius = arcRadius(theArc)
40 return math.fabs(aRadius - aDistance) < theTolerance
42 def isArcArcSmooth(theArc1, theArc2, theTolerance):
43 aCenter1 = geomDataAPI_Point2D(theArc1.attribute("center_point"))
44 aCenter2 = geomDataAPI_Point2D(theArc2.attribute("center_point"))
45 aDistance = model.distancePointPoint(aCenter1, aCenter2)
46 aRadius1 = arcRadius(theArc1)
47 aRadius2 = arcRadius(theArc2)
48 aRadSum = aRadius1 + aRadius2
49 aRadDiff = math.fabs(aRadius1 - aRadius2)
50 return math.fabs(aDistance - aRadSum) < theTolerance or math.fabs(aDistance - aRadDiff) < theTolerance
52 def arcRadius(theArc):
53 aCenter = geomDataAPI_Point2D(theArc.attribute("center_point"))
54 aStart = geomDataAPI_Point2D(theArc.attribute("start_point"))
55 return model.distancePointPoint(aCenter, aStart)
59 class TestFilletInteracting(unittest.TestCase):
62 self.myDocument = model.moduleDocument()
63 self.mySketch = model.addSketch(self.myDocument, model.defaultPlane("XOY"))
64 self.myTolerance = 1.e-6
69 self.assertTrue(model.checkPythonDump())
74 self.assertEqual(model.dof(self.mySketch), self.myDOF)
76 def collectFeatures(self):
78 for aSubObj in self.mySketch.features().list():
79 aFeature = ModelAPI.ModelAPI_Feature.feature(aSubObj)
80 if aFeature is not None:
81 if self.myFeatures.get(aFeature.getKind()) == None:
82 self.myFeatures[aFeature.getKind()] = 1
84 self.myFeatures[aFeature.getKind()] += 1
86 def checkNbFeatures(self, theFeatureKind, theFeatureCount):
87 if theFeatureCount == 0:
88 self.assertIsNone(self.myFeatures.get(theFeatureKind))
90 self.assertIsNotNone(self.myFeatures.get(theFeatureKind), "No features of kind {0} but expected {1}".format(theFeatureKind, theFeatureCount))
91 self.assertEqual(self.myFeatures[theFeatureKind], theFeatureCount, "Observed number of {0} is {1} but expected {2}".format(theFeatureKind, self.myFeatures[theFeatureKind], theFeatureCount))
93 def checkFillet(self):
94 aPtPtCoincidences = self.getCoincidences()
95 for coinc in aPtPtCoincidences:
96 aConnectedFeatures = self.connectedFeatures(coinc)
97 self.assertEqual(len(aConnectedFeatures), 2)
98 if aConnectedFeatures[0].getKind() == "SketchArc":
99 if aConnectedFeatures[1].getKind() == "SketchArc":
100 self.assertTrue(isArcArcSmooth(aConnectedFeatures[0], aConnectedFeatures[1], self.myTolerance))
101 elif aConnectedFeatures[1].getKind() == "SketchLine":
102 self.assertTrue(isArcLineSmooth(aConnectedFeatures[0], aConnectedFeatures[1], self.myTolerance))
103 elif aConnectedFeatures[0].getKind() == "SketchLine" and aConnectedFeatures[1].getKind() == "SketchArc":
104 self.assertTrue(isArcLineSmooth(aConnectedFeatures[1], aConnectedFeatures[0], self.myTolerance))
106 def getCoincidences(self):
108 for aSubObj in self.mySketch.features().list():
109 aSubFeature = ModelAPI.ModelAPI_Feature.feature(aSubObj)
110 if aSubFeature is not None and aSubFeature.getKind() == "SketchConstraintCoincidence":
111 anEntityA = aSubFeature.refattr("ConstraintEntityA")
112 anEntityB = aSubFeature.refattr("ConstraintEntityB")
113 if not anEntityA.isObject() and not anEntityB.isObject():
114 aCoincidences.append(aSubFeature)
117 def connectedFeatures(self, theCoincidence):
118 anEntityA = theCoincidence.refattr("ConstraintEntityA")
119 anEntityB = theCoincidence.refattr("ConstraintEntityB")
120 aFeatureA = ModelAPI.ModelAPI_Feature.feature(anEntityA.attr().owner())
121 aFeatureB = ModelAPI.ModelAPI_Feature.feature(anEntityB.attr().owner())
122 return [aFeatureA, aFeatureB]
125 def test_fillet_two_lines(self):
126 """ Test 1. Fillet on two connected lines
128 aSketchLineA = self.mySketch.addLine(10., 10., 20., 10.)
129 aSketchLineB = self.mySketch.addLine(10., 10., 10., 20.)
132 self.mySketch.setCoincident(aSketchLineA.startPoint(), aSketchLineB.startPoint())
136 self.mySketch.setFillet(aSketchLineA.startPoint())
142 self.collectFeatures()
143 self.checkNbFeatures("SketchLine", 2)
144 self.checkNbFeatures("SketchArc", 1)
145 self.checkNbFeatures("SketchConstraintCoincidence", 2)
146 self.checkNbFeatures("SketchConstraintTangent", 2)
147 self.checkNbFeatures("SketchFillet", 0)
149 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.FACE, [0])
150 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.EDGE, [3])
151 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.VERTEX, [6])
153 def test_wrong_fillet_two_lines(self):
154 """ Test 2. Check the fillet is wrong on two connected lines when selecting incorrect point
156 aSketchLineA = self.mySketch.addLine(10., 10., 20., 10.)
157 aSketchLineB = self.mySketch.addLine(10., 10., 10., 20.)
160 self.mySketch.setCoincident(aSketchLineA.startPoint(), aSketchLineB.startPoint())
164 aFillet = self.mySketch.setFillet(aSketchLineA.endPoint())
168 self.collectFeatures()
169 self.checkNbFeatures("SketchLine", 2)
170 self.checkNbFeatures("SketchArc", 0) # no arcs should be created
171 self.checkNbFeatures("SketchConstraintCoincidence", 1) # number of coincidences should not change
172 self.checkNbFeatures("SketchConstraintTangent", 0) # no tangencies should not be created
173 self.checkNbFeatures("SketchFillet", 1) # fillet feature should still exist. it should be wrong
175 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.FACE, [0])
176 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.EDGE, [2])
177 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.VERTEX, [4])
179 # remove fillet for correct python dump
180 self.myDocument.removeFeature(aFillet.feature())
182 def test_fillet_arc_line(self):
183 """ Test 3. Fillet on connected arc and line
185 aSketchLine = self.mySketch.addLine(10., 10., 20., 10.)
186 aSketchArc = self.mySketch.addArc(20., 10., 20., 20., 10., 10., False)
189 self.mySketch.setCoincident(aSketchLine.startPoint(), aSketchArc.endPoint())
193 self.mySketch.setFillet(aSketchLine.startPoint())
199 self.collectFeatures()
200 self.checkNbFeatures("SketchLine", 1)
201 self.checkNbFeatures("SketchArc", 2)
202 self.checkNbFeatures("SketchConstraintCoincidence", 2)
203 self.checkNbFeatures("SketchConstraintTangent", 2)
204 self.checkNbFeatures("SketchFillet", 0)
206 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.FACE, [0])
207 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.EDGE, [3])
208 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.VERTEX, [6])
210 def test_fillet_two_arcs(self):
211 """ Test 4. Fillet on two connected arcs
213 aSketchArc1 = self.mySketch.addArc(20., 0., 20., 20., 10., 17.32050807568877293, False)
214 aSketchArc2 = self.mySketch.addArc(20., 34.64101615137754586, 20., 14.64101615137754586, 10., 17.32050807568877293, True)
217 self.mySketch.setCoincident(aSketchArc1.endPoint(), aSketchArc2.endPoint())
221 self.mySketch.setFillet(aSketchArc1.endPoint())
227 self.collectFeatures()
228 self.checkNbFeatures("SketchLine", 0)
229 self.checkNbFeatures("SketchArc", 3)
230 self.checkNbFeatures("SketchConstraintCoincidence", 2)
231 self.checkNbFeatures("SketchConstraintTangent", 2)
232 self.checkNbFeatures("SketchFillet", 0)
234 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.FACE, [0])
235 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.EDGE, [3])
236 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.VERTEX, [6])
238 def test_fillet_with_horizontal_vertical(self):
239 """ Test 5. Fillet on two connected lines in case of Horizontal or Vertical constraints applied
241 aSketchLineA = self.mySketch.addLine(10., 10., 20., 10.)
242 aSketchLineB = self.mySketch.addLine(10., 10., 10., 20.)
245 self.mySketch.setCoincident(aSketchLineA.startPoint(), aSketchLineB.startPoint())
249 self.mySketch.setHorizontal(aSketchLineA.result())
250 self.mySketch.setVertical(aSketchLineB.result())
254 self.mySketch.setFillet(aSketchLineA.startPoint())
260 self.collectFeatures()
261 self.checkNbFeatures("SketchLine", 2)
262 self.checkNbFeatures("SketchArc", 1)
263 self.checkNbFeatures("SketchConstraintCoincidence", 2)
264 self.checkNbFeatures("SketchConstraintTangent", 2)
265 self.checkNbFeatures("SketchConstraintHorizontal", 1)
266 self.checkNbFeatures("SketchConstraintVertical", 1)
267 self.checkNbFeatures("SketchFillet", 0)
269 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.FACE, [0])
270 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.EDGE, [3])
271 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.VERTEX, [6])
273 def test_fillet_with_orthogonal(self):
274 """ Test 6. Fillet on two connected lines in case of Perpendicular constraint applied
276 aSketchLineA = self.mySketch.addLine(10., 10., 20., 10.)
277 aSketchLineB = self.mySketch.addLine(10., 10., 10., 20.)
280 self.mySketch.setCoincident(aSketchLineA.startPoint(), aSketchLineB.startPoint())
284 self.mySketch.setPerpendicular(aSketchLineA.result(), aSketchLineB.result())
288 self.mySketch.setFillet(aSketchLineA.startPoint())
294 self.collectFeatures()
295 self.checkNbFeatures("SketchLine", 2)
296 self.checkNbFeatures("SketchArc", 1)
297 self.checkNbFeatures("SketchConstraintCoincidence", 2)
298 self.checkNbFeatures("SketchConstraintTangent", 2)
299 self.checkNbFeatures("SketchConstraintPerpendicular", 1)
300 self.checkNbFeatures("SketchFillet", 0)
302 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.FACE, [0])
303 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.EDGE, [3])
304 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.VERTEX, [6])
306 def test_fillet_with_parallel(self):
307 """ Test 7. Fillet on two connected lines in case of Parallel constraint applied
309 aSketchLineA = self.mySketch.addLine(10., 10., 20., 10.)
310 aSketchLineB = self.mySketch.addLine(10., 10., 10., 20.)
313 self.mySketch.setCoincident(aSketchLineA.startPoint(), aSketchLineB.startPoint())
317 # third line to apply parallel constraint
318 aSketchLineC = self.mySketch.addLine(10., 0., 20., 5.)
320 self.mySketch.setParallel(aSketchLineB.result(), aSketchLineC.result())
324 self.mySketch.setFillet(aSketchLineA.startPoint())
330 self.collectFeatures()
331 self.checkNbFeatures("SketchLine", 3)
332 self.checkNbFeatures("SketchArc", 1)
333 self.checkNbFeatures("SketchConstraintCoincidence", 2)
334 self.checkNbFeatures("SketchConstraintTangent", 2)
335 self.checkNbFeatures("SketchConstraintParallel", 1)
336 self.checkNbFeatures("SketchFillet", 0)
338 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.FACE, [0])
339 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.EDGE, [4])
340 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.VERTEX, [8])
342 def test_fillet_with_equal_lines(self):
343 """ Test 8. Fillet on two connected lines in case of Equal constraint applied
345 aSketchLineA = self.mySketch.addLine(10., 10., 20., 10.)
346 aSketchLineB = self.mySketch.addLine(10., 10., 10., 20.)
349 self.mySketch.setCoincident(aSketchLineA.startPoint(), aSketchLineB.startPoint())
353 self.mySketch.setEqual(aSketchLineA.result(), aSketchLineB.result())
357 self.mySketch.setFillet(aSketchLineA.startPoint())
358 self.myDOF += 2 # Equal has been removed
363 self.collectFeatures()
364 self.checkNbFeatures("SketchLine", 2)
365 self.checkNbFeatures("SketchArc", 1)
366 self.checkNbFeatures("SketchConstraintCoincidence", 2)
367 self.checkNbFeatures("SketchConstraintTangent", 2)
368 self.checkNbFeatures("SketchConstraintEqual", 0) # Equal constraint expected to be removed
369 self.checkNbFeatures("SketchFillet", 0)
371 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.FACE, [0])
372 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.EDGE, [3])
373 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.VERTEX, [6])
375 def test_fillet_with_equal_arcs(self):
376 """ Test 9. Fillet on two connected arcs in case of Equal constraint applied
378 aSketchArc1 = self.mySketch.addArc(20., 0., 20., 20., 10., 17.32050807568877293, False)
379 aSketchArc2 = self.mySketch.addArc(20., 34.64101615137754586, 20., 14.64101615137754586, 10., 17.32050807568877293, True)
382 self.mySketch.setCoincident(aSketchArc1.endPoint(), aSketchArc2.endPoint())
386 self.mySketch.setEqual(aSketchArc1.results()[1], aSketchArc2.results()[1])
390 self.mySketch.setFillet(aSketchArc1.endPoint())
391 self.myDOF += 2 # Equal has been removed
396 self.collectFeatures()
397 self.checkNbFeatures("SketchLine", 0)
398 self.checkNbFeatures("SketchArc", 3)
399 self.checkNbFeatures("SketchConstraintCoincidence", 2)
400 self.checkNbFeatures("SketchConstraintTangent", 2)
401 self.checkNbFeatures("SketchConstraintEqual", 0) # Equal constraint expected to be removed
402 self.checkNbFeatures("SketchFillet", 0)
404 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.FACE, [0])
405 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.EDGE, [3])
406 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.VERTEX, [6])
408 def test_fillet_with_length(self):
409 """ Test 10. Fillet on two connected lines in case of Length constraint applied
411 aSketchLineA = self.mySketch.addLine(10., 10., 20., 10.)
412 aSketchLineB = self.mySketch.addLine(10., 10., 10., 20.)
415 self.mySketch.setCoincident(aSketchLineA.startPoint(), aSketchLineB.startPoint())
419 self.mySketch.setLength(aSketchLineA.result(), 15.)
423 self.mySketch.setFillet(aSketchLineA.startPoint())
429 self.collectFeatures()
430 self.checkNbFeatures("SketchLine", 2)
431 self.checkNbFeatures("SketchArc", 1)
432 self.checkNbFeatures("SketchConstraintCoincidence", 2)
433 self.checkNbFeatures("SketchConstraintTangent", 2)
434 self.checkNbFeatures("SketchConstraintLength", 0) # Length constraint expected to be removed
435 self.checkNbFeatures("SketchFillet", 0)
437 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.FACE, [0])
438 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.EDGE, [3])
439 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.VERTEX, [6])
441 def test_fillet_with_radius(self):
442 """ Test 11. Fillet on connected arc and line in case of Radius constraint is applied to arc
444 aSketchLine = self.mySketch.addLine(10., 10., 20., 10.)
445 aSketchArc = self.mySketch.addArc(0., 10., 0., 20., 10., 10., True)
448 self.mySketch.setCoincident(aSketchLine.startPoint(), aSketchArc.endPoint())
452 self.mySketch.setRadius(aSketchArc.results()[1], 12.)
456 self.mySketch.setFillet(aSketchLine.startPoint())
462 self.collectFeatures()
463 self.checkNbFeatures("SketchLine", 1)
464 self.checkNbFeatures("SketchArc", 2)
465 self.checkNbFeatures("SketchConstraintCoincidence", 2)
466 self.checkNbFeatures("SketchConstraintTangent", 2)
467 self.checkNbFeatures("SketchConstraintRadius", 1)
468 self.checkNbFeatures("SketchFillet", 0)
470 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.FACE, [0])
471 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.EDGE, [3])
472 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.VERTEX, [6])
474 def test_fillet_with_distance(self):
475 """ Test 12. Fillet on two connected lines in case of Distance constraint applied
477 aSketchLineA = self.mySketch.addLine(10., 10., 20., 10.)
478 aSketchLineB = self.mySketch.addLine(10., 10., 10., 20.)
481 self.mySketch.setCoincident(aSketchLineA.startPoint(), aSketchLineB.startPoint())
485 # third line to apply Distance constraints
486 aSketchLineC = self.mySketch.addLine(10., 0., 20., 5.)
488 self.mySketch.setDistance(aSketchLineB.startPoint(), aSketchLineC.result(), 10.)
489 self.mySketch.setDistance(aSketchLineB.endPoint(), aSketchLineC.result(), 5.)
493 self.mySketch.setFillet(aSketchLineA.startPoint())
494 self.myDOF += 2 # Distance has been removed
499 self.collectFeatures()
500 self.checkNbFeatures("SketchLine", 3)
501 self.checkNbFeatures("SketchArc", 1)
502 self.checkNbFeatures("SketchConstraintCoincidence", 2)
503 self.checkNbFeatures("SketchConstraintTangent", 2)
504 self.checkNbFeatures("SketchConstraintDistance", 1) # only one Distance should be left
505 self.checkNbFeatures("SketchFillet", 0)
507 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.FACE, [0])
508 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.EDGE, [4])
509 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.VERTEX, [8])
511 def test_fillet_with_fixed_point(self):
512 """ Test 13. Fillet on two connected lines in case of Fixed constraint applied to the fillet point
514 aSketchLineA = self.mySketch.addLine(10., 10., 20., 10.)
515 aSketchLineB = self.mySketch.addLine(10., 10., 10., 20.)
518 self.mySketch.setCoincident(aSketchLineA.startPoint(), aSketchLineB.startPoint())
522 self.mySketch.setFixed(aSketchLineA.startPoint())
526 self.mySketch.setFillet(aSketchLineA.startPoint())
527 self.myDOF += 3 # Fixed constraint has been removed
532 self.collectFeatures()
533 self.checkNbFeatures("SketchLine", 2)
534 self.checkNbFeatures("SketchArc", 1)
535 self.checkNbFeatures("SketchConstraintCoincidence", 2)
536 self.checkNbFeatures("SketchConstraintTangent", 2)
537 self.checkNbFeatures("SketchConstraintFixed", 0) # Fixed constraint expected to be removed
538 self.checkNbFeatures("SketchFillet", 0)
540 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.FACE, [0])
541 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.EDGE, [3])
542 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.VERTEX, [6])
544 def test_fillet_with_fixed_line(self):
545 """ Test 14. Fillet on two connected lines in case of Fixed constraint applied to one of lines
547 aSketchLineA = self.mySketch.addLine(10., 10., 20., 10.)
548 aSketchLineB = self.mySketch.addLine(10., 10., 10., 20.)
551 self.mySketch.setCoincident(aSketchLineA.startPoint(), aSketchLineB.startPoint())
555 self.mySketch.setFixed(aSketchLineA.result())
559 self.mySketch.setFillet(aSketchLineA.startPoint())
565 self.collectFeatures()
566 self.checkNbFeatures("SketchLine", 2)
567 self.checkNbFeatures("SketchArc", 1)
568 self.checkNbFeatures("SketchConstraintCoincidence", 2)
569 self.checkNbFeatures("SketchConstraintTangent", 2)
570 self.checkNbFeatures("SketchConstraintLength", 0) # Fixed constraint expected to be kept
571 self.checkNbFeatures("SketchFillet", 0)
573 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.FACE, [0])
574 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.EDGE, [3])
575 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.VERTEX, [6])
577 def test_fillet_with_angle(self):
578 """ Test 15. Fillet on two connected lines in case of Perpendicular constraint applied
580 aSketchLineA = self.mySketch.addLine(10., 10., 20., 10.)
581 aSketchLineB = self.mySketch.addLine(10., 10., 10., 20.)
584 self.mySketch.setCoincident(aSketchLineA.startPoint(), aSketchLineB.startPoint())
588 self.mySketch.setAngle(aSketchLineA.result(), aSketchLineB.result(), 60.)
592 self.mySketch.setFillet(aSketchLineA.startPoint())
598 self.collectFeatures()
599 self.checkNbFeatures("SketchLine", 2)
600 self.checkNbFeatures("SketchArc", 1)
601 self.checkNbFeatures("SketchConstraintCoincidence", 2)
602 self.checkNbFeatures("SketchConstraintTangent", 2)
603 self.checkNbFeatures("SketchConstraintAngle", 1)
604 self.checkNbFeatures("SketchFillet", 0)
606 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.FACE, [0])
607 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.EDGE, [3])
608 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.VERTEX, [6])
611 if __name__ == '__main__':