scorpio810 wrote:

(...)

Another Thread, Laurent? nomicons/wink

Hallo Olaf,

schau doch mal in diesem Thread
https://qelectrotech.org/forum/viewtopi … 286#p17286
oder direkt auf meinem github-account:
https://github.com/plc-user/QET_ElementScaler

Dort gibt es eine Linux- und eine win-Version als Binary, oder Du kannst es für "Dein" System aus den Quellen selbst kompilieren.

Bei Fragen oder Anregungen:
Fragen oder anregen!  nomicons/wink

galexis wrote:

It's not possible to integreted it directly on QET like it's C++?

There are several new topics for me at once:
For the beginnings in Pascal I only needed to add a little XML to the Pascal knowledge. The change to C++ was then already bigger. But then to integrate that into an existing, grown QT project, that's quite another matter...
For the moment I have put together a small (and from my point of view) usable package. There is no question that in the foreseeable future it will make sense to integrate scaling and mirroring directly into QET's Element-Editor!

Salut Laurent,

there is no need to compile QET_ElementScaler for windows, because that is available in the releases.
I compile my programs for Windows on ReactOS and mention it that way to support another open source project at least by advertising it a bit!
https://reactos.org

Salut Laurent!

Thank you for the Link to the other thread!

Hello everybody!

Please have a look at the new version:  https://github.com/plc-user/QET_ElementScaler

I now implemented the calculation of values for definition-line and tried with some Elements:
To me, this looks pretty good!  nomicons/smile

In the attached file you find some samples.

Salut Laurent,

is it a "bug" if I already write exactly that in todays introductory post? nomicons/wink

plc-user wrote:

(...) For the values of the definition line (hotspots, ...) the way of calculation is not yet clear to me. But you have to open the new file with the element editor anyway to check or correct the positions of the texts. Then the definition line will be corrected. (...)

Maybe you (someone) can give me a hint where I can find the place in the QET source code where the values for the hotspots, width and height for the definition-line are determined? Or is it somewhere described, how to determine the correct values? Then I could perhaps implement this in the short term...

scorpio810 wrote:

Hello plc-user,

what is the command line to use it?
(...)

Just call it without any options or use "--help":

me@notebook:~/Projekte/c_c++/QET_ElementScaler$ ./QET_ElementScaler --help

"QET_ElementScaler" version 0.4beta5 needs some arguments!

usage for simple mode:
"QET_ElementScaler"  [options]  FILENAME  ScalingFactor

In extended mode the scaling-factors for X and Y may differ and it is
allowed to specify only one direction for scaling. In each case the
Font-Sizes and Circle-Diameters are scaled by the smaller value.

usage for extended mode:
"QET_ElementScaler" [options] [-x FactorX] [-y FactorY] -f FILENAME


available options:
 -i | --stdin     input-data is read from stdin, a given filename is 
                  ignored and scaled element will be written to stdout
 -o | --stdout    output will be written to stdout
 -x VALUE         or
 --factorx VALUE  factor for x-values (x, rx, width, ...)
 -y VALUE         or
 --factory VALUE  factor for y-values (y, ry, height, ...)
 -f FILENAME      or 
 --file FILENAME  the file that will be used
 -h | --help      show this help


there are also some "long-opt"-only options:
"--RemoveAllTerminals" removes all terminals from the element
                       (useful for front-views or "thumbnails")
"--FlipHorizontal"     flips all graphical elements horizontally
                       (useful during creation of elements)
"--FlipVertical"       flips all graphical elements vertically
                       (useful during creation of elements)
"--OverwriteOriginal"  the original file is replaced by scaled one
                       (CAUTION: Be careful with this option!)

without parameters or with "-h" or "--help" this help is displayed


The most simple call:
"QET_ElementScaler" -f FILENAME
A new file is created with all values rounded to two decimal places
and all font sizes are set to integers - some kind of cleanup... 

As always with free software: Use it at your own risk! 

laurents-iMac-Pro:elements laurent$ ./QET_ElementScaler --FlipVertical pylone.elmt 
could not convert "pylone.elmt" to a float-number!
laurents-iMac-Pro:elements laurent$ ./QET_ElementScaler pylone.elmt --FlipVertical 
could not convert "pylone.elmt" to a float-number!

when using Options other than scaling-factor and filename, you have to add the filename with "-f filename"
For example:

./QET_ElementScaler --FlipVertical -f pylone.elmt 

Salut Laurent!

Thank you for the feedback!
GCC on Debian unstable and TDM-GCC on ReactOS did not show this warning.
Otherwise I would have corrected that line:
Don't like warnings when compiling code, too!

You may change Line 92 in main.h to
    {0,0,0,0}

