trouble setting up https://github.com/adrianschlatter/threadlib

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

trouble setting up https://github.com/adrianschlatter/threadlib

bboett
Hello!

i need some 1/2" pipe connector for a pump (when can they switch to metric :'( )

i cloned the 3 libs too
had to fix the problem with the spaces in the IoP lib and add the path to the threadlib...

i got it to display just a thread, but as soon as i try a bolt or nut i get :

Loaded design '/home/bboett/Downloads/3dmodel/garten/pumpenadapter.scad'.

Compiling design (CSG Tree generation)...

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 67 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 74 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 40 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 18 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 29 

WARNING: Unable to convert translate([0, 0, undef]) parameter to a vec3 or vec2 of numbers, in file ../../../.local/share/OpenSCAD/libraries/threadlib/threadlib.scad, line 42 

Compiling design (CSG Products generation)...

ERROR: Unable to convert point at index 1 to a vec3 of numbers, in file ../../../.local/share/OpenSCAD/libraries/list-comprehension-demos/skin.scad, line 32 

WARNING: PolySet has degenerate polygons



any ideas on what's going wrong?


--
ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: trouble setting up https://github.com/adrianschlatter/threadlib

MichaelAtOz
Administrator
bboett wrote

> Hello!
>
> i need some 1/2" pipe connector for a pump (when can they switch to metric
> :'( )
> and wanted to give https://github.com/adrianschlatter/threadlib a try....
>
> i cloned the 3 libs too
> had to fix the problem with the spaces in the IoP lib and add the path to
> the threadlib...
>
> i got it to display just a thread, but as soon as i try a bolt or nut i
> get
> :
>
> Loaded design '/home/bboett/Downloads/3dmodel/garten/pumpenadapter.scad'.
>
> Compiling design (CSG Tree generation)...
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 67
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 74
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 40
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 18
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 29
>
> WARNING: Unable to convert translate([0, 0, undef]) parameter to a vec3 or
> vec2 of numbers, in file
> ../../../.local/share/OpenSCAD/libraries/threadlib/threadlib.scad, line 42
>
> Compiling design (CSG Products generation)...
>
> ERROR: Unable to convert point at index 1 to a vec3 of numbers, in file
> ../../../.local/share/OpenSCAD/libraries/list-comprehension-demos/skin.scad,
> line 32
>
> WARNING: PolySet has degenerate polygons
>
>
>
> any ideas on what's going wrong?
>
> --
> ciao
> Bruno
>
> ===========================================
> http://nohkumado.eu/,
> <http://bboett.free.fr>http://aikido.nohkumado.eu/,
> <http://bboett.free.fr>
> http://aikido.zorn.free.fr
>
> _______________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

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

I just downloaded it & tried
bolt("M4", turns=5, higbee_arc=30);
and it worked.

> had to fix the problem with the spaces in the IoP lib and add the path to
> the threadlib

What is IoP lib?
No need to add the path if they are n your OpenSCAD library,
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Libraries

Please share pumpenadapter.scad




-----
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: trouble setting up https://github.com/adrianschlatter/threadlib

bboett
hmm really strange....
still doesn't work for me......
here's my lib:

ls -l ~/.local/share/OpenSCAD/libraries/
-rw-r--r-- 1 bboett bboett 15771 Dez 19  2018 dan_kirshner_threads.scad
drwxr-xr-x 7 bboett bboett  4096 Mai  8 13:42 IoP-satellite
drwxr-xr-x 4 bboett bboett  4096 Mai  7 15:38 list-comprehension-demos
drwxr-xr-x 3 bboett bboett  4096 Mär 16 18:32 pin_connectors
drwxr-xr-x 3 bboett bboett  4096 Mai  7 15:38 scad-utils
drwxr-xr-x 6 bboett bboett  4096 Mai  8 13:43 threadlib
lrwxrwxrwx 1 bboett bboett    57 Mai  8 13:39 thread_profile.scad -> 'IoP-satellite/OpenSCAD bottle threads/thread_profile.scad'
-rw-r--r-- 1 bboett bboett 16276 Mär 25 17:52 threads.scad

i tried the symbolic link in the hopes that this would solve the problem, and it did get further.... so at least i did something wrong, but it seems somehow openscad didn't delve far enough into the directories?
threadlib needs thread_profile.scad which is buried in IoP-satellite, and inside there the path with the spaces wasn't liked by openscad.....


thanks for looking



Am Mo., 11. Mai 2020 um 06:35 Uhr schrieb MichaelAtOz <[hidden email]>:
bboett wrote
> Hello!
>
> i need some 1/2" pipe connector for a pump (when can they switch to metric
> :'( )
> and wanted to give https://github.com/adrianschlatter/threadlib a try....
>
> i cloned the 3 libs too
> had to fix the problem with the spaces in the IoP lib and add the path to
> the threadlib...
>
> i got it to display just a thread, but as soon as i try a bolt or nut i
> get
> :
>
> Loaded design '/home/bboett/Downloads/3dmodel/garten/pumpenadapter.scad'.
>
> Compiling design (CSG Tree generation)...
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 67
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 74
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 40
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 18
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 29
>
> WARNING: Unable to convert translate([0, 0, undef]) parameter to a vec3 or
> vec2 of numbers, in file
> ../../../.local/share/OpenSCAD/libraries/threadlib/threadlib.scad, line 42
>
> Compiling design (CSG Products generation)...
>
> ERROR: Unable to convert point at index 1 to a vec3 of numbers, in file
> ../../../.local/share/OpenSCAD/libraries/list-comprehension-demos/skin.scad,
> line 32
>
> WARNING: PolySet has degenerate polygons
>
>
>
> any ideas on what's going wrong?
>
> --
> ciao
> Bruno
>
> ===========================================
> http://nohkumado.eu/,
> &lt;http://bboett.free.fr&gt;http://aikido.nohkumado.eu/,
> &lt;http://bboett.free.fr&gt;
> http://aikido.zorn.free.fr
>
> _______________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

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

I just downloaded it & tried
bolt("M4", turns=5, higbee_arc=30);
and it worked.

> had to fix the problem with the spaces in the IoP lib and add the path to
> the threadlib

What is IoP lib?
No need to add the path if they are n your OpenSCAD library,
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Libraries

Please share pumpenadapter.scad




-----
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


--
ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: trouble setting up https://github.com/adrianschlatter/threadlib

MichaelAtOz
Administrator

Works for me:

 

I suggest you try thread_profile.scad actually in OpenSCAD/libraries.

 

If you still have a problem, please use the scad code above, and show the console results.

 

 

 


From: Discuss [mailto:[hidden email]] On Behalf Of Bruno Boettcher
Sent: Tue, 12 May 2020 02:34
To: OpenSCAD general discussion
Subject: Re: [OpenSCAD] trouble setting up https://github.com/adrianschlatter/threadlib

 

hmm really strange....

still doesn't work for me......

here's my lib:

 

ls -l ~/.local/share/OpenSCAD/libraries/
-rw-r--r-- 1 bboett bboett 15771 Dez 19  2018 dan_kirshner_threads.scad
drwxr-xr-x 7 bboett bboett  4096 Mai  8 13:42 IoP-satellite
drwxr-xr-x 4 bboett bboett  4096 Mai  7 15:38 list-comprehension-demos
drwxr-xr-x 3 bboett bboett  4096 Mär 16 18:32 pin_connectors
drwxr-xr-x 3 bboett bboett  4096 Mai  7 15:38 scad-utils
drwxr-xr-x 6 bboett bboett  4096 Mai  8 13:43 threadlib
lrwxrwxrwx 1 bboett bboett    57 Mai  8 13:39 thread_profile.scad -> 'IoP-satellite/OpenSCAD bottle threads/thread_profile.scad'
-rw-r--r-- 1 bboett bboett 16276 Mär 25 17:52 threads.scad

 

i tried the symbolic link in the hopes that this would solve the problem, and it did get further.... so at least i did something wrong, but it seems somehow openscad didn't delve far enough into the directories?

threadlib needs thread_profile.scad which is buried in IoP-satellite, and inside there the path with the spaces wasn't liked by openscad.....

 

 

thanks for looking

 

 

 

Am Mo., 11. Mai 2020 um 06:35 Uhr schrieb MichaelAtOz <[hidden email]>:

bboett wrote
> Hello!
>
> i need some 1/2" pipe connector for a pump (when can they switch to metric
> :'( )
> and wanted to give https://github.com/adrianschlatter/threadlib a try....
>
> i cloned the 3 libs too
> had to fix the problem with the spaces in the IoP lib and add the path to
> the threadlib...
>
> i got it to display just a thread, but as soon as i try a bolt or nut i
> get
> :
>
> Loaded design '/home/bboett/Downloads/3dmodel/garten/pumpenadapter.scad'.
>
> Compiling design (CSG Tree generation)...
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 67
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 74
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 40
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 18
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 29
>
> WARNING: Unable to convert translate([0, 0, undef]) parameter to a vec3 or
> vec2 of numbers, in file
> ../../../.local/share/OpenSCAD/libraries/threadlib/threadlib.scad, line 42
>
> Compiling design (CSG Products generation)...
>
> ERROR: Unable to convert point at index 1 to a vec3 of numbers, in file
> ../../../.local/share/OpenSCAD/libraries/list-comprehension-demos/skin.scad,
> line 32
>
> WARNING: PolySet has degenerate polygons
>
>
>
> any ideas on what's going wrong?
>
> --
> ciao
> Bruno
>
> ===========================================
> http://nohkumado.eu/,
> &lt;http://bboett.free.fr&gt;http://aikido.nohkumado.eu/,
> &lt;http://bboett.free.fr&gt;
> http://aikido.zorn.free.fr
>
> _______________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

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

I just downloaded it & tried
bolt("M4", turns=5, higbee_arc=30);
and it worked.

> had to fix the problem with the spaces in the IoP lib and add the path to
> the threadlib

What is IoP lib?
No need to add the path if they are n your OpenSCAD library,
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Libraries

Please share pumpenadapter.scad




-----
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



--

ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr


Virus-free. www.avg.com

_______________________________________________
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: trouble setting up https://github.com/adrianschlatter/threadlib

bboett
ok tried it, worked, was baffled ... but then instead of metric thread, i used :

nut("G1/2-ext", turns=10, Douter=16);

full code:
use <threadlib/threadlib.scad>
use <../scalar-rackmods/masken/metrische_masken.scad>

difference()
{
 halbZollMutter();
cube(20);
}

//bolt("M4", turns = 5, higbee_arc = 30);
//bolt("G1/2-ext","turns = 5, higbee_arc = 30);
//nut("M12x0.5", turns=10, Douter=16);
nut("G1/2-ext", turns=10, Douter=16);

module halbZollMutter()
{
  difference()
  {
    metrische_mutter_schablone(14,startw = 30, toleranz = 0.1); //creates a M5 nut-mask, rotated by 30deg and with an added .1 width
    translate([0,0,.0])
      scale([1.05,1.05,1])
      union()
      {
        thread("G1/2-ext", turns=6);
        translate([0,0,-.8]) cylinder(d = 18.4, h = 12.7,$fn = 64);
      }
  }
}




and the i get in the console:

Compiling design (CSG Tree generation)...

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 67 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 74 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 40 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 18 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 29 

