Page 1 of 2

Draw order problem with blocks/library/hatches

Posted: Wed Jan 10, 2018 9:05 pm
by TheEnglishPatient
I have extreme frustration with making a library (blocks) of some 100 'tiles' where each of them derive from some base blocks:
Fundamentally, it appears that the draw order of the elements gets messed up, particularly where hatches are concerned.
Here the details : The 'Library Edit' snap shot below is what it looks like when opening the block in the library:edit - All looks good, note that the black outline with the four black 'notches' and the grey hatch are themselves an underlying block called 'Base', the black arrow (lines and hatch) lives then on the 'Track' layer, the purple centrelines on the Centrelines layer etc.
Now, if I insert this from the library into a new drawing, see 'Capture - No Base' below, the grey background hatch get's somehow promoted to the very top, as seen in the upper tile. The lower tile with the black elbow is a similarly constructed tile, but here the grey background gets only promoted to the top of the underlying base, i.e. it obscures only the 'Outline' layer, but not the others.
And now most curious, if I insert a separate 'Base' tile first (third picture), again a plain new file - then the elbow tile has the four notches and frame correct, but the arrow tile still is wrong.
What is going on?
BTW - Exploding is not the answer, as that (strangely) removes the hatches alltogether. (I have also started using just blocks in a file, which seems to be more stable, so my suspicion is that it's in the import/export with the library - but I really need a master library function for the tiles)

I am running 3.12.8.0 on Win10.

Re: Draw order problem with blocks/library/hatches

Posted: Wed Jan 10, 2018 9:10 pm
by andrew
Please attach DXF/DWG files, thanks.

Re: Draw order problem with blocks/library/hatches

Posted: Wed Jan 10, 2018 10:18 pm
by TheEnglishPatient
Here they are.

Re: Draw order problem with blocks/library/hatches

Posted: Thu Jan 11, 2018 7:34 am
by Husky
Hi TheEnglishPatient,

please test the modified and attached library item for me. Use it instead of Trk_hzl_frm.
Trk_hzl_frm_mod.dxf
(110.46 KiB) Downloaded 467 times
Is that working as you need it?

Re: Draw order problem with blocks/library/hatches

Posted: Thu Jan 11, 2018 11:28 am
by TheEnglishPatient
Thanks Husky, but I cannot open your file at all.

Re: Draw order problem with blocks/library/hatches

Posted: Thu Jan 11, 2018 11:39 am
by andrew
I can reproduce this problem here with QCAD 3.12.8. The drawing order is changed when inserting "Trk_hzl_frm.dxf".

However, it seems to work correctly in later QCAD versions, including the latest 3.19.2.

Re: Draw order problem with blocks/library/hatches

Posted: Thu Jan 11, 2018 12:22 pm
by TheEnglishPatient
I can now open the file by replacing the $ACADVER to AC1027. I can insert your file fine, but as soon as I modify it we have again the problem: I added a label with text, you see in the screen shot the label field hatch oblitering the text, and on the base the four notches are also again covered by the grey hatch. Interestingly, if I now insert Husky's original mod again file from the library it also shows the modified behaviour (see upper tile).If I remove everything, and then insert mod again, I now get the grey at the very top covering everything. So not only does the order get's changed, but there is somewhere also a memory effect...Does thismaybe something to do with layers (and naming)? Just a thought.

Re: Draw order problem with blocks/library/hatches

Posted: Thu Jan 11, 2018 1:41 pm
by TheEnglishPatient
Indeed, I played around with the latest trial version, and it looks like version 3.19 can handle this (mostly?) correctly. I'll plow now on with the new version, and we'll see.

Re: Draw order problem with blocks/library/hatches

Posted: Thu Jan 11, 2018 7:07 pm
by Husky
TheEnglishPatient wrote:Thanks Husky, but I cannot open your file at all.
Sorry for that - my bad! I saved my example with the newest dxf format (R32) and your Version wasn't able to read that.
TheEnglishPatient wrote:Interestingly, if I now insert Husky's original mod again file from the library it also shows the modified behaviour (see upper tile).If I remove everything, and then insert mod again, I now get the grey at the very top covering everything. So not only does the order get's changed, but there is somewhere also a memory effect...Does thismaybe something to do with layers (and naming)? Just a thought.
Ok - here is what I think ....

Your library items are much more complex than they should be.
1. they have the block in the block list,
2. this block is also used in the drawing,
3. it is then saved in the library - what puts another block over everything,

Now - you insert this library item the first time into your drawing and QCAD has "only" to handle this nested block situation. If you insert it the second time QCAD has additional obstacles - the block and the block name already exist and it needs your interaction to make a decisions.
Husky-2018.01.11-01.png
Husky-2018.01.11-01.png (12.15 KiB) Viewed 10529 times
Now comes you "memory effect" into the game ...

If you choice is to overwrite blocks then the library item will replace blocks with the same name in your drawing.
If your choice is NOT to overwrite blocks then QCAD will use the already existing block with the same name in your block list. Is this block is changed by you the changed version will be used to replace the library item.

Please compare my example drawing with yours. It is a plain library item and no blocks are nested!


Now ....................... I need a coffee ....

Re: Draw order problem with blocks/library/hatches

Posted: Thu Jan 11, 2018 7:23 pm
by Clive
Sugar?

Sorry, couldn't resist :wink:

Re: Draw order problem with blocks/library/hatches

Posted: Thu Jan 11, 2018 7:35 pm
by Husky
Clive wrote:Sugar?
Yes please ..... and creamer. :D

Re: Draw order problem with blocks/library/hatches

Posted: Thu Jan 11, 2018 8:28 pm
by TheEnglishPatient
Thanks everyone, and a well deserved coffe, sugar, creamer... I was ready to hit the bottle with the Scottish 'tea' last night! As you said, the issue is clearly with the nested blocks: I don't quite follow your explanation fully for the memory effect from my experiments, but you may be right - confusion sets in when you have different subblocks named the same, as the hierarchy gets then muddled: So, it looks to me that if you have a block 'Base' , and a 'Block 1' that is using itself a block called 'Base', which is different to the other 'Base' and a 'Block 2' which uses yet another 'Base', all these 'Bases' become welded into whatever was the first that was loaded. However, I am not entirely sure how that drawing order reassignment in the 'Base' itself is happening, seems to me that the 'Base' blocks are not just overriden but somehow mashed.

In any case, I don't think we need to flog that horse further as it seems only an issue with the obsolete versions. I have now invested in the new version 3.19, and so far so good!

BTW - any reason why I should not get the new 'Hatch' tool bar popping up in 3.19. - the button on the main left toolbar does nothing, but I can still hatch with right-click.

Re: Draw order problem with blocks/library/hatches

Posted: Thu Jan 11, 2018 8:58 pm
by Husky
TheEnglishPatient wrote:BTW - any reason why I should not get the new 'Hatch' tool bar popping up in 3.19. - the button on the main left toolbar does nothing, but I can still hatch with right-click.
Without an actual selection the "Hatch from Selection" tool is disabled. A selection will make it available.
Launching the "Hatch from Segments" tool brings you into the position to select the entities one by one.
TheEnglishPatient wrote:... I was ready to hit the bottle with the Scottish 'tea' last night!
Honestly - me too but how to explain that at 9am .... :wink:

Re: Draw order problem with blocks/library/hatches

Posted: Thu Jan 11, 2018 9:52 pm
by andrew
TheEnglishPatient wrote:BTW - any reason why I should not get the new 'Hatch' tool bar popping up in 3.19. - the button on the main left toolbar does nothing, but I can still hatch with right-click.
Could it be that you have installed the new version on top of the old one? This will work when updating newer versions that were also installed from an MSI. However, when updating old versions installed from an exe installer or versions installed from a ZIP file it will mix up the two versions. In this case it's better to uninstall and delete the QCAD folder manually and then install from scratch again.

Re: Draw order problem with blocks/library/hatches

Posted: Fri Jan 12, 2018 11:28 am
by TheEnglishPatient
@ Andrew - yes, that's what I did. It used to work before (I think), but fine, will do a fresh install. I guess that will remove also all my customisation settings. but ok.
@ Husky - I have constructed some more, about 30 derived tiles with cascading blocks, and no further problems found - so the 3.19 version (or the 2018 .dxf handling?) seems to definitely fix this problem.
Thanks again everyone for the prompt help.