KicadStepUp Workbench/pl

Wprowadzenie
Środowisko pracy KicadStepUp ma na celu pomóc zarówno użytkownikom KiCad, jak i FreeCAD we współpracy przy projektowaniu elektrycznym (ECAD) i mechanicznym (MCAD).

Kontekst
KiCad (strona domowa) to otwarty pakiet do automatyzacji projektowania elektroniki. Umożliwia użytkownikowi zaprojektowanie schematu elektronicznego, a następnie jedno - lub wielowarstwowej płytki drukowanej (PCB) przy użyciu obszernej biblioteki części. Wspaniałą rzeczą jest to, że używanie FreeCAD z środowiskiem KicadStepUp jest oficjalnym sposobem KiCad na tworzenie części 3D dla komponentów elektronicznych dla KiCad. Biblioteki są hostowane w serwisie GitHub, więc każdy może tworzyć i sprawdzać części.

Filozofia GUI KiCad jest nieco inna niż FreeCAD, zwłaszcza jeśli chodzi o tworzenie elementów i przenoszenie ich. Jednak ponieważ KiCad jest używany w produkcji od lat, istnieje doskonała dokumentacja, np. bardzo dobry dokument "Pierwsze kroki". Dodatkowo, każde narzędzie posiada własną instrukcję.

Jeśli ktoś nie zna jeszcze programu KiCad, zaleca się wykonanie samodzielnej płytki PCB zgodnie z instrukcją Wprowadzenie do obsługi, aby zrozumieć związane z nią koncepcje. Chociaż niektóre tematy, takie jak dodawanie nowych schematów i footprintów do lokalnej biblioteki, wydają się mało interesujące dla początkujących, w praktyce są one często napotykane szybko po rozpoczęciu poważnego projektu.

Dla wszystkich tych koncepcji KiCad, można znaleźć jakąś funkcję w środowisku roboczym KicadStepUp. Znajomość tych pojęć znacznie ułatwia zrozumienie, jak korzystać z tego środowiska pracy.

Funkcjonalność

 * Wczytaj płytkę i części programu KiCad do FreeCAD i wyeksportuj je do STEP (lub IGES) w celu pełnej współpracy ECAD MCAD.
 * Załaduj footprint programu KiCad do FreeCAD, aby łatwo i precyzyjnie dopasować model mechaniczny do footprintu KiCad.
 * Konwersja modelu STEP 3D części, płytki, obudowy do VRML z właściwościami materiałów dla najlepszego wykorzystania w KiCad.
 * Sprawdzanie wzajemnych zależności i kolizji przy projektowaniu obudów i footprintów.
 * Zaprojektuj nową krawędź PCB za pomocą Szkicownika FreeCAD i WSTAW ją do istniejącej płytki PCB KiCad.
 * WYCIĄGNIJ krawędź PCB z płytki PCB KiCad, edytuj ją w szkicowniku FreeCAD i WSTAW z powrotem do KiCad.
 * Zaprojektuj nowy footprint w FreeCAD, aby uzyskać moc szkicowania footprintów.
 * Generowanie plików VRML kompatybilnych z Blenderem.



Instalacja
KicadStepUp jest częścią zewnętrznych środowisk pracy i może być automatycznie zainstalowany za pomocą Menedżera dodatków, który jest dołączony do FreeCAD 0.17 i nowszych wersji, w menu.

General Approach
The basic idea of KicadStepUp is to synchronize data between the two applications. For home use you might have FreeCAD and KiCad running at the same time. Professional users can work on the same files (e.g. on a central server) and have specialists on mechanical CAD (MCAD) working in FreeCAD and electronics experts on electrical CAD (ECAD).

KicadStepUp will convert standard FreeCAD files to KiCad files and vice versa. That way each application can work with its native data files. Projects can be used without the other application or KicadStepUp installed. That is also the reason that no plugin on the KiCad side is required.

It's important to note that the differences between the two programs impose some difficulties for a full data exchange. One example is that the Sketcher used in KiCad to define the board outline is very limited compared to the Sketcher Workbench of FreeCAD. So in order to synchronize back and forth, the sketch content cannot be more complex than the KiCad Sketcher can handle. From a FreeCAD point of view, that means you may want to avoid using some of the FreeCAD sketch features. KicadStepUp offers workarounds that might be more difficult to understand if you do not have this background.

