Skip to content

Clipper2 migration - #330

Open
nsluhrs wants to merge 5 commits into
heitzmann:mainfrom
nsluhrs:clipper2-migration
Open

nsluhrs wants to merge 5 commits into
heitzmann:mainfrom
nsluhrs:clipper2-migration

Conversation

@nsluhrs

@nsluhrs nsluhrs commented Jul 21, 2026

Copy link
Copy Markdown

First of all, AI assisted, specifically opencode.
I am interested in moving to Clipper2 as I've run into some very large problems at work that I'd like to see performance improvements in.

I am still making sure everything is working okay, but preliminary tests are pretty promising, not seeing that big of speedups for small test cases but I do start to see fairly significant gains for larger test cases, though not in all cases. I can add some comparisons to this later if that would be helpful.
A few things I was concerned about:
Code style concerns particularly the using statements.
I wasn't sure if it would be better to have a vendored copy of Clipper2 in the code base directly instead of having a submodule as I know those are often not the best fit. I had considered it but I also wasn't sure which version would be best to include and figured a submodule would be easier to swap between versions.

  • Replace vendored Clipper 6.4.2 with Clipper2 submodule
  • Rewrite clipper_tools.cpp: ClipperLib → Clipper2Lib types and API
  • Bump C++ standard from cxx_std_11 to cxx_std_17
  • Update include paths and object library references

@heitzmann

Copy link
Copy Markdown
Owner

I'm not available right now to fully review the changes, but using sounds fine. Thanks for the PR, I'm using clipper 2 in a professional project and it is indeed better.

I can do a better review once I'm back

nsluhrs added 3 commits July 27, 2026 15:12
- Replace vendored Clipper 6.4.2 with Clipper2 2.0.1 submodule
- Rewrite clipper_tools.cpp: ClipperLib → Clipper2Lib types and API
- Bump C++ standard from cxx_std_11 to cxx_std_17
- Update include paths and object library references
- Bump version to 1.0.1-pre
@nsluhrs
nsluhrs force-pushed the clipper2-migration branch from 69e3f89 to 18725ca Compare July 27, 2026 19:13
@nsluhrs

nsluhrs commented Jul 27, 2026

Copy link
Copy Markdown
Author

Looking. At clipper tools 252 do we want the square or bevel miter type? The original was square rather than miter

@nsluhrs
nsluhrs marked this pull request as ready for review July 27, 2026 19:47
@nsluhrs

nsluhrs commented Jul 30, 2026

Copy link
Copy Markdown
Author

I think the test workflow would also need to be changed for this as the runner doesn't seem to grab the submodle

@heitzmann

Copy link
Copy Markdown
Owner

Looking. At clipper tools 252 do we want the square or bevel miter type? The original was square rather than miter

I think we should maintain the default for backwards compatibility.

This branch has not been deployed

No deployments
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