Modeling Algorithms Boolean Operations of Opencascade

eryar@163.com

布尔操作(Boolean Operations)是通过两个形状(S1S2)的组合来生成新的形状。布尔操作有如下几种类型:

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(,,);
TopoDS_Shape theBox2 = BRepPrimAPI_MakeBox(-,,);
TopoDS_Shape FusedShape = BRepAlgoAPI_Fuse(theBox1,theBox2);

Fuse two boxes

3. BRepAlgoAPI_Common

BRepAlgoAPI_Common执行布尔交集操作,如下所示:

gp_Ax2 axe(gp_Pnt(,,),gp_Dir(,,)); 

TopoDS_Shape theBox = BRepPrimAPI_MakeBox(axe,,,);
TopoDS_Shape theWedge = BRepPrimAPI_MakeWedge(.,.,.,.);
TopoDS_Shape theCommonSurface = BRepAlgoAPI_Common(theBox,theWedge);

Compute the common surface

4. BRepAlgoAPI_Cut

BRepAlgoAPI_Cut执行布尔差集操作,如下所示:

TopoDS_Shape theBox = BRepPrimAPI_MakeBox(,,);
TopoDS_Shape theSphere = BRepPrimAPI_MakeSphere(gp_Pnt(,,),);
TopoDS_Shape ShapeCut = BRepAlgoAPI_Cut(theSphere,theBox);

5. BRepAlgoAPI_Section

Open Cascade中的布尔操作 Modeling Algorithms-Boolean Operations

OpenCascade Modeling Algorithms Boolean Operations的更多相关文章

  1. OpenCascade Modeling Algorithms Fillets and Chamfers

    Modeling Algorithms Fillets and Chamfers 造型算法——倒圆与倒角 eryar@163.com 一.倒圆Fillet Constructor 1. BRepFil ...

  2. [算法]Comparison of the different algorithms for Polygon Boolean operations

    Comparison of the different algorithms for  Polygon Boolean operations. Michael Leonov 1998 http://w ...

  3. Thread: BooleanRT : Realtime 3D boolean operations for (Runtime,Editor)

    A Product by Mixed Dimensions What is BooleanRT? BooleanRT is a real-time 3D boolean operations exte ...

  4. Boolean operations between triangle meshes

    Boolean operations between triangle meshes eryar@163.com Abstract. Boolean operations is one of basi ...

  5. OpenCASCADE Hidden Line Removal

    OpenCASCADE Hidden Line Removal eryar@163.com Abstract. To provide the precision required in industr ...

  6. OpenCascade Sweep Algorithm

    OpenCascade Sweep Algorithm eryar@163.com Abstract. Sweeps are the objects you obtain by sweeping a ...

  7. A Simple OpenCASCADE Qt Demo-occQt

    A Simple OpenCASCADE Qt Demo-occQt eryar@163.com Abstract. OpenCASCADE have provided the Qt samples ...

  8. Overview of OpenCascade Library

    Overview of OpenCascade Library eryar@163.com 摘要Abstract:对OpenCascade库的功能及其实现做简要介绍. 关键字Key Words:Ope ...

  9. OpenCascade简介

    OpenCascade简介   Overview of OpenCascade Library eryar@163.com 摘要Abstract:对OpenCascade库的功能及其实现做简要介绍. ...

随机推荐

  1. C# interface

    我们学习了interface,即接口,其与抽象类有点像,但是他们也有一些区别,比如类不能多重继承但是接口却可以多重继承. 接口只包含方法.委托或事件和属性的签名(接口包含的成员).不能包含字段(因为字 ...

  2. Java学习笔记(五)

    作业1:将指定目录下的所有文件显示到列表框(JList)组件中. 代码如下: import java.awt.; import java.awt.event.; import javax.swing. ...

  3. 理解一下单片机的I2C和SPI通信

    应某位网友要求,今天说一下单片机的I2C SPI通信,可能说不清楚,因为这毕竟要做实验才可完全理解. I2C和SPI是两种不同的通信协议. 听到协议,似乎高不可攀,其实协议就是人们定义的一个标准而已, ...

  4. 在CentOS上搭建最^1024基本的Nginx反向服务器

    昨天有过去的同事突然问我,他在CentOS7上试验搭建反向服务器死活不成功.现将最简单的搭建步骤分享下: 0. 环境介绍 本次搭建的集群包括以下服务器 192.168.1.107:nginx反向服务器 ...

  5. windows下PHP与Apache的安装配置

    1.下载安装apache:官网 http://httpd.apache.org/download.cgi#apache24 下载httpd-2.2.25-win32-x86-no_ssl.msi并安装 ...

  6. ENode 1.0 - 消息队列的设计思路

    开源地址:https://github.com/tangxuehua/enode 上一篇文章,简单介绍了enode框架内部的整体实现思路,用到了staged event-driven architec ...

  7. Asp.Net MVC 扩展 Html.ImageFor 方法详解

    背景: 在Asp.net MVC中定义模型的时候,DataType有DataType.ImageUrl这个类型,但htmlhelper却无法输出一个img,当用脚手架自动生成一些form或表格的时候, ...

  8. 使用decode函数实现统计

          从上个星期起就在开始做统计图,各种统计图,昨天做的统计效果图如下:       在这里要根据工作平台和机构做统计,其中当字段A等于某个值时需要统计起来,也就是说假设等于2时需要做统计,字段 ...

  9. 解决在onCreate()过程中获取View的width和Height为0的4种方法

    很经常当我们动态创建某些View时,需要通过获取他们的width和height来确定别的view的布局,但是在onCreate()获取view的width和height会得到0.view.getWid ...

  10. 使用IPostBackEventHandler让JavaScript“调用”回传事件

    在由ASP.NET所谓前台调用后台.后台调用前台想到HTTP——实践篇(二)通过自己模拟HTML标签事件与服务器交互,讲了ASP.NET的服务器控件是怎么render成HTML后市怎么“调用”后台方法 ...