Boolean operations on imported STL file / mesh

I downloaded an STL file from Thingiverse (https://www.thingiverse.com/thing:3302538) and I’d like to modify it in Shapr3D (v3.57.1) by subtracting a couple of extruded bodies from it. However, I don’t seem to be able to perform any Boolean operations on the imported file; there is never a blue “Done” button that allows me to finish the subtraction. I suspect that this is because the STL was imported as a mesh body. But the Shapr3D documentation specifically states that Boolean ops on mesh bodies are supported. Is there a workaround?

1 Like

I’ve never gotten very far by working on the directly imported STL file. I am pretty sure you cannot modify the STL body but you can use it to make operations on other things you have drawn. I gave up pretty quick on using STL directly in Shapr3D for now.

I’ve been working on some code that translates an STL file to a format that plays a lot nicer with Shapr3d. It is far from a perfect result. But at least it gives you a starting point and something to work from. As a side note I’ve been searching everywhere for the Parasolid x_t file format so I can translate directly to that but so far no luck in locating it.

All the ?knurling? around the lid will really multiply the polygon count so the conversion I am sure will take some time for Shapr3D but I will give it a go and post the result once it finishes as an editable Shapr3D project… Fingers crossed it will work.

2 Likes

This was a bit of a challenging transformation. Try this, it is a fairly complex set of triangles but you should be able to at least manipulate it now.

lidExport.shapr.zip (1.3 MB)

This didn’t seem to work, either: I tried to subtract the mesh from a large extruded black and it Shapr didn’t allow me to complete the operation:

@Yepher Thank you so much for taking the time to try this! Regrettably, here is what I see when I open your file in Shapr:

Thanks. Yea happened to me too after I came back to it a while later. Not sure why Shapr is choking on it. I’m getting some hard crashes too when I try to use the higher resolution version. Sorry it did not work out.

Working with meshes in CAD software is a tricky process, they are usually used as a reference. Some software treat meshes as dumb bodies, some of them make a few operations available.
In Shapr3D you can open them and use them as tools for Boolean operations, but you have to keep one thing in mind: always make clear intersections. If there is a possibility of overlapping between the brep surface and even one mesh polygon, the boolean will fail.

On @pion’s screenshot it looks like the rectangle was not significantly bigger than the lid and I thought that will be the problem, but not. I checked, the mesh is closed. If you move the box away by a few millimeters, it does the subtraction. If you move it forward, it fails.
I think in this particular case one edge of the box is intersecting with an edge of the mesh polygon, and that is the issue. Moving the box by tiny steps may help, but not always :confused:

3 Likes

Thinking back. I think my solution (obviously) was not the right idea. I’,m working on a hammer so everything currently looks like a nail…

If I really needed to work on that part (assuming you can’t get the binary operations to work) is just to redraw the part. It is really three cylinders stacked on top of each other and the bottom is shelled out. The thread is to revolve a ?trianlge? with an offset. The hard part will be the friction grip but it is not actually hard just will take some time to copy around the outer edge and get the math to work out.

Here is your fully edtiable lid :slight_smile:
NalgeneWideMouthLid-v3.shapr (607.7 KB)


3 Likes

@Yepher This is perfect! Thank you so much! :smiley: It works perfectly:


(My actual mod called for two circular cutouts for pipe adapter threads, not the big rectangular block that I was using for testing Boolean ops which @KPeter_Shapr3D was graciously trying on my behalf to fiddle with.)

How did you do this? Are you running custom code that you might be willing to share?

Also, may I upload your Shapr3D onto Thingiverse to share with others (properly attributed to you here, of course)? No worries if not!

3 Likes