Files
envi-code/SourceCode/Code2026/inc/AecCoverBooleanOper.h
T

53 lines
1.8 KiB
C++
Raw Normal View History

2026-10-04 00:04:20 +08:00
#pragma once
2026-09-28 15:28:50 +08:00
#include "AecComplexCurveDraw.h"
#ifdef EARTHWORM_EXPORT
#define DLLIMPEXP __declspec(dllexport)
#else
#define DLLIMPEXP __declspec(dllimport)
#endif
class DLLIMPEXP AecCoverBooleanOper
{
public:
AecCoverBooleanOper();
virtual ~AecCoverBooleanOper();
public:
2026-10-04 00:04:20 +08:00
// 排序辅助支持
2026-09-28 15:28:50 +08:00
typedef struct PtOnCrItem
{
AcGePoint3d m_ptGeOn;
AcGePoint3d m_ptOld;
AcDbCurve * m_pCurve;
} PTONCRITEM,* PPTONCRITEM;
2026-10-04 00:04:20 +08:00
// 基本曲线图元转换为AcDb 曲线,用完需要释放缓存
2026-09-28 15:28:50 +08:00
static AcDbCurve* CurveElement2DbCurve(const AecEqui::AecCurveElement& el);
2026-10-04 00:04:20 +08:00
// 点排序
2026-09-28 15:28:50 +08:00
static BOOL SortPoints(AcGePoint3dArray& points,AcDbCurve * pCurve,bool bSetToCloseTo = true);
2026-10-04 00:04:20 +08:00
// 曲线的布尔减运算,实compcurve 减去 虚 edge
2026-09-28 15:28:50 +08:00
static BOOL BoolSubtract(AecComplexCurve& curveThisEdge,const AecComplexCurveDraw& otherEdge);
static BOOL BoolSubtract(AecComplexCurve& curveThisEdge,const AecComplexCurve& curveOtherEdge);
2026-10-04 00:04:20 +08:00
//是否有共线交集
2026-09-28 15:28:50 +08:00
static BOOL HasIntersection(const AecComplexCurve& cmplThis,const AecComplexCurve& cmplOther);
2026-10-04 00:04:20 +08:00
//曲线的合并处理
2026-09-28 15:28:50 +08:00
static BOOL BoolUnite(AecComplexCurve& curveThisEdge,const AecComplexCurve& curveOtherEdge);
2026-10-04 00:04:20 +08:00
//曲线的布尔减运算,距离ptCen近的相交段,裁去
2026-09-28 15:28:50 +08:00
static void TrimElement(AcDbCurve* pThis,const AcGePoint3d& pt1,const AcGePoint3d& pt2,AecComplexCurve& curveThisEdgeNew);
static bool PolyClip(const AecComplexCurve& curvePoly,const AecComplexCurve& curveCmpl,AecComplexCurve& crvOutSide,AecComplexCurve& crvInside);
static AcGePoint3d MidPoint(const AcGePoint3d& pt1,const AcGePoint3d& pt2);
static AcDbArc* FormatArc(AcGePoint3d& ptGe1,AcGePoint3d& ptGe2,AcGePoint3d& ptGe3);
2026-10-04 00:04:20 +08:00
//实际落在其他上?
2026-09-28 15:28:50 +08:00
static BOOL RealInsideOther(AcDbLine& lineReal,AecEqui::AecCurveElement& elOtherSeg);
static BOOL RealInsideOther(AcDbArc* pArcReal,AcDbArc* pArcEdge);
};