Commit 5ea0ae47 authored by Jan Möbius's avatar Jan Möbius
Browse files

Added two python scripting examples

parent 5cc32d37
......@@ -24,5 +24,49 @@
\subsection python_scripting_idlisttype IDList data type
The IdList type used in the C++ code is mapped from python. Details can be found here:
\subpage python_scripting_IDList_type
Here is a simple example of a python script using the holefiller:
# Load an object from a specific path
id = fileoff.loadObject("OpenFlipper-Free/OpenFlipper/")
# Prints the id of the new object
print("ID of new object is : " + str(id) )
# Selects a set of faces
# deletes the selected faces
# And runs the hole filler to close the holes produced by the previous operation
Another example produces an animation of a rotating object:
# We need numpy for array and vectors
import numpy as np
# Generate a cube via the primitivesgenerator plugin
# Set our animation parameters
animation_axis = np.array([-1.0,1.0,0.0]);
rotation_center = np.array([0.0,0.0,0.0])
# Loop over 360 degrees
for angle in range(0,360,1):
# Apply rotation
# Update the current view
# Update the ui
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment