Hello,
i am looking for a way to check via script if the outer contours of a .dxf Drawing are all closed.
In my scenario the customer uploads a .dxf File that he wants to be processed but before
doing so we need to check if there are any open outer contours which would make the drawing invalid.
Does anyone have an idea of how i can realise this?
Thanks for your support.
[Solved] Check for open Contours
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
[Solved] Check for open Contours
Last edited by SM_MaGa on Thu Oct 07, 2021 5:26 pm, edited 1 time in total.
Re: Check for open Contours
Hi,
Here you let us know you have worked out how to find and handle 'contours'.
https://qcad.org/rsforum/viewtopic.php?t=8508
What is left of non-connecting entities are candidates for open contours.
Or by slicing out ids of contour entities from a global id list ... RDocument.queryAllEntities(undone, allBlocks, type=RS.EntityAll)
Or by selecting the found contours and inversing the selection.
This still may need some filtering ... e.g.: Text, solids, hatches ....
Regards,
CVH
Here you let us know you have worked out how to find and handle 'contours'.
https://qcad.org/rsforum/viewtopic.php?t=8508
What is left of non-connecting entities are candidates for open contours.
Or by slicing out ids of contour entities from a global id list ... RDocument.queryAllEntities(undone, allBlocks, type=RS.EntityAll)
Or by selecting the found contours and inversing the selection.
This still may need some filtering ... e.g.: Text, solids, hatches ....
Regards,
CVH
Re: Check for open Contours
Hi CVH,
thanks four your input.
Thanks to that i could develop a solution for this problem.
I now export all Information needed (Start and Endpoints for all Entities that offer this Information)
and check in the ERP System if each Start/End-Point has a connecting Start/End-Point on the same Contour.
Greetings,
SM_MaGa
thanks four your input.
Thanks to that i could develop a solution for this problem.
I now export all Information needed (Start and Endpoints for all Entities that offer this Information)
and check in the ERP System if each Start/End-Point has a connecting Start/End-Point on the same Contour.
Greetings,
SM_MaGa