From: Renaud NEDELEC Date: Thu, 22 Oct 2015 09:44:30 +0000 (+0200) Subject: [PythonAPI / sketcher] added setTangent method and fixed a small bug X-Git-Tag: V_2.1.0~206^2~80 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cf0c9ff8e26ae1b26b510d9da71b24f8aab00b18;p=modules%2Fshaper.git [PythonAPI / sketcher] added setTangent method and fixed a small bug --- diff --git a/src/PythonAPI/model/sketcher/sketch.py b/src/PythonAPI/model/sketcher/sketch.py index a5a909d4f..f80c78ddf 100644 --- a/src/PythonAPI/model/sketcher/sketch.py +++ b/src/PythonAPI/model/sketcher/sketch.py @@ -188,6 +188,15 @@ class Sketch(): self._feature.execute() return constraint + def setTangent(self, object_1, object_2): + """Set a tangential continuity between two objects + at their coincidence point.""" + constraint = self._feature.addFeature("SketchConstraintTangent") + constraint.data().refattr("ConstraintEntityA").setObject(object_1) + constraint.data().refattr("ConstraintEntityB").setObject(object_2) + 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.""" diff --git a/src/SketchPlugin/plugin-Sketch.xml b/src/SketchPlugin/plugin-Sketch.xml index 3a926c248..1e3c29cd7 100644 --- a/src/SketchPlugin/plugin-Sketch.xml +++ b/src/SketchPlugin/plugin-Sketch.xml @@ -18,7 +18,7 @@ - +