discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

path extrude

SP
Sanjeev Prabhakar
Mon, Apr 3, 2023 3:25 PM

example 1:
[image: Screenshot 2023-04-03 at 7.39.18 AM.png]

[image: Screenshot 2023-04-03 at 8.41.00 PM.png]

example2:
[image: Screenshot 2023-04-03 at 8.46.06 PM.png]

[image: Screenshot 2023-04-03 at 8.46.51 PM.png]

example3:
[image: Screenshot 2023-04-03 at 8.48.36 PM.png]

[image: Screenshot 2023-04-03 at 8.49.10 PM.png]

In the example 1, the shape seems to be distorted, but it is still
consistent with the 3 vectors. the twist in this example can be corrected,
by aligning the section and the slices can be removed

[image: Screenshot 2023-04-03 at 8.54.47 PM.png]

On Mon, 3 Apr 2023 at 13:22, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

I have resolved this issue and results are absolutely consistent with the
3 vectors along the path.

Will share my results in the evening India time.

On Mon, 3 Apr, 2023, 7:47 am Sanjeev Prabhakar, sprabhakar2006@gmail.com
wrote:

below is the picture of 3 vectors along the path
tangent vector (blue color), normal vector (magenta) and orthogonal
vector(cyan)
now the challenge is to align the section based on these 3 vectors along
the path.

if the section is made on x-y plane
-z axis should align with tangent vector
y-axis should align with normal vector
-x-axis should align with orthogonal vector

[image: Screenshot 2023-04-03 at 7.39.18 AM.png]

example 1: [image: Screenshot 2023-04-03 at 7.39.18 AM.png] [image: Screenshot 2023-04-03 at 8.41.00 PM.png] example2: [image: Screenshot 2023-04-03 at 8.46.06 PM.png] [image: Screenshot 2023-04-03 at 8.46.51 PM.png] example3: [image: Screenshot 2023-04-03 at 8.48.36 PM.png] [image: Screenshot 2023-04-03 at 8.49.10 PM.png] In the example 1, the shape seems to be distorted, but it is still consistent with the 3 vectors. the twist in this example can be corrected, by aligning the section and the slices can be removed [image: Screenshot 2023-04-03 at 8.54.47 PM.png] On Mon, 3 Apr 2023 at 13:22, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > I have resolved this issue and results are absolutely consistent with the > 3 vectors along the path. > > Will share my results in the evening India time. > > > On Mon, 3 Apr, 2023, 7:47 am Sanjeev Prabhakar, <sprabhakar2006@gmail.com> > wrote: > >> >> below is the picture of 3 vectors along the path >> tangent vector (blue color), normal vector (magenta) and orthogonal >> vector(cyan) >> now the challenge is to align the section based on these 3 vectors along >> the path. >> >> if the section is made on x-y plane >> -z axis should align with tangent vector >> y-axis should align with normal vector >> -x-axis should align with orthogonal vector >> >> [image: Screenshot 2023-04-03 at 7.39.18 AM.png] >> >
AM
Adrian Mariano
Mon, Apr 3, 2023 9:46 PM

I am not sure that it makes sense to say you can "separate the orientation
problem from the path extrusion problem".    When I wrote the code in BOSL2
I followed the approach from list-comprehension-demos, a library that was
written in 2015 when list comprehensions were first introduced.  The core
operation there, which they (and BOSL2) call "sweep" is to take a 2d
profile and a list of transformation matrices.  Then you write
sweep(profile, transform_list) and an object is created by linking together
successive transformed copies of the profile.

This is a very powerful framework.  The transformations can potentially do
anything (that gives you a valid polyhedron at the end) so you can change
the scale, you can add twist if you want, or really rotate any direction,
and you can translate around.  This sweep() function is also pretty easy
to write.  It seems like if OpenSCAD were to add a native function in this
general problem area, this is the one that should be added.  If we had
this form of generalized sweep but it could handle self-intersections that
would be great.

The path extrusion problem is a special case of this more general problem,
but what distinguishes the path extrusion problem is that you need to
construct the set of tangents and normals to the path.  This is the
orientation problem, and I think that the path_extrusion problem IS the
orientation problem, so I disagree that you can separate path extrusion
from orientation.  That a path in OpenSCAD is discrete really doesn't have
a huge consequence here.  You can estimate the tangent and normal from a
discrete path.  The huge complication is that the problem is ill defined,
so you may not know what the normal should be.  If you don't know what the
normal should be...you're going to have a hard time calculating it.

So yes, you can toss that ill-definition off to the user and force the user
to supply the normals.  That makes a lot of work for the user.  How is the
user to manage this?  And what is gained by separating it as an extra step
for the user?  It seems to me like it's a complication, and deterrent to
using the code.  I submit that the user usually doesn't want to bother with
having to figure out how to construct the orientation and would rather have
the path_sweep module do it.  In BOSL2 I do give you the option of
actually specifying the normals yourself.  There is an example of using
this feature to extrude a shape on the surface of a knot.  But in truth,
the user wants help making these normals, and that is the job of the
path_sweep() operation in BOSL2.  Basically what path_sweep does in BOSL2
is it computes the tangents, somehow constructs normals (depending on the
selected method), applies user specified twist, and if necessary, adjusts
twist so that closed paths meet up properly.  Then it passes that info to
sweep().

On Mon, Apr 3, 2023 at 9:31 AM Rogier Wolff R.E.Wolff@bitwizard.nl wrote:

On Mon, Apr 3, 2023 at 1:57 AM Karl Exler karl.exler@meinklang.cc wrote:

I am following this "path extrude" thread a long time no with great
interest.

me too!

I've been thinking. It seems the different ways to do the orientation
of the 2D shape being extruded makes things difficult...

As a "path" we normally think of it as a continuous function. But the
way OpenScad works, such a path (like an openscad circle!) needs to be
split into discrete steps. Thus, it is logical that to be able to do
path-extrude, you need to provide a path and the normals (orientation)
for each point on the path.

Now, it becomes possible to separate the orientation problem, from the
path extrusion problem.

All existing extrusions simply become a path extrude with a nice
default for something.

simplification:

module rotate_extrude ()
{
path_extrude (path=path_circle, orientations=path_circle)
rotate ([90,0,0]) children ();
}

x(orientations can also be (repeated)  [0,0,1] as the reference vector.)

     Roger.

Could please someone paste an example here using the BOSL2 library?

Why? I can only learn reviewing examples. ;-)  All hints like "I have a
frame_map() function" is for me - a IT stranger---- spanish words

many thanks
Karl
Am 03.04.23 um 05:28 schrieb Sanjeev Prabhakar:

OK
Great Thanks
Will try this

On Mon, 3 Apr, 2023, 7:55 am Adrian Mariano, avm4@cornell.edu wrote:

That's not a challenge.  The challenge is deciding what the normal
vector IS.
  Once you've computed the tangent vector and somehow

