discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

How to create an cylindrical arc?

A
adrian
Thu, Jan 29, 2015 3:03 AM

Well that's less blocky but its too big and I also want a circle extruded
along an arc.  I've been looking around and it looks like sweep() is what
I'm looking for, but I need to figure out how it works and where all the
modules are to use it.  I see it  here
https://github.com/openscad/list-comprehension-demos  , but some of the
modules it includes are not there.

A

--
View this message in context: http://forum.openscad.org/How-to-create-an-cylindrical-arc-tp11257p11280.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Well that's less blocky but its too big and I also want a circle extruded along an arc. I've been looking around and it looks like sweep() is what I'm looking for, but I need to figure out how it works and where all the modules are to use it. I see it here <https://github.com/openscad/list-comprehension-demos> , but some of the modules it includes are not there. A -- View this message in context: http://forum.openscad.org/How-to-create-an-cylindrical-arc-tp11257p11280.html Sent from the OpenSCAD mailing list archive at Nabble.com.
A
adrian
Thu, Jan 29, 2015 3:08 AM

Thanks Ian!  That has good possibilities. :)

A

--
View this message in context: http://forum.openscad.org/How-to-create-an-cylindrical-arc-tp11257p11281.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Thanks Ian! That has good possibilities. :) A -- View this message in context: http://forum.openscad.org/How-to-create-an-cylindrical-arc-tp11257p11281.html Sent from the OpenSCAD mailing list archive at Nabble.com.
M
MichaelAtOz
Thu, Jan 29, 2015 3:22 AM

adrian wrote

but some of the modules it includes are not there.

You need the development version to use it.


Unless specifically shown otherwise above, my contribution is in the Public Domain; To the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. This work is published globally via the internet. :) Inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/

View this message in context: http://forum.openscad.org/How-to-create-an-cylindrical-arc-tp11257p11283.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

adrian wrote > but some of the modules it includes are not there. You need the development version to use it. ----- Unless specifically shown otherwise above, my contribution is in the Public Domain; To the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. This work is published globally via the internet. :) Inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ -- View this message in context: http://forum.openscad.org/How-to-create-an-cylindrical-arc-tp11257p11283.html Sent from the OpenSCAD mailing list archive at Nabble.com.
M
MichaelAtOz
Thu, Jan 29, 2015 3:38 AM

too big and I also want a circle extruded along an arc.

IOW a curved tube??


Unless specifically shown otherwise above, my contribution is in the Public Domain; To the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. This work is published globally via the internet. :) Inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/

View this message in context: http://forum.openscad.org/How-to-create-an-cylindrical-arc-tp11257p11284.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

> too big and I also want a circle extruded along an arc. IOW a curved tube?? ----- Unless specifically shown otherwise above, my contribution is in the Public Domain; To the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. This work is published globally via the internet. :) Inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ -- View this message in context: http://forum.openscad.org/How-to-create-an-cylindrical-arc-tp11257p11284.html Sent from the OpenSCAD mailing list archive at Nabble.com.
MK
Marius Kintel
Thu, Jan 29, 2015 4:48 AM

On Jan 28, 2015, at 22:03 PM, adrian adrianh.bsc@gmail.com wrote:

Well that's less blocky but its too big and I also want a circle extruded
along an arc.  I've been looking around and it looks like sweep() is what
I'm looking for, […]

Sweep is a bit general and probably requires too much configuration to fit your needs perfectly.
Currently, the best solution I can think of is to just intersect your 360 degree rotation volume with a wedge.
Here’s a quick starting point:

module rotate_extrude_angle(angle, size) {
module pie(a) {
r=sqrt(2);
hull() polyhedron(points=[[0,0,-r], [r,0,-r], [rcos(a),rsin(a),-r],[0,0,r], [r,0,r], [rcos(a),rsin(a),r]], faces=[[0,1,2,3,4,5]]);
}

intersection() {
scale(size) pie(angle);
rotate_extrude() children();
}
}

rotate_extrude_angle(45, 13) translate([8,0]) circle(5);

-Marius

On Jan 28, 2015, at 22:03 PM, adrian <adrianh.bsc@gmail.com> wrote: > Well that's less blocky but its too big and I also want a circle extruded > along an arc. I've been looking around and it looks like sweep() is what > I'm looking for, […] Sweep is a bit general and probably requires too much configuration to fit your needs perfectly. Currently, the best solution I can think of is to just intersect your 360 degree rotation volume with a wedge. Here’s a quick starting point: module rotate_extrude_angle(angle, size) { module pie(a) { r=sqrt(2); hull() polyhedron(points=[[0,0,-r], [r,0,-r], [r*cos(a),r*sin(a),-r],[0,0,r], [r,0,r], [r*cos(a),r*sin(a),r]], faces=[[0,1,2,3,4,5]]); } intersection() { scale(size) pie(angle); rotate_extrude() children(); } } rotate_extrude_angle(45, 13) translate([8,0]) circle(5); -Marius
M
MichaelAtOz
Thu, Jan 29, 2015 5:04 AM

