Improve handling of duplicate edges in projection
This commit is contained in:
@@ -46,12 +46,31 @@ class BaseGeom;
|
||||
|
||||
namespace TechDraw
|
||||
{
|
||||
struct splitPoint {
|
||||
struct splitPoint
|
||||
{
|
||||
int i;
|
||||
Base::Vector3d v;
|
||||
double param;
|
||||
};
|
||||
|
||||
class edgeSortItem
|
||||
{
|
||||
public:
|
||||
edgeSortItem() {}
|
||||
~edgeSortItem() {}
|
||||
|
||||
Base::Vector3d start;
|
||||
Base::Vector3d end;
|
||||
double startAngle;
|
||||
double endAngle;
|
||||
unsigned int idx;
|
||||
|
||||
static bool edgeCompare(const edgeSortItem& e1, const edgeSortItem& e2);
|
||||
static bool edgeEqual(const edgeSortItem& e1, const edgeSortItem& e2);
|
||||
std::string dump(void);
|
||||
};
|
||||
|
||||
|
||||
class TechDrawExport DrawProjectSplit
|
||||
{
|
||||
public:
|
||||
@@ -65,12 +84,16 @@ public:
|
||||
static bool isOnEdge(TopoDS_Edge e, TopoDS_Vertex v, double& param, bool allowEnds = false);
|
||||
static std::vector<TopoDS_Edge> splitEdges(std::vector<TopoDS_Edge> orig, std::vector<splitPoint> splits);
|
||||
static std::vector<TopoDS_Edge> split1Edge(TopoDS_Edge e, std::vector<splitPoint> splitPoints);
|
||||
static double simpleMinDist(TopoDS_Shape s1, TopoDS_Shape s2); //const; //probably sb static or DrawUtil
|
||||
static double simpleMinDist(TopoDS_Shape s1, TopoDS_Shape s2);
|
||||
|
||||
static std::vector<splitPoint> sortSplits(std::vector<splitPoint>& s, bool ascend);
|
||||
static bool splitCompare(const splitPoint& p1, const splitPoint& p2);
|
||||
static bool splitEqual(const splitPoint& p1, const splitPoint& p2);
|
||||
|
||||
static std::vector<TopoDS_Edge> removeDuplicateEdges(std::vector<TopoDS_Edge>& inEdges);
|
||||
static std::vector<edgeSortItem> sortEdges(std::vector<edgeSortItem>& e, bool ascend);
|
||||
|
||||
|
||||
protected:
|
||||
static std::vector<TopoDS_Edge> getEdges(TechDrawGeometry::GeometryObject* geometryObject);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user