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

Bounding box of csg geometry sometimes does not match the geometry (is much more bigger) #26

Open
btjacker opened this issue Nov 29, 2023 · 2 comments

Comments

@btjacker
Copy link

btjacker commented Nov 29, 2023

Hi, the title says everything. If you visit the sandbox and display the console, you will see inputs for the geometry and the bounding box dimensions as three sees it:

0.45 0.45 0.3 w 1.0399999618530273 h 0.6951998419106007 l 1.2901498079299927
1 1 1 w 1.0001001192212104 h 1.0001001192212104 l 1.0001001192212104

Second line is ok, component with inputs 1,1,1 has bounding box with all dimensions 1
But component with inputs 0.45 0.45 0.3 has bigger bounding box which is wrong.
This happens only for some inputs and for example if you change "const e" value, this also affects the bounding box.

codesandbox

@JakeDluhy
Copy link

This is probably related to gkjohnson/three-bvh-csg#183, which is fixed in version 0.0.15 of three-bvh-svg. So likely an upgrade of the library here would fix it

@btjacker
Copy link
Author

btjacker commented Dec 6, 2023

This is probably related to gkjohnson/three-bvh-csg#183, which is fixed in version 0.0.15 of three-bvh-svg. So likely an upgrade of the library here would fix it

I updated the codesandbox. Wireframe now shows the bounding box and with 0.0.15 it is still the same. I have tried to produce the same behaviour with pure three but the issue did not show up. Probably because of operation order.

Even in react it behave different when I do A-(B+C+D) or A-B-C-D

EDIT: Another strange behaviour which I can not reproduce in plaint three is, that bounding box includes the object I subbstract from the base geometry sandbox

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

2 participants