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 ONEhttps://www.thingiverse.com/thing:4202251 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
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...
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/
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...
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/
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.
[cid:image002.png@01D5F2E1.257585C0]
-----Original Message-----
From: Discuss discuss-bounces@lists.openscad.org On Behalf Of MichaelAtOz
Sent: Wednesday, March 4, 2020 10:14 PM
To: discuss@lists.openscad.org
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...
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
Discuss@lists.openscad.orgmailto:Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org