How to Troubleshoot Non-Closed Polylines?

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
HappyShat
Active Member
Posts: 44
Joined: Thu Jul 25, 2019 9:43 pm

How to Troubleshoot Non-Closed Polylines?

Post by HappyShat » Thu Nov 21, 2019 4:08 am

I've created a drawing in QCAD that I'm exporting into another CAD program. Everything but one object will import. I've spent a few hours looking carefully at this structure (see attached QCAD file) - but was unable to visually spot anything wrong.

Next, I found this helpful post:
viewtopic.php?t=6228

containing this information:

1. Modify > Detection > Detect Duplicates
This finds and selects 10 entities.
2. Click delete button at the top right.
3. Select > Select All
4. Draw > Polyline > Polyline from Selection
This leaves one entity selected which is not connected to anything due to gaps. Correct these.
There are many other points where entities are not properly connected (intersections or gaps). You might want to use the '>' key to select the polylines one by one and correct those problems.
Note: if you use the proper trim or break out tools to create such a drawing, you will not be left with such unwanted intersections or gaps.


Although it was or seemed helpful to use the Detect Duplicates tool and then use the < > keys to help troubleshoot the troublesome object - I was never successful in troubleshooting and cleaning up this object such that it would import into my other CAD program. Similar objects (with the arc) will import - leading me to believe there is some fundamental issue with this one object (such as non-closed polyline).

I've isolated the offending part - created a separate QCAD file and attached to this post.

Any help very much appreciated!

Operating System:
Windows 10 Pro.

QCAD version:
3.22.1.0
Attachments
wont_import.dwg
(18.34 KiB) Downloaded 445 times

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

Re: How to Troubleshoot Non-Closed Polylines?

Post by Husky » Thu Nov 21, 2019 4:50 am

HappyShat wrote:
Thu Nov 21, 2019 4:08 am
Similar objects (with the arc) will import - leading me to believe there is some fundamental issue with this one object (such as non-closed polyline).

I've isolated the offending part - created a separate QCAD file and attached to this post.
So far it looks pretty good to me but I don't know what the other CAD program is looking for.
On the other hand I'm really impressed by the used unit! Is that correct? Is the other CAD able to read that?
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..."

HappyShat
Active Member
Posts: 44
Joined: Thu Jul 25, 2019 9:43 pm

Re: How to Troubleshoot Non-Closed Polylines?

Post by HappyShat » Thu Nov 21, 2019 5:03 am

Thanks for having a look.

How can you tell if there's a gap? The structure needs to actually be closed. Every once in a while the ends of two polylines are so close - it becomes quite difficult to visually see the issue.

My other CAD program is importing several very similar objects.

Probably the easiest thing for me to do is redraw this item.

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

Re: How to Troubleshoot Non-Closed Polylines?

Post by Husky » Thu Nov 21, 2019 5:36 am

HappyShat wrote:
Thu Nov 21, 2019 5:03 am

How can you tell if there's a gap? The structure needs to actually be closed.
I misuse the hatch tool. If a hatch is possible then the shape has no gap. Your structure is closed!
HappyShat wrote:
Thu Nov 21, 2019 5:03 am
.. it becomes quite difficult to visually see the issue.
Well, the size of the shape makes it not easier. May I ask you again: Is the used unit correct?
If I convert it to inch then it has a overall size of 0.0064". That looks wrong to me ...

Husky-2019.11.20-01.png
Husky-2019.11.20-01.png (16.45 KiB) Viewed 7730 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..."

HappyShat
Active Member
Posts: 44
Joined: Thu Jul 25, 2019 9:43 pm

Re: How to Troubleshoot Non-Closed Polylines?

Post by HappyShat » Thu Nov 21, 2019 5:37 am

Husky wrote:
Thu Nov 21, 2019 4:50 am
On the other hand I'm really impressed by the used unit! Is that correct? Is the other CAD able to read that?
I probably should have used mils - but, yes, those units (inches) are correct. Yes, the other CAD program can read this - it has already imported all objects (very similar objects) except this one object. I have used the other CAD program for 22 years - I'm very familiar with it - it uses 9 significant figures. For this post I created a separate QCAD file with only the part giving the issue.

HappyShat
Active Member
Posts: 44
Joined: Thu Jul 25, 2019 9:43 pm

Re: How to Troubleshoot Non-Closed Polylines?

Post by HappyShat » Thu Nov 21, 2019 5:49 am

I copied (ctrl-c) and pasted (ctrl-v) from the original QCAD file to a new another (new) QCAD file - looks like the object got scaled. The width of the trace should be about 10.65 mil. The length you measure in the screen capture should be on the order of 0.16 inches.

That aside any problem with the polyline should still exist in the scaled drawing. The scale factor looks to be about 25-ish. So, just scale the attached drawing by 25.4.

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

Re: How to Troubleshoot Non-Closed Polylines?

Post by Husky » Thu Nov 21, 2019 6:11 am

HappyShat wrote:
Thu Nov 21, 2019 5:49 am
The length you measure in the screen capture should be on the order of 0.16 inches.
Nope - it isn't ...
HappyShat wrote:
Thu Nov 21, 2019 5:49 am
So, just scale the attached drawing by 25.4.
Thanks but there is no need for me to scale anything.

