discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Engineering Fits and Tolerance

HJ
Hugo Jackson
Tue, Oct 29, 2019 10:00 PM

Has any thought been given to incorporating engineering fits and tolerances into OpenSCAD? As I understand it, OpenSCAD was originally conceived for the creation of STL files for a 3D printer and I’ve been thinking that the base functionality might be improved by a little more CAM in the CAD.

For some time I’ve been using wrappers around most of the OpenSCAD modules in order to introduce engineering fits into the parts I create as 3d printers on the whole offer increasing precision and repeatability.

Using a special variable $fit I can arbitrarily call up a module and it will adjust the the final size of the geometry according to the engineering fit I specify. e.g.

cylinder(d = 5, h = 2, $fit = “g6”);

I think anyone who has created interconnecting parts is familiar with the requirement to adjust for tolerance, but the core language as it stands requires this to be accomplished on a piecemeal basis, but to my way of thinking fit and tolerance are integral to the original purpose of OpenSCAD.

I think this is particularly relevant as more and more users are acquiring machines that use different processes and that I might well wish to print a part on an FDM printer one day and a DLP the next, which I think would naturally call for a different fit specification.

I also created some constants: kLeft, kRight, kFront, kBack, kTop & kBottom and use 6 element arrays to selectively apply tolerance, and use a special variable $faces to pass on that information as required:

cube([7,3,8], $fit = “H11”, $faces = kLeft + kRight);

And of course if I’m creating a project with lots of references to fit then I simply create an identifier for the fit, e.g.

shaftFit = “h7”;

So that if I move to a different type of machine where more or less tolerance is indicated, I only need to change the definition of shaftFit.

I did some poking around in the mailing list archives and couldn’t see any reference to a discussion on this, but I’m sure it’s occurred to others before me, I just thought I’d ask where the community stands on incorporating this kind of functionality into the core language.

Has any thought been given to incorporating engineering fits and tolerances into OpenSCAD? As I understand it, OpenSCAD was originally conceived for the creation of STL files for a 3D printer and I’ve been thinking that the base functionality might be improved by a little more CAM in the CAD. For some time I’ve been using wrappers around most of the OpenSCAD modules in order to introduce engineering fits into the parts I create as 3d printers on the whole offer increasing precision and repeatability. Using a special variable $fit I can arbitrarily call up a module and it will adjust the the final size of the geometry according to the engineering fit I specify. e.g. cylinder(d = 5, h = 2, $fit = “g6”); I think anyone who has created interconnecting parts is familiar with the requirement to adjust for tolerance, but the core language as it stands requires this to be accomplished on a piecemeal basis, but to my way of thinking fit and tolerance are integral to the original purpose of OpenSCAD. I think this is particularly relevant as more and more users are acquiring machines that use different processes and that I might well wish to print a part on an FDM printer one day and a DLP the next, which I think would naturally call for a different fit specification. I also created some constants: kLeft, kRight, kFront, kBack, kTop & kBottom and use 6 element arrays to selectively apply tolerance, and use a special variable $faces to pass on that information as required: cube([7,3,8], $fit = “H11”, $faces = kLeft + kRight); And of course if I’m creating a project with lots of references to fit then I simply create an identifier for the fit, e.g. shaftFit = “h7”; So that if I move to a different type of machine where more or less tolerance is indicated, I only need to change the definition of shaftFit. I did some poking around in the mailing list archives and couldn’t see any reference to a discussion on this, but I’m sure it’s occurred to others before me, I just thought I’d ask where the community stands on incorporating this kind of functionality into the core language.
NH
nop head
Tue, Oct 29, 2019 10:07 PM

Not sure I understand. h7 specifies a tolerance, i.e. a range of possible
sizes that can be tested with a limit gauge or a micrometer. How can that
be expressed in a model, which always has a definite size?

On Tue, 29 Oct 2019 at 22:00, Hugo Jackson hugo@apres.net wrote:

Has any thought been given to incorporating engineering fits and
tolerances into OpenSCAD? As I understand it, OpenSCAD was originally
conceived for the creation of STL files for a 3D printer and I’ve been
thinking that the base functionality might be improved by a little more CAM
in the CAD.

For some time I’ve been using wrappers around most of the OpenSCAD modules
in order to introduce engineering fits into the parts I create as 3d
printers on the whole offer increasing precision and repeatability.

Using a special variable $fit I can arbitrarily call up a module and it
will adjust the the final size of the geometry according to the engineering
fit I specify. e.g.

     cylinder(d = 5, h = 2, $fit = “g6”);

I think anyone who has created interconnecting parts is familiar with the
requirement to adjust for tolerance, but the core language as it stands
requires this to be accomplished on a piecemeal basis, but to my way of
thinking fit and tolerance are integral to the original purpose of OpenSCAD.

I think this is particularly relevant as more and more users are acquiring
machines that use different processes and that I might well wish to print a
part on an FDM printer one day and a DLP the next, which I think would
naturally call for a different fit specification.

I also created some constants: kLeft, kRight, kFront, kBack, kTop &
kBottom and use 6 element arrays to selectively apply tolerance, and use a
special variable $faces to pass on that information as required:

     cube([7,3,8], $fit = “H11”, $faces = kLeft + kRight);

And of course if I’m creating a project with lots of references to fit
then I simply create an identifier for the fit, e.g.

shaftFit = “h7”;

So that if I move to a different type of machine where more or less
tolerance is indicated, I only need to change the definition of shaftFit.

I did some poking around in the mailing list archives and couldn’t see any
reference to a discussion on this, but I’m sure it’s occurred to others
before me, I just thought I’d ask where the community stands on
incorporating this kind of functionality into the core language.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Not sure I understand. h7 specifies a tolerance, i.e. a range of possible sizes that can be tested with a limit gauge or a micrometer. How can that be expressed in a model, which always has a definite size? On Tue, 29 Oct 2019 at 22:00, Hugo Jackson <hugo@apres.net> wrote: > Has any thought been given to incorporating engineering fits and > tolerances into OpenSCAD? As I understand it, OpenSCAD was originally > conceived for the creation of STL files for a 3D printer and I’ve been > thinking that the base functionality might be improved by a little more CAM > in the CAD. > > For some time I’ve been using wrappers around most of the OpenSCAD modules > in order to introduce engineering fits into the parts I create as 3d > printers on the whole offer increasing precision and repeatability. > > Using a special variable $fit I can arbitrarily call up a module and it > will adjust the the final size of the geometry according to the engineering > fit I specify. e.g. > > cylinder(d = 5, h = 2, $fit = “g6”); > > I think anyone who has created interconnecting parts is familiar with the > requirement to adjust for tolerance, but the core language as it stands > requires this to be accomplished on a piecemeal basis, but to my way of > thinking fit and tolerance are integral to the original purpose of OpenSCAD. > > I think this is particularly relevant as more and more users are acquiring > machines that use different processes and that I might well wish to print a > part on an FDM printer one day and a DLP the next, which I think would > naturally call for a different fit specification. > > I also created some constants: kLeft, kRight, kFront, kBack, kTop & > kBottom and use 6 element arrays to selectively apply tolerance, and use a > special variable $faces to pass on that information as required: > > cube([7,3,8], $fit = “H11”, $faces = kLeft + kRight); > > And of course if I’m creating a project with lots of references to fit > then I simply create an identifier for the fit, e.g. > > shaftFit = “h7”; > > So that if I move to a different type of machine where more or less > tolerance is indicated, I only need to change the definition of shaftFit. > > I did some poking around in the mailing list archives and couldn’t see any > reference to a discussion on this, but I’m sure it’s occurred to others > before me, I just thought I’d ask where the community stands on > incorporating this kind of functionality into the core language. > > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
A
adrianv
Tue, Oct 29, 2019 11:07 PM

