找回密码
 立即注册

QQ登录

只需一步,快速开始

微信扫码登录

搜索
查看: 1159|回复: 2

[求助] 现在需要创建一段圆弧,如何获取plane0的matrix

[复制链接]

2

主题

4

回帖

169

积分

上等兵

积分
169
发表于 2019-7-26 09:16:15 | 显示全部楼层 |阅读模式
如图所示,现在需要创建一段圆弧,如何获取plane0的matrix!代码入下:

                Point3d point = point0->GetProperties()->GetPoint("Point");                                              double radius=radius0->GetProperties()->GetDouble("Value");
                double angle=angle0->GetProperties()->GetDouble("Value");
                tag_t arcTag = null_tag;
                UF_CURVE_arc_t arc_coords;
                arc_coords.arc_center[0]=point.X;
                arc_coords.arc_center[1]=point.Y;
                arc_coords.arc_center[2]=point.Z;
                arc_coords.radius=radius;
                arc_coords.start_angle = 0.0;
                arc_coords.end_angle =angle * DEGRA;
                arc_coords.matrix_tag=???;
                UF_CURVE_create_arc (&arc_coords, &arcTag);
151755s8zx85ii8wwm6min.png

28

主题

954

回帖

8378

积分

少校

积分
8378
发表于 2019-7-27 00:08:06 | 显示全部楼层
你这也太高级了吧!我表示看不懂!

2

主题

4

回帖

169

积分

上等兵

积分
169
 楼主| 发表于 2019-8-1 09:42:04 | 显示全部楼层
可以在指定的平面上选择点,例如:XY平面上选择点(10,10,0)、(0,9.5,0)...创建曲面。
无法将非指定平面上的点(10,10,10)创建曲面后直接投影到选择的曲面上。
tag_t matrix_t=NULL_TAG;
tag_t arcTag = null_tag;
UF_CURVE_arc_t arc_coords;
Point3d point = point0->GetProperties()->GetPoint("Point");
double radius=radius0->GetProperties()->GetDouble("Value");
double angle=angle0->GetProperties()->GetDouble("Value");
std::vector<TaggedObject*> objects=this->plane0->GetProperties()->GetTaggedObjectVector("SelectedObjects");
matrix_t=objects[0]->Tag();
arc_coords.arc_center[0]=point.X;
arc_coords.arc_center[1]=point.Y;
arc_coords.arc_center[2]=point.Z;
arc_coords.radius=radius;
arc_coords.start_angle = 0.0;
arc_coords.end_angle =angle * DEGRA;
UF_CSYS_ask_matrix_of_object(matrix_t,&arc_coords.matrix_tag);
UF_CURVE_create_arc(&arc_coords, &arcTag);

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

咨询QQ:1359218528|发帖须知!|Archiver|手机版|小黑屋|UG爱好者论坛 ( 京ICP备10217105号-2 )

GMT+8, 2025-2-4 04:06

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表