Nabble removed Mailing-list integration from the Forum.
This killed the Forum. This is now an ARCHIVE.
It is likely Nabble will shutdown in the future.

# Bug while rendering a recursive construction Classic List Threaded 8 messages Open this post in threaded view
|

## Bug while rendering a recursive construction

 This post was updated on . CONTENTS DELETED The author has deleted this message.
Open this post in threaded view
|

## Re: Bug while rendering a recursive construction

 Your polyhedron is partially inside out. Use F12 to check for purple triangles. Another problem might be singularities where the polyhedrons meet. I used a scale(1.01) as workaround This code works: ```a= 10; SOMMETS = [ [0,0,a/sqrt(2)], [a/sqrt(2),0,0], [0,a/sqrt(2),0], [-a/sqrt(2),0,0], [0,-a/sqrt(2),0], [0,0,-a/sqrt(2)] ]; module octa() { scale(1.01) polyhedron( points = SOMMETS, faces = [ [1,0,2], [2,0,3], [3,0,4], [4,0,1], [5,1,2], [5,2,3], [5,3,4], [5,4,1] ] ); } module fractale(n) { if ( n == 0 ) { octa(); } else { for (point = SOMMETS) { fractale(n-1); translate(pow(2, n - 1)*[a/sqrt(2),a/sqrt(2),0]) fractale(n-1); translate(pow(2, n - 1)*[0,2*a/sqrt(2),0]) fractale(n-1); translate(pow(2, n - 1)*[-a/sqrt(2),a/sqrt(2),0]) fractale(n-1); // top translate(pow(2, n - 1)*[0,a/sqrt(2),a/sqrt(2)]) fractale(n-1); // bottom translate(pow(2, n - 1)*[0,a/sqrt(2),-a/sqrt(2)]) fractale(n-1); } } } fractale(2); ```
Open this post in threaded view
|

## Re: Bug while rendering a recursive construction

 Great, thank you very much, I'm still getting screwed with the faces... Thanks!
Open this post in threaded view
|

## Re: Bug while rendering a recursive construction

 In reply to this post by Parkinbot The STL file needs to be repaired after pressing F7. And the repair in 3D Builder removes "holes" in the fractal, that's not right. The problem persists with "scale(1.xx)", I ask you again for help... Thanks
Open this post in threaded view
|

## Re: Bug while rendering a recursive construction

 Did you use my code? It defines the polyhedrons correctly and should let you export the stl (f7) after f6.
Open this post in threaded view
|

## Re: Bug while rendering a recursive construction

 Yes. No problem detected in OpenSCAD. But : OK, I had a quick check on your code and found out that there are even more singularities. I guess, because your polygon contains the origin, which is not affected by scale. After adding some small x-translations at least my slicer didn't complain any more. ```a= 10; SOMMETS = [ [0,0,a/sqrt(2)], [a/sqrt(2),0,0], [0,a/sqrt(2),0], [-a/sqrt(2),0,0], [0,-a/sqrt(2),0], [0,0,-a/sqrt(2)] ]; module octa() { scale(1.01) polyhedron( points = SOMMETS, faces = [ [1,0,2], [2,0,3], [3,0,4], [4,0,1], [5,1,2], [5,2,3], [5,3,4], [5,4,1] ] ); } module fractale(n) { if ( n == 0 ) { octa(); } else { for (point = SOMMETS) { fractale(n-1); translate(pow(2, n - 1)*[a/sqrt(2),a/sqrt(2),0]) fractale(n-1); translate(pow(2, n - 1)*[0.01,2*a/sqrt(2),0]) fractale(n-1); translate(pow(2, n - 1)*[-a/sqrt(2),a/sqrt(2),0]) fractale(n-1); // top translate(pow(2, n - 1)*[0.01,a/sqrt(2),a/sqrt(2)]) fractale(n-1); // bottom translate(pow(2, n - 1)*[0.01,a/sqrt(2),-a/sqrt(2)]) fractale(n-1); } } } fractale(2); ```