Jump to content

VB.NET: Lines crossing Polyline


Jozi68

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...