I have made a new knob for an oven I am going to use for powder coating,
and am having a problem with minkowski.
There is a dimple on top of the knob created by a 4mm sphere. If I
include this in the minkowski loop, the program won't complete an F5- I
have to call up taskmanager after many hours, to force a quit out of
openscad. If I move just the dimple out of the minkowski loop, it will
F5 in about 3 1/2 minutes. Code is below, I have commented out the
dimple in the minkowski loop and placed it below in a separate difference.
Grateful for any ideas why this simple change makes such a difference.
include <BOSL2/std.scad>
include <BOSL2/threading.scad>
$fn = 128;
minkr=2;
module torus(){
difference()
{
rotate([0,0,0])
translate([0,0,-3])
cylinder(h=8, d=30);
rotate([0,0,0])
translate([0,0,-3])
cylinder(h=8, d=10);
}
}
difference()
{
convexity=10;
minkowski()
{
difference()
{
rotate([0,0,0])
translate([0,0,0])
cylinder(h=24, d=38);
rotate([90,0,0])
translate([-24,24,-25])
cylinder(h=50, d=33);
rotate([90,0,0])
translate([24,24,-25])
cylinder(h=50, d=33);
//cut out the dimple
//rotate([0,0,0])
//translate([0,15,25])
//sphere(d=4);
}
sphere(d=minkr);
}
rotate([0,0,0])
translate([0,0,-1])
cylinder(h=8, d=6);
rotate([0,0,0])
translate([0,0,2])
torus();
//Cut out the dimple
rotate([0,0,0])
translate([0,15,25])
sphere(d=4);
color("red")
rotate([0,0,0])
translate([-1,-6,-1])
cube([2,5,8]);
rotate([0,0,0])
translate([-20,-20,-1])
cube([40,40,2]);
}
color("blue")
rotate([0,0,0])
translate([-3.5,1.5,1])
cube([7,2,8]);
A baby can be defined as an ego with a noise at one end and a smell at the other.
Your job as parents is to teach them to control all three.
My job as a grandad is to tell you how you are doing it all wrong!
G'day Ken,
$fn=128 is going to add a lot of faces to your spheres ... a sphere ends up with $fn^2 points and when you run a minkowski between a sphere and another sphere you end up with $fn^4 point to consider ...
Move the dimple out of the loop and it looks pretty nice I reckon. If you just want to soften the edge of the dimple a bit then rather than using minkowski how about you put a little conical section or two on there (think like valve seats if you know what I mean)
You can also reduce $fn for the little radiuses and just increase it for the big radiuses which will speed stuff up.
(or maybe set $fa and $fs)
-----Nick
On Fri, 21 Jul 2023, at 22:34, Ken wrote:
I have made a new knob for an oven I am going to use for powder coating, and am having a problem with minkowski.
Thanks Nick, I've gone with the "valve seats" (conical section) to
soften the edge of the dimple, it's printing now, will see what it is
like in the morning.
I now understand what you mean about the $fn, I didn't know it
multiplied up in the way you described- no wonder my poor old machine
was having problems!
On 2023-07-21 22:51, Nick Moore wrote:
G'day Ken,
$fn=128 is going to add a lot of faces to your spheres ... a sphere
ends up with $fn^2 points and when you run a minkowski between a
sphere and another sphere you end up with $fn^4 point to consider ...
Move the dimple out of the loop and it looks pretty nice I reckon. If
you just want to soften the edge of the dimple a bit then rather than
using minkowski how about you put a little conical section or two on
there (think like valve seats if you know what I mean)
You can also reduce $fn for the little radiuses and just increase it
for the big radiuses which will speed stuff up.
(or maybe set $fa and $fs)
-----Nick
On Fri, 21 Jul 2023, at 22:34, Ken wrote:
I have made a new knob for an oven I am going to use for powder
coating, and am having a problem with minkowski.
OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org
A baby can be defined as an ego with a noise at one end and a smell at the other.
Your job as parents is to teach them to control all three.
My job as a grandad is to tell you how you are doing it all wrong!
yeah openscad spheres aren't great as they have a lot of facets near the poles, a geodesic sphere would be nicer. it's been discussed a few times I'm sure and it's currently https://github.com/openscad/openscad/issues/1428
minkowski kinda puts a copy of Shape B at every point of Shape A (or vice versa, same thing) and so the number of points it has to consider is the number of points in A * the number of points in B. It gets rid of most of those points of course but it has to consider them first, so it gets very slow especially if both shapes have a lot of vertexes.
cheers, good luck with your new knob :-)
Pretty much, don’t ever set $fn at the top level. It will do the wrong thing. Use $fn only on specific calls when you want to generate a regular polygon. Roughly, $fa controls large circles and $fs controls small circles. Set $fa and $fs instead. $fa=2 and $fs=0.5 should be good for most things. Larger values will make things faster but may cause perceptible artifacts when printing.
And minkowski() is slow at the best of times.
Jordan:
Are the default values for $fa and $fs the same as you specify below?
Jon
On 7/30/2023 12:05 AM, Jordan Brown wrote:
Pretty much, don’t ever set $fn at the top level. It will do the wrong thing. Use $fn only on specific calls when you want to generate a regular polygon. Roughly, $fa controls large circles and $fs controls small circles. Set $fa and $fs instead. $fa=2 and $fs=0.5 should be good for most things. Larger values will make things faster but may cause perceptible artifacts when printing.
And minkowski() is slow at the best of times.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
echo($fa=$fa, $fn=$fn, $fs=$fs);
Compiling design (CSG Tree generation)...ECHO: $fa = ... why not try it
your self ? ;-)
On Sun, 30 Jul 2023 at 13:57, jon jon@jonbondy.com wrote:
Jordan:
Are the default values for $fa and $fs the same as you specify below?
Jon
On 7/30/2023 12:05 AM, Jordan Brown wrote:
Pretty much, don’t ever set $fn at the top level. It will do the wrong
thing. Use $fn only on specific calls when you want to generate a regular
polygon. Roughly, $fa controls large circles and $fs controls small
circles. Set $fa and $fs instead. $fa=2 and $fs=0.5 should be good for
most things. Larger values will make things faster but may cause
perceptible artifacts when printing.
And minkowski() is slow at the best of times.
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
I model a lot of electronic components. Some are through hole parts that
are dipped in the insulation material such ceramic capacitors and varistors.
[image: image.png]
They would look a lot more realistic with Minkowski rounding of just a
cylinder and the wires I think but it would need to be about 1000 times
faster to be practical. Otherwise it would be a difficult modelling problem
as it is sort of a minimum energy stretched surface as is anything that is
shrink wrapped like a battery pack made of cells. I don't have the time to
model something like that as a mesh and it would probably be slow as well.
On Sun, 30 Jul 2023 at 13:02, Michael Möller private2michael@gmail.com
wrote:
echo($fa=$fa, $fn=$fn, $fs=$fs);
Compiling design (CSG Tree generation)...ECHO: $fa = ... why not try it
your self ? ;-)
On Sun, 30 Jul 2023 at 13:57, jon jon@jonbondy.com wrote:
Jordan:
Are the default values for $fa and $fs the same as you specify below?
Jon
On 7/30/2023 12:05 AM, Jordan Brown wrote:
Pretty much, don’t ever set $fn at the top level. It will do the wrong
thing. Use $fn only on specific calls when you want to generate a regular
polygon. Roughly, $fa controls large circles and $fs controls small
circles. Set $fa and $fs instead. $fa=2 and $fs=0.5 should be good for
most things. Larger values will make things faster but may cause
perceptible artifacts when printing.
And minkowski() is slow at the best of times.
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
I get 12, 0, 2 using your code
If the best default values would be 2, 0, 0.5, then why are the default
values other than those recommended?
Can this be changed?
Jon
On 7/30/2023 8:02 AM, Michael Möller wrote:
echo($fa=$fa, $fn=$fn, $fs=$fs);
Compiling design (CSG Tree generation)...ECHO: $fa = ... why not try
it your self ? ;-)
On Sun, 30 Jul 2023 at 13:57, jon jon@jonbondy.com wrote:
Jordan:
Are the default values for $fa and $fs the same as you specify below?
Jon
On 7/30/2023 12:05 AM, Jordan Brown wrote:
Pretty much, don’t ever set $fn at the top level. It will do the
wrong thing. Use $fn only on specific calls when you want to
generate a regular polygon. Roughly, $fa controls large circles
and $fs controls small circles. Set $fa and $fs instead. $fa=2
and $fs=0.5 should be good for most things. Larger values will
make things faster but may cause perceptible artifacts when printing.
And minkowski() is slow at the best of times.
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 todiscuss-leave@lists.openscad.org
On Sun, Jul 30, 2023 at 09:27:21AM -0400, jon wrote:
I get 12, 0, 2 using your code
If the best default values would be 2, 0, 0.5, then why are the default
values other than those recommended?
Those were fine for 3D printers and computers "a long time ago".
Can this be changed?
No. You can't go and change such a default. You can always set it to
what you think is good-for-you.
For example... I have a design where I need a bunch of 3mm holes. In
one place, I forgot to set the quality $fxxx parameters and I get a
pentagon for a 3mm hole. I converted the design to real-world hardware
like that and.... Turns out that the pentagon is great for allowing a
3mm machine screw to self-tap and stay in place while assembling. So
if you'd change the default "circle quality" on me, I'd be upset
because you changed my design with a software upgrade.
Roger.
Jon
On 7/30/2023 8:02 AM, Michael Möller wrote:
echo($fa=$fa, $fn=$fn, $fs=$fs);
Compiling design (CSG Tree generation)...ECHO: $fa = ... why not try it
your self ? ;-)
On Sun, 30 Jul 2023 at 13:57, jon jon@jonbondy.com wrote:
Jordan:
Are the default values for $fa and $fs the same as you specify below?
Jon
On 7/30/2023 12:05 AM, Jordan Brown wrote:
Pretty much, don’t ever set $fn at the top level. It will do the
wrong thing. Use $fn only on specific calls when you want to
generate a regular polygon. Roughly, $fa controls large circles
and $fs controls small circles. Set $fa and $fs instead. $fa=2
and $fs=0.5 should be good for most things. Larger values will
make things faster but may cause perceptible artifacts when printing.
And minkowski() is slow at the best of times.
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 todiscuss-leave@lists.openscad.org
--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 **
f equals m times a. When your f is steady, and your m is going down
your a is going up. -- Chris Hadfield about flying up the space shuttle.