Preview OK, Render gets only half

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

Preview OK, Render gets only half

rcadmus
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 the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Preview OK, Render gets only half

MichaelAtOz
Administrator
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 the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: Preview OK, Render gets only half

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

Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Preview OK, Render gets only half

MichaelAtOz
Administrator
In reply to this post by rcadmus
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 the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: Preview OK, Render gets only half

MichaelAtOz
Administrator
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 the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: Preview OK, Render gets only half

rcadmus
In reply to this post by rcadmus
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 the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Preview OK, Render gets only half

rcadmus
In reply to this post by MichaelAtOz
stupidPeople.svg

Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Preview OK, Render gets only half

MichaelAtOz
Administrator
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 at Nabble.com.

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: Preview OK, Render gets only half

nophead
In reply to this post by rcadmus
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 <[hidden email]> wrote:
stupidPeople.svg

Sent from the OpenSCAD mailing list archive at Nabble.com.
_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Preview OK, Render gets only half

rcadmus
In reply to this post by MichaelAtOz

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 at Nabble.com.

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]