SVGnest
SVGnest copied to clipboard
Plans on porting to C/C++ ?
Any plans on porting this to C/C++ so that other language bindings (I.E. SWIG) can be made available?
The NFP algo would be faster in C, but I'm not sure how much. It's essentially a massive amount of floating point operations, which I assume would optimize pretty well in V8.
Given that my C is pretty rusty, I'm going to say no for now. Might be a project for someone with better knowledge of C perhaps.
Speed isn't my main concern in this case because I understand that JS is a beast in its own way (Your demo impressed me, and quite a few others obviously). This should be ported to a library. Leave this issue open perhaps for others to collaborate, express interest and/or make it happen.
I agree its very cool. Rather than C++ though, I might attempt a python port using numpy for the matrix work.
+1 for Python port. Would be willing to help on that.
i agree a python or c++ port would be great
:+1: for CUDA/OpenCL port :smile:
golang anyone? : ]
The only thing unique to this implementation is the No Fit Polygon algo. In C++/Python/Java etc there are much better, mature libraries for path clipping/svg parsing/random geometric functions. I think if someone wanted to write a *lang version of this they'd be better off reading the papers linked in the readme and using the NFP algo in geometryutils.js as inspiration rather than a straight port.
Thanks for the pointers Jack. So I've started a related github project at https://github.com/Neon22/inkscape-nest My idea being to integrate it into inkscape as a python extension (plugin) for use in a dedicated SVG environment. I've got a couple of oteh rplugins in the top level rope that I'v ewritten before.
If anyone wants to help out - lets discuss in the Issues over there.
@Neon22 Great!
Looking forward to it!
@servant74, @crushedice2000, @antimodular, @rmelly - care to come over and join me ?
+1 for some sort of command-line implementation.
I'm working on porting it to C++: https://github.com/kallaballa/nestcpp/blob/master/src/util/geometry_util.cpp
At the moment i'm translating one function after the other. Anyone wants to join the effort?
i stopped trying to port the javascript and started to implement the approach from bottom up following the papers. i started with the implementation of no-fit polygons: https://github.com/kallaballa/libnfp
@kallaballa , I'm interested in the translation of svgnest with C++
Recently, I implemented multi threaded rectangular layout in the C++environment, but there are several defects on the motherboard. It can be arranged once in about 100 seconds
C++wrote the core layout section, and used Python for the genetic algorithm section
I am planning to write a C++version of polygon layout, preferably to support the presence of voids in the board and the presence of voids on the motherboard. I have a very clever idea of dropping parts into the motherboard from above at a specific angle and position
Have their been any developments in this space? I have not had any success with the CLI forks for deepnest.
No progress, there is currently no C++version available