Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plans on porting to C/C++ ? #6

Open
redteam316 opened this issue Jan 22, 2016 · 18 comments
Open

Plans on porting to C/C++ ? #6

redteam316 opened this issue Jan 22, 2016 · 18 comments

Comments

@redteam316
Copy link

Any plans on porting this to C/C++ so that other language bindings (I.E. SWIG) can be made available?

@Jack000
Copy link
Owner

Jack000 commented Jan 22, 2016

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.

@redteam316
Copy link
Author

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.

@Neon22
Copy link

Neon22 commented Jan 22, 2016

I agree its very cool. Rather than C++ though, I might attempt a python port using numpy for the matrix work.

@rmelly
Copy link

rmelly commented Jan 22, 2016

+1 for Python port. Would be willing to help on that.

@antimodular
Copy link

i agree a python or c++ port would be great

@0x2b3bfa0
Copy link

👍 for CUDA/OpenCL port 😄

@Jack000
Copy link
Owner

Jack000 commented Feb 22, 2016

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.

@Neon22
Copy link

Neon22 commented Feb 22, 2016

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.

@0x2b3bfa0

This comment was marked as duplicate.

@servant74
Copy link

servant74 commented Feb 23, 2016 via email

@Neon22
Copy link

Neon22 commented Feb 24, 2016

@servant74, @crushedice2000, @antimodular, @rmelly - care to come over and join me ?

@mpkogli
Copy link

mpkogli commented May 18, 2016

+1 for some sort of command-line implementation.

@kallaballa
Copy link

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?

@kallaballa
Copy link

kallaballa commented Feb 1, 2018

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

@jjqcat
Copy link

jjqcat commented Sep 20, 2018

@kallaballa , I'm interested in the translation of svgnest with C++

@guanquanchen
Copy link

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

@PoorRican
Copy link

Have their been any developments in this space? I have not had any success with the CLI forks for deepnest.

@guanquanchen
Copy link

No progress, there is currently no C++version available

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

No branches or pull requests