DrawSketchHandler: Functions to draw cursor position and direction
This commit is contained in:
@@ -929,6 +929,21 @@ void DrawSketchHandler::drawEdit(const std::vector<Part::Geometry *> &geometries
|
||||
drawEdit(list);
|
||||
}
|
||||
|
||||
void DrawSketchHandler::drawPositionAtCursor(const Base::Vector2d & position)
|
||||
{
|
||||
setPositionText(position);
|
||||
}
|
||||
|
||||
void DrawSketchHandler::drawDirectionAtCursor(const Base::Vector2d & position, const Base::Vector2d & origin)
|
||||
{
|
||||
float length = (position - origin).Length();
|
||||
float angle = (position - origin).GetAngle(Base::Vector2d(1.f,0.f));
|
||||
|
||||
SbString text;
|
||||
text.sprintf(" (%.1f,%.1fdeg)", length, angle * 180 / M_PI);
|
||||
setPositionText(position, text);
|
||||
}
|
||||
|
||||
void DrawSketchHandler::drawEditMarkers(const std::vector<Base::Vector2d> &EditMarkers, unsigned int augmentationlevel)
|
||||
{
|
||||
ViewProviderSketchDrawSketchHandlerAttorney::drawEditMarkers(*sketchgui, EditMarkers, augmentationlevel);
|
||||
|
||||
@@ -176,6 +176,9 @@ protected:
|
||||
void drawEditMarkers(const std::vector<Base::Vector2d> &EditMarkers, unsigned int augmentationlevel = 0);
|
||||
void setAxisPickStyle(bool on);
|
||||
|
||||
void drawPositionAtCursor(const Base::Vector2d & position);
|
||||
void drawDirectionAtCursor(const Base::Vector2d & position, const Base::Vector2d & origin);
|
||||
|
||||
int getPreselectPoint(void) const;
|
||||
int getPreselectCurve(void) const;
|
||||
int getPreselectCross(void) const;
|
||||
|
||||
Reference in New Issue
Block a user