View Issue Details

IDProjectCategoryView StatusLast Update
0000292QElectroTechDiagram Editorpublic2023-11-05 16:11
ReporterTManiac Assigned To 
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status resolvedResolutionfixed 
Summary0000292: Change weighting of second conductor color
DescriptionToday the first and second colors are 50/50 used. But so you can't differentiate between color_a/color_b vs color_b/color_a.

For example a red/black will be shown in the same way like black/red.

It schould be changed, maybe to 66/33 or 75/25.
Additional Informationsources/qetgraphicsitem/conductor.cpp [line 540...]:

if(m_properties.m_bicolor)
{
  final_conductor_pen.setColor(m_properties.m_color_2);
  final_conductor_pen.setStyle(Qt::CustomDashLine);
  QVector<qreal> dash_pattern;
/** this line seams the way to change it: */
  dash_pattern << m_properties.m_dash_size-2 << m_properties.m_dash_size;
/**   dash_pattern << m_properties.m_dash_size * 2 << m_properties.m_dash_size; */
  final_conductor_pen.setDashPattern(dash_pattern);
  painter->save();
  painter->setPen(final_conductor_pen);
  painter->drawPath(path());
  painter->restore();
}
TagsNo tags attached.
Attached Files
m_bicolor.png (163,449 bytes)   
m_bicolor.png (163,449 bytes)   

Activities

scorpio810

2023-10-24 09:05

administrator   ~0000668

Thank you for feedback.
The problem is that the rendering on the QET program will be different from what you see on the screen and after printing or during PDF export.

Example:
original version
https://download.qelectrotech.org/qet/forum_img_2/weneedpolonez-Polonez_MR89_wiring_diagram.pdf

Patched version:
https://download.qelectrotech.org/qet/forum_img_2/patched_weneedpolonez-Polonez_MR89_wiring_diagram.pdf

You can try yourself this example is provided in QET packages.

TManiac

2023-10-24 17:34

reporter   ~0000669

scorpio, sorry I don't understand where is the "patched" version from?
In the QET examples is the non-patched version.

Here at my station, the diagram view is the same like the PDF export and is the same like the printing. There is no change between first and second color.

scorpio810

2023-10-24 17:38

administrator   ~0000670

The patched version is with your changes, compile and try the same example on PDF export
-dash_pattern << m_properties.m_dash_size-2 << m_properties.m_dash_size;
+dash_pattern << m_properties.m_dash_size * 2 << m_properties.m_dash_size;

TManiac

2023-10-24 17:44

reporter   ~0000671

Your pdf export is good.
The non-patched export has equal pattern. And the patched export is how it should be: the pattern of bi-color conductors shows a different between first and second color.

Where is the problem?

scorpio810

2023-10-24 17:47

administrator   ~0000672

Ok, also please make a pull request on our github.

TManiac

2023-10-24 17:49

reporter   ~0000673

Ok, I can't test it in full way.
I haven't QT editor or some thing.

So it will be a untest pull.

I do microcontroller programming :-)

Picture should be to the last comment.
Bild_2023-10-24_174923886.png (84,332 bytes)   
Bild_2023-10-24_174923886.png (84,332 bytes)   

scorpio810

2023-10-24 17:54

administrator   ~0000674

For me, we need to add a option or checkbox to change the bi-color pattern.
It would be up to the user to activate it on each wire.
This way the old diagrams will not be modified.

scorpio810

2023-10-24 18:00

administrator   ~0000675

On this example author use 1Px for the primary color and 10PX for second color..

TManiac

2023-10-24 19:06

reporter   ~0000676

You have the checkbox for second color allready in the conductor dialog (green mark).

There is a selection for the conductor width, too. This is placed on the first color section (orange mark).

Then there is a setup for the pattern size (red mark).
But this pattern size is today in all cases with a 50/50 weighting. And so this is more or less useless.
If somebode want to use bicolor wire he will decide between first and second color.

In your example the author uses conductors with 1px width. The 10px on the second color is nice but it doesn't show the difference between first and second. So your patched export is more what it should.
Bild_2023-10-24_190457342.png (20,575 bytes)   
Bild_2023-10-24_190457342.png (20,575 bytes)   

TManiac

2023-10-24 19:10

reporter   ~0000677

This is from my example:
Bild_2023-10-24_191009191.png (8,933 bytes)   
Bild_2023-10-24_191009191.png (8,933 bytes)   

TManiac

2023-10-24 19:17

reporter   ~0000678

Ok, this is why it is better to test. In your patch are first and second color switched.
So the doubling should be to the second dash-size.

dash_pattern << m_properties.m_dash_size << m_properties.m_dash_size * 2;
Bild_2023-10-24_191706495.png (50,216 bytes)   
Bild_2023-10-24_191706495.png (50,216 bytes)   

scorpio810

2023-10-24 21:04

administrator   ~0000679

ok it makes sense now. ;-)

scorpio810

2023-11-05 16:10

administrator   ~0000680

Merged,
thanks for report.

Issue History

Date Modified Username Field Change
2023-10-23 19:19 TManiac New Issue
2023-10-23 19:19 TManiac File Added: m_bicolor.png
2023-10-24 09:05 scorpio810 Note Added: 0000668
2023-10-24 17:34 TManiac Note Added: 0000669
2023-10-24 17:38 scorpio810 Note Added: 0000670
2023-10-24 17:44 TManiac Note Added: 0000671
2023-10-24 17:47 scorpio810 Note Added: 0000672
2023-10-24 17:49 TManiac Note Added: 0000673
2023-10-24 17:49 TManiac File Added: Bild_2023-10-24_174923886.png
2023-10-24 17:54 scorpio810 Note Added: 0000674
2023-10-24 18:00 scorpio810 Note Added: 0000675
2023-10-24 19:06 TManiac Note Added: 0000676
2023-10-24 19:06 TManiac File Added: Bild_2023-10-24_190457342.png
2023-10-24 19:10 TManiac Note Added: 0000677
2023-10-24 19:10 TManiac File Added: Bild_2023-10-24_191009191.png
2023-10-24 19:17 TManiac Note Added: 0000678
2023-10-24 19:17 TManiac File Added: Bild_2023-10-24_191706495.png
2023-10-24 21:04 scorpio810 Note Added: 0000679
2023-11-05 16:10 scorpio810 Note Added: 0000680
2023-11-05 16:11 scorpio810 Status new => resolved
2023-11-05 16:11 scorpio810 Resolution open => fixed