Well, if it's supposed to be like a screw thread tolerance then the letter
specifies a "tolerance position", which gives a maximum diameter for the
bolt shaft.  The number gives the tolerance range below this maximum.  One
could imagine using this to shrink models to compensate for overextrusion.
But this is a specific standard for machine screw threads and the value of
the tolerance even depends on the screw shaft diameter.  It doesn't apply
broadly to arbitrary objects.  (It doesn't even apply to nuts, which use
capital letters.)

Even if you could figure out how to define it for arbitrary objects, how
would OpenSCAD know whether a component needed to be enlarged or shrunk?  I
don't see that there's any way to do this automatically.

nophead wrote

Not sure I understand. h7 specifies a tolerance, i.e. a range of possible
sizes that can be tested with a limit gauge or a micrometer. How can that
be expressed in a model, which always has a definite size?

On Tue, 29 Oct 2019 at 22:00, Hugo Jackson <

hugo@

> wrote:

Has any thought been given to incorporating engineering fits and
tolerances into OpenSCAD? As I understand it, OpenSCAD was originally
conceived for the creation of STL files for a 3D printer and I’ve been
thinking that the base functionality might be improved by a little more
CAM
in the CAD.

Well, if it's supposed to be like a screw thread tolerance then the letter specifies a "tolerance position", which gives a maximum diameter for the bolt shaft. The number gives the tolerance range below this maximum. One could imagine using this to shrink models to compensate for overextrusion. But this is a specific standard for machine screw threads and the value of the tolerance even depends on the screw shaft diameter. It doesn't apply broadly to arbitrary objects. (It doesn't even apply to nuts, which use capital letters.) Even if you could figure out how to define it for arbitrary objects, how would OpenSCAD know whether a component needed to be enlarged or shrunk? I don't see that there's any way to do this automatically. nophead wrote > Not sure I understand. h7 specifies a tolerance, i.e. a range of possible > sizes that can be tested with a limit gauge or a micrometer. How can that > be expressed in a model, which always has a definite size? > > On Tue, 29 Oct 2019 at 22:00, Hugo Jackson &lt; > hugo@ > &gt; wrote: > >> Has any thought been given to incorporating engineering fits and >> tolerances into OpenSCAD? As I understand it, OpenSCAD was originally >> conceived for the creation of STL files for a 3D printer and I’ve been >> thinking that the base functionality might be improved by a little more >> CAM >> in the CAD. -- Sent from: http://forum.openscad.org/
NH
nop head
Tue, Oct 29, 2019 11:20 PM

Yes it is H7 for holes to accept h7 shafts as a slip fit. I know because
that is what 3D printer pulleys should be for stepper motors and I got a
batch from China that didn't fit so had to get expensive measuring
equipment. 1 micron micrometer and an H7 limit plug gauge and H7 reamers.

On Tue, 29 Oct 2019 at 22:57, adrianv avm4@cornell.edu wrote:

Well, if it's supposed to be like a screw thread tolerance then the letter
specifies a "tolerance position", which gives a maximum diameter for the
bolt shaft.  The number gives the tolerance range below this maximum.  One
could imagine using this to shrink models to compensate for overextrusion.
But this is a specific standard for machine screw threads and the value of
the tolerance even depends on the screw shaft diameter.  It doesn't apply
broadly to arbitrary objects.  (It doesn't even apply to nuts, which use
capital letters.)

Even if you could figure out how to define it for arbitrary objects, how
would OpenSCAD know whether a component needed to be enlarged or shrunk?  I
don't see that there's any way to do this automatically.

nophead wrote

Not sure I understand. h7 specifies a tolerance, i.e. a range of possible
sizes that can be tested with a limit gauge or a micrometer. How can that
be expressed in a model, which always has a definite size?

On Tue, 29 Oct 2019 at 22:00, Hugo Jackson <

hugo@

> wrote:

Has any thought been given to incorporating engineering fits and
tolerances into OpenSCAD? As I understand it, OpenSCAD was originally
conceived for the creation of STL files for a 3D printer and I’ve been
thinking that the base functionality might be improved by a little more
CAM
in the CAD.

Yes it is H7 for holes to accept h7 shafts as a slip fit. I know because that is what 3D printer pulleys should be for stepper motors and I got a batch from China that didn't fit so had to get expensive measuring equipment. 1 micron micrometer and an H7 limit plug gauge and H7 reamers. On Tue, 29 Oct 2019 at 22:57, adrianv <avm4@cornell.edu> wrote: > Well, if it's supposed to be like a screw thread tolerance then the letter > specifies a "tolerance position", which gives a maximum diameter for the > bolt shaft. The number gives the tolerance range below this maximum. One > could imagine using this to shrink models to compensate for overextrusion. > But this is a specific standard for machine screw threads and the value of > the tolerance even depends on the screw shaft diameter. It doesn't apply > broadly to arbitrary objects. (It doesn't even apply to nuts, which use > capital letters.) > > Even if you could figure out how to define it for arbitrary objects, how > would OpenSCAD know whether a component needed to be enlarged or shrunk? I > don't see that there's any way to do this automatically. > > > nophead wrote > > Not sure I understand. h7 specifies a tolerance, i.e. a range of possible > > sizes that can be tested with a limit gauge or a micrometer. How can that > > be expressed in a model, which always has a definite size? > > > > On Tue, 29 Oct 2019 at 22:00, Hugo Jackson &lt; > > > hugo@ > > > &gt; wrote: > > > >> Has any thought been given to incorporating engineering fits and > >> tolerances into OpenSCAD? As I understand it, OpenSCAD was originally > >> conceived for the creation of STL files for a 3D printer and I’ve been > >> thinking that the base functionality might be improved by a little more > >> CAM > >> in the CAD. > > > > > > -- > Sent from: http://forum.openscad.org/ > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
HJ
Hugo Jackson
Tue, Oct 29, 2019 11:25 PM

This is the wikipedia article on the matter:

https://en.wikipedia.org/wiki/Engineering_fit https://en.wikipedia.org/wiki/Engineering_fit

It doesn’t apply to just threads, but to holes and shafts as well, and is easily expanded to include regularly shaped polygons as well (cause like in triangle world a rectangle is just a 4 sides circle :) ) and it’s used to specify the clearance between two mating objects.

The ISO specification uses capital letters to specify the tolerance range for holes, and lower case letters for shafts. Although the system could be used to fudge for over/under extrusion situations, that’s not it’s intended usage. It’s purpose is to remove the ambiguity of expressions like “loose fitting” and “tight fitting” and you often encounter both the ISO and ANSI tolerances in blue prints and machine drawings.

A pointed out in the article, for example, a paired specification like “H7/k6” on a nominal 50 mm diameter would identify a tolerance range of
+0.000 mm to +0.025 mm and a tolerance range of -0.018 mm to +0.002 mm for the shaft.

I find that I can generally hold my most often used FDM 3d printer to a +/- 0.03 range, so while “H8/f7” would be too exacting a specification for my machine, there are tolerance ranges that could be used for most FDM and certainly DLP printing.

On Oct 29, 2019, at 4:07 PM, adrianv avm4@cornell.edu wrote:

