messureing tools

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

messureing tools

Kevig1

Hi there,

 

I am very impressed by this program, my complements!

I am a relative new Openscad user, so it is possible I’m  adding (very) old topic’s.

If so please direct me to the past topic’s.

 

-          Is it possible to add a ruler?
I mean something like putting a cross on one point in the construction
à put a second point in the drawing and the distance will be given between the points.
Especially with complex constructions I’m calculating like crazy and me being a bad math-man It’s now trial and error.

-          Is it possible to add a curve function?
In powerpoint under drawing is such a function. Just add a couple of points and the program draws a curved line inbetween.

-          Is it possible to expand the basic shapes with i.e. Triangle’s, trapezium, ed.

-          A bug or bad programming ?
To create the tooth of a gearwheel I used a polygon
àminkowski to round the edges à linear extrude to get the desired depth à translate /rotate to position it on the outside radius à for/next the desired number of tooth à and finally add a cylinder to fill up the middle part.
If I do this F6 takes about 90 minutes or my computer crashes.
If I start with the center cylinder and build the tooth around it takes about 20-30 min.
(btw. if ready it will be a module, compatible with normal standards, which can be called with gear(number_of_tooth, modulus, thickness, twist), which I will share)

-          CPU load
When I hit the F6, openscad uses about 12-16 % of the CPU, but especially with complex, repetitive  calculations the rendering takes a long time.
am I doing something wrong?

 

Regards

 

Henk

Reply | Threaded
Open this post in threaded view
|

Re: messureing tools

Triffid Hunter
On Sat, Dec 31, 2011 at 7:42 PM, Kevig1 <[hidden email]> wrote:
> -          Is it possible to add a curve function?
> In powerpoint under drawing is such a function. Just add a couple of points
> and the program draws a curved line inbetween.

already a suite of bezier curve libraries for openscad on thingiverse.

> -          Is it possible to expand the basic shapes with i.e. Triangle’s,
> trapezium, ed.

sure, write some modules, include when necessary.

> -          A bug or bad programming ?
> To create the tooth of a gearwheel I used a polygon àminkowski to round the
> edges à linear extrude to get the desired depth à translate /rotate to
> position it on the outside radius à for/next the desired number of tooth à
> and finally add a cylinder to fill up the middle part.
> If I do this F6 takes about 90 minutes or my computer crashes.
> If I start with the center cylinder and build the tooth around it takes
> about 20-30 min.
> (btw. if ready it will be a module, compatible with normal standards, which
> can be called with gear(number_of_tooth, modulus, thickness, twist), which I
> will share)

MCAD already has a very comprehensive involute and bevel gear script. use that.

> -          CPU load
> When I hit the F6, openscad uses about 12-16 % of the CPU, but especially
> with complex, repetitive  calculations the rendering takes a long time.
> am I doing something wrong?

no, it just takes a long time to join lots of things together.

Sometimes you can design your objects differently so it's quicker, and
sprinkling render() statements around can make it pre-cache stuff for
both faster drawing and quicker final compilation at the expense of
taking a long time the first time you F5 (and every time thereafter
when you change a child of the render() element)

Reply | Threaded
Open this post in threaded view
|

Re: messureing tools

Kevig1

Thks for the fast reply

I will certanly look into the bezier thing.

 

About the gear part, almost all libraries i found are not compatible with the standard mudulus gears, but i'm still looking further.

I just found the”Parametric Involute Bevel and Spur Gears by GregFrost”, which looks very  promesing, but still misses the mudules.

 

But, more important, the point was that the order in which the steps where decreased the rendering speed about 66% and caused crashes.

I put the wrong and the wright code below:

 

