importOBJ Namespace Reference
OBJ file format exporter. More...
Functions | |
def | decode (txt) |
def | export (exportList, filename, colors=None) |
def | findVert (aVertex, aList) |
def | getIndices (obj, shape, offsetv, offsetvn) |
def | insert (filename, docname) |
def | makeMesh (doc, activeobject, verts, facets, material, colortable) |
def | open (filename) |
Variables | |
p = Draft.precision() | |
pythonopen = open | |
Detailed Description
OBJ file format exporter.
This module provides tools to import & export OBJ files. It is an alternative to the standard Mesh OBJ exporter and supports exporting faces with more than 3 vertices and supports object colors / materials
Function Documentation
◆ decode()
◆ export()
def importOBJ.export | ( | exportList, | |
filename, | |||
colors = None |
|||
) |
export(exportList,filename,colors=None): Called when freecad exports a file. exportList is a list of objects, filename is the .obj file to export (a .mtl file with same name will also be created together), and optionally colors can be a dict containing ["objectName:colorTuple"] pairs for use in non-GUI mode.
References decode(), getIndices(), and pythonopen.
◆ findVert()
def importOBJ.findVert | ( | aVertex, | |
aList | |||
) |
Referenced by getIndices().
◆ getIndices()
def importOBJ.getIndices | ( | obj, | |
shape, | |||
offsetv, | |||
offsetvn | |||
) |
References findVert().
Referenced by export().
◆ insert()
def importOBJ.insert | ( | filename, | |
docname | |||
) |
References decode(), makeMesh(), and pythonopen.
Referenced by open().
◆ makeMesh()
def importOBJ.makeMesh | ( | doc, | |
activeobject, | |||
verts, | |||
facets, | |||
material, | |||
colortable | |||
) |
Referenced by insert().
◆ open()
def importOBJ.open | ( | filename | ) |
References insert().
Variable Documentation
◆ p
importOBJ.p = Draft.precision() |