-
Notifications
You must be signed in to change notification settings - Fork 35
Final transformation results #10
Comments
Hi @Arun-A-P , here is the code how rotate works. In Nest4J/src/main/java/com/qunhe/util/nest/util/GeometryUtil.java Lines 197 to 212 in 80a5fa9
|
Hey @Yisaer that's great! I understand how rotation works now. I had a question about the final translation though. I'm only transferring the x coordinate as you can see but the final translation has the y coordinate translation very high as well. How do I interpret the translations? |
Here, is an example for the output I'm trying to understand: Input Bin Coordinates - Model 1 Coordinates - Model 2 Coordinates - Output Placements - Model 1 - Model 2 - As you can see from the screenshot, it looks like the first object is closer to the top left of the bin. So, it's coordinates should be closer to (0, 0) but from the applied translations you would get the X and Y coordinate of Model 1 and Model 2 to be well out of the bin. So, I wanted to know if I'm reading the final results wrong or if there is any problem with how I'm getting the results. From the screenshots it looks like the first model has not been rotated but from the rotation output it looks like it has been rotated at an angle. Here's the code from which I try to get the final placements -
|
First off, I wanted to say this is a brilliant tool you've written here. It's works amazingly well, easy to use and understand.
I just wanted some help understanding the final transformations. I'm using Nest4J as a command line jar and I'm passing it the list of polygon vertices in a file. To make sure the polygons do not overlap I just add 1000 to the x-coordinate of the previous model.
So, it keeps adding 1000 to the x-coordinate off the previous model, so nothing ends up overlapping. I tested it out by writing an SVG file and it works perfectly!
My question is about the final Placement output. What does translate refer to with respect to the original point? Also, is rotation after translation and is it with the original point as the center of rotation? I wanted to reproduce the output in my application so I wanted a way to use the placement results in my application after removing the +1000 x coordinate addition I made to not make them overlap.
The text was updated successfully, but these errors were encountered: