COMPASSi/trunk/code/inc/OCC/OCCLib/CutSolidAlgo.h

32 lines
811 B
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#include "BaseAlgo.h"
class CutSolidAlgo : public BaseAlgo
{
public:
CutSolidAlgo(void);
CutSolidAlgo(TopoDS_Solid solid, TopoDS_Shape shell);
public:
//设置剪切点
void SetCutPoint(gp_Pnt p);
//执行剪切体操作
void Perform();
//返回剪切结果
TopoDS_Shape GetResult();
//体切面调用SplitShell
TopoDS_Shape CutSurfaceBySolid(TopoDS_Shape& surf,TopoDS_Shape& solid2);
//体切面,将面拆分成体内,体外和体表面三部分
TopoDS_Shape SplitShell(TopoDS_Shape& solid1,TopoDS_Shape& solid2, vector<TopoDS_Face>& faceIn, vector<TopoDS_Face>& faceOut, vector<TopoDS_Face>& faceOn);
public:
//原体
TopoDS_Solid solid;
//剪切面
TopoDS_Shape shell;
//剪切结果
TopoDS_Shape result;
//剪切点
gp_Pnt cutPoint;
//是否完成
bool isDone;
};