Rendering fails (difference between F5 and F6)

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

Re: Rendering fails (difference between F5 and F6)

Parkinbot
kintel wrote
Yes, the Steiner point insertion is a bit automagic. Not sure I would call it unexpected though - the screenshot you posted is dominated by effects of polygon tessellation. Since we cannot represent non-planar polygons like that, we have to make a tessellation discussion. The actual Steiner point insertion kind of makes sense. Ideas are welcome.
I wouldn't say it makes sense in this specific situation, as Steiner points are mainly meant for mesh repair purposes in odd non-planar situations like z-fighting. Modelling the same thing using hull() gives exactly the expected behavior - unpaired triangles.

  hull()
  {
    cylinder($fn=6,r=50);
    translate([0, 0, 70])
    cylinder($fn=8,r=50);
  }


and here: left is hull, right is Steiner point. What would you expect?



or look at this:
r=50;
height=140;
layers = 2;
  skin([for (i=[0:layers-1])
        transform(translation([150,0,i*height/layers]) *
  rotation([0,0,-0*i]),
  i==0?circle($fn=6+47*i,r=r): [[0,0], [0,10]]) ]);


So, if I wanted Steiner point semantics, I could refine the 2D-shape in principle myself. But if skin() does Steiner point semantics unwantedly, I don't have any means to prevent it.
One could offer Steiner point semantics as a flavor by adding a mode attribute, but I guess this is not necessary, as the Steiner regularization used by skin() is easily done by a an own function (and in a more problem specific manner) when preparing the dataset.

kintel wrote
Parkinbot wrote
> And an immediate feature request would be: adding furcations like a
> bifurcation and an inverse (anastomosis) to it.
That would be cool - perhaps something to leave for the future.
As always, if we can prototype partial functionality in user-space, that would help understand it.
If there are missing features in the OpenSCAD language which makes this hard, we could address that in a separate project.
I'll do the job and implement it in a more generic (=inefficient) way and on the basis of my sweep() - as it is already on my todo list.

What makes it hard? Implementing matrix related stuff in OpenSCAD is so painful - especially if you're committed more to imperative programming. Think about an NxMxL matrix A and you want to alter some value, say A[10] [101][100]. In OpenSCAD you have to go through three loops, get thousands of copies of copies ...
See e.g. also the fibonacci discussion in the thingiverse OpenSCAD group which is kind of absurd, as fibonacci is a recursive problem. But runtime is runtime.

- Rudolf -
Reply | Threaded
Open this post in threaded view
|

Re: Rendering fails (difference between F5 and F6)

Parkinbot
I've done a fast implementation of a bifurcation on the basis of skin() and the proposed representation scheme. It showed me, that there is no "natural" semantics in implementing it.
There is a root part, child parts and a connector. The connector is the salt in the soup. I think it needs either some problem specific treatment or if it is generated automatically at least some interpolation scheme like B-spline to provide a good approximation of the transition. The stuff can (and should) be put into library first, to see how it works. This will take time.

use <scad-utils/transformations.scad>
use <skin.scad>
use <naca4.scad>  // http://www.thingiverse.com/thing:898554

a = af(120, 100, 0, 0);
b = af(100, 100, 0, 10);
c1 = af(50, 50, 0, 20);
c2 = af(35, 50, 55, 20);
d1 = af(30, 50, 10, 30);
d2 = af(30, 50, 60, 30);

skin_furc([a, b, [c1, c2], [d1, d2]]);

// create and place airfoil shape
function af(L, N, x, z) = transform(translation([x, 0, z]),
   airfoil_data(naca = 1412, N=N, L=L));

// consumes [..., [X], [[x], [y]], ...]
module skin_furc(C)
{
  i = find_furc(C);
  if(i)
    {
      S=split(C, i+1);
      adapter = [S[0][i], furc(S[2][0], S[1][0])];
      skin(S[0]);  
      skin(adapter);
      skin(S[1]);  
      skin(S[2]);  
    }
   else
      skin(C);
}

function find_furc(C) =  let (res = [for(i=[0:len(C)-2])
    if(!len(C[i][0][0]) && len(C[i+1][0][0])) i]) res[0];

// calculate furcation adapter
function furc(B, C) =
    let(b0 = floor(len(B)/2))
    let(b1 = len(B)-b0)
    let(c = floor(len(C)))
    [for (i=[0:b0+c+b1-1])
      i<b0?B[i]:
      i<b0+c?C[i-b0]:
      B[i-c]];
</quote>

// split matrix at row n into root and children
function split(M, n) =  
    [
    [for(i=[0:n-1]) M[i]],
    [for(i=[n:len(M)-1]) M[i][0]],
    [for(i=[n:len(M)-1]) M[i][1]]
    ];


- Rudolf -

Reply | Threaded
Open this post in threaded view
|

Re: Rendering fails (difference between F5 and F6)

Johan Jonker
This post was updated on .
In reply to this post by Johan Jonker
Hello everyone,

Maybe interesting to see the first printed results?



I tested the result and the sound is fine!
Only the other part, the bow, has its tone hole on the wrong place. So I have to make a new bow.
I can improve the bow's design in the same way as the bell design.



Thanks for helping!
Johan
Reply | Threaded
Open this post in threaded view
|

Re: Rendering fails (difference between F5 and F6)

Neon22
Brilliant and well done. Looks great :)
Reply | Threaded
Open this post in threaded view
|

Re: Rendering fails (difference between F5 and F6)

dbvanhorn

Wow!  How many parts?

On Dec 19, 2015 9:56 PM, "Neon22" <[hidden email]> wrote:
Brilliant and well done. Looks great :)



--
View this message in context: http://forum.openscad.org/Rendering-fails-difference-between-F5-and-F6-tp15041p15236.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Rendering fails (difference between F5 and F6)

RobWLakes
In reply to this post by Johan Jonker
Really excellent Johan, you have put new life into the instrument.
Inspiring...

Rob

On 20/12/15 03:36, Johan Jonker wrote:

> Hello everyone,
>
> Maybe interesting to see the first printed results?
> <http://forum.openscad.org/file/n15228/WP_20151218_09_54_07_Pro.jpg>
>
>
> I tested the result and the sound is fine!
> Only the other part, the bow, has its tone hole on the wrong place. So I
> have to make a new bow.
> I can improve the bow's design in the same way as the bell desig.
>
> Thanks for helping!
> Johan
>
>
>
> --
> View this message in context: http://forum.openscad.org/Rendering-fails-difference-between-F5-and-F6-tp15041p15228.html
> Sent from the OpenSCAD mailing list archive at Nabble.com.
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Rob W
Lake Tyers Beach,
Victoria, Australia
Reply | Threaded
Open this post in threaded view
|

Re: Rendering fails (difference between F5 and F6)

Johan Jonker
This post was updated on .
In reply to this post by dbvanhorn
Until now I made three parts:
the bow, the key and the bell.
But there are a few more that will folow.
123