OCCT 形状布尔操作

https://dev.opencascade.org/doc/occt-7.8.0/overview/html/specification__boolean_operations.html

布尔操作 用于 从两组形状的组合去创建新形状:

  • General Fuse Operator (GFA), - 通用熔丝操作
  • Boolean Operator (BOA), - 布尔操作
  • Section Operator (SA), - 部分操作
  • Splitter Operator (SPA). - 拆分操作

GFA是BOA SPA SA的基础算法 .   GFA是可扩展的,允许创建新算法

Boolean operator 允许两个组对象和工具<也是对象,是为了完成目的的工具对象>之间的操作

  • FUSE - Union of two groups;
  • COMMON - Intersection of two groups;
  • CUT - Difference between two groups.

每组组成一个独立组TopoDS_Shape

The operator can be represented as:

RB=Bj (G1, G2),

where:

  • RB – result of the operation;
  • Bj – operation of type j (Common, Fuse, Cut);
  • G1={S11, S12 ... S1n1} group of arguments (Objects); 对象参数
  • G2={S21, S22 ... S2n2} group of arguments (Tools);对象对应的工具参数
  • n1 – Number of arguments in Objects group;
  • n2 – Number of arguments in Tools group.

Note There is an operation Cut21, which is an extension for forward Cut operation, i.e Cut21=Cut(G2, G1).

General Fuse operator:

The GFA operator can be represented as:

RGF = GF (S1, S2 ... Sn),

where

  • RGF – result of the operation,
  • S1, S2 ... Sn – arguments of the operation,
  • n – number of arguments.

The result of the Boolean operator, RB, can be obtained from RGF.

For example, for two arguments S1 and S2 the result RGF is

RGF = GF (S1, S2) = Sp1 + Sp2 + Sp12

This Figure shows that

  • Bcommon (S1, S2) = Sp12;
  • Bcut12 (S1, S2) = Sp1;
  • Bcut21 (S1, S2) = Sp2;
  • Bfuse (S1, S2) = Sp1+Sp2+Sp12

RGF=GF (S1, S2) = Bfuse = Bcommon+ Bcut12+ Bcut21.

The fact that RGF contains the components of RB allows considering GFA as the general case of BOA. So it is possible to implement BOA as a subclass of GFA.

For more details see General Fuse Algorithm section.

Splitter operator:参数分成两组 对象和工具组<也是对象,是为了完成目的的工具对象>,结果SPA 包含所有归属于对象的,但不包含归属于工具的部分,结果可从fuse操作里面获取,

GFA, BOA, SPA and SA有一样的数据结构DS,数据结构注意目的是存储数据和中间结果的必要信息。

操作两个组成部分

  • Intersection Part (IP). The main goal of IP is to compute the interferences between sub-shapes of arguments. The IP uses DS to retrieve input data and store the results of intersections.使用DS检索输入数据和存储中间部分的结果 
  • Building Part (BP). The main goal of BP is to build required result of an operation. This part also uses DS to retrieve data and store the results.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值