discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Display but on't render

C
Ca-Phil
Fri, Jun 19, 2015 5:45 PM

My first post.  I tried IRC, but couldn't find anyone, or I was in the wrong
place.

Anyway, I've been working on my first polyhedron for a bit now.  I got it
just like I wanted it, and everything displays fine.  However, when I tried
to render, the polyhedrons just disappear.  There is no message in the
console.  All my triangles appear correct when I View->show edges.  I was
hoping that someone might tell me how to go about troubleshooting this.  I'm
not sure where to look for debug information.

Here is my complete code, but the fins are what is causing the problem.

Thanks.

-----code------------
/////////////////////////////////
//    Global Variables
/////////////////////////////////

insert_x = 24 ;
insert_y = 5 ;
insert_z = 16 ;

shell_thickness = 1.2 ;

ext_fins = 5 ;
ext_fin_thickness = .7 ;

vent_angle = 50 ;

//////////////////////////////////
//      Renders
//////////////////////////////////

*difference(){
union(){
// Main cube
cube([insert_x, insert_y, insert_z]);

    // Slant front wall
    rotate([vent_angle, 0, 0]){
        union(){
            cube([insert_x, shell_thickness, insert_z * 0.8]);
        }    
    }
}

union(){
    translate([shell_thickness, -0.1, shell_thickness]){
        cube([insert_x - (2 * shell_thickness), insert_y + 0.2, insert_z
  • (2 * shell_thickness)]);
    }
    }
    }

// Fins
tuning = 0.34;
spacing = ((insert_x +(ext_fins * ext_fin_thickness)) / (ext_fins)) +
tuning;
for (i = [0 : (ext_fins - 1)]){
translate([spacing * i, 0, 0]){
fin(insert_x, insert_y, insert_z, ext_fin_thickness);
}
}

/////////////////////////////////////
//      Modules
////////////////////////////////////

module fin(x, y, z, thickness){
polyhedron(points = [[0,0,z], [0, y, z], [0, y, 0],[0,0,0], [0,-9, z/2],
[thickness,0,z], [thickness, y, z],
[thickness, y, 0],[thickness,0,0], [thickness,-9, z/2]],
faces =[[0,1,2],[0,2,3], [0,3,4], [5,6,7], [5,7,8], [5,8,9], [0,1,5],
[1,5,6], [1,6,2], [6,7,2], [2,7,8], [2,8,3],
[3,8,9], [3,4,9], [0,5,4], [5,9,4]]);

}

--
View this message in context: http://forum.openscad.org/Display-but-on-t-render-tp12921.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

My first post. I tried IRC, but couldn't find anyone, or I was in the wrong place. Anyway, I've been working on my first polyhedron for a bit now. I got it just like I wanted it, and everything displays fine. However, when I tried to render, the polyhedrons just disappear. There is no message in the console. All my triangles appear correct when I View->show edges. I was hoping that someone might tell me how to go about troubleshooting this. I'm not sure where to look for debug information. Here is my complete code, but the fins are what is causing the problem. Thanks. -----code------------ ///////////////////////////////// // Global Variables ///////////////////////////////// insert_x = 24 ; insert_y = 5 ; insert_z = 16 ; shell_thickness = 1.2 ; ext_fins = 5 ; ext_fin_thickness = .7 ; vent_angle = 50 ; ////////////////////////////////// // Renders ////////////////////////////////// *difference(){ union(){ // Main cube cube([insert_x, insert_y, insert_z]); // Slant front wall rotate([vent_angle, 0, 0]){ union(){ cube([insert_x, shell_thickness, insert_z * 0.8]); } } } union(){ translate([shell_thickness, -0.1, shell_thickness]){ cube([insert_x - (2 * shell_thickness), insert_y + 0.2, insert_z - (2 * shell_thickness)]); } } } // Fins tuning = 0.34; spacing = ((insert_x +(ext_fins * ext_fin_thickness)) / (ext_fins)) + tuning; for (i = [0 : (ext_fins - 1)]){ translate([spacing * i, 0, 0]){ fin(insert_x, insert_y, insert_z, ext_fin_thickness); } } ///////////////////////////////////// // Modules //////////////////////////////////// module fin(x, y, z, thickness){ polyhedron(points = [[0,0,z], [0, y, z], [0, y, 0],[0,0,0], [0,-9, z/2], [thickness,0,z], [thickness, y, z], [thickness, y, 0],[thickness,0,0], [thickness,-9, z/2]], faces =[[0,1,2],[0,2,3], [0,3,4], [5,6,7], [5,7,8], [5,8,9], [0,1,5], [1,5,6], [1,6,2], [6,7,2], [2,7,8], [2,8,3], [3,8,9], [3,4,9], [0,5,4], [5,9,4]]); } -- View this message in context: http://forum.openscad.org/Display-but-on-t-render-tp12921.html Sent from the OpenSCAD mailing list archive at Nabble.com.
TP
Torsten Paul
Fri, Jun 19, 2015 5:59 PM

