[OpenSCAD] 2D, 3D OpenSCAD Problem

Ronaldo Persiano rcmpersiano at gmail.com
Fri Oct 25 22:52:58 EDT 2019


I have not tried your code however it is clear the cause of the warnings.
The primitive text() is a 2D object and polyhedron is a 3D object. You
cannot mix them. You may however make the text() getting a third dimension
using the linear_extrude() operator.

The second warning was possibly raised because you tried to translate the
2D primitive text in Z direction. 2D objects live in the XY plane.

A sábado, 26/10/2019, 02:28, Higraphics <hichm19956 at gmail.com> escreveu:

> Hello there,
> i want to create a golden bar using polygon
> but when i type F6, i see this error in console:
> WARNING: Mixing 2D and 3D objects is not supported.
> WARNING: Ignoring 3D child object for 2D operation
>
> that's my script that i'm using:
> /*
>  Size of 2KG of Gold Linget Fonte
>  10mm x 4.3mm X 2.41mm
>  Calculated from Density of gold = 19.30 g/cm3 at 20°C
>  30 => 4.3
>  100 => 10
>  30 h =>2.41
>  25 => 3.15
>  5 => 1.15
>  95 => 8.85
> */
>
> l=4.3;
> L=10;
> h=2.41;
>
> top_x= (l/2)-1; // top_x=1.15
> bottom_x= l-top_x; // bottom_x=3.15
> L_R_h= L-top_x; // L_R_h=8.85
>
>
> Points=[[0,0,0],[l,0,0],[bottom_x,top_x,h],[top_x,top_x,h],[top_x,L_R_h,h],[0,L,0],[l,L,0],[bottom_x,L_R_h,h]];
>
>
> Paths=[[0,1,3],[1,3,2],[0,5,3],[5,3,4],[5,6,7],[5,7,4],[6,1,2],[7,2,6],[2,3,7],[3,7,4],[0,1,5],[1,5,6]];
>
> module Torn() {
>     difference(){
> translate([-2,2.25,(h/2.01)-0.48])
> resize([1.6,1.2,0])
> circle(r=5, center=true, $fn=250);
>
> translate([-2,2.25,(h/2.01)-0.48])
> resize([1.4,1,0])
> circle(r=2, center=true, $fn=250);
>     }
> }
> translate([1.995,0,0]){
> Torn();
> }
>
> color( "Gold" ) {
> translate([-(bottom_x/1.95)+1.06,2,(h/2.01)-0.48])
> resize([1,0.5,0])
> text("Gold");
>
> translate([-(bottom_x/1.95)+1.07,-2,(h/2.01)-0.48])
> resize([1,0.5,0])
> text("2 Kg");
>
> translate([-(bottom_x/1.95)+1.07,-3,(h/2.01)-0.48])
> resize([1,0.4,0])
> text("70.5479 oz");
>
> translate([-l/2,-L/2,-h/2])
>
> polyhedron(points=Points, faces=Paths);
>     }
>
> =====
> 2KG of gold!!!  that's impossible to collect it these days
>
>
>
> --
> Sent from: http://forum.openscad.org/
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss at lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20191026/2805f27f/attachment.html>


More information about the Discuss mailing list