discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Request for Plane Primitive

R
Richy_T
Mon, Dec 26, 2016 6:27 AM

Sometimes, especially if you're 3D printing, you just want to cut off
everything beyond a certain value. You can sort-of do this with a large cube
but it's easy to make errors and if your camera ends up inside the cube, you
get weird things happening so it would be really useful just to have a
plane() primitive that you can just do difference() against or whatever.

Presumably there would have to be some restrictions because I'm guessing you
couldn't export an actual plane to an stl file and other such fun things but
as a virtual object, it would be extremely useful.

--
View this message in context: http://forum.openscad.org/Request-for-Plane-Primitive-tp19750.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Sometimes, especially if you're 3D printing, you just want to cut off everything beyond a certain value. You can sort-of do this with a large cube but it's easy to make errors and if your camera ends up inside the cube, you get weird things happening so it would be really useful just to have a plane() primitive that you can just do difference() against or whatever. Presumably there would have to be some restrictions because I'm guessing you couldn't export an actual plane to an stl file and other such fun things but as a virtual object, it would be extremely useful. -- View this message in context: http://forum.openscad.org/Request-for-Plane-Primitive-tp19750.html Sent from the OpenSCAD mailing list archive at Nabble.com.
FV
Frank van der Hulst
Mon, Dec 26, 2016 6:42 AM

I agree. It perhaps could also make mirror() more general.

On 26/12/2016 19:28, "Richy_T" sd@dicksonlife.com wrote:

Sometimes, especially if you're 3D printing, you just want to cut off
everything beyond a certain value. You can sort-of do this with a large
cube
but it's easy to make errors and if your camera ends up inside the cube,
you
get weird things happening so it would be really useful just to have a
plane() primitive that you can just do difference() against or whatever.

Presumably there would have to be some restrictions because I'm guessing
you
couldn't export an actual plane to an stl file and other such fun things
but
as a virtual object, it would be extremely useful.

--
View this message in context: http://forum.openscad.org/
Request-for-Plane-Primitive-tp19750.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

I agree. It perhaps could also make mirror() more general. On 26/12/2016 19:28, "Richy_T" <sd@dicksonlife.com> wrote: > Sometimes, especially if you're 3D printing, you just want to cut off > everything beyond a certain value. You can sort-of do this with a large > cube > but it's easy to make errors and if your camera ends up inside the cube, > you > get weird things happening so it would be really useful just to have a > plane() primitive that you can just do difference() against or whatever. > > Presumably there would have to be some restrictions because I'm guessing > you > couldn't export an actual plane to an stl file and other such fun things > but > as a virtual object, it would be extremely useful. > > > > -- > View this message in context: http://forum.openscad.org/ > Request-for-Plane-Primitive-tp19750.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 >
NH
nop head
Mon, Dec 26, 2016 9:47 AM

You can get rid of the camera problems by using render() or intersection()
instead of difference().

On 26 December 2016 at 06:42, Frank van der Hulst drifter.frank@gmail.com
wrote:

I agree. It perhaps could also make mirror() more general.

On 26/12/2016 19:28, "Richy_T" sd@dicksonlife.com wrote:

Sometimes, especially if you're 3D printing, you just want to cut off
everything beyond a certain value. You can sort-of do this with a large
cube
but it's easy to make errors and if your camera ends up inside the cube,
you
get weird things happening so it would be really useful just to have a
plane() primitive that you can just do difference() against or whatever.

Presumably there would have to be some restrictions because I'm guessing
you
couldn't export an actual plane to an stl file and other such fun things
but
as a virtual object, it would be extremely useful.

--
View this message in context: http://forum.openscad.org/Requ
est-for-Plane-Primitive-tp19750.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

You can get rid of the camera problems by using render() or intersection() instead of difference(). On 26 December 2016 at 06:42, Frank van der Hulst <drifter.frank@gmail.com> wrote: > I agree. It perhaps could also make mirror() more general. > > On 26/12/2016 19:28, "Richy_T" <sd@dicksonlife.com> wrote: > >> Sometimes, especially if you're 3D printing, you just want to cut off >> everything beyond a certain value. You can sort-of do this with a large >> cube >> but it's easy to make errors and if your camera ends up inside the cube, >> you >> get weird things happening so it would be really useful just to have a >> plane() primitive that you can just do difference() against or whatever. >> >> Presumably there would have to be some restrictions because I'm guessing >> you >> couldn't export an actual plane to an stl file and other such fun things >> but >> as a virtual object, it would be extremely useful. >> >> >> >> -- >> View this message in context: http://forum.openscad.org/Requ >> est-for-Plane-Primitive-tp19750.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 >> > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > >
J
jon
Mon, Dec 26, 2016 12:31 PM

I've never had a problem using difference() and a cube.

On 12/26/2016 1:42 AM, Frank van der Hulst wrote:

I agree. It perhaps could also make mirror() more general.

On 26/12/2016 19:28, "Richy_T" <sd@dicksonlife.com
mailto:sd@dicksonlife.com> wrote:

 Sometimes, especially if you're 3D printing, you just want to cut off
 everything beyond a certain value. You can sort-of do this with a
 large cube
 but it's easy to make errors and if your camera ends up inside the
 cube, you
 get weird things happening so it would be really useful just to have a
 plane() primitive that you can just do difference() against or
 whatever.

 Presumably there would have to be some restrictions because I'm
 guessing you
 couldn't export an actual plane to an stl file and other such fun
 things but
 as a virtual object, it would be extremely useful.
