Topic: snap to grid

hi all,

Even though I can speak and understand french (written and spoken) I am really bad on writing it, for this reason I write in English.

I recently discovered qelectrotech and I think it is a great software to create a lot of different diagrams.

Now I am working on creating instrument loop diagrams. I am checking the setup and building a small library (I will upload them once they are finished) but I am stuck with the way grid works.

I need divide the page in vertical/horizontal divisions (usually 4 x 3) and I am doing it with the "line" tool, but as long as the grid never match with the columns/rows header border, I am forced to disable the grid snap with the Ctrl key to shorten/lengthen the lines but doing it this way is easy to draw a non fully vertical/horizontal line (shift key combination does not force ortho mode).

Is any way to create perfect vertical/horizontal lines that start/finish just in the draw area borders?

thanks

https://s16.postimg.org/wt20tertx/2016_09_09_23_09_53_QElectro_Tech.jpg

Re: snap to grid

Hello,

Have you tried to draw an element table like this :
https://qelectrotech.org/showcategory.p … rms%26tabs

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

3 (edited by jrfml 2016-09-10 17:54:37)

Re: snap to grid

Thanks for the quick answer.

Ok, I will work in this direction but I think is not the best way to do it.... is using an element as a background, and also I have to disable grid snap and adjust it visually.

an example of what I am trying to do (in this example there are no columns or rows headers but I am using them as you can see in the previous message screenshot):
http://2.bp.blogspot.com/-DYcVgukKHQY/VXUDHyZOYeI/AAAAAAAAAG8/cjIbvLx5HKI/s1600/ild.gif
thanks

Re: snap to grid

hi all,

merci bcp scorpio810

finished!
the element creator is really powerful.

it has a very flexible grid system of 1px x 1px so it let me draw the edges just in the middle of main grid. This way I have been able to get rid of the snap to grid issue.

on the other hand I still think that a more powerful grid in the main program will be very useful.

here you can find my first revision of the title block and drawing area

thanks again!


https://s10.postimg.org/hnb1osuyh/2016_09_11_00_53_07_QElectro_Tech.jpg

Re: snap to grid

nomicons/smile

the element creator is really powerful.

It's more powerful in 0.51-dev than in the 0.5 version.

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: snap to grid

scorpio810 wrote:

nomicons/smile

the element creator is really powerful.

It's more powerful in 0.51-dev than in the 0.5 version.

yep!, is the one I am using under w7:
QElectroTech V 0.51-dev+svn4696
Compilation : GCC 4.9.4 - built with Qt 5.7.0 - run with Qt 5.7.0

Re: snap to grid

Hi jrfml,

using an element as a background is not a good idea because nothing in QET manages the layer order of the elements.
It means:
If you re-open your project later it is possible that your background element will be in the foreground.
Thus you can not move all elements you placed initialy UPPER the background unless you move the background itself.

I know this problem because I also make mounting plate assembly drawings and the cabinet is the big background element where all other electrical gears are placed in.

To solve your problem:
it is easier to use basic shapes such as lines (like in your first screenshot).
Then, as you are moving the line at the right place with your mouse, hold the ctrl key to place the line exactly where you want (the precision is 1 pixel).
The tipp works with everything you can place in the drawing area: basic shapes, elements, text fields, pictures...

8 (edited by jrfml 2016-09-13 14:53:27)

Re: snap to grid

hi Nuri,

using an element as a background is not a good idea because nothing in QET manages the layer order of the elements.

I know. I already said that even it solved my "problem" it is not the right solution.

Then, as you are moving the line at the right place with your mouse, hold the ctrl key to place the line exactly where you want (the precision is 1 pixel).
The tipp works with everything you can place in the drawing area: basic shapes, elements, text fields, pictures...

I tried this solution (as I said in my first post) but as my lines go from border to border of the drawing area, I must adjust the length.
When you adjust the length while disabling the grid snap, there is no way, at least I do not know how, to force the "ortho mode" thus I can not make sure I am drawing perfectly horizontal or vertical lines.

Is any way to create perfect vertical/horizontal lines that start/finish just in the draw area borders?


thanks,

Re: snap to grid

Is any way to create perfect vertical/horizontal lines that start/finish just in the draw area borders?

Yes, you need to edit manually lines coordinate with a text editor in your project.qet, isn't a easy and perfect solution .. nomicons/grin

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

10 (edited by jrfml 2016-09-13 15:50:04)

Re: snap to grid

scorpio810 wrote:

Is any way to create perfect vertical/horizontal lines that start/finish just in the draw area borders?

Yes, you need to edit manually lines coordinate with a text editor in your project.qet, isn't a easy and perfect solution .. nomicons/grin

thanks scorpio810!
it is not the quickest way to do it but at least for me is the best solution.
    
            <shape x2="430" type="Line" x1="430" is_movable="1" y1="25" closed="0" y2="1125">
                <pen color="#000000" style="DashLine" widthF="1"/>
                <brush color="#000000" style="NoBrush"/>
            </shape>

Re: snap to grid

nomicons/smile

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."