discuss@lists.openscad.org

OpenSCAD general discussion

View all threads

Preview OK, Render gets only half

R
rcadmus
Mon, Jun 7, 2021 1:07 AM

The file is a QR code svg.  Everything shows in preview but only the box part
is rendered.

// Basic square coaster -

translate ([-52,-53,0]) resize([90,90,0])
linear_extrude(height = 2){
import(file = "/home/ray/stupidPeople.svg");
}

difference(){
cube([100,100,4],center=true);
translate([0,0,2])
cube([94,94,4],center=true);;
}

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

The file is a QR code svg. Everything shows in preview but only the box part is rendered. // Basic square coaster - translate ([-52,-53,0]) resize([90,90,0]) linear_extrude(height = 2){ import(file = "/home/ray/stupidPeople.svg"); } difference(){ cube([100,100,4],center=true); translate([0,0,2]) cube([94,94,4],center=true);; } -- Sent from: http://forum.openscad.org/
M
MichaelAtOz
Mon, Jun 7, 2021 1:17 AM

I expect resize() to z=0 renders as nothing.


OpenSCAD Admin - email* me if you need anything,  or if I've done something stupid...

  • on the Forum, click on my MichaelAtOz label, there is a link to email me.

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. Obviously inclusion of works of previous authors is not included in the above.

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

I expect resize() to z=0 renders as nothing. ----- OpenSCAD Admin - email* me if you need anything, or if I've done something stupid... * on the Forum, click on my MichaelAtOz label, there is a link to email me. 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. Obviously inclusion of works of previous authors is not included in the above. -- Sent from: http://forum.openscad.org/
R
rcadmus
Mon, Jun 7, 2021 1:22 AM

Made sense - so I changed it .  No effect on render,  made it bigger on
preview...

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

Made sense - so I changed it . No effect on render, made it bigger on preview... -- Sent from: http://forum.openscad.org/
M
MichaelAtOz
Mon, Jun 7, 2021 1:24 AM

Oops, RTFM.

Can you share the .svg?


OpenSCAD Admin - email* me if you need anything,  or if I've done something stupid...

  • on the Forum, click on my MichaelAtOz label, there is a link to email me.

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. Obviously inclusion of works of previous authors is not included in the above.

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

Oops, RTFM. Can you share the .svg? ----- OpenSCAD Admin - email* me if you need anything, or if I've done something stupid... * on the Forum, click on my MichaelAtOz label, there is a link to email me. 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. Obviously inclusion of works of previous authors is not included in the above. -- Sent from: http://forum.openscad.org/
M
MichaelAtOz
Mon, Jun 7, 2021 1:29 AM

MichaelAtOz wrote

Oops, RTFM.

That was meant to me BTY. z=0 is ignored. So the .svg may have issues.


OpenSCAD Admin - email* me if you need anything,  or if I've done something stupid...

  • on the Forum, click on my MichaelAtOz label, there is a link to email me.

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. Obviously inclusion of works of previous authors is not included in the above.

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

MichaelAtOz wrote > Oops, RTFM. That was meant to me BTY. z=0 is ignored. So the .svg may have issues. ----- OpenSCAD Admin - email* me if you need anything, or if I've done something stupid... * on the Forum, click on my MichaelAtOz label, there is a link to email me. 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. Obviously inclusion of works of previous authors is not included in the above. -- Sent from: http://forum.openscad.org/
R
rcadmus
Mon, Jun 7, 2021 1:29 AM

Workaround...

Each section will render by itself so I am creating 2 .stl's and merging
them in the slicer.  A pain but working for now but I really would like to
know what I may be doing wrong.  Thanks for trying to help.

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

Workaround... Each section will render by itself so I am creating 2 .stl's and merging them in the slicer. A pain but working for now but I really would like to know what I may be doing wrong. Thanks for trying to help. -- Sent from: http://forum.openscad.org/
R
rcadmus
Mon, Jun 7, 2021 1:32 AM
stupidPeople.svg <http://forum.openscad.org/file/t3243/stupidPeople.svg> -- Sent from: http://forum.openscad.org/
M
MichaelAtOz
Mon, Jun 7, 2021 8:44 AM

I'm no expert in SVG, when I just do

linear_extrude(height = 2){
import(file = "stupidPeople.svg");
}
cube(20); // forces CGAL render

I get

Compiling design (CSG Tree generation)...
Rendering Polygon Mesh using CGAL...
ERROR: The given mesh is not closed! Unable to convert to
CGAL_Nef_Polyhedron.

That could be a few things, but I think the problem is the QR code has
2d corners which meet at a single point.

http://forum.openscad.org/file/t359/Capture_-_svg_non_manifold.jpg

They are non-manifold.

A work around is to use offset() which will change the just-touch into
just-embedded.
It takes longer to render.

// Basic square coaster -
translate ([-52,-53,0])
resize([90,90,0])
linear_extrude(height = 2){
offset(delta=0.001)
import(file = "stupidPeople.svg");
}
difference(){
cube([100,100,4],center=true);
translate([0,0,2])
cube([94,94,4],center=true);;
}


OpenSCAD Admin - email* me if you need anything,  or if I've done something stupid...

  • on the Forum, click on my MichaelAtOz label, there is a link to email me.

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. Obviously inclusion of works of previous authors is not included in the above.

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

I'm no expert in SVG, when I just do linear_extrude(height = 2){ import(file = "stupidPeople.svg"); } cube(20); // forces CGAL render I get Compiling design (CSG Tree generation)... Rendering Polygon Mesh using CGAL... ERROR: The given mesh is not closed! Unable to convert to CGAL_Nef_Polyhedron. That could be a few things, but I think the problem is the QR code has 2d corners which meet at a single point. <http://forum.openscad.org/file/t359/Capture_-_svg_non_manifold.jpg> They are non-manifold. A work around is to use offset() which will change the just-touch into just-embedded. It takes longer to render. // Basic square coaster - translate ([-52,-53,0]) resize([90,90,0]) linear_extrude(height = 2){ offset(delta=0.001) import(file = "stupidPeople.svg"); } difference(){ cube([100,100,4],center=true); translate([0,0,2]) cube([94,94,4],center=true);; } ----- OpenSCAD Admin - email* me if you need anything, or if I've done something stupid... * on the Forum, click on my MichaelAtOz label, there is a link to email me. 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. Obviously inclusion of works of previous authors is not included in the above. -- Sent from: http://forum.openscad.org/
NH
nop head
Mon, Jun 7, 2021 8:45 AM

A QR code has lots of squares sharing one corner, which will not create a
2-manifold 3D object.  Try offsetting by a small amount. A small positive
amount will make the meeting points have finite thickness. A small negative
offset will make a tiny gap.

On Mon, 7 Jun 2021 at 02:32, rcadmus rcadmus@gmail.com wrote:

stupidPeople.svg http://forum.openscad.org/file/t3243/stupidPeople.svg

Sent from the OpenSCAD mailing list archive http://forum.openscad.org/
at Nabble.com.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

A QR code has lots of squares sharing one corner, which will not create a 2-manifold 3D object. Try offsetting by a small amount. A small positive amount will make the meeting points have finite thickness. A small negative offset will make a tiny gap. On Mon, 7 Jun 2021 at 02:32, rcadmus <rcadmus@gmail.com> wrote: > stupidPeople.svg <http://forum.openscad.org/file/t3243/stupidPeople.svg> > ------------------------------ > Sent from the OpenSCAD mailing list archive <http://forum.openscad.org/> > at Nabble.com. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
RC
Ray Cadmus
Mon, Jun 7, 2021 3:16 PM

That did it.  Thank you very much.  I won't pretend to fully understand
why,  but I will accept that it works.

Thanks,

Ray

--

On 6/7/21 3:44 AM, MichaelAtOz wrote:

I'm no expert in SVG, when I just do

linear_extrude(height = 2){
  import(file = "stupidPeople.svg");
}
cube(20); // forces CGAL render

I get

Compiling design (CSG Tree generation)...
Rendering Polygon Mesh using CGAL...
ERROR: The given mesh is not closed! Unable to convert to
CGAL_Nef_Polyhedron.

That could be a few things, but I think the problem is the QR code has
2d corners which meet at a single point.

They are non-manifold.

A work around is to use offset() which will change the just-touch into
just-embedded.
It takes longer to render.

// Basic square coaster -
translate ([-52,-53,0])
  resize([90,90,0])
    linear_extrude(height = 2){
        offset(delta=0.001)
          import(file = "stupidPeople.svg");
    }
difference(){
    cube([100,100,4],center=true);
    translate([0,0,2])
       cube([94,94,4],center=true);;
}
OpenSCAD Admin - email me if you need anything, * or if I've done
something stupid...

  • on the Forum, click on my MichaelAtOz label, there is a link to
    email me.

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.
Obviously inclusion of works of previous authors is not included in
the above.


Sent from the OpenSCAD mailing list archive
http://forum.openscad.org/ at Nabble.com.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

That did it.  Thank you very much.  I won't pretend to fully understand why,  but I will accept that it works. Thanks, Ray -- On 6/7/21 3:44 AM, MichaelAtOz wrote: > I'm no expert in SVG, when I just do > > linear_extrude(height = 2){ >   import(file = "stupidPeople.svg"); > } > cube(20); // forces CGAL render > > I get > > Compiling design (CSG Tree generation)... > Rendering Polygon Mesh using CGAL... > ERROR: The given mesh is not closed! Unable to convert to > CGAL_Nef_Polyhedron. > > That could be a few things, but I think the problem is the QR code has > 2d corners which meet at a single point. > > > > They are non-manifold. > > A work around is to use offset() which will change the just-touch into > just-embedded. > It takes longer to render. > > // Basic square coaster - > translate ([-52,-53,0]) >   resize([90,90,0]) >     linear_extrude(height = 2){ >         offset(delta=0.001) >           import(file = "stupidPeople.svg"); >     } > difference(){ >     cube([100,100,4],center=true); >     translate([0,0,2]) >        cube([94,94,4],center=true);; > } > *OpenSCAD Admin - email* me if you need anything, * or if I've done > something stupid... > * on the Forum, click on my MichaelAtOz label, there is a link to > email me. > > 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. > Obviously inclusion of works of previous authors is not included in > the above. > > ------------------------------------------------------------------------ > Sent from the OpenSCAD mailing list archive > <http://forum.openscad.org/> at Nabble.com. > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org