Subscribe to this thread
Home - General / All posts - Line style render bug?
rk
621 post(s)
#03-Sep-22 20:12

I wanted to see which way my areas (and holes) are drawn, CW or CCW.

I converted areas to lines and styled lines with triangles on the left.

Sometimes triangles are drawn on both side of the line and sometimes neither side.

[EDIT: Added more samples to mxb]

Attachments:
LineStyleRender_1.png
LineStyleRender_2.png
m9_LineStyleRender.mxb

jsperr
143 post(s)
#04-Sep-22 01:00

I downloaded and opened the m9 LineStyleRender.mxb

Activated the AreasGeomLine tab and clicked "view -- zoom to fit".

If I move the "wing chevron" in the upper left of the screen to the left margin, upper margin, or right margin, the line goes from being styled on both sides to being styled on the inside.

If I move the "wing chevron" inflection point below the bottom margin of the screen view, the remainder styles on the inside -- move the inflection point above the bottom of the screen margin and it styles on both sides.

Where and how the area lines style seems highly dependent on the zoom or scale factor. Is it a bug? I cannot answer that. Like labels, line styles probably have a complex rule set for rendering, so perhaps a more simple formatting of the line style would yield a more reliable indicator of which way the areas are drawn. Are the areas truly closed? Is there a tolerance factor at work here in creating lines from areas so that they are truly closed polygons?

The areas table only has three records, but I count seven lines in the drawing. Not sure what the consequences of that will be on the final output, but somehow I feel there is some data in polylines that I might be missing that might explain all these vagaries.

adamw


10,447 post(s)
#04-Sep-22 07:43

I checked the file:

Line 1 (I moved it from the left) - seemingly wrong. The triangles should only follow one side, not both. We will look into it. The issue seems to be related to the line being closed, if you unclose the line, the effect disappears.

Line 2 - fine.

Line 3 - fine, but seemingly wrong when normalized. If each small segment was a separate branch, the look would have been wrong. But the line only has 5 coordinates and is full of self-intersections, so the meaning of "left" and "right" is more or less random. However, if the line is normalized, the formatting seems wrong. We will look into why.

Line 4 - fine for all branches except one. We will look into why the branch that the red line points to does not have triangles on any side. This is quite likely related to the current scale.

Thanks a lot for the clear description of the issue with illustrations and example data!

Attachments:
line-left-side.png

dchall8
1,008 post(s)
#05-Sep-22 06:55

Line 1 becomes a Mobius line when closed

Manifold User Community Use Agreement Copyright (C) 2007-2021 Manifold Software Limited. All rights reserved.