OpenSCADUtils Namespace Reference


class  OpenSCADError


def angneg (d)
def applyPlacement (shape)
def callopenscad (inputfilename, outputfilename=None, outputext='csg', keepname=False)
def callopenscadmeshstring (scadstr)
def callopenscadstring (scadstr, outputext='csg')
def comparerotations (r1, r2)
def decomposerotoinversion (m, precision=4)
def detsubmatrix (s)
def fcsubmatrix (m)
def findbestmatchingrotation (r1)
def getopenscadversion (osfilename=None)
def isorthogonal (submatrix, precision=4)
def isrotoinversionpython (submat, precision=4)
def isspecialorthogonal (mat, precision=4)
def isspecialorthogonalpython (submat, precision=4)
def meshopinline (opname, iterable1)
def meshoponobjs (opname, inobjs)
def meshoptempfile (opname, iterable1)
def mirror2mat (nv, bv)
def multiplymat (l, r)
def newtempfilename ()
def process2D_ObjectsViaOpenSCAD (ObjList, Operation, doc=None)
def process2D_ObjectsViaOpenSCADShape (ObjList, Operation, doc)
def process3D_ObjectsViaOpenSCAD (doc, ObjList, Operation)
def process3D_ObjectsViaOpenSCADShape (ObjList, Operation, maxmeshpoints=None)
def process_ObjectsViaOpenSCAD (doc, children, name)
def process_ObjectsViaOpenSCADShape (doc, children, name, maxmeshpoints=None)
def removesubtree (objs)
def reverseimporttypes ()
def roundrotation (rot, maxangulardistance=1e-5)
def searchforopenscadexe ()
def shorthexfloat (f)
def translate (context, text)
def vec2householder (nv)
def workaroundforissue128needed ()


 BaseError = FreeCAD.Base.FreeCADError

Function Documentation

def OpenSCADUtils.angneg (   d)
def OpenSCADUtils.applyPlacement (   shape)
def OpenSCADUtils.callopenscad (   inputfilename,
  outputfilename = None,
  outputext = 'csg',
  keepname = False 
call the open scad binary
returns the filename of the result (or None),
please delete the file afterwards

Referenced by callopenscadstring().

def OpenSCADUtils.callopenscadmeshstring (   scadstr)
Call OpenSCAD and return the result as a Mesh

References callopenscadstring().

Referenced by meshopinline(), and meshoptempfile().

def OpenSCADUtils.callopenscadstring (   scadstr,
  outputext = 'csg' 
create a tempfile and call the open scad binary
returns the filename of the result (or None),
please delete the file afterwards

References callopenscad().

Referenced by OpenSCADCommands.AddSCADTask.addelement(), callopenscadmeshstring(), prototype.openscadmesh(), and process2D_ObjectsViaOpenSCADShape().

def OpenSCADUtils.comparerotations (   r1,
def OpenSCADUtils.decomposerotoinversion (   m,
  precision = 4 

References fcsubmatrix().

def OpenSCADUtils.detsubmatrix (   s)
get the determinant of a 3x3 Matrix given as list of row vectors

Referenced by isrotoinversionpython(), and isspecialorthogonalpython().

def OpenSCADUtils.fcsubmatrix (   m)
Extracts the 3x3 Submatrix from a freecad Matrix Object
as a list of row vectors

Referenced by decomposerotoinversion().

def OpenSCADUtils.findbestmatchingrotation (   r1)

References comparerotations().

Referenced by roundrotation().

def OpenSCADUtils.getopenscadversion (   osfilename = None)
def OpenSCADUtils.isorthogonal (   submatrix,
  precision = 4 
checking if 3x3 Matrix is ortogonal (M*Transp(M)==I)

References multiplymat().

Referenced by isrotoinversionpython(), and isspecialorthogonalpython().

def OpenSCADUtils.isrotoinversionpython (   submat,
  precision = 4 

References detsubmatrix(), and isorthogonal().

def OpenSCADUtils.isspecialorthogonal (   mat,
  precision = 4 
def OpenSCADUtils.isspecialorthogonalpython (   submat,
  precision = 4 

References detsubmatrix(), and isorthogonal().

def OpenSCADUtils.meshopinline (   opname,
uses OpenSCAD to combine meshes
takes the name of the CGAL operation and an iterable (tuple,list) of 
FreeCAD Mesh objects
includes all the mesh data in the SCAD file

References callopenscadmeshstring().

def OpenSCADUtils.meshoponobjs (   opname,
takes a string (operation name) and a list of Feature Objects
returns a mesh and a list of objects that were used
Part Objects will be meshed

References meshoptempfile().

def OpenSCADUtils.meshoptempfile (   opname,
uses OpenSCAD to combine meshes
takes the name of the CGAL operation and an iterable (tuple,list) of 
FreeCAD Mesh objects
uses stl files to supply the mesh data

References callopenscadmeshstring().

Referenced by meshoponobjs(), and process3D_ObjectsViaOpenSCADShape().

def OpenSCADUtils.mirror2mat (   nv,
def OpenSCADUtils.multiplymat (   l,
multiply matrices given as lists of row vectors

Referenced by isorthogonal().

def OpenSCADUtils.newtempfilename ( )
def OpenSCADUtils.process2D_ObjectsViaOpenSCAD (   ObjList,
  doc = None 
def OpenSCADUtils.process2D_ObjectsViaOpenSCADShape (   ObjList,
def OpenSCADUtils.process3D_ObjectsViaOpenSCAD (   doc,
def OpenSCADUtils.process3D_ObjectsViaOpenSCADShape (   ObjList,
  maxmeshpoints = None 
def OpenSCADUtils.process_ObjectsViaOpenSCAD (   doc,
def OpenSCADUtils.process_ObjectsViaOpenSCADShape (   doc,
  maxmeshpoints = None 
def OpenSCADUtils.removesubtree (   objs)
def OpenSCADUtils.reverseimporttypes ( )
allows to search for supported filetypes by module
def OpenSCADUtils.roundrotation (   rot,
  maxangulardistance = 1e-5 
guess the rotation axis and angle for a rotation
recreated from rounded floating point values
(from a quaterion or transformation matrix)

References comparerotations(), and findbestmatchingrotation().

def OpenSCADUtils.searchforopenscadexe ( )
def OpenSCADUtils.shorthexfloat (   f)
def OpenSCADUtils.translate (   context,
def OpenSCADUtils.vec2householder (   nv)
calculated the householder matrix for a given normal vector

Referenced by mirror2mat().

def OpenSCADUtils.workaroundforissue128needed ( )
sets the import path depending on the OpenSCAD Verion
for versions <= 2012.06.23 to the current working dir
for versions above to the inputfile dir

References getopenscadversion().

Referenced by prototype.readfile().

Variable Documentation

OpenSCADUtils.BaseError = FreeCAD.Base.FreeCADError