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

48 lines
1.2 KiB
C++
Raw 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 "TopoDS_Face.hxx"
#include "TopoDS_Shape.hxx"
#include <map>
#include "TopoDS_Edge.hxx"
#include "BaseAlgo.h"
class CutSurfaceAlgo : public BaseAlgo
{
public:
CutSurfaceAlgo(void);
CutSurfaceAlgo(TopoDS_Shape s1, TopoDS_Shape s2);
//~CutSurfaceAlgo(void);
public:
//判断是否完成
bool IsDone();
//执行剪切算法调用TrimSurfaceTranslateInsec通过剪切点保留计算结果
void Perform();
//返回结果
TopoDS_Shape GetResult();
//设置剪切点
void SetCutPoint(gp_Pnt p);
//执行剪切算法
void TrimSurfaceTranslateInsec(TopoDS_Shape TopoSrf,TopoDS_Shape TopoTemp, vector<TopoDS_Shell>& shellSet);
//执行剪切算法
void TrimSurfaceTranslateInsec(vector<TopoDS_Shell>& shellSet);
//从原面中提取实际相交所用到的面片
TopoDS_Shape CheckSectionShape(TopoDS_Shape s1, TopoDS_Shape s2);
//执行剪切算法通过isLeft保留结果用于拆分面
void TrimSurfaceTranslateInsec(TopoDS_Shape TopoSrf,TopoDS_Shape TopoTemp, vector<TopoDS_Shell>& shellSet , bool isLeft);
private:
//原面
TopoDS_Shape shell1;
//剪子面
TopoDS_Shape shell2;
//返回结果
TopoDS_Shape result;
//是否完成
bool isDone;
//剪切点
gp_Pnt cutPoint;
};