How can I create a box from 8 points?

Discussion in 'AutoCAD' started by Ian Kelly, Mar 27, 2007.

  1. Ian Kelly

    Ian Kelly Guest

    Hi,

    I need to create solid boxes by entering all eight coordinates that
    define the corners of the box. I can't extrude a square, since all eight
    corners have different coordinates. I need something that works from the
    command line, since I have hundreds of these boxes to create, and want
    to use a script from a text file.

    The project is for my PhD, in which I am trying to make a 3D model of an
    ancient palace in Mesopotamia from old archaeological data.

    I hope someone has a suggestion, and I really appreciate your interest
    and help! Hope my question doesn't have an obvious answer I missed...

    Thanks again,

    Ian

    fab_1ATarchaeographiaDOTcommercial



    simplified example of the input data I have:
    0,0,0; 5,0,0; 5,0,5; 0,0,5; 0,5,0; 5,5,0; 5,5,5; 0,5,5
     
    Ian Kelly, Mar 27, 2007
    #1
  2. If you HAVE to do it the way you say, a LISP that creates the boxes for you
    could be devised.
     
    Michael Bulatovich, Mar 27, 2007
    #2
  3. Ian Kelly

    Ian Kelly Guest

    Is there another program that would allow me to do what I need to do? If
    programming is required, is LISP or VBA the way to go? Thanks a lot for
    your help!
     
    Ian Kelly, Mar 29, 2007
    #3
  4. It depends on what you know. This would be a fairly simple routine in LISP
    which I know. I can't speak to VBA.
     
    Michael Bulatovich, Mar 29, 2007
    #4
  5. Ian Kelly

    Bill Gilliss Guest

    Ian -

    What a great question. So simple to ask. Not so simple to answer.

    But yes, it can indeed be done. A couple of questions:

    1) do you need to have 3D solids as the final product? I ask because the
    easy ways to create these -- EXTRUDE and LOFT -- only work with planar
    initial objects (like a top and bottom polygon pair, or opposite sides
    as in your example). It doesn't sound as if your data describes perfect
    prismatic cuboids.

    2) would 3D faces be acceptable? With 2007 and below, these would stay
    faces, so you could make each set of faces a block or a group to keep
    them together. With 2008, you can create a solid from the faces.

    3) another possibility is a polyface mesh: one object, stretchable. This
    could be constructed from points, or by converting a set of faces to a mesh.

    4) do you have many solids defined in each input data file (like one per
    line), or one solid per file?

    5) is the data order IDENTICAL, i.e., the points of one vertical face
    listed counterclockwise from the bottom left corner, the points of the
    second face listed the same way as seen from the same direction?

    -Bill
     
    Bill Gilliss, Mar 30, 2007
    #5
  6. Ian Kelly

    Ian Kelly Guest

    Bill,

    Sorry for the delay in getting back to you, and thanks for your answer.
    As to your questions:

    1) I think I do need solids, as I want to do a spacial analysis in GIS,
    and apply textures in Studio MAX, so as far as I know I do need solids.

    2) I am not sure if 3D faces would be enough, particularly for the GIS
    analysis. But I think that my university can get 2008 for me, so I guess
    3D faces would work.

    3) I dont think a mesh would work, because of the GIS analysis.

    4) I have the data in an excel format, and would write a small basic
    program to convert the CSV to whatever AutoCAD command line accepts. I
    guess the best would be a string of XYZ points, always in the same order?

    5) The points are in the same order in the CSV file, clockwise around
    bottom then clockwise around top. Each set consists of 8 points, no
    more, no less.

    I appreciate your help!

    Ian
     
    Ian Kelly, Apr 7, 2007
    #6
  7. Ian Kelly

    Bill Gilliss Guest

    Ian -

    I was *sure* I read that plain old AutoCAD 2008 would allow one to
    create a solid from a set of bounding surfaces, but now that I have it
    installed, I can't find anything like that. Both the 2007 and 2008
    architectural add-ons, however, can do this via the
    AECMassElementConvert and ConvertTo3DSolids commands, so you could
    either use one of the architectural packages from the start, or create
    the surfaces in plain AutoCAD and then have someone with one of the
    architectural packages do all the conversions to solids at one time.

    By the way, MAX only uses surfaces, so will convert AutoCAD solids to
    surfaces when it imports them. What does the GIS software actually
    require? What import capabilities does it have? (What does it *do*?)

    -Bill

    Ian Kelly wrote:
    ....
     
    Bill Gilliss, Apr 7, 2007
    #7
  8. Ian Kelly

    Bill Gilliss Guest

    Ian -

    Could you provide the first 10 rows or so of the Excel file? I'd need to
    know exactly how these are set up to be able to get the data from a CSV
    export file into AutoCAD.

    Post it here or send it to me at bill at realerthanreal dot com
     
    Bill Gilliss, Apr 7, 2007
    #8
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.