Git Product home page Git Product logo

kicadstepupmod's Introduction

kicadStepUp-WB

icon

made-with-python

FreeCAD Addokn manager status

KiCad StepUp tools are a FreeCAD Macro and a FreeCAD WorkBench to help in Mechanical Collaboration between KiCad EDA and FreeCAD or a Mechanical CAD.

KiCad StepUp features:

  • load kicad board and parts in FreeCAD and export it to STEP (or IGES) for a full ECAD MCAD collaboration
  • load kicad_mod footprint in FreeCAD to easy and precisely align the mechanical model to kicad footprint
  • convert the STEP 3D model of parts, board, enclosure to VRML with Materials properties for the best use in kicad
  • check interference and collisions for enclosure and footprint design
  • design a new pcb Edge with FreeCAD Sketcher and PUSH it to an existing kicad_pcb Board
  • PULL a pcb Edge from a kicad_pcb Board, edit it in FC Sketcher and PUSH it back to kicad
  • design a new footprint in FreeCAD to get the power of Sketch in footprints
  • generate Blender compatible VRML files
  • translation infrastructure enabled

Please see KiCad Info forum or FreeCAD forum to discuss or report issues regarding this Addon.

screenshot

Installing

Download and install your corresponding version of FreeCAD from wiki Download page and either install

  • automatically using the FreeCAD Add-on Manager (bundled in to FreeCAD under Tools Menu)
  • manually by copying the kicadStepUpMod folder to the Mod sub-directory of the FreeCAD application.

StepUp Cheat sheet

kicad StepUp Cheat sheet

Requirements

  • FreeCAD 0.18, 0.19, 0.20, 0.21, 0.22

  • KiCAD 5.1, 6.x, 7.x, 8.x (push-pull- 3D models position not implemented ATM)

  • KiCAD nigthly (partially supported)

Known issues

  • on Linux FreeCAD Snap and Flatpak you may need to use 'mount bind' to have access to KiCad 3D models path

License

GNU AFFERO GENERAL PUBLIC LICENSE

kicadstepupmod's People

Contributors

chennes avatar easyw avatar edgarjrobles avatar hasecilu avatar jeremyherbert avatar jkriege2 avatar kuzma30 avatar leoheck avatar luzpaz avatar mitjanemec avatar scottbez1 avatar stefanhamminga avatar xobs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kicadstepupmod's Issues

ksu tools Add Tracks error on zone with layers

I'm using latest version of kicadStepUpMod (from today master) with FreeCAD 0.17 rev 13522 (Git)
I'm using KiCad (5.1.0)-1, release build (but I suspect it is the same with previous version of KiCad as I doubt this parameter has changed)

I have the following error with my kicad_pcb:

Running the Python command 'ksuToolsAddTracks' failed:
Traceback (most recent call last):
  File "C:\Users\Ben\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod\kicadStepUpCMD.py", line 2454, in Activated
    def GetResources(self):
  File "C:\Users\Ben\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod\tracks.py", line 163, in addtracks
    pcb.makeCopper(holes=True, minSize=minSizeDrill)
  File "C:\Users\Ben\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod\kicad.py", line 1338, in makeCopper
    thickness=thickness)
  File "C:\Users\Ben\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod\kicad.py", line 1227, in makeZones
    if z.layer != self.layer:
  File "C:\Users\Ben\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod\kicadStepUptools.py", line 825, in __getattr__
    del self._value[key]

7314: key "layer" not found

