Creation of walls. Part 1. Creation of equidistant lines
0 To build walls of a given thickness using a given polyline, it is necessary to determine the equidistant lines to this line. The main task of constructing equidistant lines is to find points at the corners of the polyline – the intersections of equidistant lines. For each point of the polyline, we define the inner and outer points of the equidistant line and add them to the corresponding arrays The definition of an interior point is as follows First, we define vectors coplanar to the lines going out from a given point, for this we subtract the vectors of the vertices and normalize them to obtain a unit vector. the second – we determine the angle between them the equidistant point always lies on the bisector of the angle, so we divide the angle in half then we define the hypotenuse in the triangle formed by half the wall thickness and the polyline. Let’s denote it bisectorLength we get a vector going from the vertex to point b by rotating the leftSide vector by the angle alfa all that remains for us is to move point B along the resulting vector. To do this, multiply it by a scalar
Continue reading