discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Compile looks perfect but Render indicates simple no

W
widgetmaker
Sun, Dec 21, 2014 1:38 AM

I've carefully examined all my polygons on "thrown together" and zoomed in as
far as I could to see if there were any gaps or missing polygons, but they
all seem pretty solid and I still can't export the project to STL. As far as
I can tell, only two edges are touching on any given side of a polygon. Is
there a complexity limit?

//KNURL DIMENSIONS (USER-SPECIFIED)
rez = 100;
knurlsides = 1/16;
knurlprotrusion = 1/32;
knurlshigh = 31;
topdiameter = 1.4;
middlediameter =1.275;
bottomdiameter = 1.15;
conelength = 1;
unit=25.4;

//CONVERSION
ks = knurlsidesunit;
kp = knurlprotrusion
unit;
kh = knurlshigh * ks;
tr = topdiameterunit/2;        //to radius
mr = middlediameter
unit/2;  //to radius
br = bottomdiameterunit/2;    //to radius
cl = conelength
unit;
rad=(ks*rez)/PI/2;
opp1=sin(360/rez)rad;
adj1=cos(360/rez)rad;
opp2=sin(360/rez/2)
(rad+kp);
adj2=cos(360/rez/2)
(rad+kp);
opp3=sin(360/rez)*tr;
adj3=cos(360/rez)*tr;
opp4=sin(360/rez)*mr;
adj4=cos(360/rez)*mr;
opp5=sin(360/rez)*br;
adj5=cos(360/rez)*br;

//START OF KNURL CODE
module knob(){
//produces 1 pyramid
module knurl(){
polyhedron(

points=[[rad,0,0],[adj1,opp1,0],[adj1,opp1,ks],[rad,0,ks],[adj2,opp2,ks/2]],
faces=[[0,4,1],[1,4,2],[2,4,3],[3,4,0]]);}

   //produces a "slice" of the cylinder (good tool for viewing a cross

section)
module oneside(){
for(i=[0:(knurlshigh - 1)]){
translate([0,0,ks*i])knurl();}
polyhedron(

	points=[ 
            [rad,0,0],[adj1,opp1,0],       //bottom outside
	[br,0,0],[adj5,opp5,0],         //bottom inside
	[mr,0,cl],[adj4,opp4,cl],       //middle (narrow)
	[tr,0,cl],[adj3,opp3,cl],        //middle (wide)
	[tr,0,kh],[adj3,opp3,kh],      //top inside
	[rad,0,kh],[adj1,opp1,kh],],	//top outside
	
	faces=[
	[0,1,2],[1,3,2],      //bottom
	[2,3,4],[3,5,4],       //bottom inside
	[4,5,6],[5,7,6],       //middle shelf
	[6,7,8],[7,9,8],       //top inside
	[8,9,10],[9,11,10],  //top
	 ]);}

module build(){
	for(i=[1:rez]){
	rotate([0,0,(360/rez)*i])oneside();}
	}
build();

}

knob();

--
View this message in context: http://forum.openscad.org/Compile-looks-perfect-but-Render-indicates-simple-no-tp10675.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

I've carefully examined all my polygons on "thrown together" and zoomed in as far as I could to see if there were any gaps or missing polygons, but they all seem pretty solid and I still can't export the project to STL. As far as I can tell, only two edges are touching on any given side of a polygon. Is there a complexity limit? //KNURL DIMENSIONS (USER-SPECIFIED) rez = 100; knurlsides = 1/16; knurlprotrusion = 1/32; knurlshigh = 31; topdiameter = 1.4; middlediameter =1.275; bottomdiameter = 1.15; conelength = 1; unit=25.4; //CONVERSION ks = knurlsides*unit; kp = knurlprotrusion*unit; kh = knurlshigh * ks; tr = topdiameter*unit/2; //to radius mr = middlediameter*unit/2; //to radius br = bottomdiameter*unit/2; //to radius cl = conelength*unit; rad=(ks*rez)/PI/2; opp1=sin(360/rez)*rad; adj1=cos(360/rez)*rad; opp2=sin(360/rez/2)*(rad+kp); adj2=cos(360/rez/2)*(rad+kp); opp3=sin(360/rez)*tr; adj3=cos(360/rez)*tr; opp4=sin(360/rez)*mr; adj4=cos(360/rez)*mr; opp5=sin(360/rez)*br; adj5=cos(360/rez)*br; //START OF KNURL CODE module knob(){ //produces 1 pyramid module knurl(){ polyhedron( points=[[rad,0,0],[adj1,opp1,0],[adj1,opp1,ks],[rad,0,ks],[adj2,opp2,ks/2]], faces=[[0,4,1],[1,4,2],[2,4,3],[3,4,0]]);} //produces a "slice" of the cylinder (good tool for viewing a cross section) module oneside(){ for(i=[0:(knurlshigh - 1)]){ translate([0,0,ks*i])knurl();} polyhedron( points=[ [rad,0,0],[adj1,opp1,0], //bottom outside [br,0,0],[adj5,opp5,0], //bottom inside [mr,0,cl],[adj4,opp4,cl], //middle (narrow) [tr,0,cl],[adj3,opp3,cl], //middle (wide) [tr,0,kh],[adj3,opp3,kh], //top inside [rad,0,kh],[adj1,opp1,kh],], //top outside faces=[ [0,1,2],[1,3,2], //bottom [2,3,4],[3,5,4], //bottom inside [4,5,6],[5,7,6], //middle shelf [6,7,8],[7,9,8], //top inside [8,9,10],[9,11,10], //top ]);} module build(){ for(i=[1:rez]){ rotate([0,0,(360/rez)*i])oneside();} } build(); } knob(); -- View this message in context: http://forum.openscad.org/Compile-looks-perfect-but-Render-indicates-simple-no-tp10675.html Sent from the OpenSCAD mailing list archive at Nabble.com.
TP
Torsten Paul
Sun, Dec 21, 2014 1:47 AM

