Raise or Lower Layers

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

Moderator: andrew

Newbie Member
Posts: 3
Joined: Thu Mar 10, 2011 2:41 am

Raise or Lower Layers

Postby Xiong » Thu Mar 10, 2011 4:08 am

Commonly, in any sort of drawing program that supports layers, there is the ability to manipulate the layer ordering. I don't see that in QCad.

Layers seem to work peculiarly in any case. For instance, let's create two new layers: 'layer1' and 'layer2'. Now the Layer palette will show:


... and 'layer1' will be the frontmost (!?). Both of these features are exactly contrary to behavior in every other graphics application I can recall; the bottom layer in the palette is the top layer in the drawing; the newest layer is (almost) the rearmost.

I could tolerate unmovable layers if at least they were created back-to-front; since in a logical development of a drawing, more recent items may obscure earlier ones. I could tolerate the peculiar front-to-back layer creation if I could reorder layers later.

But apparently, we are stuck with immovable layers, created front-to-back. This makes the concept of layers something of a joke.

Related to this is the concept of entity ordering; even if two objects are on the same layer, one is on top of the other. There does not seem to be any way to send an entity to the front, to the back, or (better) one step in the ordering either way.

Am I missing something?

User avatar
Site Admin
Posts: 5129
Joined: Fri Mar 30, 2007 6:07 am

Postby andrew » Thu Mar 10, 2011 10:01 am

Layers in CAD (any CAD, not just QCAD) have nothing to do with back / front ordering of entities at all.

Some excerpts from the QCAD book:

"Most CAD systems offer a way to organize a drawing by arranging related elements on separate layers. [..] All elements on the same layer usually share a specific role in the drawing. For example all lines on a layer called 'Walls' might represent walls, a layer called 'Labels' may contain all text labels of a drawing."

"Layers are crucial to the meaning of the drawing elements. For example if a line is drawn on layer 'Walls' this can mean that it is a part of a wall. [..] In other words: the layer on which you draw an element often defines its meaning or function."

"While you are working on a drawing in the CAD system, you will always know on what layer an entity is. As soon as you print your entire drawing on a sheet of paper, this information is generally lost. For this reason, all elements on a layer usually share a unique combination of visible attributes (color, line style and line width). For example all elements belonging to walls may be drawn in black with thick, solid lines. Furniture may be drawn in gray with thin, solid lines. Electrical installations may be drawn in red with thin, dashed lines and so on."

Moving entities to the back / front should be rarely required and has traditionally gotten little attention in CAD. This is partially because CAD drawings used to be plotted by pen plotters. A pen plotter draws lines on top of each other, so the order in which entities are drawn is irrelevant.

QCAD Professional introduced a simple tool to move entities to the front / back of a drawing (Modify - Bring to Front / Send to Back). In practice, this is mostly used for solid fills and sometimes hatches. Unfortunately, the QCAD Community Edition has no such tool.

Newbie Member
Posts: 3
Joined: Thu Mar 10, 2011 2:41 am

Postby Xiong » Thu Mar 10, 2011 11:20 pm

All this is largely a matter of viewpoint. Different users have different types of project, rendering intents, and working habits.

When I saw the immovable layers, my first thought was, indeed, that this was a decision coming from a certain viewpoint, largely based on mechanical engineering, where the majority of entities are object lines and dimension lines; and most are a single color: black on white paper, blue on blueline, white on blueprint, etc. Here, layer ordering is irrelevant.

In other applications, with large areas of solid color, layering is crucial. Even if it is only a matter of a blue line overlapping a red line, we would like control of whether the lines both print or one knocks out the other; and at the least, which color knocks out.

QCad layers may not intend to relate to rendering order but they do. This is one of the first things I've stumbled over, trying out this application. Layers closer to the top of the Layer palette render before layers below them. I don't see any way to work around this, short of abandoning layers as a means of organizing a drawing. One could, I imagine, define a drawing entirely as a set of blocks and move them up and down through the layer stack.

I've used pen plotters and once, I even wrote an application to drive one. That was about 25 years ago. Now, I create drawings to be rendered on-screen as PNGs; or printed on an inkjet or laser printer.

