discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

again polyhedron inconsistencies...

BB
Bruno Boettcher
Wed, Jan 8, 2020 4:51 PM

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://bboett.free.frhttp://aikido.nohkumado.eu/,
http://bboett.free.fr
http://aikido.zorn.free.fr

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://bboett.free.fr>http://aikido.nohkumado.eu/, <http://bboett.free.fr> http://aikido.zorn.free.fr
T
tifn
Wed, Jan 8, 2020 5:41 PM

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/

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/
BB
Bruno Boettcher
Thu, Jan 9, 2020 2:58 PM

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 tiphaine.turpin@free.fr:

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
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

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 <tiphaine.turpin@free.fr>: > 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 > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > -- ciao Bruno =========================================== http://nohkumado.eu/, <http://bboett.free.fr>http://aikido.nohkumado.eu/, <http://bboett.free.fr> http://aikido.zorn.free.fr
BB
Bruno Boettcher
Thu, Jan 9, 2020 3:09 PM

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 <bboett@gmail.com

:

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 tiphaine.turpin@free.fr:

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
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

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 <bboett@gmail.com >: > 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 <tiphaine.turpin@free.fr>: > >> 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 >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> > > > -- > ciao > Bruno > > =========================================== > http://nohkumado.eu/, <http://bboett.free.fr>http://aikido.nohkumado.eu/, > <http://bboett.free.fr> > http://aikido.zorn.free.fr > -- ciao Bruno =========================================== http://nohkumado.eu/, <http://bboett.free.fr>http://aikido.nohkumado.eu/, <http://bboett.free.fr> http://aikido.zorn.free.fr
T
tifn
Thu, Jan 9, 2020 8:23 PM

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/

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/