discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Provide a simple measurement tool

BE
Bob Ewart
Fri, Aug 27, 2021 8:22 PM

I've been following issue #3638
https://github.com/openscad/openscad/issues/3638 on openscad at
github.  I'm not alone in wanting to know where a particular point is
located or how far apart two points are.

If you have something like:

translate([a,b,c]) {
    rotate([d,e,f]) {
        translate([g,h,i]) {

OpenSCAD has to be keeping track of where you are.  So it should be
possible to insert something like /echo($X,$Y,$Z);/

You would be able to check alignment and distance from those echo's.

Even better would be to have /Point1 = [$X,$Y,$Z]; /A simple function
could calculate the distance between two such points.  Angles could also
be determined with three points.
//

--
Bob

The goal of Computer Science is to build something
that will last at least until we've finished building it.

I've been following issue #3638 <https://github.com/openscad/openscad/issues/3638> on openscad at github.  I'm not alone in wanting to know where a particular point is located or how far apart two points are. If you have something like: translate([a,b,c]) {     rotate([d,e,f]) {         translate([g,h,i]) { OpenSCAD has to be keeping track of where you are.  So it should be possible to insert something like /echo($X,$Y,$Z);/ You would be able to check alignment and distance from those echo's. Even better would be to have /Point1 = [$X,$Y,$Z]; /A simple function could calculate the distance between two such points.  Angles could also be determined with three points. // -- Bob The goal of Computer Science is to build something that will last at least until we've finished building it.
NH
nop head
Fri, Aug 27, 2021 9:49 PM

IIRC this has been done in user code by redefining translate, rotate, etc
to use multmatrix and maintaining an inverse transform in a $variable.

On Fri, 27 Aug 2021 at 21:22, Bob Ewart jinnicky@bobsown.net wrote:

I've been following issue #3638
https://github.com/openscad/openscad/issues/3638 on openscad at
github.  I'm not alone in wanting to know where a particular point is
located or how far apart two points are.

If you have something like:

translate([a,b,c]) {
rotate([d,e,f]) {
translate([g,h,i]) {

OpenSCAD has to be keeping track of where you are.  So it should be
possible to insert something like echo($X,$Y,$Z);

You would be able to check alignment and distance from those echo's.

Even better would be to have *Point1 = [$X,$Y,$Z];  *A simple function
could calculate the distance between two such points.  Angles could also be
determined with three points.

--
Bob

The goal of Computer Science is to build something
that will last at least until we've finished building it.


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

IIRC this has been done in user code by redefining translate, rotate, etc to use multmatrix and maintaining an inverse transform in a $variable. On Fri, 27 Aug 2021 at 21:22, Bob Ewart <jinnicky@bobsown.net> wrote: > I've been following issue #3638 > <https://github.com/openscad/openscad/issues/3638> on openscad at > github. I'm not alone in wanting to know where a particular point is > located or how far apart two points are. > > If you have something like: > > translate([a,b,c]) { > rotate([d,e,f]) { > translate([g,h,i]) { > > OpenSCAD has to be keeping track of where you are. So it should be > possible to insert something like *echo($X,$Y,$Z);* > > You would be able to check alignment and distance from those echo's. > > Even better would be to have *Point1 = [$X,$Y,$Z]; *A simple function > could calculate the distance between two such points. Angles could also be > determined with three points. > > -- > Bob > > The goal of Computer Science is to build something > that will last at least until we've finished building it. > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
JB
Jordan Brown
Sat, Aug 28, 2021 2:18 AM

On 8/27/2021 1:22 PM, Bob Ewart wrote:

If you have something like:

translate([a,b,c]) {
    rotate([d,e,f]) {
        translate([g,h,i]) {

OpenSCAD has to be keeping track of where you are.

You might think so.  And it could.  But no, it doesn't.

Turning the example into a concrete one:

translate([1,2,3]) {
    rotate([4,5,6]) {
        translate([7,8,9]) {
            cube();
        }
    }
}

the result of executing the OpenSCAD program is this CSG tree:

multmatrix([[1, 0, 0, 1], [0, 1, 0, 2], [0, 0, 1, 3], [0, 0, 0, 1]]) {
  multmatrix([[0.990737, -0.0982275, 0.0937587, 0], [0.104131, 0.992735, -0.0602863, 0], [-0.0871557, 0.069491, 0.993768, 0], [0, 0, 0, 1]]) {
    multmatrix([[1, 0, 0, 7], [0, 1, 0, 8], [0, 0, 1, 9], [0, 0, 0, 1]]) {
      cube(size = [1, 1, 1], center = false);
    }
  }
}

It is a later stage, after the execution is done, after the program has
any control, that actually does the geometric work.

As nophead says, it's possible to do something equivalent in the
OpenSCAD program, by carrying redefining the various transformations and
using $ variables to pass down the accumulated transformation.

Here's a thread that discusses some experiments in doing that:
https://forum.openscad.org/Some-thoughts-on-deriving-world-coordinates-for-objects-td30377.html

Perhaps it would be a worthwhile project to make that capability
available using the built-in transforms.

Even better would be to have /Point1 = [$X,$Y,$Z];  /A simple function
could calculate the distance between two such points. 

norm(p1-p2) will give you the distance between two points.  But:  even
with the $-variable trickery above, the "physics" of the OpenSCAD
universe constrain what you can do.  OpenSCAD modules are black holes;
you cannot get information out of them.  Thus, if you have

... some sequence of transforms ... {
    A();
}
... some other sequence of transforms ... {
    B();
}

although A() could maybe know where it is, and B() could maybe know
where it is, nothing can know where both A() and B() are, because
there is no way to get the information out of the stack of transforms. 
(Except via echo() or text(), but the information is not then available
to the OpenSCAD program.)

Angles could also be determined with three points.

Yes, with some appropriate use of atan2(), but with the same physics
limitations.

On 8/27/2021 1:22 PM, Bob Ewart wrote: > > If you have something like: > > translate([a,b,c]) { >     rotate([d,e,f]) { >         translate([g,h,i]) { > > OpenSCAD has to be keeping track of where you are. > You might think so.  And it could.  But no, it doesn't. Turning the example into a concrete one: translate([1,2,3]) { rotate([4,5,6]) { translate([7,8,9]) { cube(); } } } the result of executing the OpenSCAD program is this CSG tree: multmatrix([[1, 0, 0, 1], [0, 1, 0, 2], [0, 0, 1, 3], [0, 0, 0, 1]]) { multmatrix([[0.990737, -0.0982275, 0.0937587, 0], [0.104131, 0.992735, -0.0602863, 0], [-0.0871557, 0.069491, 0.993768, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 7], [0, 1, 0, 8], [0, 0, 1, 9], [0, 0, 0, 1]]) { cube(size = [1, 1, 1], center = false); } } } It is a later stage, after the execution is done, after the program has any control, that actually does the geometric work. As nophead says, it's possible to do something equivalent in the OpenSCAD program, by carrying redefining the various transformations and using $ variables to pass down the accumulated transformation. Here's a thread that discusses some experiments in doing that: https://forum.openscad.org/Some-thoughts-on-deriving-world-coordinates-for-objects-td30377.html Perhaps it would be a worthwhile project to make that capability available using the built-in transforms. > Even better would be to have /Point1 = [$X,$Y,$Z];  /A simple function > could calculate the distance between two such points.  > norm(p1-p2) will give you the distance between two points.  But:  even with the $-variable trickery above, the "physics" of the OpenSCAD universe constrain what you can do.  OpenSCAD modules are black holes; you cannot get information out of them.  Thus, if you have ... some sequence of transforms ... { A(); } ... some other sequence of transforms ... { B(); } although A() could maybe know where it is, and B() could maybe know where it is, nothing can know where *both* A() *and* B() are, because there is no way to get the information out of the stack of transforms.  (Except via echo() or text(), but the information is not then available to the OpenSCAD program.) > Angles could also be determined with three points. > Yes, with some appropriate use of atan2(), but with the same physics limitations.
GH
Gene Heskett
Sat, Aug 28, 2021 6:31 AM

On Friday 27 August 2021 22:18:03 Jordan Brown wrote:

On 8/27/2021 1:22 PM, Bob Ewart wrote:

If you have something like:

translate([a,b,c]) {
    rotate([d,e,f]) {
        translate([g,h,i]) {

OpenSCAD has to be keeping track of where you are.

You might think so.  And it could.  But no, it doesn't.

Turning the example into a concrete one:

 translate([1,2,3]) {
     rotate([4,5,6]) {
         translate([7,8,9]) {
             cube();
         }
     }
 }

the result of executing the OpenSCAD program is this CSG tree:

 multmatrix([[1, 0, 0, 1], [0, 1, 0, 2], [0, 0, 1, 3], [0, 0, 0,

1]]) { multmatrix([[0.990737, -0.0982275, 0.0937587, 0], [0.104131,
0.992735, -0.0602863, 0], [-0.0871557, 0.069491, 0.993768, 0], [0, 0,
0, 1]]) { multmatrix([[1, 0, 0, 7], [0, 1, 0, 8], [0, 0, 1, 9], [0, 0,
0, 1]]) { cube(size = [1, 1, 1], center = false);
}
}
}

It is a later stage, after the execution is done, after the program
has any control, that actually does the geometric work.

As nophead says, it's possible to do something equivalent in the
OpenSCAD program, by carrying redefining the various transformations
and using $ variables to pass down the accumulated transformation.

Here's a thread that discusses some experiments in doing that:
https://forum.openscad.org/Some-thoughts-on-deriving-world-coordinates
-for-objects-td30377.html

Perhaps it would be a worthwhile project to make that capability
available using the built-in transforms.

Even better would be to have /Point1 = [$X,$Y,$Z];  /A simple
function could calculate the distance between two such points.

norm(p1-p2) will give you the distance between two points.  But:  even
with the $-variable trickery above, the "physics" of the OpenSCAD
universe constrain what you can do.  OpenSCAD modules are black holes;
you cannot get information out of them.  Thus, if you have

 ... some sequence of transforms ... {
     A();
 }
 ... some other sequence of transforms ... {
     B();
 }

although A() could maybe know where it is, and B() could maybe know
where it is, nothing can know where both A() and B() are, because
there is no way to get the information out of the stack of
transforms.  (Except via echo() or text(), but the information is not
then available to the OpenSCAD program.)

Angles could also be determined with three points.

Yes, with some appropriate use of atan2(), but with the same physics
limitations.

I know I'd sure like to have the ruler thats located at 0,0,0 in the
display, made portable so its available to lay across a part to find out
how big it is. That would be handier than the turn button on the
outhouse door at a family reunion. I'm also aware thats one very tall
order to do in 3d space. But the need is there.

Cheers, Gene Heskett

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.

On Friday 27 August 2021 22:18:03 Jordan Brown wrote: > On 8/27/2021 1:22 PM, Bob Ewart wrote: > > If you have something like: > > > > translate([a,b,c]) { > >     rotate([d,e,f]) { > >         translate([g,h,i]) { > > > > OpenSCAD has to be keeping track of where you are. > > You might think so.  And it could.  But no, it doesn't. > > Turning the example into a concrete one: > > translate([1,2,3]) { > rotate([4,5,6]) { > translate([7,8,9]) { > cube(); > } > } > } > > the result of executing the OpenSCAD program is this CSG tree: > > multmatrix([[1, 0, 0, 1], [0, 1, 0, 2], [0, 0, 1, 3], [0, 0, 0, > 1]]) { multmatrix([[0.990737, -0.0982275, 0.0937587, 0], [0.104131, > 0.992735, -0.0602863, 0], [-0.0871557, 0.069491, 0.993768, 0], [0, 0, > 0, 1]]) { multmatrix([[1, 0, 0, 7], [0, 1, 0, 8], [0, 0, 1, 9], [0, 0, > 0, 1]]) { cube(size = [1, 1, 1], center = false); > } > } > } > > It is a later stage, after the execution is done, after the program > has any control, that actually does the geometric work. > > As nophead says, it's possible to do something equivalent in the > OpenSCAD program, by carrying redefining the various transformations > and using $ variables to pass down the accumulated transformation. > > Here's a thread that discusses some experiments in doing that: > https://forum.openscad.org/Some-thoughts-on-deriving-world-coordinates >-for-objects-td30377.html > > Perhaps it would be a worthwhile project to make that capability > available using the built-in transforms. > > > Even better would be to have /Point1 = [$X,$Y,$Z];  /A simple > > function could calculate the distance between two such points. > > norm(p1-p2) will give you the distance between two points.  But:  even > with the $-variable trickery above, the "physics" of the OpenSCAD > universe constrain what you can do.  OpenSCAD modules are black holes; > you cannot get information out of them.  Thus, if you have > > ... some sequence of transforms ... { > A(); > } > ... some other sequence of transforms ... { > B(); > } > > although A() could maybe know where it is, and B() could maybe know > where it is, nothing can know where *both* A() *and* B() are, because > there is no way to get the information out of the stack of > transforms.  (Except via echo() or text(), but the information is not > then available to the OpenSCAD program.) > > > Angles could also be determined with three points. > > Yes, with some appropriate use of atan2(), but with the same physics > limitations. I know I'd sure like to have the ruler thats located at 0,0,0 in the display, made portable so its available to lay across a part to find out how big it is. That would be handier than the turn button on the outhouse door at a family reunion. I'm also aware thats one very tall order to do in 3d space. But the need is there. Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis Genes Web page <http://geneslinuxbox.net:6309/gene>
AM
Adrian Mariano
Sat, Aug 28, 2021 11:41 AM

Many people have written rulers.  You can probably easily find a few with
google.  Also there's one in BOSL2:

include<BOSL2/std.scad>
cylinder(h=10,r=7.5,$fn=25);
ruler(10);

Of course, this ruler is part of your model, not something you can lay down
over your mode as you view it.

To the original poster I'd ask why you want to measure a distance.  What
are you planning to do with the result?  There may be some simple way to
achieve your end goal that doesn't require measuring.

On Sat, Aug 28, 2021 at 2:32 AM Gene Heskett gheskett@shentel.net wrote:

On Friday 27 August 2021 22:18:03 Jordan Brown wrote:

On 8/27/2021 1:22 PM, Bob Ewart wrote:

If you have something like:

translate([a,b,c]) {
rotate([d,e,f]) {
translate([g,h,i]) {

OpenSCAD has to be keeping track of where you are.

You might think so.  And it could.  But no, it doesn't.

Turning the example into a concrete one:

 translate([1,2,3]) {
     rotate([4,5,6]) {
         translate([7,8,9]) {
             cube();
         }
     }
 }

the result of executing the OpenSCAD program is this CSG tree:

 multmatrix([[1, 0, 0, 1], [0, 1, 0, 2], [0, 0, 1, 3], [0, 0, 0,

1]]) { multmatrix([[0.990737, -0.0982275, 0.0937587, 0], [0.104131,
0.992735, -0.0602863, 0], [-0.0871557, 0.069491, 0.993768, 0], [0, 0,
0, 1]]) { multmatrix([[1, 0, 0, 7], [0, 1, 0, 8], [0, 0, 1, 9], [0, 0,
0, 1]]) { cube(size = [1, 1, 1], center = false);
}
}
}

It is a later stage, after the execution is done, after the program
has any control, that actually does the geometric work.

As nophead says, it's possible to do something equivalent in the
OpenSCAD program, by carrying redefining the various transformations
and using $ variables to pass down the accumulated transformation.

Here's a thread that discusses some experiments in doing that:
https://forum.openscad.org/Some-thoughts-on-deriving-world-coordinates
-for-objects-td30377.html

Perhaps it would be a worthwhile project to make that capability
available using the built-in transforms.

Even better would be to have /Point1 = [$X,$Y,$Z];  /A simple
function could calculate the distance between two such points.

norm(p1-p2) will give you the distance between two points.  But:  even
with the $-variable trickery above, the "physics" of the OpenSCAD
universe constrain what you can do.  OpenSCAD modules are black holes;
you cannot get information out of them.  Thus, if you have

 ... some sequence of transforms ... {
     A();
 }
 ... some other sequence of transforms ... {
     B();
 }

although A() could maybe know where it is, and B() could maybe know
where it is, nothing can know where both A() and B() are, because
there is no way to get the information out of the stack of
transforms.  (Except via echo() or text(), but the information is not
then available to the OpenSCAD program.)

Angles could also be determined with three points.

Yes, with some appropriate use of atan2(), but with the same physics
limitations.

I know I'd sure like to have the ruler thats located at 0,0,0 in the
display, made portable so its available to lay across a part to find out
how big it is. That would be handier than the turn button on the
outhouse door at a family reunion. I'm also aware thats one very tall
order to do in 3d space. But the need is there.

Cheers, Gene Heskett

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.


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

Many people have written rulers. You can probably easily find a few with google. Also there's one in BOSL2: include<BOSL2/std.scad> cylinder(h=10,r=7.5,$fn=25); ruler(10); Of course, this ruler is part of your model, not something you can lay down over your mode as you view it. To the original poster I'd ask why you want to measure a distance. What are you planning to do with the result? There may be some simple way to achieve your end goal that doesn't require measuring. On Sat, Aug 28, 2021 at 2:32 AM Gene Heskett <gheskett@shentel.net> wrote: > On Friday 27 August 2021 22:18:03 Jordan Brown wrote: > > > On 8/27/2021 1:22 PM, Bob Ewart wrote: > > > If you have something like: > > > > > > translate([a,b,c]) { > > > rotate([d,e,f]) { > > > translate([g,h,i]) { > > > > > > OpenSCAD has to be keeping track of where you are. > > > > You might think so. And it could. But no, it doesn't. > > > > Turning the example into a concrete one: > > > > translate([1,2,3]) { > > rotate([4,5,6]) { > > translate([7,8,9]) { > > cube(); > > } > > } > > } > > > > the result of executing the OpenSCAD program is this CSG tree: > > > > multmatrix([[1, 0, 0, 1], [0, 1, 0, 2], [0, 0, 1, 3], [0, 0, 0, > > 1]]) { multmatrix([[0.990737, -0.0982275, 0.0937587, 0], [0.104131, > > 0.992735, -0.0602863, 0], [-0.0871557, 0.069491, 0.993768, 0], [0, 0, > > 0, 1]]) { multmatrix([[1, 0, 0, 7], [0, 1, 0, 8], [0, 0, 1, 9], [0, 0, > > 0, 1]]) { cube(size = [1, 1, 1], center = false); > > } > > } > > } > > > > It is a later stage, after the execution is done, after the program > > has any control, that actually does the geometric work. > > > > As nophead says, it's possible to do something equivalent in the > > OpenSCAD program, by carrying redefining the various transformations > > and using $ variables to pass down the accumulated transformation. > > > > Here's a thread that discusses some experiments in doing that: > > https://forum.openscad.org/Some-thoughts-on-deriving-world-coordinates > >-for-objects-td30377.html > > > > Perhaps it would be a worthwhile project to make that capability > > available using the built-in transforms. > > > > > Even better would be to have /Point1 = [$X,$Y,$Z]; /A simple > > > function could calculate the distance between two such points. > > > > norm(p1-p2) will give you the distance between two points. But: even > > with the $-variable trickery above, the "physics" of the OpenSCAD > > universe constrain what you can do. OpenSCAD modules are black holes; > > you cannot get information out of them. Thus, if you have > > > > ... some sequence of transforms ... { > > A(); > > } > > ... some other sequence of transforms ... { > > B(); > > } > > > > although A() could maybe know where it is, and B() could maybe know > > where it is, nothing can know where *both* A() *and* B() are, because > > there is no way to get the information out of the stack of > > transforms. (Except via echo() or text(), but the information is not > > then available to the OpenSCAD program.) > > > > > Angles could also be determined with three points. > > > > Yes, with some appropriate use of atan2(), but with the same physics > > limitations. > > I know I'd sure like to have the ruler thats located at 0,0,0 in the > display, made portable so its available to lay across a part to find out > how big it is. That would be handier than the turn button on the > outhouse door at a family reunion. I'm also aware thats one very tall > order to do in 3d space. But the need is there. > > Cheers, Gene Heskett > -- > "There are four boxes to be used in defense of liberty: > soap, ballot, jury, and ammo. Please use in that order." > -Ed Howdershelt (Author) > If we desire respect for the law, we must first make the law respectable. > - Louis D. Brandeis > Genes Web page <http://geneslinuxbox.net:6309/gene> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
BE
Bob Ewart
Sat, Aug 28, 2021 1:14 PM

I am working on a little sign in two parts, the sign itself and a
support bracket.  I want to make sure that the connectors are the same
distance apart and that the are far enough apart to fit over a bracket
holding my monitor.

--
Bob

Truth is stranger than fiction because fiction has to make sense.

On 8/28/21 7:41 AM, Adrian Mariano wrote:

Many people have written rulers.  You can probably easily find a few
with google.  Also there's one in BOSL2:

include<BOSL2/std.scad>
cylinder(h=10,r=7.5,$fn=25);
ruler(10);

Of course, this ruler is part of your model, not something you can lay
down over your mode as you view it.

To the original poster I'd ask why you want to measure a distance. 
What are you planning to do with the result?  There may be some simple
way to achieve your end goal that doesn't require measuring.

On Sat, Aug 28, 2021 at 2:32 AM Gene Heskett <gheskett@shentel.net
mailto:gheskett@shentel.net> wrote:

 On Friday 27 August 2021 22:18:03 Jordan Brown wrote:

On 8/27/2021 1:22 PM, Bob Ewart wrote:

If you have something like:

translate([a,b,c]) {
    rotate([d,e,f]) {
        translate([g,h,i]) {

OpenSCAD has to be keeping track of where you are.

You might think so.  And it could.  But no, it doesn't.

Turning the example into a concrete one:

     translate([1,2,3]) {
         rotate([4,5,6]) {
             translate([7,8,9]) {
                 cube();
             }
         }
     }

the result of executing the OpenSCAD program is this CSG tree:

     multmatrix([[1, 0, 0, 1], [0, 1, 0, 2], [0, 0, 1, 3], [0, 0, 0,
1]]) { multmatrix([[0.990737, -0.0982275, 0.0937587, 0], [0.104131,
0.992735, -0.0602863, 0], [-0.0871557, 0.069491, 0.993768, 0],

 [0, 0,

0, 1]]) { multmatrix([[1, 0, 0, 7], [0, 1, 0, 8], [0, 0, 1, 9],

 [0, 0,

0, 1]]) { cube(size = [1, 1, 1], center = false);
         }
       }
     }

It is a later stage, after the execution is done, after the program
has any control, that actually does the geometric work.

As nophead says, it's possible to do something equivalent in the
OpenSCAD program, by carrying redefining the various transformations
and using $ variables to pass down the accumulated transformation.

Here's a thread that discusses some experiments in doing that:

 https://forum.openscad.org/Some-thoughts-on-deriving-world-coordinates
 <https://forum.openscad.org/Some-thoughts-on-deriving-world-coordinates>

-for-objects-td30377.html

Perhaps it would be a worthwhile project to make that capability
available using the built-in transforms.

Even better would be to have /Point1 = [$X,$Y,$Z]; /A simple
function could calculate the distance between two such points.

norm(p1-p2) will give you the distance between two points. 

 But:  even

with the $-variable trickery above, the "physics" of the OpenSCAD
universe constrain what you can do.  OpenSCAD modules are black

 holes;

you cannot get information out of them.  Thus, if you have

     ... some sequence of transforms ... {
         A();
     }
     ... some other sequence of transforms ... {
         B();
     }

although A() could maybe know where it is, and B() could maybe know
where it is, nothing can know where both A() and B() are,

 because

there is no way to get the information out of the stack of
transforms.  (Except via echo() or text(), but the information

 is not

then available to the OpenSCAD program.)

Angles could also be determined with three points.

Yes, with some appropriate use of atan2(), but with the same physics
limitations.

 I know I'd sure like to have the ruler thats located at 0,0,0 in the
 display, made portable so its available to lay across a part to
 find out
 how big it is. That would be handier than the turn button on the
 outhouse door at a family reunion. I'm also aware thats one very tall
 order to do in 3d space. But the need is there.

 Cheers, Gene Heskett
 -- 
 "There are four boxes to be used in defense of liberty:
  soap, ballot, jury, and ammo. Please use in that order."
 -Ed Howdershelt (Author)
 If we desire respect for the law, we must first make the law
 respectable.
  - Louis D. Brandeis
 Genes Web page <http://geneslinuxbox.net:6309/gene
 <http://geneslinuxbox.net:6309/gene>>
 _______________________________________________
 OpenSCAD mailing list
 To unsubscribe send an email to discuss-leave@lists.openscad.org
 <mailto:discuss-leave@lists.openscad.org>

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

I am working on a little sign in two parts, the sign itself and a support bracket.  I want to make sure that the connectors are the same distance apart and that the are far enough apart to fit over a bracket holding my monitor. -- Bob Truth is stranger than fiction because fiction has to make sense. On 8/28/21 7:41 AM, Adrian Mariano wrote: > Many people have written rulers.  You can probably easily find a few > with google.  Also there's one in BOSL2: > > include<BOSL2/std.scad> > cylinder(h=10,r=7.5,$fn=25); > ruler(10); > > Of course, this ruler is part of your model, not something you can lay > down over your mode as you view it. > > To the original poster I'd ask why you want to measure a distance.  > What are you planning to do with the result?  There may be some simple > way to achieve your end goal that doesn't require measuring. > > On Sat, Aug 28, 2021 at 2:32 AM Gene Heskett <gheskett@shentel.net > <mailto:gheskett@shentel.net>> wrote: > > On Friday 27 August 2021 22:18:03 Jordan Brown wrote: > > > On 8/27/2021 1:22 PM, Bob Ewart wrote: > > > If you have something like: > > > > > > translate([a,b,c]) { > > >     rotate([d,e,f]) { > > >         translate([g,h,i]) { > > > > > > OpenSCAD has to be keeping track of where you are. > > > > You might think so.  And it could.  But no, it doesn't. > > > > Turning the example into a concrete one: > > > >     translate([1,2,3]) { > >         rotate([4,5,6]) { > >             translate([7,8,9]) { > >                 cube(); > >             } > >         } > >     } > > > > the result of executing the OpenSCAD program is this CSG tree: > > > >     multmatrix([[1, 0, 0, 1], [0, 1, 0, 2], [0, 0, 1, 3], [0, 0, 0, > > 1]]) { multmatrix([[0.990737, -0.0982275, 0.0937587, 0], [0.104131, > > 0.992735, -0.0602863, 0], [-0.0871557, 0.069491, 0.993768, 0], > [0, 0, > > 0, 1]]) { multmatrix([[1, 0, 0, 7], [0, 1, 0, 8], [0, 0, 1, 9], > [0, 0, > > 0, 1]]) { cube(size = [1, 1, 1], center = false); > >         } > >       } > >     } > > > > It is a later stage, after the execution is done, after the program > > has any control, that actually does the geometric work. > > > > As nophead says, it's possible to do something equivalent in the > > OpenSCAD program, by carrying redefining the various transformations > > and using $ variables to pass down the accumulated transformation. > > > > Here's a thread that discusses some experiments in doing that: > > > https://forum.openscad.org/Some-thoughts-on-deriving-world-coordinates > <https://forum.openscad.org/Some-thoughts-on-deriving-world-coordinates> > >-for-objects-td30377.html > > > > Perhaps it would be a worthwhile project to make that capability > > available using the built-in transforms. > > > > > Even better would be to have /Point1 = [$X,$Y,$Z]; /A simple > > > function could calculate the distance between two such points. > > > > norm(p1-p2) will give you the distance between two points.  > But:  even > > with the $-variable trickery above, the "physics" of the OpenSCAD > > universe constrain what you can do.  OpenSCAD modules are black > holes; > > you cannot get information out of them.  Thus, if you have > > > >     ... some sequence of transforms ... { > >         A(); > >     } > >     ... some other sequence of transforms ... { > >         B(); > >     } > > > > although A() could maybe know where it is, and B() could maybe know > > where it is, nothing can know where *both* A() *and* B() are, > because > > there is no way to get the information out of the stack of > > transforms.  (Except via echo() or text(), but the information > is not > > then available to the OpenSCAD program.) > > > > > Angles could also be determined with three points. > > > > Yes, with some appropriate use of atan2(), but with the same physics > > limitations. > > I know I'd sure like to have the ruler thats located at 0,0,0 in the > display, made portable so its available to lay across a part to > find out > how big it is. That would be handier than the turn button on the > outhouse door at a family reunion. I'm also aware thats one very tall > order to do in 3d space. But the need is there. > > Cheers, Gene Heskett > -- > "There are four boxes to be used in defense of liberty: >  soap, ballot, jury, and ammo. Please use in that order." > -Ed Howdershelt (Author) > If we desire respect for the law, we must first make the law > respectable. >  - Louis D. Brandeis > Genes Web page <http://geneslinuxbox.net:6309/gene > <http://geneslinuxbox.net:6309/gene>> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > <mailto:discuss-leave@lists.openscad.org> > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
MM
Michael Möller
Sat, Aug 28, 2021 1:15 PM

Hey, I'd like that, too ....

But,

Executive summary : The point or elegance of OpenSCAD is that you define
exactly where you want each part to go. Why measure it? (Answer: to verify
your code)

Longer version: There have also been requests that you can "nudge" a part
interactively with the mouse. I'd like that, too, but again - that's not
the point of the declarative language and only exact numbers. If you want
to design with drag-n-drop use tinkercad.com or blender etc. Yes, I too,
sometimes am too lazy, or do not have the required
trigonometric/mathematical skill. So I fudge it. I keep entering a new
fudge value until it fits. Of course I never know if it actually fits, it
just looks good on screen (zoom in zoom in ,...). For my average 3D printer
that's often good enough. Hint: Use the animation feature, then you get a
refresh as you type.

Of course, if I do proper design, ie. think about what I want to do,
modularize my OpenSCAD program, use wiki for a "math refresher course" and
so on, then I do not need to measure my output.

Actually I do. I have this seperate visualizer tool for STL files (3D Tool
Free), and there I can get the 3D distance and angle between any two
points, edges, surface and what not. As it is NOT part of OpenSCAD it
also checks for other bugs that might be. Verifying my design before
committing to plastic, so to speak.

Remember that you can write a module that only does a transform - see
"children()". I've also used a module/function combination in a sub
assembly whose only purpose is to return a number (a distance f.ex) that
needs to be repeated in another part of the model. Which brings me back to
the executive summary.

Msquare

On Fri, 27 Aug 2021 at 22:22, Bob Ewart jinnicky@bobsown.net wrote:

I've been following issue #3638
https://github.com/openscad/openscad/issues/3638 on openscad at
github.  I'm not alone in wanting to know where a particular point is
located or how far apart two points are.

If you have something like:

translate([a,b,c]) {
rotate([d,e,f]) {
translate([g,h,i]) {

OpenSCAD has to be keeping track of where you are.  So it should be
possible to insert something like echo($X,$Y,$Z);

You would be able to check alignment and distance from those echo's.

Even better would be to have *Point1 = [$X,$Y,$Z];  *A simple function
could calculate the distance between two such points.  Angles could also be
determined with three points.

--
Bob

The goal of Computer Science is to build something
that will last at least until we've finished building it.


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

Hey, I'd like that, too .... But, Executive summary : The point or elegance of OpenSCAD is that you define exactly where you want each part to go. Why measure it? (Answer: to verify your code) Longer version: There have also been requests that you can "nudge" a part interactively with the mouse. I'd like that, too, but again - that's not the point of the declarative language and only exact numbers. If you want to design with drag-n-drop use tinkercad.com or blender etc. Yes, I too, sometimes am too lazy, or do not have the required trigonometric/mathematical skill. So I fudge it. I keep entering a new fudge value until it fits. Of course I never know if it actually fits, it just looks good on screen (zoom in zoom in ,...). For my average 3D printer that's often good enough. Hint: Use the animation feature, then you get a refresh as you type. Of course, if I do proper design, ie. think about what I want to do, modularize my OpenSCAD program, use wiki for a "math refresher course" and so on, then I do not need to measure my output. Actually I do. I have this seperate visualizer tool for STL files (3D Tool Free), and there I can get the 3D distance and angle between any two points, edges, surface and what not. As it is NOT part of OpenSCAD it also checks for other bugs that might be. Verifying my design before committing to plastic, so to speak. Remember that you can write a module that only does a transform - see "children()". I've also used a module/function combination in a sub assembly whose only purpose is to return a number (a distance f.ex) that needs to be repeated in another part of the model. Which brings me back to the executive summary. Msquare On Fri, 27 Aug 2021 at 22:22, Bob Ewart <jinnicky@bobsown.net> wrote: > I've been following issue #3638 > <https://github.com/openscad/openscad/issues/3638> on openscad at > github. I'm not alone in wanting to know where a particular point is > located or how far apart two points are. > > If you have something like: > > translate([a,b,c]) { > rotate([d,e,f]) { > translate([g,h,i]) { > > OpenSCAD has to be keeping track of where you are. So it should be > possible to insert something like *echo($X,$Y,$Z);* > > You would be able to check alignment and distance from those echo's. > > Even better would be to have *Point1 = [$X,$Y,$Z]; *A simple function > could calculate the distance between two such points. Angles could also be > determined with three points. > > -- > Bob > > The goal of Computer Science is to build something > that will last at least until we've finished building it. > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
MM
Michael Möller
Sat, Aug 28, 2021 1:25 PM

Hi Bob, mine and your last email crossed in time. This was sort of what I
was hinting at. You define the critical distance in a separate module or
file which you use in both part designs.

You create a module with the common parts (the shape of a screw hole?)
and/or a function which returns the critical distance. Then in your two
parts you call that module/function. (modules return a shape or transform a
child shape; functions are just mathematical one-line functions)

You can have both parts in the same file, where you just comment out a line
or other which determines which part to render this time - or - you have a
common file, and in your two shape files you use "include <filename>".
Either way you are certain you have used the same distance.

And the point is - you don't measure the distance created in one module and
then recode it in the other part - you code the distance, once.

On Sat, 28 Aug 2021 at 15:14, Bob Ewart jinnicky@bobsown.net wrote:

I am working on a little sign in two parts, the sign itself and a support
bracket.  I want to make sure that the connectors are the same distance
apart and that the are far enough apart to fit over a bracket holding my
monitor.

--
Bob

Truth is stranger than fiction because fiction has to make sense.

On 8/28/21 7:41 AM, Adrian Mariano wrote:

Many people have written rulers.  You can probably easily find a few with
google.  Also there's one in BOSL2:

include<BOSL2/std.scad>
cylinder(h=10,r=7.5,$fn=25);
ruler(10);

Of course, this ruler is part of your model, not something you can lay
down over your mode as you view it.

To the original poster I'd ask why you want to measure a distance.  What
are you planning to do with the result?  There may be some simple way to
achieve your end goal that doesn't require measuring.

On Sat, Aug 28, 2021 at 2:32 AM Gene Heskett gheskett@shentel.net wrote:

On Friday 27 August 2021 22:18:03 Jordan Brown wrote:

On 8/27/2021 1:22 PM, Bob Ewart wrote:

If you have something like:

translate([a,b,c]) {
rotate([d,e,f]) {
translate([g,h,i]) {

OpenSCAD has to be keeping track of where you are.

You might think so.  And it could.  But no, it doesn't.

Turning the example into a concrete one:

 translate([1,2,3]) {
     rotate([4,5,6]) {
         translate([7,8,9]) {
             cube();
         }
     }
 }

the result of executing the OpenSCAD program is this CSG tree:

 multmatrix([[1, 0, 0, 1], [0, 1, 0, 2], [0, 0, 1, 3], [0, 0, 0,

1]]) { multmatrix([[0.990737, -0.0982275, 0.0937587, 0], [0.104131,
0.992735, -0.0602863, 0], [-0.0871557, 0.069491, 0.993768, 0], [0, 0,
0, 1]]) { multmatrix([[1, 0, 0, 7], [0, 1, 0, 8], [0, 0, 1, 9], [0, 0,
0, 1]]) { cube(size = [1, 1, 1], center = false);
}
}
}

It is a later stage, after the execution is done, after the program
has any control, that actually does the geometric work.

As nophead says, it's possible to do something equivalent in the
OpenSCAD program, by carrying redefining the various transformations
and using $ variables to pass down the accumulated transformation.

Here's a thread that discusses some experiments in doing that:
https://forum.openscad.org/Some-thoughts-on-deriving-world-coordinates
-for-objects-td30377.html

Perhaps it would be a worthwhile project to make that capability
available using the built-in transforms.

Even better would be to have /Point1 = [$X,$Y,$Z];  /A simple
function could calculate the distance between two such points.

norm(p1-p2) will give you the distance between two points.  But:  even
with the $-variable trickery above, the "physics" of the OpenSCAD
universe constrain what you can do.  OpenSCAD modules are black holes;
you cannot get information out of them.  Thus, if you have

 ... some sequence of transforms ... {
     A();
 }
 ... some other sequence of transforms ... {
     B();
 }

although A() could maybe know where it is, and B() could maybe know
where it is, nothing can know where both A() and B() are, because
there is no way to get the information out of the stack of
transforms.  (Except via echo() or text(), but the information is not
then available to the OpenSCAD program.)

Angles could also be determined with three points.

Yes, with some appropriate use of atan2(), but with the same physics
limitations.

I know I'd sure like to have the ruler thats located at 0,0,0 in the
display, made portable so its available to lay across a part to find out
how big it is. That would be handier than the turn button on the
outhouse door at a family reunion. I'm also aware thats one very tall
order to do in 3d space. But the need is there.

Cheers, Gene Heskett

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.


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


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


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

Hi Bob, mine and your last email crossed in time. This was sort of what I was hinting at. You define the critical distance in a separate module or file which you use in both part designs. You create a module with the common parts (the shape of a screw hole?) and/or a function which returns the critical distance. Then in your two parts you call that module/function. (modules return a shape or transform a child shape; functions are just mathematical one-line functions) You can have both parts in the same file, where you just comment out a line or other which determines which part to render this time - or - you have a common file, and in your two shape files you use "include <filename>". Either way you are certain you have used the same distance. And the point is - you don't measure the distance created in one module and then recode it in the other part - you code the distance, once. On Sat, 28 Aug 2021 at 15:14, Bob Ewart <jinnicky@bobsown.net> wrote: > I am working on a little sign in two parts, the sign itself and a support > bracket. I want to make sure that the connectors are the same distance > apart and that the are far enough apart to fit over a bracket holding my > monitor. > > > -- > Bob > > Truth is stranger than fiction because fiction has to make sense. > > On 8/28/21 7:41 AM, Adrian Mariano wrote: > > Many people have written rulers. You can probably easily find a few with > google. Also there's one in BOSL2: > > include<BOSL2/std.scad> > cylinder(h=10,r=7.5,$fn=25); > ruler(10); > > Of course, this ruler is part of your model, not something you can lay > down over your mode as you view it. > > To the original poster I'd ask why you want to measure a distance. What > are you planning to do with the result? There may be some simple way to > achieve your end goal that doesn't require measuring. > > On Sat, Aug 28, 2021 at 2:32 AM Gene Heskett <gheskett@shentel.net> wrote: > >> On Friday 27 August 2021 22:18:03 Jordan Brown wrote: >> >> > On 8/27/2021 1:22 PM, Bob Ewart wrote: >> > > If you have something like: >> > > >> > > translate([a,b,c]) { >> > > rotate([d,e,f]) { >> > > translate([g,h,i]) { >> > > >> > > OpenSCAD has to be keeping track of where you are. >> > >> > You might think so. And it could. But no, it doesn't. >> > >> > Turning the example into a concrete one: >> > >> > translate([1,2,3]) { >> > rotate([4,5,6]) { >> > translate([7,8,9]) { >> > cube(); >> > } >> > } >> > } >> > >> > the result of executing the OpenSCAD program is this CSG tree: >> > >> > multmatrix([[1, 0, 0, 1], [0, 1, 0, 2], [0, 0, 1, 3], [0, 0, 0, >> > 1]]) { multmatrix([[0.990737, -0.0982275, 0.0937587, 0], [0.104131, >> > 0.992735, -0.0602863, 0], [-0.0871557, 0.069491, 0.993768, 0], [0, 0, >> > 0, 1]]) { multmatrix([[1, 0, 0, 7], [0, 1, 0, 8], [0, 0, 1, 9], [0, 0, >> > 0, 1]]) { cube(size = [1, 1, 1], center = false); >> > } >> > } >> > } >> > >> > It is a later stage, after the execution is done, after the program >> > has any control, that actually does the geometric work. >> > >> > As nophead says, it's possible to do something equivalent in the >> > OpenSCAD program, by carrying redefining the various transformations >> > and using $ variables to pass down the accumulated transformation. >> > >> > Here's a thread that discusses some experiments in doing that: >> > https://forum.openscad.org/Some-thoughts-on-deriving-world-coordinates >> >-for-objects-td30377.html >> > >> > Perhaps it would be a worthwhile project to make that capability >> > available using the built-in transforms. >> > >> > > Even better would be to have /Point1 = [$X,$Y,$Z]; /A simple >> > > function could calculate the distance between two such points. >> > >> > norm(p1-p2) will give you the distance between two points. But: even >> > with the $-variable trickery above, the "physics" of the OpenSCAD >> > universe constrain what you can do. OpenSCAD modules are black holes; >> > you cannot get information out of them. Thus, if you have >> > >> > ... some sequence of transforms ... { >> > A(); >> > } >> > ... some other sequence of transforms ... { >> > B(); >> > } >> > >> > although A() could maybe know where it is, and B() could maybe know >> > where it is, nothing can know where *both* A() *and* B() are, because >> > there is no way to get the information out of the stack of >> > transforms. (Except via echo() or text(), but the information is not >> > then available to the OpenSCAD program.) >> > >> > > Angles could also be determined with three points. >> > >> > Yes, with some appropriate use of atan2(), but with the same physics >> > limitations. >> >> I know I'd sure like to have the ruler thats located at 0,0,0 in the >> display, made portable so its available to lay across a part to find out >> how big it is. That would be handier than the turn button on the >> outhouse door at a family reunion. I'm also aware thats one very tall >> order to do in 3d space. But the need is there. >> >> Cheers, Gene Heskett >> -- >> "There are four boxes to be used in defense of liberty: >> soap, ballot, jury, and ammo. Please use in that order." >> -Ed Howdershelt (Author) >> If we desire respect for the law, we must first make the law respectable. >> - Louis D. Brandeis >> Genes Web page <http://geneslinuxbox.net:6309/gene> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
GH
Gene Heskett
Sat, Aug 28, 2021 2:30 PM

On Saturday 28 August 2021 09:15:26 Michael Möller wrote:

Hey, I'd like that, too ....

But,

Executive summary : The point or elegance of OpenSCAD is that you
define exactly where you want each part to go. Why measure it?
(Answer: to verify your code)

Longer version: There have also been requests that you can "nudge" a
part interactively with the mouse. I'd like that, too, but again -
that's not the point of the declarative language and only exact
numbers. If you want to design with drag-n-drop use tinkercad.com or
blender etc. Yes, I too, sometimes am too lazy, or do not have the
required
trigonometric/mathematical skill. So I fudge it. I keep entering a new
fudge value until it fits. Of course I never know if it actually fits,
it just looks good on screen (zoom in zoom in ,...). For my average 3D
printer that's often good enough. Hint: Use the animation feature,
then you get a refresh as you type.

I don't think my machine has the horsepower to do that in real time. And
printers seem to have a mind of their own, I have some parts that are
supposed to be 5.98mm tall, and I watched it finish as 5.99mm on the
printers own display, but when mic'd, it is 6.51mm tall. Needs lots of
sanding to fix that...

Of course, if I do proper design, ie. think about what I want to do,
modularize my OpenSCAD program, use wiki for a "math refresher course"
and so on, then I do not need to measure my output.

Actually I do. I have this seperate visualizer tool for STL files (3D
Tool Free), and there I can get the 3D distance and angle between any
two points, edges, surface and what not. As it is NOT part of OpenSCAD
it also checks for other bugs that might be. Verifying my design
before committing to plastic, so to speak.

Remember that you can write a module that only does a transform - see
"children()". I've also used a module/function combination in a sub
assembly whose only purpose is to return a number (a distance f.ex)
that needs to be repeated in another part of the model. Which brings
me back to the executive summary.

Msquare

On Fri, 27 Aug 2021 at 22:22, Bob Ewart jinnicky@bobsown.net wrote:

I've been following issue #3638
https://github.com/openscad/openscad/issues/3638 on openscad at
github.  I'm not alone in wanting to know where a particular point
is located or how far apart two points are.

If you have something like:

translate([a,b,c]) {
rotate([d,e,f]) {
translate([g,h,i]) {

OpenSCAD has to be keeping track of where you are.  So it should be
possible to insert something like echo($X,$Y,$Z);

You would be able to check alignment and distance from those echo's.

Even better would be to have *Point1 = [$X,$Y,$Z];  *A simple
function could calculate the distance between two such points.
Angles could also be determined with three points.

--
Bob

The goal of Computer Science is to build something
that will last at least until we've finished building it.


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

Cheers, Gene Heskett

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.

On Saturday 28 August 2021 09:15:26 Michael Möller wrote: > Hey, I'd like that, too .... > > But, > > Executive summary : The point or elegance of OpenSCAD is that you > define exactly where you want each part to go. Why measure it? > (Answer: to verify your code) > > Longer version: There have also been requests that you can "nudge" a > part interactively with the mouse. I'd like that, too, but again - > that's not the point of the declarative language and only exact > numbers. If you want to design with drag-n-drop use tinkercad.com or > blender etc. Yes, I too, sometimes am too lazy, or do not have the > required > trigonometric/mathematical skill. So I fudge it. I keep entering a new > fudge value until it fits. Of course I never know if it actually fits, > it just looks good on screen (zoom in zoom in ,...). For my average 3D > printer that's often good enough. Hint: Use the animation feature, > then you get a refresh as you type. > I don't think my machine has the horsepower to do that in real time. And printers seem to have a mind of their own, I have some parts that are supposed to be 5.98mm tall, and I watched it finish as 5.99mm on the printers own display, but when mic'd, it is 6.51mm tall. Needs lots of sanding to fix that... > Of course, if I do proper design, ie. think about what I want to do, > modularize my OpenSCAD program, use wiki for a "math refresher course" > and so on, then I do not need to measure my output. > > Actually I do. I have this seperate visualizer tool for STL files (3D > Tool Free), and there I can get the 3D distance and angle between any > two points, edges, surface and what not. As it is NOT part of OpenSCAD > it also checks for other bugs that might be. Verifying my design > before committing to plastic, so to speak. > > Remember that you can write a module that only does a transform - see > "children()". I've also used a module/function combination in a sub > assembly whose only purpose is to return a number (a distance f.ex) > that needs to be repeated in another part of the model. Which brings > me back to the executive summary. > > Msquare > > On Fri, 27 Aug 2021 at 22:22, Bob Ewart <jinnicky@bobsown.net> wrote: > > I've been following issue #3638 > > <https://github.com/openscad/openscad/issues/3638> on openscad at > > github. I'm not alone in wanting to know where a particular point > > is located or how far apart two points are. > > > > If you have something like: > > > > translate([a,b,c]) { > > rotate([d,e,f]) { > > translate([g,h,i]) { > > > > OpenSCAD has to be keeping track of where you are. So it should be > > possible to insert something like *echo($X,$Y,$Z);* > > > > You would be able to check alignment and distance from those echo's. > > > > Even better would be to have *Point1 = [$X,$Y,$Z]; *A simple > > function could calculate the distance between two such points. > > Angles could also be determined with three points. > > > > -- > > Bob > > > > The goal of Computer Science is to build something > > that will last at least until we've finished building it. > > > > _______________________________________________ > > OpenSCAD mailing list > > To unsubscribe send an email to discuss-leave@lists.openscad.org Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis Genes Web page <http://geneslinuxbox.net:6309/gene>
GC
Gareth Chen
Sun, Aug 29, 2021 12:51 AM

If your printer is printing 5.98mm parts to be 6.51mm tall it's seriously
out of calibration...

On Sat, Aug 28, 2021, 7:31 AM Gene Heskett gheskett@shentel.net wrote:

On Saturday 28 August 2021 09:15:26 Michael Möller wrote:

Hey, I'd like that, too ....

But,

Executive summary : The point or elegance of OpenSCAD is that you
define exactly where you want each part to go. Why measure it?
(Answer: to verify your code)

Longer version: There have also been requests that you can "nudge" a
part interactively with the mouse. I'd like that, too, but again -
that's not the point of the declarative language and only exact
numbers. If you want to design with drag-n-drop use tinkercad.com or
blender etc. Yes, I too, sometimes am too lazy, or do not have the
required
trigonometric/mathematical skill. So I fudge it. I keep entering a new
fudge value until it fits. Of course I never know if it actually fits,
it just looks good on screen (zoom in zoom in ,...). For my average 3D
printer that's often good enough. Hint: Use the animation feature,
then you get a refresh as you type.

I don't think my machine has the horsepower to do that in real time. And
printers seem to have a mind of their own, I have some parts that are
supposed to be 5.98mm tall, and I watched it finish as 5.99mm on the
printers own display, but when mic'd, it is 6.51mm tall. Needs lots of
sanding to fix that...

Of course, if I do proper design, ie. think about what I want to do,
modularize my OpenSCAD program, use wiki for a "math refresher course"
and so on, then I do not need to measure my output.

Actually I do. I have this seperate visualizer tool for STL files (3D
Tool Free), and there I can get the 3D distance and angle between any
two points, edges, surface and what not. As it is NOT part of OpenSCAD
it also checks for other bugs that might be. Verifying my design
before committing to plastic, so to speak.

Remember that you can write a module that only does a transform - see
"children()". I've also used a module/function combination in a sub
assembly whose only purpose is to return a number (a distance f.ex)
that needs to be repeated in another part of the model. Which brings
me back to the executive summary.

Msquare

On Fri, 27 Aug 2021 at 22:22, Bob Ewart jinnicky@bobsown.net wrote:

I've been following issue #3638
https://github.com/openscad/openscad/issues/3638 on openscad at
github.  I'm not alone in wanting to know where a particular point
is located or how far apart two points are.

If you have something like:

translate([a,b,c]) {
rotate([d,e,f]) {
translate([g,h,i]) {

OpenSCAD has to be keeping track of where you are.  So it should be
possible to insert something like echo($X,$Y,$Z);

You would be able to check alignment and distance from those echo's.

Even better would be to have *Point1 = [$X,$Y,$Z];  *A simple
function could calculate the distance between two such points.
Angles could also be determined with three points.

--
Bob

The goal of Computer Science is to build something
that will last at least until we've finished building it.


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

Cheers, Gene Heskett

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.


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

If your printer is printing 5.98mm parts to be 6.51mm tall it's seriously out of calibration... On Sat, Aug 28, 2021, 7:31 AM Gene Heskett <gheskett@shentel.net> wrote: > On Saturday 28 August 2021 09:15:26 Michael Möller wrote: > > > Hey, I'd like that, too .... > > > > But, > > > > Executive summary : The point or elegance of OpenSCAD is that you > > define exactly where you want each part to go. Why measure it? > > (Answer: to verify your code) > > > > Longer version: There have also been requests that you can "nudge" a > > part interactively with the mouse. I'd like that, too, but again - > > that's not the point of the declarative language and only exact > > numbers. If you want to design with drag-n-drop use tinkercad.com or > > blender etc. Yes, I too, sometimes am too lazy, or do not have the > > required > > trigonometric/mathematical skill. So I fudge it. I keep entering a new > > fudge value until it fits. Of course I never know if it actually fits, > > it just looks good on screen (zoom in zoom in ,...). For my average 3D > > printer that's often good enough. Hint: Use the animation feature, > > then you get a refresh as you type. > > > I don't think my machine has the horsepower to do that in real time. And > printers seem to have a mind of their own, I have some parts that are > supposed to be 5.98mm tall, and I watched it finish as 5.99mm on the > printers own display, but when mic'd, it is 6.51mm tall. Needs lots of > sanding to fix that... > > > Of course, if I do proper design, ie. think about what I want to do, > > modularize my OpenSCAD program, use wiki for a "math refresher course" > > and so on, then I do not need to measure my output. > > > > Actually I do. I have this seperate visualizer tool for STL files (3D > > Tool Free), and there I can get the 3D distance and angle between any > > two points, edges, surface and what not. As it is NOT part of OpenSCAD > > it also checks for other bugs that might be. Verifying my design > > before committing to plastic, so to speak. > > > > Remember that you can write a module that only does a transform - see > > "children()". I've also used a module/function combination in a sub > > assembly whose only purpose is to return a number (a distance f.ex) > > that needs to be repeated in another part of the model. Which brings > > me back to the executive summary. > > > > Msquare > > > > On Fri, 27 Aug 2021 at 22:22, Bob Ewart <jinnicky@bobsown.net> wrote: > > > I've been following issue #3638 > > > <https://github.com/openscad/openscad/issues/3638> on openscad at > > > github. I'm not alone in wanting to know where a particular point > > > is located or how far apart two points are. > > > > > > If you have something like: > > > > > > translate([a,b,c]) { > > > rotate([d,e,f]) { > > > translate([g,h,i]) { > > > > > > OpenSCAD has to be keeping track of where you are. So it should be > > > possible to insert something like *echo($X,$Y,$Z);* > > > > > > You would be able to check alignment and distance from those echo's. > > > > > > Even better would be to have *Point1 = [$X,$Y,$Z]; *A simple > > > function could calculate the distance between two such points. > > > Angles could also be determined with three points. > > > > > > -- > > > Bob > > > > > > The goal of Computer Science is to build something > > > that will last at least until we've finished building it. > > > > > > _______________________________________________ > > > OpenSCAD mailing list > > > To unsubscribe send an email to discuss-leave@lists.openscad.org > > > Cheers, Gene Heskett > -- > "There are four boxes to be used in defense of liberty: > soap, ballot, jury, and ammo. Please use in that order." > -Ed Howdershelt (Author) > If we desire respect for the law, we must first make the law respectable. > - Louis D. Brandeis > Genes Web page <http://geneslinuxbox.net:6309/gene> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
GH
Gene Heskett
Sun, Aug 29, 2021 2:22 AM

On Saturday 28 August 2021 20:51:21 Gareth Chen wrote:

If your printer is printing 5.98mm parts to be 6.51mm tall it's
seriously out of calibration...

Its a Prusa mk3S, has about a 25 minute calibration using markers on the
bed for xy references. But other that running z against to top stops and
hammering on the top for a while, I don't see where it calibrates the z
range. XY home apparently senses motor current to detect just touching
the left and rear stops. Not even hard enough to obviously hear it hit.
If the same circuit is used for detecting the top of travel, then its
failing as its dual z motors and useing a default because it hammers the
top of travel for about a full second. I'll ask prusa monday. And get
the m command to change it too.

Thank you..
[...]
Cheers, Gene Heskett

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.

On Saturday 28 August 2021 20:51:21 Gareth Chen wrote: > If your printer is printing 5.98mm parts to be 6.51mm tall it's > seriously out of calibration... Its a Prusa mk3S, has about a 25 minute calibration using markers on the bed for xy references. But other that running z against to top stops and hammering on the top for a while, I don't see where it calibrates the z range. XY home apparently senses motor current to detect just touching the left and rear stops. Not even hard enough to obviously hear it hit. If the same circuit is used for detecting the top of travel, then its failing as its dual z motors and useing a default because it hammers the top of travel for about a full second. I'll ask prusa monday. And get the m command to change it too. Thank you.. [...] Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis Genes Web page <http://geneslinuxbox.net:6309/gene>
FH
Father Horton
Sun, Aug 29, 2021 2:36 AM

It almost sounds as if your printer profile is messed up. Are you using
defaults in PrusaSlicer, or did you change something, or are you using Cura?

On Sat, Aug 28, 2021 at 9:24 PM Gene Heskett gheskett@shentel.net wrote:

On Saturday 28 August 2021 20:51:21 Gareth Chen wrote:

If your printer is printing 5.98mm parts to be 6.51mm tall it's
seriously out of calibration...

Its a Prusa mk3S, has about a 25 minute calibration using markers on the
bed for xy references. But other that running z against to top stops and
hammering on the top for a while, I don't see where it calibrates the z
range. XY home apparently senses motor current to detect just touching
the left and rear stops. Not even hard enough to obviously hear it hit.
If the same circuit is used for detecting the top of travel, then its
failing as its dual z motors and useing a default because it hammers the
top of travel for about a full second. I'll ask prusa monday. And get
the m command to change it too.

Thank you..
[...]
Cheers, Gene Heskett

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.


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

It almost sounds as if your printer profile is messed up. Are you using defaults in PrusaSlicer, or did you change something, or are you using Cura? On Sat, Aug 28, 2021 at 9:24 PM Gene Heskett <gheskett@shentel.net> wrote: > On Saturday 28 August 2021 20:51:21 Gareth Chen wrote: > > > If your printer is printing 5.98mm parts to be 6.51mm tall it's > > seriously out of calibration... > > Its a Prusa mk3S, has about a 25 minute calibration using markers on the > bed for xy references. But other that running z against to top stops and > hammering on the top for a while, I don't see where it calibrates the z > range. XY home apparently senses motor current to detect just touching > the left and rear stops. Not even hard enough to obviously hear it hit. > If the same circuit is used for detecting the top of travel, then its > failing as its dual z motors and useing a default because it hammers the > top of travel for about a full second. I'll ask prusa monday. And get > the m command to change it too. > > Thank you.. > [...] > Cheers, Gene Heskett > -- > "There are four boxes to be used in defense of liberty: > soap, ballot, jury, and ammo. Please use in that order." > -Ed Howdershelt (Author) > If we desire respect for the law, we must first make the law respectable. > - Louis D. Brandeis > Genes Web page <http://geneslinuxbox.net:6309/gene> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
AM
Adrian Mariano
Sun, Aug 29, 2021 2:45 AM

I'm not sure what you mean about a calibration for xy reference.  When I
start a print using gcode produced by PrusaSlicer, it does a 49 point z
calibration before anything else.  I don't think you're supposed to try to
detect the top of travel.  Certainly I've never seen that happen.  And I
don't know that it would help much wtih z cal unless you were really far
out.  It seems like z cal depends on two things: accurate determination of
the z=0 point and accurate motor operation.  I've just always printed on my
Prusa MK3 (now S) using PrusaSlicer with just minimal changes to suit the
model (e.g. turning brim on, adjusting infill, and changing the number of
perimeters) and things just always work and come out accurately sized.  I
just printed some screw tests where the thread pitch is around 1.25 mm and
I printed the bolt .2mm smaller than the nut (nominal sizes) and the two
parts engage.  I previously printed 1/4-20 bolts that engage with standard
metal hardware.  It just works.  Note that Prusa has 24/7 tech support by
chat, which I've found pretty helpful at figuring out issues I have had.  I
had a situation where the magnets in the base came loose and moved around
and interfered with the motor operation, which messed up the Y
calibration.  It would try to travel behind the back of the build plate.
When the machine goes right and left until it hits the sides I think it's
testing belt tension.  (I'm not sure how that test works.)  I had an issue
early on after I first assembled my machine with insufficient belt
tension.

On Sat, Aug 28, 2021 at 10:24 PM Gene Heskett gheskett@shentel.net wrote:

On Saturday 28 August 2021 20:51:21 Gareth Chen wrote:

If your printer is printing 5.98mm parts to be 6.51mm tall it's
seriously out of calibration...

Its a Prusa mk3S, has about a 25 minute calibration using markers on the
bed for xy references. But other that running z against to top stops and
hammering on the top for a while, I don't see where it calibrates the z
range. XY home apparently senses motor current to detect just touching
the left and rear stops. Not even hard enough to obviously hear it hit.
If the same circuit is used for detecting the top of travel, then its
failing as its dual z motors and useing a default because it hammers the
top of travel for about a full second. I'll ask prusa monday. And get
the m command to change it too.

Thank you..
[...]
Cheers, Gene Heskett

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.


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

I'm not sure what you mean about a calibration for xy reference. When I start a print using gcode produced by PrusaSlicer, it does a 49 point z calibration before anything else. I don't think you're supposed to try to detect the top of travel. Certainly I've never seen that happen. And I don't know that it would help much wtih z cal unless you were really far out. It seems like z cal depends on two things: accurate determination of the z=0 point and accurate motor operation. I've just always printed on my Prusa MK3 (now S) using PrusaSlicer with just minimal changes to suit the model (e.g. turning brim on, adjusting infill, and changing the number of perimeters) and things just always work and come out accurately sized. I just printed some screw tests where the thread pitch is around 1.25 mm and I printed the bolt .2mm smaller than the nut (nominal sizes) and the two parts engage. I previously printed 1/4-20 bolts that engage with standard metal hardware. It just works. Note that Prusa has 24/7 tech support by chat, which I've found pretty helpful at figuring out issues I have had. I had a situation where the magnets in the base came loose and moved around and interfered with the motor operation, which messed up the Y calibration. It would try to travel behind the back of the build plate. When the machine goes right and left until it hits the sides I think it's testing belt tension. (I'm not sure how that test works.) I had an issue early on after I first assembled my machine with insufficient belt tension. On Sat, Aug 28, 2021 at 10:24 PM Gene Heskett <gheskett@shentel.net> wrote: > On Saturday 28 August 2021 20:51:21 Gareth Chen wrote: > > > If your printer is printing 5.98mm parts to be 6.51mm tall it's > > seriously out of calibration... > > Its a Prusa mk3S, has about a 25 minute calibration using markers on the > bed for xy references. But other that running z against to top stops and > hammering on the top for a while, I don't see where it calibrates the z > range. XY home apparently senses motor current to detect just touching > the left and rear stops. Not even hard enough to obviously hear it hit. > If the same circuit is used for detecting the top of travel, then its > failing as its dual z motors and useing a default because it hammers the > top of travel for about a full second. I'll ask prusa monday. And get > the m command to change it too. > > Thank you.. > [...] > Cheers, Gene Heskett > -- > "There are four boxes to be used in defense of liberty: > soap, ballot, jury, and ammo. Please use in that order." > -Ed Howdershelt (Author) > If we desire respect for the law, we must first make the law respectable. > - Louis D. Brandeis > Genes Web page <http://geneslinuxbox.net:6309/gene> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
M
MichaelAtOz
Sun, Aug 29, 2021 3:21 AM

Calibration is something you need to do, not the printer.

You need to slice & print calibration objects and get your callipers out.

Then adjust slicer settings, rinse, repeat, until you get physical objects matching the specification of the calibration object.

You will need to have profiles for different materials with settings from a calibration run for that material (usually just extruder settings being different).

I haven't calibrated for a long time as I use Shapeways, but Google coughed up these which look reasonable.

https://all3dp.com/2/how-to-calibrate-a-3d-printer-simply-explained/

Then do some torture tests

https://all3dp.com/2/best-3d-printer-test-print-3d-models/

There is little point printing functional objects until you can print a calibration object accurately.

https://www.thingiverse.com/search?q=calibration https://www.thingiverse.com/search?q=calibration&type=things &type=things


From: Father Horton [mailto:fatherhorton@gmail.com]
Sent: Sun, 29 Aug 2021 12:36
To: OpenSCAD general discussion
Subject: [OpenSCAD] Re: Provide a simple measurement tool

It almost sounds as if your printer profile is messed up. Are you using defaults in PrusaSlicer, or did you change something, or are you using Cura?

On Sat, Aug 28, 2021 at 9:24 PM Gene Heskett gheskett@shentel.net wrote:

On Saturday 28 August 2021 20:51:21 Gareth Chen wrote:

If your printer is printing 5.98mm parts to be 6.51mm tall it's
seriously out of calibration...

Its a Prusa mk3S, has about a 25 minute calibration using markers on the
bed for xy references. But other that running z against to top stops and
hammering on the top for a while, I don't see where it calibrates the z
range. XY home apparently senses motor current to detect just touching
the left and rear stops. Not even hard enough to obviously hear it hit.
If the same circuit is used for detecting the top of travel, then its
failing as its dual z motors and useing a default because it hammers the
top of travel for about a full second. I'll ask prusa monday. And get
the m command to change it too.

Thank you..
[...]
Cheers, Gene Heskett

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.


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

--
This email has been checked for viruses by AVG.
https://www.avg.com

Calibration is something you need to do, not the printer. You need to slice & print calibration objects and get your callipers out. Then adjust slicer settings, rinse, repeat, until you get physical objects matching the specification of the calibration object. You will need to have profiles for different materials with settings from a calibration run for that material (usually just extruder settings being different). I haven't calibrated for a long time as I use Shapeways, but Google coughed up these which look reasonable. https://all3dp.com/2/how-to-calibrate-a-3d-printer-simply-explained/ Then do some torture tests https://all3dp.com/2/best-3d-printer-test-print-3d-models/ There is little point printing functional objects until you can print a calibration object accurately. https://www.thingiverse.com/search?q=calibration <https://www.thingiverse.com/search?q=calibration&type=things> &type=things _____ From: Father Horton [mailto:fatherhorton@gmail.com] Sent: Sun, 29 Aug 2021 12:36 To: OpenSCAD general discussion Subject: [OpenSCAD] Re: Provide a simple measurement tool It almost sounds as if your printer profile is messed up. Are you using defaults in PrusaSlicer, or did you change something, or are you using Cura? On Sat, Aug 28, 2021 at 9:24 PM Gene Heskett <gheskett@shentel.net> wrote: On Saturday 28 August 2021 20:51:21 Gareth Chen wrote: > If your printer is printing 5.98mm parts to be 6.51mm tall it's > seriously out of calibration... Its a Prusa mk3S, has about a 25 minute calibration using markers on the bed for xy references. But other that running z against to top stops and hammering on the top for a while, I don't see where it calibrates the z range. XY home apparently senses motor current to detect just touching the left and rear stops. Not even hard enough to obviously hear it hit. If the same circuit is used for detecting the top of travel, then its failing as its dual z motors and useing a default because it hammers the top of travel for about a full second. I'll ask prusa monday. And get the m command to change it too. Thank you.. [...] Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis Genes Web page <http://geneslinuxbox.net:6309/gene> _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to discuss-leave@lists.openscad.org -- This email has been checked for viruses by AVG. https://www.avg.com
L
larry
Sun, Aug 29, 2021 4:23 AM

On Sat, 2021-08-28 at 22:22 -0400, Gene Heskett wrote:z

XY home apparently senses motor current to detect just touching
the left and rear stops. Not even hard enough to obviously hear it
hit. If the same circuit is used for detecting the top of travel,
then its failing as its dual z motors and useing a default because it
hammers the top of travel for about a full second. I'll ask prusa
monday. And get the m command to change it too.

If you have sensorless homing X and Y, that will work fine. It detects
stall current. But I seriously doubt that your machine came equipped
with sensorless Z homing, for the simple reason that the Z axis will
not give a high enough stall current to stop the bed in time, due to
the flex in the Z axis while driving a screw, with its (for want of a
better word) gear reduction of the screw.

I am quite certain that your endstop for the Z axis is some sort of
sensor, be it mechanical (like a microswitch), electronic (capacitive,
inductive, piezoelectric, etc.).

So for the Z axis, you want the Z homing to NEVER hit the bed. That's
usually a mechanical adjustment, moving the sensor toward/away from the
bed. When the Z axis homes, you will have a gap between the nozzle and
bed, and that's when you adjust your Z offset such that z=0 is when the
nozzle touches the bed.

As for your bad height of prints, that's a result of configuring the
wrong setting for Z axis steps/mm or step distance, depending on how
it's specified.

Thank you..
[...]
Cheers, Gene Heskett

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law
respectable.


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

On Sat, 2021-08-28 at 22:22 -0400, Gene Heskett wrote:z > XY home apparently senses motor current to detect just touching > the left and rear stops. Not even hard enough to obviously hear it > hit. If the same circuit is used for detecting the top of travel, > then its failing as its dual z motors and useing a default because it > hammers the top of travel for about a full second. I'll ask prusa > monday. And get the m command to change it too. If you have sensorless homing X and Y, that will work fine. It detects stall current. But I seriously doubt that your machine came equipped with sensorless Z homing, for the simple reason that the Z axis will not give a high enough stall current to stop the bed in time, due to the flex in the Z axis while driving a screw, with its (for want of a better word) gear reduction of the screw. I am quite certain that your endstop for the Z axis is some sort of sensor, be it mechanical (like a microswitch), electronic (capacitive, inductive, piezoelectric, etc.). So for the Z axis, you want the Z homing to NEVER hit the bed. That's usually a mechanical adjustment, moving the sensor toward/away from the bed. When the Z axis homes, you will have a gap between the nozzle and bed, and that's when you adjust your Z offset such that z=0 is when the nozzle touches the bed. As for your bad height of prints, that's a result of configuring the wrong setting for Z axis steps/mm or step distance, depending on how it's specified. > Thank you.. > [...] > Cheers, Gene Heskett > -- > "There are four boxes to be used in defense of liberty: > soap, ballot, jury, and ammo. Please use in that order." > -Ed Howdershelt (Author) > If we desire respect for the law, we must first make the law > respectable. > - Louis D. Brandeis > Genes Web page <http://geneslinuxbox.net:6309/gene> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
GH
Gene Heskett
Sun, Aug 29, 2021 7:06 AM

On Saturday 28 August 2021 22:36:09 Father Horton wrote:

It almost sounds as if your printer profile is messed up. Are you
using defaults in PrusaSlicer, or did you change something, or are you
using Cura?

cura 4.10.0, I could't make sense out of prusaslicer.

Cheers, Gene Heskett

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.

On Saturday 28 August 2021 22:36:09 Father Horton wrote: > It almost sounds as if your printer profile is messed up. Are you > using defaults in PrusaSlicer, or did you change something, or are you > using Cura? cura 4.10.0, I could't make sense out of prusaslicer. Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis Genes Web page <http://geneslinuxbox.net:6309/gene>
I
info@hjcreations.nl
Sun, Aug 29, 2021 7:15 AM

Hi Gene,

MK3S(+) has an z-calibration.
Activate factory restart.
You can find procedure here :
https://help.prusa3d.com/en/article/xyz-calibration-mk3-and-mk3s_112351

I had to do it also in the near past by controlling all calibration by
'benchy'.

After that it's much better now.
example 59.8 -> 59.7 to 59.9

Hope you can somehing with it.

Regards,

Harm Jeurink.

PS I want to start new item on here but cannot find anymore how to make
1st message.
Anyone can tell me?

Gene Heskett schreef op 2021-08-29 04:22:

On Saturday 28 August 2021 20:51:21 Gareth Chen wrote:

If your printer is printing 5.98mm parts to be 6.51mm tall it's
seriously out of calibration...

Its a Prusa mk3S, has about a 25 minute calibration using markers on
the
bed for xy references. But other that running z against to top stops
and
hammering on the top for a while, I don't see where it calibrates the z
range. XY home apparently senses motor current to detect just touching
the left and rear stops. Not even hard enough to obviously hear it hit.
If the same circuit is used for detecting the top of travel, then its
failing as its dual z motors and useing a default because it hammers
the
top of travel for about a full second. I'll ask prusa monday. And get
the m command to change it too.

Thank you..
[...]
Cheers, Gene Heskett

Hi Gene, MK3S(+) has an z-calibration. Activate factory restart. You can find procedure here : https://help.prusa3d.com/en/article/xyz-calibration-mk3-and-mk3s_112351 I had to do it also in the near past by controlling all calibration by 'benchy'. After that it's much better now. example 59.8 -> 59.7 to 59.9 Hope you can somehing with it. Regards, Harm Jeurink. PS I want to start new item on here but cannot find anymore how to make 1st message. Anyone can tell me? Gene Heskett schreef op 2021-08-29 04:22: > On Saturday 28 August 2021 20:51:21 Gareth Chen wrote: > >> If your printer is printing 5.98mm parts to be 6.51mm tall it's >> seriously out of calibration... > > Its a Prusa mk3S, has about a 25 minute calibration using markers on > the > bed for xy references. But other that running z against to top stops > and > hammering on the top for a while, I don't see where it calibrates the z > range. XY home apparently senses motor current to detect just touching > the left and rear stops. Not even hard enough to obviously hear it hit. > If the same circuit is used for detecting the top of travel, then its > failing as its dual z motors and useing a default because it hammers > the > top of travel for about a full second. I'll ask prusa monday. And get > the m command to change it too. > > Thank you.. > [...] > Cheers, Gene Heskett
GH
Gene Heskett
Sun, Aug 29, 2021 7:47 AM

On Saturday 28 August 2021 23:21:21 MichaelAtOz wrote:

Calibration is something you need to do, not the printer.

You need to slice & print calibration objects and get your callipers
out.

Then adjust slicer settings, rinse, repeat, until you get physical
objects matching the specification of the calibration object.

You will need to have profiles for different materials with settings
from a calibration run for that material (usually just extruder
settings being different).

I haven't calibrated for a long time as I use Shapeways, but Google
coughed up these which look reasonable.

Yes, I dl'd several of them, should be helpfull, thank you.

https://all3dp.com/2/how-to-calibrate-a-3d-printer-simply-explained/

Then do some torture tests

https://all3dp.com/2/best-3d-printer-test-print-3d-models/

There is little point printing functional objects until you can print
a calibration object accurately.

https://www.thingiverse.com/search?q=calibration
https://www.thingiverse.com/search?q=calibration&type=things
&type=things


From: Father Horton [mailto:fatherhorton@gmail.com]
Sent: Sun, 29 Aug 2021 12:36
To: OpenSCAD general discussion
Subject: [OpenSCAD] Re: Provide a simple measurement tool

It almost sounds as if your printer profile is messed up. Are you
using defaults in PrusaSlicer, or did you change something, or are you
using Cura?

On Sat, Aug 28, 2021 at 9:24 PM Gene Heskett gheskett@shentel.net
wrote:

On Saturday 28 August 2021 20:51:21 Gareth Chen wrote:

If your printer is printing 5.98mm parts to be 6.51mm tall it's
seriously out of calibration...

Its a Prusa mk3S, has about a 25 minute calibration using markers on
the bed for xy references. But other that running z against to top
stops and hammering on the top for a while, I don't see where it
calibrates the z range. XY home apparently senses motor current to
detect just touching the left and rear stops. Not even hard enough to
obviously hear it hit. If the same circuit is used for detecting the
top of travel, then its failing as its dual z motors and useing a
default because it hammers the top of travel for about a full second.
I'll ask prusa monday. And get the m command to change it too.

Thank you..
[...]
Cheers, Gene Heskett

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law
respectable. - Louis D. Brandeis
Genes Web page http://geneslinuxbox.net:6309/gene


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

Cheers, Gene Heskett

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.

On Saturday 28 August 2021 23:21:21 MichaelAtOz wrote: > Calibration is something you need to do, not the printer. > > You need to slice & print calibration objects and get your callipers > out. > > Then adjust slicer settings, rinse, repeat, until you get physical > objects matching the specification of the calibration object. > > You will need to have profiles for different materials with settings > from a calibration run for that material (usually just extruder > settings being different). > > > > I haven't calibrated for a long time as I use Shapeways, but Google > coughed up these which look reasonable. > Yes, I dl'd several of them, should be helpfull, thank you. > > https://all3dp.com/2/how-to-calibrate-a-3d-printer-simply-explained/ > > > > Then do some torture tests > > > > https://all3dp.com/2/best-3d-printer-test-print-3d-models/ > > > > There is little point printing functional objects until you can print > a calibration object accurately. > > > > https://www.thingiverse.com/search?q=calibration > <https://www.thingiverse.com/search?q=calibration&type=things> > &type=things > > > > > > _____ > > From: Father Horton [mailto:fatherhorton@gmail.com] > Sent: Sun, 29 Aug 2021 12:36 > To: OpenSCAD general discussion > Subject: [OpenSCAD] Re: Provide a simple measurement tool > > > > It almost sounds as if your printer profile is messed up. Are you > using defaults in PrusaSlicer, or did you change something, or are you > using Cura? > > > > On Sat, Aug 28, 2021 at 9:24 PM Gene Heskett <gheskett@shentel.net> > wrote: > > On Saturday 28 August 2021 20:51:21 Gareth Chen wrote: > > If your printer is printing 5.98mm parts to be 6.51mm tall it's > > seriously out of calibration... > > Its a Prusa mk3S, has about a 25 minute calibration using markers on > the bed for xy references. But other that running z against to top > stops and hammering on the top for a while, I don't see where it > calibrates the z range. XY home apparently senses motor current to > detect just touching the left and rear stops. Not even hard enough to > obviously hear it hit. If the same circuit is used for detecting the > top of travel, then its failing as its dual z motors and useing a > default because it hammers the top of travel for about a full second. > I'll ask prusa monday. And get the m command to change it too. > > Thank you.. > [...] > Cheers, Gene Heskett > -- > "There are four boxes to be used in defense of liberty: > soap, ballot, jury, and ammo. Please use in that order." > -Ed Howdershelt (Author) > If we desire respect for the law, we must first make the law > respectable. - Louis D. Brandeis > Genes Web page <http://geneslinuxbox.net:6309/gene> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis Genes Web page <http://geneslinuxbox.net:6309/gene>
GH
Gene Heskett
Sun, Aug 29, 2021 8:08 AM

On Sunday 29 August 2021 00:23:08 larry wrote:

On Sat, 2021-08-28 at 22:22 -0400, Gene Heskett wrote:z

XY home apparently senses motor current to detect just touching
the left and rear stops. Not even hard enough to obviously hear it
hit. If the same circuit is used for detecting the top of travel,
then its failing as its dual z motors and useing a default because
it hammers the top of travel for about a full second. I'll ask prusa
monday. And get the m command to change it too.

If you have sensorless homing X and Y, that will work fine. It detects
stall current. But I seriously doubt that your machine came equipped
with sensorless Z homing, for the simple reason that the Z axis will
not give a high enough stall current to stop the bed in time, due to
the flex in the Z axis while driving a screw, with its (for want of a
better word) gear reduction of the screw.

I am quite certain that your endstop for the Z axis is some sort of
sensor, be it mechanical (like a microswitch), electronic (capacitive,
inductive, piezoelectric, etc.).

So for the Z axis, you want the Z homing to NEVER hit the bed. That's
usually a mechanical adjustment, moving the sensor toward/away from
the bed. When the Z axis homes, you will have a gap between the nozzle
and bed, and that's when you adjust your Z offset such that z=0 is
when the nozzle touches the bed.

the printer has a test pattern for that, and the sensor is 1.065mm above
the bed for a .18mm nozzle gap. Adhesion with petg is generally good,
and a single line is .17 mm thick. No interline gaps in the little patch
at the end when held up to the light with a very strong glass for a
close look. Prusa MK3S lets you trim that in extremely small increments,
1/20th the increments possible with other printers, and does it without
bed leveling wheels.

As for your bad height of prints, that's a result of configuring the
wrong setting for Z axis steps/mm or step distance, depending on how
it's specified.

I expect dimmensional accuracy to generally print at about the target
move plus the nozzle dia, and generally write my code to be .2mm approx
undersized on each edge to come out with a decent press fit where parts
come together. Currently that value seems to be closer to .3 than .2.
for a .2mm layer, indicating over extrusion.

Thanks.
[...]

Cheers, Gene Heskett

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.

On Sunday 29 August 2021 00:23:08 larry wrote: > On Sat, 2021-08-28 at 22:22 -0400, Gene Heskett wrote:z > > > XY home apparently senses motor current to detect just touching > > the left and rear stops. Not even hard enough to obviously hear it > > hit. If the same circuit is used for detecting the top of travel, > > then its failing as its dual z motors and useing a default because > > it hammers the top of travel for about a full second. I'll ask prusa > > monday. And get the m command to change it too. > > If you have sensorless homing X and Y, that will work fine. It detects > stall current. But I seriously doubt that your machine came equipped > with sensorless Z homing, for the simple reason that the Z axis will > not give a high enough stall current to stop the bed in time, due to > the flex in the Z axis while driving a screw, with its (for want of a > better word) gear reduction of the screw. > > I am quite certain that your endstop for the Z axis is some sort of > sensor, be it mechanical (like a microswitch), electronic (capacitive, > inductive, piezoelectric, etc.). > > So for the Z axis, you want the Z homing to NEVER hit the bed. That's > usually a mechanical adjustment, moving the sensor toward/away from > the bed. When the Z axis homes, you will have a gap between the nozzle > and bed, and that's when you adjust your Z offset such that z=0 is > when the nozzle touches the bed. the printer has a test pattern for that, and the sensor is 1.065mm above the bed for a .18mm nozzle gap. Adhesion with petg is generally good, and a single line is .17 mm thick. No interline gaps in the little patch at the end when held up to the light with a very strong glass for a close look. Prusa MK3S lets you trim that in extremely small increments, 1/20th the increments possible with other printers, and does it without bed leveling wheels. > As for your bad height of prints, that's a result of configuring the > wrong setting for Z axis steps/mm or step distance, depending on how > it's specified. > I expect dimmensional accuracy to generally print at about the target move plus the nozzle dia, and generally write my code to be .2mm approx undersized on each edge to come out with a decent press fit where parts come together. Currently that value seems to be closer to .3 than .2. for a .2mm layer, indicating over extrusion. Thanks. [...] Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis Genes Web page <http://geneslinuxbox.net:6309/gene>
RW
Rob Ward
Sun, Aug 29, 2021 10:37 AM

Getting back on track, it took me a while to grasp the idea that the
programming part of Open SCAD is just an elaborate script producing
interface, and when the programming side of it finishes, the scripts
that are produced, are forwarded to the graphics engine to create the
3-D model. The programs and the rendering do not run simultaneously. The
first cannot communicate with the second. So the program is not in the
position to access geometric dimensions that are then produced and
rendered afterwards.

Producing a script that maps the transformation of the graphical objects
before they are calculated through the CSG Tree is in fact running a
parallel universe that involves far more effort for any degree of
complexity for my designs than I believe it is worth. Is this
frustrating? Yes. Is it trivial solving this problem? No.

The penny dropped when I understood the significance of:

Compiling design (CSG Tree generation)...

Rendering Polygon Mesh using CGAL... in the console.

The "CSG Tree" becomes a static list of graphical transformations. I
calmed down substantially when I got it. So while it may seem the
addition of the "ruler" idea would be easy (given all the other amazing
stuff OpenSACD allows us to do), it will take a very crafty programmer
to do it in the first place, and really crafty one to retain
compatibility with the existing processes. So I listen to the experts on
how they "work around" this issue, the quality of their work attests to
the fact they know what they are doing.

My simple approach is to usually draw in any critical extras (eg bolts,
bearings axles etc) my creation has to work with, or position easily
"checkable chunks" of known dimensions, to test my model with and then
remove them when the final model is created. This will not be convenient
for all situations but there other really good ideas that have helped
others.

Rob

Getting back on track, it took me a while to grasp the idea that the programming part of Open SCAD is just an elaborate script producing interface, and when the programming side of it finishes, the scripts that are produced, are forwarded to the graphics engine to create the 3-D model. The programs and the rendering do not run simultaneously. The first cannot communicate with the second. So the program is not in the position to access geometric dimensions that are then produced and rendered afterwards. Producing a script that maps the transformation of the graphical objects before they are calculated through the CSG Tree is in fact running a parallel universe that involves far more effort for any degree of complexity for my designs than I believe it is worth. Is this frustrating? Yes. Is it trivial solving this problem? No. The penny dropped when I understood the significance of: Compiling design (CSG Tree generation)... Rendering Polygon Mesh using CGAL... in the console. The "CSG Tree" becomes a static list of graphical transformations. I calmed down substantially when I got it. So while it may seem the addition of the "ruler" idea would be easy (given all the other amazing stuff OpenSACD allows us to do), it will take a very crafty programmer to do it in the first place, and really crafty one to retain compatibility with the existing processes. So I listen to the experts on how they "work around" this issue, the quality of their work attests to the fact they know what they are doing. My simple approach is to usually draw in any critical extras (eg bolts, bearings axles etc) my creation has to work with, or position easily "checkable chunks" of known dimensions, to test my model with and then remove them when the final model is created. This will not be convenient for all situations but there other really good ideas that have helped others. Rob