画线接近折线 [英] drawing line close to polyline

查看:152
本文介绍了画线接近折线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个三角形作为折线,我想绘制一个高度.我为命令"line""_line"指定了正确的点,但是AutoCAD绘制了从顶点到相邻顶点的线.

I have a Triangle as a polyline and I want to draw an Altitude. I give the command "line" or "_line" the right points but AutoCAD draws the line from the vertex to the adjacent vertex.

不仅仅是在AutoLISP中,AutoCAD不允许我从顶点到折线的边中间绘制一条线.

It's not just in AutoLISP, AutoCAD won't let me draw a line from a vertex to the middle of an edge in a polyline.

我该怎么做?

我想在折线中添加一个顶点,但这并没有太大帮助.我试图添加连接器:圆或另一个对象关闭 足够的直线并连接高度,但这也无济于事.

I thought of adding a vertex in the polyline, but this didn't help that much. I tried to add connector: a circle or another object close enough to the line and connect the altitude to it, but that didn't help either.

有什么建议吗?

推荐答案

首先,我怀疑您当前尝试的问题是在提供指向LINE命令的点时活动对象捕捉模式的影响.

Firstly, I suspect that the issue with your current attempts is the influence of active Object Snap modes when supplying points to the LINE command.

有几种方法可以避免这种情况:

There are several ways to avoid this:

通过AutoLISP command表达式为AutoCAD命令提供点时,可以通过在该点之前添加nonenon Object Snap修饰符来避免任何活动的Object Snap模式的影响.

When supplying points to an AutoCAD command through an AutoLISP command expression, you can avoid the effect of any active Object Snap modes by preceding the point with the none or non Object Snap modifier.

这类似于您在点之前使用end来强制激活端点对象捕捉"修改器的方式,但是在这种情况下,nonenon表示"忽略所有对象捕捉模式".可用前缀的完整列表可在

This is similar to how you might precede a point with end to force the activation of the Endpoint Object Snap modifier, but in this case, none or non means "ignore all Object Snap modes". The full list of available prefixes may be found here.

以下是此方法的示例:

(setq p '(0.0 0.0 0.0)
      q '(1.0 1.0 0.0)
)
(command "_.line" "_non" p "_non" q "")

上述注意事项:

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