STL and OBJ Files

Discussion in 'Digital Cameras' started by Dudley Hanks, Feb 22, 2014.

  1. Dudley Hanks

    Dudley Hanks Guest

    The 3D printers I have access to use .stl and .obj
    files.

    Is there anybody out there with 3D modeling experience?

    If so, is it possible to put one of these files together using a
    text editor?

    I've tried using the recommended CAD program, but it isn't
    exactly blind friendly, so it doesn't appear very
    useful.

    In particular, I wonder about the .obj files. I use a number of
    compilers that can produce obj files, but I'm assuming the output
    of these compilers isn't exactly what the printers
    expect.

    Thanks for any info you might have.

    Take Care,
    Dudley
     
    Dudley Hanks, Feb 22, 2014
    #1
    1. Advertisements

  2. Dudley Hanks

    David Harmon Guest

    On Sat, 22 Feb 2014 09:33:19 -0600 in rec.photo.digital, Dudley
    Have you tried OpenSCAD at all. It's basically a programming
    language for describing 3D objects. It normally runs inside its
    own GUI, but I don't know if it can be made more friendly.
    It produces .stl files that standard printer software can import.

    http://www.openscad.org/
     
    David Harmon, Feb 22, 2014
    #2
    1. Advertisements

  3. Dudley Hanks

    Savageduck Guest

    Photoshop Extended or PS/CC 3D has its 3D printing capability and is
    worth checking out if that is the sort of thing you want to invest in.
    < http://www.photoshop.com/products/photoshop/3d >
    < http://www.photoshop.com/products/photoshop/3d/printers >
    <
    http://static.photoshop.com/content/downloads/Adobe 3D Printer Profiles.pdf
     
    Savageduck, Feb 22, 2014
    #3
  4. Yes, it's possible, just not very practical. The files are lists of
    vertices for triangular faces in a 3d coordinate system. OBJ is a bit
    more efficient since it stores the vertices separately from the faces,
    where STL repeats the vertices for each face, and also stores a normal
    which is redundant since it can be calculated from the vertices.

    Here's a sample OBJ file for a cube. (no, I didn't do this by hand, I
    used the program MESHLAB)

    ####
    #
    # OBJ File Generated by Meshlab
    #
    ####
    # Object box.obj
    #
    # Vertices: 8
    # Faces: 12
    #
    ####
    v 0.500000 -0.500000 0.500000
    v 0.500000 0.500000 0.500000
    v -0.500000 0.500000 0.500000
    v 0.500000 -0.500000 -0.500000
    v 0.500000 0.500000 -0.500000
    v -0.500000 -0.500000 0.500000
    v -0.500000 -0.500000 -0.500000
    v -0.500000 0.500000 -0.500000
    # 8 vertices, 0 vertices normals

    f 2 3 1
    f 6 1 3
    f 2 1 5
    f 4 5 1
    f 2 5 3
    f 8 3 5
    f 7 8 4
    f 5 4 8
    f 7 4 6
    f 1 6 4
    f 7 6 8
    f 3 8 6
    # 12 faces, 0 coords texture

    # End of File

    And here's the same cube as an STL file:

    solid vcg
    facet normal 0.000000e+00 0.000000e+00 1.000000e+00
    outer loop
    vertex 5.000000e-01 5.000000e-01 5.000000e-01
    vertex -5.000000e-01 5.000000e-01 5.000000e-01
    vertex 5.000000e-01 -5.000000e-01 5.000000e-01
    endloop
    endfacet
    facet normal 0.000000e+00 0.000000e+00 1.000000e+00
    outer loop
    vertex -5.000000e-01 -5.000000e-01 5.000000e-01
    vertex 5.000000e-01 -5.000000e-01 5.000000e-01
    vertex -5.000000e-01 5.000000e-01 5.000000e-01
    endloop
    endfacet
    facet normal 1.000000e+00 0.000000e+00 0.000000e+00
    outer loop
    vertex 5.000000e-01 5.000000e-01 5.000000e-01
    vertex 5.000000e-01 -5.000000e-01 5.000000e-01
    vertex 5.000000e-01 5.000000e-01 -5.000000e-01
    endloop
    endfacet
    facet normal 1.000000e+00 0.000000e+00 0.000000e+00
    outer loop
    vertex 5.000000e-01 -5.000000e-01 -5.000000e-01
    vertex 5.000000e-01 5.000000e-01 -5.000000e-01
    vertex 5.000000e-01 -5.000000e-01 5.000000e-01
    endloop
    endfacet
    facet normal 0.000000e+00 1.000000e+00 0.000000e+00
    outer loop
    vertex 5.000000e-01 5.000000e-01 5.000000e-01
    vertex 5.000000e-01 5.000000e-01 -5.000000e-01
    vertex -5.000000e-01 5.000000e-01 5.000000e-01
    endloop
    endfacet
    facet normal 0.000000e+00 1.000000e+00 0.000000e+00
    outer loop
    vertex -5.000000e-01 5.000000e-01 -5.000000e-01
    vertex -5.000000e-01 5.000000e-01 5.000000e-01
    vertex 5.000000e-01 5.000000e-01 -5.000000e-01
    endloop
    endfacet
    facet normal 0.000000e+00 0.000000e+00 -1.000000e+00
    outer loop
    vertex -5.000000e-01 -5.000000e-01 -5.000000e-01
    vertex -5.000000e-01 5.000000e-01 -5.000000e-01
    vertex 5.000000e-01 -5.000000e-01 -5.000000e-01
    endloop
    endfacet
    facet normal -0.000000e+00 -0.000000e+00 -1.000000e+00
    outer loop
    vertex 5.000000e-01 5.000000e-01 -5.000000e-01
    vertex 5.000000e-01 -5.000000e-01 -5.000000e-01
    vertex -5.000000e-01 5.000000e-01 -5.000000e-01
    endloop
    endfacet
    facet normal 0.000000e+00 -1.000000e+00 0.000000e+00
    outer loop
    vertex -5.000000e-01 -5.000000e-01 -5.000000e-01
    vertex 5.000000e-01 -5.000000e-01 -5.000000e-01
    vertex -5.000000e-01 -5.000000e-01 5.000000e-01
    endloop
    endfacet
    facet normal -0.000000e+00 -1.000000e+00 -0.000000e+00
    outer loop
    vertex 5.000000e-01 -5.000000e-01 5.000000e-01
    vertex -5.000000e-01 -5.000000e-01 5.000000e-01
    vertex 5.000000e-01 -5.000000e-01 -5.000000e-01
    endloop
    endfacet
    facet normal -1.000000e+00 0.000000e+00 0.000000e+00
    outer loop
    vertex -5.000000e-01 -5.000000e-01 -5.000000e-01
    vertex -5.000000e-01 -5.000000e-01 5.000000e-01
    vertex -5.000000e-01 5.000000e-01 -5.000000e-01
    endloop
    endfacet
    facet normal -1.000000e+00 -0.000000e+00 -0.000000e+00
    outer loop
    vertex -5.000000e-01 5.000000e-01 5.000000e-01
    vertex -5.000000e-01 5.000000e-01 -5.000000e-01
    vertex -5.000000e-01 -5.000000e-01 5.000000e-01
    endloop
    endfacet
    endsolid vcg

    Nope, not the same at all.
     
    Mark Storkamp, Feb 22, 2014
    #4
  5. Dudley Hanks

    Dudley Hanks Guest


    Yeah, that's what I figured, but thought I'd check just the
    same...

    And, yeah, I can see what you mean, possible but not practicle.


    I'll just have to keep experimenting.

    Thanks,
    Dudley
     
    Dudley Hanks, Feb 23, 2014
    #5
  6. Dudley Hanks

    Dudley Hanks Guest


    Yes, I've tried Openscad, but the interface doesn't work with
    my reader.

    But, having said that, I think it's possible to write the
    Openscad code in a text editor and then import it in for
    processing.

    If all else fails, I should be able to write all the commands
    and then get some sighted help to produce the .stl file.


    I haven't tried the PS route, yet, as I'd like to know it's
    going to work before I spend any cash.

    Take Care,
    Dudley
     
    Dudley Hanks, Feb 23, 2014
    #6
  7. Dudley Hanks

    David Harmon Guest

    David Harmon, Mar 15, 2014
    #7
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.