In my kicad_pcb file at line 7314 I have the line

  (zone (net 0) (net_name "") (layers Top In1.Cu In2.Cu Bottom) (tstamp 0) (hatch edge 0.508)

So yes the keyword layer does not exist as it is replaced by layers because there is multiple layers involved in this area (which is keepout zone)

It seems this is a similar issue as seen in issue:

Cannot import tracks from zone with kicad_pcb having "(layers *.Cu)" #6

Could you fix that by adding management of layers keyword followed by multiple layers or/and *.Cu ?

Export footprint

I'm trying to make footprint of WE-TPC-4828 and I'm guiding from your video https://youtu.be/5IcAyfhaf2g .
Have made previously step file with the recommended land pattern.

When try to export gives following error:

Running the Python command 'ksuToolsFootprintGen' failed:
Traceback (most recent call last):
File "/home/xathar/.FreeCAD/Mod/kicadStepUpMod/kicadStepUpCMD.py", line 1920, in Activated
kicadStepUptools.PushFootprint()
File "/home/xathar/.FreeCAD/Mod/kicadStepUpMod/kicadStepUptools.py", line 16430, in PushFootprint
export_footprint(name)
File "/home/xathar/.FreeCAD/Mod/kicadStepUpMod/kicadStepUptools.py", line 17029, in export_footprint
drl_found=collect_drl(pth_ordered)
File "/home/xathar/.FreeCAD/Mod/kicadStepUpMod/kicadStepUptools.py", line 17673, in collect_drl
px=(p[0][10].x+p[2][11].x)/2;py=(p[0][11].y+p[2][11].y)/2;

What I'm doing wrong?

Provide option to disable the sidebar popup

This panel pops up every time I open a board and when I do other operations , sometimes whenever the workbench is loaded.

image

most of the tools are repeated in the other toolbars and the manipulation tools are only really useful when working with STEP models for footprints. It takes a lot of space on the screen and I would like for it to stay closed until I need it. Would it be possible to add an option to do that?

Importing kicad_mod fails in freecad 0.19.16442 (Git)

FreeCAD verison info:

OS: Arch Linux (i3/i3)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16442 (Git)
Build type: Release
Branch: master
Hash: 2935cbb71aa68f257c1d3f70b030e5beb8461b3d
Python version: 3.7.3
Qt version: 5.12.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Denmark (en_DK)

ksu output:

kicad StepUp version 8.2.0.6
tolerance on vertex applied
KISYS3DMOD=/
module_3D_dir=//../
FC Version 019
VBO status False
FootPrint Loader /home/foo/mywonkylib.pretty/RF_Shield_TE_Connectivity_2118708-2.kicad_mod
_RF_Shield_TE_Connectivity_2118708_2__fp
Cannot compute Inventor representation for the shape of Shape.
Cannot compute Inventor representation for the shape of Shape.
Traceback (most recent call last):
  File "/home/nickoe/.FreeCAD/Mod/kicadStepUpMod/kicadStepUptools.py", line 14493, in onLoadFootprint_click
    onLoadFootprint()
  File "/home/nickoe/.FreeCAD/Mod/kicadStepUpMod/kicadStepUptools.py", line 7113, in onLoadFootprint
    routineDrawFootPrint(content,name)
  File "/home/nickoe/.FreeCAD/Mod/kicadStepUpMod/kicadStepUptools.py", line 11468, in routineDrawFootPrint
    createSolidBBox2(obj)
  File "/home/nickoe/.FreeCAD/Mod/kicadStepUpMod/kicadStepUptools.py", line 8904, in createSolidBBox2
    obj.Shape=Part.makeBox(boundBoxLX, boundBoxLY, boundBoxLZ, FreeCAD.Vector(oripl_X,oripl_Y,oripl_Z), FreeCAD.Vector(0,0,1))
ValueError: length of box too small

The test file: Remember to rename to kicad_mod.
RF_Shield_TE_Connectivity_2118708-2.txt

Generated by kicad master around Version: (5.1.0-172-g3cb6dc69f), debug build

[Wish] Ordered Workbenches List

Hello!

First of all, this plugin is awesome, thank you for the efforts to make it good.

I saw that many plugins, when added to Freecad are inserted on the Workbench list in an ordered manner. This one, however, is being added to the end of the list. Is it possible to update it to do the same? It is faster to select the workbench when the list is ordered.

Examples of plugins that are being inserter in an ordered way

  • Fasteners
  • Part-o-magic

Antenna Footprint

Hi, I am importing the board tracks, but I have some footprints with some tracks F.cu and B.cu tracks. For example, I have a trace PCB antenna which is not imported with the tracks with the Add Tracks command. Do you have any alternative to import tracks in footprints?

Export to .step and .stp

More a feature request than a real issue but would it be possible to allow exporting a STEP object to a .stp file as well as a .step file?
FreeCAD allow export to STEP (*.stp, *.step) but the button in kicad StepUp tools only allows for *.step (which is confusing as some files have a .stp extension, and therefore are not shown in the window).

multiple pads in one Pads_Poly sketch

Hi. I'm trying to create solder jumper consist of two semi-circle pads. I's my first attempt to create something in FreeCAD. I want both pads to be equal and size be defined by single radius constraint. I didn't find any way to make equality constraints between two sketches so I desided to place both pads into one sketch (I saw multiple rectangular pads in one sketch Pads_TH_SMD in footprint-complex-arc-pads example), so I created sketch with two pads, named it "Pads_Poly", but unfortunately ksu Footprint generator generates footprint with only one pad. Am I doing something wrong or is it impossible to define multiple pads in one Pads_Poly sketch?

Here is my jumper FreeCAD file.
jmp.zip

By the way, removing small circles from pads result in generator error "list index out of range". Now I understand that those circles acts as pad anchors, but I think script should display more descriptive message.

Error pushing edges

can't push edges
kicadStepUptools.py:15645 currentTextChanged not a member of QComboBox.
Probably needs to be editTextChanged

Via drills are missing

Adding someting like that at 12675:

    for v in mypcb.via:
        m_angle = 0
        if not isinstance(v.drill, (list,)):
             v.drill = [v.drill]
        if 'oval' in str(v.drill).split(',')[0]:  #py3 dict workaround
        #if p.drill.oval:  #maui temp workaround errorchecking
            #sayw(str(p.drill.oval))
            #sayw('drill oval')
            if v.drill[0] >= min_drill_size or p.drill[1] >= min_drill_size:
                xs=v.at[0];ys=-v.at[1]
                #x1=mc.end[0]+m.at[0];y1=-mc.end[1]-m.at[1]
                #radius = float(p.drill[0])/2 #sqrt((xs - x1) ** 2 + (ys - y1) ** 2)
                rx=float(v.drill[0])
                #print (p.drill)
                if len(v.drill)>2:
                    try:
                        #print (p.drill[1])
                        #stop
                        ry=float(v.drill[1])
                    except:
                        ry=rx
                else:
                    ry=rx
                #print(v.at[0],p.at[1], p.drill[0])
                [x1, y1] = rotPoint2([xs, ys], [v.at[0], -v.at[1]], m_angle)
                # sayw('holes solid '+str(holes_solid))
                if holes_solid:
                    obj=createHole3(x1,y1,rx,ry,"oval",totalHeight) #need to be separated instructions   
                else:
                    obj=createHole4(x1,y1,rx,ry,"oval") #need to be separated instructions   
                if p_angle!=0:
                    rotateObj(obj, [x1, y1, p_angle])
                HoleList.append(obj)
        #elif v.drill[0]!=0: #circle drill hole
        elif v.drill[0] >= min_drill_size:
            #xs=p.at[0]+offset[0]+m.at[0];ys=-p.at[1]-offset[1]-m.at[1]
            xs=v.at[0];ys=-v.at[1]
            #x1=mc.end[0]+m.at[0];y1=-mc.end[1]-m.at[1]
            radius = float(v.drill[0])#/2 #sqrt((xs - x1) ** 2 + (ys - y1) ** 2)
            rx=radius;ry=radius
            #print(p.at[0],p.at[1], p.drill[0])
            [x1, y1] = rotPoint2([xs, ys], [v.at[0], -v.at[1]], m_angle)
            if holes_solid:
                obj=createHole3(x1,y1,rx,ry,"oval",totalHeight) #need to be separated instructions
            else:
                obj=createHole4(x1,y1,rx,ry,"oval") #need to be separated instructions
            #say(HoleList)
            #if p_angle!=0:
            #    rotateObj(obj, [x1, y1, p_angle])
            #rotateObj(obj, [m.at[0], m.at[1], m_angle])
            HoleList.append(obj)   

Draw EP pad as circle

Hi,

I was try to verify if a 3d step was matching with the footprint.
When the footprint loaded show the EP pad as circle instead a square with rounded corners.

qfn_64_7x7

Now with thermal via.
qfn_64_7x7_thermal

I opened this issue only to report.

Thanks, for a usefull addon.

Imported STEP in Fusion 360 has no track/silk color on bottom layer

The STEP file is created by exporting a PCB+Tracks+Silk using FreeCAD.

When importing this step model in Fusion it seems that the color reverts to (default?) copper for all items except the PCB.

However when importing the STEP file back in FreeCAD everything is in the correct color.

Is there something that can be done to correct/change this behaviour?

Example:
Front in FreeCAD
afbeelding

Front in Fusion
afbeelding
=> Behaviour as expected

Back in FreeCAD:
afbeelding

Back in Fusion:
afbeelding
=> Behaviour not as expected

Please find the STEP file attached:
Front.zip

Can't export poly pad with oval hole

I'm creating a footprint for a USB port that requires two poly pads, each with an oval hole. The footprint fails to export with:

Running the Python command 'ksuToolsFootprintGen' failed:
Traceback (most recent call last):
  File "/home/user/.FreeCAD/Mod/kicadStepUpMod/kicadStepUpCMD.py", line 1920, in Activated
    kicadStepUptools.PushFootprint()
  File "/home/user/.FreeCAD/Mod/kicadStepUpMod/kicadStepUptools.py", line 16551, in PushFootprint
    sk_d=Draft.makeSketch([wns,wnc[0]])

list index out of range

usb.zip

cannot load KiCAD PCB

FreeCAD version

OS: macOS 10.14
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16146 (Git)
Build type: Release
Branch: (HEAD detached at 0.18.4)
Hash: 980bf9060e28555fecd9e3462f68ca74007b70f8
Python version: 3.6.7
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)

KiCAD version

Application: Pcbnew
Version: (5.1.5-0-10_14), release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.54.0 LibreSSL/2.6.5 zlib/1.2.11 nghttp2/1.24.1
Platform: Mac OS X (Darwin 18.7.0 x86_64), 64 bit, Little endian, wxMac
Build Info:
    wxWidgets: 3.0.4 (wchar_t,STL containers,compatible with 2.8)
    Boost: 1.69.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.54.0
    Compiler: Clang 9.0.0 with C++ ABI 1002

Build settings:
    USE_WX_GRAPHICS_CONTEXT=ON
    USE_WX_OVERLAY=ON
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Steps to reproduce:

  1. install KiCAD stepup mod to Freecad using Addon Manager
  2. select kicadstepup as the workbench
  3. hit the icon for "load kicad PCB board and parts"
  4. finder browser, navigate to my kicad project
  5. the .kicad_pcb file is the only filetype that can be selected (others are grayed out)
  6. select the one and only .kicad_pcb file
  7. receive error msg:
Running the Python command 'ksuToolsOpenBoard' failed:
Traceback (most recent call last):
  File "/Users/redactedFella/Library/Preferences/FreeCAD/Mod/kicadStepUpMod/kicadStepUpCMD.py", line 656, in Activated
    kicadStepUptools.onLoadBoard()
  File "/Users/redactedFella/Library/Preferences/FreeCAD/Mod/kicadStepUpMod/kicadStepUptools.py", line 7668, in onLoadBoard
    if hasattr(mypcb.setup, 'grid_origin'):
  File "/Users/redactedFella/Library/Preferences/FreeCAD/Mod/kicadStepUpMod/kicadStepUptools.py", line 936, in __getattr__
    raise AttributeError('{}: key "{}" not found'.format(self._line,name))

