adding a difference causes 2-manifold error?

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

adding a difference causes 2-manifold error?

CasaDelGato
I'm modifying a file from ThingVerse, and have run into an odd problem.
I added a couple more shapes to a long difference() (chopping a couple edges sloped instead of vertical)

and now I get the "WARNING: Object may not be a valid 2-manifold and may need repair!" message.

File is at http://casadelgato.com/work/v2.scad
(yes, it's messy...)


--
Worlds only All Electric F-250 truck! http://john.casadelgato.com/Electric-Vehicles/1995-Ford-F-250

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

Re: adding a difference causes 2-manifold error?

MichaelPFrey

Hi John,

(Note: I send some more screenshoots to John directly - those are too big for the mailing list.)

Let us start bit the difference with the two "bits".

When I add the # modifier, I see Z-Fighting.

Z-Fighting occurs when faces are coincident - OpenSCAD does not like that as it is not clear whether the surface belongs to the model or not.

Please move the second bit down and make it a longer:

---------


adding the # modifier to if (cover > 0) {

that looks unclean:

so, let us move this cube up a bit:

and also the other cube, but the other cube has to be translated down a bit.

---------

adding the modifier # to if (spx<0) {

again, Z-Fighting:

so, move it down a bit:


With kind regards,

Michael Frey


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

v2.scad (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: adding a difference causes 2-manifold error?

stonysmith
In reply to this post by CasaDelGato
Your hexagonal shapes sit directly upon the base. If you lower them by a very
tiny bit, even .001, then they will not be co-planar and will no longer
cause the error.



--
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: adding a difference causes 2-manifold error?

CasaDelGato
In reply to this post by MichaelPFrey
On Sat Oct 27 10:30:32 PDT 2018 [hidden email] said:
>Let us start bit the difference with the two "bits".
>
>When I add the # modifier, I see Z-Fighting.
>
>Z-Fighting occurs when faces are coincident - OpenSCAD does not like
>that as it is not clear whether the surface belongs to the model or not.
>
>Please move the second bit down and make it a longer:

Interesting, the bit defintions were in the original code, and I hadn't changed them.
I fixed them, even though they weren't actually causing the problem.

>adding the # modifier to if (cover > 0) {
>
>that looks unclean:
>
>so, let us move this cube up a bit:
>
>and also the other cube, but the other cube has to be translated down a bit.

Yup.  That's the stuff I added, and hadn't figured out that I aligned things too closely.
(I've only used OpenSCAD a couple time previously)

>adding the modifier # to if (spx<0) {
>
>again, Z-Fighting:
>
>so, move it down a bit:

Again, old code, but I did fix it.

Thanks!!  I also hadn't noticed the "#" modifier before.  That REALLY helps!


--

Try my Sensible Email package!  https://sourceforge.net/projects/sensibleemail/
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: adding a difference causes 2-manifold error?

MichaelPFrey
Hi John
On 28.10.18 03:33, John Lussmyer wrote:
> Interesting, the bit defintions were in the original code, and I hadn't changed them.
> I fixed them, even though they weren't actually causing the problem.

Not all Z-Fighting causes problems down the line.

It can, so it is always good to look out for it.

You never know for sure when Z-Fighting is an issue or not, so fixing
any you see is good practice.

> Thanks!! I also hadn't noticed the "#" modifier before. That REALLY helps!

Awesome.

With kind regards,

Michael Frey


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