Feature request: extrude along path

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

Feature request: extrude along path

Peter Falke
Hi everybody,

Extruding a shape along a curved path is something that people has requested time and again.

I'm starting this thread with the idea in mind to discuss the syntax of this feature and to collect sample code.

Maybe this feature can already be dealt  with existing functionality and should only be included in the MCAD library.

There are two very interesting and challenging points to this endeavour:

- How to deal with inflexion points; points along the path where the curvature is great, so great that the extruded shape from two consecutive steps intersect?

- How to optimise the computational time required?

I invite all to share their idea and code.

Sincerely,

TakeItAndRun





--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: Feature request: extrude along path

Peter Falke
Here is a definition for the path.
I trough in scale and twist as well.
Maybe using t as variable isnt that good an idea as $t is already used for animation.

//*******************************************************

//

// definition of path

//

//*******************************************************


// start and end point

tmin=0;

tmax=3*360;

// number of steps along path

tstep=100;


// path to extrude along

function x(t)=[

t,

t*abs(sin(t)),

t*cos(t)

];


// scale

function s(t)=50;//*cos(t-45);


function twist(t)=180*t/(tmax-tmin);






On 5 May 2013 06:21, Peter Falke <[hidden email]> wrote:
Hi everybody,

Extruding a shape along a curved path is something that people has requested time and again.

I'm starting this thread with the idea in mind to discuss the syntax of this feature and to collect sample code.

Maybe this feature can already be dealt  with existing functionality and should only be included in the MCAD library.

There are two very interesting and challenging points to this endeavour:

- How to deal with inflexion points; points along the path where the curvature is great, so great that the extruded shape from two consecutive steps intersect?

- How to optimise the computational time required?

I invite all to share their idea and code.

Sincerely,

TakeItAndRun





--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!



--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: Feature request: extrude along path

Alan Cox
In reply to this post by Peter Falke
On Sun, 5 May 2013 06:21:56 +0200
Peter Falke <[hidden email]> wrote:

> Hi everybody,
>
> Extruding a shape along a curved path is something that people has
> requested time and again.

Bending an object rather than extruding. Extruding along a curved path is
just a special case of that.

> - How to deal with inflexion points; points along the path where the
> curvature is great, so great that the extruded shape from two consecutive
> steps intersect?
>
> - How to optimise the computational time required?
>
> I invite all to share their idea and code.

