discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

vise screw question

AM
Adrian Mariano
Tue, Jul 19, 2022 12:20 AM

You don't show any examples of the misbehavior.  If you put # in front
of an object it makes the object transparent red and it still appears
in the model.  That's usually the useful modifier to use for
difference() debugging.  If you use % then the object doesn't appear
in the model, so it wouldn't act in the difference operation.  It
certainly is transparent, though.  You can also make objects
transparent directly, e.g. with a statement like color([0,1,0,.5])
which makes it green and 50% transparent.  But if it's the subtracted
part of a difference operation it will not be displayed so that won't
be useful.

On Mon, Jul 18, 2022 at 8:05 PM gene heskett gheskett@shentel.net wrote:

On 7/18/22 13:28, Jordan Brown wrote:

On 7/17/2022 1:47 PM, gene heskett wrote:

but I still need to see about the screw head socket on top of it.
And watching it form, its plain to see 40mm is too big, so I've
reduced it to 28mm and adjusted the rest to fit, but I think I've
found a bug, the ! in front of the sphere I expected to make it
transparent so I could see whats inside, but what it does do is
not helpful at all as it just turns it grey and solid.

"!" means "show only this object".  You probably mean "%", which means
"make this object transparent-gray, and don't include it in the final
model".

That does make it grey, but there's nothing transparent about it,
its solid grey and nothing inside it can be seen. It also fouls the first
argument of a difference(), making line 2 the base against which lines
3,4,5 are subtracted, definitely not useful.

This is last months AppImage.

2022.04.29.ai11816 (git 68c63f61b)

Thank you Jordan, take care and stay well.


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, 1940)
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

You don't show any examples of the misbehavior. If you put # in front of an object it makes the object transparent red and it still appears in the model. That's usually the useful modifier to use for difference() debugging. If you use % then the object doesn't appear in the model, so it wouldn't act in the difference operation. It certainly is transparent, though. You can also make objects transparent directly, e.g. with a statement like color([0,1,0,.5]) which makes it green and 50% transparent. But if it's the subtracted part of a difference operation it will not be displayed so that won't be useful. On Mon, Jul 18, 2022 at 8:05 PM gene heskett <gheskett@shentel.net> wrote: > > On 7/18/22 13:28, Jordan Brown wrote: > > On 7/17/2022 1:47 PM, gene heskett wrote: > > but I still need to see about the screw head socket on top of it. > And watching it form, its plain to see 40mm is too big, so I've > reduced it to 28mm and adjusted the rest to fit, but I think I've > found a bug, the ! in front of the sphere I expected to make it > transparent so I could see whats inside, but what it does do is > not helpful at all as it just turns it grey and solid. > > "!" means "show only this object". You probably mean "%", which means > "make this object transparent-gray, and don't include it in the final > model". > > That does make it grey, but there's nothing transparent about it, > its solid grey and nothing inside it can be seen. It also fouls the first > argument of a difference(), making line 2 the base against which lines > 3,4,5 are subtracted, definitely not useful. > > This is last months AppImage. > > 2022.04.29.ai11816 (git 68c63f61b) > > Thank you Jordan, take care and stay well. > > > _______________________________________________ > 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, 1940) > If we desire respect for the law, we must first make the law respectable. > - Louis D. Brandeis > Genes Web page <http://geneslinuxbox.net:6309/> > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
RD
Revar Desmera
Tue, Jul 19, 2022 3:15 AM

Note that transparent objects usually only show objects behind them that were created BEFORE the transparent object was created. The # modifier is an exception to this as it forces its children to defer display until after everything else.

-Revar

On Jul 18, 2022, at 5:05 PM, gene heskett gheskett@shentel.net wrote:



On 7/18/22 13:28, Jordan Brown wrote:

On 7/17/2022 1:47 PM, gene heskett wrote:
but I still need to see about the screw head socket on top of it.
And watching it form, its plain to see 40mm is too big, so I've
reduced it to 28mm and adjusted the rest to fit, but I think I've
found a bug, the ! in front of the sphere I expected to make it
transparent so I could see whats inside, but what it does do is
not helpful at all as it just turns it grey and solid.

"!" means "show only this object".  You probably mean "%", which means
"make this object transparent-gray, and don't include it in the final
model".

That does make it grey, but there's nothing transparent about it,
its solid grey and nothing inside it can be seen. It also fouls the first
argument of a difference(), making line 2 the base against which lines
3,4,5 are subtracted, definitely not useful.

