Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have some lines that are connected at various points. I want to draw the outline of these lines and I also want to deal with the extra lines at the connection points.

I have seen two similar questions in this website: Here and here

I have handled the normal cases by offsetting the Centerlines and then changing the start and end points of the lines.

but I haven't been able to deal with special cases when the points are near each other.

Unfortunately, my reputation is low I couldn't post images to explain this better.

I'm coding in Visual Basic .net and I'm writing for Autocad, but any advice will be very useful to me.

Question&Answers:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.2k views
Welcome To Ask or Share your Answers For Others

1 Answer

most problem cases are solved by translation vectors intersection check

outline

  • black is the original line/curve whatever ...
  • gray is translation vector (normal to black and size = outline distance)
  • blue is outline

if the translation vectors not intersect then it is most likely all OK but if they do then just do something like this:

  1. cut off these points from outline

  2. or create some singular point from these intersections

    it is more tricky but can avoid some problem cases from bullet #1

Also sometimes help if there is bigger density of control points

Hope it helps a little...


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...