Open codeplusplusplus opened 5 years ago
Hi @codeplusplusplus
sudo make install
, installation is not supported yet.-DLIBNEST2D_BUILD_EXAMPLES=ON
and then make
libnlopt-dev
and libpolyclipping-dev
to skip downloading them in the config step.Hi @tamasmeszaros , I executed the code using windows with the available vector points in libnest2d/tests/printer_parts.cpp I need to execute for the same with my input objects, I tried using with the vector points for my object but the objects were overlapping. Is there any criteria to be followed while converting the object to vector points.
can you please help in fixing this!
Thanks!
Hello, is it possible that your points represent a non-convex polygon? At this point the nesting works only with convex polygons which have to be in clockwise order and the last point should be the same as the first point. No checks are performed so you have to ensure these requirements manually.
I would suggest calling libnest2d::sl::convexHull
on your polygon which should return a proper polygon for nesting.
Hi @tamasmeszaros , The issue got solved! Thanks for your timely response. I am looking for non-convex polygon- Nesting. Can you suggest a way to solve this.
Thankyou!
@subhashreehari I would like to say that non-convex nesting will be ready soon but I can't. What is sure that at some point it will make it into libnest2d. Until then, there is a great project SVGNest written in Javascript, or Deepnest which should have some C++ written backend to SVGNest. Another great project in C++ is Plater if you are looking for nesting 3D objects on a 2D bed. If none of these open source solutions suit your needs, there are commercial projects which you can use, like Nestprofessor
@tamasmeszaros Ok, will try those. Thankyou for the reply!
@tamasmeszaros I was able to get the rotation angle of the object in final output but there is a change in visual observance in .svg file and value of the angle. which angle should i consider. can you please share your valuable comment!
Thankyou!
@subhashreehari I'm not sure if I get the context here. Can you explain the problem in a bit more detail? Do you consider the angles in the right measure? They should be radians in every case. Which angles are we talking about? Are those the angles carried by the Item
objects?
@tamasmeszaros Yes, I am asking about angles carried by Item objects. Using Item objects transformed shape, the output is written in SVG file format. The angle returned by the Item object and the placement of SVG object-orientation is different. Let's say, Item object angle is 180 degree ( I'm converting radians to a degree) and it is placed in SVG as 0 degrees and vice-versa. Please provide your comments on it.
Hi,
I executed the "cmake ." "make" and "sudo make install" command. A bunch of clipper and nlopt folders were created. Boost was already installed so no new folders for the boost source.
I then switched to the examples folder and executed the "g++ -I../include -I../clipper_library-src -I../nlopt-src main.cpp" command.
The consol outputs a bunch of errors: "In file included from main.cpp:7: ../include/libnest2d.h:25:15: error: ‘PointImpl’ does not name a type; did you mean ‘PointType’? using Point = PointImpl; ^;
"
Could someone help me in the execution of the example?
~~~~ PointType ../include/libnest2d.h:26:22: error: ‘PointImpl’ was not declared in this scope using Coord = TCoord