This is last months AppImage.
2022.04.29.ai11816 (git 68c63f61b)
Thank you Jordan, take care and stay well.


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, 1940)
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

Note that transparent objects usually only show objects behind them that were created BEFORE the transparent object was created. The # modifier is an exception to this as it forces its children to defer display until after everything else. -Revar > On Jul 18, 2022, at 5:05 PM, gene heskett <gheskett@shentel.net> wrote: > >  >> On 7/18/22 13:28, Jordan Brown wrote: >>> On 7/17/2022 1:47 PM, gene heskett wrote: >>> but I still need to see about the screw head socket on top of it. >>> And watching it form, its plain to see 40mm is too big, so I've >>> reduced it to 28mm and adjusted the rest to fit, but I think I've >>> found a bug, the ! in front of the sphere I expected to make it >>> transparent so I could see whats inside, but what it does do is >>> not helpful at all as it just turns it grey and solid. >> "!" means "show only this object". You probably mean "%", which means >> "make this object transparent-gray, and don't include it in the final >> model". >> > That does make it grey, but there's nothing transparent about it, > its solid grey and nothing inside it can be seen. It also fouls the first > argument of a difference(), making line 2 the base against which lines > 3,4,5 are subtracted, definitely not useful. > > This is last months AppImage. > 2022.04.29.ai11816 (git 68c63f61b) > Thank you Jordan, take care and stay well. >> >> >> _______________________________________________ >> 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, 1940) > If we desire respect for the law, we must first make the law respectable. > - Louis D. Brandeis > Genes Web page <http://geneslinuxbox.net:6309/> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
GH
gene heskett
Tue, Jul 19, 2022 7:24 AM

On 7/18/22 23:18, Revar Desmera wrote:

Note that transparent objects usually only show objects behind them that were created BEFORE the transparent object was created. The # modifier is an exception to this as it forces its children to defer display until after everything else.

-Revar

IOW, there is no way to see an object inside a sphere, except looking into
the end of a cylinder, or temporarily moving it in front of the sphere
with a #
to make  it visible, then when Z is where you want it, put it back on
center!

Nothing inside the sphere can ever be seen because the sphere is the first
argument to a difference. You can only see what you are doing to it from
the outside.
So for this code:
xray=20;
module handle_cap()
{ $fn=180;
    translate([0,0,6])difference()
    {
        sphere(d=29);
        translate([xray,0,9.5])cylinder(h=10,d=4.1,center=true);
        translate([xray,0,-0.6])cylinder(h=11,d=19.25,center=true);
        translate([-22.5,-22.5,-51])cube(45);
        screwhead();
    }
}
module screwhead()
{
    translate([xray,0,12.6])difference()
    {
        cylinder(h=3.51,d=8.85,center=true);// top of form for outside
skirt
        for(i=[0:4:359])
        {
rotate([0,0,i])translate([4.7,0,-2.7])rotate([90,0,0])cylinder(h=.4,d=5.9,center=true);
        }
    }
}

then look at it on the x axis, and when its correct. reset xray to 0.

See at the link in my sig plus 6040-stf/vise-screw-pix/handle_knob_*.png.

No commercials, that is this machine, me blowing my own horn.

That's easier on the mail server than posting the png's to the global list.

But it demo's the sort of a thing we need to be able to do. And only
those interested can still see what I'm about.

Unfortunately I cannot print it, bondtech.se's so-call fixed for their
LGx extruder
version of firmware 3.10.0 for my Prusa MK3S has bricked two main boards
for it now. We will be conversing about that kettle of fish later today.
At this rate,
I will soon have $2000 in an $800 plus ship kit printer. :o[>

Take care and stay well everybody
[...]

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, 1940)
If we desire respect for the law, we must first make the law respectable.

