乐筑天下

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

[编程交流] Easier way of doing this - Whi

[复制链接]

12

主题

395

帖子

384

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
60
发表于 2022-7-5 19:40:36 | 显示全部楼层 |阅读模式
Basically, while running my program I need to find out which segment of a polyline my point is on. I am using grread and vlax-curve-getclosestpointto to get my point.
 
My idea was to find the equation of the points in each segment and find out if that point lies on the line to identify which line segment, but I feel like there is an easier way.
回复

使用道具 举报

63

主题

6297

帖子

6283

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
358
发表于 2022-7-5 19:57:09 | 显示全部楼层
Hi,
 
The segment of the polyline would be between the two param numbers p1 and p2.
 
  1. (setq p1 (fix (vlax-curve-getparamatpoint obj pt))     p2 (1+ p1)     )
回复

使用道具 举报

12

主题

395

帖子

384

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
60
发表于 2022-7-5 20:09:13 | 显示全部楼层
Thanks Thwart! I knew it was something simple.
回复

使用道具 举报

63

主题

6297

帖子

6283

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
358
发表于 2022-7-5 20:13:14 | 显示全部楼层
You should've payed more concern about writing my name correctly as best as I did when I gave you that "simple" thing as you have called it.
回复

使用道具 举报

12

主题

395

帖子

384

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
60
发表于 2022-7-5 20:20:51 | 显示全部楼层
 
My apologies, Tharwat, for the misspelling of your name. It happens to me all the time, so I should have used more caution.
 
As far as you being offended by my use of the word "simple": I should have used the terms "straight forward" or "less complicated" than what I was attempting to do, but I didn't realize you would take offence to it.
回复

使用道具 举报

63

主题

6297

帖子

6283

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
358
发表于 2022-7-5 20:36:35 | 显示全部楼层
No offense to the use of the word simple but you gave a bad meaning word in lieu of my name .
回复

使用道具 举报

12

主题

395

帖子

384

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
60
发表于 2022-7-5 20:41:02 | 显示全部楼层
Thwart does not have to be a bad thing. You can thwart evil plans.
 
What does your name mean? Is it an actual last name or is there something deeper behind it?
 
Again, I apologize for the changing of your name, especially after you saved me quite a bit of work.
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-12 00:42 , Processed in 0.387829 second(s), 66 queries .

© 2020-2025 乐筑天下

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