I've never had a problem using difference() and a cube. On 12/26/2016 1:42 AM, Frank van der Hulst wrote: > I agree. It perhaps could also make mirror() more general. > > On 26/12/2016 19:28, "Richy_T" <sd@dicksonlife.com > <mailto:sd@dicksonlife.com>> wrote: > > Sometimes, especially if you're 3D printing, you just want to cut off > everything beyond a certain value. You can sort-of do this with a > large cube > but it's easy to make errors and if your camera ends up inside the > cube, you > get weird things happening so it would be really useful just to have a > plane() primitive that you can just do difference() against or > whatever. > > Presumably there would have to be some restrictions because I'm > guessing you > couldn't export an actual plane to an stl file and other such fun > things but > as a virtual object, it would be extremely useful. >
NH
nop head
Mon, Dec 26, 2016 12:35 PM

The problem is that when viewed with F5 the camera has to be outside the
big cube you use as a substitute for a plane. This is because OpenCSG does
not draw the cube if any of it is beyond the clipping plane.

On 26 December 2016 at 12:31, jon jon@jonbondy.com wrote:

I've never had a problem using difference() and a cube.

On 12/26/2016 1:42 AM, Frank van der Hulst wrote:

I agree. It perhaps could also make mirror() more general.

On 26/12/2016 19:28, "Richy_T" sd@dicksonlife.com wrote:

Sometimes, especially if you're 3D printing, you just want to cut off
everything beyond a certain value. You can sort-of do this with a large
cube
but it's easy to make errors and if your camera ends up inside the cube,
you
get weird things happening so it would be really useful just to have a
plane() primitive that you can just do difference() against or whatever.

Presumably there would have to be some restrictions because I'm guessing
you
couldn't export an actual plane to an stl file and other such fun things
but
as a virtual object, it would be extremely useful.

The problem is that when viewed with F5 the camera has to be outside the big cube you use as a substitute for a plane. This is because OpenCSG does not draw the cube if any of it is beyond the clipping plane. On 26 December 2016 at 12:31, jon <jon@jonbondy.com> wrote: > I've never had a problem using difference() and a cube. > > On 12/26/2016 1:42 AM, Frank van der Hulst wrote: > > I agree. It perhaps could also make mirror() more general. > > On 26/12/2016 19:28, "Richy_T" <sd@dicksonlife.com> wrote: > >> Sometimes, especially if you're 3D printing, you just want to cut off >> everything beyond a certain value. You can sort-of do this with a large >> cube >> but it's easy to make errors and if your camera ends up inside the cube, >> you >> get weird things happening so it would be really useful just to have a >> plane() primitive that you can just do difference() against or whatever. >> >> Presumably there would have to be some restrictions because I'm guessing >> you >> couldn't export an actual plane to an stl file and other such fun things >> but >> as a virtual object, it would be extremely useful. >> >> > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > >
R
Richy_T
Mon, Dec 26, 2016 5:07 PM

Hmm, intersection() might be a plan. I'm not familiar with render() but I'll
give it a look.

--
View this message in context: http://forum.openscad.org/Request-for-Plane-Primitive-tp19750p19764.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Hmm, intersection() might be a plan. I'm not familiar with render() but I'll give it a look. -- View this message in context: http://forum.openscad.org/Request-for-Plane-Primitive-tp19750p19764.html Sent from the OpenSCAD mailing list archive at Nabble.com.
NH
nop head
Mon, Dec 26, 2016 5:30 PM

render() uses CGAL to actually compute the geometry and just leaves CGAL to
render the resulting polyhedron.

On 26 December 2016 at 17:07, Richy_T sd@dicksonlife.com wrote:

Hmm, intersection() might be a plan. I'm not familiar with render() but
I'll
give it a look.

--
View this message in context: http://forum.openscad.org/
Request-for-Plane-Primitive-tp19750p19764.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

render() uses CGAL to actually compute the geometry and just leaves CGAL to render the resulting polyhedron. On 26 December 2016 at 17:07, Richy_T <sd@dicksonlife.com> wrote: > Hmm, intersection() might be a plan. I'm not familiar with render() but > I'll > give it a look. > > > > -- > View this message in context: http://forum.openscad.org/ > Request-for-Plane-Primitive-tp19750p19764.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 >
FV
Frank van der Hulst
Mon, Dec 26, 2016 6:21 PM

One situation where it was a problem for me is dividing an imported STL
(aircraft model) into halves... you need to know the size of the object so
that you can draw a larger cube, but there's no way to find out what the
size of the STL is.

On Tue, Dec 27, 2016 at 1:31 AM, jon jon@jonbondy.com wrote:

I've never had a problem using difference() and a cube.

One situation where it was a problem for me is dividing an imported STL (aircraft model) into halves... you need to know the size of the object so that you can draw a larger cube, but there's no way to find out what the size of the STL is. On Tue, Dec 27, 2016 at 1:31 AM, jon <jon@jonbondy.com> wrote: > I've never had a problem using difference() and a cube. > > >
RP
Ronaldo Persiano
Mon, Dec 26, 2016 8:08 PM

That would be trivial with a bounding box information. I don't understand
how OpenSCAD do resize() without computing a bounding box. And if it is
computed, why it is not available by a language function.

2016-12-26 16:21 GMT-02:00 Frank van der Hulst drifter.frank@gmail.com:

One situation where it was a problem for me is dividing an imported STL
(aircraft model) into halves... you need to know the size of the object so
that you can draw a larger cube, but there's no way to find out what the
size of the STL is.

That would be trivial with a bounding box information. I don't understand how OpenSCAD do resize() without computing a bounding box. And if it is computed, why it is not available by a language function. 2016-12-26 16:21 GMT-02:00 Frank van der Hulst <drifter.frank@gmail.com>: > One situation where it was a problem for me is dividing an imported STL > (aircraft model) into halves... you need to know the size of the object so > that you can draw a larger cube, but there's no way to find out what the > size of the STL is. > >