discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Seeing the inside of a shape from the outside using transparency?

T
THX11384EB
Mon, Feb 24, 2020 7:08 PM

I am trying to make a shape/model which is comprised of a few other shapes
added and subtracted from each other. When I did this using Fusion 360, I
used a transparency setting which allowed me to visually confirm that I was
achieving my aim. Unfortunately, the alpha setting for the color command
doesn't seem to have the same effect - it doesn't allow me to see the inside
of my shape. Is there some way I can get to see the inside of my shape from
the outside, as I can in other software (e.g. Google Sketchup, Fusion 360
and 123Design)?

http://forum.openscad.org/file/t2755/openscad.png
http://forum.openscad.org/file/t2755/fusion.png

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

I am trying to make a shape/model which is comprised of a few other shapes added and subtracted from each other. When I did this using Fusion 360, I used a transparency setting which allowed me to visually confirm that I was achieving my aim. Unfortunately, the alpha setting for the color command doesn't seem to have the same effect - it doesn't allow me to see the inside of my shape. Is there some way I can get to see the inside of my shape from the outside, as I can in other software (e.g. Google Sketchup, Fusion 360 and 123Design)? <http://forum.openscad.org/file/t2755/openscad.png> <http://forum.openscad.org/file/t2755/fusion.png> -- Sent from: http://forum.openscad.org/
M
MichaelAtOz
Mon, Feb 24, 2020 10:33 PM

Not within an object. you have to cut them open, e.g.

module cut(s=10000) {
difference() {
children();
translate([-s/2,0,0])
cube(s);
}
}

cut()
difference() {
cylinder(20,20,20,center=true);
cylinder(16,16,16,center=true);
}


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

  • 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/

Not within an object. you have to cut them open, e.g. module cut(s=10000) { difference() { children(); translate([-s/2,0,0]) cube(s); } } cut() difference() { cylinder(20,20,20,center=true); cylinder(16,16,16,center=true); } ----- Admin - email* me if you need anything, or if I've done something stupid... * 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/
JB
Jordan Brown
Mon, Feb 24, 2020 10:39 PM

On 2/24/2020 11:08 AM, THX11384EB wrote:

Is there some way I can get to see the inside of my shape from
the outside, as I can in other software (e.g. Google Sketchup, Fusion 360
and 123Design)?

http://forum.openscad.org/file/t2755/openscad.png
http://forum.openscad.org/file/t2755/fusion.png

I assume that center part is hollow?

You might be able to see something useful using View/Wireframe.  Looks
like that requires an F6 render first.

I'm a little surprised that the # and % modifiers don't help, but they
don't.

It's a little surprising that View/Show Edges doesn't combine with an
alpha setting to show the edges inside the object, but I wouldn't say
it's wrong.

On 2/24/2020 11:08 AM, THX11384EB wrote: > Is there some way I can get to see the inside of my shape from > the outside, as I can in other software (e.g. Google Sketchup, Fusion 360 > and 123Design)? > > <http://forum.openscad.org/file/t2755/openscad.png> > <http://forum.openscad.org/file/t2755/fusion.png> I assume that center part is hollow? You might be able to see something useful using View/Wireframe.  Looks like that requires an F6 render first. I'm a little surprised that the # and % modifiers don't help, but they don't. It's a little surprising that View/Show Edges doesn't combine with an alpha setting to show the edges inside the object, but I wouldn't say it's wrong.
JB
Jordan Brown
Mon, Feb 24, 2020 10:42 PM

On 2/24/2020 2:39 PM, Jordan Brown wrote:

You might be able to see something useful using View/Wireframe.  Looks
like that requires an F6 render first.

On further tries, I'm not seeing the requirement for F6 that I thought I
saw.

On 2/24/2020 2:39 PM, Jordan Brown wrote: > You might be able to see something useful using View/Wireframe.  Looks > like that requires an F6 render first. On further tries, I'm not seeing the requirement for F6 that I thought I saw.
P
Parkinbot
Tue, Feb 25, 2020 10:23 AM

In OpenSCAD the order of objects plays a role, whether a look inside into a
transparent object (alpha<1) is presented or not. Thus this object must be
evaluated last.

See this codes:

color("yellow",.5)cube (20, center =true);  // transparent only for objects
already displayed
color("green",1)  cube (10, center =true);  // not visible

vs.

color("green",1)  cube (10, center =true);  // visible
color("yellow",.5)cube (20, center =true);  // transparent only objects
already displayed

the problem is, you can't change the order in cases like the following

difference()
{
color("yellow",.5)cube (20, center =true);
color("green",1)  cube (10, center =true);
}

my trick to look through all coats in such a case is the temporal
redefinition of difference() into a union having the right order.

cube (5, center =true);
difference()
{
cube (20, center =true);
cube (10, center =true);
}

module difference()
color("green",.3)
{
children([1:$children-1]);
children(0);
}

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

In OpenSCAD the order of objects plays a role, whether a look inside into a transparent object (alpha<1) is presented or not. Thus this object must be evaluated last. See this codes: color("yellow",.5)cube (20, center =true); // transparent only for objects already displayed color("green",1) cube (10, center =true); // not visible vs. color("green",1) cube (10, center =true); // visible color("yellow",.5)cube (20, center =true); // transparent only objects already displayed the problem is, you can't change the order in cases like the following difference() { color("yellow",.5)cube (20, center =true); color("green",1) cube (10, center =true); } my trick to look through all coats in such a case is the temporal redefinition of difference() into a union having the right order. cube (5, center =true); difference() { cube (20, center =true); cube (10, center =true); } module difference() color("green",.3) { children([1:$children-1]); children(0); } -- Sent from: http://forum.openscad.org/