Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Gotcha! Adding one too many rectangles to a sketch gives a BOOLEAN_NON_MANIFOLD_RESULT error
blackslate
Member Posts: 16 ✭
To see a demo of this issue, please visit my Manifold Test document and double-click on the Manifold Test feature to open the dialog and show debug feedback.
You will see a square with 376 randomly* generated blocks that have been extruded and merged with the square. A red debug rectangle shows where a 377th block would be created.
To cause Onshape to crash, deselect the (But Don't Extrude It) checkbox. This will cause the 377th rectangle to be extruded along with the other 376 blocks. In the FeatureScript Notices pane {√}, you will see the following error when you close the dialog:
@opBoolean: BOOLEAN_NON_MANIFOLD_RESULT
To see the 377th rectangle in close-up, in the Camera and Render Options contextual menu (near the top right of the view pane), choose Named Views... > Select A View > Block 377.
In the dialog, if you select Don't Perform opBoolean, you can toggle the (But Don't Extrude It) checkbox without causing a crash.
What is so special about this 377th block? It doesn't seem to be any kind of edge case.
Indeed, if you choose a different random seed in the dialog, you can generate many more blocks without causing a crash. Set the Random Seed to 2, the Number Of Rectangles to 1000 (and go and make yourself a coffee while Onshape churns). Even with 400 rectangles, you can see that 377 is not any sort of magic number.
* The blocks are not truly random. You can find more details on using a Linear Congruential Generator here.
0
Answers
As for the purpose of this test...
I have a friend who is blind. I am creating a 3D construction game, which uses magnets to hold the game blocks together. For sighted people, I can use colour to show which faces act as north poles and which act as south poles. For blind people, I plan to create a kNobbly texture for North and a Smooth surface for South. I thought that a good texture for 3D printing would be little scratches (0.1 mm wide and deep) in the sort of pattern made by iron filings around a magnet.
As I was working on a part that I could use a stamp to boolean subtract from the north faces, I discovered that the opBoolean operation would fail inexplicably at a certain number for certain seeds. I created the Manifold Test to isolate the issue.
Were you asking about this so that you could suggest a better, more Onshapely technique for achieving my goal?