TechDraw: Add option to use polygonal HLR algorithm

Now on property panel there is option 'Coarse View' which allows to set
selected drawing view's Hidden Line Removal to utilize polygonal algorithm.
This should be faster on same cases (complex models).

When this option is set for a view there is known limitation with dimensions not
working on this experimental mode. At least currently this is best utilized on
view with no dimensions.

Also the vertices' 'black dots' are not drawn on this mode view to avoid
cluttering.  Face hilite is avoided, to gain speed. All curves are represented
by short linesegments in this mode.

Previously TechDraw always used OCC's exact HLR algorithm to generate views,
which produces good quality and continous shape lines but is sometimes
slower to generate than with polygonal approach.

Additionally now there is bool 'CoarseView' Parameter Editor setting, if anyone
wants to set this as their default.
This commit is contained in:
TeroK
2018-01-13 12:45:48 +02:00
committed by wmayer
parent e697f2ef50
commit 434bf4d3f3
6 changed files with 113 additions and 13 deletions

View File

@@ -85,14 +85,16 @@ public:
//! Returns 2D bounding box
Base::BoundBox3d calcBoundingBox() const;
const std::vector<Vertex *> & getVertexGeometry() const { return vertexGeom; };
const std::vector<BaseGeom *> & getEdgeGeometry() const { return edgeGeom; };
const std::vector<Vertex *> & getVertexGeometry() const { return vertexGeom; }
const std::vector<BaseGeom *> & getEdgeGeometry() const { return edgeGeom; }
const std::vector<BaseGeom *> getVisibleFaceEdges(bool smooth, bool seam) const;
const std::vector<Face *> & getFaceGeometry() const { return faceGeom; };
const std::vector<Face *> & getFaceGeometry() const { return faceGeom; }
void projectShape(const TopoDS_Shape &input,
const gp_Ax2 viewAxis);
void projectShapeWithPolygonAlgo(const TopoDS_Shape &input,
const gp_Ax2 viewAxis);
void extractGeometry(edgeClass category, bool visible);
void addFaceGeom(Face * f);
void clearFaceGeom();
@@ -100,6 +102,8 @@ public:
void setParentName(std::string n); //for debug messages
void isPerspective(bool b) { m_isPersp = b; }
bool isPerspective(void) { return m_isPersp; }
void usePolygonHLR(bool b) { m_usePolygonHLR = b; }
bool usePolygonHLR(void) const { return m_usePolygonHLR; }
void setFocus(double f) { m_focus = f; }
double getFocus(void) { return m_focus; }
void pruneVertexGeom(Base::Vector3d center, double radius);
@@ -150,6 +154,7 @@ protected:
int m_isoCount;
bool m_isPersp;
double m_focus;
bool m_usePolygonHLR;
};
} //namespace TechDrawGeometry