UF_MODL_smooth_bsurface_data
Defined in: uf_modl_bsurf.h
int UF_MODL_smooth_bsurface_data(int cont_order_u, int cont_order_v, double dist_toler, double ang_toler, UF_MODL_bsurface_p_t bsurf, int * num_states, UF_MODL_state_p_t * states )
overview 概述
Makes a bsurface continuous to cont_order_x, where x refers to the u or v direction. The order of continuity may be any non-negative integer up to (but not including) the corresponding degrees of the bsurface. Selection of a given cont_order implies that all lower order continuities are to be achieved. The order of continuity is the number of derivatives that are required to exist at all points of the bsurface, in the corresponding u and v directions.
NX prefers surfaces to be continuous at least to order 1, in a manner called in this documentation G1+. It is stronger than mathematical G1, but is not quite C1. For G1+, at any row or column corresponding to a knot value with multiplicity equal to the degree of the surface in that direction, both tangent vectors (with respect to u and with respect to v) must have the same direction, but not necessarily the same length (if they are the same length, continuity C1 exists).
At any point in the surface, if cont_order_x cannot be achieved in the corresponding direction, the highest continuity Cn within tolerance is achieved. If C1 cannot be achieved, G1+ is achieved within tolerance and a state code is returned. If G1+ cannot be achieved an error is returned.
Any seam that has any angle larger than ang_toler is not smoothed, even if it's distance is within tolerance. Any seam that would require a change larger than dist_toler is not smoothed. Any seam that can be smoothed is smoothed even all of them cannot be smoothed.
Any knot that has a multiplicity high enough to make it possible for the surface to be discontinuous at the corresponding row or column of poles is checked. If the row or column of poles can be treated in such poles is checked. If the row or column of poles can be treated in such a way as to make the surface continuous to the given orders without changing the shape more than toler, it is made so in u and v. If the bsurface is closed in either or both u and v, the closure is also checked.
Continuity is achieved using a mathematical process called knot removal. Use this function conservatively. In particular, if simplification is to be done when the geometry is attached or edited, use this function only if the geometry has some problem that prevents its use. Knot removal may make the bsurface's equivalent surface (such as a cone) unrecognizable by the simplifier. It can also have a long running time (at orders of continuity greater than 1), because at every point where a change is made the surface must be evaluated to check that the change is within tolerance.
Bsurfaces that have end knots with a multiplcity greater than the order of the surface in that direction, or have interior knots with a multiplicity greater than surface order-1 in the respective directions, are not continuous, that is, they have gaps. Such bsurfaces are not of general utility in CAD/CAM work. NX cannot create them. This function may be used to "clean" up such bsurfaces.
使得一个二次曲面连续到 cont _ order _ x,其中 x 表示 u 或 v 方向。连续的次序可以是任何非负整数,直到(但不包括)二次曲面的对应度。给定 cont _ order 的选择意味着要实现所有的低阶连续性。连续性的次序是在相应的 u 和 v 方向上,在 B 面的所有点上需要存在的导数的个数。NX 希望曲面至少是连续的,至少是1级曲面,这种方式在本文档 G1 + 中被称为连续曲面。它比数学 G1更强,但不完全是 C1。对于 G1 + ,在任何行或列对应的节点值,其多重性等于该方向上曲面的度,两个切向量(相对于 u 和相对于 v)必须具有相同的方向,但不一定具有相同的长度(如果它们具有相同的长度,则存在连续性 C1)。在曲面的任意一点,如果在相应的方向上不能达到 cont _ order _ x,则可以达到容差范围内的最高连续性 Cn。如果不能实现 C1,则在允许范围内实现 G1 + ,并返回状态代码。如果无法实现 G1 + ,则返回错误。任何角度大于允许角度的接缝都不能平滑,即使距离在允许范围内。任何需要更改大于 dist _ toler 的接缝都不会平滑。任何可以平滑的接缝都被平滑了,即使所有的接缝都不能被平滑。任何节的多重性高到足以使表面在相应的一行或一列极点处不连续的情况被检查。如果行或列的杆可以处理在这样的杆被检查。如果可以用这样的方法处理杆列,使曲面连续到给定的顺序,而不改变形状多于公差,则在 u 和 v 中可以这样做。如果二次曲面在 u 和 v 中的一个或两个位置都是闭合的,那么闭包也会被检查。连续性是通过一个叫做结移除的数学过程来实现的。谨慎使用此函数。特别是,如果要在附加或编辑几何图形时进行简化,那么只有在几何图形出现问题而无法使用该函数时才使用该函数。去除节点可能使简化程序无法识别两曲面的等效曲面(例如锥面)。它也可以有一个很长的运行时间(在连续性的阶数大于1) ,因为在每一个点的变化,表面必须进行评估,以检查的变化是在公差之内。具有多重性大于该方向表面的阶的端节或具有多重性大于表面的阶的内部节的 B 面在各个方向上不是连续的,也就是说,它们具有间隙。这样的背面在 CAD/CAM 工作中没有通用性。NX 无法创建它们。这个函数可以用来“清理”这些表面。
UFUN例子
获取源码例子请搜索 里海NX二次开发3000例专栏
parameters 参数
| int | cont_order_u | Input | order of continuity to achieve in the u direction 在 u 方向上达到的连续顺序 |
| int | cont_order_v | Input | order of continuity to achieve in the v direction 在 v 方向上达到连续的阶 |
| double | dist_toler | Input | distance tolerance not to be exceeded 不得超过距离公差 |
| double | ang_toler | Input | angular tolerance not to be exceeded 不得超过角度公差 |
| UF_MODL_bsurface_p_t | bsurf | Input | spline surface data to make continuous 样条曲面数据,使连续 |
| int * | num_states | Output | number of states in states array 状态数组中的状态数 |
| UF_MODL_state_p_t * | states | Output to UF_free | state values for smoothing operation; if NULL is provided no states are returned. This array must be freed by calling UF_free. 平滑操作的状态值; 如果提供 NULL,则不返回状态。必须通过调用 UF _ free 来释放此数组。 |