L
larry
Fri, Dec 27, 2024 5:18 PM
I am trying to reproduce a part for a relative.
It will be a box with one rounded corner.
I started off using cuboid(), because I did not see a way to use rect()
or square() to round one corner.
With this code, if I use F5, the bottom and top of the inner part of
the box show up, with the top coloured by the '#'. If I remove the '#'
it does not show up, and in both cases, F6 produced only the bottom (or
perhaps it's the bottom).
Can I not move a projection vertically?
//----------
include <BOSL2/std.scad>
$fn= $preview ? 60 : 180;
hull() {
inner_bottom();
#up(52.5) inner_top();
}
module inner_bottom() {
projection()
cuboid([146,40,1],rounding=8,edges=[FWD+RIGHT]);
}
module inner_top() {
projection() {
cuboid([148,46,1],rounding=8,edges=[FWD+RIGHT]);
}
}
//----------
I am trying to reproduce a part for a relative.
It will be a box with one rounded corner.
I started off using cuboid(), because I did not see a way to use rect()
or square() to round one corner.
With this code, if I use F5, the bottom and top of the inner part of
the box show up, with the top coloured by the '#'. If I remove the '#'
it does not show up, and in both cases, F6 produced only the bottom (or
perhaps it's the bottom).
Can I not move a projection vertically?
//----------
include <BOSL2/std.scad>
$fn= $preview ? 60 : 180;
hull() {
inner_bottom();
#up(52.5) inner_top();
}
module inner_bottom() {
projection()
cuboid([146,40,1],rounding=8,edges=[FWD+RIGHT]);
}
module inner_top() {
projection() {
cuboid([148,46,1],rounding=8,edges=[FWD+RIGHT]);
}
}
//----------
AM
Adrian Mariano
Fri, Dec 27, 2024 5:32 PM
Larry, I think projections are 2d so you can't hull them in 3d. Maybe if
you linear extrude them first?
But it may be that the right way to do what you want is:
prismoid([148,45],[146,40],52.5, rounding=[8,0,0,0]);
And also note that rect() can round corners individually. But you'll still
have issues with hulling 2d objects to make something 3d.
On Fri, Dec 27, 2024 at 12:18 PM larry via Discuss <
discuss@lists.openscad.org> wrote:
I am trying to reproduce a part for a relative.
It will be a box with one rounded corner.
I started off using cuboid(), because I did not see a way to use rect()
or square() to round one corner.
With this code, if I use F5, the bottom and top of the inner part of
the box show up, with the top coloured by the '#'. If I remove the '#'
it does not show up, and in both cases, F6 produced only the bottom (or
perhaps it's the bottom).
Can I not move a projection vertically?
//----------
include <BOSL2/std.scad>
$fn= $preview ? 60 : 180;
hull() {
inner_bottom();
#up(52.5) inner_top();
}
module inner_bottom() {
projection()
cuboid([146,40,1],rounding=8,edges=[FWD+RIGHT]);
}
module inner_top() {
projection() {
cuboid([148,46,1],rounding=8,edges=[FWD+RIGHT]);
}
}
//----------
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
Larry, I think projections are 2d so you can't hull them in 3d. Maybe if
you linear extrude them first?
But it may be that the right way to do what you want is:
prismoid([148,45],[146,40],52.5, rounding=[8,0,0,0]);
And also note that rect() can round corners individually. But you'll still
have issues with hulling 2d objects to make something 3d.
On Fri, Dec 27, 2024 at 12:18 PM larry via Discuss <
discuss@lists.openscad.org> wrote:
> I am trying to reproduce a part for a relative.
> It will be a box with one rounded corner.
> I started off using cuboid(), because I did not see a way to use rect()
> or square() to round one corner.
>
> With this code, if I use F5, the bottom and top of the inner part of
> the box show up, with the top coloured by the '#'. If I remove the '#'
> it does not show up, and in both cases, F6 produced only the bottom (or
> perhaps it's the bottom).
>
> Can I not move a projection vertically?
>
> //----------
> include <BOSL2/std.scad>
> $fn= $preview ? 60 : 180;
>
> hull() {
> inner_bottom();
> #up(52.5) inner_top();
> }
> module inner_bottom() {
> projection()
> cuboid([146,40,1],rounding=8,edges=[FWD+RIGHT]);
> }
>
> module inner_top() {
> projection() {
> cuboid([148,46,1],rounding=8,edges=[FWD+RIGHT]);
> }
> }
> //----------
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
RW
Raymond West
Fri, Dec 27, 2024 7:10 PM
I used to round edges by differencing from an extruded cruciform shaped
module.
Maybe this will help. If it is a corner you want, then the same sort of
thing - difference a cube with spheres subtracted.
module rounder(r=5){
linear_extrude(1000){ // make plenty long enough
d=2*r;
difference(){
square(d,true);
translate ([r,r]) circle(d=d);
translate ([-r,r])circle(d=d);
translate ([-r,-r])circle(d=d);
translate ([r,-r])circle(d=d);
}
}
}
// how to use
difference(){
cube (100);
translate ([100,0,-10])
rounder(12);
translate ([0,100,-10])
rounder (15);
translate([100,-10,100])
rotate([-90,0,0])
#rounder(10);
}
On 27/12/2024 17:18, larry via Discuss wrote:
I am trying to reproduce a part for a relative.
It will be a box with one rounded corner.
I started off using cuboid(), because I did not see a way to use rect()
or square() to round one corner.
With this code, if I use F5, the bottom and top of the inner part of
the box show up, with the top coloured by the '#'. If I remove the '#'
it does not show up, and in both cases, F6 produced only the bottom (or
perhaps it's the bottom).
Can I not move a projection vertically?
//----------
include <BOSL2/std.scad>
$fn= $preview ? 60 : 180;
hull() {
inner_bottom();
#up(52.5) inner_top();
}
module inner_bottom() {
projection()
cuboid([146,40,1],rounding=8,edges=[FWD+RIGHT]);
}
module inner_top() {
projection() {
cuboid([148,46,1],rounding=8,edges=[FWD+RIGHT]);
}
}
//----------
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
I used to round edges by differencing from an extruded cruciform shaped
module.
Maybe this will help. If it is a corner you want, then the same sort of
thing - difference a cube with spheres subtracted.
module rounder(r=5){
linear_extrude(1000){ // make plenty long enough
d=2*r;
difference(){
square(d,true);
translate ([r,r]) circle(d=d);
translate ([-r,r])circle(d=d);
translate ([-r,-r])circle(d=d);
translate ([r,-r])circle(d=d);
}
}
}
// how to use
difference(){
cube (100);
translate ([100,0,-10])
rounder(12);
translate ([0,100,-10])
rounder (15);
translate([100,-10,100])
rotate([-90,0,0])
#rounder(10);
}
On 27/12/2024 17:18, larry via Discuss wrote:
> I am trying to reproduce a part for a relative.
> It will be a box with one rounded corner.
> I started off using cuboid(), because I did not see a way to use rect()
> or square() to round one corner.
>
> With this code, if I use F5, the bottom and top of the inner part of
> the box show up, with the top coloured by the '#'. If I remove the '#'
> it does not show up, and in both cases, F6 produced only the bottom (or
> perhaps it's the bottom).
>
> Can I not move a projection vertically?
>
> //----------
> include <BOSL2/std.scad>
> $fn= $preview ? 60 : 180;
>
> hull() {
> inner_bottom();
> #up(52.5) inner_top();
> }
> module inner_bottom() {
> projection()
> cuboid([146,40,1],rounding=8,edges=[FWD+RIGHT]);
> }
>
> module inner_top() {
> projection() {
> cuboid([148,46,1],rounding=8,edges=[FWD+RIGHT]);
> }
> }
> //----------
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
L
larry
Fri, Dec 27, 2024 7:43 PM
On Fri, 2024-12-27 at 12:32 -0500, Adrian Mariano via Discuss wrote:
Larry, I think projections are 2d so you can't hull them in 3d.
Maybe if you linear extrude them first?
Thanks, I hadn't thought of that. I was sure I had made 3D out of the
hull of 2 2D figures.
But it may be that the right way to do what you want is:
prismoid([148,45],[146,40],52.5, rounding=[8,0,0,0]);
I didn't try that because the top of the box has to be offset from the
bottom by an amount I have yet to calculate.
And also note that rect() can round corners individually. But you'll
still have issues with hulling 2d objects to make something 3d.
The reason I wanted to use hull() is because I wanted to use offset()
to round the outer corners of the square inner corners.
Here's what I tried first. It works, but I can't round the outer square
corners with offset. I do see how I could do it, using projection, but
I thought I could do it all with 2d to 3d.
//---------
include <BOSL2/std.scad>
$fn= $preview ? 60 : 180;
difference(){
#outside();
up(2) inside();
}
module inside() {
hull() {
up(0.5) cuboid([146,40,1],rounding=8,edges=[FWD+RIGHT]);
up(52.5) cuboid([148,46,1],rounding=8,edges=[FWD+RIGHT]);
}
}
module outside() {
hull() {
up(0.5) cuboid([150,44,1],rounding=10,edges=[FWD+RIGHT]);
up(52.5) cuboid([154,50,1],rounding=10,edges=[FWD+RIGHT]);
}
}
//---------
I am trying to reproduce a part for a relative.
It will be a box with one rounded corner.
I started off using cuboid(), because I did not see a way to use
rect()
or square() to round one corner.
With this code, if I use F5, the bottom and top of the inner part
of
the box show up, with the top coloured by the '#'. If I remove the
'#'
it does not show up, and in both cases, F6 produced only the bottom
(or
perhaps it's the bottom).
Can I not move a projection vertically?
//----------
include <BOSL2/std.scad>
$fn= $preview ? 60 : 180;
hull() {
inner_bottom();
#up(52.5) inner_top();
}
module inner_bottom() {
projection()
cuboid([146,40,1],rounding=8,edges=[FWD+RIGHT]);
}
module inner_top() {
projection() {
cuboid([148,46,1],rounding=8,edges=[FWD+RIGHT]);
}
}
//----------
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
On Fri, 2024-12-27 at 12:32 -0500, Adrian Mariano via Discuss wrote:
> Larry, I think projections are 2d so you can't hull them in 3d.
> Maybe if you linear extrude them first?
Thanks, I hadn't thought of that. I was sure I had made 3D out of the
hull of 2 2D figures.
> But it may be that the right way to do what you want is:
> prismoid([148,45],[146,40],52.5, rounding=[8,0,0,0]);
I didn't try that because the top of the box has to be offset from the
bottom by an amount I have yet to calculate.
> And also note that rect() can round corners individually. But you'll
> still have issues with hulling 2d objects to make something 3d.
The reason I wanted to use hull() is because I wanted to use offset()
to round the outer corners of the square inner corners.
Here's what I tried first. It works, but I can't round the outer square
corners with offset. I do see how I could do it, using projection, but
I thought I could do it all with 2d to 3d.
//---------
include <BOSL2/std.scad>
$fn= $preview ? 60 : 180;
difference(){
#outside();
up(2) inside();
}
module inside() {
hull() {
up(0.5) cuboid([146,40,1],rounding=8,edges=[FWD+RIGHT]);
up(52.5) cuboid([148,46,1],rounding=8,edges=[FWD+RIGHT]);
}
}
module outside() {
hull() {
up(0.5) cuboid([150,44,1],rounding=10,edges=[FWD+RIGHT]);
up(52.5) cuboid([154,50,1],rounding=10,edges=[FWD+RIGHT]);
}
}
//---------
> On Fri, Dec 27, 2024 at 12:18 PM larry via Discuss
> <discuss@lists.openscad.org> wrote:
> > I am trying to reproduce a part for a relative.
> > It will be a box with one rounded corner.
> > I started off using cuboid(), because I did not see a way to use
> > rect()
> > or square() to round one corner.
> >
> > With this code, if I use F5, the bottom and top of the inner part
> > of
> > the box show up, with the top coloured by the '#'. If I remove the
> > '#'
> > it does not show up, and in both cases, F6 produced only the bottom
> > (or
> > perhaps it's the bottom).
> >
> > Can I not move a projection vertically?
> >
> > //----------
> > include <BOSL2/std.scad>
> > $fn= $preview ? 60 : 180;
> >
> > hull() {
> > inner_bottom();
> > #up(52.5) inner_top();
> > }
> > module inner_bottom() {
> > projection()
> > cuboid([146,40,1],rounding=8,edges=[FWD+RIGHT]);
> > }
> >
> > module inner_top() {
> > projection() {
> > cuboid([148,46,1],rounding=8,edges=[FWD+RIGHT]);
> > }
> > }
> > //----------
> > _______________________________________________
> > 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
AM
Adrian Mariano
Fri, Dec 27, 2024 7:57 PM
I didn't try that because the top of the box has to be offset from the
bottom by an amount I have yet to calculate.
You mean like this?
prismoid([148,45],[146,40],52.5, shift=[4,0], rounding=[8,0,0,0]);
I don't understand what the other rounding you need is. If you need a
prismoid with side edges and top edges rounded you can make that with
rounded_prism().
On Fri, Dec 27, 2024 at 2:44 PM larry via Discuss <
discuss@lists.openscad.org> wrote:
On Fri, 2024-12-27 at 12:32 -0500, Adrian Mariano via Discuss wrote:
Larry, I think projections are 2d so you can't hull them in 3d.
Maybe if you linear extrude them first?
Thanks, I hadn't thought of that. I was sure I had made 3D out of the
hull of 2 2D figures.
But it may be that the right way to do what you want is:
prismoid([148,45],[146,40],52.5, rounding=[8,0,0,0]);
I didn't try that because the top of the box has to be offset from the
bottom by an amount I have yet to calculate.
And also note that rect() can round corners individually. But you'll
still have issues with hulling 2d objects to make something 3d.
The reason I wanted to use hull() is because I wanted to use offset()
to round the outer corners of the square inner corners.
Here's what I tried first. It works, but I can't round the outer square
corners with offset. I do see how I could do it, using projection, but
I thought I could do it all with 2d to 3d.
//---------
include <BOSL2/std.scad>
$fn= $preview ? 60 : 180;
difference(){
#outside();
up(2) inside();
}
module inside() {
hull() {
up(0.5) cuboid([146,40,1],rounding=8,edges=[FWD+RIGHT]);
up(52.5) cuboid([148,46,1],rounding=8,edges=[FWD+RIGHT]);
}
}
module outside() {
hull() {
up(0.5) cuboid([150,44,1],rounding=10,edges=[FWD+RIGHT]);
up(52.5) cuboid([154,50,1],rounding=10,edges=[FWD+RIGHT]);
}
}
//---------
I am trying to reproduce a part for a relative.
It will be a box with one rounded corner.
I started off using cuboid(), because I did not see a way to use
rect()
or square() to round one corner.
With this code, if I use F5, the bottom and top of the inner part
of
the box show up, with the top coloured by the '#'. If I remove the
'#'
it does not show up, and in both cases, F6 produced only the bottom
(or
perhaps it's the bottom).
Can I not move a projection vertically?
//----------
include <BOSL2/std.scad>
$fn= $preview ? 60 : 180;
hull() {
inner_bottom();
#up(52.5) inner_top();
}
module inner_bottom() {
projection()
cuboid([146,40,1],rounding=8,edges=[FWD+RIGHT]);
}
module inner_top() {
projection() {
cuboid([148,46,1],rounding=8,edges=[FWD+RIGHT]);
}
}
//----------
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
> I didn't try that because the top of the box has to be offset from the
bottom by an amount I have yet to calculate.
You mean like this?
prismoid([148,45],[146,40],52.5, shift=[4,0], rounding=[8,0,0,0]);
I don't understand what the other rounding you need is. If you need a
prismoid with side edges and top edges rounded you can make that with
rounded_prism().
On Fri, Dec 27, 2024 at 2:44 PM larry via Discuss <
discuss@lists.openscad.org> wrote:
> On Fri, 2024-12-27 at 12:32 -0500, Adrian Mariano via Discuss wrote:
> > Larry, I think projections are 2d so you can't hull them in 3d.
> > Maybe if you linear extrude them first?
>
> Thanks, I hadn't thought of that. I was sure I had made 3D out of the
> hull of 2 2D figures.
>
> > But it may be that the right way to do what you want is:
> > prismoid([148,45],[146,40],52.5, rounding=[8,0,0,0]);
>
> I didn't try that because the top of the box has to be offset from the
> bottom by an amount I have yet to calculate.
>
> > And also note that rect() can round corners individually. But you'll
> > still have issues with hulling 2d objects to make something 3d.
>
> The reason I wanted to use hull() is because I wanted to use offset()
> to round the outer corners of the square inner corners.
>
> Here's what I tried first. It works, but I can't round the outer square
> corners with offset. I do see how I could do it, using projection, but
> I thought I could do it all with 2d to 3d.
>
> //---------
>
> include <BOSL2/std.scad>
> $fn= $preview ? 60 : 180;
>
> difference(){
> #outside();
> up(2) inside();
> }
>
> module inside() {
> hull() {
> up(0.5) cuboid([146,40,1],rounding=8,edges=[FWD+RIGHT]);
> up(52.5) cuboid([148,46,1],rounding=8,edges=[FWD+RIGHT]);
> }
> }
>
> module outside() {
> hull() {
> up(0.5) cuboid([150,44,1],rounding=10,edges=[FWD+RIGHT]);
> up(52.5) cuboid([154,50,1],rounding=10,edges=[FWD+RIGHT]);
> }
> }
>
> //---------
> > On Fri, Dec 27, 2024 at 12:18 PM larry via Discuss
> > <discuss@lists.openscad.org> wrote:
> > > I am trying to reproduce a part for a relative.
> > > It will be a box with one rounded corner.
> > > I started off using cuboid(), because I did not see a way to use
> > > rect()
> > > or square() to round one corner.
> > >
> > > With this code, if I use F5, the bottom and top of the inner part
> > > of
> > > the box show up, with the top coloured by the '#'. If I remove the
> > > '#'
> > > it does not show up, and in both cases, F6 produced only the bottom
> > > (or
> > > perhaps it's the bottom).
> > >
> > > Can I not move a projection vertically?
> > >
> > > //----------
> > > include <BOSL2/std.scad>
> > > $fn= $preview ? 60 : 180;
> > >
> > > hull() {
> > > inner_bottom();
> > > #up(52.5) inner_top();
> > > }
> > > module inner_bottom() {
> > > projection()
> > > cuboid([146,40,1],rounding=8,edges=[FWD+RIGHT]);
> > > }
> > >
> > > module inner_top() {
> > > projection() {
> > > cuboid([148,46,1],rounding=8,edges=[FWD+RIGHT]);
> > > }
> > > }
> > > //----------
> > > _______________________________________________
> > > 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
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
L
larry
Fri, Dec 27, 2024 8:25 PM
On Fri, 2024-12-27 at 14:57 -0500, Adrian Mariano via Discuss wrote:
I didn't try that because the top of the box has to be offset from
the bottom by an amount I have yet to calculate.
You mean like this?
prismoid([148,45],[146,40],52.5, shift=[4,0], rounding=[8,0,0,0]);
Yes! but the shift should be in the other axis [0,4]. I didn't see
'shift' when I looked at prismoid, I guess.
I don't understand what the other rounding you need is. If you need
a prismoid with side edges and top edges rounded you can make that
with rounded_prism().
On Fri, 2024-12-27 at 12:32 -0500, Adrian Mariano via Discuss
wrote:
Larry, I think projections are 2d so you can't hull them in 3d.
Maybe if you linear extrude them first?
Thanks, I hadn't thought of that. I was sure I had made 3D out of
the
hull of 2 2D figures.
But it may be that the right way to do what you want is:
prismoid([148,45],[146,40],52.5, rounding=[8,0,0,0]);
I didn't try that because the top of the box has to be offset from
the
bottom by an amount I have yet to calculate.
And also note that rect() can round corners individually. But
you'll
still have issues with hulling 2d objects to make something 3d.
The reason I wanted to use hull() is because I wanted to use
offset()
to round the outer corners of the square inner corners.
Here's what I tried first. It works, but I can't round the outer
square
corners with offset. I do see how I could do it, using projection,
but
I thought I could do it all with 2d to 3d.
//---------
include <BOSL2/std.scad>
$fn= $preview ? 60 : 180;
difference(){
#outside();
up(2) inside();
}
module inside() {
hull() {
up(0.5) cuboid([146,40,1],rounding=8,edges=[FWD+RIGHT]);
up(52.5) cuboid([148,46,1],rounding=8,edges=[FWD+RIGHT]);
}
}
module outside() {
hull() {
up(0.5) cuboid([150,44,1],rounding=10,edges=[FWD+RIGHT]);
up(52.5) cuboid([154,50,1],rounding=10,edges=[FWD+RIGHT]);
}
}
//---------
I am trying to reproduce a part for a relative.
It will be a box with one rounded corner.
I started off using cuboid(), because I did not see a way to
use
rect()
or square() to round one corner.
With this code, if I use F5, the bottom and top of the inner
part
of
the box show up, with the top coloured by the '#'. If I remove
the
'#'
it does not show up, and in both cases, F6 produced only the
bottom
(or
perhaps it's the bottom).
Can I not move a projection vertically?
//----------
include <BOSL2/std.scad>
$fn= $preview ? 60 : 180;
hull() {
inner_bottom();
#up(52.5) inner_top();
}
module inner_bottom() {
projection()
cuboid([146,40,1],rounding=8,edges=[FWD+RIGHT]);
}
module inner_top() {
projection() {
cuboid([148,46,1],rounding=8,edges=[FWD+RIGHT]);
}
}
//----------
OpenSCAD mailing list
To unsubscribe send an email to
discuss-leave@lists.openscad.org
On Fri, 2024-12-27 at 14:57 -0500, Adrian Mariano via Discuss wrote:
> > I didn't try that because the top of the box has to be offset from
> > the bottom by an amount I have yet to calculate.
>
> You mean like this?
>
> prismoid([148,45],[146,40],52.5, shift=[4,0], rounding=[8,0,0,0]);
Yes! but the shift should be in the other axis [0,4]. I didn't see
'shift' when I looked at prismoid, I guess.
> I don't understand what the other rounding you need is. If you need
> a prismoid with side edges and top edges rounded you can make that
> with rounded_prism().
Yup.
Thanks!
> On Fri, Dec 27, 2024 at 2:44 PM larry via Discuss
> <discuss@lists.openscad.org> wrote:
> > On Fri, 2024-12-27 at 12:32 -0500, Adrian Mariano via Discuss
> > wrote:
> > > Larry, I think projections are 2d so you can't hull them in 3d.
> > > Maybe if you linear extrude them first?
> >
> > Thanks, I hadn't thought of that. I was sure I had made 3D out of
> > the
> > hull of 2 2D figures.
> >
> > > But it may be that the right way to do what you want is:
> > > prismoid([148,45],[146,40],52.5, rounding=[8,0,0,0]);
> >
> > I didn't try that because the top of the box has to be offset from
> > the
> > bottom by an amount I have yet to calculate.
> >
> > > And also note that rect() can round corners individually. But
> > > you'll
> > > still have issues with hulling 2d objects to make something 3d.
> >
> > The reason I wanted to use hull() is because I wanted to use
> > offset()
> > to round the outer corners of the square inner corners.
> >
> > Here's what I tried first. It works, but I can't round the outer
> > square
> > corners with offset. I do see how I could do it, using projection,
> > but
> > I thought I could do it all with 2d to 3d.
> >
> > //---------
> >
> > include <BOSL2/std.scad>
> > $fn= $preview ? 60 : 180;
> >
> > difference(){
> > #outside();
> > up(2) inside();
> > }
> >
> > module inside() {
> > hull() {
> > up(0.5) cuboid([146,40,1],rounding=8,edges=[FWD+RIGHT]);
> > up(52.5) cuboid([148,46,1],rounding=8,edges=[FWD+RIGHT]);
> > }
> > }
> >
> > module outside() {
> > hull() {
> > up(0.5) cuboid([150,44,1],rounding=10,edges=[FWD+RIGHT]);
> > up(52.5) cuboid([154,50,1],rounding=10,edges=[FWD+RIGHT]);
> > }
> > }
> >
> > //---------
> > > On Fri, Dec 27, 2024 at 12:18 PM larry via Discuss
> > > <discuss@lists.openscad.org> wrote:
> > > > I am trying to reproduce a part for a relative.
> > > > It will be a box with one rounded corner.
> > > > I started off using cuboid(), because I did not see a way to
> > > > use
> > > > rect()
> > > > or square() to round one corner.
> > > >
> > > > With this code, if I use F5, the bottom and top of the inner
> > > > part
> > > > of
> > > > the box show up, with the top coloured by the '#'. If I remove
> > > > the
> > > > '#'
> > > > it does not show up, and in both cases, F6 produced only the
> > > > bottom
> > > > (or
> > > > perhaps it's the bottom).
> > > >
> > > > Can I not move a projection vertically?
> > > >
> > > > //----------
> > > > include <BOSL2/std.scad>
> > > > $fn= $preview ? 60 : 180;
> > > >
> > > > hull() {
> > > > inner_bottom();
> > > > #up(52.5) inner_top();
> > > > }
> > > > module inner_bottom() {
> > > > projection()
> > > >
> > > > cuboid([146,40,1],rounding=8,edges=[FWD+RIGHT]);
> > > > }
> > > >
> > > > module inner_top() {
> > > > projection() {
> > > >
> > > > cuboid([148,46,1],rounding=8,edges=[FWD+RIGHT]);
> > > > }
> > > > }
> > > > //----------
> > > > _______________________________________________
> > > > 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
> > _______________________________________________
> > 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
JB
Jon Bondy
Fri, Dec 27, 2024 8:38 PM
You only need to linear_extrude() by 0.01 to switch from 2D to 3D!
On 12/27/2024 2:43 PM, larry via Discuss wrote:
On Fri, 2024-12-27 at 12:32 -0500, Adrian Mariano via Discuss wrote:
Larry, I think projections are 2d so you can't hull them in 3d.
Maybe if you linear extrude them first?
Thanks, I hadn't thought of that. I was sure I had made 3D out of the
hull of 2 2D figures.
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
You only need to linear_extrude() by 0.01 to switch from 2D to 3D!
On 12/27/2024 2:43 PM, larry via Discuss wrote:
> On Fri, 2024-12-27 at 12:32 -0500, Adrian Mariano via Discuss wrote:
>> Larry, I think projections are 2d so you can't hull them in 3d.
>> Maybe if you linear extrude them first?
> Thanks, I hadn't thought of that. I was sure I had made 3D out of the
> hull of 2 2D figures.
>
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
L
larry
Sun, Dec 29, 2024 6:54 AM
On Fri, 2024-12-27 at 14:57 -0500, Adrian Mariano via Discuss wrote:
I didn't try that because the top of the box has to be offset from
the bottom by an amount I have yet to calculate.
You mean like this?
prismoid([148,45],[146,40],52.5, shift=[4,0], rounding=[8,0,0,0]);
Here's what I ended up doing. Your suggested prismoid was exactly what
I needed. Next comes final fitting on the machine it's for, then it
needs a few more parts which will be printed separately.
//-------------
include <BOSL2/std.scad>
$fn= $preview ? 60 : 180;
//yrot(180) down(52.5) // for print orientation
difference() {
//outside
prismoid([147,48],[145,40],52.5, shift=[0,-1.5], rounding=[8,2,2,2]);
//inside
down(1.5)
prismoid([144,44],[141,36],52.5, shift=[0,-1.5], rounding=[8,2,2,2]);
}
//-------------
Thanks again!
I don't understand what the other rounding you need is. If you need
a prismoid with side edges and top edges rounded you can make that
with rounded_prism().
On Fri, Dec 27, 2024 at 2:44 PM larry via Discuss
discuss@lists.openscad.org wrote:
On Fri, 2024-12-27 at 12:32 -0500, Adrian Mariano via Discuss
wrote:
Larry, I think projections are 2d so you can't hull them in 3d.
Maybe if you linear extrude them first?
Thanks, I hadn't thought of that. I was sure I had made 3D out of
the
hull of 2 2D figures.
But it may be that the right way to do what you want is:
prismoid([148,45],[146,40],52.5, rounding=[8,0,0,0]);
I didn't try that because the top of the box has to be offset from
the
bottom by an amount I have yet to calculate.
And also note that rect() can round corners individually. But
you'll
still have issues with hulling 2d objects to make something 3d.
The reason I wanted to use hull() is because I wanted to use
offset()
to round the outer corners of the square inner corners.
Here's what I tried first. It works, but I can't round the outer
square
corners with offset. I do see how I could do it, using projection,
but
I thought I could do it all with 2d to 3d.
//---------
include <BOSL2/std.scad>
$fn= $preview ? 60 : 180;
difference(){
#outside();
up(2) inside();
}
module inside() {
hull() {
up(0.5) cuboid([146,40,1],rounding=8,edges=[FWD+RIGHT]);
up(52.5) cuboid([148,46,1],rounding=8,edges=[FWD+RIGHT]);
}
}
module outside() {
hull() {
up(0.5) cuboid([150,44,1],rounding=10,edges=[FWD+RIGHT]);
up(52.5) cuboid([154,50,1],rounding=10,edges=[FWD+RIGHT]);
}
}
//---------
I am trying to reproduce a part for a relative.
It will be a box with one rounded corner.
I started off using cuboid(), because I did not see a way to
use
rect()
or square() to round one corner.
With this code, if I use F5, the bottom and top of the inner
part
of
the box show up, with the top coloured by the '#'. If I remove
the
'#'
it does not show up, and in both cases, F6 produced only the
bottom
(or
perhaps it's the bottom).
Can I not move a projection vertically?
//----------
include <BOSL2/std.scad>
$fn= $preview ? 60 : 180;
hull() {
inner_bottom();
#up(52.5) inner_top();
}
module inner_bottom() {
projection()
cuboid([146,40,1],rounding=8,edges=[FWD+RIGHT]);
}
module inner_top() {
projection() {
cuboid([148,46,1],rounding=8,edges=[FWD+RIGHT]);
}
}
//----------
OpenSCAD mailing list
To unsubscribe send an email to
discuss-leave@lists.openscad.org
On Fri, 2024-12-27 at 14:57 -0500, Adrian Mariano via Discuss wrote:
> > I didn't try that because the top of the box has to be offset from
> > the bottom by an amount I have yet to calculate.
> You mean like this?
> prismoid([148,45],[146,40],52.5, shift=[4,0], rounding=[8,0,0,0]);
Here's what I ended up doing. Your suggested prismoid was exactly what
I needed. Next comes final fitting on the machine it's for, then it
needs a few more parts which will be printed separately.
//-------------
include <BOSL2/std.scad>
$fn= $preview ? 60 : 180;
//yrot(180) down(52.5) // for print orientation
difference() {
//outside
prismoid([147,48],[145,40],52.5, shift=[0,-1.5], rounding=[8,2,2,2]);
//inside
down(1.5)
prismoid([144,44],[141,36],52.5, shift=[0,-1.5], rounding=[8,2,2,2]);
}
//-------------
Thanks again!
> I don't understand what the other rounding you need is. If you need
> a prismoid with side edges and top edges rounded you can make that
> with rounded_prism().
>
> On Fri, Dec 27, 2024 at 2:44 PM larry via Discuss
> <discuss@lists.openscad.org> wrote:
> > On Fri, 2024-12-27 at 12:32 -0500, Adrian Mariano via Discuss
> > wrote:
> > > Larry, I think projections are 2d so you can't hull them in 3d.
> > > Maybe if you linear extrude them first?
> >
> > Thanks, I hadn't thought of that. I was sure I had made 3D out of
> > the
> > hull of 2 2D figures.
> >
> > > But it may be that the right way to do what you want is:
> > > prismoid([148,45],[146,40],52.5, rounding=[8,0,0,0]);
> >
> > I didn't try that because the top of the box has to be offset from
> > the
> > bottom by an amount I have yet to calculate.
> >
> > > And also note that rect() can round corners individually. But
> > > you'll
> > > still have issues with hulling 2d objects to make something 3d.
> >
> > The reason I wanted to use hull() is because I wanted to use
> > offset()
> > to round the outer corners of the square inner corners.
> >
> > Here's what I tried first. It works, but I can't round the outer
> > square
> > corners with offset. I do see how I could do it, using projection,
> > but
> > I thought I could do it all with 2d to 3d.
> >
> > //---------
> >
> > include <BOSL2/std.scad>
> > $fn= $preview ? 60 : 180;
> >
> > difference(){
> > #outside();
> > up(2) inside();
> > }
> >
> > module inside() {
> > hull() {
> > up(0.5) cuboid([146,40,1],rounding=8,edges=[FWD+RIGHT]);
> > up(52.5) cuboid([148,46,1],rounding=8,edges=[FWD+RIGHT]);
> > }
> > }
> >
> > module outside() {
> > hull() {
> > up(0.5) cuboid([150,44,1],rounding=10,edges=[FWD+RIGHT]);
> > up(52.5) cuboid([154,50,1],rounding=10,edges=[FWD+RIGHT]);
> > }
> > }
> >
> > //---------
> > > On Fri, Dec 27, 2024 at 12:18 PM larry via Discuss
> > > <discuss@lists.openscad.org> wrote:
> > > > I am trying to reproduce a part for a relative.
> > > > It will be a box with one rounded corner.
> > > > I started off using cuboid(), because I did not see a way to
> > > > use
> > > > rect()
> > > > or square() to round one corner.
> > > >
> > > > With this code, if I use F5, the bottom and top of the inner
> > > > part
> > > > of
> > > > the box show up, with the top coloured by the '#'. If I remove
> > > > the
> > > > '#'
> > > > it does not show up, and in both cases, F6 produced only the
> > > > bottom
> > > > (or
> > > > perhaps it's the bottom).
> > > >
> > > > Can I not move a projection vertically?
> > > >
> > > > //----------
> > > > include <BOSL2/std.scad>
> > > > $fn= $preview ? 60 : 180;
> > > >
> > > > hull() {
> > > > inner_bottom();
> > > > #up(52.5) inner_top();
> > > > }
> > > > module inner_bottom() {
> > > > projection()
> > > >
> > > > cuboid([146,40,1],rounding=8,edges=[FWD+RIGHT]);
> > > > }
> > > >
> > > > module inner_top() {
> > > > projection() {
> > > >
> > > > cuboid([148,46,1],rounding=8,edges=[FWD+RIGHT]);
> > > > }
> > > > }
> > > > //----------
> > > > _______________________________________________
> > > > 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
> > _______________________________________________
> > 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