Close



Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1

    Does this capability exist in freeware 3D editing software?

    I would like to create and print individual and separate rows of strips of a precise width and length with a flat surface on the bottom side and a curved surface described by a formula on the top side. Does a command line capability to do this exist within any of the freeware 3D editors so I could, for instance, create one strip in that manner and then duplicate it across the printer bed using the sort of duplicate function I see in Blender?

  2. #2
    Super Moderator Roxy's Avatar
    Join Date
    Apr 2014
    Location
    Lone Star State
    Posts
    2,182
    I'm playing with this same concept. I have a gear I need made that has problems because of its shape. I want to cut the gear into an interlocking top and bottom half.

    What you see cut in the pictures isn't the actual gear I need to do this to. But I could construct something to cut with a few cylinders and did that because it wouldn't clutter up the source code. The code makes the two shapes in the upper right by repeating a pattern. It uses those to do an intersection and a difference on the 'gear'. You can pull this into Open_SCAD and play with it there:


    cut_gear.jpg
    Attached Files Attached Files
    Last edited by Roxy; 06-27-2014 at 10:44 AM.

  3. #3
    Openscad code to import an existing STL file (your design) and create a group of the same:

    width = 20; // This is the width of your piece in the X dimension. We'll be repeating along the X axis.
    offset = 5; // Offset between copies of the piece.
    for( x = [0 : 5] )
    translate( v = [x * (width + offset), 0, 0] )
    import( "yourfilename.stl" );

  4. #4
    Quote Originally Posted by 3dkarma View Post
    Openscad code to import an existing STL file (your design) and create a group of the same:

    width = 20; // This is the width of your piece in the X dimension. We'll be repeating along the X axis.
    offset = 5; // Offset between copies of the piece.
    for( x = [0 : 5] )
    translate( v = [x * (width + offset), 0, 0] )
    import( "yourfilename.stl" );
    Thanks for that. I'm totally new to this, found Openscad via Google searches only a day ago, and it looked like it fit part of what I need with its extrude function to repeat a 2D figure. Is there any way to create that 2D figure with a flat line along its bottom and an arc from one end of that line segment to the other described by a formula?

  5. #5
    If you have a dxf file that describes the cross-section of the piece (and the cross-section is consistent for the entire length), you could import then extrude it:

    linear_extrude( height=10, center=true ) import("dxf_file.dxf"); // Untested but may work.

    Alternatively, you could describe the cross-section using the polygon function, then extrude it:

    rotate(a=[90,0,0]) linear_extrude( height=100, center=true ) polygon(points=[[0,0],[100,0],[0,100],[10,10],[80,10],[10,80]], paths=[[0,1,2],[3,4,5]]);

    This is something you may find useful: an OpenSCAD polygon generator.

  6. #6
    Reading comprehension was never my forte. Sounds like you already found most of what you need. OpenSCAD isn't great at arcs, but there may be a way to accomplish what you need. Can you post an example of a formula?

    Here's an arc module that may help; I adapted it from here.

    linear_extrude( height=10, center=true )
    arc( width=10, height=5 );


    module arc(width, height) {
    radius = ((width * width) + (4 * height * height)) / (8 * height);
    difference() {
    translate(v = [ 0, -(radius - height), 0 ]) {
    circle(r = radius, center = true);
    }
    translate(v = [ 0, -radius, 0 ]) {
    square(size = [ radius * 2, radius * 2 ], center = true);
    }
    }
    }

  7. #7
    Quote Originally Posted by 3dkarma View Post
    Reading comprehension was never my forte. Sounds like you already found most of what you need. OpenSCAD isn't great at arcs, but there may be a way to accomplish what you need. Can you post an example of a formula?

    Here's an arc module that may help; I adapted it from here.

    linear_extrude( height=10, center=true )
    arc( width=10, height=5 );


    module arc(width, height) {
    radius = ((width * width) + (4 * height * height)) / (8 * height);
    difference() {
    translate(v = [ 0, -(radius - height), 0 ]) {
    circle(r = radius, center = true);
    }
    translate(v = [ 0, -radius, 0 ]) {
    square(size = [ radius * 2, radius * 2 ], center = true);
    }
    }
    }
    Many thanks for your help. It would be best if I just described what I want to do - I want to 3D print aerodynamic leading edge strips for adhesive attachment to the square cut (and, therefore, very non-aerodynamic) leading edges of 3/16" and 1/4" aircraft-grade plywood. The formulas would be either the parabolic or Haack series found here:

    Parabolic:

    http://en.wikipedia.org/wiki/Nose_cone_design#Parabolic

    Haack series:

    http://en.wikipedia.org/wiki/Nose_co...n#Haack_series

    If that's not possible, although not ideal, the edge strip could just have a 1/2 cylinder shape.

  8. #8
    Super Moderator Roxy's Avatar
    Join Date
    Apr 2014
    Location
    Lone Star State
    Posts
    2,182
    Winston, here is something for you to play with. Lycan wanted to 3D-Print a Cod Catcher fishing lure. Take a look at the first file called Cod_Catcher.SCAD There isn't much to it. But check out the shape in makes when you pull it into Open_SCAD.

    cod_catcher.jpg

    Then... Pull the second file called Cod_Catcher-incremental-build.SCAD into Open_SCAD. If you delete the comments in order and tell it to recompile and render each time, you will see how to make very complex shapes (arcs) one step at a time.

    Specifically... Pull Cod_Catcher-incremental-build.SCAD into Open_SCAD and let it render the first time. You will see a couple of spheres stacked on top of each other.

    Then delete the '//1' on all the lines that have that. Do a Design / Compile&Render You will see the 'hull' of the fishing plug get defined.

    Then delete the '//2' on all the lines that have that. Do a Design / Compile&Render You will see the 'hull' of the fishing plug but with a hole drilled down its center

    Then delete the '//3' on all the lines that have that. Do a Design / Compile&Render You will see one side of the propeller shape get added to the fishing lure

    When you delete the '//5' comments.... The propellers get pruned to nice shapes off of the hull.

    This is a good example of how easily you can define what ever you want one step at a time. It might be good to spend a little bit of time at each step as you delete the comments to understand what it is doing and why it works.
    Attached Files Attached Files
    Last edited by Roxy; 07-02-2014 at 09:08 PM.

  9. #9
    OpenSCAD variables are set at compile time, not run time, so it makes it difficult to generate a polygon based on a formula.

    However, you should be able to use SolidPython, which is kind of like a Python programming language front-end to OpenSCAD, to accomplish what you need.

    It just became tomorrow here and the edges are getting fuzzy. I'll see if I can work up an example and post it tomorrow night.

  10. #10
    Super Moderator Roxy's Avatar
    Join Date
    Apr 2014
    Location
    Lone Star State
    Posts
    2,182
    Quote Originally Posted by 3dkarma View Post
    OpenSCAD variables are set at compile time, not run time, so it makes it difficult to generate a polygon based on a formula.
    Originally... He wanted a fancy arc.... How about we cut and paste this into Open_SCAD ????

    polygons();
    module polygons() {
    for(x=[-15:.50:15] )
    for(y=[-15:.50:15] )
    translate([x,y,0])
    cube([.501,.501, .01*x*x*x + .05*y*y -.06*x*y ]);
    }

    I bet when we zoom in so it fills our screen... And then rotate it... We see all kinds of arcs!!!

    Polygons.jpg

    But later... He wanted a Haack curve... What ever that is! The good news is Wikipedia actually gives the formula for different types of Haack curves. So of course we need to plug those into the little program above:

    Haack();
    module Haack() {
    for(x=[-5:.50:5] )
    for(t=[-5:.25:20] )
    translate([x,t,0])
    cube([.501,.2501, sqrt( t - sin(2*t)/2 + (1/3)* sin(t)*sin(t)*sin(t) ) ]);
    }

    Haack.jpg

    Or... Getting a little more fancy and using the theta=arccos(1-2x/L) substitution in the Haack curve formulas with no idea what numbers make sense...

    Haack();
    L=40;
    module Haack() {
    for(x=[-1:.10:15] )
    for(y=[-5:.25:20] )
    translate([x,y,0])
    cube([ .101,
    .2501,
    sqrt( acos(1-2*x/L) - sin(2*acos(1-2*x/L))/2 + (1/3)* sin(acos(1-2*x/L))*sin(acos(1-2*x/L))*sin(acos(1-2*x/L)) ) ]);
    }

    Haack2.jpg


    And the really great thing is anything you see here can be printed!!!! Each one of those pictures could be exported to an .STL file and used directly.
    Last edited by Roxy; 07-02-2014 at 08:53 PM.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •