CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

AutoLISP 开发指南

连续绘制图块

2023-1-5 07:13| 发布者: admin| 查看: 297| 评论: 0|来自: AutoCAD

现在您已经有了绘制路径的逻辑,下一步是弄清楚如何在每行中绘制磁贴。在下图中,显示了两种情况:从路径中心的偏移量等于 0.0 的行,以及偏移量不等于零的情况。查看图表,然后阅读下面的伪代码。

Set up variables for StartPoint, angp90, angm90, and so on.

Set the variable FirstCenterPoint to the StartPoint + offset amount 
    (which may be 0.0).

Set the initial value of TileCenterPt to FirstCenterPoint.

(Comment: Begin by drawing the circles in the angp90 direction.)
While the distance from the StartPoint to the TileCenterPt is less than the HalfWidth:
    Draw a circle (adding to the accumulating list of circles).
    Set TileCenterPt to the next tile space increment in the angp90
    direction.
End While

Reset the TileCenterPoint to the FirstCenterPoint + the tile space increment at angm90.

While the distance from the StartPoint to the TileCenterPt is less than the HalfWidth:
    Draw a circle (adding to the accumulating list of circles).
    Set TileCenterPt to the next tile space increment in the angm90
    direction.
End While

Return the list of circles.

路过

雷人

握手

鲜花

鸡蛋

最新评论

QQ|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 )

GMT+8, 2024-5-19 13:59

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部