If some support for layer reordering comes into the Pro version, I might consider buying it; since I have a need for CAD-quality precision and flexibility in creating drawing entities. But without, I think this product is of only marginal use, at best. Sorry.

User avatar
Site Admin
Posts: 5129
Joined: Fri Mar 30, 2007 6:07 am

Postby andrew » Fri Mar 11, 2011 10:14 am

Xiong wrote:QCad layers may not intend to relate to rendering order but they do.

Nope, they don't. Entities are displayed in the same order they are drawn / modified. There should be no relation to layers at all. Unless this was different in the Community Edition, but as far as I remember it wasn't.

Xiong wrote:But without, I think this product is of only marginal use, at best. Sorry.

Sure, no problem. As you said, it's a matter of what you are trying to achieve with a software.

Have you considered using something like Inkscape for the final touch? CAD really isn't about looks - it's about delivering information, precisely and accurately. It's not uncommon to post-process CAD drawings in publishing applications to polish them for that glossy paper print out. Just a thought.

A 'display by layer' option is not impossible to implement. DXF / DWG do not support this directly but it's probably doable by forcing a certain order in which layers / entities are stored. This might be considered for a post QCAD 3 release.

Newbie Member
Posts: 3
Joined: Thu Mar 10, 2011 2:41 am

Postby Xiong » Sat Mar 12, 2011 7:02 am

andrew wrote:Entities are displayed in the same order they are drawn / modified. There should be no relation to layers at all.

We may not be talking about the same thing; I don't know. I created a drawing, a layer, an entity on that layer, hatched it, and created a second layer; this appeared in the Layers palette above the first layer. On the second layer, I created a set of entities and hatched them in a different color. (I say 'hatch' since that is QCad jargon but they are all simply solid fills.)

Now, onscreen at least, I see the first entity and its hatching (which I understand to be treated as a distinct entity). I see the second set of entities "showing through" the solid hatch; but their hatching is invisible: covered by the first layer's entity's hatching. If I make the first layer invisible, the second layer's entity's hatching becomes visible.

Ergo, the hatching is rendered not in order of creation. It is inconsistent that the object lines should "show through" a solid fill; I don't know what I think about that.

Incidentally, just now, I attempted to create a clean demonstration and got reverse display (of what I have in my working drawing) of layer creation. So, I don't know what to expect.

The demo drawing, again, has the second hatch created, partially obscured by the first hatch. Again, both sets of object lines are visible. It seems that the second entity, created on the second layer, knocks out the object line of the first created, on the first layer (as one might expect). It's only the hatching that works contrary to expectations.

This forum doesn't have file attachment; so I don't know what to do with the demo file.

I agree that I might well satisfy my needs by creating only sets of lines in QCad and exporting them for further work in Inkscape. I've used this sort of back-and-forth work flow with success at other times, although then, I was going from vector to raster editing. This may turn into a three-step process: QCad for mathematically correct lines, Inkscape for properly layered fills and annotations, the Gimp for raster work. I can't say I eagerly anticipate the process.

Strange to say that I've used most available graphics editors that have come out since 1984 and no one of them has come up to the flexibility of pen, ink, and paper, used with some skill and a few related tools. I have done a great deal of work in these past years and I agree that the computer makes it go more quickly, on average. But in all that time, I think I have never done a better drawing than my best by hand.

If you want to see the demo, please tell me where to put it. Otherwise, I think we've beaten this horse to death. I don't expect a new feature to be added by request; I merely hoped I'd overlooked something or failed to understand.

Arie Kabaalstra
Registered Member
Posts: 1
Joined: Sat Dec 24, 2011 11:51 am

Postby Arie Kabaalstra » Sat Dec 24, 2011 6:33 pm

What you are looking for is not "Layers" but "Levels".. i'm familiar with that concept, some "old-school" Cad programs like Triga had this feature..

You could draw a part, for instance an axle, and then the bearings, you't put the axle on level 0 ,and the bearings on level 1.. this meant that on the drawing the axle was behind the bearings, so you wouln't have to trim away the lines on the axle, in the bearing.. , it would be displayed as a dashed line, if you had that switched on, or just a bearing.. without the axle visible at that point..

It was a useful feature, but a lot of work to get it right..

Return to “QCAD Community 'How Do I' Questions”

Who is online

Users browsing this forum: No registered users and 1 guest