0

I have some trouble.

I need generate walls by path.

For example. I have vectors A, B, C. And I need to find vectors D, E, F for creating volumetric walls around ABC.

enter image description here

Firstly, I going on easiest way - scaling ABC (with finding a centroid).

But it's not a correct solution, b/c I need to set correct width of walls, and I need to find some additional points like this (point J and point K with JK perpendicular AB)

enter image description here

I will be gratefull for any help!

DantaliaN
  • 155
  • 10

1 Answers1

1

You will need to find out normals to the outer edge of the polygon.

There could be two approaches. One is using edge normals, another is vertex normals. On edge normals you will need to find out what direction is outside (depends on closed / open) If you use vertex normals, you will only need to translate the vertex to the new position. Finding out a good vertex normal is the main problem.

This is known as offsetting. More details can be found below. An algorithm for inflating/deflating (offsetting, buffering) polygons

Community
  • 1
  • 1
krafty
  • 425
  • 4
  • 16
  • Is there any way to find only "outer" dots in clipper solution (with etOpenButt end-type)? – DantaliaN Nov 02 '15 at 04:35
  • I must say that I am not an expert in clipper :-) Yes it should be possible, clipper will do path offsets with different Join types, the new path which would be computed will contain the outer points or vertices. Try mitered type with allowed tolerance for acute angles (it may give rise to other issues like overlapping). – krafty Nov 02 '15 at 05:59