DV
david vanhorn
Wed, Aug 2, 2017 7:00 PM
Ok, you might be on to something here.
I changed the differencing object "C" to this:
File C:
module C () {
translate ([0,0,-10]){
cylinder (20,r=.5);
}
}
//C();
In D, I added colors (not working right) and render, and when the colors
are working, the hole in the bottom sphere is red and green.
File D:
include <A.scad>;
include <B.scad>;
expand = 2;
$fn=300;
module D () {
union(){
render (){color ([0,1,0]){ A();}}
translate ([0,0,expand*1]){
render (){color ([0,1,0]){ B();}}
}
}
}
D();
--
K1FZY (WA4TPW) SK 9/29/37-4/13/15
Ok, you might be on to something here.
I changed the differencing object "C" to this:
File C:
module C () {
translate ([0,0,-10]){
cylinder (20,r=.5);
}
}
//C();
In D, I added colors (not working right) and render, and when the colors
are working, the hole in the bottom sphere is red and green.
File D:
include <A.scad>;
include <B.scad>;
expand = 2;
$fn=300;
module D () {
union(){
render (){color ([0,1,0]){ A();}}
translate ([0,0,expand*1]){
render (){color ([0,1,0]){ B();}}
}
}
}
D();
--
K1FZY (WA4TPW) SK 9/29/37-4/13/15
NH
nop head
Wed, Aug 2, 2017 7:36 PM
If you want the color()s to work put them before the render() instead of
after.
On 2 August 2017 at 20:00, david vanhorn kc6ete@gmail.com wrote:
Ok, you might be on to something here.
I changed the differencing object "C" to this:
File C:
module C () {
translate ([0,0,-10]){
cylinder (20,r=.5);
}
}
//C();
In D, I added colors (not working right) and render, and when the colors
are working, the hole in the bottom sphere is red and green.
File D:
include <A.scad>;
include <B.scad>;
expand = 2;
$fn=300;
module D () {
union(){
render (){color ([0,1,0]){ A();}}
translate ([0,0,expand*1]){
render (){color ([0,1,0]){ B();}}
}
}
}
D();
--
K1FZY (WA4TPW) SK 9/29/37-4/13/15
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
If you want the color()s to work put them before the render() instead of
after.
On 2 August 2017 at 20:00, david vanhorn <kc6ete@gmail.com> wrote:
>
> Ok, you might be on to something here.
>
> I changed the differencing object "C" to this:
>
> File C:
>
> module C () {
> translate ([0,0,-10]){
> cylinder (20,r=.5);
> }
> }
>
> //C();
>
>
> In D, I added colors (not working right) and render, and when the colors
> are working, the hole in the bottom sphere is red and green.
>
>
> File D:
>
> include <A.scad>;
> include <B.scad>;
>
> expand = 2;
>
> $fn=300;
>
> module D () {
> union(){
> render (){color ([0,1,0]){ A();}}
> translate ([0,0,expand*1]){
> render (){color ([0,1,0]){ B();}}
> }
> }
> }
>
> D();
>
>
>
>
>
>
> --
> K1FZY (WA4TPW) SK 9/29/37-4/13/15
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
>
M
MichaelAtOz
Thu, Aug 3, 2017 3:45 AM
Can you clarify for me though, if I difference a cube from a sphere, and
make that a module, when I use that module in another file, does the cube
"exist" in the second file, or is the complex (sphere - cube) shape passed
up?
Have a look at the Design menu items, Display AST Tree & Display CSG Tree
for whats what. And see code below.
I don't yet have an elegant way to say "if I'm running from this file,
then invoke the object so I can see it and create STL file, but if I'm
running from some other file then don't invoke the object"
see code below for one way. You need more variables if you want it to work
multi-level.
Of course it works just fine.
When you reproduce it let us know, difficult to look at it ATM.
If you failed to comment out the C() call in C.scad (and save the file) that
would cause what you describe.
A-B-C-D.zip http://forum.openscad.org/file/n22004/A-B-C-D.zip
Admin - PM me if you need anything, or if I've done something stupid...
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.
The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
View this message in context: http://forum.openscad.org/Differencing-failing-tp21984p22004.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
> Can you clarify for me though, if I difference a cube from a sphere, and
make that a module, when I use that module in another file, does the cube
"exist" in the second file, or is the complex (sphere - cube) shape passed
up?
Have a look at the Design menu items, Display AST Tree & Display CSG Tree
for whats what. And see code below.
> I don't yet have an elegant way to say "if I'm running from this file,
> then invoke the object so I can see it and create STL file, but if I'm
> running from some other file then don't invoke the object"
see code below for one way. You need more variables if you want it to work
multi-level.
> Of course it works just fine.
When you reproduce it let us know, difficult to look at it ATM.
If you failed to comment out the C() call in C.scad (and save the file) that
would cause what you describe.
A-B-C-D.zip <http://forum.openscad.org/file/n22004/A-B-C-D.zip>
-----
Admin - PM me if you need anything, or if I've done something stupid...
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.
The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
--
View this message in context: http://forum.openscad.org/Differencing-failing-tp21984p22004.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
NH
nop head
Thu, Aug 3, 2017 7:00 AM
To avoid having to comment out invocations use use <X.scad> instead of
include <X.scad>. That allows access to modules but ignores instantiations.
On 3 August 2017 at 04:45, MichaelAtOz oz.at.michael@gmail.com wrote:
Can you clarify for me though, if I difference a cube from a sphere, and
make that a module, when I use that module in another file, does the cube
"exist" in the second file, or is the complex (sphere - cube) shape passed
up?
Have a look at the Design menu items, Display AST Tree & Display CSG Tree
for whats what. And see code below.
I don't yet have an elegant way to say "if I'm running from this file,
then invoke the object so I can see it and create STL file, but if I'm
running from some other file then don't invoke the object"
see code below for one way. You need more variables if you want it to work
multi-level.
Of course it works just fine.
To avoid having to comment out invocations use use <X.scad> instead of
include <X.scad>. That allows access to modules but ignores instantiations.
On 3 August 2017 at 04:45, MichaelAtOz <oz.at.michael@gmail.com> wrote:
> > Can you clarify for me though, if I difference a cube from a sphere, and
> make that a module, when I use that module in another file, does the cube
> "exist" in the second file, or is the complex (sphere - cube) shape passed
> up?
>
> Have a look at the Design menu items, Display AST Tree & Display CSG Tree
> for whats what. And see code below.
>
> > I don't yet have an elegant way to say "if I'm running from this file,
> > then invoke the object so I can see it and create STL file, but if I'm
> > running from some other file then don't invoke the object"
>
> see code below for one way. You need more variables if you want it to work
> multi-level.
>
> > Of course it works just fine.
>
> When you reproduce it let us know, difficult to look at it ATM.
> If you failed to comment out the C() call in C.scad (and save the file)
> that
> would cause what you describe.
>
> A-B-C-D.zip <http://forum.openscad.org/file/n22004/A-B-C-D.zip>
>
>
>
>
>
>
>
> -----
> Admin - PM me if you need anything, or if I've done something stupid...
>
> 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.
>
> The TPP is no simple “trade agreement.” Fight it!
> http://www.ourfairdeal.org/ time is running out!
> --
> View this message in context: http://forum.openscad.org/
> Differencing-failing-tp21984p22004.html
> Sent from the OpenSCAD mailing list archive at Nabble.com.
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
G
Gadgetmind
Thu, Aug 3, 2017 7:42 AM
On 2017-08-02 19:26, nop head wrote:
Does it look different if you zoom far out? During F6 all the
primitive shapes, including the negative ones need to be inside the
clipping volume or they don't get drawn. That can make a difference go
wrong.
I've been bitten by this, but it seems to depend on version of OpenSCAD
and OpenCSG. The preview also works fine if orthogonal is selected.
On 2017-08-02 19:26, nop head wrote:
> Does it look different if you zoom far out? During F6 all the
> primitive shapes, including the negative ones need to be inside the
> clipping volume or they don't get drawn. That can make a difference go
> wrong.
I've been bitten by this, but it seems to depend on version of OpenSCAD
and OpenCSG. The preview also works fine if orthogonal is selected.
G
Gadgetmind
Thu, Aug 3, 2017 7:43 AM
On 2017-08-02 18:29, david vanhorn wrote:
So I generated a simple test case, which isn't too painful. Of course
it works just fine.
I have an issue where objects that have common negative space subtracted
from them don't get their individual colours. I'd love to report it but
every simple test I create works just fine!
On 2017-08-02 18:29, david vanhorn wrote:
> So I generated a simple test case, which isn't too painful. Of course
> it works just fine.
I have an issue where objects that have common negative space subtracted
from them don't get their individual colours. I'd love to report it but
every simple test I create works just fine!
DV
david vanhorn
Thu, Aug 3, 2017 7:41 PM
Ok, I'm working back through my files, converting everything I can to "use"
rather than "include" and resolving any issues.
I'm also renaming the files to indicate their level in the tree.
I'm working on a file now which uses files that use other files.
I started a preview, and I get "WARNING Nomalized tree is growing past
200000 elements Aborting normalization"
and Normalized CSG tree has 18800 elements (somewhat less than 200000...)
How do I resolve this? My most complicated object is the torus,
module Torus(Major,Minor){
rotate_extrude(angle = 45, convexity = 144){
translate([Major, 0, 0]){
circle(r = Minor, $fn = 144);
}// end of translate
}// end rotate extrude
}// end of module
This is used in a number of places.
Ok, I'm working back through my files, converting everything I can to "use"
rather than "include" and resolving any issues.
I'm also renaming the files to indicate their level in the tree.
I'm working on a file now which uses files that use other files.
I started a preview, and I get "WARNING Nomalized tree is growing past
200000 elements Aborting normalization"
and Normalized CSG tree has 18800 elements (somewhat less than 200000...)
How do I resolve this? My most complicated object is the torus,
module Torus(Major,Minor){
rotate_extrude(angle = 45, convexity = 144){
translate([Major, 0, 0]){
circle(r = Minor, $fn = 144);
}// end of translate
}// end rotate extrude
}// end of module
This is used in a number of places.
NH
nop head
Thu, Aug 3, 2017 8:40 PM
convexity = 144 seems like a huge number and for a toroid it should be only
need to be 2.
I don't know if that creates more csg tree elements but I can't think what
else does.
On 3 August 2017 at 20:41, david vanhorn kc6ete@gmail.com wrote:
Ok, I'm working back through my files, converting everything I can to
"use" rather than "include" and resolving any issues.
I'm also renaming the files to indicate their level in the tree.
I'm working on a file now which uses files that use other files.
I started a preview, and I get "WARNING Nomalized tree is growing past
200000 elements Aborting normalization"
and Normalized CSG tree has 18800 elements (somewhat less than 200000...)
How do I resolve this? My most complicated object is the torus,
module Torus(Major,Minor){
rotate_extrude(angle = 45, convexity = 144){
translate([Major, 0, 0]){
circle(r = Minor, $fn = 144);
}// end of translate
}// end rotate extrude
}// end of module
This is used in a number of places.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
convexity = 144 seems like a huge number and for a toroid it should be only
need to be 2.
I don't know if that creates more csg tree elements but I can't think what
else does.
On 3 August 2017 at 20:41, david vanhorn <kc6ete@gmail.com> wrote:
> Ok, I'm working back through my files, converting everything I can to
> "use" rather than "include" and resolving any issues.
>
> I'm also renaming the files to indicate their level in the tree.
>
> I'm working on a file now which uses files that use other files.
> I started a preview, and I get "WARNING Nomalized tree is growing past
> 200000 elements Aborting normalization"
> and Normalized CSG tree has 18800 elements (somewhat less than 200000...)
>
> How do I resolve this? My most complicated object is the torus,
>
> module Torus(Major,Minor){
> rotate_extrude(angle = 45, convexity = 144){
> translate([Major, 0, 0]){
> circle(r = Minor, $fn = 144);
> }// end of translate
> }// end rotate extrude
> }// end of module
>
> This is used in a number of places.
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
>
DV
david vanhorn
Thu, Aug 3, 2017 8:46 PM
Ok, I'll dial that back and see what happens.
On Thu, Aug 3, 2017 at 2:40 PM, nop head nop.head@gmail.com wrote:
convexity = 144 seems like a huge number and for a toroid it should be
only need to be 2.
Ok, I'll dial that back and see what happens.
On Thu, Aug 3, 2017 at 2:40 PM, nop head <nop.head@gmail.com> wrote:
> convexity = 144 seems like a huge number and for a toroid it should be
> only need to be 2.
>
DV
david vanhorn
Thu, Aug 3, 2017 10:14 PM
Ok, dialing back the convexity got it. I found that as an example
somewhere. It was working so I didn't mess with it.
I have rebuilt all my files to "use" rather than "Include" but I'm having
one issue.
I have a variable called CrossSection which is either true or undefined.
If undefined the modules are supposed to be complete, and if true they are
supposed to difference with a large cube to create a cross section view.
Apparently the value of CrossSection isn't being passed down to the
modules. I can clip it in the main view, but then all the faces are green,
and there is a bunch of artifacting where parts of the model that were
differenced out are allowing me to see through the model.
--
K1FZY (WA4TPW) SK 9/29/37-4/13/15
Ok, dialing back the convexity got it. I found that as an example
somewhere. It was working so I didn't mess with it.
I have rebuilt all my files to "use" rather than "Include" but I'm having
one issue.
I have a variable called CrossSection which is either true or undefined.
If undefined the modules are supposed to be complete, and if true they are
supposed to difference with a large cube to create a cross section view.
Apparently the value of CrossSection isn't being passed down to the
modules. I can clip it in the main view, but then all the faces are green,
and there is a bunch of artifacting where parts of the model that were
differenced out are allowing me to see through the model.
--
K1FZY (WA4TPW) SK 9/29/37-4/13/15