selected a

normal vector, the map from the section onto the new coordinate

system is

fully defined, and easily computed.  (You can directly write down the
matrix for this map based on the tangent vector, normal vector, and

the

third orthogonal vector in the destination coordinate system.)  I

have a

frame_map() function in BOSL2 that does this.

On Sun, Apr 2, 2023 at 10:17 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

below is the picture of 3 vectors along the path
tangent vector (blue color), normal vector (magenta) and orthogonal
vector(cyan)
now the challenge is to align the section based on these 3 vectors

along

the path.

if the section is made on x-y plane
-z axis should align with tangent vector
y-axis should align with normal vector
-x-axis should align with orthogonal vector

[image: Screenshot 2023-04-03 at 7.39.18 AM.png]


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


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


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.


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

I am not sure that it makes sense to say you can "separate the orientation problem from the path extrusion problem". When I wrote the code in BOSL2 I followed the approach from list-comprehension-demos, a library that was written in 2015 when list comprehensions were first introduced. The core operation there, which they (and BOSL2) call "sweep" is to take a 2d profile and a list of transformation matrices. Then you write sweep(profile, transform_list) and an object is created by linking together successive transformed copies of the profile. This is a very powerful framework. The transformations can potentially do anything (that gives you a valid polyhedron at the end) so you can change the scale, you can add twist if you want, or really rotate any direction, and you can translate around. This sweep() function is also pretty easy to write. It seems like if OpenSCAD were to add a native function in this general problem area, this is the one that should be added. If we had this form of generalized sweep but it could handle self-intersections that would be great. The path extrusion problem is a special case of this more general problem, but what distinguishes the path extrusion problem is that you need to construct the set of tangents and normals to the path. This is the orientation problem, and I think that the path_extrusion problem **IS** the orientation problem, so I disagree that you can separate path extrusion from orientation. That a path in OpenSCAD is discrete really doesn't have a huge consequence here. You can estimate the tangent and normal from a discrete path. The huge complication is that the problem is ill defined, so you may not know what the normal should be. If you don't know what the normal should be...you're going to have a hard time calculating it. So yes, you can toss that ill-definition off to the user and force the user to supply the normals. That makes a lot of work for the user. How is the user to manage this? And what is gained by separating it as an extra step for the user? It seems to me like it's a complication, and deterrent to using the code. I submit that the user usually doesn't want to bother with having to figure out how to construct the orientation and would rather have the path_sweep module do it. In BOSL2 I do give you the option of actually specifying the normals yourself. There is an example of using this feature to extrude a shape on the surface of a knot. But in truth, the user wants help making these normals, and that is the job of the path_sweep() operation in BOSL2. Basically what path_sweep does in BOSL2 is it computes the tangents, somehow constructs normals (depending on the selected method), applies user specified twist, and if necessary, adjusts twist so that closed paths meet up properly. Then it passes that info to sweep(). On Mon, Apr 3, 2023 at 9:31 AM Rogier Wolff <R.E.Wolff@bitwizard.nl> wrote: > > On Mon, Apr 3, 2023 at 1:57 AM Karl Exler <karl.exler@meinklang.cc> wrote: > > > I am following this "path extrude" thread a long time no with great > > interest. > > me too! > > I've been thinking. It seems the different ways to do the orientation > of the 2D shape being extruded makes things difficult... > > As a "path" we normally think of it as a continuous function. But the > way OpenScad works, such a path (like an openscad circle!) needs to be > split into discrete steps. Thus, it is logical that to be able to do > path-extrude, you need to provide a path and the normals (orientation) > for each point on the path. > > Now, it becomes possible to separate the orientation problem, from the > path extrusion problem. > > All existing extrusions simply become a path extrude with a nice > default for something. > > > simplification: > > module rotate_extrude () > { > path_extrude (path=path_circle, orientations=path_circle) > rotate ([90,0,0]) children (); > } > > x(orientations can also be (repeated) [0,0,1] as the reference vector.) > > Roger. > > > > > Could please someone paste an example here using the BOSL2 library? > > > > > > Why? I can only learn reviewing examples. ;-) All hints like "I have a > > > frame_map() function" is for me - a IT stranger---- spanish words > > > > > > many thanks > > > Karl > > > Am 03.04.23 um 05:28 schrieb Sanjeev Prabhakar: > > > > > > OK > > > Great Thanks > > > Will try this > > > > > > On Mon, 3 Apr, 2023, 7:55 am Adrian Mariano, <avm4@cornell.edu> wrote: > > > > > >> That's not a challenge. The challenge is deciding *what the normal > > >> vector IS.* Once you've computed the tangent vector and somehow > selected a > > >> normal vector, the map from the section onto the new coordinate > system is > > >> fully defined, and easily computed. (You can directly write down the > > >> matrix for this map based on the tangent vector, normal vector, and > the > > >> third orthogonal vector in the destination coordinate system.) I > have a > > >> frame_map() function in BOSL2 that does this. > > >> > > >> On Sun, Apr 2, 2023 at 10:17 PM Sanjeev Prabhakar < > > >> sprabhakar2006@gmail.com> wrote: > > >> > > >>> > > >>> below is the picture of 3 vectors along the path > > >>> tangent vector (blue color), normal vector (magenta) and orthogonal > > >>> vector(cyan) > > >>> now the challenge is to align the section based on these 3 vectors > along > > >>> the path. > > >>> > > >>> if the section is made on x-y plane > > >>> -z axis should align with tangent vector > > >>> y-axis should align with normal vector > > >>> -x-axis should align with orthogonal vector > > >>> > > >>> [image: Screenshot 2023-04-03 at 7.39.18 AM.png] > > >>> _______________________________________________ > > >>> 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 > > >> > > > > > > _______________________________________________ > > > 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 > > > > > > > > _______________________________________________ > > 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. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
KE
Karl Exler
Tue, Apr 4, 2023 9:32 AM

Gentlemen! For me as novice it is really hard to create nuts and bolts.
All the "/libraries/" and "/includes/" and "/use/"... that makes me
really nervous. What I tried today:

went to Github and fetched

  • list-comprehension-demos-master.zip
  • scad-utils-master.zip
  • agent-scad.zip

extracted them to ~/local/shared/OpenScad/libraries

(took care that the "master" is removed)

used a file from Github to create a screw, which again uses the above
mentioned libraries:

use <agentscad/mx-screw.scad>
use <agentscad/mx-thread.scad>

// Precision
$fn=50;

mxBoltHexagonalThreaded( M6() );

Bingo: I receive an error message, which refers to

ERROR: Parser error in file
"/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad",
line 507: syntax error

within this file I can find a function at line 507:

function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text);

