Ok.. I've got the code below that I've stripped down from a bigger piece I'm
playing with. It was using cylinders before without issue..
but now I'm playing with ellipses which are based on 2d circles instead of
3d cylinders. I'm guessing that is what is messing with my hull()
operation. What I'm ultimately trying to do is create an elliptical
cylinder that is X units high. What are my options here? Below is the code
that misbehaves -- what it should do is create two ellipses -- one above the
other and use hull() to create a shell between them -- or at least that's
what I'm expecting as it worked fine with cylinders instead of ellipses.
$fn=360;
ellipse_height=37.55;
ellipse_width=76.2*2;
object_height=155;
wall_thickness=2;
draft_angle=6;
// MCAD implementation of Ellipse.. Taken for simplicy sake for this example
module ellipse(width, height) {
scale([1, height/width, 1]) circle(r=width/2);
}
module build_cylinder_shell_wall(ellipse_width,
ellipse_height,
object_height) {
hull() {
translate([0, 0, object_height])
ellipse(ellipse_width, ellipse_height);
ellipse(ellipse_width, ellipse_height);
}
}
build_cylinder_shell_wall(ellipse_width,ellipse_height, object_height);
--
Sent from: http://forum.openscad.org/
You can't hull 2D shapes so change the circles to very thin cylinders. If
they are more complex 2D shapes linear_extrude them a small amount.
On Thu, 23 Apr 2020 at 21:23, ps91Rick all4jesus@mailbox.org wrote:
Ok.. I've got the code below that I've stripped down from a bigger piece
I'm
playing with. It was using cylinders before without issue..
but now I'm playing with ellipses which are based on 2d circles instead of
3d cylinders. I'm guessing that is what is messing with my hull()
operation. What I'm ultimately trying to do is create an elliptical
cylinder that is X units high. What are my options here? Below is the
code
that misbehaves -- what it should do is create two ellipses -- one above
the
other and use hull() to create a shell between them -- or at least that's
what I'm expecting as it worked fine with cylinders instead of ellipses.
$fn=360;
ellipse_height=37.55;
ellipse_width=76.2*2;
object_height=155;
wall_thickness=2;
draft_angle=6;
// MCAD implementation of Ellipse.. Taken for simplicy sake for this
example
module ellipse(width, height) {
scale([1, height/width, 1]) circle(r=width/2);
}
module build_cylinder_shell_wall(ellipse_width,
ellipse_height,
object_height) {
hull() {
translate([0, 0, object_height])
ellipse(ellipse_width, ellipse_height);
ellipse(ellipse_width, ellipse_height);
}
}
build_cylinder_shell_wall(ellipse_width,ellipse_height, object_height);
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
thanks! I was able to get it to work with your suggestion!
nop head wrote on 4/23/20 1:39 PM:
You can't hull 2D shapes so change the circles to very thin cylinders.
If they are more complex 2D shapes linear_extrude them a small amount.
thanks! I was able to get it to work with your suggestion!
nop head wrote on 4/23/20 1:39 PM:
You can't hull 2D shapes so change the circles to very thin cylinders.
If they are more complex 2D shapes linear_extrude them a small amount.
To be fair, you can hull() 2D objects to shape a 2D object. You can't
expect to get a 3D object hulling 2D object in OpenSCAD. Consider that 2D
objects live in the XY plane and their translation in Z should be
forbidden as they are useless (for instance, they are ignored by render).
Rotation of 2D shapes other than about Z axis also should be avoided once
they are not forbidden but are also misleading.
In your case of a upright cylinder, you can just linear_extrude the base
ellipse.
linear_extrude(object_height)
ellipse(ellipse_width, ellipse_height);
Or scale a tall cylinder.
On Thu, 23 Apr 2020 at 23:01, Ronaldo Persiano rcmpersiano@gmail.com
wrote:
thanks! I was able to get it to work with your suggestion!
nop head wrote on 4/23/20 1:39 PM:
You can't hull 2D shapes so change the circles to very thin cylinders.
If they are more complex 2D shapes linear_extrude them a small amount.
To be fair, you can hull() 2D objects to shape a 2D object. You can't
expect to get a 3D object hulling 2D object in OpenSCAD. Consider that 2D
objects live in the XY plane and their translation in Z should be
forbidden as they are useless (for instance, they are ignored by render).
Rotation of 2D shapes other than about Z axis also should be avoided once
they are not forbidden but are also misleading.
In your case of a upright cylinder, you can just linear_extrude the base
ellipse.
linear_extrude(object_height)
ellipse(ellipse_width, ellipse_height);
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Got it.. Thx
nop head wrote on 4/23/20 3:23 PM:
Or scale a tall cylinder.
On Thu, 23 Apr 2020 at 23:01, Ronaldo Persiano <rcmpersiano@gmail.com
mailto:rcmpersiano@gmail.com> wrote:
thanks! I was able to get it to work with your suggestion!
nop head wrote on 4/23/20 1:39 PM:
You can't hull 2D shapes so change the circles to very thin
cylinders.
If they are more complex 2D shapes linear_extrude them a
small amount.
To be fair, you can hull() 2D objects to shape a 2D object. You
can't expect to get a 3D object hulling 2D object in OpenSCAD.
Consider that 2D objects live in the XY plane and their
translation in Z should be forbidden as they are useless (for
instance, they are ignored by render). Rotation of 2D shapes other
than about Z axis also should be avoided once they are not
forbidden but are also misleading.
In your case of a upright cylinder, you can just linear_extrude
the base ellipse.
linear_extrude(object_height)
ellipse(ellipse_width, ellipse_height);
_______________________________________________
OpenSCAD mailing list
Discuss@lists.openscad.org <mailto: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
--
Sent from Postbox https://www.postbox-inc.com