torus torus intersection论文笔记

第一部分是圆环面交线的拓扑分析
圆环面上重要的几个圆:内圆、外圆、大圆、小圆。
1.圆环面参数域中交线的原象:经过变换后T2转移到xoy平面上,T2隐式方程带入T1参数方程中,并通过正切半角公式转换参数,得F(u,v)。
2.交线原象的特征点:左右上下边界点(成对出现)(记为1和2)、转折点(对于某一参数的偏导为0,另一偏导不为0)(记为3)、奇异点(两个偏导为0)(判别式判定)(isolated point,cusp,branch point(记为4))。(这些特征点不是Torus的特性)
给出一个定理:交线原象的显式分段,端点为特征点,分段无交。
特征点的拓扑特征:SSP SEP DSP DEP SSEP DSEP。
3.21个类别:1、2(斜率正负)、3(二阶导数正负)、4、123(正负)、124(同正、同负、异号)、12(正负)、13(正负)、23(正负)、14、24(同正、同负、异号)。
4.用扰动方法处理退化情况:
斜率为0:求解F( u 0 u_0 u0+ δ \delta δ,v) = 0 和 F( u 0 u_0 u0- δ \delta δ,v) = 0,v2-v1的符号是斜率符号。
二阶导数为0或特征点是cusp:求解F( u 0 u_0 u0+ δ \delta δ,v) = 0 和 F( u 0 u_0 u0- δ \delta δ,v) = 0,若F( u 0 u_0 u0- δ \delta δ,v) = 0有两根而F( u 0 u_0 u0+ δ \delta δ,v) = 0无根,二阶导数为负;若F( u 0 u_0 u0+ δ \delta δ,v) = 0有两根而F( u 0 u_0 u0- δ \delta δ,v) = 0无根,二阶导数为正;若两个方程都有根,选择忽略该点。
两斜率: F u u = 0 F_{uu} = 0 Fuu=0则k1为0,求解F( u 0 u_0 u0+ δ \delta δ,v) = 0 和 F( u 0 u_0 u0- δ \delta δ,v) = 0,v2-v1的符号是k1符号。 F v v = 0 F_{vv} = 0 Fvv=0则k2为无穷,求解F(u, v 0 v_0 v0+ δ \delta δ) = 0 和 F(u, v 0 v_0 v0- δ \delta δ) = 0,u2-u1的符号是k2符号。
5.构造原象曲线:有一套算法,定义数据结构存储特征点,记录每个特征点沿v轴往下的分支条数。

第二部分是细化曲线
这是个自适应的方法。
首先估计误差,AB两点的T1对应参数分别为(u1,v1)、(u2,v2),求解F( u 1 + u 2 2 \frac{u_1+u_2}{2} 2u1+u2,v) = 0,得到值 v 0 v_0 v0,此点为C,把C到线段AB的距离记为误差。
之后一套算法,大概是不断细分曲线的方法来逼近误差。

第三部分是计算交线里的圆

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
extern UFUNEXPORT int UF_MODL_ask_face_data( tag_t face ,/* <I> Face obj_id / int * type ,/ <O> Face type is NX surface type code 16 = cylinder 17 = cone 18 = sphere 19 = revolved (toroidal) 20 = extruded 22 = bounded plane 23 = fillet (blend) 43 = b-surface 65 = offset surface 66 = foreign surface / double point[] ,/ <O,len:3> Point information is returned according to the value of type as follows. Plane = Position in plane Cylinder= Position on axis Cone = Position on axis Sphere = Center position Torus = Center position Revolved = Position on axis / double dir[] ,/ <O,len:3> Direction information is returned according to the value of type as follows. Plane = Normal direction Cylinder= Axis direction Cone = Axis direction Torus = Axis direction Revolved = Axis direction / double box[] ,/ <O,len:6> Face boundary. The coordinates of the opposite corners of a rectangular box with sides parallel to X, Y, and Z axes (Absolute Coordinate System) are returned. The box contains the specified face and is usually close to the minimum possible size, but this is not guaranteed. box[0] = Xmin box[1] = Ymin box[2] = Zmin box[3] = Xmax box[4] = Ymax box[5] = Zmax / double * radius ,/ <O> Face major radius: For a cone, the radius is taken at the point[3] position on the axis. For a torus, the radius is taken at the major axis. / double * rad_data ,/ <O> Face minor radius: only a torus or cone has rad_data as a minor radius. For a cone, rad_data is the half angle in radians. For a torus, rad_data is taken at the minor axis. / int * norm_dir / <O> Face normal direction: +1 if the face normal is in the same direction as the surface normal (cross product of the U- and V-derivative vectors), -1 if reversed. */ ); 详解
06-01
`UF_MODL_ask_face_data` 函数是 UG/Open C API 中的一个函数,用于查询面(face)的数据。以下是该函数的详细解释: 函数原型: ```c extern UFUNEXPORT int UF_MODL_ask_face_data( tag_t face, /* <I> 面对象的 ID */ int *type, /* <O> 面的类型,NX 表面类型代码 16 = 圆柱体,17 = 圆锥体,18 = 球体,19 = 旋转体(环形),20 = 挤出体,22 = 平面,23 = 圆弧,43 = B 曲面,65 = 偏移曲面,66 = 外部曲面 */ double point[], /* <O,len:3> 根据类型返回点信息,具体如下:平面=平面上的位置,圆柱体=轴上的位置,圆锥体=轴上的位置,球体=中心位置,旋转体=轴上的位置 */ double dir[], /* <O,len:3> 根据类型返回方向信息,具体如下:平面=法线方向,圆柱体=轴向,圆锥体=轴向,旋转体=轴向 */ double box[], /* <O,len:6> 面边界,返回一个矩形盒子的对角线上的两个点的坐标(参考绝对坐标系),盒子包含了指定的面并且通常是最小可能的,但是不能保证。 */ double *radius, /* <O> 面的主要半径:对于圆锥体,半径是在轴上的点[3]处取的。对于环体,半径是在主轴上取的。 */ double *rad_data, /* <O> 面的次要半径:只有环体或圆锥体具有 rad_data 作为次要半径。对于圆锥体,rad_data 是半角的一半,对于环体,rad_data 是在副轴上取的。 */ int *norm_dir /* <O> 面的法线方向:+1 表示面法线与曲面法线(U- 和 V- 导数向量的叉积)相同,-1 表示相反。 */ ); ``` 参数说明: - `face`:要查询的面对象的 ID。 - `type`:返回该面的类型,NX 表面类型代码。 - `point[]`:根据类型返回点信息。具体如下: - 平面:平面上的位置。 - 圆柱体:轴上的位置。 - 圆锥体:轴上的位置。 - 球体:中心位置。 - 旋转体:轴上的位置。 - `dir[]`:根据类型返回方向信息。具体如下: - 平面:法线方向。 - 圆柱体:轴向。 - 圆锥体:轴向。 - 旋转体:轴向。 - `box[]`:面边界,返回一个矩形盒子的对角线上的两个点的坐标(参考绝对坐标系),盒子包含了指定的面并且通常是最小可能的,但是不能保证。 - `radius`:返回面的主要半径。对于圆锥体,半径是在轴上的点[3]处取的。对于环体,半径是在主轴上取的。 - `rad_data`:返回面的次要半径。只有环体或圆锥体具有 rad_data 作为次要半径。对于圆锥体,rad_data 是半角的一半,对于环体,rad_data 是在副轴上取的。 - `norm_dir`:返回面的法线方向。+1 表示面法线与曲面法线(U- 和 V- 导数向量的叉积)相同,-1 表示相反。 函数返回值: - `0` 表示成功。 - 非 `0` 值表示失败。 使用示例: ```c #include <uf_modl.h> #include <stdio.h> int main() { tag_t face; int type; double point[3], dir[3], box[6], radius, rad_data; int norm_dir; // 获取一个面的 ID // ... int ret = UF_MODL_ask_face_data(face, &type, point, dir, box, &radius, &rad_data, &norm_dir); if (ret != 0) { printf("查询面数据失败!\n"); return 1; } printf("面类型:%d\n", type); printf("点坐标:(%lf, %lf, %lf)\n", point[0], point[1], point[2]); printf("方向向量:(%lf, %lf, %lf)\n", dir[0], dir[1], dir[2]); printf("盒子坐标:(%lf, %lf, %lf), (%lf, %lf, %lf)\n", box[0], box[1], box[2], box[3], box[4], box[5]); printf("主要半径:%lf\n", radius); printf("次要半径:%lf\n", rad_data); printf("法线方向:%d\n", norm_dir); return 0; } ``` 该示例中,我们首先获取了一个面对象的 ID `face`,然后调用 `UF_MODL_ask_face_data` 函数查询该面的数据。函数返回成功后,我们打印出面的类型、点坐标、方向向量、盒子坐标、主要半径、次要半径和法线方向。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值