-
Notifications
You must be signed in to change notification settings - Fork 0
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
Restricted #1
base: master
Are you sure you want to change the base?
Restricted #1
Conversation
3D exampleWith this file as input for VS Code debugger, the 3D packing result is as follows. {
"version": "0.2.0",
"configurations": [
{
"name": "Launch Package",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${fileDirname}",
"args": ["4", "3DBenchy.stl", "2", "Pharaoh.stl", "10", "Utah_teapot_solid.stl"],
}
]
} 1st iteration of Simulated Annealing2nd iteration of Simulated Annealing3rd iteration of Simulated Annealing |
There is a https://github.com/fogleman/pack3d/blob/4c6f72b19a7688cfc90e933fd7d4a5c3ed30a5a0/pack3d/model.go#L10 Looks like it determines the available options for orienting 3D models. Maybe we can reduce 3D behavior to 2D behavior by limiting the options of Limiting rotationsAfter limiting rotations, now the Simulated Annealing results are like these: |
|
Reasonable assumptionIt looks reasonable to assume the mesh origin to be located at center of b-box. Makes sense. It's apparently a sensible general requirement. Let's go with it? 🙄 |
Collision bug 🐞For 3D print on a floor, it's desired to align the bottom of all the 3D models with each other. So, let's try to see if this collision bug can be fixed: |
Maybe the collision bug is due to the fact that while building BVH, the https://github.com/fogleman/pack3d/blob/4c6f72b19a7688cfc90e933fd7d4a5c3ed30a5a0/pack3d/bvh.go#L9 Would the bug be fixed if |
When local origin is moved to bottom-center of b-box.
Play around to come up with a restricted pack rather than a 3D one.
What's restricted?
Assume there is a 3D print floor. The
Z
axis is upward. The only transformations allowed are moving alongX
andY
and rotating aroundZ
axis. That's what we mean by 2D pack.