]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
[PythonAPI / sketcher] added setTangent method and fixed a small bug
authorRenaud NEDELEC <renaud.nedelec@opencascade.com>
Thu, 22 Oct 2015 09:44:30 +0000 (11:44 +0200)
committerRenaud NEDELEC <renaud.nedelec@opencascade.com>
Thu, 22 Oct 2015 09:44:30 +0000 (11:44 +0200)
src/PythonAPI/model/sketcher/sketch.py
src/SketchPlugin/plugin-Sketch.xml

index a5a909d4f3007ef9158be1bd08c031979dd98b70..f80c78ddfd7f36a577f34dc3d183ffa3d96d2dbd 100644 (file)
@@ -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."""
index 3a926c248a25e25499ac8ccdf458740f40a43970..1e3c29cd7b47b07ddfa70d722986caecb9f597f6 100644 (file)
@@ -18,7 +18,7 @@
       <!--icon=":pictures/x_point.png"-->
       </feature>
       <feature id="SketchPoint" title="Point" tooltip="Create point" icon=":icons/point.png">
-        <sketch-2dpoint_selector id="PointCoordindates" title="Point" tooltip="Point coordinates"/>
+        <sketch-2dpoint_selector id="PointCoordinates" title="Point" tooltip="Point coordinates"/>
         <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
       </feature>
       <feature id="SketchLine" title="Line" tooltip="Create line" icon=":icons/line.png">