1: key "setup" not found

Issue with make_custom() ?

I've had the following exception triggered when trying to load tracks:

Running the Python command 'ksuToolsAddTracks' failed:
Traceback (most recent call last):
File "C:\Users\x\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod\kicadStepUpCMD.py", line 2471, in Activated
tracks.addtracks()
File "C:\Users\x\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod\tracks.py", line 163, in addtracks
pcb.makeCopper(holes=True, minSize=minSizeDrill)
File "C:\Users\x\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod\kicad_parser.py", line 1351, in makeCopper
thickness=thickness)
File "C:\Users\x\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod\kicad_parser.py", line 1059, in makePads
w = make_shape(Vector(*p.size),p)
File "C:\Users\x\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod\kicad_parser.py", line 188, in make_custom
raise RuntimeError('Cannot find polyline points in custom pad')

Cannot find polyline points in custom pad

I'm not a python expert so I started by printing the shapes from make_pads() to the Report View of FreeCAD and when the program got to the first custom shape, the exception from make_custom() got triggered.
I bypassed the custom shapes using a simple

if shape <> "custom":

The tracks loaded fine and I could see which pads were missing.
The missing pads came from a footprint of a custom SMD audio jack connector I made. The pads were all set to "Custom (Rect. Anchor)".
After I changed those to "Rectangular" and removed the if-statement, there were no problems loading the tracks anymore.
The problem of not being able to make custom pads is still there, make_custom() is just not called anymore.

The PCB can be found here : https://github.com/pyroesp/GBDSO
I have not yet updated the PCB so if you try this with my files on the repo, you should get the error.

KiCad 5.0.2
FreeCAD 0.17
kicad StepUp version 8.1.0.8

Issue with Importing 3D Parts

I have been using kicadStepUpMod for several projects. I recently upgraded my PC and redownloaded FreeCAD and kicadStepUpMod and ran into a new issue.

image

If I roll back kicadStepUpMod to the 2/5/19 commit, the problem appears to goes away. The problem is that many of the STEP files I use are from part manufacturers. My PCB design is showing many files that have this "NOT fused" error.

Parsing of module names not always correct

Caveat - Please interpret anything presented as fact as "as far as I can tell"

On loading a .kicad_pcb file into freeCad, the parsing of file names for 3D models associated with footprints doesn't always yield sensible results, or results that match KiCad's behaviour

In the attached file there's a board with 6 LEDs, all with variations on the same 3d model, either .wrl or .stp. Note that isn't .step
In the KiCad 3D viewer, all 6 diodes appear correctly, if you load the board into freeCad only 2/6 appear.

The relative file paths beginning ./ load into step up, but both use the .stp model. (Removing the .stp causes neither to show)

For other files, or for relative files that can't be found, and absolute file paths, the loader seems to:
strip any leading /
strip the extension
prepend $KIS3DMOD
add extension .step

The dialogue only informs the user on the modified try. If I set the file path in KiCad to
./relative/FileThat/DoesntExist.stp or ./relative/FileThat/DoesntExist.wrl
returns
...missing module(s)
Drive:/files/to/$KIS3DMOD/AbosultePath/toProject/./relative/FileThat/DoesntExist.step cannot be found

This is confusing, as it makes the user think that the environment isn't set up properly, when in fact the file isn't present, so the loader checks elsewhere, and the subtle extension change is easy to miss.

or using
Drive:/Absolute/FileThat/DoesExist.stp
returns
...missing module(s)
Drive:/files/to/$KIS3DMOD/Drive:/Absolute/FileThat/DoesExist.step
and I'm not 100% sure how to force an absolute file path yet.

You can play around with the files and get various nonsensical paths. With this board, I never seem to get more than two "missing models" even though I'm using 6 different file extensions/paths. This would suggest to me that the importer is marking them as bad and skipping future references, even though the file extensions, and therefore files themselves, are different. This could mean an erroneous .wrl causes valid .steps not to be imported.

I've also seen when using $ALT3DMOD or $KIS3DMOD the extension isn't preserved, hence .stp files will not load from these locations. Resulting in the message
...missing module(s)
Drive:/path/to/$ALT3DMOD/fileThatDoesExist.step
when the file does exist, but as .stp or .wrl

If you build a kicad board with a SOT-23 footprint as it comes from the library, the footprint 3d model is
${KISYS3DMOD}/TO_SOT_Packages_SMD.3dshapes/SOT-23.wrl
but also you'll find in that folder
${KISYS3DMOD}/TO_SOT_Packages_SMD.3dshapes/SOT-23.step
exists and if you remove/rename it the package won't appear in freeCad Even if the .wrl is unchanged.

This is particularly confusing, as some Kicad parts have both, and some don't resulting in some parts loading just fine, with others not and no obvious difference. For example
Socket_Strip_Straight_1x14_Pitch2.54mm doesn't have the appropriate .step so doesn't load

I'd suggest the behaviour should be

  • any file path options that work in KiCad should worth with KicadStepup
    -- hence if the file begins with a / or // or .// and so on, the file should be treated as relative
    -- if there is an environment variable is present that should be prepended
    -- else it should be treated as absolute as passed as is
  • the exact extension should be preserved (ie .step / .stp .wrl / .vrml ) in all events.

I'm not actually sure if step Up is able to import .wrl files in this case (I know there are some options in exporting boards), if it's not designed to work with .wrl then it should inform the user that it can't import them. I don't think loading a corresponding .step file with the same name (if present) is a good idea. Giving an "I can't import .wrl" message gives the user the choice to change to a suitable file, importing a different file to the one the user inputs could result in old/different/bad models being used.

StepOrStp.zip

Add new feature to import PCB inner layer

Now the Top and Bottom layers of PCB can be imported to Freecad. This is good enough for mechanical design. For some purposes, all inner layers of PCB need to be imported to 3D tool. Is there any way to do this weith StepUpMod? or could consider to add this feature.

Exporting parts without STEP model

I have many testpoints on my pcb panel and need them to be exported in the STEP-file so that I get the exact position of them to place drills on that pos.

Is that possible with that version? Or do you have any workaround for me?

FreeCAD crash

Is there a specific version of FreeCAD required?
I have installed the following version (installed from the standard Fedora repo):

RPM package(s):
freecad-0.18.4-3.fc30.x86_64, freecad-data-0.18.4-3.fc30.noarch

Info from About Dialog:

Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.Unknown
Build type: Unknown
Python version: 3.7.5
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.4.0.beta
Locale: English/United States (en_US)

Steps to reproduce:

  1. Installed the workbench from within the Addon Manager
  2. Restart FreeCAD
  3. Select File->New

Result:

FreeCAD 0.18, Libs: 0.18RUnknown
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2019
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

Program received signal SIGSEGV, Segmentation fault.
#0  /lib64/libc.so.6(+0x37ec0) [0x7f255d2b9ec0]

Importing PCB is not loading 3D models

I am trying to import KiCad PCB file in FreeCAD to generate a complete PCB 3D model.
All my 3D models are placed inside the project library itself.

${KIPRJMOD}/lib/pcbLibrary/kicad/shape3d/XXXX.wrl

and

${KIPRJMOD}/lib/pcbLibrary/kicad/shape3d/design/XXXX.step

When I import KiCadPCB I get this error
FreeCADError

How to configure path so it gets all 3D model files?

Export .step as part instead of being an assembly.

I am trying to export a .step file of my board as a part. When I use KicadStepUp exporting the board from the Freecad it exports like an assembly being a modular object.

Does the KicadStepUp have any way to export the board as a part?

I want to prevent the PCBs being exploded when used in other assemblies. This is a view of .step from the GrabCad. I want to avoid that if possible. Do you know if there is a way to do that?

image

Cannot find polyline points in custom pad

I'm getting the error shown in the issue title when trying add tracks to a loaded board (attached here):
patch_1x1x5.zip

I'm using the current Git master version of this program and Freecad 0.18.

This seems to be closely related to this issue. I imagine I could make a similar fix, however, this does seem to be a valid pcb in pcbnew so I'm reluctant to do that. Is there a reason my pcb is wrong?

On a somewhat related note, I noticed when looking through the implementation that you parse the S-expressions yourself rather than using Pcbnew's python API. Have you considered using the API?

Thanks!

3D object to 2D projection is flipped

As a learning example, I'm trying to create a footprint for the following part: https://www.sparkfun.com/products/9032 (there is a STEP model available on that page).

I started by importing the model, changed the view to the bottom of the part (using the cube in the corner) and then selected the joystick object and clicked "3D object to 2D projection". However, the resulting projection is both rotated and flipped. Am I doing something wrong here?

FreeCAD_0_18

Cannot import tracks from zone with kicad_pcb having "(layers *.Cu)"

With this in my kicad_pcbnew:

(zone (net 0) (net_name "") (layers *.Cu) (tstamp 0) (hatch edge 0.508)
...

I get this error about halfway through importing tracks:

  making zones...
Running the Python command 'ksuToolsAddTracks' failed:
Traceback (most recent call last):
  File "/Library/Preferences/FreeCAD/Mod/kicadStepUpMod/kicadStepUpCMD.py", line 2454, in Activated
    tracks.addtracks()
  File "./Library/Preferences/FreeCAD/Mod/kicadStepUpMod/tracks.py", line 163, in addtracks
    pcb.makeCopper(holes=True, minSize=minSizeDrill)
  File "./Library/Preferences/FreeCAD/Mod/kicadStepUpMod/kicad.py", line 1338, in makeCopper
    thickness=thickness)
  File "./Library/Preferences/FreeCAD/Mod/kicadStepUpMod/kicad.py", line 1227, in makeZones
    if z.layer != self.layer:
  File "./Library/Preferences/FreeCAD/Mod/kicadStepUpMod/kicadStepUptools.py", line 826, in __getattr__
    raise AttributeError('{}: key "{}" not found'.format(self._line,name))

5607: key "layer" not found