WARNING: Unable to convert translate([0, 0, undef]) parameter to a vec3 or vec2 of numbers, in file ../../../.local/share/OpenSCAD/libraries/threadlib/threadlib.scad, line 54 

Compiling design (CSG Products generation)...

ERROR: Unable to convert point at index 1 to a vec3 of numbers, in file ../../../.local/share/OpenSCAD/libraries/list-comprehension-demos/skin.scad, line 32 

WARNING: PolySet has degenerate polygons 

Geometries in cache: 8

Geometry cache size in bytes: 462040

CGAL Polyhedrons in cache: 0

CGAL cache size in bytes: 0

Compiling design (CSG Products normalization)...

Normalized CSG tree has 7 elements

Compile and preview finished.

Total rendering time: 0 hours, 0 minutes, 1 seconds


its OpenSCAD version 2020.04.26.nightly (git 648206e)



i remove the symbolic link on thread_profile.scad in the openscad library dir, didn't change anything indeed....

so ,well i created the nut myself, so the urgency is low, but still there's strange stuff going on....


ciao

Bruno


Am Mi., 13. Mai 2020 um 03:04 Uhr schrieb OzAtMichael <[hidden email]>:

Works for me:

 

I suggest you try thread_profile.scad actually in OpenSCAD/libraries.

 

If you still have a problem, please use the scad code above, and show the console results.

 

 

 


From: Discuss [mailto:[hidden email]] On Behalf Of Bruno Boettcher
Sent: Tue, 12 May 2020 02:34
To: OpenSCAD general discussion
Subject: Re: [OpenSCAD] trouble setting up https://github.com/adrianschlatter/threadlib

 

hmm really strange....

still doesn't work for me......

here's my lib:

 

ls -l ~/.local/share/OpenSCAD/libraries/
-rw-r--r-- 1 bboett bboett 15771 Dez 19  2018 dan_kirshner_threads.scad
drwxr-xr-x 7 bboett bboett  4096 Mai  8 13:42 IoP-satellite
drwxr-xr-x 4 bboett bboett  4096 Mai  7 15:38 list-comprehension-demos
drwxr-xr-x 3 bboett bboett  4096 Mär 16 18:32 pin_connectors
drwxr-xr-x 3 bboett bboett  4096 Mai  7 15:38 scad-utils
drwxr-xr-x 6 bboett bboett  4096 Mai  8 13:43 threadlib
lrwxrwxrwx 1 bboett bboett    57 Mai  8 13:39 thread_profile.scad -> 'IoP-satellite/OpenSCAD bottle threads/thread_profile.scad'
-rw-r--r-- 1 bboett bboett 16276 Mär 25 17:52 threads.scad

 

i tried the symbolic link in the hopes that this would solve the problem, and it did get further.... so at least i did something wrong, but it seems somehow openscad didn't delve far enough into the directories?

threadlib needs thread_profile.scad which is buried in IoP-satellite, and inside there the path with the spaces wasn't liked by openscad.....

 

 

thanks for looking

 

 

 

Am Mo., 11. Mai 2020 um 06:35 Uhr schrieb MichaelAtOz <[hidden email]>:

bboett wrote
> Hello!
>
> i need some 1/2" pipe connector for a pump (when can they switch to metric
> :'( )
> and wanted to give https://github.com/adrianschlatter/threadlib a try....
>
> i cloned the 3 libs too
> had to fix the problem with the spaces in the IoP lib and add the path to
> the threadlib...
>
> i got it to display just a thread, but as soon as i try a bolt or nut i
> get
> :
>
> Loaded design '/home/bboett/Downloads/3dmodel/garten/pumpenadapter.scad'.
>
> Compiling design (CSG Tree generation)...
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 67
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 74
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 40
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 18
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 29
>
> WARNING: Unable to convert translate([0, 0, undef]) parameter to a vec3 or
> vec2 of numbers, in file
> ../../../.local/share/OpenSCAD/libraries/threadlib/threadlib.scad, line 42
>
> Compiling design (CSG Products generation)...
>
> ERROR: Unable to convert point at index 1 to a vec3 of numbers, in file
> ../../../.local/share/OpenSCAD/libraries/list-comprehension-demos/skin.scad,
> line 32
>
> WARNING: PolySet has degenerate polygons
>
>
>
> any ideas on what's going wrong?
>
> --
> ciao
> Bruno
>
> ===========================================
> http://nohkumado.eu/,
> &lt;http://bboett.free.fr&gt;http://aikido.nohkumado.eu/,
> &lt;http://bboett.free.fr&gt;
> http://aikido.zorn.free.fr
>
> _______________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

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

I just downloaded it & tried
bolt("M4", turns=5, higbee_arc=30);
and it worked.

> had to fix the problem with the spaces in the IoP lib and add the path to
> the threadlib

What is IoP lib?
No need to add the path if they are n your OpenSCAD library,
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Libraries

Please share pumpenadapter.scad




-----
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



--

ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr


Virus-free. www.avg.com
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


--
ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: trouble setting up https://github.com/adrianschlatter/threadlib

MichaelAtOz
Administrator
I got the same errors, I'll have a deeper look.



-----
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: trouble setting up https://github.com/adrianschlatter/threadlib

MichaelAtOz
Administrator
In reply to this post by bboett

Garbage In - Garbage Out.

If you look at threadlib.scad, bolt() & nut() add the "-ext" or "-int" to the designator.

So nut("G1/2-ext", turns=10, Douter=16); goes searching for "G1/2-ext-int" which doesn't exist.

The rest of the program tries to run with an undef variable and naturally fails badly...

 

nut("G1/2", turns=10, Douter=16); // works

 

Many, particularly older, libraries do not do much parameter checking.

 

 


From: Discuss [mailto:[hidden email]] On Behalf Of Bruno Boettcher
Sent: Wed, 13 May 2020 20:25
To: OpenSCAD general discussion
Subject: Re: [OpenSCAD] trouble setting up https://github.com/adrianschlatter/threadlib

 

ok tried it, worked, was baffled ... but then instead of metric thread, i used :

 

nut("G1/2-ext", turns=10, Douter=16);

 

full code:

use <threadlib/threadlib.scad>
use <../scalar-rackmods/masken/metrische_masken.scad>

difference()
{
 halbZollMutter();
cube(20);
}

//bolt("M4", turns = 5, higbee_arc = 30);
//bolt("G1/2-ext","turns = 5, higbee_arc = 30);
//nut("M12x0.5", turns=10, Douter=16);
nut("G1/2-ext", turns=10, Douter=16);

module halbZollMutter()
{
  difference()
  {
    metrische_mutter_schablone(14,startw = 30, toleranz = 0.1); //creates a M5 nut-mask, rotated by 30deg and with an added .1 width
    translate([0,0,.0])
      scale([1.05,1.05,1])
      union()
      {
        thread("G1/2-ext", turns=6);
        translate([0,0,-.8]) cylinder(d = 18.4, h = 12.7,$fn = 64);
      }
  }
}

 

 

 

 

and the i get in the console:

Compiling design (CSG Tree generation)...

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 67 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 74 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 40 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 18 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 29 

WARNING: Unable to convert translate([0, 0, undef]) parameter to a vec3 or vec2 of numbers, in file ../../../.local/share/OpenSCAD/libraries/threadlib/threadlib.scad, line 54 

Compiling design (CSG Products generation)...

ERROR: Unable to convert point at index 1 to a vec3 of numbers, in file ../../../.local/share/OpenSCAD/libraries/list-comprehension-demos/skin.scad, line 32 

WARNING: PolySet has degenerate polygons 

Geometries in cache: 8

Geometry cache size in bytes: 462040

CGAL Polyhedrons in cache: 0

CGAL cache size in bytes: 0

Compiling design (CSG Products normalization)...

Normalized CSG tree has 7 elements

Compile and preview finished.

Total rendering time: 0 hours, 0 minutes, 1 seconds

 

its OpenSCAD version 2020.04.26.nightly (git 648206e)

 

 

i remove the symbolic link on thread_profile.scad in the openscad library dir, didn't change anything indeed....

so ,well i created the nut myself, so the urgency is low, but still there's strange stuff going on....

 

ciao

Bruno

 

Am Mi., 13. Mai 2020 um 03:04 Uhr schrieb OzAtMichael <[hidden email]>:

Works for me:

 

I suggest you try thread_profile.scad actually in OpenSCAD/libraries.

 

If you still have a problem, please use the scad code above, and show the console results.

 

 

 


From: Discuss [mailto:[hidden email]] On Behalf Of Bruno Boettcher
Sent: Tue, 12 May 2020 02:34
To: OpenSCAD general discussion
Subject: Re: [OpenSCAD] trouble setting up https://github.com/adrianschlatter/threadlib

 

hmm really strange....

still doesn't work for me......

here's my lib:

 

ls -l ~/.local/share/OpenSCAD/libraries/
-rw-r--r-- 1 bboett bboett 15771 Dez 19  2018 dan_kirshner_threads.scad
drwxr-xr-x 7 bboett bboett  4096 Mai  8 13:42 IoP-satellite
drwxr-xr-x 4 bboett bboett  4096 Mai  7 15:38 list-comprehension-demos
drwxr-xr-x 3 bboett bboett  4096 Mär 16 18:32 pin_connectors
drwxr-xr-x 3 bboett bboett  4096 Mai  7 15:38 scad-utils
drwxr-xr-x 6 bboett bboett  4096 Mai  8 13:43 threadlib
lrwxrwxrwx 1 bboett bboett    57 Mai  8 13:39 thread_profile.scad -> 'IoP-satellite/OpenSCAD bottle threads/thread_profile.scad'
-rw-r--r-- 1 bboett bboett 16276 Mär 25 17:52 threads.scad

 

i tried the symbolic link in the hopes that this would solve the problem, and it did get further.... so at least i did something wrong, but it seems somehow openscad didn't delve far enough into the directories?

threadlib needs thread_profile.scad which is buried in IoP-satellite, and inside there the path with the spaces wasn't liked by openscad.....

 

 

thanks for looking

 

 

 

Am Mo., 11. Mai 2020 um 06:35 Uhr schrieb MichaelAtOz <[hidden email]>:

bboett wrote
> Hello!
>
> i need some 1/2" pipe connector for a pump (when can they switch to metric
> :'( )
> and wanted to give https://github.com/adrianschlatter/threadlib a try....
>
> i cloned the 3 libs too
> had to fix the problem with the spaces in the IoP lib and add the path to
> the threadlib...
>
> i got it to display just a thread, but as soon as i try a bolt or nut i
> get
> :
>
> Loaded design '/home/bboett/Downloads/3dmodel/garten/pumpenadapter.scad'.
>
> Compiling design (CSG Tree generation)...
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 67
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 74
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 40
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 18
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 29
>
> WARNING: Unable to convert translate([0, 0, undef]) parameter to a vec3 or
> vec2 of numbers, in file
> ../../../.local/share/OpenSCAD/libraries/threadlib/threadlib.scad, line 42
>
> Compiling design (CSG Products generation)...
>
> ERROR: Unable to convert point at index 1 to a vec3 of numbers, in file
> ../../../.local/share/OpenSCAD/libraries/list-comprehension-demos/skin.scad,
> line 32
>
> WARNING: PolySet has degenerate polygons
>
>
>
> any ideas on what's going wrong?
>
> --
> ciao
> Bruno
>
> ===========================================
> http://nohkumado.eu/,
> &lt;http://bboett.free.fr&gt;http://aikido.nohkumado.eu/,
> &lt;http://bboett.free.fr&gt;
> http://aikido.zorn.free.fr
>
> _______________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

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

