Puzzle, find midpoint of square with filleted corners

Discussion in 'AutoCAD' started by Casey Roberts, Nov 18, 2004.

  1. I have a drawing that we recieved from an architect. In this drawing, there
    are numerous (200+) steel columns shown in plan. (ie a rectangle / square
    with filleted corners). Unfortunately, these are all drawn as polylines.
    Since all of our beams and our column insertion points correspond to the
    center of these blocks, I am looking for a quick way to either insert a
    block/point/draw a line at the middle of the polylines. Any suggestions on
    how to go about getting the midpoint of a closed polyline?

    TIA

    Casey
     
    Casey Roberts, Nov 18, 2004
    #1
  2. Casey Roberts

    T.Willey Guest

    If you can use vla*- functions, then select the polyline turn it into a vlax-object, the grab the centroid point.

    Tim
     
    T.Willey, Nov 18, 2004
    #2
  3. Casey Roberts

    Fatfreek Guest

    Just off the top, I'd look at the Bounding Box of those polylines. Here's
    someone's (credit to you, whoever you are) code. Use a little math to
    deduce the center:

    (vl-load-com)
    (setq ent (car (entsel))
    obj (vlax-ename->vla-object ent)
    info (vla-getboundingbox obj 'minpt 'maxpt)
    llc (vlax-safearray->list minpt)
    urc (vlax-safearray->list maxpt)
    llc (list (- (car llc) 1.0)(- (cadr llc) 1.0))
    urc (list (+ (car urc) 1.0)(+ (cadr urc) 1.0))
    lrc (list (car urc)(cadr llc))
    ulc (list (car llc)(cadr urc)))
    (command "PLINE" llc lrc urc ulc "C")

    Len Miller
     
    Fatfreek, Nov 18, 2004
    #3
  4. Krupacadd Solutions http://www.KRUPACADD.com// has a FREE set of utilities
    that can be downloaded. One of the utilities is a point location aid that
    can select the midpoint between two points. You could use this utility with
    running osnaps. Give it a try.
     
    Gary Lafreniere, Nov 18, 2004
    #4
  5. Thanks, but I have one of those already, I just don't want to pick it 200
    times.
     
    Casey Roberts, Nov 18, 2004
    #5
  6. Thanks,

    I think this will work very well to get me started in the right direction.


    Casey
     
    Casey Roberts, Nov 18, 2004
    #6
  7. Casey Roberts

    devitg Guest

    the columns are sole or alone polyline or they are polyline in a block.??
     
    devitg, Nov 19, 2004
    #7
  8. Just polylines, No blocks :-(
     
    Casey Roberts, Nov 22, 2004
    #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.