## OpenCascade Modeling Algorithms Boolean Operations 原

eryar

eryar@163.com

u 并集操作FusionGets all the points in S1 or S2

u 交集操作CommonGets all the points in S1 and S2

u 差集操作Cut S1 by S2Gets all the points in S1 and not in S2

### 1. BRepAlgoAPI_BooleanOperation

BRepAlgoAPI_BooleanOperation是布尔操作的基类。

### 2. BRepAlgoAPI_Fuse

BRepAlgoAPI_Fuse执行布尔并集操作。如下所示：

``````TopoDS_Shape theBox1 = BRepPrimAPI_MakeBox(50,200,70);
TopoDS_Shape theBox2 = BRepPrimAPI_MakeBox(-30,150,70);
TopoDS_Shape FusedShape = BRepAlgoAPI_Fuse(theBox1,theBox2);``````

Fuse two boxes

### 3. BRepAlgoAPI_Common

BRepAlgoAPI_Common执行布尔交集操作，如下所示：

``````gp_Ax2 axe(gp_Pnt(10,10,10),gp_Dir(1,2,1));

TopoDS_Shape theBox = BRepPrimAPI_MakeBox(axe,60,80,100);
TopoDS_Shape theWedge = BRepPrimAPI_MakeWedge(60.,100.,80.,20.);
TopoDS_Shape theCommonSurface = BRepAlgoAPI_Common(theBox,theWedge);``````

Compute the common surface

### 4. BRepAlgoAPI_Cut

BRepAlgoAPI_Cut执行布尔差集操作，如下所示：

``````TopoDS_Shape theBox = BRepPrimAPI_MakeBox(200,40,40);
TopoDS_Shape theSphere = BRepPrimAPI_MakeSphere(gp_Pnt(100,20,20),80);
TopoDS_Shape ShapeCut = BRepAlgoAPI_Cut(theSphere,theBox);``````

### eryar

2014/11/11
2.9K
2
Building OpenCascade on Windows with Visual Studio

eryar
2013/09/23
518
0

oschina
2016/04/21
3K
2

OpenCASCADE Make Primitives-Box eryar@163.com Abstract. By making a simple box to demonstrate the BRep data structure of the OpenCASCADE. The construction method is different fr......

eryar
2014/11/23
242
0

chenchenxixi
2012/07/09
1K
2

honeymoose
12分钟前
2
0

https://github.com/magicblack/maccms10 程序下载： https://www.lanzous.com/b204882 教程下载： https://www.lanzous.com/b256378 模板下载： https://www.lanzous.com/b355667 插件下载：......

chenhongjiang
12分钟前
3
0
Java中使用HttpPost上传文件以及HttpGet进行API请求（包含HttpPost上传文件）

codeobj
13分钟前
3
0

19分钟前
2
0

> Sshpass是使用SSH所谓的“交互式键盘密码身份验证”以非交互方式执行密码身份验证的工具 通俗来说就是 使用ssh密码登录 是需要在连接时手动输入密码的，没办法明文连接，如下图，需要交互的...

23分钟前
3
0