Insert Vertex into Polyline that is Same as First Vertex

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
qtq
Registered Member
Posts: 1
Joined: Fri Jul 08, 2016 5:46 pm

Insert Vertex into Polyline that is Same as First Vertex

Post by qtq » Fri Jul 08, 2016 5:54 pm

I have a bunch of closed polylines which are used to define faces of planar geometry in an external program. However, I am having an issue where polylines that I have drawn by hand are valid, but polylines I copied from a DXF file are not valid in my external program.

As far as I can tell, the problem is one with the vertices in the polyline. In polylines I draw in QCAD with n corners (e.g. n = 4 for a rectangle, 5 for a pentagon, etc.), the polylines have n+1 vertices, where vertices 0 and n have identical coordinates. Vertices in a copied polyline only have n vertices, where the last vertex (n-1) does not coincide with the first (0).

If I could easily insert that last vertex into the existing polylines (basically copy the first text and append it to the list of vertices for the polyline), I believe my problem would be solved. However, I can not find a good way of appending vertices to a polyline, short of redrawing the whole line/shape, which I would very much like to avoid as I have ~80 of these to do.

Edit- I have resolved this problem by preprocessing the DXFs I create, after QCAD but before my final program. However, I am still interested in finding a solution to this in QCAD

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

Re: Insert Vertex into Polyline that is Same as First Vertex

Post by andrew » Tue Jul 12, 2016 4:35 pm

I'm not sure I understood your question, but this might just be the tool you are looking for:
http://qcad.org/doc/qcad/latest/referen ... eAutoClose

Post Reply

Return to “QCAD 'How Do I' Questions”