Looked at the Forum posts for Adobe Illustrator but haven’t seen a response that fits. @bobH may have had a similar problem but @moosejuice Jan 21 response has been replaced by a newer version that I don’t see “Add…” as an option; only ‘File>Import object’ So any help on these two issues would be appreciated.
Have a project in AI, save as a SVG file. Luban says “Import Error Failed to import this object. Please select a supported file format.” SVG is a supported format; I look at the SVG file in a viewer and it is present in the viewer. I drop the file into TinkerCAD, it says ‘too big’ for TinkerCAD. I scale it to ~10% and it drops into TinkerCAD just fine. Save the file from TinkerCAD as a different SVG file and it goes into Luban just fine. It does need resizing (slightly too small) and I do that to the AI size I had for the objects in the file, at least for the width (height is not independently changeable), and all looks good. So the TinkerCAD workaround does work, but it shouldn’t be necessary.
Second, after setting the size to the original AI size and cutting with the CNC vector outline mode, the resulting sizes of the pieces are 82 to 91% of what they should be. It doesn’t appear (yet) to have any consistency that I could ‘fudge’ the size by to get what I need. It appears to be worse on the vertical than the horizontal, but I’m still looking at that. Any body have a thought?
I’m guessing there probably ain’t a solution, but I thought I’d post just to see if someone can save me some time working these out.
Not familiar with Illustrator anymore.
In Inkscape you can export as an Inkscape svg or as a plain svg. In inkscape you want plain svg. Otherwise it adds some info that messes stuff up.
Does Illustrator give you this option? or simple svg?
There are multiple options for saving a svg file. I haven’t tried all of them, but a couple quick changes in the saving profiles still didn’t let Luban import it directly. I’m continuing to experiment with different attempts.
I haven’t worked with Illustrator in more than a decade, but it used to embed an .ai duplicate of the file content into every .svg as a comment. If it still does that, I’m unsurprised that Luban chokes on the files it produces. This sort of thing shows up clearly if you pull the .svg file into a text editor—SVG is an XML-based format, so text editors can read it quite happily.
Thanks @ ElloryJaye, that did get me part of the way towards understanding AI and Luban. In looking at the SVG file in a text editor, AI is saving all the layers in the SVG file with the dimensions of the largest piece. The SVG file was only showing the layer I was working on, the others had the “style=“display:none;”>” so I wasn’t see all the additional ‘stuff.’ I had turned off most of the ‘additional’ things AI could include (embedded images etc) but I don’t see a way to only save one layer. I did try the workaround of deleting all the other layers and only saving the one layer I needed, but I’m still getting sizing issues. The SVG code is showing sizes of the project well bigger than the combined objects size (190x431mm compared to 65x150mm actual). Still working on that part.
Interestingly, Luban still doesn’t like the single layer AI SVG file; it still says not a ‘supported file format.’ (using either the file>import or the drag and drop method).
It is also interesting that my SVG viewer (Edge) can see the AI SVG export as a preview but it can’t preview the TinkerCAD file that I saved from using it as a pass-through. I don’t know enough XML to understand all the coding and why one is preview-able but won’t go into Luban and the other isn’t preview-able but goes into Luban. Any XML coders want to comment on that?
Understanding is a journey. Frustrating, but a journey.
@brent113 I thought about that (art board setting the size) but apparently not. I have found that AI is saving the size as pixels. The pixels are interpreted as mm by other programs (at least TinkerCAD). Not sure how to get around that or even if it’s possible.
@sdj544 I probably should learn Inkscape but I have decades of “experience” with AI (even though I seem to keep learning with it!) that I really don’t want another program to learn if I can help it. But, getting closer with this issue!
I’ve worked with XML enough in my day job to have some understanding of the language.
Usually, things like what you’re seeing come down to bad or incomplete implementations of a standard. Luban’s SVG implementation is very incomplete; I don’t know about your preferred viewer. It’s likely that there’s some fudging going on with elements or attributes that are technically optional, but in practice nearly always present.
Probably the next step would be to compare the various versions of the file using a diff utility (kdiff3 or similar) and see if any differences jump out. After that, if it’s really important to figure out what specifically is going on and fix it, I’d be examining document structure to determine whether in fact I was looking at a valid XML document (“valid” has a specific meaning when talking about XML) following the DTD or schema for the indicated SVG version. I guarantee that’s more work than you want to do, though.
Also, one reason people keep mentioning Inkscape (in addition to it being free) is that SVG is its native file format, so it tends to deal with it better than programs for which SVG is a second-class citizen. I always found Inkscape much easier to use than Illustrator, having learned them both more-or-less at the same time, but your mileage may vary.