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 = 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)
57 def distancePointLine(thePoint, theLine):
58 aLineStart = geomDataAPI_Point2D(theLine.attribute("StartPoint"))
59 aLineEnd = geomDataAPI_Point2D(theLine.attribute("EndPoint"))
60 aLength = model.distancePointPoint(aLineStart, aLineEnd)
61 aDir1x, aDir1y = aLineEnd.x() - aLineStart.x(), aLineEnd.y() - aLineStart.y()
62 aDir2x, aDir2y = thePoint.x() - aLineStart.x(), thePoint.y() - aLineStart.y()
63 aCross = aDir1x * aDir2y - aDir1y * aDir2x
64 return math.fabs(aCross) / aLength
68 class TestFilletInteracting(unittest.TestCase):
71 self.myDocument = model.moduleDocument()
72 self.mySketch = model.addSketch(self.myDocument, model.defaultPlane("XOY"))
73 self.myTolerance = 1.e-6
78 self.assertTrue(model.checkPythonDump())
83 self.assertEqual(model.dof(self.mySketch), self.myDOF)
85 def collectFeatures(self):
87 for aSubObj in self.mySketch.features().list():
88 aFeature = ModelAPI.ModelAPI_Feature.feature(aSubObj)
89 if aFeature is not None:
90 if self.myFeatures.get(aFeature.getKind()) == None:
91 self.myFeatures[aFeature.getKind()] = 1
93 self.myFeatures[aFeature.getKind()] += 1
95 def checkNbFeatures(self, theFeatureKind, theFeatureCount):
96 if theFeatureCount == 0:
97 self.assertIsNone(self.myFeatures.get(theFeatureKind))
99 self.assertIsNotNone(self.myFeatures.get(theFeatureKind), "No features of kind {0} but expected {1}".format(theFeatureKind, theFeatureCount))
100 self.assertEqual(self.myFeatures[theFeatureKind], theFeatureCount, "Observed number of {0} is {1} but expected {2}".format(theFeatureKind, self.myFeatures[theFeatureKind], theFeatureCount))
102 def checkFillet(self):
103 aPtPtCoincidences = self.getCoincidences()
104 for coinc in aPtPtCoincidences:
105 aConnectedFeatures = self.connectedFeatures(coinc)
106 self.assertEqual(len(aConnectedFeatures), 2)
107 if aConnectedFeatures[0].getKind() == "SketchArc":
108 if aConnectedFeatures[1].getKind() == "SketchArc":
109 self.assertTrue(isArcArcSmooth(aConnectedFeatures[0], aConnectedFeatures[1], self.myTolerance))
110 elif aConnectedFeatures[1].getKind() == "SketchLine":
111 self.assertTrue(isArcLineSmooth(aConnectedFeatures[0], aConnectedFeatures[1], self.myTolerance))
112 elif aConnectedFeatures[0].getKind() == "SketchLine" and aConnectedFeatures[1].getKind() == "SketchArc":
113 self.assertTrue(isArcLineSmooth(aConnectedFeatures[1], aConnectedFeatures[0], self.myTolerance))
115 def getCoincidences(self):
117 for aSubObj in self.mySketch.features().list():
118 aSubFeature = ModelAPI.ModelAPI_Feature.feature(aSubObj)
119 if aSubFeature is not None and aSubFeature.getKind() == "SketchConstraintCoincidence":
120 anEntityA = aSubFeature.refattr("ConstraintEntityA")
121 anEntityB = aSubFeature.refattr("ConstraintEntityB")
122 if not anEntityA.isObject() and not anEntityB.isObject():
123 aCoincidences.append(aSubFeature)
126 def connectedFeatures(self, theCoincidence):
127 anEntityA = theCoincidence.refattr("ConstraintEntityA")
128 anEntityB = theCoincidence.refattr("ConstraintEntityB")
129 aFeatureA = ModelAPI.ModelAPI_Feature.feature(anEntityA.attr().owner())
130 aFeatureB = ModelAPI.ModelAPI_Feature.feature(anEntityB.attr().owner())
131 return [aFeatureA, aFeatureB]
134 def test_fillet_two_lines(self):
135 """ Test 1. Fillet on two connected lines
137 aSketchLineA = self.mySketch.addLine(10., 10., 20., 10.)
138 aSketchLineB = self.mySketch.addLine(10., 10., 10., 20.)
141 self.mySketch.setCoincident(aSketchLineA.startPoint(), aSketchLineB.startPoint())
145 self.mySketch.setFillet(aSketchLineA.startPoint())
151 self.collectFeatures()
152 self.checkNbFeatures("SketchLine", 2)
153 self.checkNbFeatures("SketchArc", 1)
154 self.checkNbFeatures("SketchConstraintCoincidence", 2)
155 self.checkNbFeatures("SketchConstraintTangent", 2)
156 self.checkNbFeatures("SketchFillet", 0)
158 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.FACE, [0])
159 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.EDGE, [3])
160 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.VERTEX, [6])
162 def test_wrong_fillet_two_lines(self):
163 """ Test 2. Check the fillet is wrong on two connected lines when selecting incorrect point
165 aSketchLineA = self.mySketch.addLine(10., 10., 20., 10.)
166 aSketchLineB = self.mySketch.addLine(10., 10., 10., 20.)
169 self.mySketch.setCoincident(aSketchLineA.startPoint(), aSketchLineB.startPoint())
173 aFillet = self.mySketch.setFillet(aSketchLineA.endPoint())
177 self.collectFeatures()
178 self.checkNbFeatures("SketchLine", 2)
179 self.checkNbFeatures("SketchArc", 0) # no arcs should be created
180 self.checkNbFeatures("SketchConstraintCoincidence", 1) # number of coincidences should not change
181 self.checkNbFeatures("SketchConstraintTangent", 0) # no tangencies should not be created
182 self.checkNbFeatures("SketchFillet", 1) # fillet feature should still exist. it should be wrong
184 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.FACE, [0])
185 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.EDGE, [2])
186 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.VERTEX, [4])
188 # remove fillet for correct python dump
189 self.myDocument.removeFeature(aFillet.feature())
191 def test_fillet_arc_line(self):
192 """ Test 3. Fillet on connected arc and line
194 aSketchLine = self.mySketch.addLine(10., 10., 20., 10.)
195 aSketchArc = self.mySketch.addArc(20., 10., 20., 20., 10., 10., False)
198 self.mySketch.setCoincident(aSketchLine.startPoint(), aSketchArc.endPoint())
202 self.mySketch.setFillet(aSketchLine.startPoint())
208 self.collectFeatures()
209 self.checkNbFeatures("SketchLine", 1)
210 self.checkNbFeatures("SketchArc", 2)
211 self.checkNbFeatures("SketchConstraintCoincidence", 2)
212 self.checkNbFeatures("SketchConstraintTangent", 2)
213 self.checkNbFeatures("SketchFillet", 0)
215 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.FACE, [0])
216 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.EDGE, [3])
217 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.VERTEX, [6])
219 def test_fillet_two_arcs(self):
220 """ Test 4. Fillet on two connected arcs
222 aSketchArc1 = self.mySketch.addArc(20., 0., 20., 20., 10., 17.32050807568877293, False)
223 aSketchArc2 = self.mySketch.addArc(20., 34.64101615137754586, 20., 14.64101615137754586, 10., 17.32050807568877293, True)
226 self.mySketch.setCoincident(aSketchArc1.endPoint(), aSketchArc2.endPoint())
230 self.mySketch.setFillet(aSketchArc1.endPoint())
236 self.collectFeatures()
237 self.checkNbFeatures("SketchLine", 0)
238 self.checkNbFeatures("SketchArc", 3)
239 self.checkNbFeatures("SketchConstraintCoincidence", 2)
240 self.checkNbFeatures("SketchConstraintTangent", 2)
241 self.checkNbFeatures("SketchFillet", 0)
243 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.FACE, [0])
244 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.EDGE, [3])
245 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.VERTEX, [6])
247 def test_fillet_with_horizontal_vertical(self):
248 """ Test 5. Fillet on two connected lines in case of Horizontal or Vertical constraints applied
250 aSketchLineA = self.mySketch.addLine(10., 10., 20., 10.)
251 aSketchLineB = self.mySketch.addLine(10., 10., 10., 20.)
254 self.mySketch.setCoincident(aSketchLineA.startPoint(), aSketchLineB.startPoint())
258 self.mySketch.setHorizontal(aSketchLineA.result())
259 self.mySketch.setVertical(aSketchLineB.result())
263 self.mySketch.setFillet(aSketchLineA.startPoint())
269 self.collectFeatures()
270 self.checkNbFeatures("SketchLine", 2)
271 self.checkNbFeatures("SketchArc", 1)
272 self.checkNbFeatures("SketchConstraintCoincidence", 2)
273 self.checkNbFeatures("SketchConstraintTangent", 2)
274 self.checkNbFeatures("SketchConstraintHorizontal", 1)
275 self.checkNbFeatures("SketchConstraintVertical", 1)
276 self.checkNbFeatures("SketchFillet", 0)
278 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.FACE, [0])
279 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.EDGE, [3])
280 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.VERTEX, [6])
282 def test_fillet_with_orthogonal(self):
283 """ Test 6. Fillet on two connected lines in case of Perpendicular constraint applied
285 aSketchLineA = self.mySketch.addLine(10., 10., 20., 10.)
286 aSketchLineB = self.mySketch.addLine(10., 10., 10., 20.)
289 self.mySketch.setCoincident(aSketchLineA.startPoint(), aSketchLineB.startPoint())
293 self.mySketch.setPerpendicular(aSketchLineA.result(), aSketchLineB.result())
297 self.mySketch.setFillet(aSketchLineA.startPoint())
303 self.collectFeatures()
304 self.checkNbFeatures("SketchLine", 2)
305 self.checkNbFeatures("SketchArc", 1)
306 self.checkNbFeatures("SketchConstraintCoincidence", 2)
307 self.checkNbFeatures("SketchConstraintTangent", 2)
308 self.checkNbFeatures("SketchConstraintPerpendicular", 1)
309 self.checkNbFeatures("SketchFillet", 0)
311 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.FACE, [0])
312 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.EDGE, [3])
313 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.VERTEX, [6])
315 def test_fillet_with_parallel(self):
316 """ Test 7. Fillet on two connected lines in case of Parallel constraint applied
318 aSketchLineA = self.mySketch.addLine(10., 10., 20., 10.)
319 aSketchLineB = self.mySketch.addLine(10., 10., 10., 20.)
322 self.mySketch.setCoincident(aSketchLineA.startPoint(), aSketchLineB.startPoint())
326 # third line to apply parallel constraint
327 aSketchLineC = self.mySketch.addLine(10., 0., 20., 5.)
329 self.mySketch.setParallel(aSketchLineB.result(), aSketchLineC.result())
333 self.mySketch.setFillet(aSketchLineA.startPoint())
339 self.collectFeatures()
340 self.checkNbFeatures("SketchLine", 3)
341 self.checkNbFeatures("SketchArc", 1)
342 self.checkNbFeatures("SketchConstraintCoincidence", 2)
343 self.checkNbFeatures("SketchConstraintTangent", 2)
344 self.checkNbFeatures("SketchConstraintParallel", 1)
345 self.checkNbFeatures("SketchFillet", 0)
347 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.FACE, [0])
348 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.EDGE, [4])
349 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.VERTEX, [8])
351 def test_fillet_with_equal_lines(self):
352 """ Test 8. Fillet on two connected lines in case of Equal constraint applied
354 aSketchLineA = self.mySketch.addLine(10., 10., 20., 10.)
355 aSketchLineB = self.mySketch.addLine(10., 10., 10., 20.)
358 self.mySketch.setCoincident(aSketchLineA.startPoint(), aSketchLineB.startPoint())
362 self.mySketch.setEqual(aSketchLineA.result(), aSketchLineB.result())
366 self.mySketch.setFillet(aSketchLineA.startPoint())
367 self.myDOF += 2 # Equal has been removed
372 self.collectFeatures()
373 self.checkNbFeatures("SketchLine", 2)
374 self.checkNbFeatures("SketchArc", 1)
375 self.checkNbFeatures("SketchConstraintCoincidence", 2)
376 self.checkNbFeatures("SketchConstraintTangent", 2)
377 self.checkNbFeatures("SketchConstraintEqual", 0) # Equal constraint expected to be removed
378 self.checkNbFeatures("SketchFillet", 0)
380 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.FACE, [0])
381 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.EDGE, [3])
382 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.VERTEX, [6])
384 def test_fillet_with_equal_arcs(self):
385 """ Test 9. Fillet on two connected arcs in case of Equal constraint applied
387 aSketchArc1 = self.mySketch.addArc(20., 0., 20., 20., 10., 17.32050807568877293, False)
388 aSketchArc2 = self.mySketch.addArc(20., 34.64101615137754586, 20., 14.64101615137754586, 10., 17.32050807568877293, True)
391 self.mySketch.setCoincident(aSketchArc1.endPoint(), aSketchArc2.endPoint())
395 self.mySketch.setEqual(aSketchArc1.results()[1], aSketchArc2.results()[1])
399 self.mySketch.setFillet(aSketchArc1.endPoint())
400 self.myDOF += 2 # Equal has been removed
405 self.collectFeatures()
406 self.checkNbFeatures("SketchLine", 0)
407 self.checkNbFeatures("SketchArc", 3)
408 self.checkNbFeatures("SketchConstraintCoincidence", 2)
409 self.checkNbFeatures("SketchConstraintTangent", 2)
410 self.checkNbFeatures("SketchConstraintEqual", 0) # Equal constraint expected to be removed
411 self.checkNbFeatures("SketchFillet", 0)
413 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.FACE, [0])
414 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.EDGE, [3])
415 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.VERTEX, [6])
417 def test_fillet_with_length(self):
418 """ Test 10. Fillet on two connected lines in case of Length constraint applied
420 aSketchLineA = self.mySketch.addLine(10., 10., 20., 10.)
421 aSketchLineB = self.mySketch.addLine(10., 10., 10., 20.)
424 self.mySketch.setCoincident(aSketchLineA.startPoint(), aSketchLineB.startPoint())
428 self.mySketch.setLength(aSketchLineA.result(), 15.)
432 self.mySketch.setFillet(aSketchLineA.startPoint())
438 self.collectFeatures()
439 self.checkNbFeatures("SketchLine", 2)
440 self.checkNbFeatures("SketchArc", 1)
441 self.checkNbFeatures("SketchConstraintCoincidence", 2)
442 self.checkNbFeatures("SketchConstraintTangent", 2)
443 self.checkNbFeatures("SketchConstraintLength", 0) # Length constraint expected to be removed
444 self.checkNbFeatures("SketchFillet", 0)
446 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.FACE, [0])
447 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.EDGE, [3])
448 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.VERTEX, [6])
450 def test_fillet_with_radius(self):
451 """ Test 11. Fillet on connected arc and line in case of Radius constraint is applied to arc
453 aSketchLine = self.mySketch.addLine(10., 10., 20., 10.)
454 aSketchArc = self.mySketch.addArc(0., 10., 0., 20., 10., 10., True)
457 self.mySketch.setCoincident(aSketchLine.startPoint(), aSketchArc.endPoint())
461 self.mySketch.setRadius(aSketchArc.results()[1], 12.)
465 self.mySketch.setFillet(aSketchLine.startPoint())
471 self.collectFeatures()
472 self.checkNbFeatures("SketchLine", 1)
473 self.checkNbFeatures("SketchArc", 2)
474 self.checkNbFeatures("SketchConstraintCoincidence", 2)
475 self.checkNbFeatures("SketchConstraintTangent", 2)
476 self.checkNbFeatures("SketchConstraintRadius", 1)
477 self.checkNbFeatures("SketchFillet", 0)
479 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.FACE, [0])
480 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.EDGE, [3])
481 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.VERTEX, [6])
483 def test_fillet_with_distance(self):
484 """ Test 12. Fillet on two connected lines in case of Distance constraint applied
486 aSketchLineA = self.mySketch.addLine(10., 10., 20., 10.)
487 aSketchLineB = self.mySketch.addLine(10., 10., 10., 20.)
490 self.mySketch.setCoincident(aSketchLineA.startPoint(), aSketchLineB.startPoint())
494 # third line to apply Distance constraints
495 aSketchLineC = self.mySketch.addLine(10., 0., 20., 5.)
497 self.mySketch.setDistance(aSketchLineB.startPoint(), aSketchLineC.result(), 10.)
498 self.mySketch.setDistance(aSketchLineB.endPoint(), aSketchLineC.result(), 5.)
502 self.mySketch.setFillet(aSketchLineA.startPoint())
503 self.myDOF += 2 # Distance has been removed
508 self.collectFeatures()
509 self.checkNbFeatures("SketchLine", 3)
510 self.checkNbFeatures("SketchArc", 1)
511 self.checkNbFeatures("SketchConstraintCoincidence", 2)
512 self.checkNbFeatures("SketchConstraintTangent", 2)
513 self.checkNbFeatures("SketchConstraintDistance", 1) # only one Distance should be left
514 self.checkNbFeatures("SketchFillet", 0)
516 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.FACE, [0])
517 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.EDGE, [4])
518 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.VERTEX, [8])
520 def test_fillet_with_fixed_point(self):
521 """ Test 13. Fillet on two connected lines in case of Fixed constraint applied to the fillet point
523 aSketchLineA = self.mySketch.addLine(10., 10., 20., 10.)
524 aSketchLineB = self.mySketch.addLine(10., 10., 10., 20.)
527 self.mySketch.setCoincident(aSketchLineA.startPoint(), aSketchLineB.startPoint())
531 self.mySketch.setFixed(aSketchLineA.startPoint())
535 self.mySketch.setFillet(aSketchLineA.startPoint())
536 self.myDOF += 3 # Fixed constraint has been removed
541 self.collectFeatures()
542 self.checkNbFeatures("SketchLine", 2)
543 self.checkNbFeatures("SketchArc", 1)
544 self.checkNbFeatures("SketchConstraintCoincidence", 2)
545 self.checkNbFeatures("SketchConstraintTangent", 2)
546 self.checkNbFeatures("SketchConstraintFixed", 0) # Fixed constraint expected to be removed
547 self.checkNbFeatures("SketchFillet", 0)
549 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.FACE, [0])
550 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.EDGE, [3])
551 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.VERTEX, [6])
553 def test_fillet_with_fixed_line(self):
554 """ Test 14. Fillet on two connected lines in case of Fixed constraint applied to one of lines
556 aSketchLineA = self.mySketch.addLine(10., 10., 20., 10.)
557 aSketchLineB = self.mySketch.addLine(10., 10., 10., 20.)
560 self.mySketch.setCoincident(aSketchLineA.startPoint(), aSketchLineB.startPoint())
564 self.mySketch.setFixed(aSketchLineA.result())
568 self.mySketch.setFillet(aSketchLineA.startPoint())
574 self.collectFeatures()
575 self.checkNbFeatures("SketchLine", 2)
576 self.checkNbFeatures("SketchArc", 1)
577 self.checkNbFeatures("SketchConstraintCoincidence", 2)
578 self.checkNbFeatures("SketchConstraintTangent", 2)
579 self.checkNbFeatures("SketchConstraintLength", 0) # Fixed constraint expected to be kept
580 self.checkNbFeatures("SketchFillet", 0)
582 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.FACE, [0])
583 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.EDGE, [3])
584 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.VERTEX, [6])
586 def test_fillet_with_angle(self):
587 """ Test 15. Fillet on two connected lines in case of Perpendicular constraint applied
589 aSketchLineA = self.mySketch.addLine(10., 10., 20., 10.)
590 aSketchLineB = self.mySketch.addLine(10., 10., 10., 20.)
593 self.mySketch.setCoincident(aSketchLineA.startPoint(), aSketchLineB.startPoint())
597 self.mySketch.setAngle(aSketchLineA.result(), aSketchLineB.result(), 60.)
601 self.mySketch.setFillet(aSketchLineA.startPoint())
607 self.collectFeatures()
608 self.checkNbFeatures("SketchLine", 2)
609 self.checkNbFeatures("SketchArc", 1)
610 self.checkNbFeatures("SketchConstraintCoincidence", 2)
611 self.checkNbFeatures("SketchConstraintTangent", 2)
612 self.checkNbFeatures("SketchConstraintAngle", 1)
613 self.checkNbFeatures("SketchFillet", 0)
615 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.FACE, [0])
616 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.EDGE, [3])
617 model.testNbSubShapes(self.mySketch, GeomAPI_Shape.VERTEX, [6])
620 if __name__ == '__main__':