JLC2KiCad_lib icon indicating copy to clipboard operation
JLC2KiCad_lib copied to clipboard

Issue with STEP and rotation / translation

Open adri1mart1 opened this issue 1 year ago • 5 comments

https://github.com/TousstNicolas/JLC2KiCad_lib/blob/d688d5c0e4c4059dc204179ebe1b3e6c71f05da8/JLC2KiCadLib/footprint/footprint_handlers.py#L358

Hello,

I have notice a misconversion with some components but let's focus on a single one first --> C347186

Using the command:

JLC2KiCadLib C347186 -dir My_lib -symbol_lib My_Symbol_lib -footprint_lib My_FootPrint_lib -model_base_variable JLCPCB_3D_MODEL

Results in a successful conversion to a kicad_mod but the component is not in the correct orientation. See image below where you need to apply manually a rotation of 180° to have the component in the correct way.

image

After enabling some debug, I found out that the issue may come from here (footprint_handlers.py l.345):

def h_SVGNODE(data, kicad_mod, footprint_info):
    [...]

    if "STEP" in footprint_info.models:
        get_StepModel(
            component_uuid=data["attrs"]["uuid"],
            footprint_info=footprint_info,
            kicad_mod=kicad_mod,
        )

By default, the model is STEP so the get_StepModel() function is called. The rotation and translation info is not passed as argument as the difference between the WRL mode for example.

Is there any reason why or it is simply not implemented yet ?

adri1mart1 avatar Dec 12 '23 10:12 adri1mart1