TechDraw: Enable setting a custom direction. Fixes #5821
This commit is contained in:
@@ -1219,6 +1219,11 @@ void DrawProjGroup::spin(const std::string& spindirection)
|
||||
if (spindirection == "CCW")
|
||||
angle = -M_PI / 2.0;// Top -> Left -> Bottom -> Right -> Top
|
||||
|
||||
spin(angle);
|
||||
}
|
||||
|
||||
void DrawProjGroup::spin(double angle)
|
||||
{
|
||||
DrawProjGroupItem* anchor = getAnchor();
|
||||
Base::Vector3d org(0.0, 0.0, 0.0);
|
||||
Base::Vector3d curRot = anchor->getXDirection();
|
||||
|
||||
@@ -129,6 +129,7 @@ public:
|
||||
|
||||
void rotate(const std::string &rotationdirection);
|
||||
void spin(const std::string &spindirection);
|
||||
void spin(double angle);
|
||||
|
||||
void dumpISO(const char * title);
|
||||
std::vector<DrawProjGroupItem*> getViewsAsDPGI();
|
||||
|
||||
@@ -1289,6 +1289,11 @@ void DrawViewPart::spin(const std::string& spindirection)
|
||||
if (spindirection == "CCW")
|
||||
angle = -M_PI / 2.0;// Top -> Left -> Bottom -> Right -> Top
|
||||
|
||||
spin(angle);
|
||||
}
|
||||
|
||||
void DrawViewPart::spin(double angle)
|
||||
{
|
||||
Base::Vector3d org(0.0, 0.0, 0.0);
|
||||
Base::Vector3d curRot = getXDirection();
|
||||
Base::Vector3d curDir = Direction.getValue();
|
||||
|
||||
@@ -174,6 +174,7 @@ public:
|
||||
|
||||
void rotate(const std::string& rotationdirection);
|
||||
void spin(const std::string& spindirection);
|
||||
void spin(double val);
|
||||
std::pair<Base::Vector3d, Base::Vector3d> getDirsFromFront(std::string viewType);
|
||||
Base::Vector3d dir2vec(gp_Dir d);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user