[TD] Include Intersection method into DrawUtil class

This commit is contained in:
edi271
2022-01-29 08:39:47 +01:00
committed by WandererFan
parent f2f858190c
commit 8003ea80e5
3 changed files with 180 additions and 131 deletions

View File

@@ -93,7 +93,7 @@ using BSplinePtr = std::shared_ptr<BSpline>;
class Generic;
using GenericPtr = std::shared_ptr<Generic>;
class TechDrawExport BaseGeom
class TechDrawExport BaseGeom : public std::enable_shared_from_this<BaseGeom>
{
public:
BaseGeom();
@@ -132,11 +132,23 @@ class TechDrawExport BaseGeom
bool closed(void);
BaseGeomPtr copy();
std::string dump();
std::vector<Base::Vector3d> intersection(TechDraw::BaseGeomPtr geom2);
//Uniqueness
boost::uuids::uuid getTag() const;
virtual std::string getTagAsString(void) const;
private:
void intersectionLL(TechDraw::BaseGeomPtr geom1,
TechDraw::BaseGeomPtr geom2,
std::vector<Base::Vector3d>& interPoints);
void intersectionCL(TechDraw::BaseGeomPtr geom1,
TechDraw::BaseGeomPtr geom2,
std::vector<Base::Vector3d>& interPoints);
void intersectionCC(TechDraw::BaseGeomPtr geom1,
TechDraw::BaseGeomPtr geom2,
std::vector<Base::Vector3d>& interPoints);
protected:
int m_source; //0 - geom, 1 - cosmetic edge, 2 - centerline
int m_sourceIndex;