From 10b98505171ca82fe0c33f361c8ffb22f7a7dd47 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Mon, 15 Jan 2024 10:39:27 -0300 Subject: [PATCH] [Colored resistors][Fixed] Problems when no cache is there Fixes #553 --- CHANGELOG.md | 2 ++ kibot/out_base_3d.py | 1 + 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5cedca1..0399f63b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 the same footprint but different orientation in the reel. - 3D outputs: - `download_lcsc` option to disable LCSC 3D model download (See #415) + - Problems when creating a colored resistor, but we didn't have a cache yet + (i.e. no model downloaded) #553 - BoM: - Support for ${field} expansion. (#471) - LCSC links (SchrodingersGat/KiBoM#190) diff --git a/kibot/out_base_3d.py b/kibot/out_base_3d.py index 33802465..152ef7d7 100644 --- a/kibot/out_base_3d.py +++ b/kibot/out_base_3d.py @@ -309,6 +309,7 @@ class Base3DOptions(VariantOptions): prev_ln = None points = None axis = None + os.makedirs(os.path.dirname(name), exist_ok=True) with open(name, "wt") as d: colors_defined = False for ln in f: