Ai
86 Star 327 Fork 253

InspireFunction/IFoxCAD

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
TestPointOnRegion.cs 752 Bytes
一键复制 编辑 原始数据 按行查看 历史
namespace TestAcad2025;
public static class TestPointOnRegion
{
[CommandMethod(nameof(TestPointOnRegionCommand))]
public static void TestPointOnRegionCommand()
{
var r1 = Env.Editor.GetEntity("\n选择多段线");
if (r1.Status != PromptStatus.OK)
return;
using var tr = new DBTrans();
if (tr.GetObject(r1.ObjectId) is not Polyline pl || pl.HasBulges)
return;
var stretchPoints = pl.GetStretchPoints();
while (true)
{
var r2 = Env.Editor.GetPoint("\n选择点");
if (r2.Status != PromptStatus.OK)
return;
var pt = r2.Value.Ucs2Wcs();
stretchPoints.PointOnRegion(pt).Print();
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/inspirefunction/ifoxcad.git
git@gitee.com:inspirefunction/ifoxcad.git
inspirefunction
ifoxcad
IFoxCAD
v0.9

搜索帮助