Well, if it's supposed to be like a screw thread tolerance then the letter
specifies a "tolerance position", which gives a maximum diameter for the
bolt shaft.  The number gives the tolerance range below this maximum.  One
could imagine using this to shrink models to compensate for overextrusion.
But this is a specific standard for machine screw threads and the value of
the tolerance even depends on the screw shaft diameter.  It doesn't apply
broadly to arbitrary objects.  (It doesn't even apply to nuts, which use
capital letters.)

Even if you could figure out how to define it for arbitrary objects, how
would OpenSCAD know whether a component needed to be enlarged or shrunk?  I
don't see that there's any way to do this automatically.

nophead wrote

Not sure I understand. h7 specifies a tolerance, i.e. a range of possible
sizes that can be tested with a limit gauge or a micrometer. How can that
be expressed in a model, which always has a definite size?

On Tue, 29 Oct 2019 at 22:00, Hugo Jackson <

hugo@

> wrote:

Has any thought been given to incorporating engineering fits and
tolerances into OpenSCAD? As I understand it, OpenSCAD was originally
conceived for the creation of STL files for a 3D printer and I’ve been
thinking that the base functionality might be improved by a little more
CAM
in the CAD.

This is the wikipedia article on the matter: https://en.wikipedia.org/wiki/Engineering_fit <https://en.wikipedia.org/wiki/Engineering_fit> It doesn’t apply to just threads, but to holes and shafts as well, and is easily expanded to include regularly shaped polygons as well (cause like in triangle world a rectangle is just a 4 sides circle :) ) and it’s used to specify the clearance between two mating objects. The ISO specification uses capital letters to specify the tolerance range for holes, and lower case letters for shafts. Although the system could be used to fudge for over/under extrusion situations, that’s not it’s intended usage. It’s purpose is to remove the ambiguity of expressions like “loose fitting” and “tight fitting” and you often encounter both the ISO and ANSI tolerances in blue prints and machine drawings. A pointed out in the article, for example, a paired specification like “H7/k6” on a nominal 50 mm diameter would identify a tolerance range of +0.000 mm to +0.025 mm and a tolerance range of -0.018 mm to +0.002 mm for the shaft. I find that I can generally hold my most often used FDM 3d printer to a +/- 0.03 range, so while “H8/f7” would be too exacting a specification for my machine, there are tolerance ranges that could be used for most FDM and certainly DLP printing. > On Oct 29, 2019, at 4:07 PM, adrianv <avm4@cornell.edu> wrote: > > Well, if it's supposed to be like a screw thread tolerance then the letter > specifies a "tolerance position", which gives a maximum diameter for the > bolt shaft. The number gives the tolerance range below this maximum. One > could imagine using this to shrink models to compensate for overextrusion. > But this is a specific standard for machine screw threads and the value of > the tolerance even depends on the screw shaft diameter. It doesn't apply > broadly to arbitrary objects. (It doesn't even apply to nuts, which use > capital letters.) > > Even if you could figure out how to define it for arbitrary objects, how > would OpenSCAD know whether a component needed to be enlarged or shrunk? I > don't see that there's any way to do this automatically. > > > nophead wrote >> Not sure I understand. h7 specifies a tolerance, i.e. a range of possible >> sizes that can be tested with a limit gauge or a micrometer. How can that >> be expressed in a model, which always has a definite size? >> >> On Tue, 29 Oct 2019 at 22:00, Hugo Jackson &lt; > >> hugo@ > >> &gt; wrote: >> >>> Has any thought been given to incorporating engineering fits and >>> tolerances into OpenSCAD? As I understand it, OpenSCAD was originally >>> conceived for the creation of STL files for a 3D printer and I’ve been >>> thinking that the base functionality might be improved by a little more >>> CAM >>> in the CAD. > > > > > > -- > Sent from: http://forum.openscad.org/ > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
DM
Doug Moen
Tue, Oct 29, 2019 11:45 PM

On Tue, Oct 29, 2019, at 6:00 PM, Hugo Jackson wrote:

Has any thought been given to incorporating engineering fits and
tolerances into OpenSCAD?

Yes, here's an old forum post with some code that implements a tolerance variable called $fe.
http://forum.openscad.org/fe-Tolerance-based-arc-approximation-td14212.html

On Tue, Oct 29, 2019, at 6:00 PM, Hugo Jackson wrote: > Has any thought been given to incorporating engineering fits and > tolerances into OpenSCAD? Yes, here's an old forum post with some code that implements a tolerance variable called $fe. http://forum.openscad.org/fe-Tolerance-based-arc-approximation-td14212.html
AG
Alex Gibson
Tue, Oct 29, 2019 11:47 PM

I think what you are after is something I already use myself, and have built into my own libraries, but it does not need to be a vital part of the language itself – it’s just one of many ways you can use the programmatical nature of OpenSCAD.

In OpenSCAD we are creating ‘pure’ solid shapes (my own terminology only) – the theoretical perfect object.

You could hard code all the dimensions, but it’s much better to define variables upfront – if we were drawing a nut and bolt, why not start with defining the ‘nominal’ diameter.  Then, each diameter could be either a modification of that, or a specific D or d value.  Now, because it’s coded, there’s nothing stopping you also adding another modifier to each dimension, for the nozzle spread of your 3D printer, or the kerf of a laser cutter or mill.  These things are independent of one another, and you can choose to turn these factors on or off depending on whether you are rendering a drawing to be annotated and sent to a machine shop, or making a model to 3D print yourself – effectively this is stepping out of CAD and into CAM, by compensating for limitations in slicers.

If you are struggling to tune tolerances one thing to note if not already obvious:  all circles/cylinders in OpenSCAD are polygon approximations, with points on the circumference, so the middle of the flats is a lower diameter than the tips – an OpenSCAD hole will always be narrower than it should be.  This can be worked around by using the global $fn= value to increase the number of facets for the final render before printing, but keep it lower during design to improve rendering speed.

So there are several different factors at play on all dimensions depending on what stage of the design process you are.  Rather than force these into the language, why not build a library where you define these tolerance values, and include it in your subsequent models?

Cheers,

Alex Gibson

admg consulting

edumaker limited

·        Project management

·        Operations & Process improvement

·        3D Printing

From: Discuss [mailto:discuss-bounces@lists.openscad.org] On Behalf Of Hugo Jackson
Sent: 29 October 2019 23:25
To: OpenSCAD general discussion
Subject: Re: [OpenSCAD] Engineering Fits and Tolerance

This is the wikipedia article on the matter:

https://en.wikipedia.org/wiki/Engineering_fit

It doesn’t apply to just threads, but to holes and shafts as well, and is easily expanded to include regularly shaped polygons as well (cause like in triangle world a rectangle is just a 4 sides circle :) ) and it’s used to specify the clearance between two mating objects.

The ISO specification uses capital letters to specify the tolerance range for holes, and lower case letters for shafts. Although the system could be used to fudge for over/under extrusion situations, that’s not it’s intended usage. It’s purpose is to remove the ambiguity of expressions like “loose fitting” and “tight fitting” and you often encounter both the ISO and ANSI tolerances in blue prints and machine drawings.

A pointed out in the article, for example, a paired specification like “H7/k6” on a nominal 50 mm diameter would identify a tolerance range of

+0.000 mm to +0.025 mm and a tolerance range of -0.018 mm to +0.002 mm for the shaft.

I find that I can generally hold my most often used FDM 3d printer to a +/- 0.03 range, so while “H8/f7” would be too exacting a specification for my machine, there are tolerance ranges that could be used for most FDM and certainly DLP printing.

On Oct 29, 2019, at 4:07 PM, adrianv avm4@cornell.edu wrote:

