Extrude dxf on a cylinder

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

Extrude dxf on a cylinder

Thomas M.
Hello,

I'm trying to design a drilled cylinder. Right now I have the code attached to drill the holes.

I would find it more flexible to import a dxf representing the holes. I managed to do that on a plan with:


linear_extrude(height = 1) import("complex_drill.dxf");


How could I extrude the dxf on my cylinder? Any pointer would help.


Thanks
TM.



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

OpenSCAD.txt (792 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Extrude dxf on a cylinder

Felipe Sanches
I think we need to implement two new OpenSCAD operations called cylinder_extrude() and sphere_extrude() ...

Felipe Sanches

On Mon, Apr 29, 2013 at 2:32 PM, Thomas M. <[hidden email]> wrote:
Hello,

I'm trying to design a drilled cylinder. Right now I have the code attached to drill the holes.

I would find it more flexible to import a dxf representing the holes. I managed to do that on a plan with:


linear_extrude(height = 1) import("complex_drill.dxf");


How could I extrude the dxf on my cylinder? Any pointer would help.


Thanks
TM.



_______________________________________________
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: Extrude dxf on a cylinder

Peter Falke
r=10;
difference(){
  cylinder(r=r,h=r,center=true);
  linear_extrude(height = (2*r+2,center=true) import("complex_drill.dxf");
}



On 29 April 2013 19:53, Felipe Sanches <[hidden email]> wrote:
I think we need to implement two new OpenSCAD operations called cylinder_extrude() and sphere_extrude() ...

Felipe Sanches

On Mon, Apr 29, 2013 at 2:32 PM, Thomas M. <[hidden email]> wrote:
Hello,

I'm trying to design a drilled cylinder. Right now I have the code attached to drill the holes.

I would find it more flexible to import a dxf representing the holes. I managed to do that on a plan with:


linear_extrude(height = 1) import("complex_drill.dxf");


How could I extrude the dxf on my cylinder? Any pointer would help.


Thanks
TM.



_______________________________________________
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: Extrude dxf on a cylinder

Felipe Sanches
yes, but then it will distort his drill map. I think he meant he's got a dxf with a planification of the drill map for his cylinder.

In the future, we should implement a cylinder_extrude(d1, d2){ ... } operation that extrudes the 2d pointset in the radial direction of a cylinder starting at distace d1 from the center and ending the extrusion at distance d2 of the cylinder's center. Then we will be able to do something like:

difference(){
  cylinder(r=r, h=h);
  cylinder_extrude(d1=r-1, d2=r+1) import("drill_map.dxf");
}

does it make sense?

And think it would impose a condition that the width of the drill_map.dxf would be interpolated along the whole 360 degrees of the cylinder. Or maybe there should be some parameter to specify the proportion between the DXF Y coordinates and the angle of the cylindrical projection performed.

happy hacking,
Felipe Sanches

On Mon, Apr 29, 2013 at 6:02 PM, Peter Falke <[hidden email]> wrote:
r=10;
difference(){
  cylinder(r=r,h=r,center=true);
  linear_extrude(height = (2*r+2,center=true) import("complex_drill.dxf");
}



On 29 April 2013 19:53, Felipe Sanches <[hidden email]> wrote:
I think we need to implement two new OpenSCAD operations called cylinder_extrude() and sphere_extrude() ...

Felipe Sanches

On Mon, Apr 29, 2013 at 2:32 PM, Thomas M. <[hidden email]> wrote:
Hello,

I'm trying to design a drilled cylinder. Right now I have the code attached to drill the holes.

I would find it more flexible to import a dxf representing the holes. I managed to do that on a plan with:


linear_extrude(height = 1) import("complex_drill.dxf");


How could I extrude the dxf on my cylinder? Any pointer would help.


Thanks
TM.



_______________________________________________
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: Extrude dxf on a cylinder

Alan Cox
On Mon, 29 Apr 2013 18:11:04 -0300
Felipe Sanches <[hidden email]> wrote:

> yes, but then it will distort his drill map. I think he meant he's got a
> dxf with a planification of the drill map for his cylinder.
>
> In the future, we should implement a cylinder_extrude(d1, d2){ ... }

That seems to me to be a special case of what is actually needed which is
to extrude or bend a 3D object along a 2D path. That then covers all sorts
of other interesting cases like writing accurately on curved surfaces.

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: Extrude dxf on a cylinder

Felipe Sanches
Yes, bending 2d curves in space would be awesome for describing paper-folding models, folded-metal manufacturing and wire-bending structures :-D

Openscad is currently restricted to closed 3d models and closed 2d shapes in the plane.
We should consider an API for arbitrary curves in space and a way to extrude something along those curve-descriptions.

On Mon, Apr 29, 2013 at 6:19 PM, Alan Cox <[hidden email]> wrote:
On Mon, 29 Apr 2013 18:11:04 -0300
Felipe Sanches <[hidden email]> wrote:

> yes, but then it will distort his drill map. I think he meant he's got a
> dxf with a planification of the drill map for his cylinder.
>
> In the future, we should implement a cylinder_extrude(d1, d2){ ... }

That seems to me to be a special case of what is actually needed which is
to extrude or bend a 3D object along a 2D path. That then covers all sorts
of other interesting cases like writing accurately on curved surfaces.

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