# Profiling of hull- and cylinder-based line drawings

15 messages
Open this post in threaded view
|

## Profiling of hull- and cylinder-based line drawings

Open this post in threaded view
|

## Re: Profiling of hull- and cylinder-based line drawings

Open this post in threaded view
|

## Re: Profiling of hull- and cylinder-based line drawings

Open this post in threaded view
|

## Re: Profiling of hull- and cylinder-based line drawings

Open this post in threaded view
|

## Re: Profiling of hull- and cylinder-based line drawings

Open this post in threaded view
|

## Re: Profiling of hull- and cylinder-based line drawings

Open this post in threaded view
|

## Re: Profiling of hull- and cylinder-based line drawings

Open this post in threaded view
|

## Re: Profiling of hull- and cylinder-based line drawings

 In reply to this post by runsun Em qui, 10 de jan de 2019 às 18:48, runsun <[hidden email]> escreveu:In average, Line (cylinder-based) is about 3 times faster than Rod (hull-based) in rendering. runsun,Your test code deludes. The cylinder in Line have 8 vertices and the spheres in Rod have 15 vertices. The hull of the two spheres have 20 vertices. To be fair the Line cylinders should be defined with \$fn = 10 and not the default of 4. (alternatively we could hull cubes instead of spheres in Rod.)I have tested your code using fair cylinders (\$fn=10) in Line, Rod as is and a third case where the hull in Rod is dropped. I got the following times with F6:        Rod     Line   Rod w/o hullPT30    15        25       8PT50    30        56      15Should we conclude that Line is 70% slower than Rod? Certainly not. The (implicit) union deals with distinct objects in those cases and it consumes much more time than the hull. To evaluate the hulling time we have to discard the union and go to the preview.With F5, we have a very different framework and a new test is needed. In Rod, I preceded the hull() with render(). And used the following test code:N = 2000;seed = 181;rnd = rands(-3,3,3*N, seed);pts = [ for(i=[0:N-1])           [ rnd[3*i], rnd[3*i+1], rnd[3*i+2] ] ];//Rod(pts);//Line(pts);I have found out the following times with F5:  N        Rod     Line1000        7        0  2000       15        0  4000       28        1  As preview uses a fake union, the Rod times express essentially the hulling time. And, yes, it is much greater than the time to preview cylinders. The hull() operation in Rod spends 7ms per rod. And we may conclude that Rod with F6 spends around 350ms with the hull of pts50 and 30sec with their union, confirming what nophead has said. _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|

## Re: Profiling of hull- and cylinder-based line drawings

Open this post in threaded view
|

## Re: Profiling of hull- and cylinder-based line drawings

Open this post in threaded view
|

## Re: Profiling of hull- and cylinder-based line drawings

 Ronaldo wrote > An implicit union is present in both codes of Line and Rod. Under F6, as > the union process time is much greater than the hull, it is irrelevant if > you make the sticks with cylinders or hulling spheres. That makes sense. Thx. ----- \$  Runsun Pan, PhD \$ libs: scadx , doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), editor of choice: CudaText  ( OpenSCAD lexer ); \$ Tips ; \$ Snippets -- Sent from: http://forum.openscad.org/_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org \$ Runsun Pan, PhD \$ libs: scadx, doctest, faces(git), offline doc(git), runscad.py(2,git), editor of choice: CudaText ( OpenSCAD lexer); \$ Tips; \$ Snippets
Open this post in threaded view
|

## Re: Profiling of hull- and cylinder-based line drawings

Open this post in threaded view
|

## Re: Profiling of hull- and cylinder-based line drawings

Open this post in threaded view
|

## Re: Profiling of hull- and cylinder-based line drawings

Open this post in threaded view
|