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

[HOW] Using symbol field for specify component rotation #510

Closed
radiolyc opened this issue Oct 22, 2023 · 7 comments
Closed

[HOW] Using symbol field for specify component rotation #510

radiolyc opened this issue Oct 22, 2023 · 7 comments
Assignees
Labels
enhancement New feature or request question This is just a question, not a problem

Comments

@radiolyc
Copy link

Intro

Hi! I tried to use filter for pre-rotation of components and it works.

Issue

But the problem is different components can have different rotation even if the footprint (package) is the same.

Question

So, Is it possible to use symbol field to specify rotation correction angle for specific component?

Example

This mechanism is used in Fabrication Toolkit extension: https://github.com/bennymeg/JLC-Plugin-for-KiCad#-offset-component-rotation
image

@radiolyc radiolyc added the question This is just a question, not a problem label Oct 22, 2023
@set-soft
Copy link
Member

set-soft commented Nov 8, 2023

Hi @radiolyc !

I'm trying to implement the Fabrication Toolkit mechanism, but during the validation process I found that KiBot is apllying wrong rotations on the bottom side components. I guess most people only uses the top side for components, and the bottom side is used only in extreme cases, usually not for cheap boards manufactured on JLCPCB. But I want to make it work. I also noticed that recent versions of Fabrication Toolkit just disabled the rotations based on the footprint! The tool seems to currently rely on rotations manually specified by the user. I guess this is something to do with the complexity found to match the bottom side rotations. I think this must be some subtle detail, but in my first tries the correction for the bottom side wasn't consistent ...

@set-soft set-soft added the enhancement New feature or request label Nov 8, 2023
@radiolyc
Copy link
Author

@set-soft thanks for answer.

Yeah, now mostly I'm using it only for top side component boards, but double side boards should be also useful.

Also Fabrication Tool has position offset correction field, which is also super useful, because many KiCad footprints have just different from EasyEDA center and offset corrections (rotation and shifting) give a chance to get correct parts placement after uploading manufacturing files.

@set-soft
Copy link
Member

Hi @radiolyc !
I think I found what's going on with the bottom layer, KiCad is mirroring the components, while JLCPCB isn't. I hope to have a fix for KiBot today or tomorrow.

About the position feature: Looking at the plugin you mention it applies a rotation to the offset using the original KiCad angle. This is strange to me. Do you have a small example where this adjust is needed? So I can verify the result is correct.

A small example with a couple of components will be enough, just the schematic with the components, no need for connections, and the PCB with the footprints and board edge. The example should include the fields in question with at least one rotation and one offset. This will help to verify the implementation.

set-soft added a commit that referenced this issue Nov 14, 2023
- Fixed the JLCPCB template to apply correct rotations to the bottom
  components
- Added options to specify rotations and offsets using fields
- Added an option to mirror the bottom rotation angles
- Needs verifications for the offset stuff

Related to #510
@set-soft
Copy link
Member

Hi @radiolyc !
The current dev branch should implement it. I just need to verify it works as expected

@radiolyc
Copy link
Author

radiolyc commented Nov 16, 2023

@set-soft Here is small example of Fabrication Tool usage, so project file can be used for verifying of the improvement.
Position file (on the left - generated from KiCad directly; on the right - generated by Fabrication Tool extension):
2
Project (fabrication files uploaded to JLCPCB):
1
fabrication_tool_test_prohect.zip

@set-soft
Copy link
Member

Hi @radiolyc !

Ok, now you'll get the same results using KiBot. Looking at your example I found the offsets uses the opposite sign.
Note that you could get different results for bottom components, but this is because the Fabrication Toolkit is applying the bottom rotations wrongly. JLCPCB changed at least three times the way bottom rotation must be applied.

@set-soft
Copy link
Member

I'm closing this issue because is now implemented. Any errors in the implementation should be opened as a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question This is just a question, not a problem
Projects
None yet
Development

No branches or pull requests

2 participants