uknfire / tsmpy

An orthogonal layout algorithm, using TSM approach
MIT License
7 stars 4 forks source link

Bug in Face Side Processor #3

Closed MobiZaman closed 3 years ago

MobiZaman commented 3 years ago

The original document says that the allocation of sides in the faces has to be done in such a way as shown in the following figure: Screenshot from 2021-06-12 19-59-46 It also says that "All internal faces that are adjacent by an edge to the external face, have the edge on the same side of the external face. All internal faces connected with another internal face have the edge on the opposite side of the other internal face."

But when I debugged the code, the sides of internal faces with internal face are correct, but those of internal faces with external faces are incorrect. They seem to be the same as with internal faces.

MobiZaman commented 3 years ago

Also, for some graphs, the values with internal faces are the same, where they are supposed to be opposite.

uknfire commented 3 years ago

About external halfedge's side

I just implement it differently and I think it's more consistent.

Also, for some graphs, the values with internal faces are the same, where they are supposed to be opposite.

Could you provide a failed testcase? In current testcases, all halfedges' side are opposite to their twin halfedge's side.

MobiZaman commented 3 years ago

Ok, if you are implementing it that way, then it makes sense. As for the values of half-edges for internal face, the values seem to be correct. So, it is not an issue.