-
-
Notifications
You must be signed in to change notification settings - Fork 1k
-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change default linewidth to 0.25 mm #1326
Comments
Thanks, melwyncarlo. This will spare us a lot of grief. |
You're welcome. 😃 |
@melwyncarlo can you double check to verify this fix is working? I downloaded the source zip for Task_22 and compiled it. Newly created layers still show a line width of 0mm, as does layer zero. |
A little late to this, but a defined line width for layer 0 might cause a problem with blocks. Layer 0 is a special case as it it used for blocks where line attributes should be undefined, or 'By Layer' (unless attributes are required for a specific purpose). Blocks (drawn on Layer 0, or any other layer) will use assigned attributes when imported into a drawing. If left undefined, a block will adopt the attributes of the layer it is being imported into (preferred behaviour). Generally speaking, Layer 0 should not be used for general drawing purposes. |
@GSStnb good point. Layer 0 is a special case for blocks and its attributes should remain undefined. I think @dellus has a very good point though. Inexperienced users will likely start drawing on the default layer 0, then run into the problems later (printing, PDFs, etc) as in the OP. How about this: Whenever a new drawing is created, what if LibreCAD created a new default, active layer, maybe called "noname", in addition to Layer 0. The "noname" layer, and any additional layers created by the user, would default to a line width of .25mm. This would solve both problems. The inexperienced user would be drawing on a layer with a line width of .25mm, and Layer 0 would remain as-is with no attributes for use with blocks. |
A drawing layer separate from Layer 0 would reasonable, but perhaps it doesn't need to be a programmatic change (*). When LC starts, it reads the default template (../library/templates/empty.dxf ?). That template can be defined with an additional drawing layer that includes the prescribed line attributes. User defined drawing templates (Application Preferences -> Paths -> Template) can include additional layers / attributes, and that template should (does) take precedence over the default temple. *: Is the default template included with the installation software package, or is it created the first time LC is run? |
I have looked how it is done in other AutoCAD like apps. |
I have to add: In NanoCAD and FreeDraft the described also applies to Layer 0. |
"I wonder if there is any difference between using layer pen attributes linewidth "Default" (at 0.25mm) and directly "0.25mm"." |
Sorry for another post, but it comes to my mind one after the other. |
You are correct @dellus. It is the entities' attributes that are "By Layer", "By Block", or "Unchanged" - that is my mistake.
Ref: https://forums.autodesk.com/t5/autocad-forum/what-is-layer-0-for/td-p/57852 Having said all that, I should actually try setting the line thickness in layer 0, and create a block, etc... Edit: Never mind, it is all moot. It appears that when creating a block, it will NOT adopt Layer 0's attributes (e. g. line thickness). It is only when the attributes of the entities composing the block are set to something specific, will they be imported with the block. |
I almost never use blocks but I am a bit afraid by the outcomes of the discussion with blocks. I think we should also think about drawings made with older version of LibreCAD: if hard-coding a change of line width on layer 0 could mess old drawing then it could be a really bad surprise for those who upgrade LibreCAD. Another solution could be a check before printing and / or saving: a warning window would inform the user that a layer (apart from 0) has 0mm line-width and that it makes the line non visible for printing. Then LibreCAD remains flexible for experienced user and provide an additional guard for inexperienced user. This is also backward compatible... |
@fa201: |
@fa201 I totally agree. Let's not mess with layer 0 at all. I just took a look at the default template (/resources/library/templates/empty.dxf). It's got five layers in addition to layer 0 in it. All five of those layers are set to pen width = 0! Clearly that is setting the inexperienced user up for disaster. Nothing's going to print from any of those layers by default. All five layers in empty.dxf should be set to .25 mm. I think we also need two coding changes.
|
@jbergengh I'm sorry, I just realised that I had forgotten about amending (just a tiny word change) another file. The change basically ensures that the layer width of layer 0 is With regards to your above comment, point number two has already been implemented. Two files, both named |
The default linewidth for layer 0 and all newly created layers is 0.00 mm.
New inexperienced users often are drawing with this setting without being conscious of it. On screen everything looks all right but when printing on paper or exporting to pdf often entities with linewidth 0.00 mm don't appear at all or are very faint, leaving despaired users. The behaviour varies with different LibreCAD versions, OS's, pdf-viewers, and printers or their drivers .
I suggest to change the default linewidth for layer 0 and all newly created layers to 0.25 mm. This is a widely accepted standard for a normal line. Experienced users who might need 0.00 mm (for CAM?) will know what to do.
By the way, there is also an option to set "default" linewidth. It turns out to be the same as 0.00 mm. But there is no possibility in LibreCAD to define this default setting. In other CAD packages you can set this standard, and it only makes sense then.
The text was updated successfully, but these errors were encountered: