Open mofosyne opened 2 years ago
Main source code for his library is posted in https://www.thingiverse.com/thing:311031/files as ISOThread.scad
MCAD already has a thread library in the dev
branch (https://github.com/openscad/MCAD/blob/dev/fasteners/threads.scad) capable of generating ISO threads, but I guess the interface might be a bit more fiddly than the library you linked. I'm not sure the inclusion of yet another thread implementation is the best way to go, but if the extension of API interface in the MCAD dev branch is worth looking at, if it makes it easier to use.
Oh, I wasn't aware of this threads.scad even after googling... Hence why I ended up discovering the above ISOThread.scad instead
I wonder if there is an official MCAD reference documentation and examples (e.g. something that could be included into OpenSCAD offline documentation etc...)
Not familiar with threads.scad and how easy it is to use, but will explore it in the future and see how they both compare.
Oh i see it's a dev branch and not yet released... well at least we can still compare both and integrate the best of both bits.
I have a proposal :smile:...
With developer time always quite limited, it might be difficult to get the dev
branch released. People being used to get MCAD bundled with OpenSCAD is not making things easier due to the difficult OpenSCAD release cycle.
Maybe an option would be to call it MCAD2 (or so) while keeping all the work @hyperair already did for compatibility and allow for simpler, OpenSCAD independent releases. So ideally it's a drop-in replacement for existing MCAD stuff, but gets the newer work into the hands of designers to use. The current MCAD could go into maintenance mode.
We could add it to the library list and maybe even use it as test bed for some sort of library integration / managment which is a topic often discussed but not really going forward.
I'm looking at this mostly from the OpenSCAD side, so if we can find one or two people discussing from the library perspective, maybe we could get things moving eventually.
I wonder if it's possible to ask OpenSCAD if they can do something similar to Deno... of allowing includes to be pointing to a website url instead. (Source: https://blog.logrocket.com/what-is-deno/)
import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
That would decouple the OpenSCAD from having to sync MCAD. (That's not to say we shouldn't still include it in as a batteries included approach for offline capabilities, but this would at least make sharing libraries much easier).
(Of course the other method is a package manager if OpenSCAD has one).
I know deno and I've read the arguments. Maybe at some later stage, in the forseeable future, I don't think it's possible.
Just tried to copy the MCAD dev libarary to C:\Program Files\OpenSCAD\libraries
to at least check if https://github.com/openscad/MCAD/blob/dev/fasteners/nuts_and_bolts.scad is not already doing the same thing. Haven't had much luck even after copying over a dependency https://github.com/OskarLinde/scad-utils
use <MCAD/fasteners/threads.scad>
test_threads();
This looks like it was for the same purpose as ISOThread.scad since ISOThreads also does nuts and bolts, but surprisingly it's only for creating holes to screw in actual metal bolts into. Looks like it rendered the holes ok
Looks like it's the same as nuts_and_bolts.scad, and is for having a hole to screw into plastic.
Compiles without any issues. However until I can compile MCAD/fasteners/threads.scad
, it's a little hard to gauge what's different or missing between the two.
Regardless, it looks like TrevM's implementation if baked into MCAD2 should be split into two files, one for thread.scad
and nuts_and_bolts.scad
to ensure separation of concerns.
So I think what you are saying makes sense at least.
Just to clarify, my proposal was coming from OpenSCAD perspective as we had some discussions on library handling. Decision if that makes sense and on how to proceed here would be by @hyperair as MCAD maintainer.
Just in case the site ever goes down. Here is a copy of the public domain source code.
While his source code itself doesn't specify license, the page does have a declaration that state:
OpenSCAD ISO metric thread library / functions (updated) by TrevM is licensed under the Creative Commons - Public Domain Dedication license.
Which I've obtained from the wayback machine http://web.archive.org/web/20171128001316/https://www.thingiverse.com/thing:311031
I also got a direct statement from him (which unfortunately can't be shown in the wayback machine) in which he responded to my question on if I can include it in MCAD with:
TrevM April 07, 2022 It's Public Domain, anyone can have it for any use :-)
I am TrevM on Thingiverse and TrevM309 on GitHub, just confirming, fully Public Domain as advertised, feel very free to use in any way that you wish
As discussed above. https://github.com/openscad/MCAD/files/9477739/ISOThread.zip
https://github.com/adrianschlatter/threadlib
https://github.com/rcolyer/threads-scad
Super easy customizer for creating bolts, nuts, washers, threaded rods, and standoffs.
https://www.thingiverse.com/thing:6308320
https://dkprojects.net/openscad-threads/
Hi,
I've just got permission from TrevM that it is public domain code (source: https://www.thingiverse.com/thing:311031/comments#comment-6423499)
I've been finding myself using this module quite often to implement simple ISO standard screw threading on various models.
I think this will be a good addition to include into MCAD, however I would like to know if there is any changes that should be done to his implementation to keep it to the same quality and interfacing standard for MCAD, so that it is of good enough quality for inclusion into the next OpenSCAD standard library.
If it make sense to do so, I can then clean it up and then do a pull request.