Skip to content

Instantly share code, notes, and snippets.

View galou's full-sized avatar

Gaël Écorchard galou

  • Czech Technical University in Prague
  • Prague
View GitHub Profile

Issues with FreeCAD's Python API in general

  • Document objects are mixed with other attributes in App.ActiveDocument. I would suggest to use doc instead of App.ActiveDocument and e.g. objs.Box instead of App.ActiveDocument.Box. doc.Objects would continue to be the list of children.
  • App.Rotation takes angle(s) in degrees as input but Rotation.Angle is in radians.
  • App.Quantity.getValueAs returns a unit-less quantity instead of a float
  • getGlobalPlacement does not return the global placement.
  • App.GuiUp is not available at the start of FreeCAD.
  • FreeCAD has it's own PySide but not under a different name.
  • There are several way to import FreeCAD (import FreeCAD as App and import freecad as App) but they are not equivalent.
@galou
galou / dedrm.sh
Created January 14, 2020 19:36
Set DeDRM on Ubuntu 18.04 and Wine 4.21
#!/bin/sh
WINEPREFIX=/home/gael/.PlayOnLinux/wineprefix/AdobeDigitalEditions45
WINEARCH=win32
PATH=~/.PlayOnLinux/wine/linux-x86/4.21/bin:$PATH
wine msiexec /i /tmp/python-2.7.16.msi /L'*v' log.txt
wine msiexec /i /tmp/VCForPython27.msi /L'*v' log.txt
wine pip.exe install PyCrypto
wine python.exe "/home/gael/.config/calibre/plugins/DeDRM/libraryfiles/adobekey.py" "/home/gael/.config/calibre/plugins/DeDRM/libraryfiles/winekeysdir"
@galou
galou / install_adobe_digital_editions.sh
Created January 14, 2020 19:34
How-To install Adobe Digital Editions 4.5 on Ubuntu 18.04
#!/bin/sh
# Preliminary conditions:
# Ubuntu 18.04
# sudo apt install winbind playonlinux
# Add wine 4.21 32 bit to PlayOnLinux through the GUI.
# Download ADE_4.5_Installer.exe to /tmp.
WINEPREFIX=$HOME/.PlayOnLinux/wineprefix/AdobeDigitalEditions45
WINEARCH=win32
WINE=$HOME/.PlayOnLinux/wine/linux-x86/4.21/bin/wine
@galou
galou / .ycm_extra_conf.py
Last active April 4, 2022 10:18
YouCompleteMe configuration file for ROS, copy to $ROS_WORKSPACE
# -*- coding: utf-8 -*-
##########################################################################
# YouCompleteMe configuration for ROS #
# Author: Gaël Ecorchard (2015) #
# #
# The file requires the definition of the $ROS_WORKSPACE variable in #
# your shell. #
# Name this file .ycm_extra_conf.py and place it in $ROS_WORKSPACE to #
# use it. #