OpenCSG doesn't like that
http://forum.openscad.org/file/n11286/pire_circle.jpg


Unless specifically shown otherwise above, my contribution is in the Public Domain; To the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. This work is published globally via the internet. :) Inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/

View this message in context: http://forum.openscad.org/How-to-create-an-cylindrical-arc-tp11257p11286.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

OpenCSG doesn't like that <http://forum.openscad.org/file/n11286/pire_circle.jpg> ----- Unless specifically shown otherwise above, my contribution is in the Public Domain; To the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. This work is published globally via the internet. :) Inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ -- View this message in context: http://forum.openscad.org/How-to-create-an-cylindrical-arc-tp11257p11286.html Sent from the OpenSCAD mailing list archive at Nabble.com.
MK
Marius Kintel
Thu, Jan 29, 2015 5:08 AM

On Jan 29, 2015, at 00:04 AM, MichaelAtOz oz.at.michael@gmail.com wrote:

OpenCSG doesn't like that

Yep, quick and dirty. the rotate_extrude() needs a convexity parameter to render correctly. I guess we could be helpful and automatically set it higher for rotate_extrude as it tends to always have a depth complexity of minimum 2..

-Marius

On Jan 29, 2015, at 00:04 AM, MichaelAtOz <oz.at.michael@gmail.com> wrote: > OpenCSG doesn't like that > Yep, quick and dirty. the rotate_extrude() needs a convexity parameter to render correctly. I guess we could be helpful and automatically set it higher for rotate_extrude as it tends to always have a depth complexity of minimum 2.. -Marius
MK
Marius Kintel
Thu, Jan 29, 2015 5:12 AM

On Jan 29, 2015, at 00:08 AM, Marius Kintel marius@kintel.net wrote:

I guess we could be helpful and automatically set it higher for rotate_extrude as it tends to always have a depth complexity of minimum 2..

Fixed in latest master ;)

-Marius

On Jan 29, 2015, at 00:08 AM, Marius Kintel <marius@kintel.net> wrote: > I guess we could be helpful and automatically set it higher for rotate_extrude as it tends to always have a depth complexity of minimum 2.. > Fixed in latest master ;) -Marius
GW
Glenn West
Thu, Jan 29, 2015 5:18 AM

Ive done a few like theses, I use a pie library.
It can slide up a circle easy enough, and then a difference of a another
pie. Pretty easy.

On Wed, Jan 28, 2015 at 8:30 AM, adrian adrianh.bsc@gmail.com wrote:

I need to make an cylindrical arc given 3 points: start, middle and end.
It's been a while since I've done vector algebra, but I'm guessing I'll
have
to find the centre point which I would use to translate from the origin,
find the plane, which I would use to rotate from the x,y plane to the
actual
plane, find the radius and extrude several linear segments of a circle and
then rotate and translate it into position.

Does that sound reasonable?  Is there another way to do this?  A prefabbed
lib maybe?

A

--
View this message in context:
http://forum.openscad.org/How-to-create-an-cylindrical-arc-tp11257.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

Ive done a few like theses, I use a pie library. It can slide up a circle easy enough, and then a difference of a another pie. Pretty easy. On Wed, Jan 28, 2015 at 8:30 AM, adrian <adrianh.bsc@gmail.com> wrote: > I need to make an cylindrical arc given 3 points: start, middle and end. > It's been a while since I've done vector algebra, but I'm guessing I'll > have > to find the centre point which I would use to translate from the origin, > find the plane, which I would use to rotate from the x,y plane to the > actual > plane, find the radius and extrude several linear segments of a circle and > then rotate and translate it into position. > > Does that sound reasonable? Is there another way to do this? A prefabbed > lib maybe? > > > A > > > > -- > View this message in context: > http://forum.openscad.org/How-to-create-an-cylindrical-arc-tp11257.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 >
A
adrian
Thu, Jan 29, 2015 6:01 AM

You need the development version to use it.

And where do I get that?  I have the 2015.01.23.  Isn't that development?

too big and I also want a circle extruded along an arc.

IOW a curved tube??

Yes.

--
View this message in context: http://forum.openscad.org/How-to-create-an-cylindrical-arc-tp11257p11291.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

You need the development version to use it. And where do I get that? I have the 2015.01.23. Isn't that development? > too big and I also want a circle extruded along an arc. IOW a curved tube?? Yes. -- View this message in context: http://forum.openscad.org/How-to-create-an-cylindrical-arc-tp11257p11291.html Sent from the OpenSCAD mailing list archive at Nabble.com.