I just downloaded it & tried
bolt("M4", turns=5, higbee_arc=30);
and it worked.

> had to fix the problem with the spaces in the IoP lib and add the path to
> the threadlib

What is IoP lib?
No need to add the path if they are n your OpenSCAD library,
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Libraries

Please share pumpenadapter.scad




-----
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



--

ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr

 

Virus-free. www.avg.com

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



--

ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr


_______________________________________________
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: trouble setting up https://github.com/adrianschlatter/threadlib

bboett
indeed!
thanks for looking!

ehm... wanted to add paramter checking to that libray.... but looking through the doc... are there string regexp in openscad?
is there a preferred way of checking this?

ciao
Bruno


Am Do., 14. Mai 2020 um 06:49 Uhr schrieb OzAtMichael <[hidden email]>:

Garbage In - Garbage Out.

If you look at threadlib.scad, bolt() & nut() add the "-ext" or "-int" to the designator.

So nut("G1/2-ext", turns=10, Douter=16); goes searching for "G1/2-ext-int" which doesn't exist.

The rest of the program tries to run with an undef variable and naturally fails badly...

 

nut("G1/2", turns=10, Douter=16); // works

 

Many, particularly older, libraries do not do much parameter checking.

 

 


From: Discuss [mailto:[hidden email]] On Behalf Of Bruno Boettcher
Sent: Wed, 13 May 2020 20:25
To: OpenSCAD general discussion
Subject: Re: [OpenSCAD] trouble setting up https://github.com/adrianschlatter/threadlib

 

ok tried it, worked, was baffled ... but then instead of metric thread, i used :

 

nut("G1/2-ext", turns=10, Douter=16);

 

full code:

use <threadlib/threadlib.scad>
use <../scalar-rackmods/masken/metrische_masken.scad>

difference()
{
 halbZollMutter();
cube(20);
}

//bolt("M4", turns = 5, higbee_arc = 30);
//bolt("G1/2-ext","turns = 5, higbee_arc = 30);
//nut("M12x0.5", turns=10, Douter=16);
nut("G1/2-ext", turns=10, Douter=16);

module halbZollMutter()
{
  difference()
  {
    metrische_mutter_schablone(14,startw = 30, toleranz = 0.1); //creates a M5 nut-mask, rotated by 30deg and with an added .1 width
    translate([0,0,.0])
      scale([1.05,1.05,1])
      union()
      {
        thread("G1/2-ext", turns=6);
        translate([0,0,-.8]) cylinder(d = 18.4, h = 12.7,$fn = 64);
      }
  }
}

 

 

 

 

and the i get in the console:

Compiling design (CSG Tree generation)...

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 67 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 74 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 40 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 18 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 29 

WARNING: Unable to convert translate([0, 0, undef]) parameter to a vec3 or vec2 of numbers, in file ../../../.local/share/OpenSCAD/libraries/threadlib/threadlib.scad, line 54 

Compiling design (CSG Products generation)...

ERROR: Unable to convert point at index 1 to a vec3 of numbers, in file ../../../.local/share/OpenSCAD/libraries/list-comprehension-demos/skin.scad, line 32 

WARNING: PolySet has degenerate polygons 

Geometries in cache: 8

Geometry cache size in bytes: 462040

CGAL Polyhedrons in cache: 0

CGAL cache size in bytes: 0

Compiling design (CSG Products normalization)...

Normalized CSG tree has 7 elements

Compile and preview finished.

Total rendering time: 0 hours, 0 minutes, 1 seconds

 

its OpenSCAD version 2020.04.26.nightly (git 648206e)

 

 

i remove the symbolic link on thread_profile.scad in the openscad library dir, didn't change anything indeed....

so ,well i created the nut myself, so the urgency is low, but still there's strange stuff going on....

 

ciao

Bruno

 

Am Mi., 13. Mai 2020 um 03:04 Uhr schrieb OzAtMichael <[hidden email]>:

Works for me:

 

I suggest you try thread_profile.scad actually in OpenSCAD/libraries.

 

If you still have a problem, please use the scad code above, and show the console results.

 

 

 


From: Discuss [mailto:[hidden email]] On Behalf Of Bruno Boettcher
Sent: Tue, 12 May 2020 02:34
To: OpenSCAD general discussion
Subject: Re: [OpenSCAD] trouble setting up https://github.com/adrianschlatter/threadlib

 

hmm really strange....

still doesn't work for me......

here's my lib:

 

ls -l ~/.local/share/OpenSCAD/libraries/
-rw-r--r-- 1 bboett bboett 15771 Dez 19  2018 dan_kirshner_threads.scad
drwxr-xr-x 7 bboett bboett  4096 Mai  8 13:42 IoP-satellite
drwxr-xr-x 4 bboett bboett  4096 Mai  7 15:38 list-comprehension-demos
drwxr-xr-x 3 bboett bboett  4096 Mär 16 18:32 pin_connectors
drwxr-xr-x 3 bboett bboett  4096 Mai  7 15:38 scad-utils
drwxr-xr-x 6 bboett bboett  4096 Mai  8 13:43 threadlib
lrwxrwxrwx 1 bboett bboett    57 Mai  8 13:39 thread_profile.scad -> 'IoP-satellite/OpenSCAD bottle threads/thread_profile.scad'
-rw-r--r-- 1 bboett bboett 16276 Mär 25 17:52 threads.scad

 

i tried the symbolic link in the hopes that this would solve the problem, and it did get further.... so at least i did something wrong, but it seems somehow openscad didn't delve far enough into the directories?

threadlib needs thread_profile.scad which is buried in IoP-satellite, and inside there the path with the spaces wasn't liked by openscad.....

 

 

thanks for looking

 

 

 

Am Mo., 11. Mai 2020 um 06:35 Uhr schrieb MichaelAtOz <[hidden email]>:

bboett wrote
> Hello!
>
> i need some 1/2" pipe connector for a pump (when can they switch to metric
> :'( )
> and wanted to give https://github.com/adrianschlatter/threadlib a try....
>
> i cloned the 3 libs too
> had to fix the problem with the spaces in the IoP lib and add the path to
> the threadlib...
>
> i got it to display just a thread, but as soon as i try a bolt or nut i
> get
> :
>
> Loaded design '/home/bboett/Downloads/3dmodel/garten/pumpenadapter.scad'.
>
> Compiling design (CSG Tree generation)...
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 67
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 74
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 40
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 18
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 29
>
> WARNING: Unable to convert translate([0, 0, undef]) parameter to a vec3 or
> vec2 of numbers, in file
> ../../../.local/share/OpenSCAD/libraries/threadlib/threadlib.scad, line 42
>
> Compiling design (CSG Products generation)...
>
> ERROR: Unable to convert point at index 1 to a vec3 of numbers, in file
> ../../../.local/share/OpenSCAD/libraries/list-comprehension-demos/skin.scad,
> line 32
>
> WARNING: PolySet has degenerate polygons
>
>
>
> any ideas on what's going wrong?
>
> --
> ciao
> Bruno
>
> ===========================================
> http://nohkumado.eu/,
> &lt;http://bboett.free.fr&gt;http://aikido.nohkumado.eu/,
> &lt;http://bboett.free.fr&gt;
> http://aikido.zorn.free.fr
>
> _______________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

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

I just downloaded it & tried
bolt("M4", turns=5, higbee_arc=30);
and it worked.

> had to fix the problem with the spaces in the IoP lib and add the path to
> the threadlib

What is IoP lib?
No need to add the path if they are n your OpenSCAD library,
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Libraries

Please share pumpenadapter.scad




-----
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



--

ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr

 

Virus-free. www.avg.com

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



--

ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr

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


--
ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: trouble setting up https://github.com/adrianschlatter/threadlib

bboett
this seems more complicated than anticipated.... :D


tried the following, threadlib.scad line 35+:

function addIntExt(designator, ext) = (len(search("-ext",designator)) > 0 || len(search("-int",designator)) > 0)? str(designator) : str(designator, "-ext");

module bolt(designator, turns, higbee_arc=20, fn=120, table=THREAD_TABLE) {
    union() {
        specs = thread_specs(addIntExt(designator, "-ext"), table=table);
      echo("specs for ",addIntExt(designator, "-int")," ",specs);
        //specs = thread_specs(str(designator, "-ext"), table=table);
        P = specs[0]; Dsupport = specs[2];
        H = (turns + 1) * P;
        thread(str(designator, "-ext"), turns=turns, higbee_arc=higbee_arc, fn=fn, table=table);
        translate([0, 0, -P / 2])
            cylinder(h=H, d=Dsupport, $fn=fn);
    };
};

so when i test this with
nut("G1/2", turns=10, Douter=40);
or
nut("G1/2-int", turns=10, Douter=40);


the result of the call to thread_specs doesn't give back the same result... why??
here's that code:
function thread_specs(designator, table=THREAD_TABLE) =
 18     /* Returns thread specs of thread-type 'designator' as a vector of
 19        [pitch, Rrotation, Dsupport, section_profile] */
 20     table[search([designator], table, num_returns_per_match=1,
 21                    index_col_num=0)[0]][1];

and i didn't find out on how to remove altogether the -int/-ext of the string prior to adding its own....

ciao
Bruno


Am Do., 14. Mai 2020 um 18:42 Uhr schrieb Bruno Boettcher <[hidden email]>:
indeed!
thanks for looking!

ehm... wanted to add paramter checking to that libray.... but looking through the doc... are there string regexp in openscad?
is there a preferred way of checking this?

ciao
Bruno


Am Do., 14. Mai 2020 um 06:49 Uhr schrieb OzAtMichael <[hidden email]>:

Garbage In - Garbage Out.

If you look at threadlib.scad, bolt() & nut() add the "-ext" or "-int" to the designator.

So nut("G1/2-ext", turns=10, Douter=16); goes searching for "G1/2-ext-int" which doesn't exist.

The rest of the program tries to run with an undef variable and naturally fails badly...

 

nut("G1/2", turns=10, Douter=16); // works

 

Many, particularly older, libraries do not do much parameter checking.

 

 


From: Discuss [mailto:[hidden email]] On Behalf Of Bruno Boettcher
Sent: Wed, 13 May 2020 20:25
To: OpenSCAD general discussion
Subject: Re: [OpenSCAD] trouble setting up https://github.com/adrianschlatter/threadlib

 

ok tried it, worked, was baffled ... but then instead of metric thread, i used :

 

nut("G1/2-ext", turns=10, Douter=16);

 

full code:

use <threadlib/threadlib.scad>
use <../scalar-rackmods/masken/metrische_masken.scad>

difference()
{
 halbZollMutter();
cube(20);
}

//bolt("M4", turns = 5, higbee_arc = 30);
//bolt("G1/2-ext","turns = 5, higbee_arc = 30);
//nut("M12x0.5", turns=10, Douter=16);
nut("G1/2-ext", turns=10, Douter=16);

module halbZollMutter()
{
  difference()
  {
    metrische_mutter_schablone(14,startw = 30, toleranz = 0.1); //creates a M5 nut-mask, rotated by 30deg and with an added .1 width
    translate([0,0,.0])
      scale([1.05,1.05,1])
      union()
      {
        thread("G1/2-ext", turns=6);
        translate([0,0,-.8]) cylinder(d = 18.4, h = 12.7,$fn = 64);
      }
  }
}

 

 

 

 

