again polyhedron inconsistencies...

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

again polyhedron inconsistencies...

bboett
Hello!

i juste noticed that a function that i use that produces a subelement for joinings produces, sometimes, strange print-results, and that indeed the design doesn't seem sound....

this is the relevant part:

trapez(10,5,10,30,2);
  
module trapez(oberbreite, unterbreite, hoehe, tiefe,rand)
{    
 ecken = [
//vorne
    [-unterbreite/2,0,0], [unterbreite/2,0,0], //bodenlinie 0,1
    [oberbreite/2,0,hoehe-rand], [oberbreite/2,0,hoehe], //rechts hoch 2,3
    [-oberbreite/2,0,hoehe], [-oberbreite/2,0,hoehe-rand], //links runter hoch 4,5
     
//hinten
    [-unterbreite/2,tiefe,0], [unterbreite/2,tiefe,0], //bodenlinie 6,7
    [oberbreite/2,tiefe,hoehe-rand], [oberbreite/2,tiefe,hoehe], //rechts hoch 8,9
    [-oberbreite/2,tiefe,hoehe], [-oberbreite/2,tiefe,hoehe-rand], //links runter hoch 10,11
 ];

   flaechen = [
 
     [0,5,4,3,2,1], //vorne
     [0,1,7,6], //unten
     [4,10,9,3], //oben
     [6,7,8,9,10,11], //rueck
     [1,2,8,7], //seite links unten
     [2,3,9,8], //seite links open
     [0,6,11,5], //seite rechts unten
     [5,11,10,4], //seite rechts open
   ];    
   polyhedron(ecken,flaechen);
}  

i saw the lines on the polyhedron, but never got around finding out where they come from, and since in most of my cases the project compiles and checks fine i never asked further, but still, there seem to be some weirdness in there, producing strange holes when printing.... (still when throwing the stuff into a stl corrector, those problems go usually away, would still be more satisfying to produce valid stuff in the first place...)

and when i check this with F12, all the surfaces are ok, but the edges are all purple....

so how do i get rid of the spourious fold lines in the surfaces and how do i get the edges to be not purple in throw together display?

thanks in advance!

--
ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr

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

Re: again polyhedron inconsistencies...

tifn
Hi,

The polyhedron that you provided looks OK to me and renders correctly in
OpenScad 2019.11.19.nightly. Which OpenScad version are you using ?



--
Sent from: http://forum.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: again polyhedron inconsistencies...

bboett
darn....
on mine there are definitely triangles added into the sides, even if they should be plane...

i use the (debian supplied)

2019.01-RC2


Version.....


ciao

Bruno


Am Mi., 8. Jan. 2020 um 18:42 Uhr schrieb tifn <[hidden email]>:
Hi,

The polyhedron that you provided looks OK to me and renders correctly in
OpenScad 2019.11.19.nightly. Which OpenScad version are you using ?



--
Sent from: http://forum.openscad.org/

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


--
ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr

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

Re: again polyhedron inconsistencies...

bboett
hmmmm just made another try....
the polygon alone is fine, but as soon as i extrude it, it gives exactly the same shape, with each face broken up in 2 triangles and the edges painting magenta when throwing together....
there's something i don't get... :(

module ext_trapez(oberbreite, unterbreite, hoehe, tiefe,rand)
{
 ecken = [
    [-unterbreite/2,0], [unterbreite/2,0], //bodenlinie 0,1
    [oberbreite/2,hoehe-rand], [oberbreite/2,hoehe], //rechts hoch 2,3
    [-oberbreite/2,hoehe], [-oberbreite/2,hoehe-rand], //links runter hoch 4,5
 ];  
   translate([0,tiefe/2,0])rotate([90,0,0]) linear_extrude(height = tiefe,center = true) polygon(ecken);
}

BTW from both versions, which should i prefer?



Am Do., 9. Jan. 2020 um 15:58 Uhr schrieb Bruno Boettcher <[hidden email]>:
darn....
on mine there are definitely triangles added into the sides, even if they should be plane...

i use the (debian supplied)

2019.01-RC2


Version.....


ciao

Bruno


Am Mi., 8. Jan. 2020 um 18:42 Uhr schrieb tifn <[hidden email]>:
Hi,

The polyhedron that you provided looks OK to me and renders correctly in
OpenScad 2019.11.19.nightly. Which OpenScad version are you using ?



--
Sent from: http://forum.openscad.org/

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


--
ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr


--
ciao
Bruno

===========================================
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr

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

Re: again polyhedron inconsistencies...

tifn
I still don't reproduce, using
https://files.openscad.org/snapshots/OpenSCAD-2019.01-RC2-x86_64.AppImage on
Ubuntu 18.04. Either I don't do exactly the same steps, or there is an issue
specific to some library version or even hardware ? I'm not familiar with
how OpenSCAD preview works, but since it uses OpenCSG, that could explain
different behavior in different environments. I think you should open an
issue to investigate further.

Among your two way of expressing the shape, my "programer's" advice is:
definitely the latter, because it's simpler, more concise, and it makes it
explicit that the shape is a linear extrusion of some polygon.




--
Sent from: http://forum.openscad.org/

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