if (!anAIS) {
anAIS = SketcherPrs_Factory::lengthDimensionConstraint(this, sketch()->coordinatePlane());
}
+ std::vector<int> aRGB = Config_PropManager::color("Visualization", "sketch_dimension_color",
+ SKETCH_DIMENSION_COLOR);
+ anAIS->setColor(aRGB[0], aRGB[1], aRGB[2]);
return anAIS;
}
}
}
-bool SketchPlugin_ConstraintDistance::customisePresentation(ResultPtr theResult,
- AISObjectPtr thePrs,
- std::shared_ptr<GeomAPI_ICustomPrs> theDefaultPrs)
-{
- bool isCustomized = false;
- std::vector<int> aRGB = Config_PropManager::color("Visualization", "sketch_dimension_color",
- SKETCH_DIMENSION_COLOR);
- isCustomized = thePrs->setColor(aRGB[0], aRGB[1], aRGB[2]);
-
- return isCustomized;
-}
-
* This constraint has three attributes:
* SketchPlugin_Constraint::VALUE(), SketchPlugin_Constraint::ENTITY_A() and SketchPlugin_Constraint::ENTITY_B()
*/
-class SketchPlugin_ConstraintDistance : public SketchPlugin_ConstraintBase, public GeomAPI_ICustomPrs
+class SketchPlugin_ConstraintDistance : public SketchPlugin_ConstraintBase
{
public:
/// Distance constraint kind
/// Returns the current distance between the feature attributes
double calculateCurrentDistance();
- /// Customize presentation of the feature
- virtual bool customisePresentation(ResultPtr theResult, AISObjectPtr thePrs,
- std::shared_ptr<GeomAPI_ICustomPrs> theDefaultPrs);
-
/// \brief Use plugin manager for features creation
SketchPlugin_ConstraintDistance();
if (!anAIS) {
anAIS = SketcherPrs_Factory::lengthDimensionConstraint(this, sketch()->coordinatePlane());
}
+ std::vector<int> aRGB = Config_PropManager::color("Visualization", "sketch_dimension_color",
+ SKETCH_DIMENSION_COLOR);
+ anAIS->setColor(aRGB[0], aRGB[1], aRGB[2]);
return anAIS;
}
myFlyoutUpdate = false;
}
}
-
-bool SketchPlugin_ConstraintLength::customisePresentation(ResultPtr theResult,
- AISObjectPtr thePrs,
- std::shared_ptr<GeomAPI_ICustomPrs> theDefaultPrs)
-{
- bool isCustomized = false;
- std::vector<int> aRGB = Config_PropManager::color("Visualization", "sketch_dimension_color",
- SKETCH_DIMENSION_COLOR);
- isCustomized = thePrs->setColor(aRGB[0], aRGB[1], aRGB[2]);
-
- return isCustomized;
-}
* SketchPlugin_Constraint::VALUE() (length) and SketchPlugin_Constraint::ENTITY_A() (segment),
* SketchPlugin_Constraint::FLYOUT_VALUE_PNT() (distance of a constraints handle)
*/
-class SketchPlugin_ConstraintLength : public SketchPlugin_ConstraintBase, public GeomAPI_ICustomPrs
+class SketchPlugin_ConstraintLength : public SketchPlugin_ConstraintBase
{
public:
/// Length constraint kind
/// \param theID identifier of changed attribute
SKETCHPLUGIN_EXPORT virtual void attributeChanged(const std::string& theID);
- /// Customize presentation of the feature
- virtual bool customisePresentation(ResultPtr theResult, AISObjectPtr thePrs,
- std::shared_ptr<GeomAPI_ICustomPrs> theDefaultPrs);
-
/// \brief Use plugin manager for features creation
SketchPlugin_ConstraintLength();