And now I am at the end with my small IT latin :-( and I end with the
question: "what is the most easiest way to create nuts and bolts. I do
not want to create exotic stuff, only the basics... ??? many thanks for
your help Karl

Gentlemen! For me as novice it is really hard to create nuts and bolts. All the "/libraries/" and "/includes/" and "/use/"... that makes me really nervous. *What I tried today:* went to Github and fetched * list-comprehension-demos-master.zip * scad-utils-master.zip * agent-scad.zip extracted them to ~/local/shared/OpenScad/libraries (took care that the "master" is removed) used a file from Github to create a screw, which again uses the above mentioned libraries: use <agentscad/mx-screw.scad> use <agentscad/mx-thread.scad> // Precision $fn=50; mxBoltHexagonalThreaded( M6() ); Bingo: I receive an error message, which refers to ERROR: Parser error in file "/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad", *line 507*: syntax error within this file I can find a function at line 507: function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text); And now I am at the end with my small IT latin :-( and I end with the question: "what is the most easiest way to create nuts and bolts. I do not want to create exotic stuff, only the basics... ??? many thanks for your help Karl
RW
Raymond West
Tue, Apr 4, 2023 10:06 AM

If I want to create an stl file, say, of a nut and bolt, then I use
NopHead's library. But generally i use purchased hardware, and only need
to create the parts to fit them to, which is much simpler than fiddling
with thread profiles in 3d printing.

Hexagon heads /sockets created by a cylinder with $fn=6. Plenty of
charts available for the standard sizes, just allow something for
fitting tolerances, if inserting nuts. But, use insets, or self tappers.
The standard machine screw threads are not designed for soft materials.
(assuming the end product is 3d printed, not machined from solid)

On 04/04/2023 10:32, Karl Exler wrote:

Gentlemen! For me as novice it is really hard to create nuts and
bolts. All the "/libraries/" and "/includes/" and "/use/"... that
makes me really nervous. What I tried today:

went to Github and fetched

  • list-comprehension-demos-master.zip
  • scad-utils-master.zip
  • agent-scad.zip

extracted them to ~/local/shared/OpenScad/libraries

(took care that the "master" is removed)

used a file from Github to create a screw, which again uses the above
mentioned libraries:

use <agentscad/mx-screw.scad>
use <agentscad/mx-thread.scad>

// Precision
$fn=50;

mxBoltHexagonalThreaded( M6() );

Bingo: I receive an error message, which refers to

ERROR: Parser error in file
"/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad",
line 507: syntax error

within this file I can find a function at line 507:

function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text);

And now I am at the end with my small IT latin :-( and I end with the
question: "what is the most easiest way to create nuts and bolts. I do
not want to create exotic stuff, only the basics... ??? many thanks
for your help Karl


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

If I want to create an stl file, say, of a nut and bolt, then I use NopHead's library. But generally i use purchased hardware, and only need to create the parts to fit them to, which is much simpler than fiddling with thread profiles in 3d printing. Hexagon heads /sockets created by a cylinder with $fn=6. Plenty of charts available for the standard sizes, just allow something for fitting tolerances, if inserting nuts. But, use insets, or self tappers. The standard machine screw threads are not designed for soft materials. (assuming the end product is 3d printed, not machined from solid) On 04/04/2023 10:32, Karl Exler wrote: > > Gentlemen! For me as novice it is really hard to create nuts and > bolts. All the "/libraries/" and "/includes/" and "/use/"... that > makes me really nervous. *What I tried today:* > > went to Github and fetched > > * list-comprehension-demos-master.zip > * scad-utils-master.zip > * agent-scad.zip > > extracted them to ~/local/shared/OpenScad/libraries > > (took care that the "master" is removed) > > used a file from Github to create a screw, which again uses the above > mentioned libraries: > > use <agentscad/mx-screw.scad> > use <agentscad/mx-thread.scad> > > // Precision > $fn=50; > > mxBoltHexagonalThreaded( M6() ); > > Bingo: I receive an error message, which refers to > > ERROR: Parser error in file > "/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad", > *line 507*: syntax error > > within this file I can find a function at line 507: > > function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text); > > > > And now I am at the end with my small IT latin :-( and I end with the > question: "what is the most easiest way to create nuts and bolts. I do > not want to create exotic stuff, only the basics... ??? many thanks > for your help Karl > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org
AM
Adrian Mariano
Tue, Apr 4, 2023 10:16 AM

Why do libraries make you really nervous?  BOSL2 can create nuts and bolts
with a single library.  If you want to use list-comprehension-demos you
need a version that's been patched to work with recent copies of OpenSCAD.
Your error message above suggests that your OpenSCAD might be too old for
the library you're trying to use.  (The line 507 looks OK, but has a
function literal, which I think requires 2021.01.

BOSL2: https://github.com/revarbat/BOSL2/wiki/screws.scad

Another solution is threadlib:  https://github.com/adrianschlatter/threadlib,
which also depends on several other things, but not agent-scad

On Tue, Apr 4, 2023 at 5:32 AM Karl Exler karl.exler@meinklang.cc wrote:

Gentlemen! For me as novice it is really hard to create nuts and bolts.
All the "libraries" and "includes" and "use"... that makes me
really nervous. What I tried today:

went to Github and fetched

- list-comprehension-demos-master.zip
- scad-utils-master.zip
- agent-scad.zip

extracted them to ~/local/shared/OpenScad/libraries

(took care that the "master" is removed)

used a file from Github to create a screw, which again uses the above
mentioned libraries:

use <agentscad/mx-screw.scad>
use <agentscad/mx-thread.scad>

// Precision
$fn=50;

mxBoltHexagonalThreaded( M6() );

Bingo: I receive an error message, which refers to

ERROR: Parser error in file "/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad", line 507: syntax error

within this file I can find a function at line 507:

function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text);

