This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
freecadfunctions="""#!/usr/env/bin python | |
#python 2 | |
import FreeCAD,Part | |
def pointstopoles1D(points): | |
return zip(*[(FreeCAD.Vector(point[0:3]),point[3]) for point in points]) | |
def pointstopoles(points,cu): | |
poles=[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import datetime | |
frankierart={ | |
0x01:'Stampit 2003', | |
0x02:'0x02???', | |
0x03:'Frankit', | |
0x05:'Filiale', | |
0x07:'Frankierservice Infopost/Infobrief', | |
0x08:'Premiumadress', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import bs4 | |
import requests | |
sa = requests.Session() | |
sa.verify = False # workaround | |
# sa.auth = BearerAuth() | |
sa.timeout = 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import FreeCAD | |
f1=open("surface.dat") | |
coords=[] | |
miny=1 | |
for line in f1.readlines(): | |
sline=line.strip() | |
if sline and not sline.startswith('#'): | |
ycoord=len(coords) | |
lcoords=[] | |
for xcoord, num in enumerate(sline.split()): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import zip2git | |
from PySide import QtGui | |
# 1. Choose repository (directiory) | |
repodir = QtGui.QFileDialog.getExistingDirectory(QtGui.qApp.activeWindow()) | |
if repodir: | |
# ToDO: 2. List branches in a list and let the user choose one | |
# ToDo: 3. List commits in a list and let the user choose one | |
# ToDo: 4. Check if it would overwrite a file. And if the file is | |
# part of the repo. Ask the user for cofirmation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Netcologne itemized bill paraser | |
the csv file should be in the same directory and named nc-* | |
""" | |
knownprefix = { | |
#internatinal | |
'+30':'Griechenland', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime,calendar | |
def ultimo(num=3,today=None): | |
"""return a list of datetime.date with the last day of num previous months""" | |
if today is None: | |
today = datetime.date.today() | |
return [datetime.date(y,m,calendar.monthrange(y,m)[1]) for \ | |
m,y in (((today.month - i -1) % 12+1, today.year + \ | |
((today.month - i -1) // 12)) for i in range(num+1,0,-1))] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import FreeCAD | |
import importCSG | |
#import prototype | |
importmod=importCSG | |
dirpath='' | |
def comparewithstl(filename,obj,doc): | |
# import MeshPart | |
import Mesh | |
import OpenSCADUtils |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import zipfile | |
tempdirlin='/home/user/sattemp' | |
tempdirwine='D:\\' | |
converterbin="/windows/Programme/Program Files (x86)/DesignSpark/DesignSpark Mechanical 1.0/sabSatConverter.exe" | |
# add freecad libdir to path | |
import sys | |
sys.path.insert(0,'/usr/local/freecad/lib') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
if open.__module__ == '__builtin__': | |
pythonopen = open # to distinguish python built-in open function from the one declared here | |
ftdpath='C:/Program Files (x86)/fischertechnik designer' | |
partnamelang='NAME' #german | |
#partnamelang='ENG' #english |
NewerOlder