Skip to content

Commit

Permalink
[Schematic v6][Fixed] Issues saving deep nested sheets
Browse files Browse the repository at this point in the history
- When using sub-dirs relative to a sheet in a sub-dir
  • Loading branch information
set-soft committed Jan 26, 2024
1 parent de1fc05 commit e47124e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- When *check_zone_fills* is enabled now we do a refill for the boards

### Fixed
- Schematics: problems with deep nested and recycled sheets (#520)
- Schematics:
- Problems with deep nested and recycled sheets (#520)
- Problems saving deep nested sheets
- Rotated polygons and text used in the worksheet (#466)
- The --log/-L didn't enabled full debug for all messages
- BoM:
Expand Down
5 changes: 4 additions & 1 deletion kibot/kicad/v6_sch.py
Original file line number Diff line number Diff line change
Expand Up @@ -2031,7 +2031,7 @@ def save(self, fname=None, dest_dir=None, base_sheet=None, saved=None, cross=Fal
saved.add(fname)
for sch in self.sheets:
if sch.sch:
sch.sch.save(sch.flat_file if exp_hierarchy else sch.file, dest_dir, base_sheet, saved, cross=cross,
sch.sch.save(sch.flat_file if exp_hierarchy else sch.sch.fname_rel, dest_dir, base_sheet, saved, cross=cross,
exp_hierarchy=exp_hierarchy)

def save_variant(self, dest_dir):
Expand Down Expand Up @@ -2156,6 +2156,7 @@ def load(self, fname, project, parent=None): # noqa: C901
self.all_sheets = []
self.root_sheet = self
UUID_Validator.reset()
self.root_file_path = os.path.dirname(os.path.abspath(fname))
else:
self.fields = parent.fields
self.fields_lc = parent.fields_lc
Expand All @@ -2165,9 +2166,11 @@ def load(self, fname, project, parent=None): # noqa: C901
self.sheet_names = parent.sheet_names
self.all_sheets = parent.all_sheets
self.root_sheet = parent.root_sheet
self.root_file_path = parent.root_file_path
self.symbol_instances = []
self.parent = parent
self.fname = fname
self.fname_rel = os.path.relpath(fname, self.root_file_path)
self.project = project
self.lib_symbols = []
self.symbols = []
Expand Down
2 changes: 2 additions & 0 deletions kibot/out_kicanvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ def save_sch(self, out_dir):
self.restore_title(sch=True)

def run(self, out_dir):
for f in self._get_targets(out_dir):
logger.error(f)
# Download KiCanvas
if self.local_script:
logger.debug(f'Downloading the script from `{self.url_script}`')
Expand Down

0 comments on commit e47124e

Please sign in to comment.