On 7/18/22 23:18, Revar Desmera wrote: > Note that transparent objects usually only show objects behind them that were created BEFORE the transparent object was created. The # modifier is an exception to this as it forces its children to defer display until after everything else. > > -Revar IOW, there is no way to see an object inside a sphere, except looking into the end of a cylinder, or temporarily moving it in front of the sphere with a # to make  it visible, then when Z is where you want it, put it back on center! Nothing inside the sphere can ever be seen because the sphere is the first argument to a difference. You can only see what you are doing to it from the outside. So for this code: xray=20; module handle_cap() { $fn=180;     translate([0,0,6])difference()     {         sphere(d=29);         translate([xray,0,9.5])cylinder(h=10,d=4.1,center=true);         translate([xray,0,-0.6])cylinder(h=11,d=19.25,center=true);         translate([-22.5,-22.5,-51])cube(45);         screwhead();     } } module screwhead() {     translate([xray,0,12.6])difference()     {         cylinder(h=3.51,d=8.85,center=true);// top of form for outside skirt         for(i=[0:4:359])         { rotate([0,0,i])translate([4.7,0,-2.7])rotate([90,0,0])cylinder(h=.4,d=5.9,center=true);         }     } } then look at it on the x axis, and when its correct. reset xray to 0. See at the link in my sig plus 6040-stf/vise-screw-pix/handle_knob_*.png. No commercials, that is this machine, me blowing my own horn. That's easier on the mail server than posting the png's to the global list. But it demo's the sort of a thing we need to be able to do. And only those interested can still see what I'm about. Unfortunately I cannot print it, bondtech.se's so-call fixed for their LGx extruder version of firmware 3.10.0 for my Prusa MK3S has bricked two main boards for it now. We will be conversing about that kettle of fish later today. At this rate, I will soon have $2000 in an $800 plus ship kit printer. :o[> Take care and stay well everybody [...] 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, 1940) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis Genes Web page <http://geneslinuxbox.net:6309/>
RW
Raymond West
Tue, Jul 19, 2022 9:13 AM

Hi,

I tried a simple example of an object inside a sphere, and an object
removed from inside a sphere. using # or % I could clearly see what i
expected. I decided to take an intersection of a full slice, when
rendered it was as I expected. However, playing with the % and # a
number of times, it got screwed up, flushing the cache made no
difference. The attached jpeg shows the weirdness. (I think it is
connected with how rendering handles transparency, or not).

Closing openscad and restarting it was as it should be.

To render the cross section correctly, then the % needs to be removed

On 19/07/2022 08:24, gene heskett wrote:

On 7/18/22 23:18, Revar Desmera wrote:

Note that transparent objects usually only show objects behind them
that were created BEFORE the transparent object was created. The #
modifier is an exception to this as it forces its children to defer
display until after everything else.

-Revar

IOW, there is no way to see an object inside a sphere, except looking
into
the end of a cylinder, or temporarily moving it in front of the sphere
with a #
to make  it visible, then when Z is where you want it, put it back on
center!

Nothing inside the sphere can ever be seen because the sphere is the
first
argument to a difference. You can only see what you are doing to it
from the outside.
So for this code:
xray=20;
module handle_cap()
{ $fn=180;
    translate([0,0,6])difference()
    {
        sphere(d=29);
        translate([xray,0,9.5])cylinder(h=10,d=4.1,center=true);
translate([xray,0,-0.6])cylinder(h=11,d=19.25,center=true);
        translate([-22.5,-22.5,-51])cube(45);
        screwhead();
    }
}
module screwhead()
{
    translate([xray,0,12.6])difference()
    {
        cylinder(h=3.51,d=8.85,center=true);// top of form for outside
skirt
        for(i=[0:4:359])
        {
rotate([0,0,i])translate([4.7,0,-2.7])rotate([90,0,0])cylinder(h=.4,d=5.9,center=true);

        }
    }
}

then look at it on the x axis, and when its correct. reset xray to 0.

See at the link in my sig plus 6040-stf/vise-screw-pix/handle_knob_*.png.

No commercials, that is this machine, me blowing my own horn.

That's easier on the mail server than posting the png's to the global
list.

But it demo's the sort of a thing we need to be able to do. And only
those interested can still see what I'm about.

