找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 1273|回复: 3

[VBA函数]:如何判断两条直线是否有重合段?

[复制链接]
发表于 2003-3-5 10:46:21 | 显示全部楼层 |阅读模式

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

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

×
如题,如何判断两条直线是否有重合段?
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
发表于 2003-3-5 14:23:33 | 显示全部楼层
判断两直线的交点数是否大于1;
注意AcDb::Intersect intType的选项

virtual Acad::ErrorStatus
intersectWith(
    const AcDbEntity* pEnt,
    AcDb::Intersect intType,
    AcGePoint3dArray& points,
    int thisGsMarker = 0,

    int otherGsMarker= 0) const;

pEnt        Input entity with which "this" entity is to intersect
intType        Input type of intersection requested
points        Output with the points of intersection appended
thisGsMarker        Input GS marker of subentity of "this" entity that's involved in the intersection operation. Use the 0 default if not applicable.
otherGsMarker        Input GS marker of subentity of the entity pointed to by pEnt that's involved in the intersection operation. Use the 0 default if not applicable.

Function usage
It finds the intersections of the entity pointed to by pEnt and all the edges of the bounding box of this entity.
The intType is used to determine how to deal with extending the two entities in order to calculate intersections. The possible AcDb::Intersect values are:

Value        Meaning
AcDb::kOnBothOperands        Do not extend either entity. This results in only calculating intersections where the two entitys' geometry actually intersect
AcDb::kExtendThis        Extend this entity (if necessary) when calculating intersections, but do not extend the pEnt entity.
AcDb::kExtendArg        Extend the pEnt entity (if necessary) when calculating intersections, but do not extend this entity.
AcDb::kExtendBoth        Extend both the pEnt entity and this entity (if necessary) when calculating intersections
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

发表于 2003-8-17 23:27:08 | 显示全部楼层
Adesk::Boolean

isColinearTo(

const AcGeLinearEnt2d& line,

const AcGeTol& tol = AcGeContext::gTol) const;

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

使用道具 举报

发表于 2003-8-18 18:38:56 | 显示全部楼层
用AcGeLinearEnt2d::overlap Function 除能判断是否有重合段外,还能返回重合段实体。
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-9-21 02:41 , Processed in 0.487072 second(s), 35 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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