JB
Jordan Brown
Mon, Mar 22, 2021 6:00 PM
On 3/22/2021 10:26 AM, david vanhorn wrote:
I knew you couldn't change variables, but I didn't think that
assigning one which was undefined was "changing" it.
It isn't, or at least not exactly, but that's not the key problem.
if (... some test ...) {
x = 3;
} else {
x = 5;
}
echo(x);
gives you an unknown-variable warning, because the two values of x only
last for those one-line blocks. When you're done with the "if", you're
back to the state before the "if", which is that x is undefined.
General rule: blocks are black holes. It is not possible to get
information out of them. There is nothing that you can do inside a
block that is visible to the program outside the block. (A block can
return a geometric object, but the program can't then look at that
object.)
You can say
x = is_undef(x) ? 3 : x;
but it doesn't really work. It's fine if x is undefined, but if x is
defined at that block level, it's an error because it tries to change
the value. (Even if it's trying to change it to the same value.)
On 3/22/2021 10:26 AM, david vanhorn wrote:
> I knew you couldn't change variables, but I didn't think that
> assigning one which was undefined was "changing" it.
It isn't, or at least not exactly, but that's not the key problem.
if (... some test ...) {
x = 3;
} else {
x = 5;
}
echo(x);
gives you an unknown-variable warning, because the two values of x only
last for those one-line blocks. When you're done with the "if", you're
back to the state before the "if", which is that x is undefined.
General rule: blocks are black holes. It is *not possible* to get
information out of them. There is nothing that you can do inside a
block that is visible to the program outside the block. (A block can
return a geometric object, but the program can't then *look* at that
object.)
You *can* say
x = is_undef(x) ? 3 : x;
but it doesn't really work. It's fine if x is undefined, but if x *is*
defined at that block level, it's an error because it tries to change
the value. (Even if it's trying to change it to the same value.)
DV
david vanhorn
Mon, Mar 22, 2021 6:16 PM
I've been writing code for a long time. I understand globals. If they
weren't occasionally useful, they wouldn't exist.
On Mon, Mar 22, 2021 at 11:21 AM A. Craig West acraigwest@gmail.com wrote:
The general consensus amongst programmers is that using global variables
is rarely a good idea, the easiest and most understandable way to do this
is by adding CrossSection as an argument to the module...
On Mon, Mar 22, 2021 at 1:10 PM david vanhorn kc6ete@gmail.com wrote:
Well.. I thought I understood it..
// If we're running this file without calling it from the top level file,
then CrossSection is undefined.
if (is_undef(CrossSection)){
CrossSection = false; // So set it to false
}
// Now use echos to check that CrossSection has been set
if (is_undef(CrossSection)){
echo("CrossSection is undefined");
}
if (false == CrossSection){
echo("CrossSection is false");
}
if (true==CrossSection){
echo("CrossSection is true");
}
Output:
ECHO:"CrossSection is undefined"
On Mon, Mar 22, 2021 at 10:31 AM david vanhorn kc6ete@gmail.com wrote:
Ok, I think I have it now.
Not quite the same, but it's working for me
CrossSection = !is_undef(CrossSection);
if (false == CrossSection){
echo("Printable part generation of CH_Part_Lock");
} else {
echo("Generating cross section of CH_Part_Lock");
}
Then at the bottom of the file:
// Show the part alone if we're only running this file
if (false == CrossSection){
echo("Showing part");
TwistLockF(); // This could be printed separately
}
On Mon, Mar 22, 2021 at 9:52 AM david vanhorn kc6ete@gmail.com wrote:
I'm not quite seeing it.
How would I apply it here:
module HandleFront(){
render()
difference(){
HandleFrontFull();
// I'd like to turn this element on or off based on CrossSection
HalfClip(); //
}
}// end of difference
}// end of module
So I assume that earlier in this file, I should use the if Is_undef to
set CrossSection to false, but I'm not understanding how.
On Mon, Mar 22, 2021 at 9:40 AM nop head nop.head@gmail.com wrote:
if(is_undef(CrossSection) ? false : CrossSection) ...;
On Mon, 22 Mar 2021 at 15:38, david vanhorn kc6ete@gmail.com wrote:
I'm doing a complex design with multiple parts.
I need to be able to render and export each sub part independently.
I also need to see a cross section with all parts assembled.
I created an overview, using a boolean variable called CrossSection,
and in the sub parts, I would like to have them sectioned only if
CrossSection is true, but of course without the main file, CrossSection is
undefined.
In other languages I would do something like "If undef CrossSection
then CrossSection = false"
How can I implement this in OpenScad?
--
K1FZY (WA4TPW) SK 9/29/37-4/13/15
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
--
K1FZY (WA4TPW) SK 9/29/37-4/13/15
--
K1FZY (WA4TPW) SK 9/29/37-4/13/15
--
K1FZY (WA4TPW) SK 9/29/37-4/13/15
I've been writing code for a long time. I understand globals. If they
weren't occasionally useful, they wouldn't exist.
On Mon, Mar 22, 2021 at 11:21 AM A. Craig West <acraigwest@gmail.com> wrote:
> The general consensus amongst programmers is that using global variables
> is rarely a good idea, the easiest and most understandable way to do this
> is by adding CrossSection as an argument to the module...
>
> On Mon, Mar 22, 2021 at 1:10 PM david vanhorn <kc6ete@gmail.com> wrote:
>
>> Well.. I thought I understood it..
>>
>> // If we're running this file without calling it from the top level file,
>> then CrossSection is undefined.
>>
>> if (is_undef(CrossSection)){
>> CrossSection = false; // So set it to false
>> }
>>
>> // Now use echos to check that CrossSection has been set
>> if (is_undef(CrossSection)){
>> echo("CrossSection is undefined");
>> }
>> if (false == CrossSection){
>> echo("CrossSection is false");
>> }
>> if (true==CrossSection){
>> echo("CrossSection is true");
>> }
>>
>>
>> Output:
>>
>> ECHO:"CrossSection is undefined"
>>
>> On Mon, Mar 22, 2021 at 10:31 AM david vanhorn <kc6ete@gmail.com> wrote:
>>
>>> Ok, I think I have it now.
>>> Not quite the same, but it's working for me
>>>
>>> CrossSection = !is_undef(CrossSection);
>>> if (false == CrossSection){
>>> echo("Printable part generation of CH_Part_Lock");
>>> } else {
>>> echo("Generating cross section of CH_Part_Lock");
>>> }
>>>
>>> Then at the bottom of the file:
>>>
>>> // Show the part alone if we're only running this file
>>> if (false == CrossSection){
>>> echo("Showing part");
>>> TwistLockF(); // This could be printed separately
>>> }
>>>
>>> On Mon, Mar 22, 2021 at 9:52 AM david vanhorn <kc6ete@gmail.com> wrote:
>>>
>>>> I'm not quite seeing it.
>>>> How would I apply it here:
>>>>
>>>> module HandleFront(){
>>>> render()
>>>> difference(){
>>>> HandleFrontFull();
>>>> // I'd like to turn this element on or off based on CrossSection
>>>> HalfClip(); //
>>>> }
>>>> }// end of difference
>>>> }// end of module
>>>>
>>>> So I assume that earlier in this file, I should use the if Is_undef to
>>>> set CrossSection to false, but I'm not understanding how.
>>>>
>>>>
>>>>
>>>> On Mon, Mar 22, 2021 at 9:40 AM nop head <nop.head@gmail.com> wrote:
>>>>
>>>>> if(is_undef(CrossSection) ? false : CrossSection) ...;
>>>>>
>>>>> On Mon, 22 Mar 2021 at 15:38, david vanhorn <kc6ete@gmail.com> wrote:
>>>>>
>>>>>> I'm doing a complex design with multiple parts.
>>>>>> I need to be able to render and export each sub part independently.
>>>>>> I also need to see a cross section with all parts assembled.
>>>>>>
>>>>>> I created an overview, using a boolean variable called CrossSection,
>>>>>> and in the sub parts, I would like to have them sectioned only if
>>>>>> CrossSection is true, but of course without the main file, CrossSection is
>>>>>> undefined.
>>>>>>
>>>>>> In other languages I would do something like "If undef CrossSection
>>>>>> then CrossSection = false"
>>>>>>
>>>>>> How can I implement this in OpenScad?
>>>>>>
>>>>>> --
>>>>>> K1FZY (WA4TPW) SK 9/29/37-4/13/15
>>>>>> _______________________________________________
>>>>>> OpenSCAD mailing list
>>>>>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>>>>>
>>>>> _______________________________________________
>>>>> OpenSCAD mailing list
>>>>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>>>>
>>>>
>>>>
>>>> --
>>>> K1FZY (WA4TPW) SK 9/29/37-4/13/15
>>>>
>>>
>>>
>>> --
>>> K1FZY (WA4TPW) SK 9/29/37-4/13/15
>>>
>>
>>
>> --
>> K1FZY (WA4TPW) SK 9/29/37-4/13/15
>> _______________________________________________
>> OpenSCAD mailing list
>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
--
K1FZY (WA4TPW) SK 9/29/37-4/13/15
J
jon
Mon, Mar 22, 2021 6:23 PM
I agree...
On 3/22/2021 2:16 PM, david vanhorn wrote:
I've been writing code for a long time. I understand globals. If they
weren't occasionally useful, they wouldn't exist.
I agree...
On 3/22/2021 2:16 PM, david vanhorn wrote:
> I've been writing code for a long time. I understand globals. If they
> weren't occasionally useful, they wouldn't exist.
>
DV
david vanhorn
Mon, Mar 22, 2021 6:44 PM
Ok using the function approach works for me, all my sub parts are now
generating completely if invoked separately, and in cutaway when invoked
from the cross section file.
However... :)
From the cross section file, a preview is taking a while to generate, and
when it's done there are issues.
Rotating or zooming is VERY slow, and it looks like the cross sectioning is
only happening on some angles (??)
Also my torus part is only partially generating. Possibly it is clipping
and the rest are not?
Parsing design (AST generation)...
Compiling design (CSG Tree generation)...
Compiling design (CSG Products generation)...
Geometries in cache: 91
Geometry cache size in bytes: 10194352
CGAL Polyhedrons in cache: 22
CGAL cache size in bytes: 96578656
Compiling design (CSG Products normalization)...
Normalized tree has 2085 elements!
Compile and preview finished.
Total rendering time: 0:00:00.321
See the files Xsection..
If I render the file, it all looks exactly like it should.
Rotations and zooms are fast and smooth, and everything works as it should,
and it looks good from all angles.
I don't get any warnings in either case.
Geometries in cache: 91
Geometry cache size in bytes: 10194352
CGAL Polyhedrons in cache: 22
CGAL cache size in bytes: 96578656
Total rendering time: 0:03:27.306
Top level object is a 3D object:
Simple: yes
Vertices: 7825
Halfedges: 37910
Edges: 18955
Halffacets: 22280
Facets: 11140
Volumes: 6
Rendering finished.
On Mon, Mar 22, 2021 at 11:25 AM nop head nop.head@gmail.com wrote:
You can't change variables in OpenSCAD.
if (is_undef(CrossSection)){
CrossSection = false; // So set it to false
}
Simply creates a new variable: CrossSection, that only exists between the
braces.
You can create a new variable. Like this.
DoSection = !is_undef(CrossSection) && CrossSection;
Or you could use a function.
function CrossSection() = !is_undef(CrossSection) && CrossSection;
Then do:
if(CrossSection()) {
...
}
On Mon, 22 Mar 2021 at 17:10, david vanhorn kc6ete@gmail.com wrote:
Well.. I thought I understood it..
// If we're running this file without calling it from the top level file,
then CrossSection is undefined.
if (is_undef(CrossSection)){
CrossSection = false; // So set it to false
}
// Now use echos to check that CrossSection has been set
if (is_undef(CrossSection)){
echo("CrossSection is undefined");
}
if (false == CrossSection){
echo("CrossSection is false");
}
if (true==CrossSection){
echo("CrossSection is true");
}
Output:
ECHO:"CrossSection is undefined"
On Mon, Mar 22, 2021 at 10:31 AM david vanhorn kc6ete@gmail.com wrote:
Ok, I think I have it now.
Not quite the same, but it's working for me
CrossSection = !is_undef(CrossSection);
if (false == CrossSection){
echo("Printable part generation of CH_Part_Lock");
} else {
echo("Generating cross section of CH_Part_Lock");
}
Then at the bottom of the file:
// Show the part alone if we're only running this file
if (false == CrossSection){
echo("Showing part");
TwistLockF(); // This could be printed separately
}
On Mon, Mar 22, 2021 at 9:52 AM david vanhorn kc6ete@gmail.com wrote:
I'm not quite seeing it.
How would I apply it here:
module HandleFront(){
render()
difference(){
HandleFrontFull();
// I'd like to turn this element on or off based on CrossSection
HalfClip(); //
}
}// end of difference
}// end of module
So I assume that earlier in this file, I should use the if Is_undef to
set CrossSection to false, but I'm not understanding how.
On Mon, Mar 22, 2021 at 9:40 AM nop head nop.head@gmail.com wrote:
if(is_undef(CrossSection) ? false : CrossSection) ...;
On Mon, 22 Mar 2021 at 15:38, david vanhorn kc6ete@gmail.com wrote:
I'm doing a complex design with multiple parts.
I need to be able to render and export each sub part independently.
I also need to see a cross section with all parts assembled.
I created an overview, using a boolean variable called CrossSection,
and in the sub parts, I would like to have them sectioned only if
CrossSection is true, but of course without the main file, CrossSection is
undefined.
In other languages I would do something like "If undef CrossSection
then CrossSection = false"
How can I implement this in OpenScad?
--
K1FZY (WA4TPW) SK 9/29/37-4/13/15
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
--
K1FZY (WA4TPW) SK 9/29/37-4/13/15
--
K1FZY (WA4TPW) SK 9/29/37-4/13/15
--
K1FZY (WA4TPW) SK 9/29/37-4/13/15
Ok using the function approach works for me, all my sub parts are now
generating completely if invoked separately, and in cutaway when invoked
from the cross section file.
However... :)
From the cross section file, a preview is taking a while to generate, and
when it's done there are issues.
Rotating or zooming is VERY slow, and it looks like the cross sectioning is
only happening on some angles (??)
Also my torus part is only partially generating. Possibly it is clipping
and the rest are not?
Parsing design (AST generation)...
Compiling design (CSG Tree generation)...
Compiling design (CSG Products generation)...
Geometries in cache: 91
Geometry cache size in bytes: 10194352
CGAL Polyhedrons in cache: 22
CGAL cache size in bytes: 96578656
Compiling design (CSG Products normalization)...
Normalized tree has 2085 elements!
Compile and preview finished.
Total rendering time: 0:00:00.321
See the files Xsection..
If I render the file, it all looks exactly like it should.
Rotations and zooms are fast and smooth, and everything works as it should,
and it looks good from all angles.
I don't get any warnings in either case.
Geometries in cache: 91
Geometry cache size in bytes: 10194352
CGAL Polyhedrons in cache: 22
CGAL cache size in bytes: 96578656
Total rendering time: 0:03:27.306
Top level object is a 3D object:
Simple: yes
Vertices: 7825
Halfedges: 37910
Edges: 18955
Halffacets: 22280
Facets: 11140
Volumes: 6
Rendering finished.
On Mon, Mar 22, 2021 at 11:25 AM nop head <nop.head@gmail.com> wrote:
> You can't change variables in OpenSCAD.
>
> if (is_undef(CrossSection)){
> CrossSection = false; // So set it to false
> }
>
> Simply creates a new variable: CrossSection, that only exists between the
> braces.
>
> You can create a new variable. Like this.
>
> DoSection = !is_undef(CrossSection) && CrossSection;
>
> Or you could use a function.
>
> function CrossSection() = !is_undef(CrossSection) && CrossSection;
>
> Then do:
>
> if(CrossSection()) {
> ...
> }
>
>
>
>
>
> On Mon, 22 Mar 2021 at 17:10, david vanhorn <kc6ete@gmail.com> wrote:
>
>> Well.. I thought I understood it..
>>
>> // If we're running this file without calling it from the top level file,
>> then CrossSection is undefined.
>>
>> if (is_undef(CrossSection)){
>> CrossSection = false; // So set it to false
>> }
>>
>> // Now use echos to check that CrossSection has been set
>> if (is_undef(CrossSection)){
>> echo("CrossSection is undefined");
>> }
>> if (false == CrossSection){
>> echo("CrossSection is false");
>> }
>> if (true==CrossSection){
>> echo("CrossSection is true");
>> }
>>
>>
>> Output:
>>
>> ECHO:"CrossSection is undefined"
>>
>> On Mon, Mar 22, 2021 at 10:31 AM david vanhorn <kc6ete@gmail.com> wrote:
>>
>>> Ok, I think I have it now.
>>> Not quite the same, but it's working for me
>>>
>>> CrossSection = !is_undef(CrossSection);
>>> if (false == CrossSection){
>>> echo("Printable part generation of CH_Part_Lock");
>>> } else {
>>> echo("Generating cross section of CH_Part_Lock");
>>> }
>>>
>>> Then at the bottom of the file:
>>>
>>> // Show the part alone if we're only running this file
>>> if (false == CrossSection){
>>> echo("Showing part");
>>> TwistLockF(); // This could be printed separately
>>> }
>>>
>>> On Mon, Mar 22, 2021 at 9:52 AM david vanhorn <kc6ete@gmail.com> wrote:
>>>
>>>> I'm not quite seeing it.
>>>> How would I apply it here:
>>>>
>>>> module HandleFront(){
>>>> render()
>>>> difference(){
>>>> HandleFrontFull();
>>>> // I'd like to turn this element on or off based on CrossSection
>>>> HalfClip(); //
>>>> }
>>>> }// end of difference
>>>> }// end of module
>>>>
>>>> So I assume that earlier in this file, I should use the if Is_undef to
>>>> set CrossSection to false, but I'm not understanding how.
>>>>
>>>>
>>>>
>>>> On Mon, Mar 22, 2021 at 9:40 AM nop head <nop.head@gmail.com> wrote:
>>>>
>>>>> if(is_undef(CrossSection) ? false : CrossSection) ...;
>>>>>
>>>>> On Mon, 22 Mar 2021 at 15:38, david vanhorn <kc6ete@gmail.com> wrote:
>>>>>
>>>>>> I'm doing a complex design with multiple parts.
>>>>>> I need to be able to render and export each sub part independently.
>>>>>> I also need to see a cross section with all parts assembled.
>>>>>>
>>>>>> I created an overview, using a boolean variable called CrossSection,
>>>>>> and in the sub parts, I would like to have them sectioned only if
>>>>>> CrossSection is true, but of course without the main file, CrossSection is
>>>>>> undefined.
>>>>>>
>>>>>> In other languages I would do something like "If undef CrossSection
>>>>>> then CrossSection = false"
>>>>>>
>>>>>> How can I implement this in OpenScad?
>>>>>>
>>>>>> --
>>>>>> K1FZY (WA4TPW) SK 9/29/37-4/13/15
>>>>>> _______________________________________________
>>>>>> OpenSCAD mailing list
>>>>>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>>>>>
>>>>> _______________________________________________
>>>>> OpenSCAD mailing list
>>>>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>>>>
>>>>
>>>>
>>>> --
>>>> K1FZY (WA4TPW) SK 9/29/37-4/13/15
>>>>
>>>
>>>
>>> --
>>> K1FZY (WA4TPW) SK 9/29/37-4/13/15
>>>
>>
>>
>> --
>> K1FZY (WA4TPW) SK 9/29/37-4/13/15
>> _______________________________________________
>> OpenSCAD mailing list
>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
--
K1FZY (WA4TPW) SK 9/29/37-4/13/15
JB
Jordan Brown
Mon, Mar 22, 2021 7:02 PM
On 3/22/2021 11:44 AM, david vanhorn wrote:
From the cross section file, a preview is taking a while to generate,
and when it's done there are issues.
Rotating or zooming is VERY slow, and it looks like the cross
sectioning is only happening on some angles (??)
Also my torus part is only partially generating. Possibly it is
clipping and the rest are not?
I can't really speak to the performance issue.
Preview gets two common artifacts that are angle-sensitive.
Some of the operations have a "convexity" parameter that hints to the
previewer how complex the object is. It defaults to 1, which is a
terrible default. There's almost no penalty to setting it to 10. The
symptom is that some pieces of the model end up transparent.
The previewer doesn't like it if the camera is inside any part of the
model - including the big cubes that you might be using for clipping,
whether using intersection or difference. Keep the camera outside those
cubes. I've never really characterized the misbehavior, but it can lead
to parts of the model appearing and disappearing.
On 3/22/2021 11:44 AM, david vanhorn wrote:
> From the cross section file, a preview is taking a while to generate,
> and when it's done there are issues.
> Rotating or zooming is VERY slow, and it looks like the cross
> sectioning is only happening on some angles (??)
> Also my torus part is only partially generating. Possibly it is
> clipping and the rest are not?
I can't really speak to the performance issue.
Preview gets two common artifacts that are angle-sensitive.
Some of the operations have a "convexity" parameter that hints to the
previewer how complex the object is. It defaults to 1, which is a
terrible default. There's almost no penalty to setting it to 10. The
symptom is that some pieces of the model end up transparent.
The previewer doesn't like it if the camera is inside any part of the
model - including the big cubes that you might be using for clipping,
whether using intersection or difference. Keep the camera outside those
cubes. I've never really characterized the misbehavior, but it can lead
to parts of the model appearing and disappearing.
DV
david vanhorn
Mon, Mar 22, 2021 7:08 PM
Ok, I am using a big cube for clipping. Kinda unavoidable.
I have long wished for clipping planes as implemented in PovRay. No
dimensioning necessary, everything on one side of the plane is gone, the
rest stays.
On Mon, Mar 22, 2021 at 1:02 PM Jordan Brown openscad@jordan.maileater.net
wrote:
On 3/22/2021 11:44 AM, david vanhorn wrote:
From the cross section file, a preview is taking a while to generate, and
when it's done there are issues.
Rotating or zooming is VERY slow, and it looks like the cross sectioning
is only happening on some angles (??)
Also my torus part is only partially generating. Possibly it is clipping
and the rest are not?
I can't really speak to the performance issue.
Preview gets two common artifacts that are angle-sensitive.
Some of the operations have a "convexity" parameter that hints to the
previewer how complex the object is. It defaults to 1, which is a terrible
default. There's almost no penalty to setting it to 10. The symptom is
that some pieces of the model end up transparent.
The previewer doesn't like it if the camera is inside any part of the
model - including the big cubes that you might be using for clipping,
whether using intersection or difference. Keep the camera outside those
cubes. I've never really characterized the misbehavior, but it can lead to
parts of the model appearing and disappearing.
--
K1FZY (WA4TPW) SK 9/29/37-4/13/15
Ok, I am using a big cube for clipping. Kinda unavoidable.
I have long wished for clipping planes as implemented in PovRay. No
dimensioning necessary, everything on one side of the plane is gone, the
rest stays.
On Mon, Mar 22, 2021 at 1:02 PM Jordan Brown <openscad@jordan.maileater.net>
wrote:
> On 3/22/2021 11:44 AM, david vanhorn wrote:
>
> From the cross section file, a preview is taking a while to generate, and
> when it's done there are issues.
> Rotating or zooming is VERY slow, and it looks like the cross sectioning
> is only happening on some angles (??)
> Also my torus part is only partially generating. Possibly it is clipping
> and the rest are not?
>
>
> I can't really speak to the performance issue.
>
> Preview gets two common artifacts that are angle-sensitive.
>
> Some of the operations have a "convexity" parameter that hints to the
> previewer how complex the object is. It defaults to 1, which is a terrible
> default. There's almost no penalty to setting it to 10. The symptom is
> that some pieces of the model end up transparent.
>
> The previewer doesn't like it if the camera is inside any part of the
> model - including the big cubes that you might be using for clipping,
> whether using intersection or difference. Keep the camera outside those
> cubes. I've never really characterized the misbehavior, but it can lead to
> parts of the model appearing and disappearing.
>
>
--
K1FZY (WA4TPW) SK 9/29/37-4/13/15
JB
Jordan Brown
Mon, Mar 22, 2021 10:32 PM
On 3/22/2021 12:08 PM, david vanhorn wrote:
Ok, I am using a big cube for clipping. Kinda unavoidable.
I have long wished for clipping planes as implemented in PovRay. No
dimensioning necessary, everything on one side of the plane is gone,
the rest stays.
Yes. I have no idea whether the underlying tools (CGAL, OpenCSG) are
friendly to that notion. It'd kind of have to be a primitive, since
there are no infinite-size constructs in the language today.
On 3/22/2021 12:08 PM, david vanhorn wrote:
> Ok, I am using a big cube for clipping. Kinda unavoidable.
> I have long wished for clipping planes as implemented in PovRay. No
> dimensioning necessary, everything on one side of the plane is gone,
> the rest stays.
Yes. I have no idea whether the underlying tools (CGAL, OpenCSG) are
friendly to that notion. It'd kind of have to be a primitive, since
there are no infinite-size constructs in the language today.
DV
david vanhorn
Mon, Mar 22, 2021 11:00 PM
On 3/22/2021 12:08 PM, david vanhorn wrote:
Ok, I am using a big cube for clipping. Kinda unavoidable.
I have long wished for clipping planes as implemented in PovRay. No
dimensioning necessary, everything on one side of the plane is gone, the
rest stays.
Yes. I have no idea whether the underlying tools (CGAL, OpenCSG) are
friendly to that notion. It'd kind of have to be a primitive, since there
are no infinite-size constructs in the language today.
Understood.
On Mon, Mar 22, 2021, 4:32 PM Jordan Brown <openscad@jordan.maileater.net>
wrote:
> On 3/22/2021 12:08 PM, david vanhorn wrote:
>
> Ok, I am using a big cube for clipping. Kinda unavoidable.
> I have long wished for clipping planes as implemented in PovRay. No
> dimensioning necessary, everything on one side of the plane is gone, the
> rest stays.
>
>
> Yes. I have no idea whether the underlying tools (CGAL, OpenCSG) are
> friendly to that notion. It'd kind of have to be a primitive, since there
> are no infinite-size constructs in the language today.
>
>
NH
nop head
Mon, Mar 22, 2021 11:29 PM
OpenCSG preview draws differences by using graphics operations, so it
draws all the negative objects. If they are too big to fit within the
clipping region faces outside the region are not drawn. That breaks the CGS
operation.
It is best not to subtract massive objects if a smaller one will do the job
or you can use render() to calculate the resulting geometry and just draw
that as a polyhedron. Then you can zoom in as far as you want
On Mon, 22 Mar 2021 at 23:00, david vanhorn kc6ete@gmail.com wrote:
On 3/22/2021 12:08 PM, david vanhorn wrote:
Ok, I am using a big cube for clipping. Kinda unavoidable.
I have long wished for clipping planes as implemented in PovRay. No
dimensioning necessary, everything on one side of the plane is gone, the
rest stays.
Yes. I have no idea whether the underlying tools (CGAL, OpenCSG) are
friendly to that notion. It'd kind of have to be a primitive, since there
are no infinite-size constructs in the language today.
OpenCSG preview draws differences by using graphics operations, so it
draws all the negative objects. If they are too big to fit within the
clipping region faces outside the region are not drawn. That breaks the CGS
operation.
It is best not to subtract massive objects if a smaller one will do the job
or you can use render() to calculate the resulting geometry and just draw
that as a polyhedron. Then you can zoom in as far as you want
On Mon, 22 Mar 2021 at 23:00, david vanhorn <kc6ete@gmail.com> wrote:
> Understood.
>
> On Mon, Mar 22, 2021, 4:32 PM Jordan Brown <openscad@jordan.maileater.net>
> wrote:
>
>> On 3/22/2021 12:08 PM, david vanhorn wrote:
>>
>> Ok, I am using a big cube for clipping. Kinda unavoidable.
>> I have long wished for clipping planes as implemented in PovRay. No
>> dimensioning necessary, everything on one side of the plane is gone, the
>> rest stays.
>>
>>
>> Yes. I have no idea whether the underlying tools (CGAL, OpenCSG) are
>> friendly to that notion. It'd kind of have to be a primitive, since there
>> are no infinite-size constructs in the language today.
>>
>> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
LM
Leonard Martin Struttmann
Tue, Mar 23, 2021 2:08 AM
I am new to OpenSCAD and I am finding that I, also, use the Big Cube method
for clipping.
Is there a way to get the maximum dimensions (preferably in all six
directions from center) of an assembly? This would help in quickly
creating a reasonably sized cube for clipping.
Thanks!
On Mon, Mar 22, 2021 at 5:32 PM Jordan Brown openscad@jordan.maileater.net
wrote:
On 3/22/2021 12:08 PM, david vanhorn wrote:
Ok, I am using a big cube for clipping. Kinda unavoidable.
I have long wished for clipping planes as implemented in PovRay. No
dimensioning necessary, everything on one side of the plane is gone, the
rest stays.
Yes. I have no idea whether the underlying tools (CGAL, OpenCSG) are
friendly to that notion. It'd kind of have to be a primitive, since there
are no infinite-size constructs in the language today.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
I am new to OpenSCAD and I am finding that I, also, use the Big Cube method
for clipping.
Is there a way to get the maximum dimensions (preferably in all six
directions from center) of an assembly? This would help in quickly
creating a reasonably sized cube for clipping.
Thanks!
On Mon, Mar 22, 2021 at 5:32 PM Jordan Brown <openscad@jordan.maileater.net>
wrote:
> On 3/22/2021 12:08 PM, david vanhorn wrote:
>
> Ok, I am using a big cube for clipping. Kinda unavoidable.
> I have long wished for clipping planes as implemented in PovRay. No
> dimensioning necessary, everything on one side of the plane is gone, the
> rest stays.
>
>
> Yes. I have no idea whether the underlying tools (CGAL, OpenCSG) are
> friendly to that notion. It'd kind of have to be a primitive, since there
> are no infinite-size constructs in the language today.
>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>