Detect Zero length entities tolerance?

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

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4942
Joined: Wed May 11, 2011 9:25 am
Location: USA

Detect Zero length entities tolerance?

Post by Husky » Fri Dec 04, 2015 10:34 am

Hi,

I'm right now trying to understand how the "Detect Zero length entities" works regarding to the tolerance. My impression till now was that if I give the tool the tolerance of (e.g.) 0.005 it will select everything what is less than 0.005. For lines it works like expected - but it doesn't works at circles. I have the feeling that it works on circles like "equal or less" to the given value.
Husky-2015.12.04-02.png
Husky-2015.12.04-02.png (27.32 KiB) Viewed 3605 times
Is that correct and if yes - why is that so?
Detect Zero length tolerance.dxf
(107.5 KiB) Downloaded 296 times
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

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

Re: Detect Zero length entities tolerance?

Post by andrew » Fri Dec 04, 2015 11:55 am

The condition is always size <= tolerance, for all entities.

Unfortunately, computers cannot store floating point numbers accurately enough to make such comparisons reliable.

If you wish to select everything that is 0.005 or smaller, enter a tolerance that is larger than 0.005 (e.g. 0.0051 or 0.00500001).

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4942
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Detect Zero length entities tolerance?

Post by Husky » Sat Dec 05, 2015 8:25 am

andrew wrote:Unfortunately, computers cannot store floating point numbers accurately enough to make such comparisons reliable.
Thanks Andrew - I wasn't aware of that.


andrew wrote:If you wish to select everything that is 0.005 or smaller, enter a tolerance that is larger than 0.005 (e.g. 0.0051 or 0.00500001).
Ok - that isn't really satisfying to me but I understand that we have to deal with this fact. But may I ask you one more question: I've never noticed this problem with the "Selection Filter Tool". Is it different working - except that it is only searching for one Entity Typ?
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

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

Re: Detect Zero length entities tolerance?

Post by andrew » Mon Dec 07, 2015 9:11 am

Husky wrote:But may I ask you one more question: I've never noticed this problem with the "Selection Filter Tool". Is it different working - except that it is only searching for one Entity Typ?
The selection filter would also have this problem and since a query with operator "= (equals)" would simply never yield any results at all, the tool deals with these tolerance issues internally by using a fuzzy comparison.

When using the zero length detection tool on the other hand, a tolerance is entered and not a target value. It would be possible but possibly somewhat confusing to have another internal tolerance applied to the entered tolerance. I never really thought of the zero length detection tolerance as a precise value but rather an approximate threshold to make sure only very tiny entities are selected / deleted.

If you need a precise threshold the selection filter seems better suited indeed.

Post Reply

Return to “QCAD 'How Do I' Questions”