Well, if it's supposed to be like a screw thread tolerance then the letter
specifies a "tolerance position", which gives a maximum diameter for the
bolt shaft.  The number gives the tolerance range below this maximum.  One
could imagine using this to shrink models to compensate for overextrusion.
But this is a specific standard for machine screw threads and the value of
the tolerance even depends on the screw shaft diameter.  It doesn't apply
broadly to arbitrary objects.  (It doesn't even apply to nuts, which use
capital letters.)

Even if you could figure out how to define it for arbitrary objects, how
would OpenSCAD know whether a component needed to be enlarged or shrunk?  I
don't see that there's any way to do this automatically.

nophead wrote

Not sure I understand. h7 specifies a tolerance, i.e. a range of possible
sizes that can be tested with a limit gauge or a micrometer. How can that
be expressed in a model, which always has a definite size?

On Tue, 29 Oct 2019 at 22:00, Hugo Jackson <

hugo@

> wrote:

Has any thought been given to incorporating engineering fits and
tolerances into OpenSCAD? As I understand it, OpenSCAD was originally
conceived for the creation of STL files for a 3D printer and I’ve been
thinking that the base functionality might be improved by a little more
CAM
in the CAD.

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


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

I think what you are after is something I already use myself, and have built into my own libraries, but it does not need to be a vital part of the language itself – it’s just one of many ways you can use the programmatical nature of OpenSCAD. In OpenSCAD we are creating ‘pure’ solid shapes (my own terminology only) – the theoretical perfect object. You could hard code all the dimensions, but it’s much better to define variables upfront – if we were drawing a nut and bolt, why not start with defining the ‘nominal’ diameter. Then, each diameter could be either a modification of that, or a specific D or d value. Now, because it’s coded, there’s nothing stopping you also adding another modifier to each dimension, for the nozzle spread of your 3D printer, or the kerf of a laser cutter or mill. These things are independent of one another, and you can choose to turn these factors on or off depending on whether you are rendering a drawing to be annotated and sent to a machine shop, or making a model to 3D print yourself – effectively this is stepping out of CAD and into CAM, by compensating for limitations in slicers. If you are struggling to tune tolerances one thing to note if not already obvious: all circles/cylinders in OpenSCAD are polygon approximations, with points on the circumference, so the middle of the flats is a lower diameter than the tips – an OpenSCAD hole will always be narrower than it should be. This can be worked around by using the global $fn= value to increase the number of facets for the final render before printing, but keep it lower during design to improve rendering speed. So there are several different factors at play on all dimensions depending on what stage of the design process you are. Rather than force these into the language, why not build a library where you define these tolerance values, and include it in your subsequent models? Cheers, Alex Gibson admg consulting edumaker limited · Project management · Operations & Process improvement · 3D Printing From: Discuss [mailto:discuss-bounces@lists.openscad.org] On Behalf Of Hugo Jackson Sent: 29 October 2019 23:25 To: OpenSCAD general discussion Subject: Re: [OpenSCAD] Engineering Fits and Tolerance This is the wikipedia article on the matter: https://en.wikipedia.org/wiki/Engineering_fit It doesn’t apply to just threads, but to holes and shafts as well, and is easily expanded to include regularly shaped polygons as well (cause like in triangle world a rectangle is just a 4 sides circle :) ) and it’s used to specify the clearance between two mating objects. The ISO specification uses capital letters to specify the tolerance range for holes, and lower case letters for shafts. Although the system could be used to fudge for over/under extrusion situations, that’s not it’s intended usage. It’s purpose is to remove the ambiguity of expressions like “loose fitting” and “tight fitting” and you often encounter both the ISO and ANSI tolerances in blue prints and machine drawings. A pointed out in the article, for example, a paired specification like “H7/k6” on a nominal 50 mm diameter would identify a tolerance range of +0.000 mm to +0.025 mm and a tolerance range of -0.018 mm to +0.002 mm for the shaft. I find that I can generally hold my most often used FDM 3d printer to a +/- 0.03 range, so while “H8/f7” would be too exacting a specification for my machine, there are tolerance ranges that could be used for most FDM and certainly DLP printing. On Oct 29, 2019, at 4:07 PM, adrianv <avm4@cornell.edu> wrote: Well, if it's supposed to be like a screw thread tolerance then the letter specifies a "tolerance position", which gives a maximum diameter for the bolt shaft. The number gives the tolerance range below this maximum. One could imagine using this to shrink models to compensate for overextrusion. But this is a specific standard for machine screw threads and the value of the tolerance even depends on the screw shaft diameter. It doesn't apply broadly to arbitrary objects. (It doesn't even apply to nuts, which use capital letters.) Even if you could figure out how to define it for arbitrary objects, how would OpenSCAD know whether a component needed to be enlarged or shrunk? I don't see that there's any way to do this automatically. nophead wrote Not sure I understand. h7 specifies a tolerance, i.e. a range of possible sizes that can be tested with a limit gauge or a micrometer. How can that be expressed in a model, which always has a definite size? On Tue, 29 Oct 2019 at 22:00, Hugo Jackson &lt; hugo@ &gt; wrote: Has any thought been given to incorporating engineering fits and tolerances into OpenSCAD? As I understand it, OpenSCAD was originally conceived for the creation of STL files for a 3D printer and I’ve been thinking that the base functionality might be improved by a little more CAM in the CAD. -- Sent from: http://forum.openscad.org/ _______________________________________________ OpenSCAD mailing list Discuss@lists.openscad.org http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
HJ
Hugo Jackson
Wed, Oct 30, 2019 12:53 AM

Thanks for your input Alex.

As I mentioned in my original post my thought was to add more CAM to the CAD… I agree that OpenSCAD gives you theoretically perfect shapes, and that’s appropriate for a pure CAD application, but if it’s true that the majority of OpenSCAD users are using the program to create files for 3D printers then it misses the opportunity to extend the application of the OpenSCAD environment to actual machine ‘control’.
The addition of engineering fit capability would/could be entirely invisible to the user, as it would share a profile similar to that of $fn, $fa and $fe. If you never specify a tolerance you would continue to code and receive the theoretically perfect objects you specify.
As you say, we could “hard code” all the dimensions, but better to define variable upfront… likewise, you could hard code all the tolerances up front, or you could simple create your projects with the perfect shapes and with the inclusion of a tolerance factor in the core language ‘magically’ have your parts fits together the way you want them to.
I think there are other advantages as well… if we start to produce OpenSCAD programs with a facility for tolerances, then tuning parts for a specific manufacturing process becomes intrinsic to the basic design. It also provides a mechanism for successful shared project printing. With a standardized approach and system for tolerances then you simply require that parts be within the tolerances specified.
As I’ve mentioned previously, I already code all of my projects with tolerance in mind, so it’s not a “gotta have” feature I’m looking for, I just thought I’d bring the matter up because I was interested in the communities thoughts on the subject, and perhaps someone might provide some insight that had escaped me in my current implementation.

On Oct 29, 2019, at 4:47 PM, Alex Gibson alex@alexgibson.net wrote:

I think what you are after is something I already use myself, and have built into my own libraries, but it does not need to be a vital part of the language itself – it’s just one of many ways you can use the programmatical nature of OpenSCAD.

In OpenSCAD we are creating ‘pure’ solid shapes (my own terminology only) – the theoretical perfect object.

