From cf0c9ff8e26ae1b26b510d9da71b24f8aab00b18 Mon Sep 17 00:00:00 2001 From: Renaud NEDELEC Date: Thu, 22 Oct 2015 11:44:30 +0200 Subject: [PATCH] [PythonAPI / sketcher] added setTangent method and fixed a small bug --- src/PythonAPI/model/sketcher/sketch.py | 9 +++++++++ src/SketchPlugin/plugin-Sketch.xml | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) 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 @@ - + -- 2.39.2