Skip to content

Commit

Permalink
tune z offset + fix in logging bug when no 3D model available
Browse files Browse the repository at this point in the history
  • Loading branch information
uPesy committed Jun 25, 2022
1 parent 885a8ce commit 6325431
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
17 changes: 9 additions & 8 deletions easyeda2kicad/__main__.py
Expand Up @@ -332,14 +332,15 @@ def main(argv: List[str] = sys.argv[1:]) -> int:
).output
)
exporter.export(lib_path=arguments["output"])
filename = f"{exporter.output.name}.wrl"
lib_path = f"{arguments['output']}.3dshapes"

logging.info(
f"Created 3D model for ID: {component_id}\n"
f" 3D model name: {exporter.output.name}\n"
f" 3D model path: {os.path.join(lib_path, filename)}"
)
if exporter.output:
filename = f"{exporter.output.name}.wrl"
lib_path = f"{arguments['output']}.3dshapes"

logging.info(
f"Created 3D model for ID: {component_id}\n"
f" 3D model name: {exporter.output.name}\n"
f" 3D model path: {os.path.join(lib_path, filename)}"
)

# logging.info(f"3D model: {os.path.join(lib_path, filename)}")

Expand Down
4 changes: 2 additions & 2 deletions easyeda2kicad/kicad/export_kicad_footprint.py
Expand Up @@ -198,8 +198,8 @@ def generate_kicad_footprint(self) -> None:
if self.input.model_3d is not None:
self.input.model_3d.convert_to_mm()

if self.input.model_3d.translation.z != 0:
self.input.model_3d.translation.z -= 1
# if self.input.model_3d.translation.z != 0:
# self.input.model_3d.translation.z -= 1
print(self.input.bbox)
ki_3d_model_info = Ki3dModel(
name=self.input.model_3d.name,
Expand Down

0 comments on commit 6325431

Please sign in to comment.