[TD]Refactor Dimensions for 3d upgrade

- separate validation, geometry and reference handling into
  individual files
- improve 3d reference geometry handling
- eliminate duplicate dim creation code

- add Dimension reference repair dialog

- Refactor formatting out of DrawViewDimension

- move dimension repaint control to ViewProvider
This commit is contained in:
wandererfan
2022-10-28 08:46:37 -04:00
committed by WandererFan
parent aeeb62d204
commit 1b547dff72
39 changed files with 5181 additions and 2544 deletions

View File

@@ -114,6 +114,9 @@ public:
const char* getViewProviderName() const override { return "TechDrawGui::ViewProviderViewPart"; }
PyObject* getPyObject() override;
static TopoDS_Shape centerScaleRotate(DrawViewPart* dvp,
TopoDS_Shape& inOutShape,
Base::Vector3d centroid);
std::vector<TechDraw::DrawHatch*> getHatches() const;
std::vector<TechDraw::DrawGeomHatch*> getGeomHatches() const;
std::vector<TechDraw::DrawViewDimension*> getDimensions() const;
@@ -127,10 +130,13 @@ 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::VertexPtr getVertex(std::string vertexName) const;
TechDraw::BaseGeomPtr getEdge(std::string edgeName) const;
TechDraw::FacePtr getFace(std::string faceName) const;
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