nophead / NopSCADlib

Library of parts modelled in OpenSCAD and a framework for making projects
GNU General Public License v3.0
1.17k stars 155 forks source link

What is the proper way to add additional pulley, belt, etc. definitions #265

Open ganzgustav22 opened 8 months ago

ganzgustav22 commented 8 months ago

For example I would like to add a pulley for GT2 12mm belts in: https://github.com/nophead/NopSCADlib/blob/master/vitamins/pulleys.scad

I can just do it in that file and it works fine, but how to do it in a cleaner way, i.e. without modyfing the nopscad lib itself?

nophead commented 8 months ago

You could move your new pulley definition to your own library to avoid modifying NopSCADlib but if you share the definition I could add it to NopSCADlib for you.

ganzgustav22 commented 8 months ago

D'ohh that sounds almost too easy, I'll try. Thanks.

Regarding the definitions: These are some random Aliexpress pulleys, I think they don't follow any standard so I guess it doesn't make sense to add them to the lib.

I have officially Gates approved pulleys ordered though, when they arrive I can measure them and give you the dimensions, these should have standard Gates dimensions.

ganzgustav22 commented 8 months ago

Here are definitions for GT2 belts 12mm and GT3 belts 6,9,12mm:

GT2x12 =["GT", 2.0, 12, 1.38, 0.75, 0.254];
GT3x6 = ["GT", 2.0,  6, 1.52, 0.75, 0.254];
GT3x9 = ["GT", 2.0,  9, 1.52, 0.75, 0.254];
GT3x12 =["GT", 2.0, 12, 1.52, 0.75, 0.254];

GT3 dimensions: image

nophead commented 8 months ago

Thanks. I will add them. I will need to change the code because I had assumed GT2 was 2mm pitch but GT3 is also. So the current code would show GT2 on the BOM entry.

nophead commented 8 months ago

I have added your belts.