Salome HOME
Issue #2082 Sketch multiple rotation does not work as expected: debug information
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintRigid.cpp
index 8867e16d55932720530b9e6e0ea9dde72eeb88b6..fe5453aa4e8dd0bb2a6d5b76c85f1ea07d9034d8 100644 (file)
@@ -33,21 +33,5 @@ AISObjectPtr SketchPlugin_ConstraintRigid::getAISObject(AISObjectPtr thePrevious
 {
   if (!sketch())
     return thePrevious;
-
-  AISObjectPtr anAIS = thePrevious;
-  if (anAIS.get() == NULL) {
-    std::shared_ptr<ModelAPI_Data> aData = data();
-    std::shared_ptr<ModelAPI_AttributeRefAttr> anAttr = 
-      std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(aData->attribute(SketchPlugin_Constraint::ENTITY_A()));
-    ObjectPtr aObj = anAttr->object();
-    if (aObj.get() != NULL) {
-      FeaturePtr aFeature = ModelAPI_Feature::feature(aObj);
-      std::shared_ptr<SketchPlugin_Feature> aSkFea = 
-        std::dynamic_pointer_cast<SketchPlugin_Feature>(aFeature);
-      if (!aSkFea->isExternal()) 
-        anAIS = SketcherPrs_Factory::rigidConstraint(this, sketch()->coordinatePlane());
-    }
-  }
-
-  return anAIS;
+  return SketcherPrs_Factory::rigidConstraint(this, sketch()->coordinatePlane(), thePrevious);
 }
\ No newline at end of file