[Bf-python] 2d geometry library

Vilem Novak pildanovak at post.cz
Thu Oct 30 13:04:17 CET 2014


Hello, 
I am posting this here, although it's also about core functionality of 
blender.
The question is, if there is or could be a vision of having a library in 
blender, which is capable of doing some 2d geometric operations. This 
library could serve internally for several cases, and could be also exposed 
in python for addon developers.

These algorithms I was thinking about are:

Straight skeleton, Curve offseting - these are connected, since both can be 
computed from a good quality Voronoi graph that supports line segments or 
curves(most implementations only support points, especially in Python area).
The possible uses are:
internally:
- good quality Inset, with collision solving, at least for flat faces.
- mask offsets, which fail currently in some collision cases
- offseting of text and curves, which produces high quality manifold 
geometry
- calculating offsets for building roads,
- V-Carving for engraving applications
- processing of slices for 3d printing


Minkowski sum of polygons - this would enable:
- some great UV packing algorithms
- packing shapes for manufacturing(3d printing, milling) 
- fast collision computing of 2d shapes.

On the blender conference, I spoke with 5 developers or artists, who had 
different problems, but by my knowledge, all of these could be solved with 
these algorithms. All of the possible uses I wrote about were discussed, and
probably, there's many more.

There is a bunch of libraries which can do such stuff. 
I did some quick search:

Boost - I know that boost libs are to some extent allready in blender, but 
it's probably quite a huge package and only parts are actually in blender? 
e.g. http://www.boost.org/doc/libs/1_53_0_beta1/libs/polygon/doc/voronoi_
main.htm
Clipper Library http://www.angusj.com/delphi/clipper.php
CGAL libraries https://www.cgal.org/
Inkscape library?

So, this mail is to start this discussion, and to see if blender developers 
are open to such idea. Also, I am not a good C coder, but I allready did 
some small api hacks. But the point is, this would need an C developer on 
board who would help with this. 

Regards
Vilem
developer of Blender CAM

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20141030/5cedaac8/attachment.html>


More information about the Bf-python mailing list