35 lines
864 B
C++
35 lines
864 B
C++
#pragma once
|
|||
|
|
|
||
|
|
#ifdef EARTHWORM_EXPORT
|
||
|
|
#define DLLIMPEXP __declspec(dllexport)
|
||
|
|
#else
|
||
|
|
#define DLLIMPEXP __declspec(dllimport)
|
||
|
|
#endif
|
||
|
|
|
||
|
|
class DLLIMPEXP BrepTools
|
||
|
|
{
|
||
|
|
public:
|
||
|
|
static void init();
|
||
|
|
|
||
|
|
// 直接碰撞 solid 实体
|
||
|
|
// 缺点:对于一端在solid内的线段,不好区分
|
||
|
|
static bool intersectWith_by_whole(AcDb3dSolid *pSolid
|
||
|
|
, const AcGeLinearEnt3d& linEnt
|
||
|
|
, AcGePoint3dArray &ar);
|
||
|
|
|
||
|
|
// 遍历 solid 的所有face,进行碰撞检查
|
||
|
|
static bool intersectWith_by_loop_face(AcDb3dSolid *pSolid
|
||
|
|
, const AcGeLinearEnt3d &linEnt
|
||
|
|
, AcGePoint3dArray &ar);
|
||
|
|
|
||
|
|
// 0-kInside, 1-kOutside, 2-kOnBoundary
|
||
|
|
static bool relationWith(const AcDbRegion *pReg
|
||
|
|
, const AcGePoint3d &pt
|
||
|
|
, AcGe::PointContainment &iResult );
|
||
|
|
|
||
|
|
static void listInfo3dSolid(const AcDb3dSolid *pSolid);
|
||
|
|
|
||
|
|
static void intersectSolid(const AcDb3dSolid *pSolid, const AcGeLinearEnt3d &line, AcGePoint3dArray &ar);
|
||
|
|
};
|
||
|
|
|
||
|
|
|