and the i get in the console:

Compiling design (CSG Tree generation)...

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 67 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 74 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 40 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 18 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 29 

WARNING: Unable to convert translate([0, 0, undef]) parameter to a vec3 or vec2 of numbers, in file ../../../.local/share/OpenSCAD/libraries/threadlib/threadlib.scad, line 54 

Compiling design (CSG Products generation)...

ERROR: Unable to convert point at index 1 to a vec3 of numbers, in file ../../../.local/share/OpenSCAD/libraries/list-comprehension-demos/skin.scad, line 32 

WARNING: PolySet has degenerate polygons 

Geometries in cache: 8

Geometry cache size in bytes: 462040

CGAL Polyhedrons in cache: 0

CGAL cache size in bytes: 0

Compiling design (CSG Products normalization)...

Normalized CSG tree has 7 elements

Compile and preview finished.

Total rendering time: 0 hours, 0 minutes, 1 seconds

 

its OpenSCAD version 2020.04.26.nightly (git 648206e)

 

 

i remove the symbolic link on thread_profile.scad in the openscad library dir, didn't change anything indeed....

so ,well i created the nut myself, so the urgency is low, but still there's strange stuff going on....

 

ciao

Bruno

 

Am Mi., 13. Mai 2020 um 03:04 Uhr schrieb OzAtMichael <[hidden email]>:

Works for me:

 

I suggest you try thread_profile.scad actually in OpenSCAD/libraries.

 

If you still have a problem, please use the scad code above, and show the console results.

 

 

 


From: Discuss [mailto:[hidden email]] On Behalf Of Bruno Boettcher
Sent: Tue, 12 May 2020 02:34
To: OpenSCAD general discussion
Subject: Re: [OpenSCAD] trouble setting up https://github.com/adrianschlatter/threadlib

 

hmm really strange....

still doesn't work for me......

here's my lib:

 

ls -l ~/.local/share/OpenSCAD/libraries/
-rw-r--r-- 1 bboett bboett 15771 Dez 19  2018 dan_kirshner_threads.scad
drwxr-xr-x 7 bboett bboett  4096 Mai  8 13:42 IoP-satellite
drwxr-xr-x 4 bboett bboett  4096 Mai  7 15:38 list-comprehension-demos
drwxr-xr-x 3 bboett bboett  4096 Mär 16 18:32 pin_connectors
drwxr-xr-x 3 bboett bboett  4096 Mai  7 15:38 scad-utils
drwxr-xr-x 6 bboett bboett  4096 Mai  8 13:43 threadlib
lrwxrwxrwx 1 bboett bboett    57 Mai  8 13:39 thread_profile.scad -> 'IoP-satellite/OpenSCAD bottle threads/thread_profile.scad'
-rw-r--r-- 1 bboett bboett 16276 Mär 25 17:52 threads.scad

 

i tried the symbolic link in the hopes that this would solve the problem, and it did get further.... so at least i did something wrong, but it seems somehow openscad didn't delve far enough into the directories?

threadlib needs thread_profile.scad which is buried in IoP-satellite, and inside there the path with the spaces wasn't liked by openscad.....

 

 

thanks for looking

 

 

 

Am Mo., 11. Mai 2020 um 06:35 Uhr schrieb MichaelAtOz <[hidden email]>:

bboett wrote
> Hello!
>
> i need some 1/2" pipe connector for a pump (when can they switch to metric
> :'( )
> and wanted to give https://github.com/adrianschlatter/threadlib a try....
>
> i cloned the 3 libs too
> had to fix the problem with the spaces in the IoP lib and add the path to
> the threadlib...
>
> i got it to display just a thread, but as soon as i try a bolt or nut i
> get
> :
>
> Loaded design '/home/bboett/Downloads/3dmodel/garten/pumpenadapter.scad'.
>
> Compiling design (CSG Tree generation)...
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 67
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 74
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 40
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 18
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 29
>
> WARNING: Unable to convert translate([0, 0, undef]) parameter to a vec3 or
> vec2 of numbers, in file
> ../../../.local/share/OpenSCAD/libraries/threadlib/threadlib.scad, line 42
>
> Compiling design (CSG Products generation)...
>
> ERROR: Unable to convert point at index 1 to a vec3 of numbers, in file
> ../../../.local/share/OpenSCAD/libraries/list-comprehension-demos/skin.scad,
> line 32
>
> WARNING: PolySet has degenerate polygons
>
>
>
> any ideas on what's going wrong?
>
> --
> ciao
> Bruno
>
> ===========================================
> http://nohkumado.eu/,
> &lt;http://bboett.free.fr&gt;http://aikido.nohkumado.eu/,
> &lt;http://bboett.free.fr&gt;
> http://aikido.zorn.free.fr
>
> _______________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

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

I just downloaded it & tried
bolt("M4", turns=5, higbee_arc=30);
and it worked.

> had to fix the problem with the spaces in the IoP lib and add the path to
> the threadlib

What is IoP lib?
No need to add the path if they are n your OpenSCAD library,
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Libraries

Please share pumpenadapter.scad




-----
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



--

ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr

 

Virus-free. www.avg.com

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



--

ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr

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


--
ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr


--
ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: trouble setting up https://github.com/adrianschlatter/threadlib

bboett
yeah... forgot to paste the output

and corrected one obvious error:
35 function addIntExt(designator, ext) = (len(search("-ext",designator)) > 0 || len(search("-int"    ,designator)) > 0)? str(designator) : str(designator, ext);

for nut("G1/2", turns=10, Douter=40);

Loaded design '/home/bboett/Downloads/3dmodel/garten/HalbZollMutter.scad'.

Compiling design (CSG Tree generation)...

ECHO: "specs for ", "G1/2-int", " ", [1.814, -10.6943, 21.3159, [[0, 0.8503], [0, -0.8503], [1.1696, -0.2415], [1.1696, 0.2415]]]

Compiling design (CSG Products generation)...

Geometries in cache: 77

Geometry cache size in bytes: 10391888


for nut("G1/2-int", turns=10, Douter=40);

Loaded design '/home/bboett/Downloads/3dmodel/garten/HalbZollMutter.scad'.

Compiling design (CSG Tree generation)...

ECHO: "specs for ", "G1/2-int", " ", [1.814, -10.6943, 21.3159, [[0, 0.8503], [0, -0.8503], [1.1696, -0.2415], [1.1696, 0.2415]]]

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 67 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 74 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 40 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 18 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 29 

Compiling design (CSG Products generation)...


so somethings still wrong...



Am Do., 14. Mai 2020 um 19:25 Uhr schrieb Bruno Boettcher <[hidden email]>:
this seems more complicated than anticipated.... :D


tried the following, threadlib.scad line 35+:

function addIntExt(designator, ext) = (len(search("-ext",designator)) > 0 || len(search("-int",designator)) > 0)? str(designator) : str(designator, "-ext");

module bolt(designator, turns, higbee_arc=20, fn=120, table=THREAD_TABLE) {
    union() {
        specs = thread_specs(addIntExt(designator, "-ext"), table=table);
      echo("specs for ",addIntExt(designator, "-int")," ",specs);
        //specs = thread_specs(str(designator, "-ext"), table=table);
        P = specs[0]; Dsupport = specs[2];
        H = (turns + 1) * P;
        thread(str(designator, "-ext"), turns=turns, higbee_arc=higbee_arc, fn=fn, table=table);
        translate([0, 0, -P / 2])
            cylinder(h=H, d=Dsupport, $fn=fn);
    };
};

so when i test this with
nut("G1/2", turns=10, Douter=40);
or
nut("G1/2-int", turns=10, Douter=40);


the result of the call to thread_specs doesn't give back the same result... why??
here's that code:
function thread_specs(designator, table=THREAD_TABLE) =
 18     /* Returns thread specs of thread-type 'designator' as a vector of
 19        [pitch, Rrotation, Dsupport, section_profile] */
 20     table[search([designator], table, num_returns_per_match=1,
 21                    index_col_num=0)[0]][1];

and i didn't find out on how to remove altogether the -int/-ext of the string prior to adding its own....

ciao
Bruno


Am Do., 14. Mai 2020 um 18:42 Uhr schrieb Bruno Boettcher <[hidden email]>:
indeed!
thanks for looking!

ehm... wanted to add paramter checking to that libray.... but looking through the doc... are there string regexp in openscad?
is there a preferred way of checking this?

ciao
Bruno


Am Do., 14. Mai 2020 um 06:49 Uhr schrieb OzAtMichael <[hidden email]>:

Garbage In - Garbage Out.

If you look at threadlib.scad, bolt() & nut() add the "-ext" or "-int" to the designator.

So nut("G1/2-ext", turns=10, Douter=16); goes searching for "G1/2-ext-int" which doesn't exist.

The rest of the program tries to run with an undef variable and naturally fails badly...

 

nut("G1/2", turns=10, Douter=16); // works

 

Many, particularly older, libraries do not do much parameter checking.

 

 


From: Discuss [mailto:[hidden email]] On Behalf Of Bruno Boettcher
Sent: Wed, 13 May 2020 20:25
To: OpenSCAD general discussion
Subject: Re: [OpenSCAD] trouble setting up https://github.com/adrianschlatter/threadlib

 

ok tried it, worked, was baffled ... but then instead of metric thread, i used :

 

nut("G1/2-ext", turns=10, Douter=16);

 

full code:

use <threadlib/threadlib.scad>
use <../scalar-rackmods/masken/metrische_masken.scad>

difference()
{
 halbZollMutter();
cube(20);
}

//bolt("M4", turns = 5, higbee_arc = 30);
//bolt("G1/2-ext","turns = 5, higbee_arc = 30);
//nut("M12x0.5", turns=10, Douter=16);
nut("G1/2-ext", turns=10, Douter=16);

module halbZollMutter()
{
  difference()
  {
    metrische_mutter_schablone(14,startw = 30, toleranz = 0.1); //creates a M5 nut-mask, rotated by 30deg and with an added .1 width
    translate([0,0,.0])
      scale([1.05,1.05,1])
      union()
      {
        thread("G1/2-ext", turns=6);
        translate([0,0,-.8]) cylinder(d = 18.4, h = 12.7,$fn = 64);
      }
  }
}

 

 

 

 

and the i get in the console:

Compiling design (CSG Tree generation)...

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 67 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 74 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 40 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 18 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 29 

WARNING: Unable to convert translate([0, 0, undef]) parameter to a vec3 or vec2 of numbers, in file ../../../.local/share/OpenSCAD/libraries/threadlib/threadlib.scad, line 54 

Compiling design (CSG Products generation)...

ERROR: Unable to convert point at index 1 to a vec3 of numbers, in file ../../../.local/share/OpenSCAD/libraries/list-comprehension-demos/skin.scad, line 32 

WARNING: PolySet has degenerate polygons 

Geometries in cache: 8

Geometry cache size in bytes: 462040

CGAL Polyhedrons in cache: 0

CGAL cache size in bytes: 0

Compiling design (CSG Products normalization)...

Normalized CSG tree has 7 elements

Compile and preview finished.

Total rendering time: 0 hours, 0 minutes, 1 seconds

 

its OpenSCAD version 2020.04.26.nightly (git 648206e)

 

 