On 06/19/2015 07:45 PM, Ca-Phil wrote:

My first post.  I tried IRC, but couldn't find anyone, or I was in the wrong
place.

Anyway, I've been working on my first polyhedron for a bit now.  I got it
just like I wanted it, and everything displays fine.  However, when I tried
to render, the polyhedrons just disappear.  There is no message in the
console.  All my triangles appear correct when I View->show edges.  I was
hoping that someone might tell me how to go about troubleshooting this.  I'm
not sure where to look for debug information.

Some faces are flipped, you can see that in the "Thrown Together" view
(those show up in pinkish color).

See https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#polyhedron

Here is my complete code, but the fins are what is causing the problem.

Try with:

faces=[[0,2,1],[0,3,2],[0,4,3],[5,6,7],[5,7,8],[5,8,9],[0,1,5],[1,6,5],[1,2,6],[6,2,7],[2,8,7],[2,3,8],[3,9,8],[3,4,9],[5,4,0],[5,9,4]]

ciao,
Torsten.

On 06/19/2015 07:45 PM, Ca-Phil wrote: > My first post. I tried IRC, but couldn't find anyone, or I was in the wrong > place. > It's #openscad @ freenode (http://webchat.freenode.net/?channels=#openscad) > Anyway, I've been working on my first polyhedron for a bit now. I got it > just like I wanted it, and everything displays fine. However, when I tried > to render, the polyhedrons just disappear. There is no message in the > console. All my triangles appear correct when I View->show edges. I was > hoping that someone might tell me how to go about troubleshooting this. I'm > not sure where to look for debug information. > Some faces are flipped, you can see that in the "Thrown Together" view (those show up in pinkish color). See https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#polyhedron > Here is my complete code, but the fins are what is causing the problem. > Try with: faces=[[0,2,1],[0,3,2],[0,4,3],[5,6,7],[5,7,8],[5,8,9],[0,1,5],[1,6,5],[1,2,6],[6,2,7],[2,8,7],[2,3,8],[3,9,8],[3,4,9],[5,4,0],[5,9,4]] ciao, Torsten.
PF
Peter Falke
Fri, Jun 19, 2015 9:34 PM

Maybe  "Thrown Together" view could be renamed to something more
descriptive. Maybe:
polyhedron-check-view

Or is there another use for the "Thrown Together" view that I`m not aware
of?

Maybe "Thrown Together" view could be renamed to something more descriptive. Maybe: polyhedron-check-view Or is there another use for the "Thrown Together" view that I`m not aware of?
M
MichaelAtOz
Fri, Jun 19, 2015 10:09 PM

Peter Falke wrote

Maybe  "Thrown Together" view could be renamed to something more
descriptive. Maybe:
polyhedron-check-view

Or is there another use for the "Thrown Together" view that I`m not aware
of?

I think it would be more useful if it was transparent (a=0.5 say).
ATM it doesn't show internal inverted faces.


Unless specifically shown otherwise above, my contribution is in the Public Domain; To the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. This work is published globally via the internet. :) Inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/

View this message in context: http://forum.openscad.org/Display-but-on-t-render-tp12921p12924.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Peter Falke wrote > Maybe "Thrown Together" view could be renamed to something more > descriptive. Maybe: > polyhedron-check-view > > Or is there another use for the "Thrown Together" view that I`m not aware > of? I think it would be more useful if it was transparent (a=0.5 say). ATM it doesn't show internal inverted faces. ----- Unless specifically shown otherwise above, my contribution is in the Public Domain; To the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. This work is published globally via the internet. :) Inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ -- View this message in context: http://forum.openscad.org/Display-but-on-t-render-tp12921p12924.html Sent from the OpenSCAD mailing list archive at Nabble.com.