Wrong: (causes crashes, redering 90 min)

                union(){

                               cylinder(r=M*(St-1.1),h=D,$fn=reso,center=true);

                               for(z=[0:360/T:360]){

                                               rotate([0,0,z]) translate([-St,0,0]) linear_extrude(height = D,twist=Tw, center = true,$fn=reso) minkowski(){

                                                              

                                                               polygon(points=[

                                                                                              [M*0.9,M*0.49],

                                                                                              [-(M*1),M*0.15],

                                                                                              [-(M*1),-(M*0.15)],

                                                                                              [M*0.9,-(M*0.49)],

                                                                                              [M*1.4,-(M*1.46)],

                                                                                              [M*1.4,M*1.46]],

                                                               paths=[[0,1,2,3,4,5]]);

circle(r=M*0.4,$fn=reso,center=true);

 

right: (no crashes, rendering time 30 min)

                union(){

                               cylinder(r=M*(St-1.1),h=D,$fn=reso,center=true);

                               for(z=[0:360/T:360]){

                                               rotate([0,0,z]) translate([-St,0,0]) linear_extrude(height = D,twist=Tw, center = true,$fn=reso) minkowski(){

                                                               circle(r=M*0.4,$fn=reso,center=true);

                                                               polygon(points=[

                                                                                              [M*0.9,M*0.49],

                                                                                              [-(M*1),M*0.15],

                                                                                              [-(M*1),-(M*0.15)],

                                                                                              [M*0.9,-(M*0.49)],

                                                                                              [M*1.4,-(M*1.46)],

                                                                                              [M*1.4,M*1.46]],

                                                               paths=[[0,1,2,3,4,5]]);

 

It just suprised me, so i thought lets share!

 

Another question:

Will the $fn parameter have effect on a exported STL file?

 

Regards

Henk

 

 

-----Oorspronkelijk bericht-----
Van: [hidden email] [mailto:[hidden email]] Namens Triffid Hunter
Verzonden: zaterdag 31 december 2011 9:48
Aan: [hidden email]
Onderwerp: Re: [OpenSCAD] messureing tools

 

On Sat, Dec 31, 2011 at 7:42 PM, Kevig1 <[hidden email]> wrote:

> -          Is it possible to add a curve function?

> In powerpoint under drawing is such a function. Just add a couple of

> points and the program draws a curved line inbetween.

 

already a suite of bezier curve libraries for openscad on thingiverse.

 

> -          Is it possible to expand the basic shapes with i.e.

> Triangle’s, trapezium, ed.

 

sure, write some modules, include when necessary.

 

> -          A bug or bad programming ?

> To create the tooth of a gearwheel I used a polygon àminkowski to

> round the edges à linear extrude to get the desired depth à translate

> /rotate to position it on the outside radius à for/next the desired

> number of tooth à and finally add a cylinder to fill up the middle part.

> If I do this F6 takes about 90 minutes or my computer crashes.

> If I start with the center cylinder and build the tooth around it

> takes about 20-30 min.

> (btw. if ready it will be a module, compatible with normal standards,

> which can be called with gear(number_of_tooth, modulus, thickness,

> twist), which I will share)

 

MCAD already has a very comprehensive involute and bevel gear script. use that.

 

> -          CPU load

> When I hit the F6, openscad uses about 12-16 % of the CPU, but

> especially with complex, repetitive  calculations the rendering takes a long time.

> am I doing something wrong?

 

no, it just takes a long time to join lots of things together.

 

Sometimes you can design your objects differently so it's quicker, and sprinkling render() statements around can make it pre-cache stuff for both faster drawing and quicker final compilation at the expense of taking a long time the first time you F5 (and every time thereafter when you change a child of the render() element) _______________________________________________

OpenSCAD mailing list

[hidden email]

http://rocklinux.net/mailman/listinfo/openscad

Reply | Threaded
Open this post in threaded view
|

Re: messureing tools

Triffid Hunter
On Sun, Jan 1, 2012 at 12:56 AM, Kevig1 <[hidden email]> wrote:
> Wrong: (causes crashes, redering 90 min)
> right: (no crashes, rendering time 30 min)

is it just me, or does your "wrong" code take a gear and minkowski it
around the circle, rather than taking a circle and minkowski-ing it
around a gear? I know which one I could do more quickly

Reply | Threaded
Open this post in threaded view
|

Re: messureing tools

Kevig1
almost correct.
the "wrong"  code creates the shape of a thoot, put it in a circle and finally fils the hole in the middle with a cylinder
the "right" code starts with a cylinderand than put the thoot around it.

> Date: Mon, 2 Jan 2012 11:10:45 +1100

> From: [hidden email]
> To: [hidden email]
> Subject: Re: [OpenSCAD] messureing tools
>
> On Sun, Jan 1, 2012 at 12:56 AM, Kevig1 <[hidden email]> wrote:
> > Wrong: (causes crashes, redering 90 min)
> > right: (no crashes, rendering time 30 min)
>
> is it just me, or does your "wrong" code take a gear and minkowski it
> around the circle, rather than taking a circle and minkowski-ing it
> around a gear? I know which one I could do more quickly
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad