Problem opening DXF from AutoD Inventor

Post questions on how to use or achieve an effect in Inkscape.
walkinplaces
Posts: 9
Joined: Fri Apr 14, 2017 12:05 pm

Problem opening DXF from AutoD Inventor

Postby walkinplaces » Fri Apr 14, 2017 12:09 pm

Hi there,
I'm trying to open a DXF file, exported from Inventor. When I attempt to open it (not import, although neither seem to work), I get the error message:

-
Traceback (most recent call last):
File "dxf_input.py", line 530, in <module>
inkex.errormsg(_('%d ENTITIES of type POLYLINE encountered and ignored. Please try to convert to Release 13 format using QCad.') % polylines)
NameError: name '_' is not defined
-

The DXF file is already Inventor 13. Any help would be greatly appreciate.

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Problem opening DXF from AutoD Inventor

Postby Moini » Fri Apr 14, 2017 10:01 pm

Which Inkscape version are you using? It looks to me as if you're using 0.48.x and the extension has been written to work with 0.91 and higher.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

walkinplaces
Posts: 9
Joined: Fri Apr 14, 2017 12:05 pm

Re: Problem opening DXF from AutoD Inventor

Postby walkinplaces » Sat Apr 15, 2017 5:17 am

I am using 0.92.1, 64bit Windows 10.

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Problem opening DXF from AutoD Inventor

Postby tylerdurden » Sat Apr 15, 2017 6:32 am

I believe the version r13 refers to AutoCad. Poly lines were handled differently in later versions.
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Problem opening DXF from AutoD Inventor

Postby Moini » Sat Apr 15, 2017 6:42 am

The issue is with the localization of the interface (the underscore provides translation capabilities), not with the polylines, currently, tylerdurden.

@walkinplaces, can you please:

- upload the (or a similar) dxf file
- also upload the files dxf_input.py and inkex.py that you have (I think one of them must be the wrong version for Inkscape 0.92.1 - I'm happy to provide or link to the correct one, though, if I know which one needs to be replaced).

Another idea:
have you updated from 0.91 by uninstalling 0.91, then installing 0.92.1?
If so, uninstalling and reinstalling your 0.92.1 may help (but you need to install uniconvertor afterwards, if you haven't yet, see FAQ: https://inkscape.org/en/learn/faq/#how- ... or-windows).
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

walkinplaces
Posts: 9
Joined: Fri Apr 14, 2017 12:05 pm

Re: Problem opening DXF from AutoD Inventor

Postby walkinplaces » Sat Apr 15, 2017 6:14 pm

Hi there @Moini,

I just changed laptops, so 0.92.1 is the only version that has been installed on here.
I've included the DXF file I was trying to work with, along with the other two files you asked for. :)
Attachments
dxf_input.zip
(79.36 KiB) Downloaded 276 times

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Problem opening DXF from AutoD Inventor

Postby Moini » Sun Apr 16, 2017 5:27 am

Okay, so:

- the error message you get is because the author didn't add the line
inkex.localize()
above the line 530 (indented, like the line below, file attached.

- after that error message is fixed, however, you will get the 'real' error message that tylerdurden hinted at.
It will tell you:
"1 ENTITIES of type POLYLINE encountered and ignored. Please try to convert to Release 13 format using QCad"

So, you'll need to do two things:

- edit the file dxf_input.py or replace by attached, unpacked file, to get rid of localization error, and still get appropriate warnings.

- convert your dxf file to be able to edit in Inkscape.
This proves difficult, as it appears that the free version of QCad does not support format conversion to release 13 format of dxf (unlike the statement made by the extension error message).

LibreCad, which appears to be a derivative of QCad (tested on Linux, also available for Windows and macOS, download at http://librecad.org/cms/home.html) works, however, and is free (both as in licence and in gratis).
I've successfully saved with librecad as any other dxf format than release12 and opened your file with Inkscape.
Find it attached. (import option: 'read scale from file' selected - you'll need to check the dimensions, though).
Attachments
16T 5mm HTD-OUTLINE_2007.dxf.svg
(12.4 KiB) Downloaded 359 times
dxf_input.py.zip
(6.99 KiB) Downloaded 618 times
Last edited by Moini on Sun Apr 16, 2017 5:54 am, edited 2 times in total.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Problem opening DXF from AutoD Inventor

Postby Moini » Sun Apr 16, 2017 5:44 am

Update: suggested a change for the extension in Inkscape at https://bugs.launchpad.net/inkscape/+bug/1683063
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

walkinplaces
Posts: 9
Joined: Fri Apr 14, 2017 12:05 pm

Re: Problem opening DXF from AutoD Inventor

Postby walkinplaces » Sun Apr 16, 2017 8:48 am

You are a wizard!

I replaced dxf_input.py withe the one that you attached, and received the correct error message, and went through the process with LibreCad, and everything works like a charm! I'm able to take DXF files from Inventor>LibreCad>Inkscape with no issues now, and create accurate cut paths for my CNC machines. :)

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Problem opening DXF from AutoD Inventor

Postby Moini » Sun Apr 16, 2017 9:19 am

Yay! :-) Can you maybe share a picture of a result? I love to see what people make (and don't have access to any of that machinery to play with myself)!
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

walkinplaces
Posts: 9
Joined: Fri Apr 14, 2017 12:05 pm

Re: Problem opening DXF from AutoD Inventor

Postby walkinplaces » Sun Apr 16, 2017 11:27 am

For sure! I totally understand, I had huge jealousy of people that has access to these fancy machines, which drove me to actually build myself my own laser cutter... which was a long journey and a lot of fun. These gears you helped me with are the start of my next machine build, a CNC router. :)
If you're at all interested, I'd be happy to share info on the laser cutter! :D

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Problem opening DXF from AutoD Inventor

Postby Moini » Sun Apr 16, 2017 12:15 pm

That sounds cool :D
So you've built a machine, and are now building another machine using the previous one? Or will you 3D print the gears, and Inkscape is just one step in a long chain?

I'm probably not going to build something as complex as that myself, so in-depth details on the laser cutter or CNC machine would be lost on me (my far-away aspiration would be to have access to a paper cutting machine). But I'd be interested to read what your next machine will be used for - as far as I understand, it's going to cut stuff. What size and material will it be able to cut? And how? And what do you cut with your laser cutter? (and where does one put such a device?)
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

walkinplaces
Posts: 9
Joined: Fri Apr 14, 2017 12:05 pm

Re: Problem opening DXF from AutoD Inventor

Postby walkinplaces » Thu Apr 20, 2017 3:09 pm

Thanks!
I've built a machine, and while I wait for parts upgrades to arrive, I've using my time to of course build a separate machine. My plight with Inkscape was to accurately cut CAD drawings, instead of "outlining" and cutting a bitmap image, which is great from an artistic standpoint, but not for precise, practical cuts. I wanted to cut the gear profiles out of paper as a sort of prototyping process as I designed them, to see how they fit the drive belt. And yes, I have also 3D printed the gears, which I may end up doing in the end for all of them. I could use the 3D printed gears to drive the machine... and make a set of replacement aluminum gears! I love CNC stuff.

My first machine, the laser cutter/engraver, I use to actually "cut" paper, cardstock, fabric, vinyl sticker material, and some other paper based stuff. I can also do what's called Raster engraving, which is the same process that a printer uses, without the ink (basically printing an image line-by-line). This photo might help your understanding :) --> https://lasercuttingsheffield.files.wor ... 168&h=1000

My next machine will ideally be able to rout/mill aluminum and wood to make accurate 3D objects (like 3D printing but instead of building the "positive" space of the object, you are removing the "negative" space from around the object, eventually revealing it). Here's a quick video for an idea of how a CNC router cuts stuff :) --> https://www.youtube.com/watch?v=L2V39Rb1QtA

For my laser cutter, I have a 35x35cm cutting area, and I hope to achieve the same for my CNC mill, as well as height in the Z axis (so the bit can move up and down).

If you send me DXF files, I would gladly cut some paper for you to show you what it does. And as for storing my laser cutter... it's currently in a large wooden box that I transport with me to and from school, and I can run it basically anywhere I have outlet power and my laptop. :)

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Problem opening DXF from AutoD Inventor

Postby Moini » Sat Apr 22, 2017 7:18 am

Update:
One of the authors of the extension (at least I think so - no idea how he knew about the bug report!) has updated the extension itself. Says it's not ready yet, and I haven't tested, either, but I thought I'd let you know, @walkinplaces :)
https://bugs.launchpad.net/inkscape/+bu ... comments/2

And yes, I can see how much you enjoy CNC stuff :D Thanks for the links (esp. the router thing was helpful, as I didn't imagine this would basically be a drill that can move in 3D space... language barriers, I guess :) ).

As for a remote-testing fun file (thank you for that offer!), I've got no clue which options to select in Inkscape's export dialog for dxf, else I'd attach a little, simple paper lantern pattern I made yesterday (at least it's not useless afterwards ;-) ). After the cutting, it would need to be creased/folded - what would be a good way to mark the (4) places where to fold?
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

walkinplaces
Posts: 9
Joined: Fri Apr 14, 2017 12:05 pm

Re: Problem opening DXF from AutoD Inventor

Postby walkinplaces » Sun Apr 23, 2017 2:15 pm

Thank you for the update! I'll be sure to check it out!

Ahh, I thought that link would be helpful. Your comment about it being a 3D drill is a very good way to describe it!

You are welcome! I do not need a dxf, I just need the svg drawing. If you draw in inkscape, and the line weight is 0.1mm-0.2mm, then I can convert it to a cutting path. As for fold lines, maybe put in some "extra" dotted lines for my reference, that I can then delete before I generate the path. Looking forward to it! :)

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Problem opening DXF from AutoD Inventor

Postby Moini » Mon Apr 24, 2017 8:49 am

Okay, so here it is - the arrows mark where the folds would go (from arrow to arrow). Haven't tested if it will hold up when glued together (flaps at the right), and don't know if maybe the lines might be too close to one another, for a laser cutter that burns through the paper (but can make adjustments, of course). If I'd cut it (by hand), I'd use light white cardstock, about 160g/m² and put an LED tea light into it later.

I'm curious to see what your laser cutter will do with it :D

Just made it for this purpose - some day, I'd like to create Origamic Architecture cards for a couple of local sights :)
Attachments
lantern_clean.svg
(41.94 KiB) Downloaded 305 times
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

walkinplaces
Posts: 9
Joined: Fri Apr 14, 2017 12:05 pm

Re: Problem opening DXF from AutoD Inventor

Postby walkinplaces » Mon May 08, 2017 10:20 am

Hi, sorry for the very late reply! I have been busy for the last little while.

I have attached a couple photos of your lantern, it took my machine about 8 minutes to cut. :)
I used a red card stock, and the entire lantern weighs 6 grams. Follow these links for the photos :)

