Skip to content

Commit

Permalink
[3D models][Download][Fixed] Name of the other model
Browse files Browse the repository at this point in the history
Whe using a suffix

See #567
  • Loading branch information
set-soft committed Jan 22, 2024
1 parent 8c35fe6 commit bac3c8c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions kibot/out_base_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,14 @@ def try_download_kicad(self, model, full_name, downloaded, rel_dirs, force_wrl):
# Successfully downloaded
downloaded.add(full_name)
# If this is a .wrl also download the .step
if url.endswith('.wrl'):
url = url[:-4]+'.step'
fname = fname[:-4]+'.step'
self.download_model(url, fname, rel_dirs)
extra_fname = None
if fname.endswith('.wrl'):
extra_fname = fname[:-4]+'.step'
elif force_wrl: # This should be a .step, so we download the wrl
url = os.path.splitext(url)[0]+'.wrl'
fname = os.path.splitext(fname)[0]+'.wrl'
self.download_model(url, fname, rel_dirs)
extra_fname = os.path.splitext(fname)[0]+'.wrl'
if extra_fname is not None:
url = self.kicad_3d_url+urllib.parse.quote_plus(extra_fname)+self.kicad_3d_url_suffix
self.download_model(url, extra_fname, rel_dirs)
return replace

def try_download_easyeda(self, model, full_name, downloaded, sch_comp, lcsc_field):
Expand Down

0 comments on commit bac3c8c

Please sign in to comment.