Basic operation results in invalid geometry
Opened this issue · 5 comments
This is an OCCT problem with how the Edge
of the sphere is aligned. Consider this version:
s = Pos(-1.5) * Sphere(1).rotate(Axis.Y, 180)
p = Box(2, 2, 2) - s
Note how the Edge
of the sphere is rotated away from the cube which allows the boolean operation to work as expected.
I've considered constructing a sphere from two hemispheres but an clean
operation would fuse them together again which doesn't solve the problem. This really needs to be fixed at the OCCT level.
I'm guessing the OCCT requires all Solids to have at least one Edge but it breaks so many things. I expect fixing it in OCCT would be difficult but I don't know.
OCCT fundamentally requires surfaces to be closed in their parametric space. Removing that requirement in OCCT would be a monumental effort, however, the geometries here should be able to comply within that limitation.
I believe it should be possible (it only needs to be closed in the 2d parametric space of the surface and you can create a circle with a single vertex and edge, so I imagine a clipped sphere shell is topologically equivalent) to create a parametrically closed sphere like the one below without any seams on the spherical surface but I have been unsuccessful so far. It would be useful in many scenarios to circumvent the seam issue.
![Screenshot](https://private-user-images.githubusercontent.com/149267773/313831676-997df5f4-ebed-4fe7-8ed2-04c98218e48e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU1Mzg4MTAsIm5iZiI6MTcyNTUzODUxMCwicGF0aCI6Ii8xNDkyNjc3NzMvMzEzODMxNjc2LTk5N2RmNWY0LWViZWQtNGZlNy04ZWQyLTA0Yzk4MjE4ZTQ4ZS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwOTA1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDkwNVQxMjE1MTBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mNjU3NGRlNGQyNmY3MmJjZWZkYjA2M2FjNmJhZDIzZjJhY2RhNWJhMjkxYTM5MjkxZGMzM2E2YmJiYmU3YzZkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.LsdCeDNWaYTXm1qThrkrzd0AZOGcpQCLCflJbekedPA)