DXF not loading correctly: invalid blocks/spline

If you are having problems with QCAD version 3, post here. Please report bugs here.

Moderator: andrew

DXF not loading correctly: invalid blocks/spline

Postby terrytmp » Sat Jan 18, 2014 7:29 pm

I just saved my recent changes and went to reload them and I find that some blocks have disappeared from the drawing. They still appear in the block list, and I can insert the blocks back into their intended positions and save the work again, but the same result when loading the DXF, they have disappeared and warnings on the command line about references to invalid blocks (though one of the disappeared blocks is not mentioned). There is also reference to a spline with less than 4 control points. Not sure what that means, unless it has something to do with blocks I have rotated?

Code: Select all
$ qcad
Debug:    RDxfPlugin::init
Debug:    RExamplePlugin::init
Debug:    TransactionListenerPlugin::init
Debug:    TIMER:  41 ms -  "loading add-ons"
Debug:    TIMER:  461 ms -  "initializing add-ons"
Debug:    TransactionListenerPlugin::postInit
Warning:  RDxfImporter::import:  block reference references invalid block:  "door-gusset-mid"
Warning:  RDxfImporter::import:  block reference references invalid block:  "door-gusset-mid"
Warning:  RDxfImporter::import:  block reference references invalid block:  "door-h-strut-mid"
Debug:    RSpline::isValid: spline not valid: less than  4  control points
Debug:    got transaction
Debug:    got transaction
Debug:    got transaction


Is it possible to edit the DXF by hand to recover the 'invalid' blocks (or some other automatic GUI driven method)? I was hoping re-saving the work under a new name would at least remove the problems. Let me know if any more information can be provided.

I am using QCAD 3.4.5 on Arch Linux installed via Arch's package manager 'pacman'.
terrytmp
Newbie Member
 
Posts: 8
Joined: Wed Jan 15, 2014 1:52 pm

Re: DXF not loading correctly: invalid blocks/spline

Postby terrytmp » Sat Jan 18, 2014 7:59 pm

I've tried to isolate the cause of the 'RSpline::isValid: spline not valid: less than 4 control points' message. See attachment.
Attachments
invalid_spline.dxf
(17.05 KiB) Downloaded 29 times
terrytmp
Newbie Member
 
Posts: 8
Joined: Wed Jan 15, 2014 1:52 pm

Re: DXF not loading correctly: invalid blocks/spline

Postby Husky » Sat Jan 18, 2014 9:32 pm

Hi terrytmp,

this is more an information than a solution:

Have you seen this:
viewtopic.php?f=33&t=2725&p=9248&hilit=recursive+block#p9248

and this: :wink:
http://www.ribbonsoft.com/bugtracker/in ... ask_id=998

... I assume that we just have to wait for the next release!
User avatar
Husky
Moderator
 
Posts: 656
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: DXF not loading correctly: invalid blocks/spline

Postby andrew » Sat Jan 18, 2014 9:39 pm

Thanks Husky. I think this is more likely a dxflib issue (note that terrytmp is using the free community edition, not QCAD Pro).
User avatar
andrew
Site Admin
 
Posts: 2557
Joined: Fri Mar 30, 2007 6:07 am

Re: DXF not loading correctly: invalid blocks/spline

Postby Husky » Sat Jan 18, 2014 9:52 pm

andrew wrote:... note that terrytmp is using the free community edition, not QCAD Pro.


Oops - I didn't realize that. :oops:
Thanks Andrew!
User avatar
Husky
Moderator
 
Posts: 656
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: DXF not loading correctly: invalid blocks/spline

Postby terrytmp » Sat Jan 18, 2014 10:36 pm

I just tried recursive blocks and its completely different behaviour. Three blocks in my design are deemed invalid by QCAD but they remain in the block list. I tried removing everything except the offending blocks but the problem must have been caused by something I'd removed as I was then able to use the 'invalid' blocks (but as everything else from the drawing was gone not very useful).

However the contents of the blocks was able to be copied into new blocks and used that way, and with the old blocks deleted.
terrytmp
Newbie Member
 
Posts: 8
Joined: Wed Jan 15, 2014 1:52 pm

Re: DXF not loading correctly: invalid blocks/spline

Postby terrytmp » Sun Jan 19, 2014 12:25 am

Ok, here's what I'm doing which seems to be causing problems:

Creating a part, a block, call it 'door'. It's a frame for a door built of wood, two tall lengths, and three short lengths (top, middle, bottom). I create one block for the two tall lengths, and another for the three short lengths. Arrange within block 'door'. Turns out height all wrong. Edit the tall length block, changing y/length values as appropriate in property editor. Save. Reload. Invalid blocks.

Obviously doing this within a larger project. Not only adjusting door, outer frame too, (forgive lack of construction/architectural terms here), as well as wall panel heights. Most if not all altered blocks are invalidated now, as well as others not touched.
terrytmp
Newbie Member
 
Posts: 8
Joined: Wed Jan 15, 2014 1:52 pm

Re: DXF not loading correctly: invalid blocks/spline

Postby andrew » Sun Jan 19, 2014 10:03 am

Thanks for the details terrytmp. Do you have an example drawing demonstrating the problem (i.e. saved before the problem occurred) with brief instructions on how to reproduce the problem (e.g. change length of line at the right in block "block01", etc.)? Thanks.
User avatar
andrew
Site Admin
 
Posts: 2557
Joined: Fri Mar 30, 2007 6:07 am

Re: DXF not loading correctly: invalid blocks/spline

Postby terrytmp » Sun Jan 19, 2014 10:57 pm

Hi Andrew, I will PM you a couple of files. Thanks.
terrytmp
Newbie Member
 
Posts: 8
Joined: Wed Jan 15, 2014 1:52 pm

Re: DXF not loading correctly: invalid blocks/spline

Postby terrytmp » Thu Jan 23, 2014 5:16 pm

Hi,

Were the files I sent you no good? I unfortunately did not have the data saved as a seperate file just before the corruption happened, and I don't have enough time to to experiment with trial-and-error trying to find a minimal version of the file which is just enough to cause the problems. I sent them to you anyway with the hope you might have a DXF file tool which could be used to debug them. Are they presenting the same problems I am having, for you on your machine? Is the pro version of QCAD better able to handle them?

I also wondered if maybe I was being a bit over-enthusiastic with turning things into blocks? (Not that that should be to blame for the file problems).

Any thoughts?
terrytmp
Newbie Member
 
Posts: 8
Joined: Wed Jan 15, 2014 1:52 pm

Re: DXF not loading correctly: invalid blocks/spline

Postby andrew » Fri Jan 24, 2014 12:07 pm

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

Re: DXF not loading correctly: invalid blocks/spline

Postby andrew » Mon Jan 27, 2014 4:12 pm

This should be fixed in the current master branch (effectively fixing nested blocks).
User avatar
andrew
Site Admin
 
Posts: 2557
Joined: Fri Mar 30, 2007 6:07 am


Return to QCAD 3 Troubleshooting and Problems

Who is online

Users browsing this forum: No registered users and 1 guest