views:

332

answers:

1

I have unsorted set of line segments without any binding to each other. Each line described with 2 points (x,y). I can search for lines with the same points, which means they should be connected.

Every line have a thickness attribute. I need to offset each path by this thickness, and create 4 points describing the final plygon (for each line).

http://tinyurl.com/o37ce4

now I need to refine it to handle corners (joins) correctly. but have no idea how to do it.

Desired result: http://tinyurl.com/o7qoc3

A: 

See here for one method of offsetting a polygon using it's skeleton (which is what you are trying to do here).

Solmead
thanks! now only thing that I need are some Ruby bindings for CGAL
skrat