On 12/21/2014 02:38 AM, widgetmaker wrote:

I've carefully examined all my polygons on "thrown together" and zoomed in as
far as I could to see if there were any gaps or missing polygons, but they
all seem pretty solid and I still can't export the project to STL. As far as
I can tell, only two edges are touching on any given side of a polygon. Is
there a complexity limit?

Looking at the STL in blender shows a large amount of non-manifold edges.
I'm not yet sure where those are coming from.

ciao,
Torsten.

On 12/21/2014 02:38 AM, widgetmaker wrote: > I've carefully examined all my polygons on "thrown together" and zoomed in as > far as I could to see if there were any gaps or missing polygons, but they > all seem pretty solid and I still can't export the project to STL. As far as > I can tell, only two edges are touching on any given side of a polygon. Is > there a complexity limit? > Looking at the STL in blender shows a large amount of non-manifold edges. I'm not yet sure where those are coming from. ciao, Torsten.
NH
nop head
Sun, Dec 21, 2014 7:10 PM

I think the reason it doesn't work is the polyhedrons have missing faces,
so are not manifold, so not a valid objects for CSG ops, the implicit union
in this case.

I think if you close them so they are actually polyhedrons it will work.

On 21 December 2014 at 01:47, Torsten Paul Torsten.Paul@gmx.de wrote:

On 12/21/2014 02:38 AM, widgetmaker wrote:

I've carefully examined all my polygons on "thrown together" and zoomed
in as
far as I could to see if there were any gaps or missing polygons, but they
all seem pretty solid and I still can't export the project to STL. As far
as
I can tell, only two edges are touching on any given side of a polygon. Is
there a complexity limit?

Looking at the STL in blender shows a large amount of non-manifold edges.

I'm not yet sure where those are coming from.

ciao,
Torsten.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

I think the reason it doesn't work is the polyhedrons have missing faces, so are not manifold, so not a valid objects for CSG ops, the implicit union in this case. I think if you close them so they are actually polyhedrons it will work. On 21 December 2014 at 01:47, Torsten Paul <Torsten.Paul@gmx.de> wrote: > On 12/21/2014 02:38 AM, widgetmaker wrote: > >> I've carefully examined all my polygons on "thrown together" and zoomed >> in as >> far as I could to see if there were any gaps or missing polygons, but they >> all seem pretty solid and I still can't export the project to STL. As far >> as >> I can tell, only two edges are touching on any given side of a polygon. Is >> there a complexity limit? >> >> Looking at the STL in blender shows a large amount of non-manifold edges. > I'm not yet sure where those are coming from. > > ciao, > Torsten. > > > > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
W
widgetmaker
Wed, Dec 24, 2014 11:04 PM

I closed the pyramid polygon, then completely closed the "pie slice" and that
appears to have fixed the issue. Apparently you can't make a watertight
object from open polyhedrons, no matter how precisely their edges meet.

--
View this message in context: http://forum.openscad.org/Compile-looks-perfect-but-Render-indicates-simple-no-tp10675p10717.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

I closed the pyramid polygon, then completely closed the "pie slice" and that appears to have fixed the issue. Apparently you can't make a watertight object from open polyhedrons, no matter how precisely their edges meet. -- View this message in context: http://forum.openscad.org/Compile-looks-perfect-but-Render-indicates-simple-no-tp10675p10717.html Sent from the OpenSCAD mailing list archive at Nabble.com.