Class for managing the Edit mode coin nodes of ViewProviderSketch relating to constraints. More...
#include <EditModeConstraintCoinManager.h>
Public Member Functions | |
EditModeConstraintCoinManager (ViewProviderSketch &vp, DrawingParameters &drawingParams, GeometryLayerParameters &geometryLayerParams, ConstraintParameters &constraintParams, EditModeScenegraphNodes &editModeScenegraph, CoinMapping &coinMap) | |
~EditModeConstraintCoinManager () | |
update coin nodes | |
void | processConstraints (const GeoListFacade &geolistfacade) |
void | updateVirtualSpace () |
void | drawConstraintIcons () |
Draw all constraint icons. More... | |
void | drawConstraintIcons (const GeoListFacade &geolistfacade) |
update coin colors | |
void | updateConstraintColor (const std::vector< Sketcher::Constraint * > &constraints) |
coin nodes creation | |
void | rebuildConstraintNodes (void) |
change constraints selectability | |
void | setConstraintSelectability (bool enabled=true) |
std::set< int > | detectPreselectionConstr (const SoPickedPoint *Point, const SbVec2s &cursorPos) |
SoSeparator * | getConstraintIdSeparator (int i) |
void | createEditModeInventorNodes () |
Class for managing the Edit mode coin nodes of ViewProviderSketch relating to constraints.
To be documented.
|
explicit |
EditModeConstraintCoinManager::~EditModeConstraintCoinManager | ( | ) |
void EditModeConstraintCoinManager::createEditModeInventorNodes | ( | ) |
References SketcherGui::EditModeScenegraphNodes::ConstraintDrawStyle, SketcherGui::EditModeScenegraphNodes::constrGroup, SketcherGui::EditModeScenegraphNodes::constrGrpSelect, SketcherGui::EditModeScenegraphNodes::EditRoot, SketcherGui::DrawingParameters::pixelScalingFactor, and setConstraintSelectability().
std::set< int > EditModeConstraintCoinManager::detectPreselectionConstr | ( | const SoPickedPoint * | Point, |
const SbVec2s & | cursorPos | ||
) |
void EditModeConstraintCoinManager::drawConstraintIcons | ( | ) |
Draw all constraint icons.
Except maybe the radius and lock ones?
References drawConstraintIcons().
Referenced by drawConstraintIcons().
void EditModeConstraintCoinManager::drawConstraintIcons | ( | const GeoListFacade & | geolistfacade | ) |
References SketcherGui::SoZoomTranslation::abPos, Base::Console(), SketcherGui::EditModeScenegraphNodes::constrGroup, Sketcher::Equal, Sketcher::Constraint::First, Sketcher::Constraint::FirstPos, Base::Persistence::getClassTypeId(), Sketcher::GeoListModel< T >::getGeometryFromGeoId(), Sketcher::GeoListModel< T >::getPoint(), Base::Persistence::getTypeId(), Sketcher::Horizontal, Sketcher::Constraint::isInVirtualSpace, Sketcher::Constraint::Name, Sketcher::none, Sketcher::Parallel, Sketcher::Perpendicular, Sketcher::Constraint::Second, Sketcher::Constraint::SecondPos, Sketcher::Symmetric, Sketcher::Tangent, Sketcher::Constraint::Third, Sketcher::Constraint::Type, Sketcher::Vertical, Base::ConsoleSingleton::Warning(), Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
SoSeparator * EditModeConstraintCoinManager::getConstraintIdSeparator | ( | int | i | ) |
void EditModeConstraintCoinManager::processConstraints | ( | const GeoListFacade & | geolistfacade | ) |
References SketcherGui::SoZoomTranslation::abPos, DraftVecUtils::angle(), SketcherGui::SoDatumLabel::ANGLE, Sketcher::Block, Sketcher::Coincident, Base::Console(), SketcherGui::EditModeScenegraphNodes::constrGroup, SketcherGui::SoDatumLabel::datumtype, Sketcher::Diameter, SketcherGui::SoDatumLabel::DIAMETER, Sketcher::Distance, SketcherGui::SoDatumLabel::DISTANCE, Sketcher::DistanceX, SketcherGui::SoDatumLabel::DISTANCEX, Sketcher::DistanceY, SketcherGui::SoDatumLabel::DISTANCEY, Sketcher::Equal, Base::ConsoleSingleton::Error(), Sketcher::Constraint::First, Sketcher::Constraint::FirstPos, Sketcher::GeoListModel< T >::geomlist, Part::GeomConic::getCenter(), Part::GeomArcOfConic::getCenter(), Base::Persistence::getClassTypeId(), Part::GeomBoundedCurve::getEndPoint(), Part::GeomLineSegment::getEndPoint(), Sketcher::GeoListModel< T >::getExternalCount(), Part::GeomArcOfParabola::getFocal(), Part::GeomArcOfParabola::getFocus(), Sketcher::GeoListModel< T >::getGeometryFromGeoId(), Sketcher::GeoListModel< T >::getInternalCount(), Part::GeomArcOfEllipse::getMajorAxisDir(), Part::GeomArcOfHyperbola::getMajorAxisDir(), Part::GeomArcOfEllipse::getMajorRadius(), Part::GeomArcOfHyperbola::getMajorRadius(), Part::GeomArcOfEllipse::getMinorRadius(), Part::GeomArcOfHyperbola::getMinorRadius(), draftgeoutils.geometry::getNormal, Sketcher::GeoListModel< T >::getPoint(), Part::GeomBSplineCurve::getPoles(), Part::GeomCircle::getRadius(), Part::GeomArcOfCircle::getRadius(), Part::GeomArcOfEllipse::getRange(), Part::GeomArcOfHyperbola::getRange(), Part::GeomArcOfParabola::getRange(), Part::GeomBoundedCurve::getStartPoint(), Part::GeomLineSegment::getStartPoint(), Base::Persistence::getTypeId(), Sketcher::Constraint::getValue(), Part::GeomArcOfConic::getXAxisDir(), Sketcher::Horizontal, Sketcher::InternalAlignment, Sketcher::Constraint::LabelDistance, Sketcher::Constraint::LabelPosition, Sketcher::none, Base::Vector3< _Precision >::Normalize(), Sketcher::NumConstraintTypes, Sketcher::Parallel, SketcherGui::SoDatumLabel::param1, SketcherGui::SoDatumLabel::param2, SketcherGui::SoDatumLabel::param3, Sketcher::Perpendicular, SketcherGui::SoDatumLabel::pnts, Sketcher::PointOnObject, Base::Vector3< _Precision >::ProjectToLine(), Sketcher::Radius, SketcherGui::SoDatumLabel::RADIUS, rebuildConstraintNodes(), Base::Vector3< _Precision >::RotateZ(), Sketcher::Constraint::Second, Sketcher::Constraint::SecondPos, Sketcher::SnellsLaw, SketcherGui::SoDatumLabel::string, Sketcher::Symmetric, SketcherGui::SoDatumLabel::SYMMETRIC, Sketcher::Tangent, Sketcher::Constraint::Third, Sketcher::Constraint::ThirdPos, Sketcher::Constraint::Type, updateVirtualSpace(), Sketcher::Vertical, Sketcher::Weight, Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and SketcherGui::DrawingParameters::zConstr.
void EditModeConstraintCoinManager::rebuildConstraintNodes | ( | void | ) |
References rebuildConstraintNodes().
Referenced by processConstraints(), and rebuildConstraintNodes().
void EditModeConstraintCoinManager::setConstraintSelectability | ( | bool | enabled = true | ) |
References SketcherGui::EditModeScenegraphNodes::constrGrpSelect.
Referenced by createEditModeInventorNodes().
void EditModeConstraintCoinManager::updateConstraintColor | ( | const std::vector< Sketcher::Constraint * > & | constraints | ) |
References Sketcher::Constraint::AlignmentType, Sketcher::Angle, Sketcher::BSplineControlPoint, Sketcher::BSplineKnotPoint, Sketcher::Coincident, SketcherGui::GeometryLayerParameters::CoinLayers, SketcherGui::DrawingParameters::ConstrDimColor, SketcherGui::EditModeScenegraphNodes::constrGroup, SketcherGui::EditModeScenegraphNodes::CurvesMaterials, SketcherGui::DrawingParameters::DeactivatedConstrDimColor, Sketcher::Diameter, Sketcher::Distance, Sketcher::DistanceX, Sketcher::DistanceY, Sketcher::EllipseFocus1, Sketcher::EllipseFocus2, Sketcher::EllipseMajorDiameter, Sketcher::EllipseMinorDiameter, SketcherGui::DrawingParameters::ExprBasedConstrDimColor, SketcherGui::MultiFieldId::fieldIndex, Sketcher::Constraint::First, Sketcher::Constraint::FirstPos, SketcherGui::CoinMapping::getIndexLayer(), Sketcher::HyperbolaFocus, Sketcher::HyperbolaMajor, Sketcher::HyperbolaMinor, Sketcher::InternalAlignment, SketcherGui::MultiFieldId::Invalid, Sketcher::Constraint::isActive, Sketcher::Constraint::isDriving, SketcherGui::DrawingParameters::NonDrivingConstrDimColor, Sketcher::none, Sketcher::ParabolaFocus, SketcherGui::EditModeScenegraphNodes::PointsMaterials, SketcherGui::DrawingParameters::PreselectColor, Sketcher::Radius, Sketcher::Constraint::Second, Sketcher::Constraint::SecondPos, SketcherGui::DrawingParameters::SelectColor, Sketcher::Symmetric, Sketcher::Constraint::Type, and Sketcher::Weight.
void EditModeConstraintCoinManager::updateVirtualSpace | ( | ) |
References SketcherGui::EditModeScenegraphNodes::constrGroup, and SmSwitchboard::enable.
Referenced by processConstraints().