Detecting breaks or gaps in paths (contours)

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
andrew
Site Admin
Posts: 9061
Joined: Fri Mar 30, 2007 6:07 am

Detecting breaks or gaps in paths (contours)

Post by andrew » Mon Nov 08, 2021 8:22 am

From a QCAD user:
How can I find (small) breaks / gaps in a path that is supposed to be closed?

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

Re: Detecting breaks or gaps in paths (contours)

Post by andrew » Mon Nov 08, 2021 8:45 am

To make sure a path has no gaps in it, it is often recommendable to convert it into a polyline:

- Right-click on any entity of the path and choose "Auto Create polyline" (or "Auto Extend Polyline" if the entity clicked is already a polyline forming part of the path)

- Select the newly created polyline. If only a part of the path is selected, you will find gaps where the selection stops. Close these gaps and auto extend the polyline again:
Screenshot 2021-11-08 at 08.35.49.png
Screenshot 2021-11-08 at 08.35.49.png (16.58 KiB) Viewed 1749 times
- Once the whole path is selected as one polyline, you might still be dealing with an open polyline (i.e. a small gap between the start and end of the polyline). You can quickly verify this in the property editor (View > Property Editor). If property "Closed" is "Yes", you now have a closed path. If property closed is "No", you will find a gap at the red reference point of the polyline which indicates its start point:
Screenshot 2021-11-08 at 08.37.14.png
Screenshot 2021-11-08 at 08.37.14.png (90.77 KiB) Viewed 1749 times
Screenshot 2021-11-08 at 08.31.11.png
Screenshot 2021-11-08 at 08.31.11.png (27.7 KiB) Viewed 1749 times
- Close that gap as well and you're done.

- If possible, keep this polyline from now on to guarantee that no new gaps are introduced. If you prefer to work with loose entities, you can break up the polyline into segments again using Modify > Explode.

Note: Polylines can only contain line and circular arc segments. If you are dealing with splines (or ellipse arcs starting with QCAD 3.27), the above approach will still work but your entities will be converted into lines and arcs which might not be desirable. In this case, you could double-click your path to select all connected entities as a way to find gaps where the selection stops.

Post Reply

Return to “QCAD 'How Do I' Questions”