i remove the symbolic link on thread_profile.scad in the openscad library dir, didn't change anything indeed....

so ,well i created the nut myself, so the urgency is low, but still there's strange stuff going on....

 

ciao

Bruno

 

Am Mi., 13. Mai 2020 um 03:04 Uhr schrieb OzAtMichael <[hidden email]>:

Works for me:

 

I suggest you try thread_profile.scad actually in OpenSCAD/libraries.

 

If you still have a problem, please use the scad code above, and show the console results.

 

 

 


From: Discuss [mailto:[hidden email]] On Behalf Of Bruno Boettcher
Sent: Tue, 12 May 2020 02:34
To: OpenSCAD general discussion
Subject: Re: [OpenSCAD] trouble setting up https://github.com/adrianschlatter/threadlib

 

hmm really strange....

still doesn't work for me......

here's my lib:

 

ls -l ~/.local/share/OpenSCAD/libraries/
-rw-r--r-- 1 bboett bboett 15771 Dez 19  2018 dan_kirshner_threads.scad
drwxr-xr-x 7 bboett bboett  4096 Mai  8 13:42 IoP-satellite
drwxr-xr-x 4 bboett bboett  4096 Mai  7 15:38 list-comprehension-demos
drwxr-xr-x 3 bboett bboett  4096 Mär 16 18:32 pin_connectors
drwxr-xr-x 3 bboett bboett  4096 Mai  7 15:38 scad-utils
drwxr-xr-x 6 bboett bboett  4096 Mai  8 13:43 threadlib
lrwxrwxrwx 1 bboett bboett    57 Mai  8 13:39 thread_profile.scad -> 'IoP-satellite/OpenSCAD bottle threads/thread_profile.scad'
-rw-r--r-- 1 bboett bboett 16276 Mär 25 17:52 threads.scad

 

i tried the symbolic link in the hopes that this would solve the problem, and it did get further.... so at least i did something wrong, but it seems somehow openscad didn't delve far enough into the directories?

threadlib needs thread_profile.scad which is buried in IoP-satellite, and inside there the path with the spaces wasn't liked by openscad.....

 

 

thanks for looking

 

 

 

Am Mo., 11. Mai 2020 um 06:35 Uhr schrieb MichaelAtOz <[hidden email]>:

bboett wrote
> Hello!
>
> i need some 1/2" pipe connector for a pump (when can they switch to metric
> :'( )
> and wanted to give https://github.com/adrianschlatter/threadlib a try....
>
> i cloned the 3 libs too
> had to fix the problem with the spaces in the IoP lib and add the path to
> the threadlib...
>
> i got it to display just a thread, but as soon as i try a bolt or nut i
> get
> :
>
> Loaded design '/home/bboett/Downloads/3dmodel/garten/pumpenadapter.scad'.
>
> Compiling design (CSG Tree generation)...
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 67
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 74
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 40
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 18
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 29
>
> WARNING: Unable to convert translate([0, 0, undef]) parameter to a vec3 or
> vec2 of numbers, in file
> ../../../.local/share/OpenSCAD/libraries/threadlib/threadlib.scad, line 42
>
> Compiling design (CSG Products generation)...
>
> ERROR: Unable to convert point at index 1 to a vec3 of numbers, in file
> ../../../.local/share/OpenSCAD/libraries/list-comprehension-demos/skin.scad,
> line 32
>
> WARNING: PolySet has degenerate polygons
>
>
>
> any ideas on what's going wrong?
>
> --
> ciao
> Bruno
>
> ===========================================
> http://nohkumado.eu/,
> &lt;http://bboett.free.fr&gt;http://aikido.nohkumado.eu/,
> &lt;http://bboett.free.fr&gt;
> http://aikido.zorn.free.fr
>
> _______________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

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

I just downloaded it & tried
bolt("M4", turns=5, higbee_arc=30);
and it worked.

> had to fix the problem with the spaces in the IoP lib and add the path to
> the threadlib

What is IoP lib?
No need to add the path if they are n your OpenSCAD library,
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Libraries

Please share pumpenadapter.scad




-----
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



--

ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr

 

Virus-free. www.avg.com

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



--

ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr

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


--
ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr


--
ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr


--
ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: trouble setting up https://github.com/adrianschlatter/threadlib

bboett
ok, when i am beeing stupid, i do it very well....

would this be ok?
and is there any way to remove the -ext/-int from the string instead of just testing and letting the value pass, even if wrong?

function addIntExt(designator, ext) = (len(search("-ext",designator)) > 0 || len(search("-int",designator)) > 0)? str(designator) : str(designator, ext);

module bolt(designator, turns, higbee_arc=20, fn=120, table=THREAD_TABLE)
{
    name = addIntExt(designator, "-ext");
    union() {
        specs = thread_specs(name, table=table);
      echo("specs for ",addIntExt(designator, "-int")," ",specs);
        //specs = thread_specs(str(designator, "-ext"), table=table);
        P = specs[0]; Dsupport = specs[2];
        H = (turns + 1) * P;
        thread(name, turns=turns, higbee_arc=higbee_arc, fn=fn, table=table);
        translate([0, 0, -P / 2])
            cylinder(h=H, d=Dsupport, $fn=fn);
    };  
};

module nut(designator, turns, Douter, higbee_arc=20, fn=120, table=THREAD_TABLE) {
    name = addIntExt(designator, "-ext");
    union() {
        //specs = thread_specs(str(designator, "-int"), table=table);
        specs = thread_specs(name, table=table);
         
      echo("specs for ",addIntExt(designator, "-int")," ",specs);
        P = specs[0]; Dsupport = specs[2];
        H = (turns + 1) * P;            
        thread(name, turns=turns, higbee_arc=higbee_arc, fn=fn, table=table);

        translate([0, 0, -P / 2])
            difference() {
                cylinder(h=H, d=Douter, $fn=fn);
                translate([0, 0, -0.1])
                    cylinder(h=H+0.2, d=Dsupport, $fn=fn);
            };  
    };  
};

Am Do., 14. Mai 2020 um 19:37 Uhr schrieb Bruno Boettcher <[hidden email]>:
yeah... forgot to paste the output

and corrected one obvious error:
35 function addIntExt(designator, ext) = (len(search("-ext",designator)) > 0 || len(search("-int"    ,designator)) > 0)? str(designator) : str(designator, ext);

for nut("G1/2", turns=10, Douter=40);

Loaded design '/home/bboett/Downloads/3dmodel/garten/HalbZollMutter.scad'.

Compiling design (CSG Tree generation)...

ECHO: "specs for ", "G1/2-int", " ", [1.814, -10.6943, 21.3159, [[0, 0.8503], [0, -0.8503], [1.1696, -0.2415], [1.1696, 0.2415]]]

Compiling design (CSG Products generation)...

Geometries in cache: 77

Geometry cache size in bytes: 10391888


for nut("G1/2-int", turns=10, Douter=40);

Loaded design '/home/bboett/Downloads/3dmodel/garten/HalbZollMutter.scad'.

Compiling design (CSG Tree generation)...

ECHO: "specs for ", "G1/2-int", " ", [1.814, -10.6943, 21.3159, [[0, 0.8503], [0, -0.8503], [1.1696, -0.2415], [1.1696, 0.2415]]]

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 67 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 74 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 40 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 18 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 29 

Compiling design (CSG Products generation)...


so somethings still wrong...



Am Do., 14. Mai 2020 um 19:25 Uhr schrieb Bruno Boettcher <[hidden email]>:
this seems more complicated than anticipated.... :D


tried the following, threadlib.scad line 35+:

function addIntExt(designator, ext) = (len(search("-ext",designator)) > 0 || len(search("-int",designator)) > 0)? str(designator) : str(designator, "-ext");

module bolt(designator, turns, higbee_arc=20, fn=120, table=THREAD_TABLE) {
    union() {
        specs = thread_specs(addIntExt(designator, "-ext"), table=table);
      echo("specs for ",addIntExt(designator, "-int")," ",specs);
        //specs = thread_specs(str(designator, "-ext"), table=table);
        P = specs[0]; Dsupport = specs[2];
        H = (turns + 1) * P;
        thread(str(designator, "-ext"), turns=turns, higbee_arc=higbee_arc, fn=fn, table=table);
        translate([0, 0, -P / 2])
            cylinder(h=H, d=Dsupport, $fn=fn);
    };
};

so when i test this with
nut("G1/2", turns=10, Douter=40);
or
nut("G1/2-int", turns=10, Douter=40);


the result of the call to thread_specs doesn't give back the same result... why??
here's that code:
function thread_specs(designator, table=THREAD_TABLE) =
 18     /* Returns thread specs of thread-type 'designator' as a vector of
 19        [pitch, Rrotation, Dsupport, section_profile] */
 20     table[search([designator], table, num_returns_per_match=1,
 21                    index_col_num=0)[0]][1];

and i didn't find out on how to remove altogether the -int/-ext of the string prior to adding its own....

ciao
Bruno


Am Do., 14. Mai 2020 um 18:42 Uhr schrieb Bruno Boettcher <[hidden email]>:
indeed!
thanks for looking!

ehm... wanted to add paramter checking to that libray.... but looking through the doc... are there string regexp in openscad?
is there a preferred way of checking this?

ciao
Bruno


Am Do., 14. Mai 2020 um 06:49 Uhr schrieb OzAtMichael <[hidden email]>:

Garbage In - Garbage Out.

If you look at threadlib.scad, bolt() & nut() add the "-ext" or "-int" to the designator.

So nut("G1/2-ext", turns=10, Douter=16); goes searching for "G1/2-ext-int" which doesn't exist.

The rest of the program tries to run with an undef variable and naturally fails badly...

 

nut("G1/2", turns=10, Douter=16); // works

 

Many, particularly older, libraries do not do much parameter checking.

 

 


From: Discuss [mailto:[hidden email]] On Behalf Of Bruno Boettcher
Sent: Wed, 13 May 2020 20:25
To: OpenSCAD general discussion
Subject: Re: [OpenSCAD] trouble setting up https://github.com/adrianschlatter/threadlib

 

ok tried it, worked, was baffled ... but then instead of metric thread, i used :

 

nut("G1/2-ext", turns=10, Douter=16);

 

full code:

use <threadlib/threadlib.scad>
use <../scalar-rackmods/masken/metrische_masken.scad>

difference()
{
 halbZollMutter();
cube(20);
}

//bolt("M4", turns = 5, higbee_arc = 30);
//bolt("G1/2-ext","turns = 5, higbee_arc = 30);
//nut("M12x0.5", turns=10, Douter=16);
nut("G1/2-ext", turns=10, Douter=16);

module halbZollMutter()
{
  difference()
  {
    metrische_mutter_schablone(14,startw = 30, toleranz = 0.1); //creates a M5 nut-mask, rotated by 30deg and with an added .1 width
    translate([0,0,.0])
      scale([1.05,1.05,1])
      union()
      {
        thread("G1/2-ext", turns=6);
        translate([0,0,-.8]) cylinder(d = 18.4, h = 12.7,$fn = 64);
      }
  }
}

 

 

 

 

and the i get in the console:

Compiling design (CSG Tree generation)...

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 67 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 74 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 40 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 18 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 29 

WARNING: Unable to convert translate([0, 0, undef]) parameter to a vec3 or vec2 of numbers, in file ../../../.local/share/OpenSCAD/libraries/threadlib/threadlib.scad, line 54 

