[Solved?] Blocks, Library, Edit Block, Edit Block In Place

Use this forum to ask questions about how to do things in QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

User avatar
Chips&Chips
Full Member
Posts: 68
Joined: Mon Nov 13, 2023 12:15 pm

Re: Blocks, Library, Edit Block, Edit Block In Place

Post by Chips&Chips » Sat Feb 17, 2024 4:04 am

OK. I am attaching two of my library files, one before and one after correcting them with the procedure you provided above (which works except for the grid inconvenience - thanks again for that).

VPlus.dxf = before correction
Batt3+Hor-500.dxf = after correction

I hope this helps. I can provide more if needed.


andrew wrote:
Fri Feb 16, 2024 3:08 pm
Please attach your library item file "_EPAParts\SchematicSymbols\Batt3-Volt-500.dxf" (or similar).

This is the only file that contains the grid settings for that item and the file that would help us determine what is happening.
Attachments
Batt3+Hor-500.dxf
(98.2 KiB) Downloaded 57 times
VPlus.dxf
(95.44 KiB) Downloaded 56 times
Paul A.
SE Texas
Windows 10
QCAD V 3.29.3.0

CVH
Premier Member
Posts: 3480
Joined: Wed Sep 27, 2017 4:17 pm

Re: Blocks, Library, Edit Block, Edit Block In Place

Post by CVH » Sat Feb 17, 2024 4:18 am

Batt3+Hor-500.dxf >> Grid = 0.05 ; Meta = 1
VPlus.dxf >> Grid = 1 ; Meta = 10

The actual used Grid/Meta Grid is stored in the drawing, in the drawing file.
Activate the drawing in the GUI and have a look at the Drawing Preferences.

The Grid/Meta Grid settings in Application Preferences are used to create en NEW file.
(Clearly stated as Defaults for New Drawings)
Once a new file is created the Grid settings are that of the new file.

Remark that Auto scaling a Grid is Application wide.

In the end it won't matter what Grid step sizes are used.
A Grid is merely an overlay, most of us don't even use it.
It is a visual reference of how larger/small the things on the screen are.
But nobody holds you back from using a well established Grid for snapping, the Math is as correct as can be.

Regards,
CVH
Last edited by CVH on Sat Feb 17, 2024 6:09 am, edited 1 time in total.

User avatar
Chips&Chips
Full Member
Posts: 68
Joined: Mon Nov 13, 2023 12:15 pm

Re: Blocks, Library, Edit Block, Edit Block In Place

Post by Chips&Chips » Sat Feb 17, 2024 6:07 am

In response to CVH's post:

I believe I totally understand what the Application and Drawing Preferences are for. I set all values in both of them just to be completely sure that the grid that I am experiencing in the editing window (space?) is not coming from them.

I am not sure where the extra zero in my settings came from. I also thought it did not matter. Makes me wonder if those preferences are actually stored as strings and not numbers. But that's irrelevant - I think.

You said, ".. I already remarked that Grid settings based on values other than 1e10^n have an Issue."

That's interesting. Basically you are saying that grids that can not be represented in scientific notation where the mantissa can only be 1 and the exponent must be an integrer value, are problematic. In a program that dates back at least 20 years, I find that fantastic. Some one should have figured out the grid problems before now. I can only think that the problem is very deep in the original code of the very first version of QCAD. And perhaps it was even inherited from an earlier program. This really should be high on the priority list of the QCAD programmers.

You can see my present entries for the grid in my screen shots above. In working on electronic schematics and layout drawings (PCB layout included) much is historically based on a 1/10" grid. But modern miniaturization has forced further divisions like 1/20", 1/40", 1/50", 2mm, 1mm, 0.5mm, 0.4mm, 0.2mm, 0.1mm, etc. And this miniaturization shows no sign of stopping. Electronic work requires great flexibility in the grid. In all the 2D CAD programs that I have used, QCAD seems to have the most problems with the grid. Most, NO ALL of those other programs used a grid setting that determined the spacing of the screen lines and a division or parts setting that allow additional snap points BETWEEN those lines. So you could set up a 1" grid and only change the divisional number to get 2, 4, 8, 10, 12, even odd numbers like 3 or 7 snap points BETWEEN those 1" grid lines. And those grid spacings NEVER changed with the zoom factor. If you zoomed in or out by too much you had to change the grid setting(s) to allow grid snapping to continue. Since a given drawing would usually be made with only a small range of zoom settings, this was not a big problem. And since YOU made the grid changes, YOU were always aware that it had changed. This is one less factor a designer needs to keep track of while working.

I think I know what Viewports are intended for: front view, side view, top view, isometric view, different zooms or angles? or areas of the drawing or whatever. Perhaps other uses that I am not aware of. I have used multiple Viewports in other programs. I am not using them on the current project which is mostly only two dimensional where different zoom values are not really needed.

You say, "Designing in CAD is basically unit-less." Well, that may be how the program operates and that is fine, possibly even necessary. But when I design something real, I like to work in real world units. So if I am designing a circuit board (as I presently am) I am going to be working in sub-inches or mm and if I am drawing a layout of my house (which I have) I will be working in inches and feet. For a map of my city even feet may be too fine. The point being that from the viewpoint of the user of a CAD program, units are a constant concern.

You say, "No, probably not, see Drawing Preferences of the Batt3-Vert-500.dxf file ...
... We clearly see Grid < Meta Grid values of 0.1 and 10."
OK, then WHERE did those settings come from? To me they look strangely like the original settings that I saw in QCAD when I first opened it. Could they be default settings that the user can not change? And I was not getting snap points at 0.1" intervals. It was at least 1" and perhaps 10".

I already uploaded examples from my parts library, one before and the other after using Andrew's procedure for editing, as he asked above. You ask if my "Grid/Meta Grid is fixed or auto scaled". I am not completely sure which setting this is. Here are some that seem related:

Application Preferences - General - User Interface - Auto Screen Scale Factor is checked.
Application Preferences - Graphic View - Appearance - Auto Zoom - Margin (px) - 25.
Application Preferences - Graphic View - Appearance - Auto Zoom - Auto Zoom On Load is checked.

That's all I could find. If your setting is not one of those, please tell me where to look.

And a sincere THANKS for your response.
Paul A.
SE Texas
Windows 10
QCAD V 3.29.3.0

CVH
Premier Member
Posts: 3480
Joined: Wed Sep 27, 2017 4:17 pm

Re: Blocks, Library, Edit Block, Edit Block In Place

Post by CVH » Sat Feb 17, 2024 6:20 am

Chips&Chips wrote:
Sat Feb 17, 2024 6:07 am
OK, then WHERE did those settings come from?
From the data stored in the file ... From nowhere else.
  • Close all drawings in QCAD.
    Exit QCAD.
    Click on the given example file Batt3+Hor-500.dxf here in this forum topic.
    Your Browser will download it and probably start QCAD to open it or you need to double click it to open with QCAD.
    With the file opened in QCAD verify the drawing preferences (aka drawing settings).
    Grid spacing is set to 0.05
    Meta Grid spacing is set to 1
No magic there.

Regards,
CVH

User avatar
Chips&Chips
Full Member
Posts: 68
Joined: Mon Nov 13, 2023 12:15 pm

Re: Blocks, Library, Edit Block, Edit Block In Place

Post by Chips&Chips » Sat Feb 17, 2024 6:49 am

You said, "Remark that Auto scaling a Grid is Application wide."
I did not find it there. Where exactly is that?

And you said, "A Grid is merely an overlay, most of us don't even use it.
It is a visual reference of how larger/small the things on the screen are."
If you are talking about the Meta Grid in QCAD, I would agree.
But I do use what is called the GRID in QCAD all the time. When everything needs to be on a particular spacing, it would be a real pain to use something other than the Snap To Grid feature. But I have only used CAD for around 30+ years so perhaps you do have a better method.

Oh, and I do make use of other methods when doing drawings where the features do not fall on a regular grid. One of my favorites is the OFFSET command which is common among CAD programs. It can really speed up many drawings and I use it a lot. But not on my present project. SBD!

I did as you suggest: closing QCAD and opening some of my library files as drawings:

Batt+Hor-500 does show the values you say: Grid = 0.05 ; Meta = 1.

But others, that I have not re-edited yet, show: Grid = 1 ; Meta = 10 (file attached - there are many with these settings).

I never deliberately used either of these settings. I am working on my first QCAD drawing and the settings that I used started with Grid = 1 ; Meta = 10 because I was confused how to get the actual grid that I wanted. After some trial and error I found Grid = 0.1 ; Meta = 1 worked. And later changed that to my present numbers Grid = 0.05 ; Meta = 0.5.

So you are saying that my library parts picked up their Grid and Meta Grid settings from the values of my drawing(s) in which they were created or possibly later edited in.

It is water under the bridge now, but I do not recall making any of the library drawings with the Grid = 1 ; Meta = 10 or Grid = 0.05 ; Meta = 1 settings. And yet, there they are. I can't dispute it.

