The disadvantage for later manipulations/animations is the huge amount of submobjects created in the SVG by KiCAD, especially for the text...
A dark theme in KiCAD allows for an easy dark import into Manim as well
| from manim import * | |
| class kicadSVGImport(Scene): | |
| def construct(self): | |
| self.camera.background_color=WHITE | |
| self.add(NumberPlane()) | |
| svg = SVGMobject("bilder/20260617_manim_test.svg").scale_to_fit_height(6) | |
| svg.set_stroke(width=2) | |
| self.add(svg) | |
| config.frame_rate=1 | |
| config.pixel_width=800 | |
| config.pixel_height=450 | |
| class kicadSVGImport2(Scene): | |
| def construct(self): | |
| self.camera.background_color=WHITE | |
| self.add(NumberPlane()) | |
| svg = SVGMobject("bilder/20260617_manim_test.svg").scale_to_fit_height(6) | |
| svg.set_stroke(width=2) | |
| self.add(svg) | |
| self.wait() | |
| for i in range(int(len(svg)/36)): | |
| lbls = VGroup() | |
| for j in range(i*36, min((i+1)*36,len(svg))): | |
| lbl = Text(f"{j}", font_size=35,color=BLACK) | |
| lbl.move_to([6*np.sin(j*10*DEGREES),3.5*np.cos(j*10*DEGREES),0]) | |
| lbl.add(Line(svg[j],lbl,stroke_width=1,stroke_color=PURE_RED)) | |
| lbls += lbl | |
| self.add(lbls) | |
| self.wait(2) | |
| self.remove(lbls) | |