[OpenSCAD] Why is this so heavy to OpenScad - PART 2?

nop head nop.head at gmail.com
Sat Nov 16 09:16:12 EST 2019


It doesn't take any time on my laptop.

Parsing design (AST generation)...

Saved backup file:
C:/Users/ChrisP/Documents/OpenSCAD/backups/unsaved-backup-qvcmuRXl.scad

Compiling design (CSG Tree generation)...

Compiling design (CSG Products generation)...

Geometries in cache: 11

Geometry cache size in bytes: 707384

CGAL Polyhedrons in cache: 0

CGAL cache size in bytes: 0

Compiling design (CSG Products normalization)...

Normalized CSG tree has 1 elements

Compile and preview finished.

*Total rendering time: 0 hours, 0 minutes, 0 seconds*


Parsing design (AST generation)...

Saved backup file:
C:/Users/ChrisP/Documents/OpenSCAD/backups/unsaved-backup-qvcmuRXl.scad

Compiling design (CSG Tree generation)...

Rendering Polygon Mesh using CGAL...

Geometries in cache: 12

Geometry cache size in bytes: 774640

CGAL Polyhedrons in cache: 0

CGAL cache size in bytes: 0

*Total rendering time: 0 hours, 0 minutes, 0 seconds*

Top level object is a 3D object:

Facets: 932

Rendering finished.

On Sat, 16 Nov 2019 at 13:25, MVAckel via Discuss <
discuss at lists.openscad.org> wrote:

> After solving the roundedBox() slow performance problem with the
> roundedCube() module, I'd tried to go  one step further, making a
> roundedCube with 2 radii (and it's more general than the one radius
> version).
>
> The problem here is that the hull in roundedCylinder() is also very slow,
> making roundedCube2R() taking almost 9 seconds to preview.
>
> Does anybody can suggest a faster approach?
>
>
>
>
> //roundedCylinder(r=20, ra=4, h=50);
> roundedCube2R([50,50,50], r1=10, r2=8, center=true);
>
>
> module roundedCube2R(size, r1, r2, center=true) {
>         s = is_list(size) ? size : [size,size,size];
>         translate(center ? -s/2 : [0,0,0]) {
>                         hull() {
>                                 translate([     r1,     r1])
> roundedCylinder(r=r1, ra=r2, h=s[2]);
>                                 translate([     r1,s[1]-r1])
> roundedCylinder(r=r1, ra=r2, h=s[2]);
>                                 translate([s[0]-r1,     r1])
> roundedCylinder(r=r1, ra=r2, h=s[2]);
>                                 translate([s[0]-r1,s[1]-r1])
> roundedCylinder(r=r1, ra=r2, h=s[2]);
>                         }
>         }
> }
>
> //--------------------------------------------------------------------------
>
> module roundedCylinder(r, ra, h) {
>         hull() {
>                 translate([0,0,ra])   rotate_extrude(convexity = 10)
> translate([r, 0, 0])
> circle(r = ra);
>                 translate([0,0,h-ra]) rotate_extrude(convexity = 10)
> translate([r, 0, 0])
> circle(r = ra);
>         }
> }
>
> //--------------------------------------------------------------------------
>
>
>
>
>
>
>
> --
> Sent from: http://forum.openscad.org/
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss at lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20191116/a3d6165e/attachment.html>


More information about the Discuss mailing list