UF_BREP_attach_geometry
Defined in: uf_brep.h
int UF_BREP_attach_geometry(UF_BREP_topology_t * topology, const UF_BREP_geometry_t * geometry, const UF_BREP_orientation_t geom_sense, const UF_BREP_options_t * options, int * num_states, UF_BREP_state_t * * states )
overview 概述
The given geometry is created and attached to the topology item indicated. UF_BREP_attach_geometry returns an error if the geometry already has attached geometry.
No geometry is permitted to be attached to a topology item not of the correct type. Only edges and fins may have curves, only faces may have surfaces, and only vertices may have points. You may attach 3D curves to edges and SP curves to the fins of that edge. The additional information is sometimes useful in creating a valid edge. For curves, geom_sense is forward if the curve tangent is pointing in the same direction as traversing the edge from the start vertex to the end vertex. For surfaces, geom_sense is forward if the surface normal points in the face normal direction (which the loop direction determines).
Simplifications performed on b-geometry are the following: A bspline that is linear is converted to a line. This is done for linear and quadratic spline data.
A bspline that represents a circle is converted to a circle.
A surface of revolution with a line as the generator is converted to a cylinder or cone, if the generator is aligned suitably.
A surface of revolution with an arc as the generator is converted to a sphere or torus, if the generator is aligned suitably. Even partial arcs are simplified to the complete surface.
A bsurface that is planar is converted to a plane. This is done for linear and quadratic bsurface data.
A bsurface that is linear in one direction and circular in the other is converted to a cylinder or cone.
A bsurface that is circular in both directions is converted to a sphere or torus.
Please note the following items:
Some configurations of spline data that represent analytic geometry may not be simplified. This is because particular forms may not be recognized by Open API.
If simplification is requested, and SP curves are to be used to construct the face, it is necessary that the simplification introduce a transformation of the surface parameterization that is linear in nature. Any other transformation causes SP curves to assume an incorrect shape. In particular, conversions of b-surfaces and b-curves to their analytic equivalents may introduce parameterization changes that are incompatible with using SP curves for face construction. If the latter is the case, a state that so indicates is returned.
Tangent discontinuous seams in the attached surface, if any, may result in a truncated body.
创建给定的几何图形并将其附加到指定的拓扑项。如果几何图形已经附加了几何图形,则 UF _ BREP _ attated-ç 返回一个错误。不允许将任何几何图形附加到不属于正确类型的拓扑项。只有边和鳍可以有曲线,只有面可以有表面,只有顶点可以有点。你可以将三维曲线附加到边缘上,将 SP 曲线附加到边缘的鳍上。附加信息有时在创建有效边缘时很有用。对于曲线,如果曲线切线指向与从起点到终点的边沿相同的方向,则 geom _ sense 是向前的。对于表面,如果表面法线指向表面法线方向(由循环方向决定) ,则 geom _ sense 是向前的。对 b 几何进行的简化如下: 将线性的 bspline 转换为直线。这是对线性和二次样条数据所做的。表示圆的 bspline 被转换为圆。一种旋转曲面,如果发电机适当地对齐,则以线作为发电机的旋转曲面可转换为圆柱体或圆锥体。一种旋转曲面,如果发生器适当对齐,则以弧形作为发生器转换为球面或环面。即使是部分弧也被简化为完整的曲面。一个平面的二次曲面被转换成一个平面。这是对线性和二次的二次曲面数据所做的。一个在一个方向上是线性的,在另一个方向上是圆形的面被转换成圆柱体或圆锥体。在两个方向上都是圆形的二次曲面被转换成球面或环面。请注意以下事项: 表示解析几何的样条数据的一些配置可能不会被简化。这是因为 OpenAPI 可能无法识别特定的表单。如果要求进行简化,并且要使用 SP 曲线来构造表面,那么这种简化就有必要引入表面参量化的线性变换。任何其他变换都会导致 SP 曲线呈现不正确的形状。特别是,将 b 曲面和 b 曲线转换为它们的解析等价物,可能会引起参量化的变化,这与使用 SP 曲线进行人脸构造是不相容的。如果是后者,则返回如此指示的状态。切线不连续的接缝在附着的表面,如果有的话,可能会导致一个截断的主体。
UFUN例子
获取源码例子请搜索 里海NX二次开发3000例专栏
parameters 参数
| UF_BREP_topology_t * | topology | Input | Pointer to topological structure containing item to which the geometry is to be attached 指向拓扑结构的指针,该结构包含要附加几何图形的项 |
| const UF_BREP_geometry_t * | geometry | Input | Pointer to geometry structure defining geometry to be attached 指向几何结构的指针,定义要附加的几何体 |
| const UF_BREP_orientation_t | geom_sense | Input | Geometry orientation with respect to the topology entity. For faces, fins, and edges use: UF_BREP_ORIENTATION_FORWARD or UF_BREP_ORIENTATION_REVERSE. Otherwise use UF_BREP_ORIENTATION_NONE. 相对于拓扑实体的几何取向。对于面、鳍和边使用: UF _ BREP _ ORIENTATION _ FORWARD 或 UF _ BREP _ ORIENTATION _ REVERSE。否则使用 UF _ BREP _ ORIENTATION _ NONE。 |
| const UF_BREP_options_t * | options | Input | Applicable options: Simplification, UF_BREP_simplify_option 适用选项: Simplification,UF _ BREP _ simple _ option |
| int * | num_states | Output | number of states in the states array 状态数组中的状态数 |
| UF_BREP_state_t * * | states | Output to UF_free | UF_BREP allocated array. If the caller passes in a NULL, UF_BREP does not allocate the array. This should be freed by calling UF_free. UF _ BREP 分配数组。如果调用方传入 NULL,则 UF _ BREP 不会分配数组。这应该通过调用 UF _ free 来释放。 |