And now I am at the end with my small IT latin :-( and I end with the
question: "what is the most easiest way to create nuts and bolts. I do not
want to create exotic stuff, only the basics... ??? many thanks for your
help Karl


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

Why do libraries make you really nervous? BOSL2 can create nuts and bolts with a single library. If you want to use list-comprehension-demos you need a version that's been patched to work with recent copies of OpenSCAD. Your error message above suggests that your OpenSCAD might be too old for the library you're trying to use. (The line 507 looks OK, but has a function literal, which I think requires 2021.01. BOSL2: https://github.com/revarbat/BOSL2/wiki/screws.scad Another solution is threadlib: https://github.com/adrianschlatter/threadlib, which also depends on several other things, but not agent-scad On Tue, Apr 4, 2023 at 5:32 AM Karl Exler <karl.exler@meinklang.cc> wrote: > Gentlemen! For me as novice it is really hard to create nuts and bolts. > All the "*libraries*" and "*includes*" and "*use*"... that makes me > really nervous. *What I tried today:* > > went to Github and fetched > > - list-comprehension-demos-master.zip > - scad-utils-master.zip > - agent-scad.zip > > extracted them to ~/local/shared/OpenScad/libraries > > (took care that the "master" is removed) > > used a file from Github to create a screw, which again uses the above > mentioned libraries: > > use <agentscad/mx-screw.scad> > use <agentscad/mx-thread.scad> > > // Precision > $fn=50; > > mxBoltHexagonalThreaded( M6() ); > > Bingo: I receive an error message, which refers to > > ERROR: Parser error in file "/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad", *line 507*: syntax error > > within this file I can find a function at line 507: > > function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text); > > > > > And now I am at the end with my small IT latin :-( and I end with the > question: "what is the most easiest way to create nuts and bolts. I do not > want to create exotic stuff, only the basics... ??? many thanks for your > help Karl > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
NH
nop head
Tue, Apr 4, 2023 11:12 AM

The line you showed has a function literal in it, so you need at least the
latest release of OpenSCAD because it is a fairly recent addition.

On Tue, 4 Apr 2023 at 11:17, Adrian Mariano avm4@cornell.edu wrote:

Why do libraries make you really nervous?  BOSL2 can create nuts and bolts
with a single library.  If you want to use list-comprehension-demos you
need a version that's been patched to work with recent copies of OpenSCAD.
Your error message above suggests that your OpenSCAD might be too old for
the library you're trying to use.  (The line 507 looks OK, but has a
function literal, which I think requires 2021.01.

BOSL2: https://github.com/revarbat/BOSL2/wiki/screws.scad

Another solution is threadlib:
https://github.com/adrianschlatter/threadlib, which also depends on
several other things, but not agent-scad

On Tue, Apr 4, 2023 at 5:32 AM Karl Exler karl.exler@meinklang.cc wrote:

Gentlemen! For me as novice it is really hard to create nuts and bolts.
All the "libraries" and "includes" and "use"... that makes me
really nervous. What I tried today:

went to Github and fetched

- list-comprehension-demos-master.zip
- scad-utils-master.zip
- agent-scad.zip

extracted them to ~/local/shared/OpenScad/libraries

(took care that the "master" is removed)

used a file from Github to create a screw, which again uses the above
mentioned libraries:

use <agentscad/mx-screw.scad>
use <agentscad/mx-thread.scad>

// Precision
$fn=50;

mxBoltHexagonalThreaded( M6() );

Bingo: I receive an error message, which refers to

ERROR: Parser error in file "/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad", line 507: syntax error

within this file I can find a function at line 507:

function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text);

And now I am at the end with my small IT latin :-( and I end with the
question: "what is the most easiest way to create nuts and bolts. I do not
want to create exotic stuff, only the basics... ??? many thanks for your
help Karl


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

The line you showed has a function literal in it, so you need at least the latest release of OpenSCAD because it is a fairly recent addition. On Tue, 4 Apr 2023 at 11:17, Adrian Mariano <avm4@cornell.edu> wrote: > Why do libraries make you really nervous? BOSL2 can create nuts and bolts > with a single library. If you want to use list-comprehension-demos you > need a version that's been patched to work with recent copies of OpenSCAD. > Your error message above suggests that your OpenSCAD might be too old for > the library you're trying to use. (The line 507 looks OK, but has a > function literal, which I think requires 2021.01. > > BOSL2: https://github.com/revarbat/BOSL2/wiki/screws.scad > > Another solution is threadlib: > https://github.com/adrianschlatter/threadlib, which also depends on > several other things, but not agent-scad > > On Tue, Apr 4, 2023 at 5:32 AM Karl Exler <karl.exler@meinklang.cc> wrote: > >> Gentlemen! For me as novice it is really hard to create nuts and bolts. >> All the "*libraries*" and "*includes*" and "*use*"... that makes me >> really nervous. *What I tried today:* >> >> went to Github and fetched >> >> - list-comprehension-demos-master.zip >> - scad-utils-master.zip >> - agent-scad.zip >> >> extracted them to ~/local/shared/OpenScad/libraries >> >> (took care that the "master" is removed) >> >> used a file from Github to create a screw, which again uses the above >> mentioned libraries: >> >> use <agentscad/mx-screw.scad> >> use <agentscad/mx-thread.scad> >> >> // Precision >> $fn=50; >> >> mxBoltHexagonalThreaded( M6() ); >> >> Bingo: I receive an error message, which refers to >> >> ERROR: Parser error in file "/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad", *line 507*: syntax error >> >> within this file I can find a function at line 507: >> >> function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text); >> >> >> >> >> And now I am at the end with my small IT latin :-( and I end with the >> question: "what is the most easiest way to create nuts and bolts. I do not >> want to create exotic stuff, only the basics... ??? many thanks for your >> help Karl >> >> _______________________________________________ >> 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 >
KE
Karl Exler
Wed, Apr 5, 2023 7:12 AM

Dear Gentlemen
Due to your help I made big advances yesterday and I produced my first
set of screw and nut today: (jupidoo)

threaded_rod(d = 13.65, l = 12.45, pitch = 7.82/4, anchor=BOT, bevel =
true, $fn = 64);
threaded_nut(nutwidth=17, anchor=BOT, id=13.65, h=5, pitch=7.82/4,
$slop=0.05, $fa=1, $fs=1);

And -as expected- it doesn work at the first time. It is really perfect,
but too narrow.

Is it d and id?? I took the same values, but I guess, that was not so
good. Is there a factor with whoch I have to make the "id" smaller than
"d" ?
Many thanks
Karl

Am 04.04.23 um 13:12 schrieb nop head:

The line you showed has a function literal in it, so you need at least
the latest release of OpenSCAD because it is a fairly recent addition.

On Tue, 4 Apr 2023 at 11:17, Adrian Mariano avm4@cornell.edu wrote:

 Why do libraries make you really nervous?  BOSL2 can create nuts
 and bolts with a single library.   If you want to use
 list-comprehension-demos you need a version that's been patched to
 work with recent copies of OpenSCAD.  Your error message above
 suggests that your OpenSCAD might be too old for the library
 you're trying to use.  (The line 507 looks OK, but has a function
 literal, which I think requires 2021.01.

 BOSL2: https://github.com/revarbat/BOSL2/wiki/screws.scad

 Another solution is threadlib:
 https://github.com/adrianschlatter/threadlib, which also depends
 on several other things, but not agent-scad

 On Tue, Apr 4, 2023 at 5:32 AM Karl Exler
 <karl.exler@meinklang.cc> wrote:

     Gentlemen! For me as novice it is really hard to create nuts
     and bolts. All the "/libraries/" and "/includes/" and
     "/use/"... that makes me really nervous. *What I tried today:*

     went to Github and fetched

       * list-comprehension-demos-master.zip
       * scad-utils-master.zip
       * agent-scad.zip

     extracted them to ~/local/shared/OpenScad/libraries

     (took care that the "master" is removed)

     used a file from Github to create a screw, which again uses
     the above mentioned libraries:

     use <agentscad/mx-screw.scad>
     use <agentscad/mx-thread.scad>

     // Precision
     $fn=50;

     mxBoltHexagonalThreaded( M6() );

     Bingo: I receive an error message, which refers to

     ERROR: Parser error in file
     "/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad",
     *line 507*: syntax error

     within this file I can find a function at line 507:

     function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text);



     And now I am at the end with my small IT latin :-( and I end
     with the question: "what is the most easiest way to create
     nuts and bolts. I do not want to create exotic stuff, only the
     basics... ??? many thanks for your help Karl

     _______________________________________________
     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

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

Dear Gentlemen Due to your help I made big advances yesterday and I produced my first set of screw and nut today: (jupidoo) threaded_rod(d = 13.65, l = 12.45, pitch = 7.82/4, anchor=BOT, bevel = true, $fn = 64); threaded_nut(nutwidth=17, anchor=BOT, id=13.65, h=5, pitch=7.82/4, $slop=0.05, $fa=1, $fs=1); And -as expected- it doesn work at the first time. It is really perfect, but too narrow. Is it d and id?? I took the same values, but I guess, that was not so good. Is there a factor with whoch I have to make the "id" smaller than "d" ? Many thanks Karl Am 04.04.23 um 13:12 schrieb nop head: > The line you showed has a function literal in it, so you need at least > the latest release of OpenSCAD because it is a fairly recent addition. > > > On Tue, 4 Apr 2023 at 11:17, Adrian Mariano <avm4@cornell.edu> wrote: > > Why do libraries make you really nervous?  BOSL2 can create nuts > and bolts with a single library.   If you want to use > list-comprehension-demos you need a version that's been patched to > work with recent copies of OpenSCAD.  Your error message above > suggests that your OpenSCAD might be too old for the library > you're trying to use.  (The line 507 looks OK, but has a function > literal, which I think requires 2021.01. > > BOSL2: https://github.com/revarbat/BOSL2/wiki/screws.scad > > Another solution is threadlib: > https://github.com/adrianschlatter/threadlib, which also depends > on several other things, but not agent-scad > > On Tue, Apr 4, 2023 at 5:32 AM Karl Exler > <karl.exler@meinklang.cc> wrote: > > Gentlemen! For me as novice it is really hard to create nuts > and bolts. All the "/libraries/" and "/includes/" and > "/use/"... that makes me really nervous. *What I tried today:* > > went to Github and fetched > > * list-comprehension-demos-master.zip > * scad-utils-master.zip > * agent-scad.zip > > extracted them to ~/local/shared/OpenScad/libraries > > (took care that the "master" is removed) > > used a file from Github to create a screw, which again uses > the above mentioned libraries: > > use <agentscad/mx-screw.scad> > use <agentscad/mx-thread.scad> > > // Precision > $fn=50; > > mxBoltHexagonalThreaded( M6() ); > > Bingo: I receive an error message, which refers to > > ERROR: Parser error in file > "/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad", > *line 507*: syntax error > > within this file I can find a function at line 507: > > function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text); > > > > And now I am at the end with my small IT latin :-( and I end > with the question: "what is the most easiest way to create > nuts and bolts. I do not want to create exotic stuff, only the > basics... ??? many thanks for your help Karl > > _______________________________________________ > 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 > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org
J
jon
Wed, Apr 5, 2023 11:54 AM

I often include a variable called "slop" which I set to 0.1 or 0.2 in
order to get printed parts to fit correctly.  I subtract it from ODs and
add it to IDs.

Jon

On 4/5/2023 3:12 AM, Karl Exler wrote:

Dear Gentlemen
Due to your help I made big advances yesterday and I produced my first
set of screw and nut today: (jupidoo)

threaded_rod(d = 13.65, l = 12.45, pitch = 7.82/4, anchor=BOT, bevel =
true, $fn = 64);
threaded_nut(nutwidth=17, anchor=BOT, id=13.65, h=5, pitch=7.82/4,
$slop=0.05, $fa=1, $fs=1);

And -as expected- it doesn work at the first time. It is really
perfect, but too narrow.

Is it d and id?? I took the same values, but I guess, that was not so
good. Is there a factor with whoch I have to make the "id" smaller
than "d" ?
Many thanks
Karl

Am 04.04.23 um 13:12 schrieb nop head:

The line you showed has a function literal in it, so you need at
least the latest release of OpenSCAD because it is a fairly
recent addition.

On Tue, 4 Apr 2023 at 11:17, Adrian Mariano avm4@cornell.edu wrote:

 Why do libraries make you really nervous?  BOSL2 can create nuts
 and bolts with a single library.   If you want to use
 list-comprehension-demos you need a version that's been patched
 to work with recent copies of OpenSCAD.  Your error message above
 suggests that your OpenSCAD might be too old for the library
 you're trying to use.  (The line 507 looks OK, but has a function
 literal, which I think requires 2021.01.

 BOSL2: https://github.com/revarbat/BOSL2/wiki/screws.scad

 Another solution is threadlib:
 https://github.com/adrianschlatter/threadlib, which also depends
 on several other things, but not agent-scad

 On Tue, Apr 4, 2023 at 5:32 AM Karl Exler
 <karl.exler@meinklang.cc> wrote:

     Gentlemen! For me as novice it is really hard to create nuts
     and bolts. All the "/libraries/" and "/includes/" and
     "/use/"... that makes me really nervous. *What I tried today:*

     went to Github and fetched

       * list-comprehension-demos-master.zip
       * scad-utils-master.zip
       * agent-scad.zip

     extracted them to ~/local/shared/OpenScad/libraries

     (took care that the "master" is removed)

     used a file from Github to create a screw, which again uses
     the above mentioned libraries:

     use <agentscad/mx-screw.scad>
     use <agentscad/mx-thread.scad>

     // Precision
     $fn=50;

     mxBoltHexagonalThreaded( M6() );

     Bingo: I receive an error message, which refers to

     ERROR: Parser error in file
     "/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad",
     *line 507*: syntax error

     within this file I can find a function at line 507:

     function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text);



     And now I am at the end with my small IT latin :-( and I end
     with the question: "what is the most easiest way to create
     nuts and bolts. I do not want to create exotic stuff, only
     the basics... ??? many thanks for your help Karl

     _______________________________________________
     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

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


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

I often include a variable called "slop" which I set to 0.1 or 0.2 in order to get printed parts to fit correctly.  I subtract it from ODs and add it to IDs. Jon On 4/5/2023 3:12 AM, Karl Exler wrote: > > Dear Gentlemen > Due to your help I made big advances yesterday and I produced my first > set of screw and nut today: (jupidoo) > > threaded_rod(d = 13.65, l = 12.45, pitch = 7.82/4, anchor=BOT, bevel = > true, $fn = 64); > threaded_nut(nutwidth=17, anchor=BOT, id=13.65, h=5, pitch=7.82/4, > $slop=0.05, $fa=1, $fs=1); > > And -as expected- it doesn work at the first time. It is really > perfect, but too narrow. > > Is it d and id?? I took the same values, but I guess, that was not so > good. Is there a factor with whoch I have to make the "id" smaller > than "d" ? > Many thanks > Karl > > Am 04.04.23 um 13:12 schrieb nop head: >> The line you showed has a function literal in it, so you need at >> least the latest release of OpenSCAD because it is a fairly >> recent addition. >> >> >> On Tue, 4 Apr 2023 at 11:17, Adrian Mariano <avm4@cornell.edu> wrote: >> >> Why do libraries make you really nervous?  BOSL2 can create nuts >> and bolts with a single library.   If you want to use >> list-comprehension-demos you need a version that's been patched >> to work with recent copies of OpenSCAD.  Your error message above >> suggests that your OpenSCAD might be too old for the library >> you're trying to use.  (The line 507 looks OK, but has a function >> literal, which I think requires 2021.01. >> >> BOSL2: https://github.com/revarbat/BOSL2/wiki/screws.scad >> >> Another solution is threadlib: >> https://github.com/adrianschlatter/threadlib, which also depends >> on several other things, but not agent-scad >> >> On Tue, Apr 4, 2023 at 5:32 AM Karl Exler >> <karl.exler@meinklang.cc> wrote: >> >> Gentlemen! For me as novice it is really hard to create nuts >> and bolts. All the "/libraries/" and "/includes/" and >> "/use/"... that makes me really nervous. *What I tried today:* >> >> went to Github and fetched >> >> * list-comprehension-demos-master.zip >> * scad-utils-master.zip >> * agent-scad.zip >> >> extracted them to ~/local/shared/OpenScad/libraries >> >> (took care that the "master" is removed) >> >> used a file from Github to create a screw, which again uses >> the above mentioned libraries: >> >> use <agentscad/mx-screw.scad> >> use <agentscad/mx-thread.scad> >> >> // Precision >> $fn=50; >> >> mxBoltHexagonalThreaded( M6() ); >> >> Bingo: I receive an error message, which refers to >> >> ERROR: Parser error in file >> "/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad", >> *line 507*: syntax error >> >> within this file I can find a function at line 507: >> >> function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text); >> >> >> >> And now I am at the end with my small IT latin :-( and I end >> with the question: "what is the most easiest way to create >> nuts and bolts. I do not want to create exotic stuff, only >> the basics... ??? many thanks for your help Karl >> >> _______________________________________________ >> 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 >> >> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email todiscuss-leave@lists.openscad.org > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org
AM
Adrian Mariano
Wed, Apr 5, 2023 1:20 PM

You have not given any allowance of space between the parts.  Real screw
standards will specify that the rod is undersized compared to nominal
diameter to allow for clearance so that the screw can actually fit
together.  If your printer was VERY accurate you might get away with the
.05 allowance you're introducing using the $slop parameter, maybe.  But you
might try printing test pieces that are simple cylinders and holes to get a
feeling for what kind of clearance you need.  I'm not quite sure what
you're trying to make, but it looks sort of like an oversized 1/2-13 bolt,
so if a 1/2-13 would suffice you could also try screw("1/2-13,1/2") which
might get you off to a better start.  If you set the tolerance to the
loosest option (1A for bolts, 1B for nuts) and a $slop suitable for your
printer the parts should fit easily.  (The loose tolerance is in fact loose
enough that I believe on my MK3S, the parts fit with a $slop of zero.)

Note that clearance and slop are meant to be two different concepts:
clearance is the actual space between parts, whereas slop is an adjustment
for inaccuracy of the printer.  Correct setting of $slop is intended to
produce parts that are the exactly specified size.  But you can abuse $slop
to introduce clearance so the parts fit.  If you want to do that, probably
trying 0.2 is a reasonable starting point.

On Wed, Apr 5, 2023 at 3:12 AM Karl Exler karl.exler@meinklang.cc wrote:

Dear Gentlemen
Due to your help I made big advances yesterday and I produced my first set
of screw and nut today: (jupidoo)

threaded_rod(d = 13.65, l = 12.45, pitch = 7.82/4, anchor=BOT, bevel =
true, $fn = 64);
threaded_nut(nutwidth=17, anchor=BOT, id=13.65, h=5, pitch=7.82/4,
$slop=0.05, $fa=1, $fs=1);

And -as expected- it doesn work at the first time. It is really perfect,
but too narrow.

Is it d and id?? I took the same values, but I guess, that was not so
good. Is there a factor with whoch I have to make the "id" smaller than "d"
?
Many thanks
Karl
Am 04.04.23 um 13:12 schrieb nop head:

The line you showed has a function literal in it, so you need at least the
latest release of OpenSCAD because it is a fairly recent addition.

On Tue, 4 Apr 2023 at 11:17, Adrian Mariano avm4@cornell.edu wrote:

Why do libraries make you really nervous?  BOSL2 can create nuts and
bolts with a single library.  If you want to use list-comprehension-demos
you need a version that's been patched to work with recent copies of
OpenSCAD.  Your error message above suggests that your OpenSCAD might be
too old for the library you're trying to use.  (The line 507 looks OK, but
has a function literal, which I think requires 2021.01.

BOSL2: https://github.com/revarbat/BOSL2/wiki/screws.scad

Another solution is threadlib:
https://github.com/adrianschlatter/threadlib, which also depends on
several other things, but not agent-scad

On Tue, Apr 4, 2023 at 5:32 AM Karl Exler karl.exler@meinklang.cc
wrote:

Gentlemen! For me as novice it is really hard to create nuts and bolts.
All the "libraries" and "includes" and "use"... that makes me
really nervous. What I tried today:

went to Github and fetched

- list-comprehension-demos-master.zip
- scad-utils-master.zip
- agent-scad.zip

extracted them to ~/local/shared/OpenScad/libraries

(took care that the "master" is removed)

used a file from Github to create a screw, which again uses the above
mentioned libraries:

use <agentscad/mx-screw.scad>
use <agentscad/mx-thread.scad>

// Precision
$fn=50;

mxBoltHexagonalThreaded( M6() );

Bingo: I receive an error message, which refers to

ERROR: Parser error in file "/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad", line 507: syntax error

within this file I can find a function at line 507:

function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text);

And now I am at the end with my small IT latin :-( and I end with the
question: "what is the most easiest way to create nuts and bolts. I do not
want to create exotic stuff, only the basics... ??? many thanks for your
help Karl


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


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

You have not given any allowance of space between the parts. Real screw standards will specify that the rod is undersized compared to nominal diameter to allow for clearance so that the screw can actually fit together. If your printer was VERY accurate you might get away with the .05 allowance you're introducing using the $slop parameter, maybe. But you might try printing test pieces that are simple cylinders and holes to get a feeling for what kind of clearance you need. I'm not quite sure what you're trying to make, but it looks sort of like an oversized 1/2-13 bolt, so if a 1/2-13 would suffice you could also try screw("1/2-13,1/2") which might get you off to a better start. If you set the tolerance to the loosest option (1A for bolts, 1B for nuts) and a $slop suitable for your printer the parts should fit easily. (The loose tolerance is in fact loose enough that I believe on my MK3S, the parts fit with a $slop of zero.) Note that clearance and slop are meant to be two different concepts: clearance is the actual space between parts, whereas slop is an adjustment for inaccuracy of the printer. Correct setting of $slop is intended to produce parts that are the exactly specified size. But you can abuse $slop to introduce clearance so the parts fit. If you want to do that, probably trying 0.2 is a reasonable starting point. On Wed, Apr 5, 2023 at 3:12 AM Karl Exler <karl.exler@meinklang.cc> wrote: > Dear Gentlemen > Due to your help I made big advances yesterday and I produced my first set > of screw and nut today: (jupidoo) > > threaded_rod(d = 13.65, l = 12.45, pitch = 7.82/4, anchor=BOT, bevel = > true, $fn = 64); > threaded_nut(nutwidth=17, anchor=BOT, id=13.65, h=5, pitch=7.82/4, > $slop=0.05, $fa=1, $fs=1); > > And -as expected- it doesn work at the first time. It is really perfect, > but too narrow. > > Is it d and id?? I took the same values, but I guess, that was not so > good. Is there a factor with whoch I have to make the "id" smaller than "d" > ? > Many thanks > Karl > Am 04.04.23 um 13:12 schrieb nop head: > > The line you showed has a function literal in it, so you need at least the > latest release of OpenSCAD because it is a fairly recent addition. > > > On Tue, 4 Apr 2023 at 11:17, Adrian Mariano <avm4@cornell.edu> wrote: > >> Why do libraries make you really nervous? BOSL2 can create nuts and >> bolts with a single library. If you want to use list-comprehension-demos >> you need a version that's been patched to work with recent copies of >> OpenSCAD. Your error message above suggests that your OpenSCAD might be >> too old for the library you're trying to use. (The line 507 looks OK, but >> has a function literal, which I think requires 2021.01. >> >> BOSL2: https://github.com/revarbat/BOSL2/wiki/screws.scad >> >> Another solution is threadlib: >> https://github.com/adrianschlatter/threadlib, which also depends on >> several other things, but not agent-scad >> >> On Tue, Apr 4, 2023 at 5:32 AM Karl Exler <karl.exler@meinklang.cc> >> wrote: >> >>> Gentlemen! For me as novice it is really hard to create nuts and bolts. >>> All the "*libraries*" and "*includes*" and "*use*"... that makes me >>> really nervous. *What I tried today:* >>> >>> went to Github and fetched >>> >>> - list-comprehension-demos-master.zip >>> - scad-utils-master.zip >>> - agent-scad.zip >>> >>> extracted them to ~/local/shared/OpenScad/libraries >>> >>> (took care that the "master" is removed) >>> >>> used a file from Github to create a screw, which again uses the above >>> mentioned libraries: >>> >>> use <agentscad/mx-screw.scad> >>> use <agentscad/mx-thread.scad> >>> >>> // Precision >>> $fn=50; >>> >>> mxBoltHexagonalThreaded( M6() ); >>> >>> Bingo: I receive an error message, which refers to >>> >>> ERROR: Parser error in file "/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad", *line 507*: syntax error >>> >>> within this file I can find a function at line 507: >>> >>> function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text); >>> >>> >>> >>> >>> And now I am at the end with my small IT latin :-( and I end with the >>> question: "what is the most easiest way to create nuts and bolts. I do not >>> want to create exotic stuff, only the basics... ??? many thanks for your >>> help Karl >>> _______________________________________________ >>> 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 >> > > _______________________________________________ > 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 >
KE
Karl Exler
Wed, Apr 5, 2023 3:46 PM

Dear Adrian
By now I am not making anything. I learn and try and so I have my
troubles. But many thanks to your help.

  1. I would prefer to use the screw function.. but this ends at M12.. And
    I would like to make larger threads and nuts

  2. so, due my humble understanding I have to use the "threaded_rod"
    function :-( About that I am very sad, as e.g. the tolerance, the head
    and some other parameters do not exist for this function. Please peg me,
    if I use wrong termini technici...

  3. I will use my tools only for 3D-Printing and there I only use PLA or
    PETG. No massive force, only bla bla to connect quick and easy. High
    pitch, big diameter, sometimes with a hole, sometimes with an head -
    very very less tolerance.

What does the community thing about this demands?
Thanks
Karl

Am 05.04.23 um 15:20 schrieb Adrian Mariano:

You have not given any allowance of space between the parts.  Real
screw standards will specify that the rod is undersized compared to
nominal diameter to allow for clearance so that the screw can actually
fit together.   If your printer was VERY accurate you might get away
with the .05 allowance you're introducing using the $slop parameter,
maybe.  But you might try printing test pieces that are simple
cylinders and holes to get a feeling for what kind of clearance you
need. I'm not quite sure what you're trying to make, but it looks sort
of like an oversized 1/2-13 bolt, so if a 1/2-13 would suffice you
could also try screw("1/2-13,1/2") which might get you off to a better
start.  If you set the tolerance to the loosest option (1A for bolts,
1B for nuts) and a $slop suitable for your printer the parts should
fit easily.  (The loose tolerance is in fact loose enough that I
believe on my MK3S, the parts fit with a $slop of zero.)

Note that clearance and slop are meant to be two different concepts: 
clearance is the actual space between parts, whereas slop is an
adjustment for inaccuracy of the printer. Correct setting of $slop is
intended to produce parts that are the exactly specified size.  But
you can abuse $slop to introduce clearance so the parts fit.  If you
want to do that, probably trying 0.2 is a reasonable starting point.

On Wed, Apr 5, 2023 at 3:12 AM Karl Exler karl.exler@meinklang.cc wrote:

 Dear Gentlemen
 Due to your help I made big advances yesterday and I produced my
 first set of screw and nut today: (jupidoo)

 threaded_rod(d = 13.65, l = 12.45, pitch = 7.82/4, anchor=BOT,
 bevel = true, $fn = 64);
 threaded_nut(nutwidth=17, anchor=BOT, id=13.65, h=5, pitch=7.82/4,
 $slop=0.05, $fa=1, $fs=1);

 And -as expected- it doesn work at the first time. It is really
 perfect, but too narrow.

 Is it d and id?? I took the same values, but I guess, that was not
 so good. Is there a factor with whoch I have to make the "id"
 smaller than "d" ?
 Many thanks
 Karl

 Am 04.04.23 um 13:12 schrieb nop head:
 The line you showed has a function literal in it, so you need at
 least the latest release of OpenSCAD because it is a fairly
 recent addition.


 On Tue, 4 Apr 2023 at 11:17, Adrian Mariano <avm4@cornell.edu> wrote:

     Why do libraries make you really nervous? BOSL2 can create
     nuts and bolts with a single library.   If you want to use
     list-comprehension-demos you need a version that's been
     patched to work with recent copies of OpenSCAD.  Your error
     message above suggests that your OpenSCAD might be too old
     for the library you're trying to use.  (The line 507 looks
     OK, but has a function literal, which I think requires 2021.01.

     BOSL2: https://github.com/revarbat/BOSL2/wiki/screws.scad

     Another solution is threadlib:
     https://github.com/adrianschlatter/threadlib, which also
     depends on several other things, but not agent-scad

     On Tue, Apr 4, 2023 at 5:32 AM Karl Exler
     <karl.exler@meinklang.cc> wrote:

         Gentlemen! For me as novice it is really hard to create
         nuts and bolts. All the "/libraries/" and "/includes/"
         and "/use/"... that makes me really nervous. *What I
         tried today:*

         went to Github and fetched

           * list-comprehension-demos-master.zip
           * scad-utils-master.zip
           * agent-scad.zip

         extracted them to ~/local/shared/OpenScad/libraries

         (took care that the "master" is removed)

         used a file from Github to create a screw, which again
         uses the above mentioned libraries:

         use <agentscad/mx-screw.scad>
         use <agentscad/mx-thread.scad>

         // Precision
         $fn=50;

         mxBoltHexagonalThreaded( M6() );

         Bingo: I receive an error message, which refers to

         ERROR: Parser error in file
         "/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad",
         *line 507*: syntax error

         within this file I can find a function at line 507:

         function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text);



         And now I am at the end with my small IT latin :-( and I
         end with the question: "what is the most easiest way to
         create nuts and bolts. I do not want to create exotic
         stuff, only the basics... ??? many thanks for your help Karl

         _______________________________________________
         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


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

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

Dear Adrian By now I am not making anything. I learn and try and so I have my troubles. But many thanks to your help. 1) I would prefer to use the screw function.. but this ends at M12.. And I would like to make larger threads and nuts 2) so, due my humble understanding I have to use the "threaded_rod" function :-( About that I am very sad, as e.g. the tolerance, the head and some other parameters do not exist for this function. Please peg me, if I use wrong termini technici... 3) I will use my tools only for 3D-Printing and there I only use PLA or PETG. No massive force, only bla bla to connect quick and easy. High pitch, big diameter, sometimes with a hole, sometimes with an head - very very less tolerance. What does the community thing about this demands? Thanks Karl Am 05.04.23 um 15:20 schrieb Adrian Mariano: > You have not given any allowance of space between the parts.  Real > screw standards will specify that the rod is undersized compared to > nominal diameter to allow for clearance so that the screw can actually > fit together.   If your printer was VERY accurate you might get away > with the .05 allowance you're introducing using the $slop parameter, > maybe.  But you might try printing test pieces that are simple > cylinders and holes to get a feeling for what kind of clearance you > need. I'm not quite sure what you're trying to make, but it looks sort > of like an oversized 1/2-13 bolt, so if a 1/2-13 would suffice you > could also try screw("1/2-13,1/2") which might get you off to a better > start.  If you set the tolerance to the loosest option (1A for bolts, > 1B for nuts) and a $slop suitable for your printer the parts should > fit easily.  (The loose tolerance is in fact loose enough that I > believe on my MK3S, the parts fit with a $slop of zero.) > > Note that clearance and slop are meant to be two different concepts:  > clearance is the actual space between parts, whereas slop is an > adjustment for inaccuracy of the printer. Correct setting of $slop is > intended to produce parts that are the exactly specified size.  But > you can abuse $slop to introduce clearance so the parts fit.  If you > want to do that, probably trying 0.2 is a reasonable starting point. > > > > On Wed, Apr 5, 2023 at 3:12 AM Karl Exler <karl.exler@meinklang.cc> wrote: > > Dear Gentlemen > Due to your help I made big advances yesterday and I produced my > first set of screw and nut today: (jupidoo) > > threaded_rod(d = 13.65, l = 12.45, pitch = 7.82/4, anchor=BOT, > bevel = true, $fn = 64); > threaded_nut(nutwidth=17, anchor=BOT, id=13.65, h=5, pitch=7.82/4, > $slop=0.05, $fa=1, $fs=1); > > And -as expected- it doesn work at the first time. It is really > perfect, but too narrow. > > Is it d and id?? I took the same values, but I guess, that was not > so good. Is there a factor with whoch I have to make the "id" > smaller than "d" ? > Many thanks > Karl > > Am 04.04.23 um 13:12 schrieb nop head: >> The line you showed has a function literal in it, so you need at >> least the latest release of OpenSCAD because it is a fairly >> recent addition. >> >> >> On Tue, 4 Apr 2023 at 11:17, Adrian Mariano <avm4@cornell.edu> wrote: >> >> Why do libraries make you really nervous? BOSL2 can create >> nuts and bolts with a single library.   If you want to use >> list-comprehension-demos you need a version that's been >> patched to work with recent copies of OpenSCAD.  Your error >> message above suggests that your OpenSCAD might be too old >> for the library you're trying to use.  (The line 507 looks >> OK, but has a function literal, which I think requires 2021.01. >> >> BOSL2: https://github.com/revarbat/BOSL2/wiki/screws.scad >> >> Another solution is threadlib: >> https://github.com/adrianschlatter/threadlib, which also >> depends on several other things, but not agent-scad >> >> On Tue, Apr 4, 2023 at 5:32 AM Karl Exler >> <karl.exler@meinklang.cc> wrote: >> >> Gentlemen! For me as novice it is really hard to create >> nuts and bolts. All the "/libraries/" and "/includes/" >> and "/use/"... that makes me really nervous. *What I >> tried today:* >> >> went to Github and fetched >> >> * list-comprehension-demos-master.zip >> * scad-utils-master.zip >> * agent-scad.zip >> >> extracted them to ~/local/shared/OpenScad/libraries >> >> (took care that the "master" is removed) >> >> used a file from Github to create a screw, which again >> uses the above mentioned libraries: >> >> use <agentscad/mx-screw.scad> >> use <agentscad/mx-thread.scad> >> >> // Precision >> $fn=50; >> >> mxBoltHexagonalThreaded( M6() ); >> >> Bingo: I receive an error message, which refers to >> >> ERROR: Parser error in file >> "/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad", >> *line 507*: syntax error >> >> within this file I can find a function at line 507: >> >> function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text); >> >> >> >> And now I am at the end with my small IT latin :-( and I >> end with the question: "what is the most easiest way to >> create nuts and bolts. I do not want to create exotic >> stuff, only the basics... ??? many thanks for your help Karl >> >> _______________________________________________ >> 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 >> >> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email todiscuss-leave@lists.openscad.org > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org