Next time please give a full code example.
If you do a negative and a positive offset() with the same parameter the
result will be identity.
I guess you want to have your slot object with rounded edges at the
"original" size. Using offset() this is only possible, if you construct the
square part smaller and the hole part larger by the chamfer value.
$fn = 30;
s = 40;
round_chamfer=1;
translate([0,-s/2,0]) slot();
translate([0,0,0])
offset(round_chamfer)
slot(offs=round_chamfer);
module slot(a = 12, b = 16, r = 4, offs = 0)
{
difference()
{
square([a-2offs, b-2offs] , center = true);
hull()
{
circle(r+offs, center = true);
translate([a, 0])
circle(r+offs, center = true);
}
}
}
--
View this message in context: http://forum.openscad.org/how-to-make-round-chamfer-at-2D-object-tp19714p19715.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
If you do a negative and a positive offset() with the same parameter the
result will be identity.
No it will round the convex or concave corners (depending on the order)
with a radius equal to the offset. I use it regularly.
On 24 December 2016 at 12:08, Parkinbot rudolf@parkinbot.com wrote:
Next time please give a full code example.
If you do a negative and a positive offset() with the same parameter the
result will be identity.
I guess you want to have your slot object with rounded edges at the
"original" size. Using offset() this is only possible, if you construct the
square part smaller and the hole part larger by the chamfer value.
$fn = 30;
s = 40;
round_chamfer=1;
translate([0,-s/2,0]) slot();
translate([0,0,0])
offset(round_chamfer)
slot(offs=round_chamfer);
module slot(a = 12, b = 16, r = 4, offs = 0)
{
difference()
{
square([a-2offs, b-2offs] , center = true);
hull()
{
circle(r+offs, center = true);
translate([a, 0])
circle(r+offs, center = true);
}
}
}
--
View this message in context: http://forum.openscad.org/how-
to-make-round-chamfer-at-2D-object-tp19714p19715.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
If either of you (nop head, Parkinbot) could provide a small example, I
would appreciate it.
On 12/24/2016 7:15 AM, nop head wrote:
If you do a negative and a positive offset() with the same parameter
the result will be identity.
No it will round the convex or concave corners (depending on the
order) with a radius equal to the offset. I use it regularly.
On 24 December 2016 at 12:08, Parkinbot <rudolf@parkinbot.com
mailto:rudolf@parkinbot.com> wrote:
Next time please give a full code example.
If you do a negative and a positive offset() with the same
parameter the
result will be identity.
On 24. des. 2016 13:08, Parkinbot wrote:
I guess you want to have your slot object with rounded edges at the
"original" size. Using offset() this is only possible, if you construct the
square part smaller and the hole part larger by the chamfer value.
Using your slot() you can do the following to get rounded corners of the
original object, with original size and given radius:
$fn = 30;
rad = 1;
offset(r=rad)
offset(delta=-rad)
slot();
Carsten Arnholm
$fn = 32;
module shape()
difference() {
square(40, center = true);
square(20, center = true);
}
color("red") offset(3) offset(-3) shape();
translate([50, 0, 0])
color("blue") offset(-3) offset(3) shape();
On 24 December 2016 at 12:18, jon jon@jonbondy.com wrote:
If either of you (nop head, Parkinbot) could provide a small example, I
would appreciate it.
On 12/24/2016 7:15 AM, nop head wrote:
If you do a negative and a positive offset() with the same parameter the
result will be identity.
No it will round the convex or concave corners (depending on the order)
with a radius equal to the offset. I use it regularly.
On 24 December 2016 at 12:08, Parkinbot rudolf@parkinbot.com wrote:
Next time please give a full code example.
If you do a negative and a positive offset() with the same parameter the
result will be identity.
runsun, you are right. It is obviously not identity (only the initial
example). So what do you do, if you want to have inner and outer edges
rounded?
--
View this message in context: http://forum.openscad.org/how-to-make-round-chamfer-at-2D-object-tp19714p19724.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
On 25. des. 2016 00:19, Parkinbot wrote:
So what do you do, if you want to have inner and outer edges
rounded?
You apply both techniques at once.
module rectangle_with_hole(a = 12, b = 16, th = 4)
{
difference()
{
square([a,b],center=true);
square([a-2th,b-2th],center=true);
}
}
$fn = 30;
rad = 1.5;
// causes outer loop rounding
offset(r=rad)
offset(r=-rad)
// causes inner loop rounding
offset(r=-rad)
offset(r=rad)
rectangle_with_hole();
Carsten Arnholm
Cool
--
View this message in context: http://forum.openscad.org/how-to-make-round-chamfer-at-2D-object-tp19714p19732.html
Sent from the OpenSCAD mailing list archive at Nabble.com.