Classes | |
class | OpenSCADError |
Functions | |
def | angneg (d) |
def | applyPlacement (shape) |
def | call_openscad_with_pipes (input_filename, output_filename, output_extension, keep_name) |
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 | getopenscadexe (osfilename=None) |
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 | mirrormesh (msh, vec) |
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 | resizemesh (msh, vec) |
def | reverseimporttypes () |
def | roundrotation (rot, maxangulardistance=1e-5) |
def | scalemesh (msh, vec) |
def | searchforopenscadexe () |
def | shorthexfloat (f) |
def | translate (context, text) |
def | vec2householder (nv) |
def | workaroundforissue128needed () |
Variables | |
BaseError = FreeCAD.Base.FreeCADError | |
def | tempfilenamegen = newtempfilename() |
def OpenSCADUtils.angneg | ( | d | ) |
def OpenSCADUtils.applyPlacement | ( | shape | ) |
def OpenSCADUtils.call_openscad_with_pipes | ( | input_filename, | |
output_filename, | |||
output_extension, | |||
keep_name | |||
) |
Call OpenSCAD by sending input data to stdin, and read the output from stdout. Returns the tempfile the output is stored in on success, or None on failure. NOTE: This feature was added to OpenSCAD in 2021.01
Referenced by callopenscad().
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
References call_openscad_with_pipes().
Referenced by callopenscadstring().
def OpenSCADUtils.callopenscadmeshstring | ( | scadstr | ) |
Call OpenSCAD and return the result as a Mesh
References callopenscadstring().
Referenced by meshopinline(), meshoptempfile(), mirrormesh(), resizemesh(), and scalemesh().
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, | |
r2 | |||
) |
Referenced by findbestmatchingrotation(), and roundrotation().
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.getopenscadexe | ( | osfilename = None | ) |
References searchforopenscadexe().
def OpenSCADUtils.getopenscadversion | ( | osfilename = None | ) |
Referenced by workaroundforissue128needed().
def OpenSCADUtils.isorthogonal | ( | submatrix, | |
precision = 4 |
|||
) |
checking if 3x3 Matrix is orthogonal (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 |
|||
) |
References draftgeoutils.linear_algebra.determinant().
def OpenSCADUtils.isspecialorthogonalpython | ( | submat, | |
precision = 4 |
|||
) |
References detsubmatrix(), and isorthogonal().
def OpenSCADUtils.meshopinline | ( | opname, | |
iterable1 | |||
) |
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, | |
inobjs | |||
) |
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, | |
iterable1 | |||
) |
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, | |
bv | |||
) |
References vec2householder().
Referenced by expandplacements.expandplacements().
def OpenSCADUtils.mirrormesh | ( | msh, | |
vec | |||
) |
mirrormesh(mesh,vector) where mesh is a mesh object and vector is a Base.Vector
References callopenscadmeshstring().
Referenced by OpenSCADCommands.MirrorMeshFeature.Activated().
def OpenSCADUtils.multiplymat | ( | l, | |
r | |||
) |
multiply matrices given as lists of row vectors
Referenced by isorthogonal().
def OpenSCADUtils.newtempfilename | ( | ) |
def OpenSCADUtils.process2D_ObjectsViaOpenSCAD | ( | ObjList, | |
Operation, | |||
doc = None |
|||
) |
References process2D_ObjectsViaOpenSCADShape().
Referenced by process_ObjectsViaOpenSCAD().
def OpenSCADUtils.process2D_ObjectsViaOpenSCADShape | ( | ObjList, | |
Operation, | |||
doc | |||
) |
References callopenscadstring(), and importDXF.export().
Referenced by process2D_ObjectsViaOpenSCAD(), and process_ObjectsViaOpenSCADShape().
def OpenSCADUtils.process3D_ObjectsViaOpenSCAD | ( | doc, | |
ObjList, | |||
Operation | |||
) |
References process3D_ObjectsViaOpenSCADShape().
Referenced by process_ObjectsViaOpenSCAD().
def OpenSCADUtils.process3D_ObjectsViaOpenSCADShape | ( | ObjList, | |
Operation, | |||
maxmeshpoints = None |
|||
) |
References meshoptempfile().
Referenced by process3D_ObjectsViaOpenSCAD(), and process_ObjectsViaOpenSCADShape().
def OpenSCADUtils.process_ObjectsViaOpenSCAD | ( | doc, | |
children, | |||
name | |||
) |
References process2D_ObjectsViaOpenSCAD(), and process3D_ObjectsViaOpenSCAD().
def OpenSCADUtils.process_ObjectsViaOpenSCADShape | ( | doc, | |
children, | |||
name, | |||
maxmeshpoints = None |
|||
) |
References process2D_ObjectsViaOpenSCADShape(), and process3D_ObjectsViaOpenSCADShape().
def OpenSCADUtils.removesubtree | ( | objs | ) |
Referenced by OpenSCADCommands.RemoveSubtree.Activated().
def OpenSCADUtils.resizemesh | ( | msh, | |
vec | |||
) |
resizemesh(mesh,vector) where mesh is a mesh object and vector is a Base.Vector
References callopenscadmeshstring().
Referenced by OpenSCADCommands.ResizeMeshFeature.Activated().
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.scalemesh | ( | msh, | |
vec | |||
) |
scalemesh(mesh,vector) where mesh is a mesh object and vector is a Base.Vector
References callopenscadmeshstring().
Referenced by OpenSCADCommands.ScaleMeshFeature.Activated().
def OpenSCADUtils.searchforopenscadexe | ( | ) |
Referenced by getopenscadexe(), and InitGui.OpenSCADWorkbench.Initialize().
def OpenSCADUtils.shorthexfloat | ( | f | ) |
def OpenSCADUtils.translate | ( | context, | |
text | |||
) |
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 Version for versions <= 2012.06.23 to the current working dir for versions above to the inputfile dir see https://github.com/openscad/openscad/issues/128
References getopenscadversion().
Referenced by prototype.readfile().
OpenSCADUtils.BaseError = FreeCAD.Base.FreeCADError |
def OpenSCADUtils.tempfilenamegen = newtempfilename() |