discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Chopping STLs into smaller chunks

BL
Bryan Lee
Thu, Mar 31, 2022 7:44 AM

I regularly download STLs that are either too large to fit on my 3d
printer, or that I want to use only a portion of in a project.

The obvious solution is to import the model into OpenSCAD and difference()
or intersection() it with a translate()ed cube.

But this just doesn't work.

I keep getting
ERROR: The given mesh is not closed! Unable to convert to CGAL_Nef_Polyhedron.

In tonight's case, it is a large model with 914028 Facets, but it
DOES render and F7-exportSTL  when not differenced/intersected.

Are there any tricks to making this work?

Ubuntu18 with OpenSCAD-nightly version 2022.03.28.
I could do it with booleans in Blender, but I'd prefer the programmability
of OpenSCAD, especially for multiple chops.

I regularly download STLs that are either too large to fit on my 3d printer, or that I want to use only a portion of in a project. The obvious solution is to import the model into OpenSCAD and difference() or intersection() it with a translate()ed cube. But this just doesn't work. I keep getting ERROR: The given mesh is not closed! Unable to convert to CGAL_Nef_Polyhedron. In tonight's case, it is a large model with 914028 Facets, but it DOES render and F7-exportSTL when not differenced/intersected. > Are there any tricks to making this work? Ubuntu18 with OpenSCAD-nightly version 2022.03.28. I could do it with booleans in Blender, but I'd prefer the programmability of OpenSCAD, especially for multiple chops.
NH
nop head
Thu, Mar 31, 2022 8:53 AM

The STL has to be manifold for CGAL to do boolean ops on it. If you don't
use anything that invokes CGAL it won't care. So yes it can display it and
write out, probably an even more broken, STL.

If CGAL says it isn't closed, then it isn't. You would have to repair it
outside of OpenSCAD.

On Thu, 31 Mar 2022 at 08:44, Bryan Lee leebc11@acm.org wrote:

I regularly download STLs that are either too large to fit on my 3d
printer, or that I want to use only a portion of in a project.

The obvious solution is to import the model into OpenSCAD and difference()
or intersection() it with a translate()ed cube.

But this just doesn't work.

I keep getting
ERROR: The given mesh is not closed! Unable to convert to
CGAL_Nef_Polyhedron.

In tonight's case, it is a large model with 914028 Facets, but it
DOES render and F7-exportSTL  when not differenced/intersected.

Are there any tricks to making this work?

Ubuntu18 with OpenSCAD-nightly version 2022.03.28.
I could do it with booleans in Blender, but I'd prefer the programmability
of OpenSCAD, especially for multiple chops.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

The STL has to be manifold for CGAL to do boolean ops on it. If you don't use anything that invokes CGAL it won't care. So yes it can display it and write out, probably an even more broken, STL. If CGAL says it isn't closed, then it isn't. You would have to repair it outside of OpenSCAD. On Thu, 31 Mar 2022 at 08:44, Bryan Lee <leebc11@acm.org> wrote: > I regularly download STLs that are either too large to fit on my 3d > printer, or that I want to use only a portion of in a project. > > The obvious solution is to import the model into OpenSCAD and difference() > or intersection() it with a translate()ed cube. > > But this just doesn't work. > > I keep getting > ERROR: The given mesh is not closed! Unable to convert to > CGAL_Nef_Polyhedron. > > > In tonight's case, it is a large model with 914028 Facets, but it > DOES render and F7-exportSTL when not differenced/intersected. > > > > Are there any tricks to making this work? > > > Ubuntu18 with OpenSCAD-nightly version 2022.03.28. > I could do it with booleans in Blender, but I'd prefer the programmability > of OpenSCAD, especially for multiple chops. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
RW
Rogier Wolff
Thu, Mar 31, 2022 10:11 AM

You can't blindly blame the imput-STL.

It might be openscad that is snapping STL vertices to gridpoints
inside openscad.

There are online STL-repair-tools. Run your STL through one of those.
If that doesn't work, try scaling your input STL by 10x before you do
any operation on it. You might have to export it at that size and
then scale it back in the slicer because openscad may cause the
same problems if you scale it back inside openscad.

Roger. 

On Thu, Mar 31, 2022 at 08:53:59AM +0000, nop head wrote:

The STL has to be manifold for CGAL to do boolean ops on it. If you don't
use anything that invokes CGAL it won't care. So yes it can display it and
write out, probably an even more broken, STL.

If CGAL says it isn't closed, then it isn't. You would have to repair it
outside of OpenSCAD.

On Thu, 31 Mar 2022 at 08:44, Bryan Lee leebc11@acm.org wrote:

I regularly download STLs that are either too large to fit on my 3d
printer, or that I want to use only a portion of in a project.

The obvious solution is to import the model into OpenSCAD and difference()
or intersection() it with a translate()ed cube.

But this just doesn't work.

I keep getting
ERROR: The given mesh is not closed! Unable to convert to
CGAL_Nef_Polyhedron.

In tonight's case, it is a large model with 914028 Facets, but it
DOES render and F7-exportSTL  when not differenced/intersected.

Are there any tricks to making this work?

Ubuntu18 with OpenSCAD-nightly version 2022.03.28.
I could do it with booleans in Blender, but I'd prefer the programmability
of OpenSCAD, especially for multiple chops.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233    **
f equals m times a. When your f is steady, and your m is going down
your a is going up.  -- Chris Hadfield about flying up the space shuttle.

You can't blindly blame the imput-STL. It might be openscad that is snapping STL vertices to gridpoints inside openscad. There are online STL-repair-tools. Run your STL through one of those. If that doesn't work, try scaling your input STL by 10x before you do any operation on it. You might have to export it at that size and then scale it back in the slicer because openscad may cause the same problems if you scale it back inside openscad. Roger. On Thu, Mar 31, 2022 at 08:53:59AM +0000, nop head wrote: > The STL has to be manifold for CGAL to do boolean ops on it. If you don't > use anything that invokes CGAL it won't care. So yes it can display it and > write out, probably an even more broken, STL. > > If CGAL says it isn't closed, then it isn't. You would have to repair it > outside of OpenSCAD. > > On Thu, 31 Mar 2022 at 08:44, Bryan Lee <leebc11@acm.org> wrote: > > > I regularly download STLs that are either too large to fit on my 3d > > printer, or that I want to use only a portion of in a project. > > > > The obvious solution is to import the model into OpenSCAD and difference() > > or intersection() it with a translate()ed cube. > > > > But this just doesn't work. > > > > I keep getting > > ERROR: The given mesh is not closed! Unable to convert to > > CGAL_Nef_Polyhedron. > > > > > > In tonight's case, it is a large model with 914028 Facets, but it > > DOES render and F7-exportSTL when not differenced/intersected. > > > > > > > Are there any tricks to making this work? > > > > > > Ubuntu18 with OpenSCAD-nightly version 2022.03.28. > > I could do it with booleans in Blender, but I'd prefer the programmability > > of OpenSCAD, especially for multiple chops. > > _______________________________________________ > > OpenSCAD mailing list > > To unsubscribe send an email to discuss-leave@lists.openscad.org > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org -- ** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 ** ** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 ** f equals m times a. When your f is steady, and your m is going down your a is going up. -- Chris Hadfield about flying up the space shuttle.