乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 93|回复: 6

[编程交流] Looping with Vlax-Curve-GetPoi

[复制链接]

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 14:35:15 | 显示全部楼层 |阅读模式
I seem to be having a problem with splines when using vlax-curve-GetPointAtDist, as it doesn't ever return nil when it has reached the end of the spline - it will just return a constant point which lies some way off the spline.
 
I wondered if anyone else suffered with this issue?  And if they found a way to fix it?
 
My question is in reference to this thread:
 
http://www.cadtutor.net/forum/showthread.php?t=35741
 
 
I had to use a work-around which was far from ideal...
 
Cheers
 
Lee
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 14:53:07 | 显示全部楼层
Has no-one else ever encountered this issue?
回复

使用道具 举报

CAB

29

主题

781

帖子

430

银币

中流砥柱

Rank: 25

铜币
526
发表于 2022-7-6 14:55:50 | 显示全部楼层
Perhaps a test to prevent this incorrect distance?
  1. (setq MaxDist (vlax-curve-getdistatparam curve-obj (vlax-curve-getendparam curve-obj)))
 

[code]( (if (
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 15:05:46 | 显示全部楼层
 
Thanks CAB, I resorted to a test similar to this in fact - but I just wondered why the function would throw up such an error, and keep the loop. - But I suppose its just the stubbornness of Splines.
 
 
I have modified a LISP posted on here ages ago by David Bethel to incorporate VLIDE colours and add the required  tags to the code before posting
回复

使用道具 举报

CAB

29

主题

781

帖子

430

银币

中流砥柱

Rank: 25

铜币
526
发表于 2022-7-6 15:15:34 | 显示全部楼层
Yes I have experienced the same problem but don't remember which routine I it was that needed corrective code. It would take some research to dig it up so I posted what I remembered as the fix.
 
That too is how I remember it but I can't find the COLOR lisp by David. I'm sure I would have saved it. What is the defun c: ?
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 15:30:05 | 显示全部楼层
I could email the code to you if you wish?
回复

使用道具 举报

CAB

29

主题

781

帖子

430

银币

中流砥柱

Rank: 25

铜币
526
发表于 2022-7-6 15:42:54 | 显示全部楼层
Yes, please do so.
Thanks
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-6-3 12:26 , Processed in 1.171260 second(s), 66 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表