How to intersect entities to create new geometry

Discussion forum for C++ and script developers who are using the QCAD development platform or who are looking to contribute to QCAD (translations, documentation, etc).

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files, scripts and screenshots.

Post one question per topic.

Post Reply
arun
Active Member
Posts: 34
Joined: Tue May 09, 2023 9:04 am

How to intersect entities to create new geometry

Post by arun » Wed Sep 27, 2023 11:50 am

Hi,
I have the following entities in my dwg
  • a slab layer containing a polyline entity
  • a beam layer containing multiple polyline entities
I know how to identify the beam entities that are contained inside the slab polyline.
How do I divide the big slab into multiple smaller slabs?
Or how do I generate new polylines that share the edge of the beam entities (here the edges will be between intersections of beams)

Attaching along screenshots and dxf file
Yellow indicates Slab & Red indicates Beam

Thanks,
Arun

Version: QCAD Professional 3.28.2 on MX Linux
Attachments
Slab Test.dxf
(103.97 KiB) Downloaded 193 times
Slab Test.png
Slab Test.png (20.75 KiB) Viewed 7533 times

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

Re: How to intersect entities to create new geometry

Post by CVH » Wed Sep 27, 2023 5:20 pm

Hi,

QCAD has no concept of enclosed areas.

You could play with a solid hatch of a multiple selection.
If the hatching works out then you can select it and explode it to the boundary shapes.
These shapes can then be merged into polylines.

Regards,
CVH

arun
Active Member
Posts: 34
Joined: Tue May 09, 2023 9:04 am

Re: How to intersect entities to create new geometry

Post by arun » Thu Sep 28, 2023 1:41 am

Thanks CVH. Will check this out.

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

Re: How to intersect entities to create new geometry

Post by CVH » Thu Sep 28, 2023 4:57 am

Hi,
made a trial case with your Slab Test.dxf and it doesn't work out. :(
You get the initial 6 polylines back exploded to 24 lines.
The solid hatch looks perfect but the beam shapes are not merged for that.

Like I said, QCAD can not merge, subtract, xor ... areas, everthing is basically line art.

look here for how I merged 13242 filled areas of various entity types into 384+17 closed contours.
https://www.qcad.org/rsforum/viewtopic.php?f=32&t=10305
The example was way more complex than your example where it is the matter of drawing 4 new rectangles. :wink:

You need to write a really clever script to perform this kind of operations. :roll:

Regards,
CVH

Post Reply

Return to “QCAD Programming, Script Programming and Contributing”