Skip to content

Instantly share code, notes, and snippets.

View yorikvanhavre's full-sized avatar

Yorik van Havre yorikvanhavre

View GitHub Profile

Keybase proof

I hereby claim:

  • I am yorikvanhavre on github.
  • I am yorikvanhavre (https://keybase.io/yorikvanhavre) on keybase.
  • I have a public key ASDsJiThnDgQBTYV70-5IFhBhEMtnd4i6k5eoOc6oq5M7wo

To claim this, I am signing this object:

@yorikvanhavre
yorikvanhavre / io_import_fcstd.py
Last active July 17, 2023 20:43
Blender FreeCAD importer stub
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@yorikvanhavre
yorikvanhavre / parametric_column.ifc
Created August 3, 2017 15:36
An IFC file that contains parametric definitions for FreeCAD
ISO-10303-21;
HEADER;
FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1');
FILE_NAME('p5.ifc','2017-08-03T15:25:29',('Yorik van Havre','yorik@uncreated.net'),('uncreated.net'),'IfcOpenShell 0.5.0-dev','IfcOpenShell 0.5.0-dev','');
FILE_SCHEMA(('IFC2X3'));
ENDSEC;
DATA;
#1=IFCPERSON($,$,'Yorik van Havre',$,$,$,$,$);
#2=IFCORGANIZATION($,'uncreated.net',$,$,$);
#3=IFCPERSONANDORGANIZATION(#1,#2,$);
@yorikvanhavre
yorikvanhavre / nester.py
Last active February 1, 2022 19:54
Nesting algo for FreeCAD
# -*- coding: utf-8 -*-
#***************************************************************************
#* *
#* Copyright (c) 2017 Yorik van Havre <yorik@uncreated.net> *
#* *
#* This program is free software; you can redistribute it and/or modify *
#* it under the terms of the GNU Lesser General Public License (LGPL) *
#* as published by the Free Software Foundation; either version 2 of *
#* the License, or (at your option) any later version. *
@yorikvanhavre
yorikvanhavre / Sketchfab-exporter.FCMacro
Last active March 21, 2017 20:20
A sketchfab exporter for FreeCAD
#!/usr/bin/python
#***************************************************************************
#* *
#* Copyright (c) 2017 - Yorik van Havre <yorik@uncreated.net> *
#* *
#* This program is free software; you can redistribute it and/or modify *
#* it under the terms of the GNU Lesser General Public License (LGPL) *
#* as published by the Free Software Foundation; either version 2 of *
#* the License, or (at your option) any later version. *
@yorikvanhavre
yorikvanhavre / acis-sat-lib.py
Created June 20, 2016 22:15
A read/write library for ACIS/SAT file format. However, it's too ancient and doesn't respect the current file format specs, which cannot be found on the net, so I stopped there...
# adapted from http://userpages.uni-koblenz.de/~ros/acis.htm
import os
class tawriter:
def __init__(self,asat):
self.l = []
self.sat = []
self.asat = asat
@yorikvanhavre
yorikvanhavre / plugin-manager-goal.py
Last active June 17, 2016 18:48
plugin manager goal
import pluginmanager
plugins = pluginmanager.getPlugins()
for plugin in plugins:
print plugin.Name
print plugin.Author
print plugin.Url
print plugin.Description
print plugin.type # if this is a workbench or a macro
# for later...
print plugin.isInstalled()
@yorikvanhavre
yorikvanhavre / fetch.py
Created June 2, 2016 18:09
sample fetch script for freecad
class plugin:
author = "xyz"
type = "macro"
description = "this plugin does this"
baseurl = "http://github.com/mymacro"
infourl = "http://github.com/mymacro/README.md"
class Fetch:
def __init__():
@yorikvanhavre
yorikvanhavre / mdview.php
Created March 3, 2016 15:45
This script generates a nice HTML rendering of a Markdown file that is hosted and shared on an owncloud server, using strapdownjs.com.
<?php
// mdview.php by Yorik van Havre, GPL license
// This script generates a nice HTML rendering of a Markdown file that is hosted and
// shared on an owncloud server, using strapdownjs.com.
// To use it, simply place this file somewhere on your web space, and call it with the
// following arguments: http://path/to/mdview.php?file=XXXXXXXX&theme=spacelab
// the XXXXXXX is the share code from the link you obtain when sharing a file in owncloud.
// theme is optional, and can be one of the themes described on strapdownjs.com. If not
// provided, the spacelab theme is used (with a bit of changes I did in the <style> tag below)
@yorikvanhavre
yorikvanhavre / openfoam_obj_exporter.py
Created January 24, 2016 15:21
An openFOAM-tailored OBJ exporter for FreeCAD
#***************************************************************************
#* *
#* Copyright (c) 2015 *
#* Yorik van Havre <yorik@uncreated.net> *
#* *
#* This program is free software; you can redistribute it and/or modify *
#* it under the terms of the GNU Lesser General Public License (LGPL) *
#* as published by the Free Software Foundation; either version 2 of *
#* the License, or (at your option) any later version. *
#* for detail see the LICENCE text file. *