Render SVG from Draw.io
Hi, I'm trying to display some SVG from Draw.io, but I got some strange results.
I want to use manim for development and programming videos :smile:
The code :
class Uml(SVGMobject):
CONFIG = {
"file_name": "/home/necros/Downloads/FormObjects-Models.svg",
"unpack_groups": False
}
class UmlRender(Scene):
def construct(self):
uml = Uml()
uml.scale(5)
self.play(DrawBorderThenFill(uml), run_time=5)
self.wait(5)
Expected result :

Actual result :

Exemple file : https://filebin.net/vhs2w1zlwbqeadhv/FormObjects-Models__1_.svg?t=byk639bd
In hope you have any idea to help me.
Regards
I try to download your file from https://srv-file2.gofile.io/download/ANL8aV/FormObjects-Models.svg
but it said You are not authorized to download this file.
Oh, I change the provider : https://filebin.net/vhs2w1zlwbqeadhv/FormObjects-Models__1_.svg?t=byk639bd
The best result I can get:
class Uml(SVGMobject):
CONFIG = {
"file_name": "/home/necros/Downloads/FormObjects-Models.svg",
"fill_opacity":0,
"stroke_color": WHITE,
"stroke_width": 1,
}

I think there are multiple reasons caused this problem.
- Because manim uses a simple(handmade) svg parser. to translate svg into SVGMobject. Manim can't recognize the color and other settings of a svg.(It's not a bad thing)
- Because manim can't get those settings, so manim don't know where to stroke, where to fill.
I think this problem can't be solved very quickly,
you can create those Graphics by using Mobject
like Rectangle(), TextMobject(), Arrow(), line()
Did you find a solution? I am getting a similar issue. I am using the cicuitikz package to draw some circuits in Latex and then animate using manim. The SVG file created is correct and all components are shows correctly. But manim ommits some lines from the figure. I think its some issue with the parser.
No sorry, I gave up this issue and tried to animate the block myself.
Each arrows are just a simple Arrow(block1, block2)
The solution I found is to import into Adobe Illustrator, select all, and then go to Edit -> Compound Path -> Release
Sometimes Edit -> Compound Path -> Make also works