--- /dev/null
+import unittest
+import model
+from TestSketcher import SketcherTestCase
+
+class SketcherSetFillet(SketcherTestCase):
+ def runTest(self):
+ l1 = self.sketch.addLine(0, 0, 0, 1)
+ l2 = self.sketch.addLine(0, 1, 1, 1)
+ self.sketch.setCoincident(l1.endPointData(), l2.startPointData())
+ self.sketch.setFillet(l1.result(), l2.result(), 10.0)
+ model.do()
+
+if __name__ == "__main__":
+ unittest.main()
\ No newline at end of file
constraint.data().real("ConstraintValue").setValue(angle)
self._feature.execute()
return constraint
+
+ def setFillet(self, line_1, line_2, radius):
+ """Set a fillet constraint between the 3 given lines with the given
+ filleting radius."""
+ constraint = self._feature.addFeature("SketchConstraintFillet")
+ constraint.data().refattr("ConstraintEntityA").setObject(line_1)
+ constraint.data().refattr("ConstraintEntityB").setObject(line_2)
+ constraint.data().real("ConstraintValue").setValue(radius)
+ self._feature.execute()
+ return constraint
#-------------------------------------------------------------
#
pg.append(ln)
return pg
-
+ #-------------------------------------------------------------
+ #
# Getters
+ #
+ #-------------------------------------------------------------
def selectFace(self, *args):
"""Select the geometrical entities of this Sketch on which
When no entity is given, the face is based on all existing
geometry of this Sketch.
"""
- #self.resultype ="Face"
- if len(args) == 0:
+ if len(args) == 0:
self._selection = modelAPI_ResultConstruction(
self._feature.firstResult()).shape()
elif len(args) == 1: