Page 1 of 1

Boolean Function

Posted: Sun Jun 08, 2025 7:30 pm
by alextrebus
Is there a boolean function in qcad pro ?
I can see that the function is there , under Draw. Polyline , there is a boolean operation available,( OW )
The command line is responding with "choose boolean mode " but knowhere an explanation about what is excpected here , I have tried [Union / Subtract / Intersection alle without succes.

Also I have purchased the Qcadbook and in the book there is not even a word with boolean present.


What i want to achieve is 2 shapes , both polylines 1 shape has a solid,second is an closed shape, now i want to subtract the shape 2 from shape 1
is there a way to get this done?

Re: Boolean Function

Posted: Mon Jun 09, 2025 5:20 am
by CVH
Hi, and welcome again on the QCAD forum.
alextrebus wrote:
Sun Jun 08, 2025 7:30 pm
Also I have purchased the Qcadbook and in the book there is not even a word with boolean present.
The book is a general guide to CAD explaining some common methods at the hand of the QCAD application.
The title is 'QCAD - An Introduction to Computer-Aided Design' and was published in Nov 17, 2008.
Essentially the basics of designing in CAD.

The QCAD pro feature Boolean Operations on Polyline entities was introduced in QCAD Pro v3.31.0 (2024/09/18).
Also see QCAD Changelog.

Most QCAD tools can be found in the local QCAD reference, see menu Help .. Browse User Manual.
Or online ... QCAD User Reference Manual >> Boolean Operations

Tool options are typically listed on the Options Toolbar.
QCAD displays tool hints besides the mouse icon on the Status Bar, that of the left button is commonly repeated in the Command Line.
The Command Line interprets tool commands and can be used in some cases for setting some options.
In essence it is rather geared to handle coordinate entries and not in handling a chain of textual instructions.
In a recent version all/most tool options can be addressed by dynamically assigned keyboard shortcuts, all starting with a comma.
alextrebus wrote:
Sun Jun 08, 2025 7:30 pm
I have tried [Union / Subtract / Intersection alle without succes.
The result is a new Polyline entity, typically stacked at the same place.
There can be some latency, perhaps disable previewing.

It may look obvious and straightforward but there is no concept of an enclosed area.
A representation of a sheet of metal may look as a rectangle but it is nothing more than 4 line-segments or limited vectors.
The math on just the outlines, closed contours, may be challenging at least. :wink:
No wonder that it took 13 years to implement in QCAD 3 or 7 years since FS#1702.
alextrebus wrote:
Sun Jun 08, 2025 7:30 pm
What i want to achieve is 2 shapes , both polylines 1 shape has a solid,second is an closed shape, now i want to subtract the shape 2 from shape 1
is there a way to get this done?
To start with ... Polylines are line-art, an additional 'Solid' is most probably a Hatch entity.
This last is unrelated to any outline boundary after creation.
When filled solid it is handled as exploded to its boundary(ies).

:arrow: Chances are that a Polyline was used as boundary to define a Hatch entity.
For example: Draw .. Shape as Polyline and filled.
Selecting both may result in two identical outlines to process.
What may complicate things ... :wink: ... Outline X minus X is nothing.

I am aware of a few types of Solid entities in QCAD with 3 or 4 corners.
The first can be generated by exploding a Dimensions with arrows and modifying the corners.
The arrow is a 3-point solid without edges as line-art and is also handled as its exploded outer contour.

Selected Polylines must have a closed nature but are seemingly auto-closed if that is not the case.
As stated in point 4 of the reference, for a subtraction or Difference (,F) you must indicate what to subtract.
In point 8 is said that the original selection remains and can be deleted afterwards.

- Select both Polylines and the fill of one of those.
- Boolean Operations (OW) >> Difference (,F).
- Indicate the polyline to subtract.
- Apply (,L)
- Delete (ER or Delete) selected.
- Select resulting Polyline.
- Draw Hatch from Selection... (HA) >> Solid Fill >> OK

Boolean Operation limited to filled areas or patterned Hatches are best done on the exploded boundaries.
Set the Type to Solid Fill before exploding, re-Hatch afterwards.

Regards,
CVH