Salome HOME
Fix for crash in Object Browser when object was deleted but message not sent
[modules/shaper.git] / src / SketchPlugin / Test / TestConstraintEqual.py
index 09f8f076d4207e3cdb5c4308541c411b1f5da69b..751be751d52cb044582b19631421e81483301b43 100644 (file)
@@ -4,8 +4,8 @@
         
     SketchPlugin_ConstraintEqual
         static const std::string MY_CONSTRAINT_EQAUL_ID("SketchConstraintEqual");
-        data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::type());
-        data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::type());
+        data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
+        data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
 
 """
 from GeomDataAPI import *
@@ -24,13 +24,11 @@ aDocument = aSession.moduleDocument()
 #=========================================================================
 aSession.startOperation()
 aSketchCommonFeature = aDocument.addFeature("Sketch")
-aSketchFeature = modelAPI_CompositeFeature(aSketchCommonFeature)
+aSketchFeature = featureToCompositeFeature(aSketchCommonFeature)
 origin = geomDataAPI_Point(aSketchFeature.attribute("Origin"))
 origin.setValue(0, 0, 0)
 dirx = geomDataAPI_Dir(aSketchFeature.attribute("DirX"))
 dirx.setValue(1, 0, 0)
-diry = geomDataAPI_Dir(aSketchFeature.attribute("DirY"))
-diry.setValue(0, 1, 0)
 norm = geomDataAPI_Dir(aSketchFeature.attribute("Norm"))
 norm.setValue(0, 0, 1)
 aSession.finishOperation()