Something must have changed somewhere that I was not aware of. That's all that I can think.

Whatever happened, I am still looking for an easier/faster way to get them back on Grid = 0.05 ; Meta = 0.5 settings while editing to give them proper Attributes with Andrew's method (or a better method).


CVH wrote:
Sat Feb 17, 2024 4:18 am
Batt3+Hor-500.dxf >> Grid = 0.05 ; Meta = 1
VPlus.dxf >> Grid = 1 ; Meta = 10

The actual used Grid/Meta Grid is stored in the drawing, in the drawing file.
Activate the drawing in the GUI and have a look at the Drawing Preferences.

The Grid/Meta Grid settings in Application Preferences are used to create en NEW file.
(Clearly stated as Defaults for New Drawings)
Once a new file is created the Grid settings are that of the new file.

Remark that Auto scaling a Grid is Application wide.

In the end it won't matter what Grid step sizes are used.
A Grid is merely an overlay, most of us don't even use it.
It is a visual reference of how larger/small the things on the screen are.

Regards,
CVH
Attachments
Diode+Hor-300.dxf
(96.22 KiB) Downloaded 54 times
Paul A.
SE Texas
Windows 10
QCAD V 3.29.3.0

CVH
Premier Member
Posts: 3480
Joined: Wed Sep 27, 2017 4:17 pm

Re: Blocks, Library, Edit Block, Edit Block In Place

Post by CVH » Sat Feb 17, 2024 6:56 am

Chips&Chips wrote:
Sat Feb 17, 2024 6:07 am
You said, ".. I already remarked that Grid settings based on values other than 1e10^n have an Issue."

That's interesting. Basically you are saying that grids that can not be represented in scientific notation where the mantissa can only be 1 and the exponent must be an integrer value, are problematic. In a program that dates back ......
It is a known and reported bug, and meanwhile well documented.
You probably did not investigate the links.