Compiling design (CSG Products generation)...

ERROR: Unable to convert point at index 1 to a vec3 of numbers, in file ../../../.local/share/OpenSCAD/libraries/list-comprehension-demos/skin.scad, line 32 

WARNING: PolySet has degenerate polygons 

Geometries in cache: 8

Geometry cache size in bytes: 462040

CGAL Polyhedrons in cache: 0

CGAL cache size in bytes: 0

Compiling design (CSG Products normalization)...

Normalized CSG tree has 7 elements

Compile and preview finished.

Total rendering time: 0 hours, 0 minutes, 1 seconds

 

its OpenSCAD version 2020.04.26.nightly (git 648206e)

 

 

i remove the symbolic link on thread_profile.scad in the openscad library dir, didn't change anything indeed....

so ,well i created the nut myself, so the urgency is low, but still there's strange stuff going on....

 

ciao

Bruno

 

Am Mi., 13. Mai 2020 um 03:04 Uhr schrieb OzAtMichael <[hidden email]>:

Works for me:

 

I suggest you try thread_profile.scad actually in OpenSCAD/libraries.

 

If you still have a problem, please use the scad code above, and show the console results.

 

 

 


From: Discuss [mailto:[hidden email]] On Behalf Of Bruno Boettcher
Sent: Tue, 12 May 2020 02:34
To: OpenSCAD general discussion
Subject: Re: [OpenSCAD] trouble setting up https://github.com/adrianschlatter/threadlib

 

hmm really strange....

still doesn't work for me......

here's my lib:

 

ls -l ~/.local/share/OpenSCAD/libraries/
-rw-r--r-- 1 bboett bboett 15771 Dez 19  2018 dan_kirshner_threads.scad
drwxr-xr-x 7 bboett bboett  4096 Mai  8 13:42 IoP-satellite
drwxr-xr-x 4 bboett bboett  4096 Mai  7 15:38 list-comprehension-demos
drwxr-xr-x 3 bboett bboett  4096 Mär 16 18:32 pin_connectors
drwxr-xr-x 3 bboett bboett  4096 Mai  7 15:38 scad-utils
drwxr-xr-x 6 bboett bboett  4096 Mai  8 13:43 threadlib
lrwxrwxrwx 1 bboett bboett    57 Mai  8 13:39 thread_profile.scad -> 'IoP-satellite/OpenSCAD bottle threads/thread_profile.scad'
-rw-r--r-- 1 bboett bboett 16276 Mär 25 17:52 threads.scad

 

i tried the symbolic link in the hopes that this would solve the problem, and it did get further.... so at least i did something wrong, but it seems somehow openscad didn't delve far enough into the directories?

threadlib needs thread_profile.scad which is buried in IoP-satellite, and inside there the path with the spaces wasn't liked by openscad.....

 

 

thanks for looking

 

 

 

Am Mo., 11. Mai 2020 um 06:35 Uhr schrieb MichaelAtOz <[hidden email]>:

bboett wrote
> Hello!
>
> i need some 1/2" pipe connector for a pump (when can they switch to metric
> :'( )
> and wanted to give https://github.com/adrianschlatter/threadlib a try....
>
> i cloned the 3 libs too
> had to fix the problem with the spaces in the IoP lib and add the path to
> the threadlib...
>
> i got it to display just a thread, but as soon as i try a bolt or nut i
> get
> :
>
> Loaded design '/home/bboett/Downloads/3dmodel/garten/pumpenadapter.scad'.
>
> Compiling design (CSG Tree generation)...
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 67
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 74
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 40
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 18
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 29
>
> WARNING: Unable to convert translate([0, 0, undef]) parameter to a vec3 or
> vec2 of numbers, in file
> ../../../.local/share/OpenSCAD/libraries/threadlib/threadlib.scad, line 42
>
> Compiling design (CSG Products generation)...
>
> ERROR: Unable to convert point at index 1 to a vec3 of numbers, in file
> ../../../.local/share/OpenSCAD/libraries/list-comprehension-demos/skin.scad,
> line 32
>
> WARNING: PolySet has degenerate polygons
>
>
>
> any ideas on what's going wrong?
>
> --
> ciao
> Bruno
>
> ===========================================
> http://nohkumado.eu/,
> &lt;http://bboett.free.fr&gt;http://aikido.nohkumado.eu/,
> &lt;http://bboett.free.fr&gt;
> http://aikido.zorn.free.fr
>
> _______________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

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

I just downloaded it & tried
bolt("M4", turns=5, higbee_arc=30);
and it worked.

> had to fix the problem with the spaces in the IoP lib and add the path to
> the threadlib

What is IoP lib?
No need to add the path if they are n your OpenSCAD library,
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Libraries

Please share pumpenadapter.scad




-----
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



--

ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr

 

Virus-free. www.avg.com

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



--

ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr

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


--
ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr


--
ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr


--
ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr


--
ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: trouble setting up https://github.com/adrianschlatter/threadlib

MichaelAtOz
Administrator

I'd do it simpler, just check that it has been found.

 

function __THREADLIB_VERSION() = 0.3;

 

use <thread_profile.scad>

include <THREAD_TABLE.scad>

 

//nut("G1/2-int", turns=10, Douter=40);

nut("G1/2-int", turns=10, Douter=40);

//nut("G1/2", turns=10, Douter=40);

 

function thread_specs_search(designator,table) =

    table[search([designator], table, num_returns_per_match=1,

                   index_col_num=0)[0]][1];

                  

function thread_specs(designator, table=THREAD_TABLE) =

    /* Returns thread specs of thread-type 'designator' as a vector of

       [pitch, Rrotation, Dsupport, section_profile] */

    let (specs = thread_specs_search(designator,table))

        assert(!is_undef(specs), str("Designator: '",designator,"' not found")) specs;

 

 

From the error message it is apparent what is wrong:

 

Compiling design (CSG Tree generation)...

ERROR: Assertion '!is_undef(specs)' failed: "Designator: 'G1/2-int-int' not found" in file threadlib.scad, line 31

TRACE: called by 'thread_specs', in file threadlib.scad, line 58.

TRACE: called by 'union', in file threadlib.scad, line 57.

TRACE: called by 'nut', in file threadlib.scad, line 19.

Compiling design (CSG Products generation)...

 

> and is there any way to remove the -ext/-int from the string instead of just testing and letting the value pass, even if wrong?

 

There are a few string handling libraries, such as

https://www.thingiverse.com/thing:526023

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

("BOSL2 IS PRE-ALPHA CODE. THE CODE IS STILL BEING REORGANIZED")

 

 


From: Discuss [mailto:[hidden email]] On Behalf Of Bruno Boettcher
Sent: Fri, 15 May 2020 03:46
To: OpenSCAD general discussion
Subject: Re: [OpenSCAD] trouble setting up https://github.com/adrianschlatter/threadlib

 

ok, when i am beeing stupid, i do it very well....

 

would this be ok?

and is there any way to remove the -ext/-int from the string instead of just testing and letting the value pass, even if wrong?

 

function addIntExt(designator, ext) = (len(search("-ext",designator)) > 0 || len(search("-int",designator)) > 0)? str(designator) : str(designator, ext);

module bolt(designator, turns, higbee_arc=20, fn=120, table=THREAD_TABLE)
{
    name = addIntExt(designator, "-ext");
    union() {
        specs = thread_specs(name, table=table);
      echo("specs for ",addIntExt(designator, "-int")," ",specs);
        //specs = thread_specs(str(designator, "-ext"), table=table);
        P = specs[0]; Dsupport = specs[2];
        H = (turns + 1) * P;
        thread(name, turns=turns, higbee_arc=higbee_arc, fn=fn, table=table);
        translate([0, 0, -P / 2])
            cylinder(h=H, d=Dsupport, $fn=fn);
    };  
};

module nut(designator, turns, Douter, higbee_arc=20, fn=120, table=THREAD_TABLE) {
    name = addIntExt(designator, "-ext");
    union() {
        //specs = thread_specs(str(designator, "-int"), table=table);
        specs = thread_specs(name, table=table);
         
      echo("specs for ",addIntExt(designator, "-int")," ",specs);
        P = specs[0]; Dsupport = specs[2];
        H = (turns + 1) * P;            
        thread(name, turns=turns, higbee_arc=higbee_arc, fn=fn, table=table);

        translate([0, 0, -P / 2])
            difference() {
                cylinder(h=H, d=Douter, $fn=fn);
                translate([0, 0, -0.1])
                    cylinder(h=H+0.2, d=Dsupport, $fn=fn);
            };  
    };  
};

 

Am Do., 14. Mai 2020 um 19:37 Uhr schrieb Bruno Boettcher <[hidden email]>:

yeah... forgot to paste the output

 

and corrected one obvious error:

35 function addIntExt(designator, ext) = (len(search("-ext",designator)) > 0 || len(search("-int"    ,designator)) > 0)? str(designator) : str(designator, ext);

 

for nut("G1/2", turns=10, Douter=40);

Loaded design '/home/bboett/Downloads/3dmodel/garten/HalbZollMutter.scad'.

Compiling design (CSG Tree generation)...

ECHO: "specs for ", "G1/2-int", " ", [1.814, -10.6943, 21.3159, [[0, 0.8503], [0, -0.8503], [1.1696, -0.2415], [1.1696, 0.2415]]]

Compiling design (CSG Products generation)...

Geometries in cache: 77

Geometry cache size in bytes: 10391888

 

for nut("G1/2-int", turns=10, Douter=40);

Loaded design '/home/bboett/Downloads/3dmodel/garten/HalbZollMutter.scad'.

Compiling design (CSG Tree generation)...

ECHO: "specs for ", "G1/2-int", " ", [1.814, -10.6943, 21.3159, [[0, 0.8503], [0, -0.8503], [1.1696, -0.2415], [1.1696, 0.2415]]]

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 67 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 74 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 40 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 18 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 29 

Compiling design (CSG Products generation)...

 

so somethings still wrong...

 

 

 

Am Do., 14. Mai 2020 um 19:25 Uhr schrieb Bruno Boettcher <[hidden email]>:

this seems more complicated than anticipated.... :D

 

 

tried the following, threadlib.scad line 35+:

 

function addIntExt(designator, ext) = (len(search("-ext",designator)) > 0 || len(search("-int",designator)) > 0)? str(designator) : str(designator, "-ext");

module bolt(designator, turns, higbee_arc=20, fn=120, table=THREAD_TABLE) {
    union() {
        specs = thread_specs(addIntExt(designator, "-ext"), table=table);
      echo("specs for ",addIntExt(designator, "-int")," ",specs);
        //specs = thread_specs(str(designator, "-ext"), table=table);
        P = specs[0]; Dsupport = specs[2];
        H = (turns + 1) * P;
        thread(str(designator, "-ext"), turns=turns, higbee_arc=higbee_arc, fn=fn, table=table);
        translate([0, 0, -P / 2])
            cylinder(h=H, d=Dsupport, $fn=fn);
    };
};

 

so when i test this with

nut("G1/2", turns=10, Douter=40);

or

nut("G1/2-int", turns=10, Douter=40);

 

the result of the call to thread_specs doesn't give back the same result... why??

here's that code:

function thread_specs(designator, table=THREAD_TABLE) =
 18     /* Returns thread specs of thread-type 'designator' as a vector of
 19        [pitch, Rrotation, Dsupport, section_profile] */
 20     table[search([designator], table, num_returns_per_match=1,
 21                    index_col_num=0)[0]][1];

 

