Entity from his center point

Use this forum to ask questions about how to do things in QCAD.

Moderator: andrew

Forum rules
Always indicate Operating system, QCAD version
Attach Drawing files, Screenshots
Newbie Member
Posts: 6
Joined: Thu Oct 19, 2017 2:34 pm

Entity from his center point

Postby dzenita » Tue Nov 07, 2017 9:38 am

Hi everyone,

I am coding in a script, and I have to get the entity from it's center point.
Is it possible? Is there a function that gets entity from his center ?


User avatar
Site Admin
Posts: 5285
Joined: Fri Mar 30, 2007 6:07 am

Re: Entity from his center point

Postby andrew » Thu Nov 09, 2017 3:15 pm

You can query entities based on location using:

Code: Select all

var ids = doc.queryIntersectedEntitiesXY(new RBox(x1,y1, x2,y2), true);

This will return all entities whose bounding box intersects with the given rectangle defined by corners x1,y1 and x2,y2.

If this does not solve your problem, please elaborate on what you are trying to do.

Return to “QCAD 'How Do I' Questions”

Who is online

Users browsing this forum: No registered users and 2 guests