Unfortunately I cannot print it, bondtech.se's so-call fixed for their
LGx extruder
version of firmware 3.10.0 for my Prusa MK3S has bricked two main boards
for it now. We will be conversing about that kettle of fish later
today. At this rate,
I will soon have $2000 in an $800 plus ship kit printer. :o[>

Take care and stay well everybody
[...]

Cheers, Gene Heskett.

Hi, I tried a simple example of an object inside a sphere, and an object removed from inside a sphere. using # or % I could clearly see what i expected. I decided to take an intersection of a full slice, when rendered it was as I expected. However, playing with the % and # a number of times, it got screwed up, flushing the cache made no difference. The attached jpeg shows the weirdness. (I think it is connected with how rendering handles transparency, or not). Closing openscad and restarting it was as it should be. To render the cross section correctly, then the % needs to be removed On 19/07/2022 08:24, gene heskett wrote: > On 7/18/22 23:18, Revar Desmera wrote: >> Note that transparent objects usually only show objects behind them >> that were created BEFORE the transparent object was created. The # >> modifier is an exception to this as it forces its children to defer >> display until after everything else. >> >> -Revar > IOW, there is no way to see an object inside a sphere, except looking > into > the end of a cylinder, or temporarily moving it in front of the sphere > with a # > to make  it visible, then when Z is where you want it, put it back on > center! > > Nothing inside the sphere can ever be seen because the sphere is the > first > argument to a difference. You can only see what you are doing to it > from the outside. > So for this code: > xray=20; > module handle_cap() > { $fn=180; >     translate([0,0,6])difference() >     { >         sphere(d=29); >         translate([xray,0,9.5])cylinder(h=10,d=4.1,center=true); > translate([xray,0,-0.6])cylinder(h=11,d=19.25,center=true); >         translate([-22.5,-22.5,-51])cube(45); >         screwhead(); >     } > } > module screwhead() > { >     translate([xray,0,12.6])difference() >     { >         cylinder(h=3.51,d=8.85,center=true);// top of form for outside > skirt >         for(i=[0:4:359]) >         { > rotate([0,0,i])translate([4.7,0,-2.7])rotate([90,0,0])cylinder(h=.4,d=5.9,center=true); > >         } >     } > } > > then look at it on the x axis, and when its correct. reset xray to 0. > > See at the link in my sig plus 6040-stf/vise-screw-pix/handle_knob_*.png. > > No commercials, that is this machine, me blowing my own horn. > > That's easier on the mail server than posting the png's to the global > list. > > But it demo's the sort of a thing we need to be able to do. And only > those interested can still see what I'm about. > > Unfortunately I cannot print it, bondtech.se's so-call fixed for their > LGx extruder > version of firmware 3.10.0 for my Prusa MK3S has bricked two main boards > for it now. We will be conversing about that kettle of fish later > today. At this rate, > I will soon have $2000 in an $800 plus ship kit printer. :o[> > > Take care and stay well everybody > [...] > > Cheers, Gene Heskett.
RW
Ray West
Tue, Jul 19, 2022 9:24 AM

fwiw, I've been unable to repeat the mess-up. I'll put it down to
sunspot activity.

On 19/07/2022 10:13, Raymond West wrote:

Hi,

I tried a simple example of an object inside a sphere, and an object
removed from inside a sphere. using # or % I could clearly see what i
expected. I decided to take an intersection of a full slice, when
rendered it was as I expected. However, playing with the % and # a
number of times, it got screwed up, flushing the cache made no
difference. The attached jpeg shows the weirdness. (I think it is
connected with how rendering handles transparency, or not).

Closing openscad and restarting it was as it should be.

To render the cross section correctly, then the % needs to be removed

fwiw, I've been unable to repeat the mess-up. I'll put it down to sunspot activity. On 19/07/2022 10:13, Raymond West wrote: > Hi, > > I tried a simple example of an object inside a sphere, and an object > removed from inside a sphere. using # or % I could clearly see what i > expected. I decided to take an intersection of a full slice, when > rendered it was as I expected. However, playing with the % and # a > number of times, it got screwed up, flushing the cache made no > difference. The attached jpeg shows the weirdness. (I think it is > connected with how rendering handles transparency, or not). > > Closing openscad and restarting it was as it should be. > > To render the cross section correctly, then the % needs to be removed > >
GH
gene heskett
Tue, Jul 19, 2022 2:15 PM

On 7/19/22 05:27, Ray West wrote:

fwiw, I've been unable to repeat the mess-up. I'll put it down to
sunspot activity.

:o)> Or blame it on the perseides, that will work too.

I just substituted intersection() for difference() in my code, expecting
to get nothing
because there is not any common volume to any of it, and got the nothing
I expected.
intersection is not something I've ever used. I also switched from the
4.29 AppImage
to the 6.26 version, and all of my code still works. So to me, the %
modifier is a non-
starter. However, with the 6.26 AppImage, a % in front of the sphere(29)
statement
now shows the next argument of the difference if its #marked, but not
the rest of it. Or
its only showing that which is entirely within the sphere.

To test that, I swapped lines  2 and 3 of that difference, and then
could see the
19.2mm cylinder for the handle so it is showing only the next argument
after the
%sphere now.

So this is an improvement over the 4.29 code. As for the difference(),
it still works
as expected. The .stl is not affected in a way that would change the
printing.

