Please HELP:Retrieving dimensions of a rectangular REGION

Discussion in 'AutoCAD' started by Bradip Pitt, Jul 5, 2005.

  1. Bradip Pitt

    Bradip Pitt Guest

    Hi everybody, let's see if someone can help in solving this problem:

    I got a "REGION" entity obtained from a polyhedral 3D solid with the
    "solidedit - face - copy" command . The REGION is rectangular.

    How can I retrieve the size of the rectangular (height and width) from
    inside an AutoLISP routine?

    This is very useful for my project...so please HELP if you know.

    Thanks a lot

    Alberto (still working on his final project, but close to the end of the
    tunnel!)
     
    Bradip Pitt, Jul 5, 2005
    #1
  2. Bradip Pitt

    Fatfreek Guest

    Try this:

    (vla-getboundingbox
    (vlax-ename->vla-object (car (entsel)))
    'minpt
    'maxpt
    )
    (setq LowLeftPt
    (vlax-safearray->list minpt)
    )
    (setq UpRightPt
    (vlax-safearray->list maxpt)
    )

    Len Miller
     
    Fatfreek, Jul 27, 2005
    #2
  3. Bradip Pitt

    Kick Guest

    Otra alternativa es usar las propidades de la región,

    en particular perímetro y momento de inercia que son valores
    independientes del sistema de coordenadas.

    si se trata de un rectángulo, perímetro y momento de inercia se
    expresan como función de los lados.

    con un poco de álgebra, podrás despejarlos.

    Saludos
    Hugo
     
    Kick, Jul 27, 2005
    #3
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.