+# Copyright (C) 2014-2023 CEA, EDF
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
"""
TestConstraintEqual.py
Unit test of SketchPlugin_ConstraintEqual class
-
+
SketchPlugin_ConstraintEqual
static const std::string MY_CONSTRAINT_EQAUL_ID("SketchConstraintEqual");
data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
anExtCircleRadius = anExtCircle.real("circle_radius")
anExtCircleCenter.setValue(-50., 50.)
anExtCircleRadius.setValue(10.)
-anExtCircle.selection("External").selectSubShape("EDGE", "Sketch_1/Edge-SketchCircle_1_2")
+anExtCircle.selection("External").selectSubShape("EDGE", "Sketch_1/SketchCircle_1_2")
aSession.finishOperation()
assert (model.dof(aSketchFeature) == 7)
aSession.startOperation()
anExtLineEnd = geomDataAPI_Point2D(anExtLine.attribute("EndPoint"))
anExtLineStart.setValue(-40., 35.)
anExtLineEnd.setValue(-60., 25.)
-anExtLine.selection("External").selectSubShape("EDGE", "Sketch_1/Edge-SketchLine_1")
+anExtLine.selection("External").selectSubShape("EDGE", "Sketch_1/SketchLine_1")
anExtLineLen = lineLength(anExtLine)
aSession.finishOperation()
assert (model.dof(aSketchFeature) == 13)