For simple cases where I can approximate them acceptably and there are no
awkward shapes I've generally done the extrude version (and also lots of
mathematical progression ones) by simply doing something in the style of

      union() {
        for (depth=[0:lots]) {
          translate([0,0,depth/stepspermm]) {
            hull() {
              slice_of_object(depth); // some fraction thick //
              translate([0,0,depth+step])
                slice_of_object(depth+step); // some fraction thick //
            }
        }
      }

with rotates and x,y movement as well as appropriate

Bending an object around a curve is a bit trickier however. I've tried
things like cutting it into thin slices with intersect and then
moving/rotating each slice then unionining the result but it was too slow
to be usable.

Alan
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: Feature request: extrude along path

Lampbus
Most fat polylines in 2d have three options for tight corners
(inflection?) ... Miter, sharp or rounded. There must be procedures out
on the web to handle them? Anyway :

How about using the $fn etc to determine the number of segments on each  
'elbow' on the path ?
$fn 0 would be sharp join,
$fn 1 would be mitred - (or beveled/one 45 degree face set on lines
meeting at 90 degrees)
$fn x would be set high to smooth elbows.

The guide profile path will all be straight segments with some degree of
angles between adjacent sections. Thus the 'outside' of the profile will
always expand adding material, and the inside will intersect. This may
get messy with non simple profiles.

Will the extruded profile be centered (I don't like this), or use the
0,0 as the centre ? THis will allow the profile to be extruded offset
from the path with interesting results possible.

  The problem with twist would be...elbows could have say $fn 50, but
then how many sections would you split the straight sections into? The
'steps' parameter would be needed I think, but ignore twists on the
bends themselves - however this may cause inconsistent/ uneven results
if there are short path segments - you would have to have fractional
steps as 'total length / steps' will never match the endpoints of
individual paths except in very simple cases.

On 05/05/2013 10:56, Alan Cox wrote:

> On Sun, 5 May 2013 06:21:56 +0200
> Peter Falke <[hidden email]> wrote:
>
>> Hi everybody,
>>
>> Extruding a shape along a curved path is something that people has
>> requested time and again.
> Bending an object rather than extruding. Extruding along a curved path is
> just a special case of that.
>
>> - How to deal with inflexion points; points along the path where the
>> curvature is great, so great that the extruded shape from two consecutive
>> steps intersect?
>>
>> - How to optimise the computational time required?
>>
>> I invite all to share their idea and code.
> For simple cases where I can approximate them acceptably and there are no
> awkward shapes I've generally done the extrude version (and also lots of
> mathematical progression ones) by simply doing something in the style of
>
>        union() {
> for (depth=[0:lots]) {
>  translate([0,0,depth/stepspermm]) {
>    hull() {
>      slice_of_object(depth); // some fraction thick //
>      translate([0,0,depth+step])
> slice_of_object(depth+step); // some fraction thick //
>    }
> }
>        }
>
> with rotates and x,y movement as well as appropriate
>
> Bending an object around a curve is a bit trickier however. I've tried
> things like cutting it into thin slices with intersect and then
> moving/rotating each slice then unionining the result but it was too slow
> to be usable.
>
> Alan
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad
> http://openscad.org - https://flattr.com/thing/121566
>

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: Feature request: extrude along path

nophead
Inflection is not the right word for a tight bend. It simply means a point at which the curvature changes sign, so may not be much a of bend at all.


On 5 May 2013 17:32, Richard Benjamin <[hidden email]> wrote:
Most fat polylines in 2d have three options for tight corners
(inflection?) ... Miter, sharp or rounded. There must be procedures out
on the web to handle them? Anyway :

How about using the $fn etc to determine the number of segments on each
'elbow' on the path ?
$fn 0 would be sharp join,
$fn 1 would be mitred - (or beveled/one 45 degree face set on lines
meeting at 90 degrees)
$fn x would be set high to smooth elbows.

The guide profile path will all be straight segments with some degree of
angles between adjacent sections. Thus the 'outside' of the profile will
always expand adding material, and the inside will intersect. This may
get messy with non simple profiles.

Will the extruded profile be centered (I don't like this), or use the
0,0 as the centre ? THis will allow the profile to be extruded offset
from the path with interesting results possible.

  The problem with twist would be...elbows could have say $fn 50, but
then how many sections would you split the straight sections into? The
'steps' parameter would be needed I think, but ignore twists on the
bends themselves - however this may cause inconsistent/ uneven results
if there are short path segments - you would have to have fractional
steps as 'total length / steps' will never match the endpoints of
individual paths except in very simple cases.

On 05/05/2013 10:56, Alan Cox wrote:
> On Sun, 5 May 2013 06:21:56 +0200
> Peter Falke <[hidden email]> wrote:
>
>> Hi everybody,
>>
>> Extruding a shape along a curved path is something that people has
>> requested time and again.
> Bending an object rather than extruding. Extruding along a curved path is
> just a special case of that.
>
>> - How to deal with inflexion points; points along the path where the
>> curvature is great, so great that the extruded shape from two consecutive
>> steps intersect?
>>
>> - How to optimise the computational time required?
>>
>> I invite all to share their idea and code.
> For simple cases where I can approximate them acceptably and there are no
> awkward shapes I've generally done the extrude version (and also lots of
> mathematical progression ones) by simply doing something in the style of
>
>        union() {
>       for (depth=[0:lots]) {
>         translate([0,0,depth/stepspermm]) {
>           hull() {
>             slice_of_object(depth); // some fraction thick //
>             translate([0,0,depth+step])
>               slice_of_object(depth+step); // some fraction thick //
>           }
>       }
>        }
>
> with rotates and x,y movement as well as appropriate
>
> Bending an object around a curve is a bit trickier however. I've tried
> things like cutting it into thin slices with intersect and then
> moving/rotating each slice then unionining the result but it was too slow
> to be usable.
>
> Alan
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad
> http://openscad.org - https://flattr.com/thing/121566
>

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: Feature request: extrude along path

Peter Falke
Thanks nop head
.
I mean, in laymen terms, kinks in the path.

Points were the slope of the path changes discontinuous.

How are these called?

Sincerely,

TakeItAndRun


On 5 May 2013 18:37, nop head <[hidden email]> wrote:
Inflection is not the right word for a tight bend. It simply means a point at which the curvature changes sign, so may not be much a of bend at all.


On 5 May 2013 17:32, Richard Benjamin <[hidden email]> wrote:
Most fat polylines in 2d have three options for tight corners
(inflection?) ... Miter, sharp or rounded. There must be procedures out
on the web to handle them? Anyway :

How about using the $fn etc to determine the number of segments on each
'elbow' on the path ?
$fn 0 would be sharp join,
$fn 1 would be mitred - (or beveled/one 45 degree face set on lines
meeting at 90 degrees)
$fn x would be set high to smooth elbows.

The guide profile path will all be straight segments with some degree of
angles between adjacent sections. Thus the 'outside' of the profile will
always expand adding material, and the inside will intersect. This may
get messy with non simple profiles.

Will the extruded profile be centered (I don't like this), or use the
0,0 as the centre ? THis will allow the profile to be extruded offset
from the path with interesting results possible.

  The problem with twist would be...elbows could have say $fn 50, but
then how many sections would you split the straight sections into? The
'steps' parameter would be needed I think, but ignore twists on the
bends themselves - however this may cause inconsistent/ uneven results
if there are short path segments - you would have to have fractional
steps as 'total length / steps' will never match the endpoints of
individual paths except in very simple cases.

On 05/05/2013 10:56, Alan Cox wrote:
> On Sun, 5 May 2013 06:21:56 +0200
> Peter Falke <[hidden email]> wrote:
>
>> Hi everybody,
>>
>> Extruding a shape along a curved path is something that people has
>> requested time and again.
> Bending an object rather than extruding. Extruding along a curved path is
> just a special case of that.
>
>> - How to deal with inflexion points; points along the path where the
>> curvature is great, so great that the extruded shape from two consecutive
>> steps intersect?
>>
>> - How to optimise the computational time required?
>>
>> I invite all to share their idea and code.
> For simple cases where I can approximate them acceptably and there are no
> awkward shapes I've generally done the extrude version (and also lots of
> mathematical progression ones) by simply doing something in the style of
>
>        union() {
>       for (depth=[0:lots]) {
>         translate([0,0,depth/stepspermm]) {
>           hull() {
>             slice_of_object(depth); // some fraction thick //
>             translate([0,0,depth+step])
>               slice_of_object(depth+step); // some fraction thick //
>           }
>       }
>        }
>
> with rotates and x,y movement as well as appropriate
>
> Bending an object around a curve is a bit trickier however. I've tried
> things like cutting it into thin slices with intersect and then
> moving/rotating each slice then unionining the result but it was too slow
> to be usable.
>
> Alan
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad
> http://openscad.org - https://flattr.com/thing/121566
>

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566



--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: Feature request: extrude along path

nophead
I don't know a name for a continuous function with a discontinuous derivative.


On 5 May 2013 18:13, Peter Falke <[hidden email]> wrote:
Thanks nop head
.
I mean, in laymen terms, kinks in the path.

Points were the slope of the path changes discontinuous.

How are these called?

Sincerely,

TakeItAndRun


On 5 May 2013 18:37, nop head <[hidden email]> wrote:
Inflection is not the right word for a tight bend. It simply means a point at which the curvature changes sign, so may not be much a of bend at all.


On 5 May 2013 17:32, Richard Benjamin <[hidden email]> wrote:
Most fat polylines in 2d have three options for tight corners
(inflection?) ... Miter, sharp or rounded. There must be procedures out
on the web to handle them? Anyway :

How about using the $fn etc to determine the number of segments on each
'elbow' on the path ?
$fn 0 would be sharp join,
$fn 1 would be mitred - (or beveled/one 45 degree face set on lines
meeting at 90 degrees)
$fn x would be set high to smooth elbows.

The guide profile path will all be straight segments with some degree of
angles between adjacent sections. Thus the 'outside' of the profile will
always expand adding material, and the inside will intersect. This may
get messy with non simple profiles.

Will the extruded profile be centered (I don't like this), or use the
0,0 as the centre ? THis will allow the profile to be extruded offset
from the path with interesting results possible.

  The problem with twist would be...elbows could have say $fn 50, but
then how many sections would you split the straight sections into? The
'steps' parameter would be needed I think, but ignore twists on the
bends themselves - however this may cause inconsistent/ uneven results
if there are short path segments - you would have to have fractional
steps as 'total length / steps' will never match the endpoints of
individual paths except in very simple cases.

On 05/05/2013 10:56, Alan Cox wrote:
> On Sun, 5 May 2013 06:21:56 +0200
> Peter Falke <[hidden email]> wrote:
>
>> Hi everybody,
>>
>> Extruding a shape along a curved path is something that people has
>> requested time and again.
> Bending an object rather than extruding. Extruding along a curved path is
> just a special case of that.
>
>> - How to deal with inflexion points; points along the path where the
>> curvature is great, so great that the extruded shape from two consecutive
>> steps intersect?
>>
>> - How to optimise the computational time required?
>>
>> I invite all to share their idea and code.
> For simple cases where I can approximate them acceptably and there are no
> awkward shapes I've generally done the extrude version (and also lots of
> mathematical progression ones) by simply doing something in the style of
>
>        union() {
>       for (depth=[0:lots]) {
>         translate([0,0,depth/stepspermm]) {
>           hull() {
>             slice_of_object(depth); // some fraction thick //
>             translate([0,0,depth+step])
>               slice_of_object(depth+step); // some fraction thick //
>           }
>       }
>        }
>
> with rotates and x,y movement as well as appropriate
>
> Bending an object around a curve is a bit trickier however. I've tried
> things like cutting it into thin slices with intersect and then
> moving/rotating each slice then unionining the result but it was too slow
> to be usable.
>
> Alan
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad
> http://openscad.org - https://flattr.com/thing/121566
>

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566



--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: Feature request: extrude along path

Lampbus
In reply to this post by nophead
And what happens if the path is actually not contiguous - should the gaps be filled, or treated as separate solids (assuming they don't result in intersections due to the process)

On 05/05/2013 17:37, nop head wrote:
Inflection is not the right word for a tight bend. It simply means a point at which the curvature changes sign, so may not be much a of bend at all.


On 5 May 2013 17:32, Richard Benjamin <[hidden email]> wrote:
Most fat polylines in 2d have three options for tight corners
(inflection?) ... Miter, sharp or rounded. There must be procedures out
on the web to handle them? Anyway :

How about using the $fn etc to determine the number of segments on each
'elbow' on the path ?
$fn 0 would be sharp join,
$fn 1 would be mitred - (or beveled/one 45 degree face set on lines
meeting at 90 degrees)
$fn x would be set high to smooth elbows.

The guide profile path will all be straight segments with some degree of
angles between adjacent sections. Thus the 'outside' of the profile will
always expand adding material, and the inside will intersect. This may
get messy with non simple profiles.

Will the extruded profile be centered (I don't like this), or use the
0,0 as the centre ? THis will allow the profile to be extruded offset
from the path with interesting results possible.

  The problem with twist would be...elbows could have say $fn 50, but
then how many sections would you split the straight sections into? The
'steps' parameter would be needed I think, but ignore twists on the
bends themselves - however this may cause inconsistent/ uneven results
if there are short path segments - you would have to have fractional
steps as 'total length / steps' will never match the endpoints of
individual paths except in very simple cases.

On 05/05/2013 10:56, Alan Cox wrote:
> On Sun, 5 May 2013 06:21:56 +0200
> Peter Falke <[hidden email]> wrote:
>
>> Hi everybody,
>>
>> Extruding a shape along a curved path is something that people has
>> requested time and again.
> Bending an object rather than extruding. Extruding along a curved path is
> just a special case of that.
>
>> - How to deal with inflexion points; points along the path where the
>> curvature is great, so great that the extruded shape from two consecutive
>> steps intersect?
>>
>> - How to optimise the computational time required?
>>
>> I invite all to share their idea and code.
> For simple cases where I can approximate them acceptably and there are no
> awkward shapes I've generally done the extrude version (and also lots of
> mathematical progression ones) by simply doing something in the style of
>
>        union() {
>       for (depth=[0:lots]) {
>         translate([0,0,depth/stepspermm]) {
>           hull() {
>             slice_of_object(depth); // some fraction thick //
>             translate([0,0,depth+step])
>               slice_of_object(depth+step); // some fraction thick //
>           }
>       }
>        }
>
> with rotates and x,y movement as well as appropriate
>
> Bending an object around a curve is a bit trickier however. I've tried
> things like cutting it into thin slices with intersect and then
> moving/rotating each slice then unionining the result but it was too slow
> to be usable.
>
> Alan
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad
> http://openscad.org - https://flattr.com/thing/121566
>

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: Feature request: extrude along path

'doc' ocelot
In reply to this post by nophead
a continuous function with a non-continuous derivative is "non-smooth".


On Sun, May 5, 2013 at 10:27 AM, nop head nop.head-at-gmail.com
|openscad email list/Example Allow| <[hidden email]> wrote:

> I don't know a name for a continuous function with a discontinuous
> derivative.
>
>
> On 5 May 2013 18:13, Peter Falke <[hidden email]>
> wrote:
>>
>> Thanks nop head
>> .
>> I mean, in laymen terms, kinks in the path.
>>
>> Points were the slope of the path changes discontinuous.
>>
>> How are these called?
>>
>> Sincerely,
>>
>> TakeItAndRun
>>
>>
>> On 5 May 2013 18:37, nop head <[hidden email]> wrote:
>>>
>>> Inflection is not the right word for a tight bend. It simply means a
>>> point at which the curvature changes sign, so may not be much a of bend at
>>> all.
>>>
>>>
>>> On 5 May 2013 17:32, Richard Benjamin <[hidden email]> wrote:
>>>>
>>>> Most fat polylines in 2d have three options for tight corners
>>>> (inflection?) ... Miter, sharp or rounded. There must be procedures out
>>>> on the web to handle them? Anyway :
>>>>
>>>> How about using the $fn etc to determine the number of segments on each
>>>> 'elbow' on the path ?
>>>> $fn 0 would be sharp join,
>>>> $fn 1 would be mitred - (or beveled/one 45 degree face set on lines
>>>> meeting at 90 degrees)
>>>> $fn x would be set high to smooth elbows.
>>>>
>>>> The guide profile path will all be straight segments with some degree of
>>>> angles between adjacent sections. Thus the 'outside' of the profile will
>>>> always expand adding material, and the inside will intersect. This may
>>>> get messy with non simple profiles.
>>>>
>>>> Will the extruded profile be centered (I don't like this), or use the
>>>> 0,0 as the centre ? THis will allow the profile to be extruded offset
>>>> from the path with interesting results possible.
>>>>
>>>>   The problem with twist would be...elbows could have say $fn 50, but
>>>> then how many sections would you split the straight sections into? The
>>>> 'steps' parameter would be needed I think, but ignore twists on the
>>>> bends themselves - however this may cause inconsistent/ uneven results
>>>> if there are short path segments - you would have to have fractional
>>>> steps as 'total length / steps' will never match the endpoints of
>>>> individual paths except in very simple cases.
>>>>
>>>> On 05/05/2013 10:56, Alan Cox wrote:
>>>> > On Sun, 5 May 2013 06:21:56 +0200
>>>> > Peter Falke <[hidden email]> wrote:
>>>> >
>>>> >> Hi everybody,
>>>> >>
>>>> >> Extruding a shape along a curved path is something that people has
>>>> >> requested time and again.
>>>> > Bending an object rather than extruding. Extruding along a curved path
>>>> > is
>>>> > just a special case of that.
>>>> >
>>>> >> - How to deal with inflexion points; points along the path where the
>>>> >> curvature is great, so great that the extruded shape from two
>>>> >> consecutive
>>>> >> steps intersect?
>>>> >>
>>>> >> - How to optimise the computational time required?
>>>> >>
>>>> >> I invite all to share their idea and code.
>>>> > For simple cases where I can approximate them acceptably and there are
>>>> > no
>>>> > awkward shapes I've generally done the extrude version (and also lots
>>>> > of
>>>> > mathematical progression ones) by simply doing something in the style
>>>> > of
>>>> >
>>>> >        union() {
>>>> >       for (depth=[0:lots]) {
>>>> >         translate([0,0,depth/stepspermm]) {
>>>> >           hull() {
>>>> >             slice_of_object(depth); // some fraction thick //
>>>> >             translate([0,0,depth+step])
>>>> >               slice_of_object(depth+step); // some fraction thick //
>>>> >           }
>>>> >       }
>>>> >        }
>>>> >
>>>> > with rotates and x,y movement as well as appropriate
>>>> >
>>>> > Bending an object around a curve is a bit trickier however. I've tried
>>>> > things like cutting it into thin slices with intersect and then
>>>> > moving/rotating each slice then unionining the result but it was too
>>>> > slow
>>>> > to be usable.
>>>> >
>>>> > Alan
>>>> > _______________________________________________
>>>> > OpenSCAD mailing list
>>>> > [hidden email]
>>>> > http://rocklinux.net/mailman/listinfo/openscad
>>>> > http://openscad.org - https://flattr.com/thing/121566
>>>> >
>>>>
>>>> _______________________________________________
>>>> OpenSCAD mailing list
>>>> [hidden email]
>>>> http://rocklinux.net/mailman/listinfo/openscad
>>>> http://openscad.org - https://flattr.com/thing/121566
>>>
>>>
>>>
>>> _______________________________________________
>>> OpenSCAD mailing list
>>> [hidden email]
>>> http://rocklinux.net/mailman/listinfo/openscad
>>> http://openscad.org - https://flattr.com/thing/121566
>>
>>
>>
>>
>> --
>> [hidden email]
>>
>> P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
>> Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
>> schreiben.
>> Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.
>>
>> P.S. In case my e-mail is shorter than you enjoy:
>> I am currently trying short replies instead of no replies at all.
>> Please let me know, if you like to read more.
>>
>> Enjoy!
>>
>> _______________________________________________
>> OpenSCAD mailing list
>> [hidden email]
>> http://rocklinux.net/mailman/listinfo/openscad
>> http://openscad.org - https://flattr.com/thing/121566
>
>
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad
> http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: Feature request: extrude along path

Peter Falke
In reply to this post by Peter Falke
Here is a first sample program (see attachment). I only does round (circle) extrusions.
It is very simple; two spheres along the path are connected by the hull() command.
It is very stable and produces nicely round 'elbows' at kinks in the path.
It handles scale very well; when the scale is zero the extrusion is discontinuous.
Even jumps, like in tan(t) are handled nicely.
But it is somewhat slow
With fn$=16 and tstep=100 it takes 3min for F5, and 31min for F6 ( picture in red/green)
But I believe this is mainly due to the explicit union at the end, as the progress bar runs from 0 to 99 OK,but stops at 99 for a long time.

Comments and ideas welcome.

Sincerely,

TakeItAndRun

Inline images 3Inline images 2
Inline images 1
Inline images 1

On 5 May 2013 19:13, Peter Falke <[hidden email]> wrote:
Thanks nop head
.
I mean, in laymen terms, kinks in the path.

Points were the slope of the path changes discontinuous.

How are these called?

Sincerely,

TakeItAndRun


On 5 May 2013 18:37, nop head <[hidden email]> wrote:
Inflection is not the right word for a tight bend. It simply means a point at which the curvature changes sign, so may not be much a of bend at all.


On 5 May 2013 17:32, Richard Benjamin <[hidden email]> wrote:
Most fat polylines in 2d have three options for tight corners
(inflection?) ... Miter, sharp or rounded. There must be procedures out
on the web to handle them? Anyway :

How about using the $fn etc to determine the number of segments on each
'elbow' on the path ?
$fn 0 would be sharp join,
$fn 1 would be mitred - (or beveled/one 45 degree face set on lines
meeting at 90 degrees)
$fn x would be set high to smooth elbows.

The guide profile path will all be straight segments with some degree of
angles between adjacent sections. Thus the 'outside' of the profile will
always expand adding material, and the inside will intersect. This may
get messy with non simple profiles.

Will the extruded profile be centered (I don't like this), or use the
0,0 as the centre ? THis will allow the profile to be extruded offset
from the path with interesting results possible.

  The problem with twist would be...elbows could have say $fn 50, but
then how many sections would you split the straight sections into? The
'steps' parameter would be needed I think, but ignore twists on the
bends themselves - however this may cause inconsistent/ uneven results
if there are short path segments - you would have to have fractional
steps as 'total length / steps' will never match the endpoints of
individual paths except in very simple cases.

On 05/05/2013 10:56, Alan Cox wrote:
> On Sun, 5 May 2013 06:21:56 +0200
> Peter Falke <[hidden email]> wrote:
>
>> Hi everybody,
>>
>> Extruding a shape along a curved path is something that people has
>> requested time and again.
> Bending an object rather than extruding. Extruding along a curved path is
> just a special case of that.
>
>> - How to deal with inflexion points; points along the path where the
>> curvature is great, so great that the extruded shape from two consecutive
>> steps intersect?
>>
>> - How to optimise the computational time required?
>>
>> I invite all to share their idea and code.
> For simple cases where I can approximate them acceptably and there are no
> awkward shapes I've generally done the extrude version (and also lots of
> mathematical progression ones) by simply doing something in the style of
>
>        union() {
>       for (depth=[0:lots]) {
>         translate([0,0,depth/stepspermm]) {
>           hull() {
>             slice_of_object(depth); // some fraction thick //
>             translate([0,0,depth+step])
>               slice_of_object(depth+step); // some fraction thick //
>           }
>       }
>        }
>
> with rotates and x,y movement as well as appropriate
>
> Bending an object around a curve is a bit trickier however. I've tried
> things like cutting it into thin slices with intersect and then
> moving/rotating each slice then unionining the result but it was too slow
> to be usable.
>
> Alan
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad
> http://openscad.org - https://flattr.com/thing/121566
>

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566



--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!



--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566

extrudepathdotv0_1.scad (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Feature request: extrude along path

Peter Falke
Hi Richard,

This is an interseting questions.

One would need to have a parameter (xjump). If the distance of two consecutive poinjts is larger then xjump than dont join the points.

But on second thought: this would not happen to often and people who dont whant it continious could just use two different extrude_path().

Sincerely,

TakeItAndRun


On 5 May 2013 20:28, Peter Falke <[hidden email]> wrote:
Here is a first sample program (see attachment). I only does round (circle) extrusions.
It is very simple; two spheres along the path are connected by the hull() command.
It is very stable and produces nicely round 'elbows' at kinks in the path.
It handles scale very well; when the scale is zero the extrusion is discontinuous.
Even jumps, like in tan(t) are handled nicely.
But it is somewhat slow
With fn$=16 and tstep=100 it takes 3min for F5, and 31min for F6 ( picture in red/green)
But I believe this is mainly due to the explicit union at the end, as the progress bar runs from 0 to 99 OK,but stops at 99 for a long time.

Comments and ideas welcome.

Sincerely,

TakeItAndRun

Inline images 3Inline images 2
Inline images 1
Inline images 1


On 5 May 2013 19:13, Peter Falke <[hidden email]> wrote:
Thanks nop head
.
I mean, in laymen terms, kinks in the path.

Points were the slope of the path changes discontinuous.

How are these called?

Sincerely,

TakeItAndRun


On 5 May 2013 18:37, nop head <[hidden email]> wrote:
Inflection is not the right word for a tight bend. It simply means a point at which the curvature changes sign, so may not be much a of bend at all.


On 5 May 2013 17:32, Richard Benjamin <[hidden email]> wrote:
Most fat polylines in 2d have three options for tight corners
(inflection?) ... Miter, sharp or rounded. There must be procedures out
on the web to handle them? Anyway :

How about using the $fn etc to determine the number of segments on each
'elbow' on the path ?
$fn 0 would be sharp join,
$fn 1 would be mitred - (or beveled/one 45 degree face set on lines
meeting at 90 degrees)
$fn x would be set high to smooth elbows.

The guide profile path will all be straight segments with some degree of
angles between adjacent sections. Thus the 'outside' of the profile will
always expand adding material, and the inside will intersect. This may
get messy with non simple profiles.

Will the extruded profile be centered (I don't like this), or use the
0,0 as the centre ? THis will allow the profile to be extruded offset
from the path with interesting results possible.

  The problem with twist would be...elbows could have say $fn 50, but
then how many sections would you split the straight sections into? The
'steps' parameter would be needed I think, but ignore twists on the
bends themselves - however this may cause inconsistent/ uneven results
if there are short path segments - you would have to have fractional
steps as 'total length / steps' will never match the endpoints of
individual paths except in very simple cases.

On 05/05/2013 10:56, Alan Cox wrote:
> On Sun, 5 May 2013 06:21:56 +0200
> Peter Falke <[hidden email]> wrote:
>
>> Hi everybody,
>>
>> Extruding a shape along a curved path is something that people has
>> requested time and again.
> Bending an object rather than extruding. Extruding along a curved path is
> just a special case of that.
>
>> - How to deal with inflexion points; points along the path where the
>> curvature is great, so great that the extruded shape from two consecutive
>> steps intersect?
>>
>> - How to optimise the computational time required?
>>
>> I invite all to share their idea and code.
> For simple cases where I can approximate them acceptably and there are no
> awkward shapes I've generally done the extrude version (and also lots of
> mathematical progression ones) by simply doing something in the style of
>
>        union() {
>       for (depth=[0:lots]) {
>         translate([0,0,depth/stepspermm]) {
>           hull() {
>             slice_of_object(depth); // some fraction thick //
>             translate([0,0,depth+step])
>               slice_of_object(depth+step); // some fraction thick //
>           }
>       }
>        }
>
> with rotates and x,y movement as well as appropriate
>
> Bending an object around a curve is a bit trickier however. I've tried
> things like cutting it into thin slices with intersect and then
> moving/rotating each slice then unionining the result but it was too slow
> to be usable.
>
> Alan
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad
> http://openscad.org - https://flattr.com/thing/121566
>

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566



--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!



--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!



--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: Feature request: extrude along path

Peter Falke
In reply to this post by Peter Falke
Here is a first sample program (see attachment). I only does round (circle) extrusions.
It is very simple; two spheres along the path are connected by the hull() command.
It is very stable and produces nicely round 'elbows' at kinks in the path.
It handles scale very well; when the scale is zero the extrusion is discontinuous.
Even jumps, like in tan(t) are handled nicely.
But it is somewhat slow
With fn$=16 and tstep=100 it takes 3min for F5, and 31min for F6 ( picture in red/green)
But I believe this is mainly due to the explicit union at the end, as the progress bar runs from 0 to 99 OK,but stops at 99 for a long time.

Comments and ideas welcome.

Sincerely,

TakeItAndRun

Inline images 3Inline images 2
Inline images 1


On 5 May 2013 19:13, Peter Falke <[hidden email]> wrote:
Thanks nop head
.
I mean, in laymen terms, kinks in the path.

Points were the slope of the path changes discontinuous.

How are these called?

Sincerely,

TakeItAndRun


On 5 May 2013 18:37, nop head <[hidden email]> wrote:
Inflection is not the right word for a tight bend. It simply means a point at which the curvature changes sign, so may not be much a of bend at all.


On 5 May 2013 17:32, Richard Benjamin <[hidden email]> wrote:
Most fat polylines in 2d have three options for tight corners
(inflection?) ... Miter, sharp or rounded. There must be procedures out
on the web to handle them? Anyway :

How about using the $fn etc to determine the number of segments on each
'elbow' on the path ?
$fn 0 would be sharp join,
$fn 1 would be mitred - (or beveled/one 45 degree face set on lines
meeting at 90 degrees)
$fn x would be set high to smooth elbows.

The guide profile path will all be straight segments with some degree of
angles between adjacent sections. Thus the 'outside' of the profile will
always expand adding material, and the inside will intersect. This may
get messy with non simple profiles.

Will the extruded profile be centered (I don't like this), or use the
0,0 as the centre ? THis will allow the profile to be extruded offset
from the path with interesting results possible.

  The problem with twist would be...elbows could have say $fn 50, but
then how many sections would you split the straight sections into? The
'steps' parameter would be needed I think, but ignore twists on the
bends themselves - however this may cause inconsistent/ uneven results
if there are short path segments - you would have to have fractional
steps as 'total length / steps' will never match the endpoints of
individual paths except in very simple cases.

On 05/05/2013 10:56, Alan Cox wrote:
> On Sun, 5 May 2013 06:21:56 +0200
> Peter Falke <[hidden email]> wrote:
>
>> Hi everybody,
>>
>> Extruding a shape along a curved path is something that people has
>> requested time and again.
> Bending an object rather than extruding. Extruding along a curved path is
> just a special case of that.
>
>> - How to deal with inflexion points; points along the path where the
>> curvature is great, so great that the extruded shape from two consecutive
>> steps intersect?
>>
>> - How to optimise the computational time required?
>>
>> I invite all to share their idea and code.
> For simple cases where I can approximate them acceptably and there are no
> awkward shapes I've generally done the extrude version (and also lots of
> mathematical progression ones) by simply doing something in the style of
>
>        union() {
>       for (depth=[0:lots]) {
>         translate([0,0,depth/stepspermm]) {
>           hull() {
>             slice_of_object(depth); // some fraction thick //
>             translate([0,0,depth+step])
>               slice_of_object(depth+step); // some fraction thick //
>           }
>       }
>        }
>
> with rotates and x,y movement as well as appropriate
>
> Bending an object around a curve is a bit trickier however. I've tried
> things like cutting it into thin slices with intersect and then
> moving/rotating each slice then unionining the result but it was too slow
> to be usable.
>
> Alan
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad
> http://openscad.org - https://flattr.com/thing/121566
>

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566



--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!



--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: Feature request: extrude along path

nophead
The in-line images don't work. I think the mailing list strips attachments.


On 5 May 2013 19:56, Peter Falke <[hidden email]> wrote:
Here is a first sample program (see attachment). I only does round (circle) extrusions.
It is very simple; two spheres along the path are connected by the hull() command.
It is very stable and produces nicely round 'elbows' at kinks in the path.
It handles scale very well; when the scale is zero the extrusion is discontinuous.
Even jumps, like in tan(t) are handled nicely.
But it is somewhat slow
With fn$=16 and tstep=100 it takes 3min for F5, and 31min for F6 ( picture in red/green)
But I believe this is mainly due to the explicit union at the end, as the progress bar runs from 0 to 99 OK,but stops at 99 for a long time.

Comments and ideas welcome.

Sincerely,

TakeItAndRun

Inline images 3Inline images 2
Inline images 1


On 5 May 2013 19:13, Peter Falke <[hidden email]> wrote:
Thanks nop head
.
I mean, in laymen terms, kinks in the path.

Points were the slope of the path changes discontinuous.

How are these called?

Sincerely,

TakeItAndRun


On 5 May 2013 18:37, nop head <[hidden email]> wrote:
Inflection is not the right word for a tight bend. It simply means a point at which the curvature changes sign, so may not be much a of bend at all.


On 5 May 2013 17:32, Richard Benjamin <[hidden email]> wrote:
Most fat polylines in 2d have three options for tight corners
(inflection?) ... Miter, sharp or rounded. There must be procedures out
on the web to handle them? Anyway :

How about using the $fn etc to determine the number of segments on each
'elbow' on the path ?
$fn 0 would be sharp join,
$fn 1 would be mitred - (or beveled/one 45 degree face set on lines
meeting at 90 degrees)
$fn x would be set high to smooth elbows.

The guide profile path will all be straight segments with some degree of
angles between adjacent sections. Thus the 'outside' of the profile will
always expand adding material, and the inside will intersect. This may
get messy with non simple profiles.

Will the extruded profile be centered (I don't like this), or use the
0,0 as the centre ? THis will allow the profile to be extruded offset
from the path with interesting results possible.

  The problem with twist would be...elbows could have say $fn 50, but
then how many sections would you split the straight sections into? The
'steps' parameter would be needed I think, but ignore twists on the
bends themselves - however this may cause inconsistent/ uneven results
if there are short path segments - you would have to have fractional
steps as 'total length / steps' will never match the endpoints of
individual paths except in very simple cases.

On 05/05/2013 10:56, Alan Cox wrote:
> On Sun, 5 May 2013 06:21:56 +0200
> Peter Falke <[hidden email]> wrote:
>
>> Hi everybody,
>>
>> Extruding a shape along a curved path is something that people has
>> requested time and again.
> Bending an object rather than extruding. Extruding along a curved path is
> just a special case of that.
>
>> - How to deal with inflexion points; points along the path where the
>> curvature is great, so great that the extruded shape from two consecutive
>> steps intersect?
>>
>> - How to optimise the computational time required?
>>
>> I invite all to share their idea and code.
> For simple cases where I can approximate them acceptably and there are no
> awkward shapes I've generally done the extrude version (and also lots of
> mathematical progression ones) by simply doing something in the style of
>
>        union() {
>       for (depth=[0:lots]) {
>         translate([0,0,depth/stepspermm]) {
>           hull() {
>             slice_of_object(depth); // some fraction thick //
>             translate([0,0,depth+step])
>               slice_of_object(depth+step); // some fraction thick //
>           }
>       }
>        }
>
> with rotates and x,y movement as well as appropriate
>
> Bending an object around a curve is a bit trickier however. I've tried
> things like cutting it into thin slices with intersect and then
> moving/rotating each slice then unionining the result but it was too slow
> to be usable.
>
> Alan
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad
> http://openscad.org - https://flattr.com/thing/121566
>

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566



--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!



--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: Feature request: extrude along path

Peter Falke
The picture were above the size limit of 100k, so were awaiting aprovel from the list moderator.
Are they visibale now? I can see them, but that may be my email-program (google) showing me
my own send email.

Sincerely,

TakeItAndRun


On 5 May 2013 23:20, nop head <[hidden email]> wrote:
The in-line images don't work. I think the mailing list strips attachments.


On 5 May 2013 19:56, Peter Falke <[hidden email]> wrote:
Here is a first sample program (see attachment). I only does round (circle) extrusions.
It is very simple; two spheres along the path are connected by the hull() command.
It is very stable and produces nicely round 'elbows' at kinks in the path.
It handles scale very well; when the scale is zero the extrusion is discontinuous.
Even jumps, like in tan(t) are handled nicely.
But it is somewhat slow
With fn$=16 and tstep=100 it takes 3min for F5, and 31min for F6 ( picture in red/green)
But I believe this is mainly due to the explicit union at the end, as the progress bar runs from 0 to 99 OK,but stops at 99 for a long time.

Comments and ideas welcome.

Sincerely,

TakeItAndRun

Inline images 3Inline images 2
Inline images 1


On 5 May 2013 19:13, Peter Falke <[hidden email]> wrote:
Thanks nop head
.
I mean, in laymen terms, kinks in the path.

Points were the slope of the path changes discontinuous.

How are these called?

Sincerely,

TakeItAndRun


On 5 May 2013 18:37, nop head <[hidden email]> wrote:
Inflection is not the right word for a tight bend. It simply means a point at which the curvature changes sign, so may not be much a of bend at all.


On 5 May 2013 17:32, Richard Benjamin <[hidden email]> wrote:
Most fat polylines in 2d have three options for tight corners
(inflection?) ... Miter, sharp or rounded. There must be procedures out
on the web to handle them? Anyway :

How about using the $fn etc to determine the number of segments on each
'elbow' on the path ?
$fn 0 would be sharp join,
$fn 1 would be mitred - (or beveled/one 45 degree face set on lines
meeting at 90 degrees)
$fn x would be set high to smooth elbows.

The guide profile path will all be straight segments with some degree of
angles between adjacent sections. Thus the 'outside' of the profile will
always expand adding material, and the inside will intersect. This may
get messy with non simple profiles.

Will the extruded profile be centered (I don't like this), or use the
0,0 as the centre ? THis will allow the profile to be extruded offset
from the path with interesting results possible.

  The problem with twist would be...elbows could have say $fn 50, but
then how many sections would you split the straight sections into? The
'steps' parameter would be needed I think, but ignore twists on the
bends themselves - however this may cause inconsistent/ uneven results
if there are short path segments - you would have to have fractional
steps as 'total length / steps' will never match the endpoints of
individual paths except in very simple cases.

On 05/05/2013 10:56, Alan Cox wrote:
> On Sun, 5 May 2013 06:21:56 +0200
> Peter Falke <[hidden email]> wrote:
>
>> Hi everybody,
>>
>> Extruding a shape along a curved path is something that people has
>> requested time and again.
> Bending an object rather than extruding. Extruding along a curved path is
> just a special case of that.
>
>> - How to deal with inflexion points; points along the path where the
>> curvature is great, so great that the extruded shape from two consecutive
>> steps intersect?
>>
>> - How to optimise the computational time required?
>>
>> I invite all to share their idea and code.
> For simple cases where I can approximate them acceptably and there are no
> awkward shapes I've generally done the extrude version (and also lots of
> mathematical progression ones) by simply doing something in the style of
>
>        union() {
>       for (depth=[0:lots]) {
>         translate([0,0,depth/stepspermm]) {
>           hull() {
>             slice_of_object(depth); // some fraction thick //
>             translate([0,0,depth+step])
>               slice_of_object(depth+step); // some fraction thick //
>           }
>       }
>        }
>
> with rotates and x,y movement as well as appropriate
>
> Bending an object around a curve is a bit trickier however. I've tried
> things like cutting it into thin slices with intersect and then
> moving/rotating each slice then unionining the result but it was too slow
> to be usable.
>
> Alan
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad
> http://openscad.org - https://flattr.com/thing/121566
>

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566



--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!



--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566



--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: Feature request: extrude along path

Peter Falke
Hi everybody,

a new instalment on the quest to path_extrude().

I attached the code. Here is the example of a 3 sided helix.
You have to specify functions for the path x(t) (3-dim), for the scale s(t), and the twist twist(t).
At every point of the path the shape to be extruded is rotated to be normal to the path and a hull() is performed with the next shape along the path.

Inline images 1



One limitation is that this will only work for convex shapes to be extruded, as the hull() command would fill in all concave parts of the shape.
So you have to either cut your shape into parts that are all convex extrude and piece the extruded path back together.
Or, if the concave part comes from a difference() operation you path_extrude() both parts and do the difference afterwards.
This later case might be very slow as the extruded path has a lot of elements, thus one might need to add a routine that does the difference for every single step along the path.

The other limitation is the time to compile and render. A long time goal would be optimisation of the render process, or faster computers ;-)
This example (3 circles with $fn=16 and one triangle) with 100 steps along the path took 13 min to render (F5) and 2h26min to compile (F6).
On a Acer, running on one processor only, at 1Ghz, under Win7.

Does someone have a real world example where he needs an extrude path or scale on a linear extrude? I'd like to test what step width you realistically need when printing.

Enjoy,

TakeItAndRun


On 6 May 2013 00:06, Peter Falke <[hidden email]> wrote:
The picture were above the size limit of 100k, so were awaiting aprovel from the list moderator.
Are they visibale now? I can see them, but that may be my email-program (google) showing me
my own send email.

Sincerely,

TakeItAndRun


On 5 May 2013 23:20, nop head <[hidden email]> wrote:
The in-line images don't work. I think the mailing list strips attachments.


On 5 May 2013 19:56, Peter Falke <[hidden email]> wrote:
Here is a first sample program (see attachment). I only does round (circle) extrusions.
It is very simple; two spheres along the path are connected by the hull() command.
It is very stable and produces nicely round 'elbows' at kinks in the path.
It handles scale very well; when the scale is zero the extrusion is discontinuous.
Even jumps, like in tan(t) are handled nicely.
But it is somewhat slow
With fn$=16 and tstep=100 it takes 3min for F5, and 31min for F6 ( picture in red/green)
But I believe this is mainly due to the explicit union at the end, as the progress bar runs from 0 to 99 OK,but stops at 99 for a long time.

Comments and ideas welcome.

Sincerely,

TakeItAndRun

Inline images 3Inline images 2
Inline images 1


On 5 May 2013 19:13, Peter Falke <[hidden email]> wrote:
Thanks nop head
.
I mean, in laymen terms, kinks in the path.

Points were the slope of the path changes discontinuous.

How are these called?

Sincerely,

TakeItAndRun


On 5 May 2013 18:37, nop head <[hidden email]> wrote:
Inflection is not the right word for a tight bend. It simply means a point at which the curvature changes sign, so may not be much a of bend at all.


On 5 May 2013 17:32, Richard Benjamin <[hidden email]> wrote:
Most fat polylines in 2d have three options for tight corners
(inflection?) ... Miter, sharp or rounded. There must be procedures out
on the web to handle them? Anyway :

How about using the $fn etc to determine the number of segments on each
'elbow' on the path ?
$fn 0 would be sharp join,
$fn 1 would be mitred - (or beveled/one 45 degree face set on lines
meeting at 90 degrees)
$fn x would be set high to smooth elbows.

The guide profile path will all be straight segments with some degree of
angles between adjacent sections. Thus the 'outside' of the profile will
always expand adding material, and the inside will intersect. This may
get messy with non simple profiles.

Will the extruded profile be centered (I don't like this), or use the
0,0 as the centre ? THis will allow the profile to be extruded offset
from the path with interesting results possible.

  The problem with twist would be...elbows could have say $fn 50, but
then how many sections would you split the straight sections into? The
'steps' parameter would be needed I think, but ignore twists on the
bends themselves - however this may cause inconsistent/ uneven results
if there are short path segments - you would have to have fractional
steps as 'total length / steps' will never match the endpoints of
individual paths except in very simple cases.

On 05/05/2013 10:56, Alan Cox wrote:
> On Sun, 5 May 2013 06:21:56 +0200
> Peter Falke <[hidden email]> wrote:
>
>> Hi everybody,
>>
>> Extruding a shape along a curved path is something that people has
>> requested time and again.
> Bending an object rather than extruding. Extruding along a curved path is
> just a special case of that.
>
>> - How to deal with inflexion points; points along the path where the
>> curvature is great, so great that the extruded shape from two consecutive
>> steps intersect?
>>
>> - How to optimise the computational time required?
>>
>> I invite all to share their idea and code.
> For simple cases where I can approximate them acceptably and there are no
> awkward shapes I've generally done the extrude version (and also lots of
> mathematical progression ones) by simply doing something in the style of
>
>        union() {
>       for (depth=[0:lots]) {
>         translate([0,0,depth/stepspermm]) {
>           hull() {
>             slice_of_object(depth); // some fraction thick //
>             translate([0,0,depth+step])
>               slice_of_object(depth+step); // some fraction thick //
>           }
>       }
>        }
>
> with rotates and x,y movement as well as appropriate
>
> Bending an object around a curve is a bit trickier however. I've tried
> things like cutting it into thin slices with intersect and then
> moving/rotating each slice then unionining the result but it was too slow
> to be usable.
>
> Alan
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad
> http://openscad.org - https://flattr.com/thing/121566
>

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566



--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!



--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566



--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!



--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566

extrudepathhullv0_1.scad (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Feature request: extrude along path

kintel
Administrator
In reply to this post by 'doc' ocelot

On 2013-05-05, at 20:17 , 'doc' ocelot wrote:

> a continuous function with a non-continuous derivative is "non-smooth".
>
A mathematical term for it would be C0 continuity: http://en.wikipedia.org/wiki/Smooth_function#Order_of_continuity

 -Marius

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: Feature request: extrude along path

Trevor Ballantine
In reply to this post by Peter Falke



sent from my Telstra NEXTG™ handset

----- Reply message -----
From: "nop head" <[hidden email]>
To: "[hidden email]" <[hidden email]>
Subject: [OpenSCAD] Feature request: extrude along path
Date: Mon, May 6, 2013 07:20




The in-line images don't work. I think the mailing list strips attachments.


On 5 May 2013 19:56, Peter Falke <[hidden email]> wrote:
Here is a first sample program (see attachment). I only does round (circle) extrusions.
It is very simple; two spheres along the path are connected by the hull() command.
It is very stable and produces nicely round 'elbows' at kinks in the path.
It handles scale very well; when the scale is zero the extrusion is discontinuous.
Even jumps, like in tan(t) are handled nicely.
But it is somewhat slow
With fn$=16 and tstep=100 it takes 3min for F5, and 31min for F6 ( picture in red/green)
But I believe this is mainly due to the explicit union at the end, as the progress bar runs from 0 to 99 OK,but stops at 99 for a long time.

Comments and ideas welcome.

Sincerely,

TakeItAndRun

Inline images 3Inline images 2
Inline images 1


On 5 May 2013 19:13, Peter Falke <[hidden email]> wrote:
Thanks nop head
.
I mean, in laymen terms, kinks in the path.

Points were the slope of the path changes discontinuous.

How are these called?

Sincerely,

TakeItAndRun


On 5 May 2013 18:37, nop head <[hidden email]> wrote:
Inflection is not the right word for a tight bend. It simply means a point at which the curvature changes sign, so may not be much a of bend at all.


On 5 May 2013 17:32, Richard Benjamin <[hidden email]> wrote:
Most fat polylines in 2d have three options for tight corners
(inflection?) ... Miter, sharp or rounded. There must be procedures out
on the web to handle them? Anyway :

How about using the $fn etc to determine the number of segments on each
'elbow' on the path ?
$fn 0 would be sharp join,
$fn 1 would be mitred - (or beveled/one 45 degree face set on lines
meeting at 90 degrees)
$fn x would be set high to smooth elbows.

The guide profile path will all be straight segments with some degree of
angles between adjacent sections. Thus the 'outside' of the profile will
always expand adding material, and the inside will intersect. This may
get messy with non simple profiles.

Will the extruded profile be centered (I don't like this), or use the
0,0 as the centre ? THis will allow the profile to be extruded offset
from the path with interesting results possible.

  The problem with twist would be...elbows could have say $fn 50, but
then how many sections would you split the straight sections into? The
'steps' parameter would be needed I think, but ignore twists on the
bends themselves - however this may cause inconsistent/ uneven results
if there are short path segments - you would have to have fractional
steps as 'total length / steps' will never match the endpoints of
individual paths except in very simple cases.

On 05/05/2013 10:56, Alan Cox wrote:
> On Sun, 5 May 2013 06:21:56 +0200
> Peter Falke <[hidden email]> wrote:
>
>> Hi everybody,
>>
>> Extruding a shape along a curved path is something that people has
>> requested time and again.
> Bending an object rather than extruding. Extruding along a curved path is
> just a special case of that.
>
>> - How to deal with inflexion points; points along the path where the
>> curvature is great, so great that the extruded shape from two consecutive
>> steps intersect?
>>
>> - How to optimise the computational time required?
>>
>> I invite all to share their idea and code.
> For simple cases where I can approximate them acceptably and there are no
> awkward shapes I've generally done the extrude version (and also lots of
> mathematical progression ones) by simply doing something in the style of
>
>        union() {
>       for (depth=[0:lots]) {
>         translate([0,0,depth/stepspermm]) {
>           hull() {
>             slice_of_object(depth); // some fraction thick //
>             translate([0,0,depth+step])
>               slice_of_object(depth+step); // some fraction thick //
>           }
>       }
>        }
>
> with rotates and x,y movement as well as appropriate
>
> Bending an object around a curve is a bit trickier however. I've tried
> things like cutting it into thin slices with intersect and then
> moving/rotating each slice then unionining the result but it was too slow
> to be usable.
>
> Alan
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad
> http://openscad.org - https://flattr.com/thing/121566
>

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566



--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!



--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: Feature request: extrude along path

Trevor Ballantine
In reply to this post by Peter Falke



sent from my Telstra NEXTG™ handsetg

----- Reply message -----
From: "nop head" <[hidden email]>
To: "[hidden email]" <[hidden email]>
Subject: [OpenSCAD] Feature request: extrude along path
Date: Mon, May 6, 2013 07:20




The in-line images don't work. I think the mailing list strips attachments.


On 5 May 2013 19:56, Peter Falke <[hidden email]> wrote:
Here is a first sample program (see attachment). I only does round (circle) extrusions.
It is very simple; two spheres along the path are connected by the hull() command.
It is very stable and produces nicely round 'elbows' at kinks in the path.
It handles scale very well; when the scale is zero the extrusion is discontinuous.
Even jumps, like in tan(t) are handled nicely.
But it is somewhat slow
With fn$=16 and tstep=100 it takes 3min for F5, and 31min for F6 ( picture in red/green)
But I believe this is mainly due to the explicit union at the end, as the progress bar runs from 0 to 99 OK,but stops at 99 for a long time.

Comments and ideas welcome.

Sincerely,

TakeItAndRun

Inline images 3Inline images 2
Inline images 1


On 5 May 2013 19:13, Peter Falke <[hidden email]> wrote:
Thanks nop head
.
I mean, in laymen terms, kinks in the path.

Points were the slope of the path changes discontinuous.

How are these called?

Sincerely,

TakeItAndRun


On 5 May 2013 18:37, nop head <[hidden email]> wrote:
Inflection is not the right word for a tight bend. It simply means a point at which the curvature changes sign, so may not be much a of bend at all.


On 5 May 2013 17:32, Richard Benjamin <[hidden email]> wrote:
Most fat polylines in 2d have three options for tight corners
(inflection?) ... Miter, sharp or rounded. There must be procedures out
on the web to handle them? Anyway :

How about using the $fn etc to determine the number of segments on each
'elbow' on the path ?
$fn 0 would be sharp join,
$fn 1 would be mitred - (or beveled/one 45 degree face set on lines
meeting at 90 degrees)
$fn x would be set high to smooth elbows.

The guide profile path will all be straight segments with some degree of
angles between adjacent sections. Thus the 'outside' of the profile will
always expand adding material, and the inside will intersect. This may
get messy with non simple profiles.

Will the extruded profile be centered (I don't like this), or use the
0,0 as the centre ? THis will allow the profile to be extruded offset
from the path with interesting results possible.

  The problem with twist would be...elbows could have say $fn 50, but
then how many sections would you split the straight sections into? The
'steps' parameter would be needed I think, but ignore twists on the
bends themselves - however this may cause inconsistent/ uneven results
if there are short path segments - you would have to have fractional
steps as 'total length / steps' will never match the endpoints of
individual paths except in very simple cases.

On 05/05/2013 10:56, Alan Cox wrote:
> On Sun, 5 May 2013 06:21:56 +0200
> Peter Falke <[hidden email]> wrote:
>
>> Hi everybody,
>>
>> Extruding a shape along a curved path is something that people has
>> requested time and again.
> Bending an object rather than extruding. Extruding along a curved path is
> just a special case of that.
>
>> - How to deal with inflexion points; points along the path where the
>> curvature is great, so great that the extruded shape from two consecutive
>> steps intersect?
>>
>> - How to optimise the computational time required?
>>
>> I invite all to share their idea and code.
> For simple cases where I can approximate them acceptably and there are no
> awkward shapes I've generally done the extrude version (and also lots of
> mathematical progression ones) by simply doing something in the style of
>
>        union() {
>       for (depth=[0:lots]) {
>         translate([0,0,depth/stepspermm]) {
>           hull() {
>             slice_of_object(depth); // some fraction thick //
>             translate([0,0,depth+step])
>               slice_of_object(depth+step); // some fraction thick //
>           }
>       }
>        }
>
> with rotates and x,y movement as well as appropriate
>
> Bending an object around a curve is a bit trickier however. I've tried
> things like cutting it into thin slices with intersect and then
> moving/rotating each slice then unionining the result but it was too slow
> to be usable.
>
> Alan
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad
> http://openscad.org - https://flattr.com/thing/121566
>

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566



--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!



--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566