应用一些逻辑
您需要做的一件事是确定如何间隔瓷砖并绘制它们。如果这是一个简单的直线图块网格,则可以使用 ARRAY 命令填充图块。但是对于花园小径,您需要将每行瓷砖都与前一行偏移。 此行偏移模式是重复模式。想想如果你正在建造实际的路径,你可以如何铺设瓷砖。你可能会倾向于从一端开始,然后继续铺设行,直到没有更多的空间。 以下是伪代码中的逻辑: At the starting point of the path Figure out the initial row offset from center (either centered on the path or offset by one "tile space"). While the space of the boundary filled is less than the space to fill, Draw a row of tiles. Reset the next start point (incremented by one "tile space"). Add the distance filled by the new row to the amount of space filled. Toggle the offset (if it is centered, set it up off-center, or vice versa). Go back to the start of the loop. |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2024-12-16 00:09
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.