and i didn't find out on how to remove altogether the -int/-ext of the string prior to adding its own....

 

ciao

Bruno

 

 

Am Do., 14. Mai 2020 um 18:42 Uhr schrieb Bruno Boettcher <[hidden email]>:

indeed!

thanks for looking!

 

ehm... wanted to add paramter checking to that libray.... but looking through the doc... are there string regexp in openscad?

is there a preferred way of checking this?

 

ciao

Bruno

 

 

Am Do., 14. Mai 2020 um 06:49 Uhr schrieb OzAtMichael <[hidden email]>:

Garbage In - Garbage Out.

If you look at threadlib.scad, bolt() & nut() add the "-ext" or "-int" to the designator.

So nut("G1/2-ext", turns=10, Douter=16); goes searching for "G1/2-ext-int" which doesn't exist.

The rest of the program tries to run with an undef variable and naturally fails badly...

 

nut("G1/2", turns=10, Douter=16); // works

 

Many, particularly older, libraries do not do much parameter checking.

 

 


From: Discuss [mailto:[hidden email]] On Behalf Of Bruno Boettcher
Sent: Wed, 13 May 2020 20:25
To: OpenSCAD general discussion
Subject: Re: [OpenSCAD] trouble setting up https://github.com/adrianschlatter/threadlib

 

ok tried it, worked, was baffled ... but then instead of metric thread, i used :

 

nut("G1/2-ext", turns=10, Douter=16);

 

full code:

use <threadlib/threadlib.scad>
use <../scalar-rackmods/masken/metrische_masken.scad>

difference()
{
 halbZollMutter();
cube(20);
}

//bolt("M4", turns = 5, higbee_arc = 30);
//bolt("G1/2-ext","turns = 5, higbee_arc = 30);
//nut("M12x0.5", turns=10, Douter=16);
nut("G1/2-ext", turns=10, Douter=16);

module halbZollMutter()
{
  difference()
  {
    metrische_mutter_schablone(14,startw = 30, toleranz = 0.1); //creates a M5 nut-mask, rotated by 30deg and with an added .1 width
    translate([0,0,.0])
      scale([1.05,1.05,1])
      union()
      {
        thread("G1/2-ext", turns=6);
        translate([0,0,-.8]) cylinder(d = 18.4, h = 12.7,$fn = 64);
      }
  }
}

 

 

 

 

and the i get in the console:

Compiling design (CSG Tree generation)...

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 67 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 74 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 40 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 18 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 29 

WARNING: Unable to convert translate([0, 0, undef]) parameter to a vec3 or vec2 of numbers, in file ../../../.local/share/OpenSCAD/libraries/threadlib/threadlib.scad, line 54 

Compiling design (CSG Products generation)...

ERROR: Unable to convert point at index 1 to a vec3 of numbers, in file ../../../.local/share/OpenSCAD/libraries/list-comprehension-demos/skin.scad, line 32 

WARNING: PolySet has degenerate polygons 

Geometries in cache: 8

Geometry cache size in bytes: 462040

CGAL Polyhedrons in cache: 0

CGAL cache size in bytes: 0

Compiling design (CSG Products normalization)...

Normalized CSG tree has 7 elements

Compile and preview finished.

Total rendering time: 0 hours, 0 minutes, 1 seconds

 

its OpenSCAD version 2020.04.26.nightly (git 648206e)

 

 

i remove the symbolic link on thread_profile.scad in the openscad library dir, didn't change anything indeed....

so ,well i created the nut myself, so the urgency is low, but still there's strange stuff going on....

 

ciao

Bruno

 

Am Mi., 13. Mai 2020 um 03:04 Uhr schrieb OzAtMichael <[hidden email]>:

Works for me:

 

I suggest you try thread_profile.scad actually in OpenSCAD/libraries.

 

If you still have a problem, please use the scad code above, and show the console results.

 

 

 


From: Discuss [mailto:[hidden email]] On Behalf Of Bruno Boettcher
Sent: Tue, 12 May 2020 02:34
To: OpenSCAD general discussion
Subject: Re: [OpenSCAD] trouble setting up https://github.com/adrianschlatter/threadlib

 

hmm really strange....

still doesn't work for me......

here's my lib:

 

ls -l ~/.local/share/OpenSCAD/libraries/
-rw-r--r-- 1 bboett bboett 15771 Dez 19  2018 dan_kirshner_threads.scad
drwxr-xr-x 7 bboett bboett  4096 Mai  8 13:42 IoP-satellite
drwxr-xr-x 4 bboett bboett  4096 Mai  7 15:38 list-comprehension-demos
drwxr-xr-x 3 bboett bboett  4096 Mär 16 18:32 pin_connectors
drwxr-xr-x 3 bboett bboett  4096 Mai  7 15:38 scad-utils
drwxr-xr-x 6 bboett bboett  4096 Mai  8 13:43 threadlib
lrwxrwxrwx 1 bboett bboett    57 Mai  8 13:39 thread_profile.scad -> 'IoP-satellite/OpenSCAD bottle threads/thread_profile.scad'
-rw-r--r-- 1 bboett bboett 16276 Mär 25 17:52 threads.scad

 

i tried the symbolic link in the hopes that this would solve the problem, and it did get further.... so at least i did something wrong, but it seems somehow openscad didn't delve far enough into the directories?

threadlib needs thread_profile.scad which is buried in IoP-satellite, and inside there the path with the spaces wasn't liked by openscad.....

 

 

thanks for looking

 

 

 

Am Mo., 11. Mai 2020 um 06:35 Uhr schrieb MichaelAtOz <[hidden email]>:

bboett wrote
> Hello!
>
> i need some 1/2" pipe connector for a pump (when can they switch to metric
> :'( )
> and wanted to give https://github.com/adrianschlatter/threadlib a try....
>
> i cloned the 3 libs too
> had to fix the problem with the spaces in the IoP lib and add the path to
> the threadlib...
>
> i got it to display just a thread, but as soon as i try a bolt or nut i
> get
> :
>
> Loaded design '/home/bboett/Downloads/3dmodel/garten/pumpenadapter.scad'.
>
> Compiling design (CSG Tree generation)...
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 67
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 74
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 40
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 18
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 29
>
> WARNING: Unable to convert translate([0, 0, undef]) parameter to a vec3 or
> vec2 of numbers, in file
> ../../../.local/share/OpenSCAD/libraries/threadlib/threadlib.scad, line 42
>
> Compiling design (CSG Products generation)...
>
> ERROR: Unable to convert point at index 1 to a vec3 of numbers, in file
> ../../../.local/share/OpenSCAD/libraries/list-comprehension-demos/skin.scad,
> line 32
>
> WARNING: PolySet has degenerate polygons
>
>
>
> any ideas on what's going wrong?
>
> --
> ciao
> Bruno
>
> ===========================================
> http://nohkumado.eu/,
> &lt;http://bboett.free.fr&gt;http://aikido.nohkumado.eu/,
> &lt;http://bboett.free.fr&gt;
> http://aikido.zorn.free.fr
>
> _______________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

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

I just downloaded it & tried
bolt("M4", turns=5, higbee_arc=30);
and it worked.

> had to fix the problem with the spaces in the IoP lib and add the path to
> the threadlib

What is IoP lib?
No need to add the path if they are n your OpenSCAD library,
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Libraries

Please share pumpenadapter.scad




-----
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



--

ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr

 

Virus-free. www.avg.com

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



--

ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr

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



--

ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr



--

ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr



--

ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr



--

ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr


_______________________________________________
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: trouble setting up https://github.com/adrianschlatter/threadlib

bboett
Hello!

