Conversation
| x += d * np.cos(ang(rt)) | ||
| y += d * np.sin(ang(rt)) | ||
| x += d * np.cos(ang(rt) + ang(shift_angle)) + shift_x | ||
| y += d * np.sin(ang(rt) + ang(shift_angle)) + shift_y |
There was a problem hiding this comment.
At this point, x and y refer to the plot axis, i.e. the coordinate system of the floor. Depending on the projection this can be any two out of (X, Y, Z).
But shift and rotation is in the relative coordinate system (x, y, s) of the reference trajectory, right? So some translation of the reference trajectory coordinates to floor coordinates is required (equivalent to what the survey command does + projection). And the anchor point of the misalignment has to be taken into account (e.g. if the anchor is not the center and there is a rotation misalignment, then the shift at the center may be larger or smaller than shift_x).
Also unit scaling with scale is missing, but that seems to be missing anywhere around these lines, we can probably fix it in the process.
There was a problem hiding this comment.
Ok makes sense, I made my tests on a straight section, that's why it was working I guess.
|
Okay I realised the handling of misalignments is a bit more complex. I left a comment on the diff with what I think needs to be addressed for it to work. |
Description
Currently, the FoorPlot uses the position of the elements to plot them but does not use the shift_x, shift_y and rotation variables like rot_s_rad.
This PR adds these shifsts and rotations to the elements positions.
I am only taking into account thick elements in this PR for now!
Linked issue: #98
Checklist
Mandatory:
Optional: