What is the purpose of the "dimensions layer"?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

What is the purpose of the "dimensions layer"?

johnfound
I have expected, that the dimension lines will be placed automatically in the dimensions layer (if defined, of course), but no, this is not the case.

So, what is the purpose of this layer type?
Reply | Threaded
Open this post in threaded view
|

Re: What is the purpose of the "dimensions layer"?

aman
It is just a normal layer than any other. You set the layer properties, and when you must use it, change to that layer before using, LibreCAD does not understand the layer names, and so has been in every cad I have used.
Reply | Threaded
Open this post in threaded view
|

Re: What is the purpose of the "dimensions layer"?

johnfound
I am not talking about the layer name. In the recent versions, there is a layer type "dimensions layer", this is an attribute of the layer, the same way as the construction layer. This type of layers are indicated in the layer tree with special icon.

Reply | Threaded
Open this post in threaded view
|

Re: What is the purpose of the "dimensions layer"?

sand1024
Well, actually (as all other types of layers) "dimensional" layer is an ordinary layer.

However, additional child types of layers were added for the following pattern:

1) Major drawing is performed in normal layer. Extending further, single part on the drawing (if there are several parts) may be in own separate layer.

2) All dimensions for that part (s) are drawn in separate dimensional layer.

Such approach allows quick disabling dimensions (if needed) for specific parts of the drawing as well as dimensions of that part.  

Layer tree, different layers and their children are convenient for complex drawings, for example - if the user would like, say, to draw some device that includes several parts using single drawing (instead of having separate drawings for each part).

But you're right - this is rather an issue of filtering visibilities of entities.

So far LibreCAD does not support creation of automatic dimension, and the user would like to create dimensions - it's up to the user which layer to select for dimensions.

Potentially, indeed, it's possible to put all dimensions into some specific layer.

However, if there are several parts within the same drawing - it might be hard to determine target layer for dimensions.

However, re-thinking your question, I suppose it might be a good option - place dimensions automatically into dimension layer of currently active normal layer (if any). I'll take a look on this.



Reply | Threaded
Open this post in threaded view
|

Re: What is the purpose of the "dimensions layer"?

johnfound
sand1024 wrote
However, re-thinking your question, I suppose it might be a good option - place dimensions automatically into dimension layer of currently active normal layer (if any). I'll take a look on this.
Yes, this is exactly what I meant.
Reply | Threaded
Open this post in threaded view
|

Re: What is the purpose of the "dimensions layer"?

johnfound
In reply to this post by sand1024
sand1024 wrote
However, re-thinking your question, I suppose it might be a good option - place dimensions automatically into dimension layer of currently active normal layer (if any). I'll take a look on this.
I have fixed this issue. Here is the commit: Check-in [0edceb7b2f]

It searches for dimensions layer in the following order:

1. The active layer

2. Recursively, the children of the active layer.

3. All layers.

4. falls back to the active layer.
Reply | Threaded
Open this post in threaded view
|

Re: What is the purpose of the "dimensions layer"?

sand1024
Oh, I've quickly checked your implementation.

While the idea is quite straightforward, I'm actually slightly concerned about your implementation RS_Entity::setLayerToActive(bool dim)....

It might be an overkill to create treemodel each time for detecting proper layer, so I'll also think which support from the widget may be provided in order to simplify this method.
Reply | Threaded
Open this post in threaded view
|

Re: What is the purpose of the "dimensions layer"?

johnfound
Yes, but all this happens in rs_entity.cpp and this is low level abstract data code. It can't know about widgets and such higher level objects. And on this level, the layers tree structure and layer types (except construction) does not exists actually.

The general solution is to move the layer tree model on the same abstract level as rs_entity, but such changes are pretty heavy to be done.

On the other hand, if we want RS_Entity to operate with tree items, LC_LayerTreeModel is the lower level that even exists.

The only other solution is to handle the layer list and write some local list-to-tree conversion with string parsing layer list names. Which is wrong IMHO.

I hope I am explaining at least partially clear - I am not a programmer and my terminology might be not correct. :)

Anyway, all this story with the layers just proves my rule #2:

"In the software design,  every list dreams to become a tree."