You could hard code all the dimensions, but it’s much better to define variables upfront – if we were drawing a nut and bolt, why not start with defining the ‘nominal’ diameter.  Then, each diameter could be either a modification of that, or a specific D or d value.  Now, because it’s coded, there’s nothing stopping you also adding another modifier to each dimension, for the nozzle spread of your 3D printer, or the kerf of a laser cutter or mill.  These things are independent of one another, and you can choose to turn these factors on or off depending on whether you are rendering a drawing to be annotated and sent to a machine shop, or making a model to 3D print yourself – effectively this is stepping out of CAD and into CAM, by compensating for limitations in slicers.

If you are struggling to tune tolerances one thing to note if not already obvious:  all circles/cylinders in OpenSCAD are polygon approximations, with points on the circumference, so the middle of the flats is a lower diameter than the tips – an OpenSCAD hole will always be narrower than it should be.  This can be worked around by using the global $fn= value to increase the number of facets for the final render before printing, but keep it lower during design to improve rendering speed.

So there are several different factors at play on all dimensions depending on what stage of the design process you are.  Rather than force these into the language, why not build a library where you define these tolerance values, and include it in your subsequent models?

Cheers,

Alex Gibson

admg consulting

edumaker limited

·        Project management
·        Operations & Process improvement
·        3D Printing

From: Discuss [mailto:discuss-bounces@lists.openscad.org] On Behalf Of Hugo Jackson
Sent: 29 October 2019 23:25
To: OpenSCAD general discussion
Subject: Re: [OpenSCAD] Engineering Fits and Tolerance

This is the wikipedia article on the matter:

https://en.wikipedia.org/wiki/Engineering_fit https://en.wikipedia.org/wiki/Engineering_fit

It doesn’t apply to just threads, but to holes and shafts as well, and is easily expanded to include regularly shaped polygons as well (cause like in triangle world a rectangle is just a 4 sides circle :) ) and it’s used to specify the clearance between two mating objects.

The ISO specification uses capital letters to specify the tolerance range for holes, and lower case letters for shafts. Although the system could be used to fudge for over/under extrusion situations, that’s not it’s intended usage. It’s purpose is to remove the ambiguity of expressions like “loose fitting” and “tight fitting” and you often encounter both the ISO and ANSI tolerances in blue prints and machine drawings.

A pointed out in the article, for example, a paired specification like “H7/k6” on a nominal 50 mm diameter would identify a tolerance range of
+0.000 mm to +0.025 mm and a tolerance range of -0.018 mm to +0.002 mm for the shaft.

I find that I can generally hold my most often used FDM 3d printer to a +/- 0.03 range, so while “H8/f7” would be too exacting a specification for my machine, there are tolerance ranges that could be used for most FDM and certainly DLP printing.

On Oct 29, 2019, at 4:07 PM, adrianv <avm4@cornell.edu mailto:avm4@cornell.edu> wrote:

Well, if it's supposed to be like a screw thread tolerance then the letter
specifies a "tolerance position", which gives a maximum diameter for the
bolt shaft.  The number gives the tolerance range below this maximum.  One
could imagine using this to shrink models to compensate for overextrusion.
But this is a specific standard for machine screw threads and the value of
the tolerance even depends on the screw shaft diameter.  It doesn't apply
broadly to arbitrary objects.  (It doesn't even apply to nuts, which use
capital letters.)

Even if you could figure out how to define it for arbitrary objects, how
would OpenSCAD know whether a component needed to be enlarged or shrunk?  I
don't see that there's any way to do this automatically.

nophead wrote

Not sure I understand. h7 specifies a tolerance, i.e. a range of possible
sizes that can be tested with a limit gauge or a micrometer. How can that
be expressed in a model, which always has a definite size?

On Tue, 29 Oct 2019 at 22:00, Hugo Jackson <

hugo@

> wrote:

Has any thought been given to incorporating engineering fits and
tolerances into OpenSCAD? As I understand it, OpenSCAD was originally
conceived for the creation of STL files for a 3D printer and I’ve been
thinking that the base functionality might be improved by a little more
CAM
in the CAD.

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


OpenSCAD mailing list
Discuss@lists.openscad.org mailto:Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Thanks for your input Alex. As I mentioned in my original post my thought was to add more CAM to the CAD… I agree that OpenSCAD gives you theoretically perfect shapes, and that’s appropriate for a pure CAD application, but if it’s true that the majority of OpenSCAD users are using the program to create files for 3D printers then it misses the opportunity to extend the application of the OpenSCAD environment to actual machine ‘control’. The addition of engineering fit capability would/could be entirely invisible to the user, as it would share a profile similar to that of $fn, $fa and $fe. If you never specify a tolerance you would continue to code and receive the theoretically perfect objects you specify. As you say, we could “hard code” all the dimensions, but better to define variable upfront… likewise, you could hard code all the tolerances up front, or you could simple create your projects with the perfect shapes and with the inclusion of a tolerance factor in the core language ‘magically’ have your parts fits together the way you want them to. I think there are other advantages as well… if we start to produce OpenSCAD programs with a facility for tolerances, then tuning parts for a specific manufacturing process becomes intrinsic to the basic design. It also provides a mechanism for successful shared project printing. With a standardized approach and system for tolerances then you simply require that parts be within the tolerances specified. As I’ve mentioned previously, I already code all of my projects with tolerance in mind, so it’s not a “gotta have” feature I’m looking for, I just thought I’d bring the matter up because I was interested in the communities thoughts on the subject, and perhaps someone might provide some insight that had escaped me in my current implementation. > On Oct 29, 2019, at 4:47 PM, Alex Gibson <alex@alexgibson.net> wrote: > > I think what you are after is something I already use myself, and have built into my own libraries, but it does not need to be a vital part of the language itself – it’s just one of many ways you can use the programmatical nature of OpenSCAD. > > In OpenSCAD we are creating ‘pure’ solid shapes (my own terminology only) – the theoretical perfect object. > > You could hard code all the dimensions, but it’s much better to define variables upfront – if we were drawing a nut and bolt, why not start with defining the ‘nominal’ diameter. Then, each diameter could be either a modification of that, or a specific D or d value. Now, because it’s coded, there’s nothing stopping you also adding another modifier to each dimension, for the nozzle spread of your 3D printer, or the kerf of a laser cutter or mill. These things are independent of one another, and you can choose to turn these factors on or off depending on whether you are rendering a drawing to be annotated and sent to a machine shop, or making a model to 3D print yourself – effectively this is stepping out of CAD and into CAM, by compensating for limitations in slicers. > > If you are struggling to tune tolerances one thing to note if not already obvious: all circles/cylinders in OpenSCAD are polygon approximations, with points on the circumference, so the middle of the flats is a lower diameter than the tips – an OpenSCAD hole will always be narrower than it should be. This can be worked around by using the global $fn= value to increase the number of facets for the final render before printing, but keep it lower during design to improve rendering speed. > > So there are several different factors at play on all dimensions depending on what stage of the design process you are. Rather than force these into the language, why not build a library where you define these tolerance values, and include it in your subsequent models? > > Cheers, > > Alex Gibson > > admg consulting > > edumaker limited > > · Project management > · Operations & Process improvement > · 3D Printing > > From: Discuss [mailto:discuss-bounces@lists.openscad.org] On Behalf Of Hugo Jackson > Sent: 29 October 2019 23:25 > To: OpenSCAD general discussion > Subject: Re: [OpenSCAD] Engineering Fits and Tolerance > > This is the wikipedia article on the matter: > > https://en.wikipedia.org/wiki/Engineering_fit <https://en.wikipedia.org/wiki/Engineering_fit> > > It doesn’t apply to just threads, but to holes and shafts as well, and is easily expanded to include regularly shaped polygons as well (cause like in triangle world a rectangle is just a 4 sides circle :) ) and it’s used to specify the clearance between two mating objects. > > The ISO specification uses capital letters to specify the tolerance range for holes, and lower case letters for shafts. Although the system could be used to fudge for over/under extrusion situations, that’s not it’s intended usage. It’s purpose is to remove the ambiguity of expressions like “loose fitting” and “tight fitting” and you often encounter both the ISO and ANSI tolerances in blue prints and machine drawings. > > A pointed out in the article, for example, a paired specification like “H7/k6” on a nominal 50 mm diameter would identify a tolerance range of > +0.000 mm to +0.025 mm and a tolerance range of -0.018 mm to +0.002 mm for the shaft. > > I find that I can generally hold my most often used FDM 3d printer to a +/- 0.03 range, so while “H8/f7” would be too exacting a specification for my machine, there are tolerance ranges that could be used for most FDM and certainly DLP printing. > > >> On Oct 29, 2019, at 4:07 PM, adrianv <avm4@cornell.edu <mailto:avm4@cornell.edu>> wrote: >> >> Well, if it's supposed to be like a screw thread tolerance then the letter >> specifies a "tolerance position", which gives a maximum diameter for the >> bolt shaft. The number gives the tolerance range below this maximum. One >> could imagine using this to shrink models to compensate for overextrusion. >> But this is a specific standard for machine screw threads and the value of >> the tolerance even depends on the screw shaft diameter. It doesn't apply >> broadly to arbitrary objects. (It doesn't even apply to nuts, which use >> capital letters.) >> >> Even if you could figure out how to define it for arbitrary objects, how >> would OpenSCAD know whether a component needed to be enlarged or shrunk? I >> don't see that there's any way to do this automatically. >> >> >> nophead wrote >> >> Not sure I understand. h7 specifies a tolerance, i.e. a range of possible >> sizes that can be tested with a limit gauge or a micrometer. How can that >> be expressed in a model, which always has a definite size? >> >> On Tue, 29 Oct 2019 at 22:00, Hugo Jackson &lt; >> >> >> hugo@ >> >> >> &gt; wrote: >> >> >> Has any thought been given to incorporating engineering fits and >> tolerances into OpenSCAD? As I understand it, OpenSCAD was originally >> conceived for the creation of STL files for a 3D printer and I’ve been >> thinking that the base functionality might be improved by a little more >> CAM >> in the CAD. >> >> >> >> >> >> -- >> Sent from: http://forum.openscad.org/ <http://forum.openscad.org/> >> >> _______________________________________________ >> OpenSCAD mailing list >> Discuss@lists.openscad.org <mailto:Discuss@lists.openscad.org> >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org <mailto:Discuss@lists.openscad.org> > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org <http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org>
AG
Alex Gibson
Wed, Oct 30, 2019 1:45 AM