Howsoever. I can't find a gap and I'm pretty sure there is something else what isn't accepted by the other program.

Good luck!
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..."

HappyShat
Active Member
Posts: 44
Joined: Thu Jul 25, 2019 9:43 pm

Re: How to Troubleshoot Non-Closed Polylines?

Post by HappyShat » Thu Nov 21, 2019 6:34 am

I thought you needed to scale to hatch the part.

For the past couple of decades I've been using AutoCAD with the other CAD program - that has been the work flow for importing shapes. It might be the case that there is a subtle difference between AutoCAD and QCAD - hard to say. But, for the past few months QCAD has been working well for importing to the other CAD program.

Also, when I cut and pasted from one QCAD to another QCAD - the units seem to have been lost. Not a big deal once you know that can happen (probably need to make sure settings are the same between each QCAD).

I haven't tried the Hatch trick to check for closed polylines - but, I will. I had a similar trick in AutoCAD to check if my polylines were closed.

Anyway, thanks for your help.

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

Re: How to Troubleshoot Non-Closed Polylines?

Post by Husky » Thu Nov 21, 2019 6:58 am

HappyShat wrote:
Thu Nov 21, 2019 6:34 am
Also, when I cut and pasted from one QCAD to another QCAD - the units seem to have been lost.
That shouldn't be the case. If the source drawing is e.g. in inch and the target drawing is in mm Qcad will convert the drawing within a copy/paste task accordingly with the correct ratio - nothing is lost or needs to be scaled afterward. Of course - the insert scale option needs to be 1:1 for that ...

It's still hard for me to believe you produce something that is that small that Mil is an adequate unit. Except Watch parts or so but I'm sure you have your reasons for that ...
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..."

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

Re: How to Troubleshoot Non-Closed Polylines?

Post by CVH » Thu Nov 21, 2019 10:48 am

Downloaded the dwg.
Remark that Qcad does not store some errors.
In some cases the flaws may even be fixed with save, revert.
But I presume that you already did that several times over.

Huge units and very small sizes and the invers may induce number flaws.
Thats not the case here.
Size and units should not matter at all.
Regardless of the unattended scaling.

Is your scale 1:1 while pasting?

Units are in mil (1 mil = 0.001 inch = 0.0254mm).
The dwg file contains 26 Arcs and 4 lines.
Overall size is about 0.12mm high and 0.11mm wide.
(4.747324mil x 4.315018mil)
Can open, can import, can paste, can drop in qcad.

First: I don't understand the use of the terms:
HappyShat wrote:
Thu Nov 21, 2019 4:08 am
'the troublesome object'
'this object'
'this one object (such as non-closed polyline)'
'the offending part'
'the polyline'
They all supose this is one object instead of 30.

Can be hatched from selection as Husky said so the contour is fine.
The smallest parts are a little under 0.2 units so no spooks.
Can be converted to one single Logi Open Geo Closed Poly by Poly from segments, Tol=1e-9.
Start = end. 31 indexes, 30 segments so nothing added and nothing lost.
Can be converted to one single Logi Closed Poly by Poly from selection, Tol=1e-9.
30 indexes, 30 segments, similar outcome.
HappyShat wrote:
Thu Nov 21, 2019 4:08 am
The structure needs to actually be closed.
Well, the shape is geometrically closed up to the number accuracy.
That should be enough for any cad system.

Have you tried to import as poly?
Have you tried to convert to poly, move to other doc, wipe clean org place,
save&close both, reboot qcad, reopen both, set back, explode?

If at hand you can also replace it by a similar copy without the issue.
And, yes, sometimes the last remedy may be to redraw it.

Last: I have doubts about the system that has created this approximation by lines and arcs.

Regards,
CVH

HappyShat
Active Member
Posts: 44
Joined: Thu Jul 25, 2019 9:43 pm

Re: How to Troubleshoot Non-Closed Polylines?

Post by HappyShat » Thu Jan 09, 2020 10:47 pm

Husky wrote:
Thu Nov 21, 2019 6:58 am
It's still hard for me to believe you produce something that is that small that Mil is an adequate unit. Except Watch parts or so but I'm sure you have your reasons for that ...
I design mmW circuits. I've also have designed RFIC circuits - my large inductors were 300 to 400nm in diameter. Yes, nanometers.

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

Re: How to Troubleshoot Non-Closed Polylines?

Post by Husky » Thu Jan 09, 2020 11:49 pm

HappyShat wrote:
Thu Jan 09, 2020 10:47 pm
Husky wrote:
Thu Nov 21, 2019 6:58 am
It's still hard for me to believe you produce something that is that small that Mil is an adequate unit. Except Watch parts or so but I'm sure you have your reasons for that ...
I design mmW circuits. I've also have designed RFIC circuits - my large inductors were 300 to 400nm in diameter. Yes, nanometers.
Ouch! :shock: Ok, I believe you. :wink:
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..."

Post Reply

Return to “QCAD 'How Do I' Questions”