kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #44351
Re: How to get bounding box of all items on a schematic page
Assuming that you are working on the master branch, you would iterate over
all items in the schematic SCH_SCREEN's RTree and join their boxes.
Something like this:
EDA_RECT bbox;
for( EDA_ITEM* item : GetScreen()->Items() )
bbox.Merge( item->GetBoundingBox() );
Warning: Code has not been tested.
-Seth
On Thu, Aug 6, 2020 at 5:28 PM <pjmonty@xxxxxxx> wrote:
> Hi,
>
> As the subject line says, I'm trying to figure out how to get a bounding
> box of just the items on a schematic page. I want all the items on the
> page in the bounding box, but not the page itself.
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
--
[image: KiCad Services Corporation Logo]
Seth Hillbrand
*Lead Developer*
+1-530-302-5483 <+12126039372>
Davis, CA
www.kipro-pcb.com info@xxxxxxxxxxxxx
References