找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 1947|回复: 3

[研讨] XdGe 类函数测试

[复制链接]

已领礼包: 1268个

财富等级: 财源广进

发表于 2014-9-14 11:15:20 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
本帖最后由 st788796 于 2014-9-14 11:26 编辑

AcGeCircArc3d建构器和析构器
AcGeCircArc3d::AcGeCircArc3d函数
AcGeCircArc3d(
const AcGeCircArc3d& arc);
arc
输入任意的3D弧线
建构一条与输入弧线相同的3D弧线。

AcGeCircArc3d(
const AcGePoint3d& cent,
const AcGeVector3d& nrm,
double radius);
cent
输入弧线的中心
nrm
输入弧线的法向量
radius
输入弧线的半径
以给定的圆心、法向量和半径建构一圆。半径一定不为0。建构向量按法向量为逆时针方向。

AcGeCircArc3d(
const AcGePoint3d& cent,
const AcGeVector3d& nrm,
const AcGeVector3d& refVec,
double radius,
double startAngle,
double endAngle);
cent
输入圆弧的中心
nrm
输入弧线的法向量
refVec
输入测量圆弧角度的参考向量
radius
输入圆弧的半径
startAngle
输入圆弧起点角度
endAngle
输入圆弧终点角度
以指定的中心、法向量、半径、起始角度和终止角度建构一圆弧。以弧线上的一点和中心点作一向量,并以该向量和参考向量(refVec)来测量角度。角度是以法向量的逆时针方向测量的。“nrm”必须垂直于“refVec”并且终止角度必须比起始角度大。若要建构一个圆,则终止角度和起始角度之差为2 x Pi。

AcGeCircArc3d(
const AcGePoint3d& startPoint,
const AcGePoint3d& point,
const AcGePoint3d& endPoint);
startPoint
输入弧线的起始点
point
输入弧线上的点
endPoint
输入弧线的终止点
通过这三点建构一弧线。不论这三点是重复的还是共线的。这个建构器只能建构弧线,不能用于建构圆。

对应的 XdGe::Constructor

1 (setq ge1 (xdge::constructor (car (entsel))))
<图元名: 1d4d1660>
2
_$ (setq ge2 (XdGe::Constructor "kCircArc3d" (getpoint) (getpoint) (getpoint)))
<图元名: 1d4d4cc0>
中间一个方法没有测试成功

查询属性
命令: (xdge::method ge2)
<kCircArc3d>:
   Edit Functions:
        ├───set
        ├───setAngles
        ├───setAxes
        ├───setCenter
        ├───setRadius
   Geometric Inquiry Functions:
        ├───bulge
        ├───center
        ├───endAng
        ├───endPoint
        ├───normal
        ├───radius
        ├───refVec
        ├───startAng
        ├───startPoint
   Geometric Relationship Functions:
        ├───closestPointToPlane
        ├───intersectWith
        ├───projIntersectWith
        ├───tangent
   Query Functions:
        ├───getPlane
<kCurve3d>:
   Bounding Box Functions:
        ├───boundBlock
        ├───orthoBoundBlock
   Closest Point Functions:
        ├───closestPointTo
        ├───projClosestPointTo
   Degeneracy Functions:
        ├───isDegenerate
   Edit Functions:
        ├───setInterval
   Evaluation Functions:
        ├───evalPoint
   Geometric Inquiry Functions:
        ├───hasEndPoint
        ├───hasStartPoint
        ├───isClosed
        ├───isCoplannarWith
        ├───isLinear
        ├───isPeriodic
        ├───isPlannar
   Length Functions:
        ├───area
        ├───length
        ├───paramAtLength
   Parameterization Functions:
        ├───paramOf
        ├───reverseParam
   Point Containment Functions:
        ├───isOn
        ├───orthoProject
        ├───project
   Query Functions:
        ├───getClosestPointTo
        ├───getInterval
        ├───getLocalClosestPoints
        ├───getNormalPoint
        ├───getProjClosestPointTo
        ├───getSamplePoints
        ├───getSplitCurves
        ├───getTrimmedOffset
   Subdivide Functions:
        ├───explode
<kEntity3d>:
   Copy Functions:
        ├───copy
   Equality Checking Functions:
        ├───isEqualTo
   Miscellaneous Functions:
        ├───newEntity2d
        ├───newEntity3d
   Point Containment Functions:
        ├───isOn
   Transformation Functions:
        ├───mirror
        ├───rotateBy
        ├───scaleBy
        ├───transformBy
        ├───translateBy
   Type Identification Functions:
        ├───isKindOf
        ├───type
_$ (xdge::type ge2)
"kCircArc3d"
_$ (xdge::isgeentity ge2)
T
_$ (xdge::isgeentity (entlast));_警告
nil
_$ (xdge::getpropertyvalue ge2 "center")
(2714.51 1145.3 0.0)
_$ (xdge::getpropertyvalue ge2 "Length")
nil
_$ (xdge::getpropertyvalue ge2 "area")
nil
_$ (xdge::getpropertyvalue ge2 "area" "length" "area" "startpoint")
(2718.4 1124.02 0.0)
_$ (xdge::getpropertyvalue ge2   "startpoint" "endpoint")
((2718.4 1124.02 0.0) (2718.4 1166.58 0.0))
_$ (xdge::getpropertyvalue ge2   "getSamplePoints" 5)
((2718.4 1124.02 0.0) (2731.12 1131.45 0.0) (2736.14 1145.3 0.0) (2731.12 1159.15 0.0) (2718.4 1166.58 0.0))
_$ (xdge::getpropertyvalue ge2 "length" 1.0 1.1)
2.16267
_$
还要熟悉 ARX Help  中的参数个数和意义!

论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!

已领礼包: 145个

财富等级: 日进斗金

发表于 2014-9-14 12:04:03 | 显示全部楼层
给圆心、半径、法线,可以构建3D圆

AcGeCircArc3d(

const AcGePoint3d& cent,

const AcGeVector3d& nrm,

double radius);

cent Input center of arc
nrm Input normal vector of arc
radius Input radius of arc

Constructs a full circle with the given center, normal vector, and radius. The radius must not be 0. The constructed circle is oriented counterclockwise about the normal vector.

论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

已领礼包: 1268个

财富等级: 财源广进

 楼主| 发表于 2014-9-14 12:06:49 来自手机 | 显示全部楼层
本帖最后由 st788796 于 2014-9-14 12:10 编辑

refVec对kCircArc3d而言相当于 ucsxdir,所以获取的startAng始终为0.0,转换到空间角度要加减(angle '(0 0 0) refVec)或用投影到平面角度

点评

2D 得到refVec向量后,用 (xdrx_vector_angle refVec)得到角度 3D,用 (xdrx_vector_angleOnPlane refVec plane)得到在平面上的夹角。  详情 回复 发表于 2014-9-14 12:36
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

已领礼包: 145个

财富等级: 日进斗金

发表于 2014-9-14 12:36:00 | 显示全部楼层
st788796 发表于 2014-9-14 12:06
refVec对kCircArc3d而言相当于 ucsxdir,所以获取的startAng始终为0.0,转换到空间角度要加减(angle '(0 0  ...

2D 得到refVec向量后,用 (xdrx_vector_angle refVec)得到角度
3D,用 (xdrx_vector_angleOnPlane refVec plane)得到在平面上的夹角。
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

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

本版积分规则

QQ|申请友链|Archiver|手机版|小黑屋|辽公网安备|晓东CAD家园 ( 辽ICP备15016793号 )

GMT+8, 2024-5-29 23:25 , Processed in 0.251549 second(s), 38 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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