DPG improvements
eliminate orientation matrix remove appl logic from dialog add 3D/Front buttons
This commit is contained in:
@@ -23,12 +23,14 @@
|
||||
#ifndef _TECHDRAW_FEATUREVIEWGROUP_H_
|
||||
#define _TECHDRAW_FEATUREVIEWGROUP_H_
|
||||
|
||||
#include <string>
|
||||
# include <QRectF>
|
||||
#include <App/DocumentObject.h>
|
||||
#include <App/PropertyStandard.h>
|
||||
|
||||
#include <Base/BoundBox.h>
|
||||
#include <Base/Matrix.h>
|
||||
#include <Base/Vector3D.h>
|
||||
|
||||
#include "DrawViewCollection.h"
|
||||
|
||||
@@ -58,9 +60,6 @@ public:
|
||||
/// Default vertical spacing between adjacent views on Drawing, in mm
|
||||
App::PropertyFloat spacingY;
|
||||
|
||||
/// Transforms Direction and XAxisDirection vectors in child views
|
||||
App::PropertyMatrix viewOrientationMatrix;
|
||||
|
||||
App::PropertyLink Anchor; /// Anchor Element to align views to
|
||||
|
||||
Base::BoundBox3d getBoundingBox() const;
|
||||
@@ -71,6 +70,7 @@ public:
|
||||
bool hasProjection(const char *viewProjType) const;
|
||||
|
||||
App::DocumentObject * getProjObj(const char *viewProjType) const;
|
||||
DrawProjGroupItem* getProjItem(const char *viewProjType) const;
|
||||
|
||||
//! Adds a projection to the group
|
||||
/*!
|
||||
@@ -88,11 +88,6 @@ public:
|
||||
/// Automatically position child views
|
||||
bool distributeProjections(void);
|
||||
void resetPositions(void);
|
||||
/// Changes child views' coordinate space
|
||||
/*!
|
||||
* Used to set the Direction and XAxisDirection in child views
|
||||
*/
|
||||
void setFrontViewOrientation(const Base::Matrix4D &newMat);
|
||||
|
||||
short mustExecute() const;
|
||||
/** @name methods overide Feature */
|
||||
@@ -115,29 +110,25 @@ public:
|
||||
/// Allowed projection types - either Document, First Angle or Third Angle
|
||||
static const char* ProjectionTypeEnums[];
|
||||
|
||||
/// Sets Direction in v
|
||||
/*!
|
||||
* Applies viewOrientationMatrix to appropriate unit vectors depending on projType
|
||||
*/
|
||||
void setViewOrientation(DrawProjGroupItem *v, const char *projType) const;
|
||||
/// Populates an array of DrawProjGroupItem*s arranged for drawing
|
||||
/*!
|
||||
* Setup array of pointers to the views that we're displaying,
|
||||
* assuming front is in centre (index 4):
|
||||
* <pre>
|
||||
* [0] [1] [2]
|
||||
* [3] [4] [5] [6]
|
||||
* [7] [8] [9]
|
||||
*
|
||||
* Third Angle: FTL T FTRight
|
||||
* L F Right Rear
|
||||
* FBL B FBRight
|
||||
*
|
||||
* First Angle: FBRight B FBL
|
||||
* Right F L Rear
|
||||
* FTRight T FTL
|
||||
* </pre>
|
||||
*/
|
||||
bool hasAnchor(void);
|
||||
void setAnchorDirection(Base::Vector3d dir);
|
||||
Base::Vector3d getAnchorDirection(void);
|
||||
|
||||
void makeInitialMap(TechDraw::DrawProjGroupItem* anchor);
|
||||
std::map<std::string,Base::Vector3d> makeUnspunMap(Base::Vector3d f, Base::Vector3d r, Base::Vector3d t);
|
||||
std::map<std::string,Base::Vector3d> makeUnspunMap(void);
|
||||
void dumpMap();
|
||||
void updateSecondaryDirs();
|
||||
|
||||
void rotateRight(void);
|
||||
void rotateLeft(void);
|
||||
void rotateUp(void);
|
||||
void rotateDown(void);
|
||||
void spinCW(void);
|
||||
void spinCCW(void);
|
||||
|
||||
static Base::Vector3d nameToStdDirection(std::string name);
|
||||
|
||||
|
||||
protected:
|
||||
void onChanged(const App::Property* prop);
|
||||
@@ -174,6 +165,8 @@ protected:
|
||||
/// Returns pointer to our page, or NULL if it couldn't be located
|
||||
TechDraw::DrawPage * getPage(void) const;
|
||||
void updateChildren(double scale);
|
||||
|
||||
std::map<std::string,Base::Vector3d> m_viewDir;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user