[TD]detail of rotated ComplexSection
This commit is contained in:
@@ -37,8 +37,8 @@
|
||||
#include <Base/BoundBox.h>
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include "DrawView.h"
|
||||
#include "CosmeticExtension.h"
|
||||
#include "DrawView.h"
|
||||
|
||||
|
||||
class gp_Pnt;
|
||||
@@ -58,9 +58,10 @@ using GeometryObjectPtr = std::shared_ptr<GeometryObject>;
|
||||
class Vertex;
|
||||
class BaseGeom;
|
||||
class Face;
|
||||
}
|
||||
}// namespace TechDraw
|
||||
|
||||
namespace TechDraw {
|
||||
namespace TechDraw
|
||||
{
|
||||
class DrawHatch;
|
||||
class DrawGeomHatch;
|
||||
class DrawViewDimension;
|
||||
@@ -72,14 +73,14 @@ class CosmeticVertex;
|
||||
class CosmeticEdge;
|
||||
class CenterLine;
|
||||
class GeomFormat;
|
||||
}
|
||||
}// namespace TechDraw
|
||||
|
||||
namespace TechDraw
|
||||
{
|
||||
|
||||
class DrawViewSection;
|
||||
|
||||
class TechDrawExport DrawViewPart : public DrawView, public CosmeticExtension
|
||||
class TechDrawExport DrawViewPart: public DrawView, public CosmeticExtension
|
||||
{
|
||||
PROPERTY_HEADER_WITH_EXTENSIONS(TechDraw::DrawViewPart);
|
||||
|
||||
@@ -87,32 +88,31 @@ public:
|
||||
DrawViewPart();
|
||||
~DrawViewPart() override;
|
||||
|
||||
App::PropertyLinkList Source;
|
||||
App::PropertyXLinkList XSource;
|
||||
App::PropertyVector Direction; //TODO: Rename to YAxisDirection or whatever this actually is (ProjectionDirection)
|
||||
App::PropertyVector XDirection;
|
||||
App::PropertyBool Perspective;
|
||||
App::PropertyDistance Focus;
|
||||
App::PropertyLinkList Source;
|
||||
App::PropertyXLinkList XSource;
|
||||
App::PropertyVector
|
||||
Direction;//TODO: Rename to YAxisDirection or whatever this actually is (ProjectionDirection)
|
||||
App::PropertyVector XDirection;
|
||||
App::PropertyBool Perspective;
|
||||
App::PropertyDistance Focus;
|
||||
|
||||
App::PropertyBool CoarseView;
|
||||
App::PropertyBool SeamVisible;
|
||||
App::PropertyBool SmoothVisible;
|
||||
App::PropertyBool CoarseView;
|
||||
App::PropertyBool SeamVisible;
|
||||
App::PropertyBool SmoothVisible;
|
||||
//App::PropertyBool OutlinesVisible;
|
||||
App::PropertyBool IsoVisible;
|
||||
App::PropertyBool IsoVisible;
|
||||
|
||||
App::PropertyBool HardHidden;
|
||||
App::PropertyBool SmoothHidden;
|
||||
App::PropertyBool SeamHidden;
|
||||
App::PropertyBool HardHidden;
|
||||
App::PropertyBool SmoothHidden;
|
||||
App::PropertyBool SeamHidden;
|
||||
//App::PropertyBool OutlinesHidden;
|
||||
App::PropertyBool IsoHidden;
|
||||
App::PropertyInteger IsoCount;
|
||||
App::PropertyBool IsoHidden;
|
||||
App::PropertyInteger IsoCount;
|
||||
|
||||
short mustExecute() const override;
|
||||
App::DocumentObjectExecReturn *execute() override;
|
||||
const char* getViewProviderName() const override {
|
||||
return "TechDrawGui::ViewProviderViewPart";
|
||||
}
|
||||
PyObject *getPyObject() override;
|
||||
App::DocumentObjectExecReturn* execute() override;
|
||||
const char* getViewProviderName() const override { return "TechDrawGui::ViewProviderViewPart"; }
|
||||
PyObject* getPyObject() override;
|
||||
|
||||
std::vector<TechDraw::DrawHatch*> getHatches() const;
|
||||
std::vector<TechDraw::DrawGeomHatch*> getGeomHatches() const;
|
||||
@@ -127,34 +127,35 @@ public:
|
||||
bool hasGeometry() const;
|
||||
TechDraw::GeometryObjectPtr getGeometryObject() const { return geometryObject; }
|
||||
|
||||
TechDraw::BaseGeomPtr getGeomByIndex(int idx) const; //get existing geom for edge idx in projection
|
||||
TechDraw::VertexPtr getProjVertexByIndex(int idx) const; //get existing geom for vertex idx in projection
|
||||
TechDraw::BaseGeomPtr
|
||||
getGeomByIndex(int idx) const;//get existing geom for edge idx in projection
|
||||
TechDraw::VertexPtr
|
||||
getProjVertexByIndex(int idx) const;//get existing geom for vertex idx in projection
|
||||
TechDraw::VertexPtr getProjVertexByCosTag(std::string cosTag);
|
||||
std::vector<TechDraw::BaseGeomPtr> getFaceEdgesByIndex(int idx) const; //get edges for face idx in projection
|
||||
std::vector<TechDraw::BaseGeomPtr>
|
||||
getFaceEdgesByIndex(int idx) const;//get edges for face idx in projection
|
||||
|
||||
virtual Base::BoundBox3d getBoundingBox() const;
|
||||
double getBoxX() const;
|
||||
double getBoxY() const;
|
||||
QRectF getRect() const override;
|
||||
virtual std::vector<DrawViewSection*> getSectionRefs() const; //are there ViewSections based on this ViewPart?
|
||||
virtual std::vector<DrawViewSection*>
|
||||
getSectionRefs() const;//are there ViewSections based on this ViewPart?
|
||||
virtual std::vector<DrawViewDetail*> getDetailRefs() const;
|
||||
|
||||
|
||||
virtual Base::Vector3d projectPoint(const Base::Vector3d& pt,
|
||||
bool invert = true) const;
|
||||
virtual Base::Vector3d projectPoint(const Base::Vector3d& pt, bool invert = true) const;
|
||||
virtual BaseGeomPtr projectEdge(const TopoDS_Edge& e) const;
|
||||
virtual BaseGeomPtrVector projectWire(const TopoDS_Wire& inWire) const;
|
||||
|
||||
virtual gp_Ax2 getViewAxis(const Base::Vector3d& pt,
|
||||
const Base::Vector3d& direction,
|
||||
const bool flip=true) const;
|
||||
virtual gp_Ax2 getViewAxis(const Base::Vector3d& pt, const Base::Vector3d& direction,
|
||||
const bool flip = true) const;
|
||||
virtual gp_Ax2 getProjectionCS(Base::Vector3d pt = Base::Vector3d(0.0, 0.0, 0.0)) const;
|
||||
virtual Base::Vector3d getXDirection() const; //don't use XDirection.getValue()
|
||||
virtual Base::Vector3d getXDirection() const;//don't use XDirection.getValue()
|
||||
virtual Base::Vector3d getOriginalCentroid() const;
|
||||
virtual Base::Vector3d getCurrentCentroid() const;
|
||||
virtual Base::Vector3d getLegacyX(const Base::Vector3d& pt,
|
||||
const Base::Vector3d& axis,
|
||||
const bool flip = true) const;
|
||||
virtual Base::Vector3d getLegacyX(const Base::Vector3d& pt, const Base::Vector3d& axis,
|
||||
const bool flip = true) const;
|
||||
gp_Ax2 localVectorToCS(const Base::Vector3d localUnit) const;
|
||||
Base::Vector3d localVectorToDirection(const Base::Vector3d localUnit) const;
|
||||
|
||||
@@ -168,6 +169,7 @@ public:
|
||||
virtual TopoDS_Shape getSourceShape() const;
|
||||
virtual TopoDS_Shape getSourceShapeFused() const;
|
||||
virtual std::vector<TopoDS_Shape> getSourceShape2d() const;
|
||||
virtual TopoDS_Shape getShapeForDetail() const;
|
||||
|
||||
TopoDS_Shape getShape() const;
|
||||
double getSizeAlongVector(Base::Vector3d alignmentVector);
|
||||
@@ -209,7 +211,7 @@ public:
|
||||
std::vector<App::DocumentObject*> getAllSources() const;
|
||||
|
||||
bool waitingForFaces() const { return m_waitingForFaces; }
|
||||
void waitingForFaces(bool s) { m_waitingForFaces = s;}
|
||||
void waitingForFaces(bool s) { m_waitingForFaces = s; }
|
||||
bool waitingForHlr() const { return m_waitingForHlr; }
|
||||
void waitingForHlr(bool s) { m_waitingForHlr = s; }
|
||||
virtual bool waitingForResult() const;
|
||||
@@ -224,14 +226,15 @@ protected:
|
||||
bool checkXDirection() const;
|
||||
|
||||
TechDraw::GeometryObjectPtr geometryObject;
|
||||
TechDraw::GeometryObjectPtr m_tempGeometryObject; //holds the new GO until hlr is completed
|
||||
TechDraw::GeometryObjectPtr m_tempGeometryObject;//holds the new GO until hlr is completed
|
||||
Base::BoundBox3d bbox;
|
||||
|
||||
void onChanged(const App::Property* prop) override;
|
||||
void unsetupObject() override;
|
||||
|
||||
virtual TechDraw::GeometryObjectPtr buildGeometryObject(TopoDS_Shape& shape, const gp_Ax2& viewAxis);
|
||||
virtual TechDraw::GeometryObjectPtr makeGeometryForShape(TopoDS_Shape& shape); //const??
|
||||
virtual TechDraw::GeometryObjectPtr buildGeometryObject(TopoDS_Shape& shape,
|
||||
const gp_Ax2& viewAxis);
|
||||
virtual TechDraw::GeometryObjectPtr makeGeometryForShape(TopoDS_Shape& shape);//const??
|
||||
void partExec(TopoDS_Shape& shape);
|
||||
virtual void addShapes2d(void);
|
||||
|
||||
@@ -242,10 +245,11 @@ protected:
|
||||
|
||||
bool m_handleFaces;
|
||||
|
||||
TopoDS_Shape m_saveShape; //TODO: make this a Property. Part::TopoShapeProperty??
|
||||
Base::Vector3d m_saveCentroid; //centroid before centering shape in origin
|
||||
TopoDS_Shape m_saveShape; //TODO: make this a Property. Part::TopoShapeProperty??
|
||||
Base::Vector3d m_saveCentroid;//centroid before centering shape in origin
|
||||
|
||||
void handleChangedPropertyName(Base::XMLReader &reader, const char* TypeName, const char* PropName) override;
|
||||
void handleChangedPropertyName(Base::XMLReader& reader, const char* TypeName,
|
||||
const char* PropName) override;
|
||||
|
||||
bool prefHardViz();
|
||||
bool prefSeamViz();
|
||||
@@ -255,7 +259,7 @@ protected:
|
||||
bool prefSeamHid();
|
||||
bool prefSmoothHid();
|
||||
bool prefIsoHid();
|
||||
int prefIsoCount();
|
||||
int prefIsoCount();
|
||||
|
||||
std::vector<TechDraw::VertexPtr> m_referenceVerts;
|
||||
|
||||
@@ -270,11 +274,10 @@ private:
|
||||
QMetaObject::Connection connectFaceWatcher;
|
||||
QFutureWatcher<void> m_faceWatcher;
|
||||
QFuture<void> m_faceFuture;
|
||||
|
||||
};
|
||||
|
||||
using DrawViewPartPython = App::FeaturePythonT<DrawViewPart>;
|
||||
|
||||
} //namespace TechDraw
|
||||
}//namespace TechDraw
|
||||
|
||||
#endif // #ifndef DrawViewPart_h_
|
||||
#endif// #ifndef DrawViewPart_h_
|
||||
|
||||
Reference in New Issue
Block a user