It looks to me like there may be a mistake on what are currently lines 152 and 153 of libsrc/meshing/netrule2.cpp.
These lines read
left = transfreezone.Get(i).X() * nx + transfreezone.Get(i).Y() + c < 1e-7;
right = transfreezone.Get(i).X() * nx + transfreezone.Get(i).Y() + c > -1e-7;
I think the correct computation would be to write instead
left = transfreezone.Get(i).X() * nx + transfreezone.Get(i).Y() * ny + c < 1e-7;
right = transfreezone.Get(i).X() * nx + transfreezone.Get(i).Y() * ny + c > -1e-7;
Here is what I think this section of code is doing. The objective is to determine whether a boundary point of thhe free zone is to the left or right of a potential edge. The variables nx and ny tell the direction of the 2-dimensional normal vector to the potential edge, and c is the negative of the deviation of the potential edge from the origin along that normal vector. (Notice also that when c is calculated, the variable ny is involved.) The free zone boundary point will be left or right of the potential edge depending on whether its deviation along the normal is more than or less than the deviation of the potential edge.
Am I misunderstanding something? If not, please make the suggested change.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It looks to me like there may be a mistake on what are currently lines 152 and 153 of
libsrc/meshing/netrule2.cpp
.These lines read
I think the correct computation would be to write instead
Here is what I think this section of code is doing. The objective is to determine whether a boundary point of thhe free zone is to the left or right of a potential edge. The variables
nx
andny
tell the direction of the 2-dimensional normal vector to the potential edge, andc
is the negative of the deviation of the potential edge from the origin along that normal vector. (Notice also that whenc
is calculated, the variableny
is involved.) The free zone boundary point will be left or right of the potential edge depending on whether its deviation along the normal is more than or less than the deviation of the potential edge.Am I misunderstanding something? If not, please make the suggested change.
You are right !
Thanks, I included your fix.