Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
easyw committed Sep 12, 2017
0 parents commit 64669ad
Show file tree
Hide file tree
Showing 62 changed files with 103,883 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
50 changes: 50 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk

# Python executable
*.pyc

# =========================
# Operating System Files
# =========================

# OSX
# =========================

.DS_Store
.AppleDouble
.LSOverride

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
19 changes: 19 additions & 0 deletions Init.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
#****************************************************************************
#* *
#* Kicad STEPUP (TM) (3D kicad board and models to STEP) for FreeCAD *
#* 3D exporter for FreeCAD *
#* Kicad STEPUP TOOLS (TM) (3D kicad board and models to STEP) for FreeCAD *
#* Copyright (c) 2015 *
#* Maurice easyw@katamail.com *
#* *
#* Kicad STEPUP (TM) is a TradeMark and cannot be freely useable *
#* *

# two options for IDF added by Milos Koutny (12-Feb-2010)
#FreeCAD.addImportType("Kicad pcb board/mod File Type (*.kicad_pcb *.emn *.kicad_mod)","kicadStepUptools")
# ___ver___ = "6.0.4.5"
## idf import dropped

FreeCAD.addImportType("Kicad pcb board/mod File Type (*.kicad_pcb *.kicad_mod)","kicadStepUptools")
#FreeCAD.addImportType("IDF emp File Type (*.emp)","Import_Emp")
88 changes: 88 additions & 0 deletions InitGui.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# -*- coding: utf-8 -*-
#****************************************************************************
#* *
#* Kicad STEPUP (TM) (3D kicad board and models to STEP) for FreeCAD *
#* 3D exporter for FreeCAD *
#* Kicad STEPUP TOOLS (TM) (3D kicad board and models to STEP) for FreeCAD *
#* Copyright (c) 2015 *
#* Maurice easyw@katamail.com *
#* *
#* Kicad STEPUP (TM) is a TradeMark and cannot be freely useable *
#* *

import FreeCAD, FreeCADGui, Part, os, sys
import ksu_locator
from kicadStepUpCMD import *

ksuWBpath = os.path.dirname(ksu_locator.__file__)
#sys.path.append(ksuWB + '/Gui')
ksuWB_icons_path = os.path.join( ksuWBpath, 'Resources', 'icons')

global main_ksu_Icon
main_ksu_Icon = os.path.join( ksuWB_icons_path , 'kicad-StepUp-tools-WB.svg')


#try:
# from FreeCADGui import Workbench
#except ImportError as e:
# FreeCAD.Console.PrintWarning("error")

class ksuWB ( Workbench ):
global main_ksu_Icon

"kicad StepUp WB object"
Icon = main_ksu_Icon
#Icon = ":Resources/icons/kicad-StepUp-tools-WB.svg"
MenuText = "kicad StepUp WB"
ToolTip = "kicad StepUp workbench"

def GetClassName(self):
return "Gui::PythonWorkbench"

def Initialize(self):
import kicadStepUpCMD
submenu = ['demo.kicad_pcb','d-pak.kicad_mod', 'demo-sketch.FCStd', 'demo.step', 'kicadStepUp-cheat-sheet.pdf', 'kicad-3D-to-MCAD.pdf' ]
dirs = self.ListDemos()

#self.appendToolbar("ksu Tools", ["ksuTools"])
self.appendToolbar("ksu Tools", ["ksuTools","ksuToolsOpenBoard","ksuToolsLoadFootprint",\
"ksuToolsExportModel","ksuToolsPushPCB","ksuToolsCollisions", \
"ksuToolsImport3DStep","ksuToolsExport3DStep","ksuToolsMakeUnion",\
"ksuToolsMakeCompound"])

#self.appendMenu("ksu Tools", ["ksuTools","ksuToolsEdit"])
self.appendMenu("ksu Tools", ["ksuTools"])
self.appendMenu(["ksu Tools", "Demo"], submenu)

Log ("Loading ksuModule... done\n")

def Activated(self):
# do something here if needed...
Msg ("ksuWB.Activated()\n")

def Deactivated(self):
# do something here if needed...
Msg ("ksuWB.Deactivated()\n")
@staticmethod
def ListDemos():
import os
import ksu_locator

dirs = []
# List all of the example files in an order that makes sense
module_base_path = ksu_locator.module_path()
demo_dir_path = os.path.join(module_base_path, 'demo')
dirs = os.listdir(demo_dir_path)
dirs.sort()

return dirs

###

dirs = ksuWB.ListDemos()
#FreeCADGui.addCommand('ksuWBOpenDemo', ksuOpenDemo())
#dirs = ksuWB.ListDemos()
for curFile in dirs:
FreeCADGui.addCommand(curFile, ksuExcDemo(curFile))

FreeCADGui.addWorkbench(ksuWB)
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
kicadStepUp-WB
==============

![icon](Resources/icons/kicad-StepUp-tools-WB.svg)

[![forthebadge made-with-python](http://ForTheBadge.com/images/badges/made-with-python.svg)](https://www.python.org/)

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
- **generate Blender compatible VRML files**

Please see [KiCad Info forum](https://forum.kicad.info/search?q=step) or [FreeCAD forum](https://forum.freecadweb.org/viewtopic.php?f=24&t=14276) to discuss or report issues regarding this Addon.

![screenshot](https://cdn.hackaday.io/images/7537561443908546062.png)


Installing
----------

Download and install your corresponding version of FreeCAD from [wiki Download page](http://www.freecadweb.org/wiki/Download) and either install

- automatically using the [FreeCAD Add-on Manager](https://github.com/FreeCAD/FreeCAD-addons) (bundled in to 0.17 dev version under Tools Menu)
- manually by copying the kicadStepUpMod folder to the Mod sub-directory of the FreeCAD application.

### Requirements

- **FreeCAD** 0.15 4671 or **0.16 >= 6712** or **0.17 >= 11707**


### License

[GNU AFFERO GENERAL PUBLIC LICENSE](https://www.gnu.org/licenses/agpl-3.0.en.html)
80 changes: 80 additions & 0 deletions Resources/icons/Sketcher_Rectangle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 64669ad

Please sign in to comment.