找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
中国膜结构网
十大进口膜材评选 十大国产膜材评选 十大膜结构设计评选 十大膜结构公司评选
查看: 193|回复: 0

[每日一码] 如何封闭SPLINE

[复制链接]

1

主题

0

回帖

55

积分

管理员

积分
55
发表于 2024-3-14 19:36:42 | 显示全部楼层 |阅读模式
  1. void setClosed(AcDbSpline *pSpline)
  2. {
  3.     int          degree;
  4.     Adesk::Boolean    rational;
  5.     Adesk::Boolean    closed;
  6.     Adesk::Boolean    periodic;
  7.     AcGePoint3dArray  controlPoints;
  8.     AcGeDoubleArray    knots;
  9.     AcGeDoubleArray    weights;
  10.     double        controlPtTol;
  11.     double        knotTol;
  12.   // get data from the spline
  13.     pSpline->getNurbsData(degree, rational, closed, periodic,
  14.                  controlPoints, knots, weights,
  15.                  controlPtTol, knotTol);
  16.   if(closed == Adesk::kTrue)
  17.         return;
  18.   // set as closed
  19.   closed = Adesk::kTrue;
  20.   // apply data back
  21.     pSpline->setNurbsData(degree, rational, closed, periodic,
  22.                  controlPoints, knots, weights,
  23.                  controlPtTol, knotTol);
  24. }
复制代码

 

 

 

 

[每日一码] 如何封闭SPLINE
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|膜结构网

GMT+8, 2025-2-6 01:09 , Processed in 0.100524 second(s), 22 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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