cetz-package / cetz

CeTZ: ein Typst Zeichenpaket - A library for drawing stuff with Typst.
https://cetz-package.github.io
GNU Lesser General Public License v3.0
907 stars 38 forks source link

Add support for shape union. #691

Open lublak opened 2 months ago

lublak commented 2 months ago

Something like this:

unions

It would be very useful for complex shape compositions.

johannes-wolf commented 2 months ago

This is planned, but besides a poc https://github.com/cetz-package/cetz/pull/535, nothing got implemented yet. There are not many boolean path operations that support beziers available, and I have not yet started implementing one.

But I agree, this is a very important feature to have.

ramkumarkb commented 2 months ago

@johannes-wolf - Just a question - would the rust wrapper on clipper2 help the cause ?

johannes-wolf commented 2 months ago

@johannes-wolf - Just a question - would the rust wrapper on clipper2 help the cause ?

No, C++ is fine for me.

ramkumarkb commented 2 months ago

Follow up question - did you take a look at Clipper2 - this probably only does polygons only (and might not do Bezier) - but would'nt that be a good start?

Btw I saw another C++ code for bezier - not sure about the license or quality of the same

Metapost can do clipping - https://tug.org/docs/metapost/mpman.pdf - so probably one has to look into the repository here-

The development repository is currently hosted at https://serveur-svn.lri.fr/svn/modhel/
metapost; web browsing and anonymous svn checkout are allowed with username anonsvn and
password anonsvn.