So it’s quite likely we are independently doing very similar things, and I know others are, so there’s an opportunity to at least define a useful common approach.

If tolerance factors should be built into OpenSCAD, it would need to be in a way that is universally meaningful and constant.  For example ISO standards.

Even then, I think there are a few tensions.

Tolerances are to me a completely different concept than adjustments for specific CAM applications.  They are used to communicate to somebody else what is acceptable when making the item you have described perfectly in CAD.  So they must be a range.

Whereas if I know my kerf or spread factor from precise measurement, and apply this as an offset to my perfect model, I’m expecting the resulting rendered model to explicitly be a distorted rendering of my part, and that if I slice and print this using one very specific configuration, it will print/cut something closer to the perfect shape than if we’d used the ‘nominal’ part.

Especially in 3D printing, you get different tolerances in different axes- if I took a part I’d optimised for spread in x and Y, and rotated it about X, I could end up with an awfully distorted part.

I have some designs which have complex arrangements of laser cut parts, and the variations in thickness of the Perspex could make or break the fit.  So I have a test piece that is designed to be cut and measured, to feed into OpenSCAD the top level measurements of kerf, material thickness etc.  This is then picked up as a factor by all relevant parts of the design, which shuffles itself to fit.

I would call this (from ignorance of the proper term) ‘tuning’ – and it’s set apart from tolerance – perhaps the flip side.

Finally there’s also things like spacings – allowance for material expansion, air gap between moving parts etc.  To me that’s handled separately from tolerance and tuning, but often all 3 might be present in a single radius…!

Not sure how this chimes with your thinking and practice?

Alex Gibson

admg consulting

edumaker limited

·        Project management

·        Operations & Process improvement

·        3D Printing

From: Discuss [mailto:discuss-bounces@lists.openscad.org] On Behalf Of Hugo Jackson
Sent: 30 October 2019 00:53
To: OpenSCAD general discussion
Subject: Re: [OpenSCAD] Engineering Fits and Tolerance

Thanks for your input Alex.

As I mentioned in my original post my thought was to add more CAM to the CAD… I agree that OpenSCAD gives you theoretically perfect shapes, and that’s appropriate for a pure CAD application, but if it’s true that the majority of OpenSCAD users are using the program to create files for 3D printers then it misses the opportunity to extend the application of the OpenSCAD environment to actual machine ‘control’.

The addition of engineering fit capability would/could be entirely invisible to the user, as it would share a profile similar to that of $fn, $fa and $fe. If you never specify a tolerance you would continue to code and receive the theoretically perfect objects you specify.

As you say, we could “hard code” all the dimensions, but better to define variable upfront… likewise, you could hard code all the tolerances up front, or you could simple create your projects with the perfect shapes and with the inclusion of a tolerance factor in the core language ‘magically’ have your parts fits together the way you want them to.

I think there are other advantages as well… if we start to produce OpenSCAD programs with a facility for tolerances, then tuning parts for a specific manufacturing process becomes intrinsic to the basic design. It also provides a mechanism for successful shared project printing. With a standardized approach and system for tolerances then you simply require that parts be within the tolerances specified.

As I’ve mentioned previously, I already code all of my projects with tolerance in mind, so it’s not a “gotta have” feature I’m looking for, I just thought I’d bring the matter up because I was interested in the communities thoughts on the subject, and perhaps someone might provide some insight that had escaped me in my current implementation.

On Oct 29, 2019, at 4:47 PM, Alex Gibson alex@alexgibson.net wrote:

I think what you are after is something I already use myself, and have built into my own libraries, but it does not need to be a vital part of the language itself – it’s just one of many ways you can use the programmatical nature of OpenSCAD.

In OpenSCAD we are creating ‘pure’ solid shapes (my own terminology only) – the theoretical perfect object.

You could hard code all the dimensions, but it’s much better to define variables upfront – if we were drawing a nut and bolt, why not start with defining the ‘nominal’ diameter.  Then, each diameter could be either a modification of that, or a specific D or d value.  Now, because it’s coded, there’s nothing stopping you also adding another modifier to each dimension, for the nozzle spread of your 3D printer, or the kerf of a laser cutter or mill.  These things are independent of one another, and you can choose to turn these factors on or off depending on whether you are rendering a drawing to be annotated and sent to a machine shop, or making a model to 3D print yourself – effectively this is stepping out of CAD and into CAM, by compensating for limitations in slicers.

If you are struggling to tune tolerances one thing to note if not already obvious:  all circles/cylinders in OpenSCAD are polygon approximations, with points on the circumference, so the middle of the flats is a lower diameter than the tips – an OpenSCAD hole will always be narrower than it should be.  This can be worked around by using the global $fn= value to increase the number of facets for the final render before printing, but keep it lower during design to improve rendering speed.