Then the warning should be gone.
EDIT (29.12.22 11:58 CET):
already changed at github - no new binaries needed for this code-change

at github I uploaded binaries for Linux and ReactOS. The ReactOS-binary works also on win.
If you compile it on other systems like macOS, etc. it will run there, too!

here a screenshot of an element:

Today I uploaded a new version of "QET_ElementScaler" to github: https://github.com/plc-user/QET_ElementScaler

It's not perfect yet, but it's getting better and better!

All graphic elements are now taken into account when mirroring!
The mirroring is done at the coordinate axes.

The texts are not (yet) in the right position, because the text-length, -width and -orientation must also be taken into account for the new position. For the values of the definition line (hotspots, ...) the way of calculation is not yet clear to me. But you have to open the new file with the element editor anyway to check or correct the positions of the texts. Then the definition line will be corrected. Take a look at the sample-file I created in the attachment.

In any case, this is already very useful as a starting point for the further processing of the component!  nomicons/smile

188

(10 replies, posted in Elements)

I do not understand your question because it is not in English and secondly, from where do you want to download it?
Download QET, install it and all the elements available from this manufacturer are in the QET Collection.
If you want to participate and create elements, we will be happy to include them in the QET collection.
Just create them in the element editor, or use the DXF to QET converter beforehand.

jhonathan disner wrote:

no, I did the installation from the ''.exe'' file

It does not matter, how you installed QET. The question was how you start QET to use it.
Do you double-click on the executable file or do you start QET from the batch-file "Lancer QET.bat"?

When starting from the batch-file it reads some environmental settings and then it will start QET with the appropriate settings for language, etc.

Just tried on a fresh installed win10 and "ReadyToUse - QET":
Created Sub-Directories under "c:\tools\qet\conf\elements\"
placed some elmt-files in the sub-sub-directory and created a file "qet_directory" for each sub-dir.
Here it works as expected. See screenshot.
Maybe the language is not set correctly on your system?
Did you start QET from the batch-file "Lancer QET.bat"?

The folder-names are the loclised texts taken from the file "qet..." lying in that directory and not from the file-directory-name itself.
Please compare with the other directories in the QET-collection.

Just created a pull-request with your Symbol, Vbxler, and a RCBO from manufacturer "Hager".

When I understand it correctly ...

Have you tried double-click and then "right-click -> connect" ?

194

(25 replies, posted in Elements)

Good, then my world view is correct again!  nomicons/wink

195

(25 replies, posted in Elements)

OK, will use a filename without points next time!

Edit: When compiling something the result is automatically set to be executable.

But do I have any control over the file permissions when I upload something to github? Or is it the user who sets the permissions him/herself after downloading the binary? As far as I know it's the second, isn't it?

196

(25 replies, posted in Elements)

Thank you for trying, Laurent!

I didn't think of comparing "my" file with the one you uploaded here on Sunday and have done so now. You can see the compare-result from DoubleCommander in the attached screenshot: Our binaries are amazingly identical! Amazing, because we definitely compiled on different machines and at different times. Compared a second time with "cmp" on my Debian-Box and it also says that the files are identical.

The message in your case I could imagine that the file looks like it has a file extension because of the added part after the underscore and therefore mac doesn't recognize it as an executable file? Maybe the file will be recognized when you rename it?
Does mac have an "executable-bit" for files? (chmod 744 ....)?

197

(25 replies, posted in Elements)

Just uploaded new binaries for Linux, ReactOS (win32) and macOS to github-repository:
https://github.com/plc-user/QET_Element … g/0.4beta2

maybe someone with a mac can test the new binary for mac and tell me, if it works?
as said before: I don't have any access to mac's ...
Thanks in advance!

198

(25 replies, posted in Elements)

scorpio810 wrote:

Compile work on mac's, but mirror flip on this element isn't perfect yet. nomicons/wink

The lines and polygons are flipped one-by-one!
That's why I say

useful during creation of elements

in the help of QET_ElementScaler and the README on github.

If we can limit ourselves (at least for now) to applying flipping and mirroring to individual polygons, I can definitely imagine this variant in QET as well!
In the context menu (right-click) there is also the possibility to add or remove points only for polygons.
Maybe this is a way to quickly integrate "flipping"? It seems to be needed every now and then, otherwise this thread would not exist... nomicons/wink

199

(25 replies, posted in Elements)

just uploaded new source-code:
- positions for terminals are always rounded without decimals
- when removing all terminals, the "link_type" is set to "thumbnail"

sorry, I don't have any access to mac's ...
upload of new binaries for Linux and ReactOS will follow soon.

200

(25 replies, posted in Elements)

the "-" at the "std=c++17" - option was missing...

just fixed!  nomicons/smile