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,WebGui | |
SCALE = 10 # global scale modifier | |
template = """<!DOCTYPE HTML> | |
<html lang="en"> | |
<head> | |
<title>FreeCAD webGL viewer</title> | |
<meta charset="utf-8"> | |
<style type="text/css"> |
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
def getTangent(edge): | |
"Returns a tangent vector from an edge in FreeCAD" | |
if isinstance(edge.Curve,Part.Line): | |
vec = edge.Vertexes[-1].Point.sub(edge.Vertexes[0].Point) | |
elif isinstance(edge.Curve,Part.Circle): | |
v1 = edge.Vertexes[-1].sub(edge.Curve.Center) | |
v2 = edge.Curve.Axis | |
vec = v1.cross(v2) | |
else: | |
print "not supported" |
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 sys | |
from PyQt4 import QtCore, QtGui, QtWebKit | |
import WebGui | |
"""Html snippet.""" | |
html = """ | |
<html><body> | |
<center> | |
<script language="JavaScript"> | |
document.write('<p>Python ' + pyObj.pyVersion + '</p>') |
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
/* put this in your wp-config.php */ | |
define('FS_METHOD', 'ssh2'); | |
define('FTP_USER', 'UNAME'); // Change UNAME to your CPanel Username | |
define('FTP_PASS', 'PWORD'); // Change PWORD to your CPanel Password | |
define('FTP_HOST', '67.210.247.245:50685'); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# Sourceforge | |
Host *.sf.net | |
User yorik | |
IdentityFile ~/.ssh/keys/sf_key_new | |
Host *.sourceforge.net | |
User yorik | |
IdentityFile ~/.ssh/keys/sf_key_new |
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
cmake_minimum_required ( VERSION 2.6 ) | |
project ( tumbler-ffmpeg-thumbnailer ) | |
INCLUDE( FindPkgConfig ) | |
FIND_PACKAGE( GTK2 REQUIRED ) | |
ADD_DEFINITIONS("`pkg-config --cflags --libs gtk+-2.0`") | |
ADD_DEFINITIONS("`pkg-config --cflags --libs tumbler-1`") | |
pkg_check_modules(PKG REQUIRED libgsf-1) | |
pkg_check_modules(FFMPEG_THUMBNAILER libffmpegthumbnailer) |
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
diff --git a/src/App/PropertyFile.cpp b/src/App/PropertyFile.cpp | |
index 13599c8..70b0f7e 100644 | |
--- a/src/App/PropertyFile.cpp | |
+++ b/src/App/PropertyFile.cpp | |
@@ -296,7 +296,7 @@ void PropertyFileIncluded::Restore(Base::XMLReader &reader) | |
void PropertyFileIncluded::SaveDocFile (Base::Writer &writer) const | |
{ | |
- Base::ifstream from(Base::FileInfo(_cValue.c_str())); | |
+ std::ifstream from(_cValue.c_str()); |
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
# creates an empty file | |
f=IfcImport.open("") | |
# this writes the file to disc, in this case a minimal header | |
f.write("/home/yorik/test1.ifc") | |
# adding entities | |
pnt = IfcImport.Entity("ifccartesianpoint") | |
f.add(pnt) |
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
from pivy import coin | |
import SketcherGui | |
coin.SoType.fromName("SoDatumLabel") | |
l=coin.SoType.fromName("SoDatumLabel").createInstance() | |
l.Type | |
l.string.setValue("Yorik") | |
sg=Gui.ActiveDocument.ActiveView.getSceneGraph() | |
sg.addChild(l) | |
l.datumtype.getValue() | |
l.datumtype.setValue(2) |
OlderNewer