乐筑天下

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

[编程交流] VB.NET: Lines crossing Polylin

[复制链接]

35

主题

97

帖子

62

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
175
发表于 2022-7-6 12:53:46 | 显示全部楼层 |阅读模式
Hi All,
I work in 2D.  I need to write a small VB.net app, where the user selects a polyline. That I can do.
Now I need to give a list of coordinates on this Polyline, where perpendicular lines intersect with the polyline.  Any ideas?
回复

使用道具 举报

10

主题

973

帖子

909

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
118
发表于 2022-7-6 14:04:38 | 显示全部楼层
I don’t think there is any direct method call.  The only option may be a systematic (For Each) testing all the other lines (hopefully a highly filtered selection set for speed of processing) in the drawing for an intersection (IntersectWith) with the poly in question.  
 
If an intersection is found, the routine would then have to test if the line is perpendicular to that segment of the poly (Vector2d.IsPerpendicularTo and/or, if the pertinent poly section is an arc, Curve.GetFirstDerivative perhaps).  If so, add the Point3D returned by IntersectWith to a Point3dCollection.
 
All in all not the toughest of tasks; would probably take a bit of time to debug and optimize, however.
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-5 03:05 , Processed in 0.364934 second(s), 56 queries .

© 2020-2025 乐筑天下

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