Area and Centroid of Hatch or Boundary with islands

Discussion in 'AutoCAD' started by mikehetherton, May 6, 2004.

  1. Hello Group,

    I was wondering if anyone have worked on a program that will do the following: You have a rectangle with a smaller square inside it (could be located anywhere). I would like to know if there is a lisp already available that would give me the area and the centroid of the rectangle minus the smaller square. I hope this makes sence. TIA.

    Cheers
    Mike Hetherton
    Australia
     
    mikehetherton, May 6, 2004
    #1
  2. Mike,

    One way would be to convert the 2 shapes into a
    region, subtract the inner from the outter and then
    obtain the centroid via (vla-get-centroid....) or
    (vlax-get <object> 'centroid)

    --

    Autodesk Discussion Group Facilitator


    a rectangle with a smaller square inside it (could be located anywhere). I would like to
    know if there is a lisp already available that would give me the area and the centroid of
    the rectangle minus the smaller square. I hope this makes sence. TIA.
     
    Jason Piercey, May 6, 2004
    #2
  3. PS: the same would be applicable to the area.

    --

    Autodesk Discussion Group Facilitator


    <snip>
     
    Jason Piercey, May 6, 2004
    #3
  4. mikehetherton

    Juerg Menzi Guest

    mikehetherton

    Visit my homepage -> Free Stuff and search for 'VxGetMassProps'...

    Cheers
     
    Juerg Menzi, May 6, 2004
    #4
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.