However if I change edit the kicad_pcbnew file manually and change (layers *.Cu) to (layer F.Cu) it does seem to work (my other zones are only on a single layer, I guess... I think I normally duplicate them but maybe I selected multiple layers one time?)

Can't open footprin in FreeCAD 0.18.1

kicadStepUp: ksuWB.Activated(v 7.8.6)

Freecad Version:
OS: Linux Mint 19.1
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.1.
Build type: Release
Python version: 3.6.7
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)

Since i updated the freecad to release mentioned, the kicadStepUp is loaded but when try open an footprint or pcb gives the following error:

Running the Python command 'ksuToolsOpenBoard' failed:
Traceback (most recent call last):
File "/home/jneiva/.FreeCAD/Mod/kicadStepUpMod/kicadStepUpCMD.py", line 248, in Activated
import kicadStepUptools
File "/home/jneiva/.FreeCAD/Mod/kicadStepUpMod/kicadStepUptools.py", line 1565, in
FC_majorV,FC_minorV,FC_git_Nbr=getFCversion()
File "/home/jneiva/.FreeCAD/Mod/kicadStepUpMod/kicadStepUptools.py", line 1558, in getFCversion
FC_minorV=int(FreeCAD.Version()[1])

invalid literal for int() with base 10: '18.1'

Add the classic About page

It's far from evident to find the source repository for this project ;)

No need to describe an about page I think.

local variable 'firstCoordinate' referenced before assignment

Trying to create a complex footprint but fails with local variable 'firstCoordinate' referenced before assignment

Even simplified forms fail with the same error.

Running the Python command 'ksuToolsFootprintGen' failed:
Traceback (most recent call last):
  File "/home/morgan/.FreeCAD/Mod/kicadStepUpMod/kicadStepUpCMD.py", line 1920, in Activated
    kicadStepUptools.PushFootprint()
  File "/home/morgan/.FreeCAD/Mod/kicadStepUpMod/kicadStepUptools.py", line 16583, in PushFootprint
    export_footprint(name)
  File "/home/morgan/.FreeCAD/Mod/kicadStepUpMod/kicadStepUptools.py", line 17257, in export_footprint
    pth_ordered=collect_pads(pply) #pads_all)  ## pads normalized with sequence of segments
  File "/home/morgan/.FreeCAD/Mod/kicadStepUpMod/kicadStepUptools.py", line 18000, in collect_pads
    if distance(firstCoordinate, nextCoordinate)<=edge_tolerance:# or pad_list[j-1][0]=='circle':

local variable 'firstCoordinate' referenced before assignment

humming_pad.FCStd.gz

custom KiCAD PATH variable

Hey,

I'm not sure if this a real issue or something I didn't understand in the StepUp Preference panes but anyhow, I'll expose the situation here and see if somebody can enlightened me:

In KiCAD on my workstations I setup a custom PATH variable pointing to the top of my lib ie:
KICADLIB = /path/to/lib-folder
Which is then nicely subsection into folder for footprint, template, 3dmodel, etc... which all point to the {$KICADLIB}/footprint , {$KICADLIB}/model , etc.
quite simple and easily portable, but it assume knowledge of the value behind {$KICADLIB} to complete the path to file.
Which is what I think is causing my problem when importing my pcb with the "import PCB" tool in Step-up and all the "not found model: {$KICADLIB}/bla/bla/bla"

Did I miss something somewhere? I always asked myself what was the purpose of those "ALT3DMOD" and "alternate 3d model search folder" option were or theit usable.

I can't sadly share the culprit file as it is work related but I could surely whip up something when at home (with personal project) if needed.

In any case thanks for the (what looks like (see above for current probleme :P)) a very nice tool!

Automate WRML & STEP fabrication

From reading different PR on 3dmodels, I noticed following things:

  • lot of PR are aborted cancelled because the 3d contains a not editable included part
  • not fusionned .STEP request
  • or "filename" doesn't match object name
  • ....

That being said, it is tedious to obtain the VRML and the STEP from the model displayed in the FreeCAD window.

I would like to see a single button "Create files for KiCad 3d library" handling everything.

If you look at the 3d model here KiCad/kicad-packages3D#632 it is

  • not merged for a strange reason
  • is the perfect Cad everyone dreams of

This drawing is fully parametric. If you want to generate the 5mm button, you enter 5 (not easy to find where).