i added a sanitize function and your suggestion to the code (https://github.com/nohkumado/threadlib) i hope the original author gives it a benevolent view (pull request launched).....
and thanks, i learned how to do more stuff inside functions :D

ciao
Bruno

Am Fr., 15. Mai 2020 um 02:27 Uhr schrieb OzAtMichael <[hidden email]>:

I'd do it simpler, just check that it has been found.

 

function __THREADLIB_VERSION() = 0.3;

 

use <thread_profile.scad>

include <THREAD_TABLE.scad>

 

//nut("G1/2-int", turns=10, Douter=40);

nut("G1/2-int", turns=10, Douter=40);

//nut("G1/2", turns=10, Douter=40);

 

function thread_specs_search(designator,table) =

    table[search([designator], table, num_returns_per_match=1,

                   index_col_num=0)[0]][1];

                  

function thread_specs(designator, table=THREAD_TABLE) =

    /* Returns thread specs of thread-type 'designator' as a vector of

       [pitch, Rrotation, Dsupport, section_profile] */

    let (specs = thread_specs_search(designator,table))

        assert(!is_undef(specs), str("Designator: '",designator,"' not found")) specs;

 

 

From the error message it is apparent what is wrong:

 

Compiling design (CSG Tree generation)...

ERROR: Assertion '!is_undef(specs)' failed: "Designator: 'G1/2-int-int' not found" in file threadlib.scad, line 31

TRACE: called by 'thread_specs', in file threadlib.scad, line 58.

TRACE: called by 'union', in file threadlib.scad, line 57.

TRACE: called by 'nut', in file threadlib.scad, line 19.

Compiling design (CSG Products generation)...

 

> and is there any way to remove the -ext/-int from the string instead of just testing and letting the value pass, even if wrong?

 

There are a few string handling libraries, such as

https://www.thingiverse.com/thing:526023

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

("BOSL2 IS PRE-ALPHA CODE. THE CODE IS STILL BEING REORGANIZED")

 

 


From: Discuss [mailto:[hidden email]] On Behalf Of Bruno Boettcher
Sent: Fri, 15 May 2020 03:46
To: OpenSCAD general discussion
Subject: Re: [OpenSCAD] trouble setting up https://github.com/adrianschlatter/threadlib

 

ok, when i am beeing stupid, i do it very well....

 

would this be ok?

and is there any way to remove the -ext/-int from the string instead of just testing and letting the value pass, even if wrong?

 

function addIntExt(designator, ext) = (len(search("-ext",designator)) > 0 || len(search("-int",designator)) > 0)? str(designator) : str(designator, ext);

module bolt(designator, turns, higbee_arc=20, fn=120, table=THREAD_TABLE)
{
    name = addIntExt(designator, "-ext");
    union() {
        specs = thread_specs(name, table=table);
      echo("specs for ",addIntExt(designator, "-int")," ",specs);
        //specs = thread_specs(str(designator, "-ext"), table=table);
        P = specs[0]; Dsupport = specs[2];
        H = (turns + 1) * P;
        thread(name, turns=turns, higbee_arc=higbee_arc, fn=fn, table=table);
        translate([0, 0, -P / 2])
            cylinder(h=H, d=Dsupport, $fn=fn);
    };  
};

module nut(designator, turns, Douter, higbee_arc=20, fn=120, table=THREAD_TABLE) {
    name = addIntExt(designator, "-ext");
    union() {
        //specs = thread_specs(str(designator, "-int"), table=table);
        specs = thread_specs(name, table=table);
         
      echo("specs for ",addIntExt(designator, "-int")," ",specs);
        P = specs[0]; Dsupport = specs[2];
        H = (turns + 1) * P;            
        thread(name, turns=turns, higbee_arc=higbee_arc, fn=fn, table=table);

        translate([0, 0, -P / 2])
            difference() {
                cylinder(h=H, d=Douter, $fn=fn);
                translate([0, 0, -0.1])
                    cylinder(h=H+0.2, d=Dsupport, $fn=fn);
            };  
    };  
};

 

Am Do., 14. Mai 2020 um 19:37 Uhr schrieb Bruno Boettcher <[hidden email]>:

yeah... forgot to paste the output

 

and corrected one obvious error:

35 function addIntExt(designator, ext) = (len(search("-ext",designator)) > 0 || len(search("-int"    ,designator)) > 0)? str(designator) : str(designator, ext);

 

for nut("G1/2", turns=10, Douter=40);

Loaded design '/home/bboett/Downloads/3dmodel/garten/HalbZollMutter.scad'.

Compiling design (CSG Tree generation)...

ECHO: "specs for ", "G1/2-int", " ", [1.814, -10.6943, 21.3159, [[0, 0.8503], [0, -0.8503], [1.1696, -0.2415], [1.1696, 0.2415]]]

Compiling design (CSG Products generation)...

Geometries in cache: 77

Geometry cache size in bytes: 10391888

 

for nut("G1/2-int", turns=10, Douter=40);

Loaded design '/home/bboett/Downloads/3dmodel/garten/HalbZollMutter.scad'.

Compiling design (CSG Tree generation)...

ECHO: "specs for ", "G1/2-int", " ", [1.814, -10.6943, 21.3159, [[0, 0.8503], [0, -0.8503], [1.1696, -0.2415], [1.1696, 0.2415]]]

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 67 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 74 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 40 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 18 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 29 

Compiling design (CSG Products generation)...

 

so somethings still wrong...

 

 

 

Am Do., 14. Mai 2020 um 19:25 Uhr schrieb Bruno Boettcher <[hidden email]>:

this seems more complicated than anticipated.... :D

 

 

tried the following, threadlib.scad line 35+:

 

function addIntExt(designator, ext) = (len(search("-ext",designator)) > 0 || len(search("-int",designator)) > 0)? str(designator) : str(designator, "-ext");

module bolt(designator, turns, higbee_arc=20, fn=120, table=THREAD_TABLE) {
    union() {
        specs = thread_specs(addIntExt(designator, "-ext"), table=table);
      echo("specs for ",addIntExt(designator, "-int")," ",specs);
        //specs = thread_specs(str(designator, "-ext"), table=table);
        P = specs[0]; Dsupport = specs[2];
        H = (turns + 1) * P;
        thread(str(designator, "-ext"), turns=turns, higbee_arc=higbee_arc, fn=fn, table=table);
        translate([0, 0, -P / 2])
            cylinder(h=H, d=Dsupport, $fn=fn);
    };
};

 

so when i test this with

nut("G1/2", turns=10, Douter=40);

or

nut("G1/2-int", turns=10, Douter=40);

 

the result of the call to thread_specs doesn't give back the same result... why??

here's that code:

function thread_specs(designator, table=THREAD_TABLE) =
 18     /* Returns thread specs of thread-type 'designator' as a vector of
 19        [pitch, Rrotation, Dsupport, section_profile] */
 20     table[search([designator], table, num_returns_per_match=1,
 21                    index_col_num=0)[0]][1];

 

and i didn't find out on how to remove altogether the -int/-ext of the string prior to adding its own....

 

ciao

Bruno

 

 

Am Do., 14. Mai 2020 um 18:42 Uhr schrieb Bruno Boettcher <[hidden email]>:

indeed!

thanks for looking!

 

ehm... wanted to add paramter checking to that libray.... but looking through the doc... are there string regexp in openscad?

is there a preferred way of checking this?

 

ciao

Bruno

 

 

Am Do., 14. Mai 2020 um 06:49 Uhr schrieb OzAtMichael <[hidden email]>:

Garbage In - Garbage Out.

If you look at threadlib.scad, bolt() & nut() add the "-ext" or "-int" to the designator.

So nut("G1/2-ext", turns=10, Douter=16); goes searching for "G1/2-ext-int" which doesn't exist.

The rest of the program tries to run with an undef variable and naturally fails badly...

 

nut("G1/2", turns=10, Douter=16); // works

 

Many, particularly older, libraries do not do much parameter checking.

 

 


From: Discuss [mailto:[hidden email]] On Behalf Of Bruno Boettcher
Sent: Wed, 13 May 2020 20:25
To: OpenSCAD general discussion
Subject: Re: [OpenSCAD] trouble setting up https://github.com/adrianschlatter/threadlib

 

ok tried it, worked, was baffled ... but then instead of metric thread, i used :

 

nut("G1/2-ext", turns=10, Douter=16);

 

full code:

use <threadlib/threadlib.scad>
use <../scalar-rackmods/masken/metrische_masken.scad>

difference()
{
 halbZollMutter();
cube(20);
}

//bolt("M4", turns = 5, higbee_arc = 30);
//bolt("G1/2-ext","turns = 5, higbee_arc = 30);
//nut("M12x0.5", turns=10, Douter=16);
nut("G1/2-ext", turns=10, Douter=16);

module halbZollMutter()
{
  difference()
  {
    metrische_mutter_schablone(14,startw = 30, toleranz = 0.1); //creates a M5 nut-mask, rotated by 30deg and with an added .1 width
    translate([0,0,.0])
      scale([1.05,1.05,1])
      union()
      {
        thread("G1/2-ext", turns=6);
        translate([0,0,-.8]) cylinder(d = 18.4, h = 12.7,$fn = 64);
      }
  }
}

 

 

 

 

and the i get in the console:

Compiling design (CSG Tree generation)...

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

WARNING: Matrix must contain only numbers. Problem at row 1, col 3 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 67 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 74 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 40 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 18 

DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated, in file skin.scad, line 29 

WARNING: Unable to convert translate([0, 0, undef]) parameter to a vec3 or vec2 of numbers, in file ../../../.local/share/OpenSCAD/libraries/threadlib/threadlib.scad, line 54 

Compiling design (CSG Products generation)...

ERROR: Unable to convert point at index 1 to a vec3 of numbers, in file ../../../.local/share/OpenSCAD/libraries/list-comprehension-demos/skin.scad, line 32 

WARNING: PolySet has degenerate polygons 

Geometries in cache: 8

Geometry cache size in bytes: 462040

CGAL Polyhedrons in cache: 0

CGAL cache size in bytes: 0

Compiling design (CSG Products normalization)...

Normalized CSG tree has 7 elements

Compile and preview finished.

Total rendering time: 0 hours, 0 minutes, 1 seconds

 

its OpenSCAD version 2020.04.26.nightly (git 648206e)

 

 

i remove the symbolic link on thread_profile.scad in the openscad library dir, didn't change anything indeed....

so ,well i created the nut myself, so the urgency is low, but still there's strange stuff going on....

 

ciao

Bruno

 

Am Mi., 13. Mai 2020 um 03:04 Uhr schrieb OzAtMichael <[hidden email]>:

Works for me:

 

I suggest you try thread_profile.scad actually in OpenSCAD/libraries.

 

If you still have a problem, please use the scad code above, and show the console results.

 

 

 


From: Discuss [mailto:[hidden email]] On Behalf Of Bruno Boettcher
Sent: Tue, 12 May 2020 02:34
To: OpenSCAD general discussion
Subject: Re: [OpenSCAD] trouble setting up https://github.com/adrianschlatter/threadlib

 

hmm really strange....

still doesn't work for me......

here's my lib:

 

ls -l ~/.local/share/OpenSCAD/libraries/
-rw-r--r-- 1 bboett bboett 15771 Dez 19  2018 dan_kirshner_threads.scad
drwxr-xr-x 7 bboett bboett  4096 Mai  8 13:42 IoP-satellite
drwxr-xr-x 4 bboett bboett  4096 Mai  7 15:38 list-comprehension-demos
drwxr-xr-x 3 bboett bboett  4096 Mär 16 18:32 pin_connectors
drwxr-xr-x 3 bboett bboett  4096 Mai  7 15:38 scad-utils
drwxr-xr-x 6 bboett bboett  4096 Mai  8 13:43 threadlib
lrwxrwxrwx 1 bboett bboett    57 Mai  8 13:39 thread_profile.scad -> 'IoP-satellite/OpenSCAD bottle threads/thread_profile.scad'
-rw-r--r-- 1 bboett bboett 16276 Mär 25 17:52 threads.scad

 

i tried the symbolic link in the hopes that this would solve the problem, and it did get further.... so at least i did something wrong, but it seems somehow openscad didn't delve far enough into the directories?

threadlib needs thread_profile.scad which is buried in IoP-satellite, and inside there the path with the spaces wasn't liked by openscad.....

 

 

thanks for looking

 

 

 

Am Mo., 11. Mai 2020 um 06:35 Uhr schrieb MichaelAtOz <[hidden email]>:

bboett wrote
> Hello!
>
> i need some 1/2" pipe connector for a pump (when can they switch to metric
> :'( )
> and wanted to give https://github.com/adrianschlatter/threadlib a try....
>
> i cloned the 3 libs too
> had to fix the problem with the spaces in the IoP lib and add the path to
> the threadlib...
>
> i got it to display just a thread, but as soon as i try a bolt or nut i
> get
> :
>
> Loaded design '/home/bboett/Downloads/3dmodel/garten/pumpenadapter.scad'.
>
> Compiling design (CSG Tree generation)...
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> WARNING: Matrix must contain only numbers. Problem at row 1, col 3
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 67
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 74
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 40
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 18
>
> DEPRECATED: Using ranges of the form [begin:end] with begin value greater
> than the end value is deprecated, in file skin.scad, line 29
>
> WARNING: Unable to convert translate([0, 0, undef]) parameter to a vec3 or
> vec2 of numbers, in file
> ../../../.local/share/OpenSCAD/libraries/threadlib/threadlib.scad, line 42
>
> Compiling design (CSG Products generation)...
>
> ERROR: Unable to convert point at index 1 to a vec3 of numbers, in file
> ../../../.local/share/OpenSCAD/libraries/list-comprehension-demos/skin.scad,
> line 32
>
> WARNING: PolySet has degenerate polygons
>
>
>
> any ideas on what's going wrong?
>
> --
> ciao
> Bruno
>
> ===========================================
> http://nohkumado.eu/,
> &lt;http://bboett.free.fr&gt;http://aikido.nohkumado.eu/,
> &lt;http://bboett.free.fr&gt;
> http://aikido.zorn.free.fr
>
> _______________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

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

I just downloaded it & tried
bolt("M4", turns=5, higbee_arc=30);
and it worked.

> had to fix the problem with the spaces in the IoP lib and add the path to
> the threadlib

What is IoP lib?
No need to add the path if they are n your OpenSCAD library,
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Libraries

Please share pumpenadapter.scad




-----
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



--

ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr

 

Virus-free. www.avg.com

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



--

ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr

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



--

ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr



--

ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr



--

ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr



--

ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr

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


--
ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: trouble setting up https://github.com/adrianschlatter/threadlib

AdrianSchlatter
Gentlemen,

Thanks for working towards a better threadlib. Verification of designator
and a meaningful error message has been added to the library.

Best regards,
Adrian

<https://raw.github.com/adrianschlatter/threadlib/master/docs/imgs/logo.png>
<https://github.com/adrianschlatter/threadlib>



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

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