QCAD - 2D CAD System.

Click here for a documentation of the DokuWiki formatting syntax that can be used in reports

Please search for existing tasks (also closed ones) before opening a new task.

Please make sure that you are using the latest Version of QCAD before posting a bug (menu Help > Check for Updates)


FS#563 - Hatches and colors transformed in Q3

Attached to Project: QCAD
Opened by Michel-Henri GONZE (MiHeGo) - Tuesday, 24 April 2012, 00:17 GMT+1
Last edited by Andrew (andrew) - Monday, 30 April 2012, 09:43 GMT+1
Task Type Bug Report
Category QCAD (main)
Status Closed
Assigned To Andrew (andrew)
Operating System Windows 7
Severity Medium
Priority Normal
Reported Version 3 RC5
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


To check compatibility for the same .dxf drawing prepared with Q2, I prepared 2 copies, one with a “_Q2” suffix and the other with “_Q3”. I managed to keep an operational Q2 system on the same Win7-HomeEditionPremium-64bits PC. As you can guess, I opened each copy with the relevant QCAD version.

In each version, I selected the same hatch layer and list here their properties along with a hardcopy of a display of a similar part of the hatched area, with blue lines showing the differences in hatching, apparently the density.
Q2 : Solid:False, Scale:3.00, Angle:0, Name:ar-brelm ; the color is described in its panel as 20,255,255 and 255,85,0 (left colum first from top to bottom).
Q3 : all identical values but Scale:0.78189.

Another comparison with a global view of the same drawing. Just notice how the hatching in the areas at the bottom are different (red lines). Also, I noticed that increasing the zoom let the hatching appear in the Q3 version instaed of the grey homogenous color, but the hatching in Q3 remains more dense than in the Q2 version.
Q2 : Solid:False, Scale:1.00, Angle:0, Name:ar-conc : color is a standard grey (0,0,128 & 128,128,128)
Q3 : Solid:False, Scale:0.246063, Angle:0, Name:AR-CONC : color is qualified as “custom” even with the same values.
Both have “centimeter” as drawing units.

Then I opened another Q2 drawing with Q3. I elected to hide all layers then to show all of them. And the color hatching of some aras were then modified. See 3rd picture with all black areas. (Just changing the layers shown or hidden was enough to not allow to close the drawing without a save...).

Than you for your attention or letting me know which setting can correct the differences.

This task depends upon

Closed by  Andrew (andrew)
Monday, 30 April 2012, 09:43 GMT+1
Reason for closing:  Not a bug
Additional comments about closing:  Caused by use of old file versions
(<= DXF/DWG 2000)
Comment by Andrew (andrew) - Wednesday, 25 April 2012, 10:21 GMT+1

There are indeed incompatibilities between QCAD 2 and 3 hatch patterns. This was necessary to support ACAD compatible hatch pattern files and make QCAD files with hatches much more compatible with other CADs (see directory ./patterns of your QCAD installation). Another advantage of the new patterns is that you can download additional .pat files from various resources and put them in ./patterns/imerial or ./patterns/metric to use them in QCAD.

Since patterns are defined differently in QCAD 2 and QCAD 3, it is not possible to convert them with identical rendering results.

QCAD 3 does some scale factor conversion to even out those incompatibilities when files are imported from QCAD 2. I will check if these can be improved if you can submit the file for testing (e-mail is of course also fine if the drawing file is not to be shared).

Comment by Michel-Henri GONZE (MiHeGo) - Wednesday, 25 April 2012, 17:22 GMT+1


This is a serious one on the same subject, I believe. I made a copy of a Q2 drawing, renamed it with a Q3 suffix and opened it with Q3. From previous Q3 sessions, the setting "Auto correct black and white colors" in the "Entities" section of the "Graphics View" is already set in the "Application Preferences" and therefore my quotations and legends are now correctly displayed in black on the white background (I posted yesterday another report about this).

Without any modification, some hatches are definitely not displayed with the correct color pale green but in black. On the attached screen hard copy, you can see :
1. The selected hatch area which is supposed to be pale green.
2. The layer list "065_F_MursChanvreGrange selected" of the hatch.
3. The "Property Editor" window shows the "Color" value to be "By layer" but why in white and not in the corresponding color ?
4. I edit the layer and the color is initially shown in the "Layer Data" window as "Custom" with a green pale box, which is correct.
5. To check the color I select "Others" which opens the "Select Color" window showing the 6 values : 85 103 255 and 211 255 152, exactly the same displayed with Q2 and the Q2 drawing.

When I close the "Select Color" and the "Layer Data"windows and deselect the hatch area :
6. The "Layer Data"window shows "Color" to be pale green "Custom" : OK.
7. The "Property Editor" window shows the "Color" value to be "By layer" but still in white... OK ? not sure
8. The hatch area is still in black.

At least 3 questions :
a. Why the Q2 color is not correctly displayed ?
b. How can we change the color of all objects for a given layer if the steps followed above are useless ?
c. Is there a setting that can help to correctly understand custom colors ?

Thank you for your attention.


PS : BTW, in the "Property Editor" window, what is the use of "Handle" ? Just to debug this RC5 ?

Comment by Andrew (andrew) - Wednesday, 25 April 2012, 17:36 GMT+1

Thanks for the detailed information.

The light green color is detected by QCAD as being close to your background color (white). Since you have the color correction on, QCAD displays the color as black to make sure you can see something at all.

Here's the 'catch 22':

Without correcting colors, the user loads a drawing with white entities on a white background and immediately submits a bug report since he cannot see a thing.
With color correction enabled, there has to be a threshold since computers can distinguish more colors than the human eye (almost white looks exactly like white).

That color threshold is configurable in the current development version / QCAD 3 final.

Comment by Michel-Henri GONZE (MiHeGo) - Wednesday, 25 April 2012, 18:43 GMT+1

Some unexpected good news, at least IMHO ;-) because I found a workaround...

I launch Q3 and uncheck the setting "Auto correct black and white colors" in the "Entities" section of the "Graphics View" ; the background color is set to white (according to my preferences). I close Q3.

I double-click a Q3 copy of a genuine Q2 file to open it with Q3 and to my big surprise, all my "Black/White" layers are displayed in Black, my light/pale green and similar custom colors are correctly distinct.

Just to mention, I "found" this simple solution after trying this workaround : for each layer that should be in black, I change the standard Black/White color to black with a 1 for the "Val." value, which sets Red, Green and Blue to 1 too. And the setting "Auto correct black and white colors" must be unchecked. Actually and currently, this setting also takes care of colors very near to white or black, but for me with a too large idea of this "near" aspect.

Comment by Michel-Henri GONZE (MiHeGo) - Friday, 27 April 2012, 11:44 GMT+1

This solution just doesn't work. I've mada another critical bug report because all black layers are back to white after reopening the file, custom color are "auto corrected" and only the standard non black/white clors are preserved, like blue, magenta etc.
A different report because I can't continue to work with QCaD3 with enough reliability.

Comment by Andrew (andrew) - Friday, 27 April 2012, 11:52 GMT+1

I have your file here but cannot reproduce the problem here at the moment. Will try some more later.