The "Create files for KiCad 3d library" could integrate a basic loop where it iterates for a list of values. For this SW_SPST, it would be " 3.8 5.0 8.0" applied to a selected constraint.

In a single click, generates all variants , all files, superchecked, error free...

note: variant size for this SW, see the loop here ;)

6*6 SMD Micro Switch Height Table

4.1 | 4.3 | 4.5 | 4.7 | 5 | 5.5 | 6 | 6.5 | 7 | 7.5 | 8
8.5 | 9 | 9.3 | 9.4 | 9.5 | 10 | 10.5 | 11 | 11.5 | 12 | 12.5
13 | 13.5 | 14 | 14.5 | 15 | 15.5 | 16 | 16.5 | 17 | 17.5 | 18
18.5 | 19 | 19.5 | 20 | 21 | 22 | 23 | 24 | 25

SilkS layer out of the board

@easyw easyw, this plugin is getting better and better. This is awesome, thank you for that.

This is one thing that I would like to give as the feedback since some time ago.

What do you think to have something that cuts the silkscreen (removing parts that are not over the board). Please, have a look at the following example.

image

I don't know if this is too much of work since right now, I was not able to import the SilkS in the right position in the first place. But you can tell this better.

Allow importing board in addition to load

As it works now, when using the load board feature, a new FreeCAD project is created and the board is recreated in there. When working with multiple boards that join together, this requires creating a new project for each part, copying the parts out of the new project and pasting into my working project.

It would be great to have an option to insert the board into the current project rather than creating a new one. Personally, this makes more sense as the default behavior to me.

Doesn't extrude multiple boards

Thanks for this great plugin, it's really help push me to learn FreeCAD better.

I'm working on a board that consists of multiple Edge.Cuts and only a single one appears in Boards_Geoms

I tested this with KiCAD 5.0.0-rc2-dev-unknown-554cb5464ubuntu17.10.1
A blank board with two squares is good enough to test.

image
image

Add Tracks operation failed

Hi!
Trying to perform operation 'Add Tracks' after importing 'PCB Boards and Parts' produces error:

Running the Python command 'ksuToolsAddTracks' failed:
Traceback (most recent call last):
  File "/home/alexandr/.FreeCAD/Mod/kicadStepUpMod/kicadStepUpCMD.py", line 3047, in Activated
    import tracks
  File "/home/alexandr/.FreeCAD/Mod/kicadStepUpMod/tracks.py", line 48, in <module>
    if FC_git_Nbr >= int(FC_export_min_version):

name 'FC_export_min_version' is not defined

After adding lines

global FC_export_min_version
FC_export_min_version="11670"

to 'tracks.py' file operation 'Add Tracks' begin work without errors. At first glance all tracks and vias were imported correctly.
But I think this bugfix isn't right...

PS: used revision is '3141f0715eba54ceca9e67406eea2b14270235d2'

Feature request : move footprints in 2D sketcher

I would like to move my footprints on my board, using the FreeCAD Sketcher, in the same way I can place the edge cuts.
That would lift the limitations I have in the pcbNew editor where everything is snapped to grid or manually placed using coordinates, because non-trivial geometries are hard to work with.

Is this feature already implemented / planned / dropped ?
If it is planned, what would be the best way to help implement it ?

Thanks

[issue/question] refraction of material part of Material or set in script?

Added some new materials to the script, including transparent glass (for radio/VFD tubes):

ambientIntensity 0.00
diffuseColor 0.588235 0.670588 0.729412
specularColor 0.90 0.90 0.90
emissiveColor 0.0 0.0 0.0
shininess 0.85
transparency 0.80

The result looks fine in KiCad's 3D view, but when the model is rendered the glass material looks more like plastic, i.e. a lot of deformation because the refraction is too high.
Is this an issue with my Material definition, or is this part of the script?

Verifying 3d-model library

Hi @easyw

Does KSU have any tool to validate (and maybe clean the header of the) step files for a library?

For instance, I have one personal library (folder) with step 3d models on it.
I would like to check all of them if they are good to generate single part boards. If not I will replace/fix them.

So, I have 2 ideas here:

  1. I am looking for a command-line script to automate the process, OR
  2. a Freecad Macro, OR
  3. If KSU has anything that I can pass a folder then it loads everything (maybe recursively) giving a report if the model is a single part will be nice to have too.

Do you have any idea on how I can achieve something like that for a bunch of step files?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.