Close



Page 2 of 2 FirstFirst 12
Results 11 to 20 of 21

Hybrid View

  1. #1
    Super Moderator Roxy's Avatar
    Join Date
    Apr 2014
    Location
    Lone Star State
    Posts
    2,182
    Of course opinions are going to vary. But I would do this in OpenScad.

    Code:
    height=30;
    n_boxes_in_x=5;
    n_boxes_in_y=7;
    size_of_box=30;
    wall_thickness=3;
    
    cube([n_boxes_in_x*size_of_box+wall_thickness,n_boxes_in_y*size_of_box,wall_thickness]);
    
    for(i=[0:n_boxes_in_x]) {
        translate([i*size_of_box,0,0]) cube([wall_thickness,n_boxes_in_y*size_of_box+wall_thickness,height]);
    }
    
    for(i=[0:n_boxes_in_y]) {
        translate([0,i*size_of_box,0]) cube([n_boxes_in_x*size_of_box+wall_thickness,wall_thickness,height]);
    }
    And guess what??? Its going to slice just fine because OpenScad doesn't have that bad behavior!
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Quote Originally Posted by Roxy View Post
    Of course opinions are going to vary. But I would do this in OpenScad.

    Code:
    height=30;
    n_boxes_in_x=5;
    n_boxes_in_y=7;
    size_of_box=30;
    wall_thickness=3;
    
    cube([n_boxes_in_x*size_of_box+wall_thickness,n_boxes_in_y*size_of_box,wall_thickness]);
    
    for(i=[0:n_boxes_in_x]) {
        translate([i*size_of_box,0,0]) cube([wall_thickness,n_boxes_in_y*size_of_box+wall_thickness,height]);
    }
    
    for(i=[0:n_boxes_in_y]) {
        translate([0,i*size_of_box,0]) cube([n_boxes_in_x*size_of_box+wall_thickness,wall_thickness,height]);
    }
    And guess what??? Its going to slice just fine because OpenScad doesn't have that bad behavior!

    Can you make it 6x6in and the boxes are. .75x.75inches. And the height 1.5"

  3. #3
    The SCAD doesn't work either! Get's stuck at generating perimeters...

  4. #4
    Super Moderator Roxy's Avatar
    Join Date
    Apr 2014
    Location
    Lone Star State
    Posts
    2,182
    Quote Originally Posted by DrZ234 View Post
    Can you make it 6x6in and the boxes are. .75x.75inches. And the height 1.5"
    It would be easier if you used metric units.

    These are the numbers I used to get close to what you specified:
    Code:
    height=45;
    n_boxes_in_x=7;
    n_boxes_in_y=7;
    size_of_box=21;
    wall_thickness=4;
    
    cube([n_boxes_in_x*size_of_box+wall_thickness,n_boxes_in_y*size_of_box,wall_thickness]);
    
    for(i=[0:n_boxes_in_x]) {
        translate([i*size_of_box,0,0]) cube([wall_thickness,n_boxes_in_y*size_of_box+wall_thickness,height]);
    }
    
    for(i=[0:n_boxes_in_y]) {
        translate([0,i*size_of_box,0]) cube([n_boxes_in_x*size_of_box+wall_thickness,wall_thickness,height]);
    }
    Quote Originally Posted by DrZ234 View Post
    The SCAD doesn't work either! Get's stuck at generating perimeters...
    Attached is the .STL generated by this code. It slices fine. It slices very quickly.

    Attachment 3354 ------- Attachment 3355
    Attached Files Attached Files
    Last edited by Roxy; 11-09-2014 at 02:43 PM.

  5. #5
    Roxy, thank you for all of your help. I don't know what is going on, if I put your .stl in Slic3r, I can generate gcode. If I put your .scad in OpenSCAD, then export .stl, then go to Slic3r, it generates gcode fine.

    HOWEVER, if I change the values at all to customize them in OpenSCAD, then export .stl, then I cannot generate code in Slic3r.

    I would like to figure out why this is happening!

    But what I actually need each little box needs to be 8.5mmx8.5mm square on the inside. The height needs to be 33mm. The total width of the thing must be around 158mm, so that should be 7x7 small boxes. Width of all walls 3mm should be fine.

    THANK YOU!

  6. #6
    Super Moderator Roxy's Avatar
    Join Date
    Apr 2014
    Location
    Lone Star State
    Posts
    2,182
    Quote Originally Posted by DrZ234 View Post
    Roxy, thank you for all of your help. I don't know what is going on, if I put your .stl in Slic3r, I can generate gcode. If I put your .scad in OpenSCAD, then export .stl, then go to Slic3r, it generates gcode fine.

    HOWEVER, if I change the values at all to customize them in OpenSCAD, then export .stl, then I cannot generate code in Slic3r.

    I would like to figure out why this is happening!
    Most likely, you are not compiling and rendering the design with the new information. OpenScad (as a convenience to you) will do a best guess rendering of the source code to show you what it thinks it will generate. But, the design is not compiled and you are not ready to export the information into a .STL file yet.

    Up on the Menu Bar of OpenScad, Do a Design / Compile & Render. Then export the generated information as an .STL file. That should slice without problems.

    Quote Originally Posted by DrZ234 View Post
    But what I actually need each little box needs to be 8.5mmx8.5mm square on the inside. The height needs to be 33mm. The total width of the thing must be around 158mm, so that should be 7x7 small boxes. Width of all walls 3mm should be fine.

    THANK YOU!
    Assuming you get the .STL to export in a fashion where your slicer can digest it, Just tweak any of the numbers at the top to get it to look exactly how you want it. Just to make the code simpler... The size of the box ignores the thickness of the walls. The size of the box goes from the center of the wall to the center of the wall. And the height includes the thickness of the bottom plate. You should be able to work around those issues to get what your want.

    Good luck....

  7. #7
    Quote Originally Posted by Roxy View Post
    Most likely, you are not compiling and rendering the design with the new information. OpenScad (as a convenience to you) will do a best guess rendering of the source code to show you what it thinks it will generate. But, the design is not compiled and you are not ready to export the information into a .STL file yet.

    Up on the Menu Bar of OpenScad, Do a Design / Compile & Render. Then export the generated information as an .STL file. That should slice without problems.



    Assuming you get the .STL to export in a fashion where your slicer can digest it, Just tweak any of the numbers at the top to get it to look exactly how you want it. Just to make the code simpler... The size of the box ignores the thickness of the walls. The size of the box goes from the center of the wall to the center of the wall. And the height includes the thickness of the bottom plate. You should be able to work around those issues to get what your want.

    Good luck....
    Did all of the above. Will try again I guess...

  8. #8
    Super Moderator Roxy's Avatar
    Join Date
    Apr 2014
    Location
    Lone Star State
    Posts
    2,182
    Do all the above... And post the .STL file. Let's see if I can slice what you generate.

Page 2 of 2 FirstFirst 12

Posting Permissions

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