AnyCAD Rapid API 2026
Help you to create a better world!
载入中...
搜索中...
未找到
AnyCAD.Foundation.IntersectPoint类 参考

几何求交点信息类 更多...

类 AnyCAD.Foundation.IntersectPoint 继承关系图:

Public 成员函数

 IntersectPoint (global::System.IntPtr cPtr, bool cMemoryOwn)
 仅供内部使用
 
void Dispose ()
 
 IntersectPoint ()
 默认构造函数,创建空的求交点
 
 IntersectPoint (Vector3d pos, Vector3d normal)
 构造函数,只记录点和方向
 
 IntersectPoint (EnumTopoShapeType type, int primitiveIdx, Vector3d pos, double dist, int subDrawId, Vector3d normal)
 完整构造函数
 
 IntersectPoint (EnumTopoShapeType type, int primitiveIdx, Vector3d pos, double dist, int subDrawId)
 完整构造函数
 
 IntersectPoint (EnumTopoShapeType type, int primitiveIdx, Vector3d pos, double dist)
 完整构造函数
 
 IntersectPoint (EnumTopoShapeType type, int primitiveIdx)
 简化构造函数,只记录类型和图元索引
 
int GetShapeIndex ()
 
void SetShapeIndex (int val)
 
int GetPrimitiveIndex ()
 
void SetPrimitiveIndex (int val)
 
double GetDistance ()
 
void SetDistance (double val)
 
Vector3d GetPosition ()
 
Vector3d GetNormal ()
 
void SetNormal (Vector3d val)
 
Vector3d GetLocalPosition ()
 
void SetLocalPosition (Vector3d val)
 
EnumTopoShapeType GetShapeType ()
 
void SetShapeType (EnumTopoShapeType val)
 
int GetTopoShapeId ()
 
void SetTopoShapeId (int val)
 
int GetSubDrawId ()
 
void SetSubDrawId (int val)
 
bool IsNull ()
 检查是否为空交点
 
bool AlmostEqual (IntersectPoint other)
 判断两个交点是否几乎相等
 
void Transform (Matrix4d trf)
 将局部坐标变换为全局坐标
 
void ApplyPickOrder (double order)
 应用拾取优先级系数
 

详细描述

几何求交点信息类

存储射线与几何体求交的结果信息,包括交点位置、法向量、距离、图元索引等。 支持拓扑形状类型识别和子拓扑序号记录,用于精确的拾取和选择操作。

构造及析构函数说明

◆ IntersectPoint() [1/5]

AnyCAD.Foundation.IntersectPoint.IntersectPoint ( Vector3d pos,
Vector3d normal )

构造函数,只记录点和方向

参数
pos交点位置
normal交点处的法向量

◆ IntersectPoint() [2/5]

AnyCAD.Foundation.IntersectPoint.IntersectPoint ( EnumTopoShapeType type,
int primitiveIdx,
Vector3d pos,
double dist,
int subDrawId,
Vector3d normal )

完整构造函数

参数
type拓扑形状类型
primitiveIdx基本图元索引
pos交点位置
dist距离射线起点的距离
subDrawId合批中的子绘制 ID,默认为 -1
normal交点处的法向量,默认为 (0, 0, 1)

◆ IntersectPoint() [3/5]

AnyCAD.Foundation.IntersectPoint.IntersectPoint ( EnumTopoShapeType type,
int primitiveIdx,
Vector3d pos,
double dist,
int subDrawId )

完整构造函数

参数
type拓扑形状类型
primitiveIdx基本图元索引
pos交点位置
dist距离射线起点的距离
subDrawId合批中的子绘制 ID,默认为 -1

◆ IntersectPoint() [4/5]

AnyCAD.Foundation.IntersectPoint.IntersectPoint ( EnumTopoShapeType type,
int primitiveIdx,
Vector3d pos,
double dist )

完整构造函数

参数
type拓扑形状类型
primitiveIdx基本图元索引
pos交点位置
dist距离射线起点的距离

◆ IntersectPoint() [5/5]

AnyCAD.Foundation.IntersectPoint.IntersectPoint ( EnumTopoShapeType type,
int primitiveIdx )

简化构造函数,只记录类型和图元索引

参数
type拓扑形状类型
primitiveIdx基本图元索引

成员函数说明

◆ AlmostEqual()

bool AnyCAD.Foundation.IntersectPoint.AlmostEqual ( IntersectPoint other)

判断两个交点是否几乎相等

参数
other待比较的交点对象
返回
true 表示两个交点属于同一个拓扑形状

比较形状索引和形状类型,用于判断是否是同一个几何元素

◆ ApplyPickOrder()

void AnyCAD.Foundation.IntersectPoint.ApplyPickOrder ( double order)

应用拾取优先级系数

参数
order优先级系数

通过将距离乘以优先级系数来调整拾取顺序, 系数越小优先级越高,可用于实现特殊的选择逻辑

◆ IsNull()

bool AnyCAD.Foundation.IntersectPoint.IsNull ( )

检查是否为空交点

返回
true 表示无效或未找到交点

当图元索引小于 0 时认为是空交点

◆ Transform()

void AnyCAD.Foundation.IntersectPoint.Transform ( Matrix4d trf)

将局部坐标变换为全局坐标

参数
trf变换矩阵(4x4)

使用给定的变换矩阵转换 LocalPosition 为全局 Position