So for this code:
module handle_cap()
{ $fn=180;
    translate([0,0,6])difference()
    {
        %sphere(d=29);
        #translate([xray,0,-0.6])cylinder(h=11,d=19.25,center=true);
//the pocket for the dowel
        #translate([xray,0,9.5])cylinder(h=10,d=4.1,center=true); //
ythe screw shank hole
        translate([-22.5,-22.5,-51])cube(45); // clip off the bottom at
the build plate
        #screwhead(); // and make room for the bugle headed  screws head
    }
}
module screwhead()
{
    translate([xray,0,12.6])difference()
    {
        cylinder(h=3.51,d=8.85,center=true);// top of form for outside
skirt, arg 1
        for(i=[0:4:359]) // arg2 of difference()
        {
rotate([0,0,i])translate([4.7,0,-2.7])rotate([90,0,0])cylinder(h=.4,d=5.9,center=true);
        }
    }
}

I now get:

handle_knob-6-26.png

at the previously posted link.

This could be helpful for "seat of the pants" designing.

Thought: If the % is to be used, where it should be applied is to the

difference() statement in terms of its "scope" so we could see an x-ray
of the

whole MaryAnn. That IMO would be the ideal use. Maybe change the colors

according to the statements order in the difference(). That way, if we see

a mistake, the color will tell us which statement in the diff is the
guilty one.

Thanks Ray, take care & stay well.

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, 1940)
If we desire respect for the law, we must first make the law respectable.

On 7/19/22 05:27, Ray West wrote: > fwiw, I've been unable to repeat the mess-up. I'll put it down to > sunspot activity. > :o)> Or blame it on the perseides, that will work too. I just substituted intersection() for difference() in my code, expecting to get nothing because there is not any common volume to any of it, and got the nothing I expected. intersection is not something I've ever used. I also switched from the 4.29 AppImage to the 6.26 version, and all of my code still works. So to me, the % modifier is a non- starter. However, with the 6.26 AppImage, a % in front of the sphere(29) statement now shows the next argument of the difference if its #marked, but not the rest of it. Or its only showing that which is entirely within the sphere. To test that, I swapped lines  2 and 3 of that difference, and then could see the 19.2mm cylinder for the handle so it is showing only the next argument after the %sphere now. So this is an improvement over the 4.29 code. As for the difference(), it still works as expected. The .stl is not affected in a way that would change the printing. So for this code: module handle_cap() { $fn=180;     translate([0,0,6])difference()     {         %sphere(d=29);         #translate([xray,0,-0.6])cylinder(h=11,d=19.25,center=true); //the pocket for the dowel         #translate([xray,0,9.5])cylinder(h=10,d=4.1,center=true); // ythe screw shank hole         translate([-22.5,-22.5,-51])cube(45); // clip off the bottom at the build plate         #screwhead(); // and make room for the bugle headed  screws head     } } module screwhead() {     translate([xray,0,12.6])difference()     {         cylinder(h=3.51,d=8.85,center=true);// top of form for outside skirt, arg 1         for(i=[0:4:359]) // arg2 of difference()         { rotate([0,0,i])translate([4.7,0,-2.7])rotate([90,0,0])cylinder(h=.4,d=5.9,center=true);         }     } } I now get: handle_knob-6-26.png at the previously posted link. This could be helpful for "seat of the pants" designing. Thought: If the % is to be used, where it should be applied is to the difference() statement in terms of its "scope" so we could see an x-ray of the whole MaryAnn. That IMO would be the ideal use. Maybe change the colors according to the statements order in the difference(). That way, if we see a mistake, the color will tell us which statement in the diff is the guilty one. Thanks Ray, take care & stay well. 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, 1940) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis Genes Web page<http://geneslinuxbox.net:6309/>
F
fxeconomist@yahoo.com
Thu, Jul 21, 2022 10:37 PM

Hi Gene, did you manage to make the screw ? Could you share the code ?

I need a vise screw for my project but what gives me nightmares is the fillet on the screw and its negative in the wall where it has to screw in. It will be probably based on a zillion cylinders rotating slowly in a the ZY plane while advancing on X linearly.

Hi Gene, did you manage to make the screw ? Could you share the code ? I need a vise screw for my project but what gives me nightmares is the fillet on the screw and its negative in the wall where it has to screw in. It will be probably based on a zillion cylinders rotating slowly in a the ZY plane while advancing on X linearly.