So there are several different factors at play on all dimensions depending on what stage of the design process you are.  Rather than force these into the language, why not build a library where you define these tolerance values, and include it in your subsequent models?

Cheers,

Alex Gibson

admg consulting

edumaker limited

·        Project management

·        Operations & Process improvement

·        3D Printing

From: Discuss [mailto:discuss-bounces@lists.openscad.org] On Behalf Of Hugo Jackson
Sent: 29 October 2019 23:25
To: OpenSCAD general discussion
Subject: Re: [OpenSCAD] Engineering Fits and Tolerance

This is the wikipedia article on the matter:

https://en.wikipedia.org/wiki/Engineering_fit https://en.wikipedia.org/wiki/Engineering_fit

It doesn’t apply to just threads, but to holes and shafts as well, and is easily expanded to include regularly shaped polygons as well (cause like in triangle world a rectangle is just a 4 sides circle :) ) and it’s used to specify the clearance between two mating objects.

The ISO specification uses capital letters to specify the tolerance range for holes, and lower case letters for shafts. Although the system could be used to fudge for over/under extrusion situations, that’s not it’s intended usage. It’s purpose is to remove the ambiguity of expressions like “loose fitting” and “tight fitting” and you often encounter both the ISO and ANSI tolerances in blue prints and machine drawings.

A pointed out in the article, for example, a paired specification like “H7/k6” on a nominal 50 mm diameter would identify a tolerance range of

+0.000 mm to +0.025 mm and a tolerance range of -0.018 mm to +0.002 mm for the shaft.

I find that I can generally hold my most often used FDM 3d printer to a +/- 0.03 range, so while “H8/f7” would be too exacting a specification for my machine, there are tolerance ranges that could be used for most FDM and certainly DLP printing.

On Oct 29, 2019, at 4:07 PM, adrianv < mailto:avm4@cornell.edu avm4@cornell.edu> wrote:

Well, if it's supposed to be like a screw thread tolerance then the letter
specifies a "tolerance position", which gives a maximum diameter for the
bolt shaft.  The number gives the tolerance range below this maximum.  One
could imagine using this to shrink models to compensate for overextrusion.
But this is a specific standard for machine screw threads and the value of
the tolerance even depends on the screw shaft diameter.  It doesn't apply
broadly to arbitrary objects.  (It doesn't even apply to nuts, which use
capital letters.)

Even if you could figure out how to define it for arbitrary objects, how
would OpenSCAD know whether a component needed to be enlarged or shrunk?  I
don't see that there's any way to do this automatically.

nophead wrote

Not sure I understand. h7 specifies a tolerance, i.e. a range of possible
sizes that can be tested with a limit gauge or a micrometer. How can that
be expressed in a model, which always has a definite size?

On Tue, 29 Oct 2019 at 22:00, Hugo Jackson <

hugo@

> wrote:

Has any thought been given to incorporating engineering fits and
tolerances into OpenSCAD? As I understand it, OpenSCAD was originally
conceived for the creation of STL files for a 3D printer and I’ve been
thinking that the base functionality might be improved by a little more
CAM
in the CAD.

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


OpenSCAD mailing list
mailto:Discuss@lists.openscad.org Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


OpenSCAD mailing list
mailto:Discuss@lists.openscad.org Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

So it’s quite likely we are independently doing very similar things, and I know others are, so there’s an opportunity to at least define a useful common approach. If tolerance factors should be built into OpenSCAD, it would need to be in a way that is universally meaningful and constant. For example ISO standards. Even then, I think there are a few tensions. Tolerances are to me a completely different concept than adjustments for specific CAM applications. They are used to communicate to somebody else what is acceptable when making the item you have described perfectly in CAD. So they must be a range. Whereas if I know my kerf or spread factor from precise measurement, and apply this as an offset to my perfect model, I’m expecting the resulting rendered model to explicitly be a distorted rendering of my part, and that if I slice and print this using one very specific configuration, it will print/cut something closer to the perfect shape than if we’d used the ‘nominal’ part. Especially in 3D printing, you get different tolerances in different axes- if I took a part I’d optimised for spread in x and Y, and rotated it about X, I could end up with an awfully distorted part. I have some designs which have complex arrangements of laser cut parts, and the variations in thickness of the Perspex could make or break the fit. So I have a test piece that is designed to be cut and measured, to feed into OpenSCAD the top level measurements of kerf, material thickness etc. This is then picked up as a factor by all relevant parts of the design, which shuffles itself to fit. I would call this (from ignorance of the proper term) ‘tuning’ – and it’s set apart from tolerance – perhaps the flip side. Finally there’s also things like spacings – allowance for material expansion, air gap between moving parts etc. To me that’s handled separately from tolerance and tuning, but often all 3 might be present in a single radius…! Not sure how this chimes with your thinking and practice? Alex Gibson admg consulting edumaker limited · Project management · Operations & Process improvement · 3D Printing From: Discuss [mailto:discuss-bounces@lists.openscad.org] On Behalf Of Hugo Jackson Sent: 30 October 2019 00:53 To: OpenSCAD general discussion Subject: Re: [OpenSCAD] Engineering Fits and Tolerance Thanks for your input Alex. As I mentioned in my original post my thought was to add more CAM to the CAD… I agree that OpenSCAD gives you theoretically perfect shapes, and that’s appropriate for a pure CAD application, but if it’s true that the majority of OpenSCAD users are using the program to create files for 3D printers then it misses the opportunity to extend the application of the OpenSCAD environment to actual machine ‘control’. The addition of engineering fit capability would/could be entirely invisible to the user, as it would share a profile similar to that of $fn, $fa and $fe. If you never specify a tolerance you would continue to code and receive the theoretically perfect objects you specify. As you say, we could “hard code” all the dimensions, but better to define variable upfront… likewise, you could hard code all the tolerances up front, or you could simple create your projects with the perfect shapes and with the inclusion of a tolerance factor in the core language ‘magically’ have your parts fits together the way you want them to. I think there are other advantages as well… if we start to produce OpenSCAD programs with a facility for tolerances, then tuning parts for a specific manufacturing process becomes intrinsic to the basic design. It also provides a mechanism for successful shared project printing. With a standardized approach and system for tolerances then you simply require that parts be within the tolerances specified. As I’ve mentioned previously, I already code all of my projects with tolerance in mind, so it’s not a “gotta have” feature I’m looking for, I just thought I’d bring the matter up because I was interested in the communities thoughts on the subject, and perhaps someone might provide some insight that had escaped me in my current implementation. On Oct 29, 2019, at 4:47 PM, Alex Gibson <alex@alexgibson.net> wrote: I think what you are after is something I already use myself, and have built into my own libraries, but it does not need to be a vital part of the language itself – it’s just one of many ways you can use the programmatical nature of OpenSCAD. In OpenSCAD we are creating ‘pure’ solid shapes (my own terminology only) – the theoretical perfect object. You could hard code all the dimensions, but it’s much better to define variables upfront – if we were drawing a nut and bolt, why not start with defining the ‘nominal’ diameter. Then, each diameter could be either a modification of that, or a specific D or d value. Now, because it’s coded, there’s nothing stopping you also adding another modifier to each dimension, for the nozzle spread of your 3D printer, or the kerf of a laser cutter or mill. These things are independent of one another, and you can choose to turn these factors on or off depending on whether you are rendering a drawing to be annotated and sent to a machine shop, or making a model to 3D print yourself – effectively this is stepping out of CAD and into CAM, by compensating for limitations in slicers. If you are struggling to tune tolerances one thing to note if not already obvious: all circles/cylinders in OpenSCAD are polygon approximations, with points on the circumference, so the middle of the flats is a lower diameter than the tips – an OpenSCAD hole will always be narrower than it should be. This can be worked around by using the global $fn= value to increase the number of facets for the final render before printing, but keep it lower during design to improve rendering speed. So there are several different factors at play on all dimensions depending on what stage of the design process you are. Rather than force these into the language, why not build a library where you define these tolerance values, and include it in your subsequent models? Cheers, Alex Gibson admg consulting edumaker limited · Project management · Operations & Process improvement · 3D Printing From: Discuss [mailto:discuss-bounces@lists.openscad.org] On Behalf Of Hugo Jackson Sent: 29 October 2019 23:25 To: OpenSCAD general discussion Subject: Re: [OpenSCAD] Engineering Fits and Tolerance This is the wikipedia article on the matter: <https://en.wikipedia.org/wiki/Engineering_fit> https://en.wikipedia.org/wiki/Engineering_fit It doesn’t apply to just threads, but to holes and shafts as well, and is easily expanded to include regularly shaped polygons as well (cause like in triangle world a rectangle is just a 4 sides circle :) ) and it’s used to specify the clearance between two mating objects. The ISO specification uses capital letters to specify the tolerance range for holes, and lower case letters for shafts. Although the system could be used to fudge for over/under extrusion situations, that’s not it’s intended usage. It’s purpose is to remove the ambiguity of expressions like “loose fitting” and “tight fitting” and you often encounter both the ISO and ANSI tolerances in blue prints and machine drawings. A pointed out in the article, for example, a paired specification like “H7/k6” on a nominal 50 mm diameter would identify a tolerance range of +0.000 mm to +0.025 mm and a tolerance range of -0.018 mm to +0.002 mm for the shaft. I find that I can generally hold my most often used FDM 3d printer to a +/- 0.03 range, so while “H8/f7” would be too exacting a specification for my machine, there are tolerance ranges that could be used for most FDM and certainly DLP printing. On Oct 29, 2019, at 4:07 PM, adrianv < <mailto:avm4@cornell.edu> avm4@cornell.edu> wrote: Well, if it's supposed to be like a screw thread tolerance then the letter specifies a "tolerance position", which gives a maximum diameter for the bolt shaft. The number gives the tolerance range below this maximum. One could imagine using this to shrink models to compensate for overextrusion. But this is a specific standard for machine screw threads and the value of the tolerance even depends on the screw shaft diameter. It doesn't apply broadly to arbitrary objects. (It doesn't even apply to nuts, which use capital letters.) Even if you could figure out how to define it for arbitrary objects, how would OpenSCAD know whether a component needed to be enlarged or shrunk? I don't see that there's any way to do this automatically. nophead wrote Not sure I understand. h7 specifies a tolerance, i.e. a range of possible sizes that can be tested with a limit gauge or a micrometer. How can that be expressed in a model, which always has a definite size? On Tue, 29 Oct 2019 at 22:00, Hugo Jackson &lt; hugo@ &gt; wrote: Has any thought been given to incorporating engineering fits and tolerances into OpenSCAD? As I understand it, OpenSCAD was originally conceived for the creation of STL files for a 3D printer and I’ve been thinking that the base functionality might be improved by a little more CAM in the CAD. -- Sent from: <http://forum.openscad.org/> http://forum.openscad.org/ _______________________________________________ OpenSCAD mailing list <mailto:Discuss@lists.openscad.org> Discuss@lists.openscad.org http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org _______________________________________________ OpenSCAD mailing list <mailto:Discuss@lists.openscad.org> Discuss@lists.openscad.org <http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
S
shadowwynd
Wed, Oct 30, 2019 3:40 AM

