eryar@163.com

Abstract. Sweeps are the objects you obtain by sweeping a profile along a path. Sweep is a very useful modeling algorithm. The paper focus on the introduction of the sweep algorithms in the opencascade.

Key Words. Sweep, Prism, Revol, Pipe, Frenet Trihedron,

### 1. Introduction

Figure 1. Generating a sweep

l BRepPrimAPI_MakePrism：生成线性扫掠；

l BRepPrimAPI_MakeRevol：生成旋转扫掠；

l BRepOffsetAPI_MakePipeShell： 生成通用的扫掠；

### 2.Prism

```polyline p  0 0 0 1 0 0 1 2 0 0 1 0 0 0 0

prism r p 0 0 1

vdisplay p r```

### 3.Revol

```polyline p  0 0 0 1 0 0 1 2 0 0 1 0 0 0 0

revol r p 3 0 0 0 1 0 280

vdisplay p r```

### 4.Pipe Shell

l mksweep

l deletesweep

l sestsweep

l buildsweep

```setsweep options [arg1 [arg2 [...]]] : options are :

-FR : Tangent and Normal are given by Frenet trihedron

-CF : Tangente is given by Frenet, the Normal is computed to minimize the torsion

-DT : discrete trihedron

-DX Surf : Tangent and Normal are given by Darboux trihedron,

Surf have to be a shell or a face

-CN dx dy dz : BiNormal is given by dx dy dz

-FX Tx Ty TZ [Nx Ny Nz] : Tangent and Normal are fixed

-G guide  0|1(Plan|ACR)  0|1|2(no contact|contact|contact on border) : with guide```

-FR选项：切矢和法向由Frenet标架确定；

-CF选项：切矢由Frenet标架指定，法向通过计算最小扭转来确定；

-DT选项：切矢和法向由Darboux标架确定；

-CN选项：副法向由指定的dx, dy, dz确定；

-FT：切矢和法向是固定的；

```polyline p  0 0 0 1 0 0 1 2 0 0 1 0

circle c 0 0 0 1 0 0 0.2

mkedge e c

wire w e

mksweep p

setsweep -FX 1 0 0

buildsweep r -C

vdisplay p w r```

```mksweep p

setsweep -FR

buildsweep r -C

vdisplay p w r```

```buildsweep result [-M/-C/-R] [-S] [tol] : options are

-M : Discontinuities are treated by Modfication of

the sweeping mode : it is the default

-C : Discontinuities are treated like Right Corner

Treatement is Extent && Intersect

-R : Discontinuities are treated like Round Corner

Treatement is Intersect and Fill

-S : To build a Solid```

buildsweep有指定不连续的处理方式及是否生成实体。其中

n -C：将路径Path中不连续的地方通过延长和相交进行处理；

n -R：将路径Path中不连续的地方通过相交和填充进行处理；

```polyline p  0 0 0 1 0 0 1 2 0 0 1 0 0 0 0

circle c 0 0 0 1 0 0 0.2

mkedge e c

wire w e

mksweep p

buildsweep r -C

vdisplay p w r```

`buildsweep r -R`