Export to SVG problem

General Moho topics.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
DK
Posts: 2854
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Export to SVG problem

Post by DK »

Hi.
Just wondering if anyone can explain why some shapes export from Moho with rounded lines intact and some object lines are exported as broken shapes?
Cheers
D.K
User avatar
DK
Posts: 2854
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Re: Export to SVG problem

Post by DK »

Not sure about this but it looks like if a line has been adjusted via the Line Width tool
the SVG export treats the line as a shape and breaks it up into bits???

D.K

EDIT:
Tested and confirmed.
User avatar
SimplSam
Posts: 1047
Joined: Thu Mar 13, 2014 5:09 pm
Location: London, UK
Contact:

Re: Export to SVG problem

Post by SimplSam »

Yeah - I have noticed this sometimes. SVG's don't have variable width lines - so the lines need to be converted into shapes, and I guess the exporter got slightly lazy with that process (after doing the hard part).

You can 'fix' the broken outlines using tools like Affinity Designer, InkScape and Illustrator - which allow you to join shapes/paths.
Moho 14.1 » Win 11 Pro 64GB » NVIDIA GTX 1080ti 11GB
Moho 14.1 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam


Sam
User avatar
DK
Posts: 2854
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Re: Export to SVG problem

Post by DK »

You can adjust the line width of an svg line when it is exported, (Edit: If it is exported from Moho with an even line width to an illustrator package),...makes me think an improved svg export script that supported uneven line widths from Moho could be a very handy thing if it were possible to do?

Cheers
D.K
User avatar
hayasidist
Posts: 3511
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: Export to SVG problem

Post by hayasidist »

Not a solution to the problem reported, just an observation: I've found (going back to 2015 and before) SVG import / export to be unreliable when dealing with anything that could be described as even marginally "complicated" and, despite various efforts in the dev teams at the time, the issues reported (by me and others) never really got resolved satisfactorily. Personally speaking, I avoid SVG for anything other than the very simplest of images.
User avatar
DK
Posts: 2854
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Re: Export to SVG problem

Post by DK »

Not sure how others use SVG's but my workflow normally runs along the lines of illustrating characters/objects in Moho then exporting them as SVG's to an illustration package for lettering and final layout. These jobs range from T-Shirt designs, Books, Pamphlets, Posters, Style guides for TVC's etc.
Anyone else use SVG's regularly?
Cheers
D.K
User avatar
SimplSam
Posts: 1047
Joined: Thu Mar 13, 2014 5:09 pm
Location: London, UK
Contact:

Re: Export to SVG problem

Post by SimplSam »

I must say - I am a huge fan of importing vector (SVG, AI, EPS) into Moho.

My current workflow typically includes Affinity Design (which can open SVG, AI, EPS, PDF, WMF etc. and export SVG) as a pre-step to Moho. AfD has options to flatten transforms, rewrite styling and simplify the structure when exporting to SVG - which seems to cure 90% of issues.

The remaining 10% typically relates to Layering, Masking and embedded Bitmaps.

I actually created some half-written Moho LUA tools to import (~35% done) & export (~55% done) SVGs. Obviously neither work perfectly - but can still assist in certain scenarios. I probably need to tidy up the codebase's at some point - and share.
Moho 14.1 » Win 11 Pro 64GB » NVIDIA GTX 1080ti 11GB
Moho 14.1 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam


Sam
User avatar
slowtiger
Posts: 6079
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Re: Export to SVG problem

Post by slowtiger »

Hej Sam - I like your avatar image!
AS 9.5 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
AS 11 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
Moho 13.5 iMac Quadcore 2,9GHz 16GB OS 10.15

Moho 14.1 Mac Mini Plus OS 13.5
User avatar
SimplSam
Posts: 1047
Joined: Thu Mar 13, 2014 5:09 pm
Location: London, UK
Contact:

Re: Export to SVG problem

Post by SimplSam »

slowtiger wrote: Sun Nov 15, 2020 10:13 am Hej Sam - I like your avatar image!
hehe. It steadily evolved from an enlarged dot above the i in SimplSam.
Moho 14.1 » Win 11 Pro 64GB » NVIDIA GTX 1080ti 11GB
Moho 14.1 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam


Sam
User avatar
DK
Posts: 2854
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Re: Export to SVG problem

Post by DK »

Would any of those helper scripts of yours maintain adjustments in the line width of an svg rather than have it broken up into pieces?
Cheers
D.K
User avatar
SimplSam
Posts: 1047
Joined: Thu Mar 13, 2014 5:09 pm
Location: London, UK
Contact:

Re: Export to SVG problem

Post by SimplSam »

My script (== my brain) is not able to convert the variable width lines into equivalent fill shapes. I am sure the process is out there somewhere, but not yet in the script.

Instead my script averages the line widths over the course of the path, such that it has a uniform width. i.e. It is the equivalent of setting the line width to be uniform before you export.
Moho 14.1 » Win 11 Pro 64GB » NVIDIA GTX 1080ti 11GB
Moho 14.1 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam


Sam
User avatar
DK
Posts: 2854
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Re: Export to SVG problem

Post by DK »

Wow. That would be a handy Moho tool indeed SS :shock: !!!
Cheers
D.K
Post Reply