If you are printing a bulbasaur, slop in the printer doesn't make much
difference.

If you are building parts that have to work with other parts - there is a
dizzying array of variables.  Filament type / brand / color, humidity, flow
rate, print/bed temperature, layer height, Z-Offset, edge curl/elephant
foot, slicing algorithm, and even the infill percentage and support
structure can subtly alter the print.  There are days when I marvel that any
of this FDM stuff works at all.

I can easily get 1mm+ difference between prints if I start changing
variables.  To make it even more fun - the outside dimensions might match
the "ideal" specified in CAD, but the inner diameter of a screw hole might
be 0.4mm too narrow.  These sorts of "tolerances" mean all the difference
between parts fitting together and moving as they should.... and not.    Or
I print two batches with the exact same machine and slicer settings but in
different filament and the parts don't line up again.  If dimensions matter,
I have a whole "tuning" ritual I have to go through every time I change
filament (level bed, print test, measure test, adjust Z-Offset and flow
rate, rinse and repeat until within 0.05 mm).  Assuming I can just print the
STLs on another 3D printer and have everything work OK is naive at best (if
there are multiple interlocking parts) unless I make the tolerances pretty
loose.  This is specifically one of the reasons I like OpenSCAD - I can
easily tweak a hole diameter by 0.2mm and it can apply to every hole in my
model at the same time.

What I often do is put all the fudge factors in one area.  This can be
commented out / copied+changed  if I am going between different models /
filaments.

diam = 10; // Ideal Diameter
thickness = 1;  //Height

// Fudge Factors - Printing on MakerGear M2, 0.2mm layer height, brown
UltiMachine PLA
diam_e = 0.1;
thickness_e = 0.04;

/*  // Fudge Factors - Printing on Makerbot, 0.3mm layer height, Hatchbox
white PLA
diam_e = 0.0;
thickness_e = 0.2;
*/

//Create Model
cylinder (d=diam+diam_e, h=thickness+thickness_e);

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

If you are printing a bulbasaur, slop in the printer doesn't make much difference. If you are building parts that have to work with other parts - there is a dizzying array of variables. Filament type / brand / color, humidity, flow rate, print/bed temperature, layer height, Z-Offset, edge curl/elephant foot, slicing algorithm, and even the infill percentage and support structure can subtly alter the print. There are days when I marvel that any of this FDM stuff works *at all*. I can easily get 1mm+ difference between prints if I start changing variables. To make it even more fun - the outside dimensions might match the "ideal" specified in CAD, but the inner diameter of a screw hole might be 0.4mm too narrow. These sorts of "tolerances" mean all the difference between parts fitting together and moving as they should.... and not. Or I print two batches with the exact same machine and slicer settings but in different filament and the parts don't line up again. If dimensions matter, I have a whole "tuning" ritual I have to go through every time I change filament (level bed, print test, measure test, adjust Z-Offset and flow rate, rinse and repeat until within 0.05 mm). Assuming I can just print the STLs on another 3D printer and have everything work OK is naive at best (if there are multiple interlocking parts) unless I make the tolerances pretty loose. This is specifically one of the reasons I like OpenSCAD - I can easily tweak a hole diameter by 0.2mm and it can apply to every hole in my model at the same time. What I often do is put all the fudge factors in one area. This can be commented out / copied+changed if I am going between different models / filaments. diam = 10; // Ideal Diameter thickness = 1; //Height // Fudge Factors - Printing on MakerGear M2, 0.2mm layer height, brown UltiMachine PLA diam_e = 0.1; thickness_e = 0.04; /* // Fudge Factors - Printing on Makerbot, 0.3mm layer height, Hatchbox white PLA diam_e = 0.0; thickness_e = 0.2; */ //Create Model cylinder (d=diam+diam_e, h=thickness+thickness_e); -- Sent from: http://forum.openscad.org/