DXF not loading correctly: invalid blocks/spline

If you are having problems with QCAD, post here. Please report bugs through our Bug Tracker instead.

Always attach your original DXF or DWG file and mentions your QCAD version and the platform you are on.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
terrytmp
Newbie Member
Posts: 8
Joined: Wed Jan 15, 2014 1:52 pm

DXF not loading correctly: invalid blocks/spline

Post by 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

Post by 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 577 times

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4931
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: DXF not loading correctly: invalid blocks/spline

Post by 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= ... lock#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
andrew
Site Admin
Posts: 9019
Joined: Fri Mar 30, 2007 6:07 am

Re: DXF not loading correctly: invalid blocks/spline

Post by 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
Husky
Moderator/Drawing Help/Testing
Posts: 4931
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: DXF not loading correctly: invalid blocks/spline

Post by 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!

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

Re: DXF not loading correctly: invalid blocks/spline

Post by 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

Post by 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.

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

Re: DXF not loading correctly: invalid blocks/spline

Post by 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.

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

Re: DXF not loading correctly: invalid blocks/spline

Post by 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

Post by 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?

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

Re: DXF not loading correctly: invalid blocks/spline

Post by andrew » Fri Jan 24, 2014 12:07 pm


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

Re: DXF not loading correctly: invalid blocks/spline

Post by andrew » Mon Jan 27, 2014 4:12 pm

This should be fixed in the current master branch (effectively fixing nested blocks).

Post Reply

Return to “QCAD Troubleshooting and Problems”