liub1979 发表于 2005-3-17 19:59:00

多段线求交点问题

虽说有IntersectWith方法求交点,可是如果object,IntersectObject是同一图元时
例如LWPOLYLINE 那么RetVal       中的交点为什么是它的节点
那么应该怎么正确的求出真正的交点呢?
谢谢大家!
附注 IntersectWith 方法
RetVal = object.IntersectWith(IntersectObject, ExtendOption)
Object        All Drawing Objects (Except Pviewport and PolygonMesh)
The object or objects this method applies to.
IntersectObject        Object, input-only;
The object can be one of All Drawing Objects.
ExtendOption        AcExtendOption enum; input-only
This option specifies if one or the other, both, or none of the entities are to be extended in order to attempt an intersection.
acExtendNone        Does not extend either object.
acExtendThisEntity        Extends the base object.
acExtendOtherEntity        Extends the object passed as an argument.
acExtendBoth        Extends both objects.
RetVal        Variant (array of doubles)
The array of points where one object intersects another object in the drawing.

雪山飞狐_lzh 发表于 2005-3-17 21:21:00

同一图元求交点干什么?

liub1979 发表于 2005-3-18 20:46:00

当然有必要啊,例如LWPOLYLINE图元
在绘制等高线时会出现回线,自交叉等问题
影响了图的美观.但是在绘图时又不能轻易停下来修改
怎么办,我只是想用IntersectWith得到它的交点,而不想编历每个节点.
行么?

offloading 发表于 2009-1-16 08:31:00

这个问题,多年等待中!
坛主们给个解吧!

cctv2cctv 发表于 2009-1-19 04:58:00

参考,先把多段线依据节分解成n条,各条线用IntersectWith是否相交得出交点
页: [1]
查看完整版本: 多段线求交点问题