Using Assembly 4 with a Kicad board.

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
leoheck
Veteran
Posts: 1222
Joined: Tue Mar 13, 2018 5:56 pm
Location: Coffee shop

Using Assembly 4 with a Kicad board.

Post by leoheck »

There is nothing I do that places an LCS in a hole of the board. I can do that manually placing the LCS but this is far from optimal.
I tried to use a Hole Axis instead, but I cannot place the LCS there and I cannot use the Hole Axis while placing the Part.

Any idea what I can try to solve this?
User avatar
ppemawm
Veteran
Posts: 1240
Joined: Fri May 17, 2013 3:54 pm
Location: New York NY USA

Re: Using Assembly 4 with a Kicad board.

Post by ppemawm »

leoheck wrote: Mon Aug 29, 2022 11:08 pm Any idea what I can try to solve this?
No file or picture or information: no help.
"It is a poor workman who blames his tools..." ;)
leoheck
Veteran
Posts: 1222
Joined: Tue Mar 13, 2018 5:56 pm
Location: Coffee shop

Re: Using Assembly 4 with a Kicad board.

Post by leoheck »

Sorry, where can I go to talk with real human beings?

It looks like this forum is just full of trolls.

Maybe I have to go back to Reddit or Facebook, or even Instagram. They talk more on Instagram these days than on this forum.

It looks like there is no one that can handle a conversation like a real human being in this stupid forum. Serioslly. WTF!
chrisb
Veteran
Posts: 53920
Joined: Tue Mar 17, 2015 9:14 am

Re: Using Assembly 4 with a Kicad board.

Post by chrisb »

This is not the only topic of leoheck which went out of whack. I have banned him for a week.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
easyw-fc
Veteran
Posts: 3629
Joined: Thu Jul 09, 2015 9:34 am

Re: Using Assembly 4 with a Kicad board.

Post by easyw-fc »

leoheck wrote: Mon Aug 29, 2022 11:08 pm There is nothing I do that places an LCS in a hole of the board. I can do that manually placing the LCS but this is far from optimal.
I tried to use a Hole Axis instead, but I cannot place the LCS there and I cannot use the Hole Axis while placing the Part.

Any idea what I can try to solve this?
it could be easily solved... w/ kicadStepUp ... but we would need a Forum user with patience and attitude ;)
User avatar
easyw-fc
Veteran
Posts: 3629
Joined: Thu Jul 09, 2015 9:34 am

Re: Using Assembly 4 with a Kicad board.

Post by easyw-fc »

Assembly 4 would need a LCS on first level of a Part container...
kicadStepUp was placing a LCS in a second level of a Part container (main Part container is the Project name holder, inside there are the PCB container and the Top and Bottom STEP files containers)
The fix could be manually done simply dragging the LCS upper of a level.

But I wanted to do this automatically with the WB code...
I have just moved the LCS from the PCB container to the Project main container with latest commit...
From now on Assembly 4 will be able to see the kSU board LCS and use it as a reference for aligning objects in Asm4.

Note:
if you place a KiCAD 'Grid origin' or 'Aux Origin' in your PCB and set kSU accordingly, your FC loaded board will have the LCS aligned to the 'Grid Origin' or 'Aux Origin' ...
i.e. if your Origin is aligned to a center of a PCB hole, your FC counterpart board will have the LCS exactly placed to the PCB hole
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Using Assembly 4 with a Kicad board.

Post by Zolko »

easyw-fc wrote: Tue Aug 30, 2022 1:00 pm The fix could be manually done simply dragging the LCS upper of a level.
you'd probably get the dreaded "Links go out of the allowed scope". The proper fix is to "Import" the LCS, which will create a new LCS at the root of the Part, superimposed on the LCS down somewhere in the hierarchy. Another fix would be to delete the unnecessary level of container

I have just moved the LCS from the PCB container to the Project main container with latest commit...
From now on Assembly 4 will be able to see the kSU board LCS and use it as a reference for aligning objects in Asm4.
Nice. But are you sure you *really* need that extra "Project main container" ?
try the Assembly4 workbench for FreCAD — tutorials here and here
chrisb
Veteran
Posts: 53920
Joined: Tue Mar 17, 2015 9:14 am

Re: Using Assembly 4 with a Kicad board.

Post by chrisb »

Moved from Help forum.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
easyw-fc
Veteran
Posts: 3629
Joined: Thu Jul 09, 2015 9:34 am

Re: Using Assembly 4 with a Kicad board.

Post by easyw-fc »

Zolko wrote: Wed Aug 31, 2022 8:50 am
I have just moved the LCS from the PCB container to the Project main container with latest commit...
From now on Assembly 4 will be able to see the kSU board LCS and use it as a reference for aligning objects in Asm4.
Nice. But are you sure you *really* need that extra "Project main container" ?
This is the way kicadStepUp is importing (building in FC) a kicad file: a project file which is containing a PCB, a Sketch and Top and Bottom STEP models...
Thus the project is a container for all the board elements.
Before the changes, LCS was inside the Board_Geoms Part container, and then it was not select-able by Asm4...
kSU-project.png
kSU-project.png (182.48 KiB) Viewed 1154 times
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Using Assembly 4 with a Kicad board.

Post by Zolko »

easyw-fc wrote: Wed Aug 31, 2022 1:22 pm Before the changes, LCS was inside the Board_Geoms Part container, and then it was not select-able by Asm4...
OK, I understand. If you want to get rid of the annoying overlays that say that the LCS is not attached, you can attach the LCS to the Origin:

Code: Select all

# add an LCS at the root of the Part, and attach it to the 'Origin'
lcs0 = newPart.newObject('PartDesign::CoordinateSystem','LCS_0')
lcs0.Support = [(newPart.Origin.OriginFeatures[0],'')]
lcs0.MapMode = 'ObjectXY'
lcs0.MapReversed = False
(you must adjust "newPart" of course)
try the Assembly4 workbench for FreCAD — tutorials here and here
Post Reply