static const int AIS_DEFAULT_WIDTH = 2;
+//#define DEBUG_HIDE_COPY_ATTRIBUTE
+
+#ifdef DEBUG_HIDE_COPY_ATTRIBUTE
+#include <ModelAPI_AttributeBoolean.h>
+#include <SketchPlugin_SketchEntity.h>
+#endif
+
IMPLEMENT_STANDARD_HANDLE(PartSet_OperationPrs, ViewerData_AISShape);
IMPLEMENT_STANDARD_RTTIEXT(PartSet_OperationPrs, ViewerData_AISShape);
}
return;
}
+#ifdef DEBUG_HIDE_COPY_ATTRIBUTE
+ else {
+ FeaturePtr aFeature = ModelAPI_Feature::feature(theObject);
+ if (aFeature.get()) {
+ AttributeBooleanPtr aCopyAttr = aFeature->data()->boolean(SketchPlugin_SketchEntity::COPY_ID());
+ if (aCopyAttr.get()) {
+ bool isCopy = aCopyAttr->value();
+ if (isCopy)
+ return;
+ }
+ }
+ }
+#endif
}
-
GeomShapePtr aShape = theShape;
if (!aShape.get()) {
ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(theObject);
int aNbB = anAttrB->size();
aReadyToDisplay = aNbB > 0;
+
+#ifdef DEBUG_HIDE_COPY_ATTRIBUTE
+ // additional check
+ if (theConstraint->getKind() == SketchPlugin_MultiTranslation::ID()) {
+ // If it is translation
+ AttributePoint2DPtr aStart = GeomDataAPI_Point2D::getPoint2D(aData,
+ SketchPlugin_MultiTranslation::START_POINT_ID());
+ AttributePoint2DPtr aEnd = GeomDataAPI_Point2D::getPoint2D(aData,
+ SketchPlugin_MultiTranslation::END_POINT_ID());
+
+ aReadyToDisplay = aStart.get() && aEnd.get() && aStart->isInitialized() && aEnd->isInitialized();
+ }
+ else if (theConstraint->getKind() == SketchPlugin_MultiRotation::ID()) {
+ // if it is rotation
+ AttributePoint2DPtr aCenter = GeomDataAPI_Point2D::getPoint2D(aData, SketchPlugin_MultiRotation::CENTER_ID());
+ aReadyToDisplay = aCenter.get() && aCenter->isInitialized();
+ }
+#endif
return aReadyToDisplay;
}