Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when dielectric layer is locked #66

Closed
duddie opened this issue Jun 26, 2024 · 2 comments
Closed

Exception when dielectric layer is locked #66

duddie opened this issue Jun 26, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@duddie
Copy link

duddie commented Jun 26, 2024

The exception happens when dielectric layer is locked:

Traceback (most recent call last):

File "/Users/duddie/Documents/KiCad/8.0/3rdparty/plugins/com_github_30350n_pcb2blender/__init__.py", line 24, in Run
export_pcb3d(dialog.file_picker.GetPath(), boarddefs)

File "/Users/duddie/Documents/KiCad/8.0/3rdparty/plugins/com_github_30350n_pcb2blender/export.py", line 108, in export_pcb3d
file.writestr(f"{LAYERS}/{LAYERS_STACKUP}", get_stackup(board).pack())

File "/Users/duddie/Documents/KiCad/8.0/3rdparty/plugins/com_github_30350n_pcb2blender/export.py", line 225, in get_stackup
stackup.thickness_mm = sum(float(match.group(1)) for match in matches)

File "/Users/duddie/Documents/KiCad/8.0/3rdparty/plugins/com_github_30350n_pcb2blender/export.py", line 225, in <genexpr>
stackup.thickness_mm = sum(float(match.group(1)) for match in matches)

ValueError: could not convert string to float: '1.51 locked'

Screenshot 2024-06-26 at 10 32 32

This is caused by enabling dielectric lock in Board Setup:
Screenshot 2024-06-26 at 10 31 44

By clicking the check box in the PADLOCK column.

And this adds in the .kicad_pcb the 'locked' in the thickness board.

(layer "dielectric 1"
				(type "core")
				(color "#202020FF")
				(thickness 1.51 locked)
				(material "FR4")
				(epsilon_r 4.5)
				(loss_tangent 0.02)
			)

Unlocking dielectric makes the plugin works perfect.

@30350n 30350n self-assigned this Jun 26, 2024
@30350n 30350n added the bug Something isn't working label Jun 26, 2024
@30350n
Copy link
Owner

30350n commented Jun 26, 2024

Thanks a lot for the detailed report, this should be fixed in the next release.

@duddie
Copy link
Author

duddie commented Jun 28, 2024

Thanks a lot. Your tool is fantastic! have a nice day!

@30350n 30350n closed this as completed Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants