标准拓扑对象 (Standard Topological Objects)
The following standard topological objects can be created:
可创建以下标准拓扑对象:
- Vertices; 顶点
- Edges; 边
- Faces; 面
- Wires; 线框
- Polygonal wires; 多边形线框
- Shells; 壳
- Solids. 实体
构造与修改的根类
There are two root classes for their construction and modification:
其构造和修改有两个根类:
-
BRepBuilderAPI_MakeShape 延迟类
The deferred classBRepBuilderAPI_MakeShape
is the root of allBRepBuilderAPI
classes, which build shapes. It inherits from the classBRepBuilderAPI_Command
and provides a field to store the constructed shape.
延迟类BRepBuilderAPI_MakeShape
是所有构建形状的BRepBuilderAPI
类的根,它继承自BRepBuilderAPI_Command
类并提供存储构造形状的字段。 -
BRepBuilderAPI_ModifyShape 延迟类
The deferred classBRepBuilderAPI_ModifyShape
is used as a root for the shape modifications. It inheritsBRepBuilderAPI_MakeShape
and implements the methods used to trace the history of all sub-shapes.
延迟类BRepBuilderAPI_ModifyShape
用作形状修改的根,它继承BRepBuilderAPI_MakeShape
并实现用于追踪所有子形状历史的方法。
顶点 (Vertex)
BRepBuilderAPI_MakeVertex creates a new vertex from a 3D point from gp.
BRepBuilderAPI_MakeVertex 从 gp 的三维点创建新顶点。
gp_Pnt P(0, 0, 10); // 定义三维点P
TopoDS_Vertex V = BRepBuilderAPI_MakeVertex(P); // 创建顶点V
This class always creates a new vertex and has no other methods.
此类始终创建新顶点,且无其他方法。
边 (Edge)
基本边构造方法 (Basic edge construction method)
Use BRepBuilderAPI_MakeEdge to create from a curve and vertices. The basic method constructs an edge from a curve, two vertices, and two parameters.
使用BRepBuilderAPI_MakeEdge从曲线和顶点创建边。基本方法通过曲线、两个顶点和两个参数构造边。
Handle(Geom_Curve) C = ...; // 一条曲线
TopoDS_Vertex V1 = ..., V2 = ...; // 两个顶点
Standard_Real p1 = ..., p2 = ..; // 两个参数
TopoDS_Edge E = BRepBuilderAPI_MakeEdge(C, V1, V2, p1, p2); // 创建边E
where:
- C is the domain of the edge;
C是边的定义域; - V1 is the first vertex oriented FORWARD;
V1是方向为FORWARD的第一个顶点; - V2 is the second vertex oriented REVERSED;
V2是方向为REVERSED的第二个顶点; - p1 and p2 are the parameters for the vertices V1 and V2 on the curve.
p1和p2是顶点V1和V2在曲线上的参数。
The default tolerance is associated with this edge.
此边关联默认容差。
基本边构造规则 (Basic Edge Construction)
The following rules apply to the arguments:
参数遵循以下规则:
曲线 (The curve)
- Must not be a Null Handle.
不能为Null Handle。 - If the curve is a trimmed curve, the basis curve is used.
若曲线为修剪曲线,则使用基曲线。
顶点 (The vertices)
- Can be null shapes. When V1 or V2 is Null the edge is open in the corresponding direction and the corresponding parameter p1 or p2 must be infinite (i.e p1 is RealFirst(), p2 is RealLast()).
可以是空形状。当V1或V2为空时,边在对应方向开放,且对应参数p1或p2必须为无穷大(即p1为RealFirst(),p2为RealLast())。 - Must be different vertices if they have different 3d locations and identical vertices if they have the same 3d location (identical vertices are used when the curve is closed).
若三维位置不同则必须为不同顶点,若三维位置相同则为相同顶点(曲线闭合时使用相同顶点)。
参数 (The parameters)
- Must be increasing and in the range of the curve, i.e.:
必须递增且在曲线范围内,即:C->FirstParameter() <= p1 < p2 <= C->LastParameter()
- If the parameters are decreasing, the Vertices are switched, i.e. V2 becomes V1 and V1 becomes V2.
若参数递减,则交换顶点,即V2变为V1,V1变为V2。 - On a periodic curve the parameters p1 and p2 are adjusted by adding or subtracting the period to obtain p1 in the range of the curve and p2 in the range p1 < p2 <= p1+ Period. So on a parametric curve p2 can be greater than the second parameter, see the figure below.
在周期曲线上,通过加减周期调整参数p1和p2,使p1在曲线范围内,p2在p1 < p2 <= p1 + 周期范围内。因此在参数曲线上,p2可以大于第二参数(见下图)。 - Can be infinite but the corresponding vertex must be Null (see above).
可以是无穷大,但对应顶点必须为空(见上文)。 - The distance between the Vertex 3d location and the point evaluated on the curve with the parameter must be lower than the default precision.
顶点三维位置与曲线参数对应点的距离必须低于默认精度。
The figure below illustrates two special cases, a semi-infinite edge and an edge on a periodic curve.
下图展示了两种特殊情况:一条半无限边和一条位于周期曲线上的边。
补充边构建方法
存在从基本方法派生而来的补充边构建方法。
BRepBuilderAPI_MakeEdge类提供了一些方法,这些方法都是对前者的简化调用:
参数可以省略。它们通过将顶点投影到曲线上计算得出。
可以使用3D点(gp中的Pnt)代替顶点。顶点由这些点创建。在创建相连顶点时,指定顶点很有用。
如果指定了参数,则可以省略顶点或点。这些点通过在曲线上计算参数得出。
顶点或点以及参数都可以省略。此时使用曲线的第一个和最后一个参数。
以下五种方法由此从基本构建派生而来:
Handle(Geom_Curve) C = ...; // 一条曲线
TopoDS_Vertex V1 = ..., V2 = ...; // 两个顶点
Standard_Real p1 = ..., p2 = ...; // 两个参数
gp_Pnt P1 = ..., P2 = ...; // 两个点
TopoDS_Edge E;
// 将顶点投影到曲线上
E = BRepBuilderAPI_MakeEdge(C, V1, V2);
// 从点创建顶点
E = BRepBuilderAPI_MakeEdge(C, P1, P2, p1, p2);
// 从点创建顶点并将它们投影
E = BRepBuilderAPI_MakeEdge(C, P1, P2);
// 从参数计算点
E = BRepBuilderAPI_MakeEdge(C, p1, p2);
// 从整条曲线创建边
E = BRepBuilderAPI_MakeEdge(C);
对于gp包中的曲线而非Geom中的Curve,也提供了六种方法(上述五种加上基本方法)。这些方法从gp的曲线创建相应的Geom曲线,并针对以下类实现:
gp_Lin创建Geom_Line
gp_Circ创建Geom_Circle
gp_Elips创建Geom_Ellipse
gp_Hypr创建Geom_Hyperbola
gp_Parab创建Geom_Parabola
还有两种从两个顶点或两个点构建边的方法。这些方法假定曲线是一条直线;顶点或点的位置必须不同。
TopoDS_Vertex V1 = ..., V2 = ...; // 两个顶点
gp_Pnt P1 = ..., P2 = ...; // 两个点
TopoDS_Edge E;
// 从两个顶点创建直线边
E = BRepBuilderAPI_MakeEdge(V1, V2);
// 从两个点创建直线边
E = BRepBuilderAPI_MakeEdge(P1, P2);
其他信息和错误状态
BRepBuilderAPI_MakeEdge类能够提供额外信息并返回错误状态。
若将BRepBuilderAPI_MakeEdge作为类使用,它可提供两个顶点。当顶点未作为参数提供时(例如边由曲线和参数构建而成),这一功能十分实用。Vertex1和Vertex2这两个方法可返回顶点。需注意,若边在相应方向上是开放的,返回的顶点可能为空。
Error方法会返回BRepBuilderAPI_EdgeError枚举中的一个值。当IsDone方法返回False时,可利用该值分析错误原因。这些值包括:
- EdgeDone – 未发生错误,IsDone返回True。
- PointProjectionFailed – 未提供参数,但3D点在曲线上的投影失败。若点到曲线的距离大于精度,就会出现这种情况。
- ParameterOutOfRange – 给定的参数不在C->FirstParameter()和C->LastParameter()范围内。
- DifferentPointsOnClosedCurve – 两个顶点或点的位置不同,但它们是闭合曲线的端点。
- PointWithInfiniteParameter – 有限坐标点与无限参数相关联(关于无限值的定义,请参阅Precision包)。
- DifferentsPointAndParameter – 3D点与通过参数在曲线上计算出的点之间的距离大于精度。
- LineThroughIdenticPoints – 给定两个相同的点来定义一条直线(在不使用曲线的情况下构建边),使用gp::Resolution来测试是否存在混淆。
以下示例创建了一个以原点为中心、尺寸为H和L的矩形,其圆角半径为R。边和顶点分别存储在数组theEdges和theVertices中。我们使用Array1OfShape类(即不是边或顶点的数组)。请参见下图。
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <TopoDS_Shape.hxx>
#include <gp_Circ.hxx>
#include <gp.hxx>
#include <TopoDS_Wire.hxx>
#include <TopTools_Array1OfShape.hxx>
#include <BRepBuilderAPI_MakeWire.hxx>
// 使用MakeArc方法创建一条边和两个顶点
void MakeArc(const Standard_Real x, const Standard_Real y,
const Standard_Real R,
const Standard_Real ang,
TopoDS_Shape& E,
TopoDS_Shape& V1,
TopoDS_Shape& V2)
{
gp_Ax2 origin = gp::XOY();
gp_Vec offset(x, y, 0.0);
origin.Translate(offset);
BRepBuilderAPI_MakeEdge me(gp_Circ(origin, R), ang, ang + M_PI/2);
E = me.Edge();
V1 = me.Vertex1();
V2 = me.Vertex2();
}
TopoDS_Wire MakeFilletedRectangle(const Standard_Real H,
const Standard_Real L,
const Standard_Real R)
{
TopTools_Array1OfShape theEdges(1, 8);
TopTools_Array1OfShape theVertices(1, 8);
// 创建四个圆角边和顶点
Standard_Real x = L/2 - R;
Standard_Real y = H/2 - R;
MakeArc(x, -y, R, 3.0*M_PI/2.0, theEdges(2), theVertices(2), theVertices(3));
MakeArc(x, y, R, 0.0, theEdges(4), theVertices(4), theVertices(5));
MakeArc(-x, y, R, M_PI/2.0, theEdges(6), theVertices(6), theVertices(7));
MakeArc(-x, -y, R, M_PI, theEdges(8), theVertices(8), theVertices(1));
// 创建四条直边
for (Standard_Integer i = 1; i <= 7; i += 2) {
theEdges(i) = BRepBuilderAPI_MakeEdge(
TopoDS::Vertex(theVertices(i)),
TopoDS::Vertex(theVertices(i+1))
);
}
// 使用BRepBuilderAPI_MakeWire创建线框
BRepBuilderAPI_MakeWire MW;
for (Standard_Integer i = 1; i <= 8; i++) {
MW.Add(TopoDS::Edge(theEdges(i)));
}
return MW.Wire();
}
Edge 2D
Use BRepBuilderAPI_MakeEdge2d class to make edges on a working plane from 2d curves. The working plane is a default value of the BRepBuilderAPI package (see the Plane methods).
边2D
使用BRepBuilderAPI_MakeEdge2d类从2D曲线在工作平面上创建边。工作平面是BRepBuilderAPI包的默认值(请参阅Plane方法)。
The BRepBuilderAPI_MakeEdge2d class is strictly similar to BRepBuilderAPI_MakeEdge, but it uses 2D geometry from gp and Geom2d instead of 3D geometry.
BRepBuilderAPI_MakeEdge2d类与BRepBuilderAPI_MakeEdge类严格相似,但它使用gp和Geom2d的2D几何而非3D几何。
Polygon
The BRepBuilderAPI_MakePolygon class is used to build polygonal wires from vertices or points. Points are automatically changed to vertices as in BRepBuilderAPI_MakeEdge.
多边形
BRepBuilderAPI_MakePolygon类用于从顶点或点构建多边形线框。与BRepBuilderAPI_MakeEdge类似,点会自动转换为顶点。
The basic usage of BRepBuilderAPI_MakePolygon is to create a wire by adding vertices or points using the Add method. At any moment, the current wire can be extracted. The close method can be used to close the current wire. In the following example, a closed wire is created from an array of points.
BRepBuilderAPI_MakePolygon的基本用法是通过Add方法添加顶点或点来创建线框。随时可以提取当前线框,Close方法可用于闭合当前线框。以下示例从点数组创建闭合线框:
#include <TopoDS_Wire.hxx>
#include <BRepBuilderAPI_MakePolygon.hxx>
#include <TColgp_Array1OfPnt.hxx>
TopoDS_Wire ClosedPolygon(const TColgp_Array1OfPnt& Points)
{
BRepBuilderAPI_MakePolygon MP;
for (Standard_Integer i = Points.Lower(); i <= Points.Upper(); i++)
{
MP.Add(Points(i));
}
MP.Close();
return MP.Wire();
}
Short-cuts are provided for 2, 3, or 4 points or vertices. Those methods have a Boolean last argument to tell if the polygon is closed. The default value is False.
该类为2、3或4个点/顶点提供快捷方法,这些方法的最后一个布尔参数用于指定多边形是否闭合(默认值为False)。
Two examples:
- Example of a closed triangle from three vertices:
TopoDS_Wire W = BRepBuilderAPI_MakePolygon(V1,V2,V3,Standard_True);
- Example of an open polygon from four points:
TopoDS_Wire W = BRepBuilderAPI_MakePolygon(P1,P2,P3,P4);
两个示例:
- 从三个顶点创建闭合三角形:
TopoDS_Wire W = BRepBuilderAPI_MakePolygon(V1,V2,V3,Standard_True);
- 从四个点创建开放多边形:
TopoDS_Wire W = BRepBuilderAPI_MakePolygon(P1,P2,P3,P4);
The BRepBuilderAPI_MakePolygon class maintains a current wire. The current wire can be extracted at any moment and the construction can proceed to a longer wire. After each point insertion, the class maintains the last created edge and vertex, which are returned by the methods Edge, FirstVertex and LastVertex.
BRepBuilderAPI_MakePolygon类维护当前线框,可随时提取当前线框并继续构建更长的线框。每次插入点后,类会维护最后创建的边和顶点,可通过Edge、FirstVertex和LastVertex方法返回。
When the added point or vertex has the same location as the previous one, it is not added to the current wire but the most recently created edge becomes Null. The Added method can be used to test this condition. The MakePolygon class never raises an error. If no vertex has been added, the Wire is Null. If two vertices are at the same location, no edge is created.
当添加的点/顶点与前一个位置相同时,不会添加到当前线框,且最近创建的边变为Null。可使用Added方法测试此条件。MakePolygon类从不抛出错误:若未添加任何顶点,线框为Null;若两个顶点位置相同,则不创建边。
Face
Use BRepBuilderAPI_MakeFace class to create a face from a surface and wires. An underlying surface is constructed from a surface and optional parametric values. Wires can be added to the surface. A planar surface can be constructed from a wire. An error status can be returned after face construction.
面
使用BRepBuilderAPI_MakeFace类从曲面和线框创建面。基础曲面由曲面和可选参数值构建而成。线框可以添加到曲面上。平面曲面可由线框构建。面构建后可返回错误状态。
Basic face construction method
A face can be constructed from a surface and four parameters to determine a limitation of the UV space. The parameters are optional, if they are omitted the natural bounds of the surface are used. Up to four edges and vertices are created with a wire. No edge is created when the parameter is infinite.
基本面构建方法
面可由曲面和四个参数构建,以确定UV空间的限制范围。参数为可选,若省略则使用曲面的自然边界。最多通过线框创建四条边和顶点。当参数为无穷大时,不创建边。
Handle(Geom_Surface) S = ...; // 一个曲面
Standard_Real umin, umax, vmin, vmax; // 参数
TopoDS_Face F = BRepBuilderAPI_MakeFace(S, umin, umax, vmin, vmax);
Basic Face Construction
To make a face from the natural boundary of a surface, the parameters are not required:
基本面构建
若从曲面的自然边界创建面,则无需参数:
Handle(Geom_Surface) S = ...; // 一个曲面
TopoDS_Face F = BRepBuilderAPI_MakeFace(S);
Constraints on the parameters are similar to the constraints in BRepBuilderAPI_MakeEdge.
- umin, umax (vmin, vmax) must be in the range of the surface and must be increasing.
- On a U (V) periodic surface umin and umax (vmin, vmax) are adjusted.
- umin, umax, vmin, vmax can be infinite. There will be no edge in the corresponding direction.
参数约束与BRepBuilderAPI_MakeEdge中的约束类似:
- umin, umax (vmin, vmax) 必须在曲面范围内且递增。
- 在U (V) 周期曲面上,umin和umax (vmin和vmax) 会被调整。
- umin, umax, vmin, vmax可以是无穷大,相应方向将不创建边。
Supplementary face construction methods
The two basic constructions (from a surface and from a surface and parameters) are implemented for all gp package surfaces, which are transformed in the corresponding Surface from Geom.
补充面构建方法
两种基本构建方式(从曲面和从曲面+参数)适用于所有gp包曲面,这些曲面会转换为对应的Geom曲面。
gp包曲面 | Geom包曲面 |
---|---|
gp_Pln | Geom_Plane |
gp_Cylinder | Geom_CylindricalSurface |
gp_Cone | Geom_ConicalSurface |
gp_Sphere | Geom_SphericalSurface |
gp_Torus | Geom_ToroidalSurface |
Once a face has been created, a wire can be added using the Add method. For example, the following code creates a cylindrical surface and adds a wire.
面创建后,可使用Add方法添加线框。例如,以下代码创建圆柱曲面并添加线框:
gp_Cylinder C = ..; // 一个圆柱
TopoDS_Wire W = ...; // 一个线框
BRepBuilderAPI_MakeFace MF(C);
MF.Add(W);
TopoDS_Face F = MF;
More than one wire can be added to a face, provided that they do not cross each other and they define only one area on the surface. (Note that this is not checked).
可向面添加多个线框,但需确保它们不交叉且仅在曲面上定义一个区域(注意:此条件未被检查)。
For one wire, a simple syntax is provided to construct the face from the surface and the wire. The above lines could be written:
对于单个线框,提供了从曲面和线框构建面的简洁语法。上述代码可写为:
TopoDS_Face F = BRepBuilderAPI_MakeFace(C, W);
The edges on a face must have a parametric curve description. If there is no parametric curve for an edge of the wire on the face it is computed by projection, moreover, the calculation is possible only for the planar face.
面上的边必须有参数曲线描述。若面上线框的边没有参数曲线,则通过投影计算,且仅对平面面可行。
A planar face can be created from only a wire, provided this wire defines a plane. For example, to create a planar face from a set of points you can use BRepBuilderAPI_MakePolygon and BRepBuilderAPI_MakeFace.
仅当线框定义平面时,可由线框创建平面面。例如,使用BRepBuilderAPI_MakePolygon和BRepBuilderAPI_MakeFace从点集创建平面面:
#include <TopoDS_Face.hxx>
#include <TColgp_Array1OfPnt.hxx>
#include <BRepBuilderAPI_MakePolygon.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
TopoDS_Face PolygonalFace(const TColgp_Array1OfPnt& thePnts)
{
BRepBuilderAPI_MakePolygon MP;
for (Standard_Integer i = thePnts.Lower(); i <= thePnts.Upper(); i++)
{
MP.Add(thePnts(i));
}
MP.Close();
TopoDS_Face F = BRepBuilderAPI_MakeFace(MP.Wire());
return F;
}
The last use of MakeFace is to copy an existing face to add new wires. For example, the following code adds a new wire to a face:
MakeFace的最后一种用法是复制现有面以添加新线框。例如,以下代码向面添加新线框:
TopoDS_Face F = ...; // 一个面
TopoDS_Wire W = ...; // 一个线框
F = BRepBuilderAPI_MakeFace(F, W);
To add more than one wire an instance of the BRepBuilderAPI_MakeFace class can be created with the face and the first wire and the new wires inserted with the Add method.
若要添加多个线框,可使用面和第一个线框创建BRepBuilderAPI_MakeFace实例,然后使用Add方法插入新线框。
Error status
The Error method returns an error status, which is a term from the BRepBuilderAPI_FaceError enumeration.
错误状态
Error方法返回错误状态,该状态为BRepBuilderAPI_FaceError枚举中的值:
- FaceDone – 未发生错误。
- NoFace – 算法未初始化;使用了空构造函数。
- NotPlanar – 未提供曲面且线框非平面。
- CurveProjectionFailed – 面边在曲面参数空间中未找到曲线。
- ParametersOutOfRange – umin, umax, vmin, vmax参数超出曲面范围。
Wire
The wire is a composite shape built not from a geometry, but by the assembly of edges. BRepBuilderAPI_MakeWire class can build a wire from one or more edges or connect new edges to an existing wire.
线框
线框是一种复合形状,并非由几何图形构建,而是通过边的组合形成。BRepBuilderAPI_MakeWire类可以从一个或多个边构建线框,或将新边连接到现有线框。
Up to four edges can be used directly, for example:
TopoDS_Wire W = BRepBuilderAPI_MakeWire(E1,E2,E3,E4);
最多可直接使用四条边,例如:
TopoDS_Wire W = BRepBuilderAPI_MakeWire(E1,E2,E3,E4);
For a higher or unknown number of edges the Add method must be used; for example, to build a wire from an array of shapes (to be edges).
TopTools_Array1OfShapes theEdges;
BRepBuilderAPI_MakeWire MW;
for (Standard_Integer i = theEdge.Lower(); i <= theEdges.Upper(); i++)
MW.Add(TopoDS::Edge(theEdges(i)));
TopoDS_Wire W = MW;
对于更多或未知数量的边,必须使用Add方法;例如,从形状数组(作为边)构建线框:
TopTools_Array1OfShapes theEdges;
BRepBuilderAPI_MakeWire MW;
for (Standard_Integer i = theEdge.Lower(); i <= theEdges.Upper(); i++)
MW.Add(TopoDS::Edge(theEdges(i)));
TopoDS_Wire W = MW;
The class can be constructed with a wire. A wire can also be added. In this case, all the edges of the wires are added. For example to merge two wires:
#include <TopoDS_Wire.hxx>
#include <BRepBuilderAPI_MakeWire.hxx>
TopoDS_Wire MergeWires(const TopoDS_Wire& W1, const TopoDS_Wire& W2)
{
BRepBuilderAPI_MakeWire MW(W1);
MW.Add(W2);
return MW;
}
该类可以用线框构造,也可以添加线框(此时会添加线框的所有边)。例如合并两个线框:
#include <TopoDS_Wire.hxx>
#include <BRepBuilderAPI_MakeWire.hxx>
TopoDS_Wire MergeWires(const TopoDS_Wire& W1, const TopoDS_Wire& W2)
{
BRepBuilderAPI_MakeWire MW(W1);
MW.Add(W2);
return MW;
}
BRepBuilderAPI_MakeWire class connects the edges to the wire. When a new edge is added if one of its vertices is shared with the wire it is considered as connected to the wire. If there is no shared vertex, the algorithm searches for a vertex of the edge and a vertex of the wire, which are at the same location (the tolerances of the vertices are used to test if they have the same location). If such a pair of vertices is found, the edge is copied with the vertex of the wire in place of the original vertex. All the vertices of the edge can be exchanged for vertices from the wire. If no connection is found the wire is considered to be disconnected. This is an error.
BRepBuilderAPI_MakeWire类将边连接到线框。添加新边时,若其顶点与线框共享,则视为已连接。若无共享顶点,算法会搜索边与线框中位置相同的顶点(使用顶点容差测试)。若找到此类顶点对,边会被复制并使用线框顶点替换原始顶点,边的所有顶点都可与线框顶点交换。若未找到连接,线框视为断开,这是错误情况。
BRepBuilderAPI_MakeWire class can return the last edge added to the wire (Edge method). This edge can be different from the original edge if it was copied.
The Error method returns a term of the BRepBuilderAPI_WireError enumeration:
- WireDone – no error occurred.
- EmptyWire – no initialization of the algorithm, an empty constructor was used.
- DisconnectedWire – the last added edge was not connected to the wire.
- NonManifoldWire – the wire with some singularity.
BRepBuilderAPI_MakeWire类可返回添加到线框的最后一条边(Edge方法),若边被复制,则可能与原始边不同。
Error方法返回BRepBuilderAPI_WireError枚举值:
- WireDone – 未发生错误。
- EmptyWire – 算法未初始化(使用空构造函数)。
- DisconnectedWire – 最后添加的边未连接线框。
- NonManifoldWire – 线框存在奇点。
Shell
The shell is a composite shape built not from a geometry, but by the assembly of faces. Use BRepBuilderAPI_MakeShell class to build a Shell from a set of Faces. What may be important is that each face should have the required continuity. That is why an initial surface is broken up into faces.
壳
壳是一种复合形状,并非由几何图形构建,而是通过面的组合形成。使用BRepBuilderAPI_MakeShell类从一组面构建壳。重要的是每个面应具有所需的连续性,这就是初始曲面需要分解为多个面的原因。
Solid
The solid is a composite shape built not from a geometry, but by the assembly of shells. Use BRepBuilderAPI_MakeSolid class to build a Solid from a set of Shells. Its use is similar to the use of the MakeWire class: shells are added to the solid in the same way that edges are added to the wire in MakeWire.
实体
实体是一种复合形状,并非由几何图形构建,而是通过壳的组合形成。使用BRepBuilderAPI_MakeSolid类从一组壳构建实体。其用法类似于MakeWire类:向实体添加壳的方式与向线框添加边的方式相同。