https://drive.google.com/file/d/0B5kdyl ... sp=sharing
https://drive.google.com/file/d/0B5kdyl ... sp=sharing

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Problem opening DXF from AutoD Inventor

Postby Moini » Mon May 08, 2017 11:32 pm

Cool, thank you, walkinplaces! This is fun :-D

Did you have to make a lot of changes for the file to be cut easily?

I'm impressed by the level of detail that can be achieved. Those tiny marks, where the folds would be - those are single cuts, made by the laser, right?

(You actually weighed it? ;-) Why?)

I'd love to see the photos in the inkscape.org gallery... Which licence would you want to be used for them? (I'd go with Public Domain / CC0 for the svg).
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

walkinplaces
Posts: 9
Joined: Fri Apr 14, 2017 12:05 pm

Re: Problem opening DXF from AutoD Inventor

Postby walkinplaces » Tue May 09, 2017 10:34 am

You are very welcome!

I drew the tiny lines in where you put the arrows, and yes, they are single cuts from the laser :) It is very accurate, the machine is accurate to 1/40mm in both the "X" and "Y" axis (1,600 points per square millimeter), which is actually more accurate than I need, because the laser dot is 1/10mm wide.

I weighed it because you mentioned a weight for the material you would use, and I wanted to give a comparison. ;)

I do not know how to get the photos in the inkscape gallery... public sounds fine though!

Here are some more pics of things I have done with the laser :)
https://goo.gl/photos/6oCpxkgnRtfX9qWv7

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Problem opening DXF from AutoD Inventor

Postby Moini » Tue May 09, 2017 10:58 am

Awwww.... Those must be very special motors. What's their normal use? Microscopes?

To share your photos with fellow Inkscapers in the gallery, you'd need to register at https://inkscape.org and visit your 'Inkspace' upload form at https://inkscape.org/en/gallery/upload/

(I think tagging things currently doesn't work, though)

After an upload, the photos will be available at https://inkscape.org/gallery/ (order by 'last updated' to see the latest uploads) The upload limit is 10Mb per user currently, so you'd need to be picky and also downscale them a bit (or you can ask for additional space).
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)


Return to “Help with using Inkscape”