Skip to content

Clipper2 Julia wrapper - #61

Merged
SimonDanisch merged 7 commits into
JuliaGeometry:masterfrom
gpeairs:clipper2-julia-wrapper
Oct 21, 2026
Merged

SimonDanisch merged 7 commits into
JuliaGeometry:masterfrom
gpeairs:clipper2-julia-wrapper

Conversation

@gpeairs

@gpeairs gpeairs commented Aug 3, 2026 •

Copy link
Copy Markdown
Collaborator

This is the companion to #60 adding the Julia side of the wrapper

@gpeairs gpeairs mentioned this pull request Aug 3, 2026
@gpeairs
gpeairs marked this pull request as draft August 3, 2026 13:08
@gpeairs gpeairs mentioned this pull request Aug 31, 2026
@SimonDanisch

Copy link
Copy Markdown
Member

Let an LLM try this pr out: built the wrapper against patched Clipper2 2.0.1 per Yggdrasil #14270 — 112/112 tests pass, docs clean. Fuzzed ~1000 boolean ops and stress-tested GC in the result callbacks; no issues.

One defect: Clipper64() / ClipperOffset() don't check the NULL return documented at cclipper2.h:79 (engine.jl:71, offset.jl:23), so a failed create segfaults on first use instead of throwing.

One question: the *_z entry points have no Julia surface: only runtests.jl reaches them via raw ccall. Should those be wrapped?

@gpeairs

gpeairs commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks for trying it out!

One defect: Clipper64() / ClipperOffset() don't check the NULL return documented at cclipper2.h:79 (engine.jl:71, offset.jl:23), so a failed create segfaults on first use instead of throwing.

Right, fixed.

One question: the *_z entry points have no Julia surface: only runtests.jl reaches them via raw ccall. Should those be wrapped?

Yeah, they should. Added Z versions of the types, dispatch on Z paths for the add_...! methods, and execute_polytree_z.

@gpeairs
gpeairs force-pushed the clipper2-julia-wrapper branch from 7c6c8f7 to 7732509 Compare October 21, 2026 08:55
@gpeairs
gpeairs marked this pull request as ready for review October 21, 2026 09:16
@gpeairs

gpeairs commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator Author

All the prereqs are merged/registered, and I pointed this at the new cclipper2_jll so it should be ready.

@SimonDanisch

Copy link
Copy Markdown
Member

Great thank you!

@SimonDanisch
SimonDanisch merged commit 4173487 into JuliaGeometry:master Oct 21, 2026
6 checks passed
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

Successfully merging this pull request may close these issues.

2 participants