Hide entities

Discussion forum for C++ and script developers who are using the QCAD development platform or who are looking to contribute to QCAD (translations, documentation, etc).

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files, scripts and screenshots.

Post one question per topic.

Post Reply
sinase
Active Member
Posts: 47
Joined: Sat Jan 30, 2021 11:12 pm

Hide entities

Post by sinase » Wed Jun 30, 2021 11:18 am

Hello,

Is there any way to select and delete hide entities that it not to belong to contour?

To detect duplicates doesn't work for that and, if i try to select contour (double click), these entities are selected too.

1.png
1.png (10.38 KiB) Viewed 5349 times
2.png
2.png (11.61 KiB) Viewed 5349 times
3.png
3.png (10.52 KiB) Viewed 5349 times
Many thanks.

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

Re: Hide entities

Post by andrew » Wed Jun 30, 2021 11:42 am

You'd have to program an algorithm for that (i.e. iterate through those entities, find overlapping entities, decide which ones to delete, etc.).

sinase
Active Member
Posts: 47
Joined: Sat Jan 30, 2021 11:12 pm

Re: Hide entities

Post by sinase » Fri Jul 02, 2021 8:43 am

Overlapping is not an entity attribute, isn`t it?

If i could return those entities overlapping each other and select the one whose length is less.

Regards.

CVH
Premier Member
Posts: 3416
Joined: Wed Sep 27, 2017 4:17 pm

Re: Hide entities

Post by CVH » Fri Jul 02, 2021 10:00 am

Hi,
sinase wrote:
Fri Jul 02, 2021 8:43 am
Overlapping is not an entity attribute, isn`t it?
No, it isn't implemented. :(
https://qcad.org/doc/qcad/3.0/developer/annotated.html

With a collection of entities sorted from shortest to longest.
Cycling all from shortest to longest:

For Line segments, being overlapped would mean:
Line X(0-n) his start or endpoint sits on any other longer entity.
AND
The orientation is the same or opposite as that of the longer entity.

Line segments can be overlapped by XLines ... Rays ... Polylines ... (Even by Ellipses & Splines :roll: )

For Arc segments something similar but then with start/end/radius/center.
Arcs can be overlapped by Circles ... Polylines ... (Again also by Ellipses & Splines :roll: )

A certain tolerance would be required too. :wink:

Then diversify in:
  • Connected
    Partially overlapped
    Fully overlapped
Just thinking out loud. :lol:
Regards,
CVH

Post Reply

Return to “QCAD Programming, Script Programming and Contributing”