Issue with bad .stl import

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue with bad .stl import

jessaskey

Hi fine folks… I have read several posts on the topic of badly created .stl files which are unable to import in OpenSCAD for very good reasons. I have one of those .stl files… I have tried many things as documented below but I am looking for some suggestions if anyone has something I haven’t tried yet.

 

Goal: I’m trying to make a Dewalt Battery Holder Block similar to THIS ONE which I made for Ryobi batteries (picture attached too since Thingiverse is flaky)

 

I found a nice .igs file for the battery which is subtly complex. Using FreeCAD, I deleted the 8 parts of the battery object I don’t need and just was left with the neck/shaft of the battery. I was able to then export to .stl (attached) in FreeCAD.  It previews fine of course until I try to do a union() or difference() on it. Then just the error below. I’m not able to get any reports on .stl issues either from FreeCAD or Meshmixer. I can see when I open the .stl in Meshmaker that the mesh is a horrible mess with lots of flipped normals due to the really gentle slope of the battery shaft. I tried for hours tonight in Meshmaker to clean it up and could never get a filled solid out of it.

 

My script looks as simple as can be…

 

module dewalt_battery() {

        scale([1.025,1.025,1])

            translate([0,0,-20])

                    rotate([90,0,0])

                        import("dewalt_battery_shaft.stl");

}

 

difference() {

    translate([0,0,50]) cube([100,100,100]);

    dewalt_battery();

}

 

And I get the good ole common error suggesting I have .stl issues

 

ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion violation! Expr: e->incident_sface() != SFace_const_handle() File: /mxe/usr/x86_64-w64-mingw32.static.posix/include/CGAL/Nef_S2/SM_const_decorator.h Line: 329

 

 

I’m about to get out the micrometer and just start from scratch (which is fine too) unless someone has any nice suggestions that someone like me working with free software can solve. 😊

 

Appreciate any thoughts… thank you!

Jess


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

dewalt_battery_shaft.stl (1M) Download Attachment
Ryobi_Battery_Holder_OpenSCAD.png (199K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Issue with bad .stl import

MichaelAtOz
Administrator
You could try one of my STL's;
https://www.thingiverse.com/thing:70938




-----
Admin - email* me if you need anything,  or if I've done something stupid...

* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Admin - email* me if you need anything, or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.
Reply | Threaded
Open this post in threaded view
|

Re: Issue with bad .stl import

MichaelAtOz
Administrator
In reply to this post by jessaskey
Here is yours fixed in Netfabb

Ryobi_Battery_Shape_(repaired).stl
<http://forum.openscad.org/file/t359/Ryobi_Battery_Shape_%28repaired%29.stl>  



-----
Admin - email* me if you need anything,  or if I've done something stupid...

* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Admin - email* me if you need anything, or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.
Reply | Threaded
Open this post in threaded view
|

Re: Issue with bad .stl import

jessaskey

Thank you…. I did use an existing Thingiverse model to difference() from my Ryobi build... but this specific one that I’m having trouble with is a Dewalt 14.4V battery, which I could only find in a CAD .IGS file and going from .IGS to .STL was the challenge

 

I will go check out NETFABB now too, I was not familiar with it… thx.

 

And finally... I sat down with the micrometer last night and nailed it on my first attempt anyway...  only took me an hour.

 

 

-----Original Message-----
From: Discuss <[hidden email]> On Behalf Of MichaelAtOz
Sent: Wednesday, March 4, 2020 10:14 PM
To: [hidden email]
Subject: Re: [OpenSCAD] Issue with bad .stl import

 

Here is yours fixed in Netfabb

 

Ryobi_Battery_Shape_(repaired).stl

<http://forum.openscad.org/file/t359/Ryobi_Battery_Shape_%28repaired%29.stl

 

 

 

-----

Admin - email* me if you need anything,  or if I've done something stupid...

 

* click on my MichaelAtOz label, there is a link to email me.

 

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

 

--

Sent from: http://forum.openscad.org/

 

_______________________________________________

OpenSCAD mailing list

[hidden email]

http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org