Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polygon Drawing Issue #1618

Open
mattguthmiller opened this issue Nov 3, 2024 · 0 comments
Open

Polygon Drawing Issue #1618

mattguthmiller opened this issue Nov 3, 2024 · 0 comments

Comments

@mattguthmiller
Copy link

mattguthmiller commented Nov 3, 2024

When rendering with a kMaplySubdivEpsilon, this polygon (as one of several examples, though I can't quite pin down what's unique about these few out of hundreds of similar ones that work fine), looks fine at nadir, but off-center begins to draw through the globe and becomes visible from the other side. The CW winding seems correct, etc. It also works fine without kMaplySubdivEpsilon.

It is added like

let polygonStyle: [String: Any] = [
kMaplyColor: sigmet.color.withAlphaComponent(0.14),
kMaplyEnable: isValid,
kMaplyFilled: true,
kMaplySelectable: true,
kMaplyDrawPriority: kMaplyMaxDrawPriorityDefault - 20_000,
kMaplyRepresentation: sigmet.id as Any,
kMaplySubdivType: kMaplySubdivGreatCirclePrecise,
kMaplySubdivEpsilon: 0.001,
]

let polygon = MaplyVectorObject(
areal: bufferPointer.baseAddress!,
numCoords: Int32(half.count),
attributes: polygonStyle
)

addVectors([polygon], desc: polygonStyle)

[0] MaplyCoordinate
x Float 0.20333086
y Float -0.564910769
[1] MaplyCoordinate
x Float 0.152419597
y Float -0.746424973
[2] MaplyCoordinate
x Float 0.335399926
y Float -0.852017402
[3] MaplyCoordinate
x Float 0.266162723
y Float -1.31161499
[4] MaplyCoordinate
x Float -0.174532935
y Float -1.28922236
[5] MaplyCoordinate
x Float -0.174532935
y Float -0.875579357
[6] MaplyCoordinate
x Float -0.00668461109
y Float -0.87732464
[7] MaplyCoordinate
x Float -0.0453785583
y Float -0.586430609
[8] MaplyCoordinate
x Float 0.20333086
y Float -0.564910769

Screenshot 2024-11-03 at 15 43 52 Screenshot 2024-11-03 at 15 44 32 Screenshot 2024-11-03 at 15 44 01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant