Sizing of a Polygon box

Hi,

I get an error when I try to size a box. Are only non-box polygons allowed to be sized?

sq1 = RBA::Polygon::Box::new(x5, y5, x6, y6)
sq2 = sq1.sized(a, b, 2)

I get an error for sq2 indicating Boxes cannot be scaled. Do I need to cover the box into its 4 Point coordinates to allow for sizing?

Thanks,

Vikas

Comments

  • edited March 2019

    Hi Vikas,

    I'm sure the message is something else - there is no "RBA::Polygon::Box" object.

    Use

    sq1 = RBA::Polygon::new(RBA::Box::new(...))
    

    But boxes are easy to size with "Box#enlarged".

    Matthias

  • :-) Thank you! I am compiling a list of all these subtleties!

    Vikas

Sign In or Register to comment.