This is Grid auto scale related ... The sequence of Grid step sizes depending the zoom state.
An auto step size will result in something in the nature of 10^n : ... - 0.001 - 0.01 - 0.1 - 1 - 10 - 100 - 1000 - ... (It expands in both ways)
A step size of 0.01 will result in a minimal step of 0.01: 0.01 - 0.1 - 1 - 10 - 100 - 1000 - ... (It doesn't expands beyond minimal)

When auto scaling the factor will be 10 based ... If a Grid spacing of 0.1 is too fine it steps up to a Grid spacing of 1 ...
If too coarse it will step back to 0.01 and so on but never beyond a minimum, if any.

On the contrary:
With a step size of 0.05 >> minimal step of 0.05 >> Sequence: 0.05 - 0.25 - 2.5 - 25 - 250 - ...
The first step is not 10 based, it is the square of the base value (5² = 25).
A step value of 0.02 would result in 0.02 - 0.4 - 4 - 40 - ... (2² = 4)
But it starts to get more problematic with 1/8 = 0.125: 0.125 - 1.5625 - 15.625 - ...

I documented it in detail following the code, it is an error on using LOG and the inverse.
Why it works for 10 based ... 1² = 1 ... :roll:
What Andrew does with my report is out of my hands, sorry. :wink:

Regards,
CVH
Last edited by CVH on Sat Feb 17, 2024 7:59 am, edited 1 time in total.

CVH
Premier Member
Posts: 3480
Joined: Wed Sep 27, 2017 4:17 pm

Re: Blocks, Library, Edit Block, Edit Block In Place

Post by CVH » Sat Feb 17, 2024 7:14 am

Chips&Chips wrote:
Sat Feb 17, 2024 6:49 am
You said, "Remark that Auto scaling a Grid is Application wide."
I did not find it there. Where exactly is that?
Already provided in the debate about Grid/Meta Grid ...
See: Applications Preferences .. Graphics View .. Grid


Chips&Chips wrote:
Sat Feb 17, 2024 6:49 am
But I do use what is called the GRID in QCAD all the time.
You didn't quoted everything. Surely, you can use the Grid for that ... I included:
CVH wrote:
Sat Feb 17, 2024 4:18 am
But nobody holds you back from using a well established Grid for snapping, the Math is as correct as can be.

Chips&Chips wrote:
Sat Feb 17, 2024 6:49 am
So you are saying that my library parts picked up their Grid and Meta Grid settings from the values of my drawing(s) in which they were created or possibly later edited in.
Off course, the Grid preferences are stored with the file on saving.
If you need your Library items all in the same Grid then change that for each item file and re-save the items as such.
I only don't understand why the library items grid setting would matter ...
... As long as the drawing file where you use them has the 'correct' Grid/Meta Grid then all should be OK.

Regards,
CVH
Last edited by CVH on Sat Feb 17, 2024 7:41 am, edited 1 time in total.

CVH
Premier Member
Posts: 3480
Joined: Wed Sep 27, 2017 4:17 pm

Re: Blocks, Library, Edit Block, Edit Block In Place

Post by CVH » Sat Feb 17, 2024 7:36 am

Chips&Chips wrote:
Sat Feb 17, 2024 6:07 am
In all the 2D CAD programs that I have used, QCAD seems to have the most problems with the grid.
I think it is the other way around ... :lol:
In QCAD the Grid is intended to be more versatile, far more versatile ... But there is a flaw.

The advice in your case is to use a fixed Grid that is not scaled by zoom state.
As far as I know we already gave that advice.

And you can decrease the minimal amount of pixels between Grid points. Your screen will fill up with dots.
Once below that value the Grid is turned off, snapping to the Grid is then not possible.
It would not matter anymore, you can not point steady to something within a 2-3 pixels range.
In the same way that you can not manually solder things based on a 1/20" grid. :lol:

Regards,
CVH

User avatar
Chips&Chips
Full Member
Posts: 68
Joined: Mon Nov 13, 2023 12:15 pm

Re: Blocks, Library, Edit Block, Edit Block In Place

Post by Chips&Chips » Sat Feb 17, 2024 8:12 am

Oh, I am 80 and have been soldering for around 70 years. You don't know my soldering skills.

I do 0.05" parts all the time. Piece of cake!
Paul A.
SE Texas
Windows 10
QCAD V 3.29.3.0

CVH
Premier Member
Posts: 3480
Joined: Wed Sep 27, 2017 4:17 pm

Re: Blocks, Library, Edit Block, Edit Block In Place

Post by CVH » Sat Feb 17, 2024 8:24 am

Chips&Chips wrote:
Sat Feb 17, 2024 8:12 am
I do 0.05" parts all the time. Piece of cake!
Ok, bad example ... 20.5 inch wide monitor ... 1920px ... About 94 dpi ... About 1/47" per 2 pixels or 1/31" per 3 pixels.
You need less than half of that to diversify what grid point you are pointing to.
For the metric guys ... About 0.27 - 0.41mm pointing accuracy on screen.

I think not.
CVH

User avatar
Chips&Chips
Full Member
Posts: 68
Joined: Mon Nov 13, 2023 12:15 pm

Re: Blocks, Library, Edit Block, Edit Block In Place

Post by Chips&Chips » Sat Feb 17, 2024 10:50 am

94 DPI divided by 20 (1/.05 = 20) is about 4.7 Dots or Pixels. My eyes may be old, but they can do that. I do take those eye vitamins. And my "computer glasses" are special with two powers for close up and computer screen distance. I don't need any distance lenses so I look over the top for the TV and wall clock.

For the metric guys, that is about 3.7 dots per mm, almost 4. Or 0.27mm as stated. OK, a bit more would be nice.

And if I had a larger desk, I would get a larger monitor. I may do that anyway as it's about time for a new computer anyway. Some folks have really large monitors for CAD use.


Back On Subject: I finally figured out the final shortcut for editing my original parts library. If I keep the original text fields at the start of each edit, I can position the Attributes on the same reference points, ON TOP OF THE ORIGINAL TEXT. Then QCAD is really good at letting me select the original text under the Attribute so I can delete it. That saves the moving so I don't have to change the Grid setting of mess around with typing in the relative coordinates. It's fast and easy.

Unless someone has more on this topic, I am going to mark it "SOLVED" tomorrow. But I still think that the Grid in QCAD needs attention as soon as possible. Oh, and YES I did read the references referred to. It's just that I don't completely understand all of it. Some of the terminology goes right past me.


CVH wrote:
Sat Feb 17, 2024 8:24 am
Chips&Chips wrote:
Sat Feb 17, 2024 8:12 am
I do 0.05" parts all the time. Piece of cake!
Ok, bad example ... 20.5 inch wide monitor ... 1920px ... About 94 dpi ... About 1/47" per 2 pixels or 1/31" per 3 pixels.
You need less than half of that to diversify what grid point you are pointing to.
For the metric guys ... About 0.27 - 0.41mm pointing accuracy on screen.

I think not.
CVH
Paul A.
SE Texas
Windows 10
QCAD V 3.29.3.0

CVH
Premier Member
Posts: 3480
Joined: Wed Sep 27, 2017 4:17 pm

Re: Blocks, Library, Edit Block, Edit Block In Place

Post by CVH » Sat Feb 17, 2024 11:34 am

Chips&Chips wrote:
Sat Feb 17, 2024 10:50 am
94 DPI divided by 20 ...
I said that 1/20" was a bad example, don't mix that with the newer example.
Still, if I want to solder pads each 1/30" wide and 1/60" apart, several dozen on a row, it will be a big mess. (1/30+1/60=1/20)

You mention that the default minimum Grid spacing of 10 pixels by QCAD is far to coarse in relation with other applications.
And that grid snapping should continue beyond this minimum setting when the Grid is turned off.

Ok, less than the default minimum then ... Set it to 5 pixels or 3 or 2 ...
... Half of that is 3-2 or even 1 pixel, one can not divided a single physical pixel.
That would be 0,27 to 0,4 mm on my screen.
I assure you ... Steady pointing while clicking won't happen unless my hand becomes far more rock solid in the next 15 years or so.

Trying to fit details in that scale is simply not handy at all.
Zooming in with a fixed or adaptive grid is much more pleasant than fiddling with each screen pixel at low zoom.

BTW, Larger screens usually come with higher resultions, the dpi increases, dots get smaller.
Chips&Chips wrote:
Sat Feb 17, 2024 10:50 am
Back On Subject:
It is you that questioned the Grid in this matter, see last paragraph of:
https://www.qcad.org/rsforum/viewtopic. ... 632#p43704


CVH

User avatar
Chips&Chips
Full Member
Posts: 68
Joined: Mon Nov 13, 2023 12:15 pm

Re: Blocks, Library, Edit Block, Edit Block In Place

Post by Chips&Chips » Sun Feb 18, 2024 9:23 am

CVH,

I am getting more comfortable with QCAD's grid system. But I still feel it is far from ideal.

I have just finished editing the library parts that I created earlier. Now all are on layer 0 and they have Attributes instead of the original text. As I said above I did find a trick to avoid changing the grid settings for every part, but I still had to do it for some. And I will be careful in the future to have a good grid setting before I do anything.

Part of my problem is I am accustomed to changing the grid on-the-fly. In the photo that I have attached, you can see how this is made easy in my old CAD program with an Icon on the right (red box). Without going to any menu I could instantly get a pop-up window with the grid settings while drawing. The grid dots on the screen represent the 1" grid and there are 10 snap points between the dots. In the photo there are over 14 inches of grid across the screen. With the 10 snap divisions between the dots that's over 140 snap points. I was easily able to draw the green line from 0.3" below a dot to 0.4" to it's right. My screen resolution is 1680 x 1050 so I guess that is in keeping with your 8 or 10 pixels for a minimum distance. But I can zoom in even more and still use the invisible snap points.

Another big time saver is if the "Even sides" box is checked, when I enter the X grid spacing, the Y and Z are immediately updated. There have been times when I needed an uneven grid, but they were less than 0.001% of the work I did with that program. A small bit of extra code saves the user a LOT of time over the months and years.

And much of the work that I have done has benefited by being able to change the grid frequently while working on a drawing.
Attachments
FastCADGridIcon.jpg
FastCADGridIcon.jpg (255.9 KiB) Viewed 913 times
Paul A.
SE Texas
Windows 10
QCAD V 3.29.3.0

User avatar
Chips&Chips
Full Member
Posts: 68
Joined: Mon Nov 13, 2023 12:15 pm

Re: Blocks, Library, Edit Block, Edit Block In Place

Post by Chips&Chips » Sun Feb 18, 2024 9:26 am

And a BIG thanks to everyone who helped me here.
Paul A.
SE Texas
Windows 10
QCAD V 3.29.3.0

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4943
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Blocks, Library, Edit Block, Edit Block In Place

Post by Husky » Sun Feb 18, 2024 11:39 pm

Chips&Chips wrote:
Sun Feb 18, 2024 9:23 am
Part of my problem is I am accustomed to changing the grid on-the-fly. In the photo that I have attached, you can see how this is made easy in my old CAD program with an Icon on the right (red box). Without going to any menu I could instantly get a pop-up window with the grid settings while drawing.
Use the shortcut Ctrl+I in Qcad and you are only one click away from the grid settings. I would call it "on-the-fly" too ...

BTW: Why did you decide to switch from FastCAD to Qcad?
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

Post Reply

Return to “QCAD 'How Do I' Questions”