SVG Union of Shapes using javascript or d3 or inkscape script like Inkscape GUI does

感情迁移 提交于 2019-12-05 08:53:43

There is an opensource library: Javascript Clipper

The Javascript Clipper library performs clipping and offsetting for both lines and polygons. All four boolean clipping operations are supported - intersection, union, difference and exclusive-or. Polygons can be of any shape including self-intersecting polygons.

features demo: http://jsclipper.sourceforge.net/5.0.2.2/main_demo.html

I have done a script in Python and it calls Inkscape command line, like suggested website by Erik Dahlström explains.

command = "inkscape -f file.svg --verb=EditDeselect --select=shapeA --select=shapeB --verb=SelectionUnion --verb=FileSave --verb=FileClose" os.system(command)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!