Files
gjm 164968b62e chore
把非utf8-bom编码的cpp/h文件改为 utf8 bom 编码, msvc识别utf8编码时,如果不是bom格式的,会使用当前cp_oem来解码.
2026-10-04 00:04:20 +08:00

54 lines
1.8 KiB
C++

#pragma once
#include "AecComplexCurveDraw.h"
#ifdef EARTHWORM_EXPORT
#define DLLIMPEXP __declspec(dllexport)
#else
#define DLLIMPEXP __declspec(dllimport)
#endif
class DLLIMPEXP AecCoverBooleanOper
{
public:
AecCoverBooleanOper();
virtual ~AecCoverBooleanOper();
public:
// 排序辅助支持
typedef struct PtOnCrItem
{
AcGePoint3d m_ptGeOn;
AcGePoint3d m_ptOld;
AcDbCurve * m_pCurve;
} PTONCRITEM,* PPTONCRITEM;
// 基本曲线图元转换为AcDb 曲线,用完需要释放缓存
static AcDbCurve* CurveElement2DbCurve(const AecEqui::AecCurveElement& el);
// 点排序
static BOOL SortPoints(AcGePoint3dArray& points,AcDbCurve * pCurve,bool bSetToCloseTo = true);
// 曲线的布尔减运算,实compcurve 减去 虚 edge
static BOOL BoolSubtract(AecComplexCurve& curveThisEdge,const AecComplexCurveDraw& otherEdge);
static BOOL BoolSubtract(AecComplexCurve& curveThisEdge,const AecComplexCurve& curveOtherEdge);
//是否有共线交集
static BOOL HasIntersection(const AecComplexCurve& cmplThis,const AecComplexCurve& cmplOther);
//曲线的合并处理
static BOOL BoolUnite(AecComplexCurve& curveThisEdge,const AecComplexCurve& curveOtherEdge);
//曲线的布尔减运算,距离ptCen近的相交段,裁去
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);
//实际落在其他上?
static BOOL RealInsideOther(AcDbLine& lineReal,AecEqui::AecCurveElement& elOtherSeg);
static BOOL RealInsideOther(AcDbArc* pArcReal,AcDbArc* pArcEdge);
};