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 ?
Thanks,
Dzenita
Entity from his center point
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Re: Entity from his center point
You can query entities based on location using:
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.
Code: Select all
var ids = doc.queryIntersectedEntitiesXY(new RBox(x1,y1, x2,y2), true);
If this does not solve your problem, please elaborate on what you are trying to do.