Basic Workflow
A collaboration can be started with a new or an existing project. We consider here a new project to keep things simple:


 * 1) Create a new KiCad Project anywhere you like. Lets name it "KsuTest"
 * 2) Open the PCB Editor and create on the layer "Edit.Cuts" a closed outline. Shape does not matter, we will overwrite it anyway.
 * 3) Create a new FreeCAD file for the PCB, the name does not matter. *
 * 4) Create a sketch with an outline of the desired PCB. Lets name it "pcb design" (but could be any other name) and put at least one circle into it for a hole.
 * you may use any FreeCAD features to include holes, cutouts, and outer shape to other components you might have. We assume here you would use Sketcher features as Dimensioning, Constraints and Work geometry in your sketch.
 * If you are using PartDesign Workbench for creating the sketch there is no need to create a PartDesign body, since we are not going to pad this sketch.
 * 1) Switch to the KicadStepUp Workbech
 * 2) Select the "pcb design" sketch
 * 3) Select the Toolbar button "Push Sketch to PCB Edge" or the menu ksu PushPull/ksu Push Sketch to PCB
 * 4) * first a dialog will open with defaults "Edge.Cuts" for layer and "0.16" for line width. Keep those defaults.
 * 5) * next a file dialog will open. Click to your KiCad "KsuTest" project, where you should see a file "KsuTest.kucad_pcb". That is the PCB file with the temporary outline we created before. Select it and confirm to replace the old file. Now a dialog should say "new Edge pushed to kicad board!"
 * if you forgot the 2nd step, the push operation might fail as a pcb file must exist and it must not be empty.
 * 1) Close and re-open the PCB Editor in KiCad. **
 * The shape from the FreeCAD sketch should appear.
 * 1) Go over the circle with the mouse and press m on the keyboard to move the circle. Click to place it in another position. Press the "Save" toolbar button on the top left.
 * 2) Switch to FreeCAD and select in the KicadStepUp Workbech the tool button "Pull Sketch from PCB" or the menu ksu PushPull/ksu Pull Sketch from PCB
 * 3) * first dialog with default layer "Edge.Cuts" and three choices will open. Select choice "replace PCB and Sketch in current document" ***
 * 4) * next a file dialog should show again the file "KsuTest.kucad_pcb". Select it and press Open
 * You should see your PCB as a 3D model. Note that the hole has moved compared to your "pcb design" sketch.
 * In the tree appears a new structure with a yellow Part Container with the KiCad Filename and within another Part Container with "Board_Geoms_e63b" (the part with the number probably different). In the second container there are the following three files. Do not change any names in that structure, because KicadStepUp uses them to find the parts to update.
 * Do not forget to save your file

Local_CS_e63b     the PCB origin. same as the origin in "pcb design" sketch Pcb_e63b          3D object with the PCB. Don't edit, it will be overwritten by KicadStepUp PCB_Sketch_e63b   sketch with all parts of "pcb design" sketch that KiCad recognized. all others were deleted. Also note that if you change this sketch and recalculate, the 3D object will not change.

Try to make another PushPull round trip: adjust your "pcb design" sketch to the changes from KiCad, add some other change and start again. Do that a few times to appreciate how quickly and naturally this procedure becomes in a very short time.

Now you can use the new 3D PCB file to align 3D components as connectors, buttons, switches, fasteners, etc., or add it to your assembly if you have a larger project.

This only shows the very basic way KicadStepUp works. You are still missing a lot at this point, e.g., footprints and 3D parts, but from here it's a lot easier to start exploring KicadStepUp on your own. Use the documentation PDF file in the menu ksu Tools/Demo


 * ''Notes:
 * As long as the name of the created structure (and its parts) is unchanged, any workflow interactions will just update the structure. If you change any names, a new structure will be created each time.
 * It is not required to have KiCad running to update KiCad project files. Actually, KiCad does not even have to be installed on the PC.
 * The standard approach is to use the same sketch on both sides, KiCad and Freecad. Any changes will be synchronized to the other application. This is the most natural and clean way to work with KicadStepUp . However, this causes a problem if you want to use any of the following features in your sketch to define your PCB shape: dimensions, geometry constraints, construction geometry (blue lines), or external linked geometry. There is no clean way to do this, because KiCad does not know any of those features. That means that on the round trip between the applications, any of those features will be deleted. There is no real solution for that problem, just a selection of one of several workarounds. So if you want to use any of those features, that means you must define the PCB shape in FreeCAD only and sync in one direction toward KiCad. Any outline changes done in KiCad need to be added manually on the FreeCAD side. This might make sense, e.g. if future changes from the mechanical side are much more likely than from the electrical side. There several ways to do it:
 * Put the design sketch inside the KicadStepUp structure, and select "replace PCB and keep Sketch in curr. doc" every time you import back from Kicad.
 * Keep the design sketch outside the KicadStepUp structure. Ignore the sketch imported from KiCad.
 * The second choice has the advantage that changes in KiCad can be traced to the original sketch, and the FreeCAD sketch is protected against an accidentally wrong import choice. The described workflow uses this approach to make sure the issue is well understood. From there it's easy to switch to modifying the KicadStepUp supplied sketch with none of the more advanced FreeCAD features.
 * To use KicadStepUp with a FreeCAD assembly (> V0.19) you could add a new file for the PCB. After the workflow above has been run once add the 3D object for the PCB to your assembly like any other mechanical part. Make sure you save the file when it was updated by KicadStepUp (Important: KicadStepUp writes to FreeCAD memory, not to FreeCAD files).

''

Please see the KicadStepUp Cheat Sheet for the other features.

Side Note about External workbenches
FreeCAD workbenches are easy to program in Python, there are therefore many people developing additional workbenches outside of the FreeCAD main developers.

The external workbenches page has some information and tutorials on some of them, and the FreeCAD Addons project aims at gathering them and making them easily installable from within FreeCAD.

New workbenches are in development, stay tuned!