[TD]add 2 utility methods

- toAppSpace converts qt point to app view coords
- angleWithX(Base::Vector3d) returns [0,2pi]
This commit is contained in:
wandererfan
2023-11-10 19:25:03 -05:00
committed by WandererFan
parent 0144b4b14d
commit 037165f1b7
2 changed files with 45 additions and 0 deletions

View File

@@ -71,6 +71,8 @@
namespace TechDraw
{
class DrawViewPart;
//used by sort_Edges
struct EdgePoints
{
@@ -92,6 +94,7 @@ public:
static double sensibleScale(double working_scale);
static double angleWithX(TopoDS_Edge e, bool reverse);
static double angleWithX(TopoDS_Edge e, TopoDS_Vertex v, double tolerance = VERTEXTOLERANCE);
static double angleWithX(Base::Vector3d inVec);
static double incidenceAngleAtVertex(TopoDS_Edge e, TopoDS_Vertex v, double tolerance);
static bool isFirstVert(TopoDS_Edge e, TopoDS_Vertex v, double tolerance = VERTEXTOLERANCE);
@@ -259,6 +262,9 @@ public:
static bool isCosmeticEdge(App::DocumentObject* owner, std::string element);
static bool isCenterLine(App::DocumentObject* owner, std::string element);
static Base::Vector3d toAppSpace(const DrawViewPart& dvp, const Base::Vector3d& inPoint);
static Base::Vector3d toAppSpace(const DrawViewPart& dvp, const QPointF& inPoint);
//debugging routines
static void dumpVertexes(const char* text, const TopoDS_Shape& s);
static void dumpEdge(const char* label, int i, TopoDS_Edge e);