Difference Problem (or Reverse/Invert)

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

Difference Problem (or Reverse/Invert)

jceddy
So, I'm having a problem when I create a a few solids using the
difference() function and then subtract them from some other solid
using the difference() function again...sometimes the rendering gets
all confused and one or more of the objects gets turned inside-out.
I'm guessing this has something to do with the way that difference()
(apparently) leaves "backwards" faces.  Is there any way around this?
I was thinking it would be nice to have some kind of "reverse()" or
"invert()" function that would let me turn an object inside-out...then
I could intersect it with another object and (hopefully) have all the
faces in the right direction.

--
"When an opponent comes forward, move in and greet him; if he wants to
pull back, send him on his way."
- Morihei Ueshiba

Reply | Threaded
Open this post in threaded view
|

Re: Difference Problem (or Reverse/Invert)

jceddy
Ah...I see that if I compile/render it works...I will just use that for now...


---------- Forwarded message ----------
From: Joseph Eddy <[hidden email]>
Date: Fri, Jun 15, 2012 at 10:50 PM
Subject: Difference Problem (or Reverse/Invert)
To: [hidden email]


So, I'm having a problem when I create a a few solids using the
difference() function and then subtract them from some other solid
using the difference() function again...sometimes the rendering gets
all confused and one or more of the objects gets turned inside-out.
I'm guessing this has something to do with the way that difference()
(apparently) leaves "backwards" faces.  Is there any way around this?
I was thinking it would be nice to have some kind of "reverse()" or
"invert()" function that would let me turn an object inside-out...then
I could intersect it with another object and (hopefully) have all the
faces in the right direction.

--
"When an opponent comes forward, move in and greet him; if he wants to
pull back, send him on his way."
- Morihei Ueshiba


--
"When an opponent comes forward, move in and greet him; if he wants to
pull back, send him on his way."
- Morihei Ueshiba

Reply | Threaded
Open this post in threaded view
|

Re: Difference Problem (or Reverse/Invert)

kintel
Administrator
In reply to this post by jceddy
On Jun 16, 2012, at 05:50 , Joseph Eddy wrote:

> So, I'm having a problem when I create a a few solids using the
> difference() function and then subtract them from some other solid
> using the difference() function again...sometimes the rendering gets
> all confused and one or more of the objects gets turned inside-out.

If you post an example, I'm sure we'll figure it out.
Usually, F5 rendering should look better than the F6 (compile and render).

 -Marius


Reply | Threaded
Open this post in threaded view
|

Re: Difference Problem (or Reverse/Invert)

Triffid Hunter
On Sat, Jun 16, 2012 at 4:55 PM, Marius Kintel <[hidden email]> wrote:
Usually, F5 rendering should look better than the F6 (compile and render).

woah since when? this never happens for me unless I make judicious use of color() and render().. without render the F5 view looks dreadful, artefacts everywhere but usually good enough for me to see what's going on. I figure wrapping a render() around everything makes it basically equivalent to F6 except we also get #highlights and %ghosts
Reply | Threaded
Open this post in threaded view
|

Re: Difference Problem (or Reverse/Invert)

nophead
For individual objects I can get F5 looking good by avoiding coincident faces and having convexity set high enough. For multi-part assemblies I render() all the parts individually as otherwise  they interact with each other when viewed with F5. 

On 16 June 2012 09:46, Triffid Hunter <[hidden email]> wrote:
On Sat, Jun 16, 2012 at 4:55 PM, Marius Kintel <[hidden email]> wrote:
Usually, F5 rendering should look better than the F6 (compile and render).

woah since when? this never happens for me unless I make judicious use of color() and render().. without render the F5 view looks dreadful, artefacts everywhere but usually good enough for me to see what's going on. I figure wrapping a render() around everything makes it basically equivalent to F6 except we also get #highlights and %ghosts

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad


Reply | Threaded
Open this post in threaded view
|

Re: Difference Problem (or Reverse/Invert)

Whosawhatsis
If you're using any of the extrusion functions, render statements, or imported mesh (STL) data, throw in "convexity=5" as an argument. Example:

linear_extrude(height = 10, convexity = 5) {
}

OpenCSG has issues with facet orientation when differencing pre-computed meshes without this.

On Saturday, June 16, 2012 at 2:28 AM, nop head wrote:

For individual objects I can get F5 looking good by avoiding coincident faces and having convexity set high enough. For multi-part assemblies I render() all the parts individually as otherwise  they interact with each other when viewed with F5. 

On 16 June 2012 09:46, Triffid Hunter <[hidden email]> wrote:
On Sat, Jun 16, 2012 at 4:55 PM, Marius Kintel <[hidden email]> wrote:
Usually, F5 rendering should look better than the F6 (compile and render).

woah since when? this never happens for me unless I make judicious use of color() and render().. without render the F5 view looks dreadful, artefacts everywhere but usually good enough for me to see what's going on. I figure wrapping a render() around everything makes it basically equivalent to F6 except we also get #highlights and %ghosts

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad


_______________________________________________
OpenSCAD mailing list

Reply | Threaded
Open this post in threaded view
|

Re: Difference Problem (or Reverse/Invert)

Triffid Hunter
On Sat, Jun 16, 2012 at 7:41 PM, Whosawhatsis <[hidden email]> wrote:
If you're using any of the extrusion functions, render statements, or imported mesh (STL) data, throw in "convexity=5" as an argument.

can I just chuck that in the top of the file? 
Reply | Threaded
Open this post in threaded view
|

Re: Difference Problem (or Reverse/Invert)

Whosawhatsis
I'm pretty sure you can't.

On Saturday, June 16, 2012 at 2:48 AM, Triffid Hunter wrote:

On Sat, Jun 16, 2012 at 7:41 PM, Whosawhatsis <[hidden email]> wrote:
If you're using any of the extrusion functions, render statements, or imported mesh (STL) data, throw in "convexity=5" as an argument.

can I just chuck that in the top of the file? 
_______________________________________________
OpenSCAD mailing list