Introduction
Welcome to Pixyz Python API documentation.
Use the Table of Contents or the Search Bar to find documentation about Pixyz functions (sorted by modules: Core, IO, Scene,...), constants and types, to help you write Python scripts and plugins
To use this information, you should be familiar with the basic theory and practice of scripting in Pixyz Studio, which is explained here
CoreGUI applyApplicationStyle
Apply current application style sheet to a widget
coregui . applyApplicationStyle ( widget )
Parameters
Name
Type
Default
Description
widget
QWidget
Target widget
Dock the given widget to the application
coregui . dockWidget ( widget , "dockName" )
Parameters
Name
Type
Default
Description
widget
QWidget
Target widget
dockName
String
Dock widget name
executeCommandAsynchronously
Execute a piece of python code asynchonously
coregui . executeCommandAsynchronously ( "cmd" )
Parameters
Name
Type
Default
Description
cmd
String
Python code
getDefaultParent
Get the default parent widget
coregui . getDefaultParent ()
Returns
Name
Type
Description
defaultParentWidget
QWidget
getFunctionAction
Get the function widget
coregui . getFunctionAction ( "module" , "functionName" )
Parameters
Name
Type
Default
Description
module
String
Module name
functionName
String
Function name
Returns
Name
Type
Description
functionAction
QAction
getFunctionDialog
Get the function widget
coregui . getFunctionDialog ( "module" , "functionName" )
Parameters
Name
Type
Default
Description
module
String
Module name
functionName
String
Function name
Returns
Name
Type
Description
functionDialog
QDialog
Get the function widget
coregui . getFunctionWidget ( "module" , "functionName" , ShowDoc )
Parameters
Name
Type
Default
Description
module
String
Module name
functionName
String
Function name
showDoc
Boolean
Show documentation in function header
Returns
Get a module property widget
coregui . getModulePropertyWidget ( "module" , "propertyName" )
Parameters
Name
Type
Default
Description
module
String
Module name
propertyName
String
Property name
Returns
Name
Type
Description
propertyWidget
QWidget
Get the property widget
coregui . getPropertyWidget ( entity , "propertyName" )
Parameters
Name
Type
Default
Description
entity
Entity
Entity
propertyName
String
Proprtybname
Returns
Name
Type
Description
propertyWidget
QWidget
Get a Widget to edit a Pixyz API type
coregui . getValueWidget ( "moduleName" , "typeName" )
Parameters
Name
Type
Default
Description
moduleName
String
Module name
typeName
String
Type name
Returns
Name
Type
Description
valueWidget
QWidget
Core cloneEntity
Clone an entity
Parameters
Name
Type
Default
Description
entity
Entity
The entity to clone
Returns
Name
Type
Description
clonedEntity
Entity
The cloned entity
deleteEntities
Delete a set of entities
core . deleteEntities ( entities )
Parameters
Name
Type
Default
Description
entities
EntityList
List of entity to delete
resetSession
Clear all the current session (all unsaved work will be lost)
unsavedUserChanges
Returns true if the user has made changes to the project
core . unsavedUserChanges ()
Returns
Name
Type
Description
hasChanged
Bool
Boolean checking if the project has been modified
updateDocumentation
Update the documentation of available functions and plugins in HTML format
core . updateDocumentation ()
AtExit
Emitted when pixyz is closed
OnSessionReset
Emitted when pixyz's session is reset
ProgressChanged
Emits the progress of the progress bar
Parameters
Name
Type
Description
progress
Int
Current progression
ProgressStepFinished
Emits the name of finished step
ProgressStepStart
Emits the name of starting step
Parameters
Name
Type
Description
stepName
String
Name of the started step
getEvent
Get EventDesc of an event
core . getEvent ( "moduleName" , "eventName" )
Parameters
Name
Type
Default
Description
moduleName
String
Target module name
eventName
String
Returns
getFunction
Get FunctionDesc of a function
core . getFunction ( "moduleName" , "functionName" )
Parameters
Name
Type
Default
Description
moduleName
String
Target module name
functionName
String
Target function name
Returns
getFunctions
Get functions of a group
core . getFunctions ( "moduleName" , "groupName" )
Parameters
Name
Type
Default
Description
moduleName
String
Target module name
groupName
String
Target group name
Returns
getGroup
Get a group desc from a specific module
core . getGroup ( "moduleName" , "groupName" )
Parameters
Name
Type
Default
Description
moduleName
String
Target module name
groupName
String
Target group name
Returns
getGroups
Get all group desc of a module
core . getGroups ( "moduleName" )
Parameters
Name
Type
Default
Description
moduleName
String
Target module name
Returns
getModules
Get all modules desc
Returns
getModulesName
Get all modules name
Returns
getType
Get TypeDesc from a type name
core . getType ( "moduleName" , "typeNameStr" )
Parameters
Name
Type
Default
Description
moduleName
String
Target module name
typeNameStr
String
Target type name
Returns
getTypeAttributes
Get attributes TypeDesc from a type name
core . getTypeAttributes ( "moduleName" , "typeNameStr" )
Parameters
Name
Type
Default
Description
moduleName
String
Target module name
typeNameStr
String
Target type name
Returns
getTypeDescription
Get type description
core . getTypeDescription ( "name" , "moduleName" )
Parameters
Name
Type
Default
Description
name
String
Target type name
moduleName
String
Target module name
Returns
softStopAsyncEventManager
Ask the async EventManager to join the main thread, enableEventManagerAsync must be enable
core . softStopAsyncEventManager ()
lockProcessing
Lock the mutex that ensure no processing is done between lock/unlock
tryLockProcessing
Try to lock the mutex that ensure no processing is done between lock/unlock, returns true if the mutex has been locked, false if it was already locked
Returns
Name
Type
Description
locked
Bool
True if the mutex has been successfully locked
unlockProcessing
Unlock the mutex that ensure no processing is done between lock/unlock
askString
Invite the user to enter a string
core . askString ( "msg" , "" )
Parameters
Name
Type
Default
Description
msg
String
Message to display
defaultValue
String
""
Message to display
Returns
Name
Type
Description
text
String
The string entered by the user
askYesNo
Ask a question which need a Yes/No answer
core . askYesNo ( "question" , False )
Parameters
Name
Type
Default
Description
question
String
Question to display
defaultValue
Boolean
false
Default value (if interfactive mode is disabled)
Returns
Name
Type
Description
answer
Boolean
True if the user say Yes, else False
choose
Invite the user to choose one value between multiple choice
core . choose ( "message" , values , 0 )
Parameters
Name
Type
Default
Description
message
String
Message to display
values
StringList
Possible values to choose
defaultValue
Int
0
Default value index
Returns
Name
Type
Description
choice
Int
Index of the chosen value in the values list
isInteractiveMode
Returns True if the script is in interactive mode, else returns false
Returns
Name
Type
Description
interactive
Boolean
True if interactive, else false
message
Display a message (or a MessageBox in GUI)
Parameters
Name
Type
Default
Description
msg
String
Message to display
setInteractiveMode
Switch between interactive mode and non-interactive mode, UI functions will no ask user on non-interactive mode and will return default values
core . setInteractiveMode ( True )
Parameters
Name
Type
Default
Description
interactive
Boolean
true
True if you want to enter interactive mode, else False
getAllEntities
Returns all the entities on the database
Returns
Name
Type
Description
entities
EntityList
All entities
getEntityType
Returns the type id of the entity
core . getEntityType ( entity )
Parameters
Name
Type
Default
Description
entity
Entity
The wanted entity
Returns
Name
Type
Description
type
Int
Type id of the entity
getEntityTypeFromString
Returns the type id of the entity
core . getEntityTypeFromString ( "entityTypeString" )
Parameters
Name
Type
Default
Description
entityTypeString
String
The wanted entity type
Returns
Name
Type
Description
type
Int
Type id of the entity
getEntityTypeString
Returns the type name of the entity
core . getEntityTypeString ( entity )
Parameters
Name
Type
Default
Description
entity
Entity
The wanted entity
Returns
Name
Type
Description
type
String
Name of the entity type
getTypeStats
Get the database stats
Returns
load
Load a new scene
Parameters
Name
Type
Default
Description
fileName
FilePath
Path to load the file
save
Save the scene
Parameters
Name
Type
Default
Description
fileName
OutputFilePath
Path to save the file
exportPresets
Export all presets
core . exportPresets ( fileName )
Parameters
Name
Type
Default
Description
fileName
OutputFilePath
Path to save the preset file
importPresets
Import presets from file
core . importPresets ( fileName )
Parameters
Name
Type
Default
Description
fileName
FilePath
Path to the preset file to load
removeAllPresets
Remove all presets
addWantedToken
Add a license token to the list of wanted optional tokens
core . addWantedToken ( "tokenName" )
Parameters
Name
Type
Default
Description
tokenName
String
Wanted token
checkLicense
Check the current license
Returns
Name
Type
Description
valid
Boolean
Configure the license server to use to get floating licenses
core . configureLicenseServer ( "address" , port , True )
Parameters
Name
Type
Default
Description
address
String
Server address
port
UShort
Server port
flexLM
Boolean
true
Enable FlexLM license server
generateActivationCode
Create an activation code to generate an offline license
core . generateActivationCode ( filePath )
Parameters
Name
Type
Default
Description
filePath
OutputFilePath
Path to write the activation code
generateDeactivationCode
Create an deactivation code to release the license from this machine
core . generateDeactivationCode ( filePath )
Parameters
Name
Type
Default
Description
filePath
OutputFilePath
Path to write the deactivation code
getCurrentLicenseInfos
Get information on current installed license
core . getCurrentLicenseInfos ()
Returns
getLicenseServer
Get current license server
Returns
Name
Type
Description
serverHost
String
Server host name or IP
serverPort
UShort
Server port
useFlexLM
Bool
Set to true if flexLM server
installLicense
Install a new license
core . installLicense ( licensePath )
Parameters
Name
Type
Default
Description
licensePath
FilePath
Path of the license file
isFloatingLicense
Tells if license is floating
Returns
Name
Type
Description
floating
Bool
listOwnedTokens
Get the list of actually owned license tokens
Returns
Name
Type
Description
ownedTokens
StringList
Owned token list
listTokens
Get the list of license tokens for this product
Parameters
Name
Type
Default
Description
onlyMandatory
Bool
false
If True, optional tokens will not be returned
Returns
Name
Type
Description
tokens
StringList
Token list
needToken
Ensure that a license token is available, useful to be sure to own floatting licence tokens
core . needToken ( "tokenName" )
Parameters
Name
Type
Default
Description
tokenName
String
Token name
releaseToken
Release an optional license token
core . releaseToken ( "tokenName" )
Parameters
Name
Type
Default
Description
tokenName
String
Token name
releaseWebLicense
Release License owned by user WEB account
core . releaseWebLicense ( "login" , password , id )
Parameters
Name
Type
Default
Description
login
String
WEB account login
password
Password
WEB account password
id
Ident
WEB license id
removeWantedToken
Remove a license token from the list of wanted optional tokens
core . removeWantedToken ( "tokenName" )
Parameters
Name
Type
Default
Description
tokenName
String
Unwanted token
requestWebLicense
Request License owned by user WEB account
core . requestWebLicense ( "login" , password , id )
Parameters
Name
Type
Default
Description
login
String
WEB account login
password
Password
WEB account password
id
Ident
WEB license id
retrieveWebLicenses
Retrieves License owned by user WEB account
core . retrieveWebLicenses ( "login" , password )
Parameters
Name
Type
Default
Description
login
String
WEB account login
password
Password
WEB account password
Returns
tokenValid
Returns True if a token is owned by the product
core . tokenValid ( "tokenName" )
Parameters
Name
Type
Default
Description
tokenName
String
Token name
Returns
Name
Type
Description
valid
Bool
getOutputFilePath
Return a complete output file path for Pixyz Pipeline, this function is useful for online usage when you know where is the output directory
core . getOutputFilePath ( "fileName" , "none" )
Parameters
Name
Type
Default
Description
fileName
String
The desired file name (suffix of the path)
data
String
"none"
Optional data associated with file
Returns
Name
Type
Description
filePath
OutputFilePath
The complete generated file path
executeCommand
Execute a command
Parameters
Name
Type
Default
Description
cmd
String
""
Command to execute
installPlugin
Install a new plugin
core . installPlugin ( pluginFile , True , True )
Parameters
Name
Type
Default
Description
pluginFile
FilePath
Path to the plugin to be installed
installForAllUsers
Boolean
true
If false only the current user will see the plugin installed
generateDocumentation
Boolean
true
If false the documentation of the plugin is not generated
popProgression
Leave current progression level
pushProgression
Create a new progression level
core . pushProgression ( stepCount , "" )
Parameters
Name
Type
Default
Description
stepCount
Int
Step count
progressName
String
""
Name of the progression step
stepProgression
Add a step to current progression level
Parameters
Name
Type
Default
Description
stepCount
Int
1
Step count
addCustomProperty
Add a custom property to an entity that support custom properties
core . addCustomProperty ( entity , "name" , "" )
Parameters
Name
Type
Default
Description
entity
Entity
An entity that support custom properties
name
String
Name of the custom property
value
String
""
Value of the custom property
getModuleProperty
Returns the value of a module property
core . getModuleProperty ( "module" , "propertyName" )
Parameters
Name
Type
Default
Description
module
String
Name of the module
propertyName
String
The property name
Returns
Name
Type
Description
propertyValue
String
The property value
getProperties
Get the property value on entities (if the property is not set on an entity, defaultValue is returned)
core . getProperties ( entities , "propertyName" , "" )
Parameters
Name
Type
Default
Description
entities
EntityList
List of entities
propertyName
String
The property name
defaultValue
String
""
Default value to return if the property does not exist on an entity
Returns
Name
Type
Description
values
StringList
Property value on each entity
getProperty
Get a property value as String on an entity (error if the property does not exist on the entity)
core . getProperty ( entity , "propertyName" )
Parameters
Name
Type
Default
Description
entity
Entity
The entity
propertyName
String
The property name
Returns
Name
Type
Description
value
String
The property value as String
hasProperty
Return true if the property was found on the occurrence, will not throw any exception except if the entity does not exist.
core . hasProperty ( entity , "propertyName" )
Parameters
Name
Type
Default
Description
entity
Entity
An entity that support properties
propertyName
String
Name of the property
Returns
Name
Type
Description
propertyFound
Boolean
True if the entity has the property asked, else False
listModuleProperties
Returns all the properties in the given module
core . listModuleProperties ( "module" )
Parameters
Name
Type
Default
Description
module
String
Name of the module
Returns
Name
Type
Description
properties
PropertyInfoList
List of module properties info
listProperties
Returns the name of the properties available on an entity
core . listProperties ( entity )
Parameters
Name
Type
Default
Description
entity
Entity
Entity to list
Returns
Name
Type
Description
properties
PropertyInfoList
List of available properties info
removeCustomProperty
Remove a custom property from an entity that support custom properties
core . removeCustomProperty ( entity , "name" )
Parameters
Name
Type
Default
Description
entity
Entity
An entity that support custom properties
name
String
Name of the custom property
restoreModulePropertyDefaultValue
Restore the default value of a module property
core . restoreModulePropertyDefaultValue ( "module" , "propertyName" )
Parameters
Name
Type
Default
Description
module
String
Name of the module
propertyName
String
The property name
Returns
Name
Type
Description
value
String
The property value as String
setModuleProperty
Set the value of a module property
core . setModuleProperty ( "module" , "propertyName" , "propertyValue" )
Parameters
Name
Type
Default
Description
module
String
Name of the module
propertyName
String
The property name
propertyValue
String
The property value
Returns
Name
Type
Description
value
String
The property value as String
setProperty
Set a property value on an entity
core . setProperty ( entity , "propertyName" , "propertyValue" )
Parameters
Name
Type
Default
Description
entity
Entity
The entity
propertyName
String
The property name
propertyValue
String
The property value
Returns
Name
Type
Description
value
String
The property value as String
supportCustomProperties
Return true if an entity support custom properties
core . supportCustomProperties ( entity )
Parameters
Name
Type
Default
Description
entity
Entity
An entity
Returns
Name
Type
Description
support
Boolean
True if the entity support custom properties, else False
availableMemory
Returns available memory
Returns
Name
Type
Description
availVirt
Long
Available virtual memory in bytes
totalVirt
Long
Total virtual memory in bytes
availPhys
Long
Available physical memory in bytes
totalPhys
Long
Total physical memory in bytes
checkForUpdates
Check for software update
Returns
Name
Type
Description
newVersionAvailable
Bool
True if there is a new version available of this product
newVersion
String
New version value
newVersionLink
String
Link to download the new version
clearOtherTemporaryDirectories
Remove all other session temporary directories (warning: make sure that no other instance of pixyz is running
core . clearOtherTemporaryDirectories ()
getCustomVersionTag
Get the Pixyz custom version tag
core . getCustomVersionTag ()
Returns
Name
Type
Description
customVersionTag
String
getInstallationDirectory
Get the Pixyz installation directory
core . getInstallationDirectory ()
Returns
Name
Type
Description
installDir
String
getMemoryUsagePeak
Returns the memory usage peak of the current process in MB ( only available on windows yet )
core . getMemoryUsagePeak ()
Returns
Name
Type
Description
peakWorkingSet
Long
Maximum physical memory used by the process until now (in MB)
getPixyzWebsiteURL
Get the Pixyz website URL
core . getPixyzWebsiteURL ()
Returns
Name
Type
Description
url
String
getProductDocumentationURL
Get the product documentation URL
core . getProductDocumentationURL ()
Returns
Name
Type
Description
url
String
getProductName
Get the Pixyz product name
Returns
Name
Type
Description
productName
String
getTempDirectory
Get the Pixyz temp directory
Returns
Name
Type
Description
tmpDir
String
getVersion
Get the Pixyz product version
Returns
Name
Type
Description
version
String
pushAnalytic
Push custom analytic event (Only for authorized products)
core . pushAnalytic ( "name" , "" )
Parameters
Name
Type
Default
Description
name
String
Analytic event name
data
String
""
Analytic event data
setCurrentThreadAsProcessThread
Set thread
core . setCurrentThreadAsProcessThread ()
clearUndoRedo
Clear undo/redo history
getRedoStack
Get the history of actions stack
Returns
getUndoStack
Get the history of actions stack
Returns
redo
Redo some steps
Parameters
Name
Type
Default
Description
count
UInt
1
toggleUndoRedo
Toggle undo/redo
undo
Undo some steps
Parameters
Name
Type
Default
Description
count
UInt
1
getColorFromIndex
Returns a unique color associated with an index
core . getColorFromIndex ( index )
Parameters
Name
Type
Default
Description
index
Int
Index of the color (index must be less than 2^24)
Returns
Name
Type
Description
color
Color
The unique color associated to the given index
addConsoleVerbose
Add a console verbose level
core . addConsoleVerbose ( level )
Parameters
Name
Type
Default
Description
level
Verbose
Verbose level
addLogFileVerbose
Add a log file verbose level
core . addLogFileVerbose ( level )
Parameters
Name
Type
Default
Description
level
Verbose
Verbose level
addSessionLogFileVerbose
Add a session log file (lastSession.log) verbose level
core . addSessionLogFileVerbose ( level )
Parameters
Name
Type
Default
Description
level
Verbose
Verbose level
Set new configuration for the Interface Logger
core . configureInterfaceLogger ( True , True , True )
Parameters
Name
Type
Default
Description
enableFunction
Boolean
true
If true, the called function names will be print
enableParameters
Boolean
true
If true, the called function parameters will be print (only if enableFunction=true too)
enableExecutionTime
Boolean
true
If true, the called functions execution times will be print
getInterfaceLoggerConfiguration
Get the current Interface Logger configuration
core . getInterfaceLoggerConfiguration ()
Returns
Name
Type
Description
functionEnabled
Boolean
True if the called function names are printed
parametersEnabled
Boolean
True if the called function parameters are printed
executionTimeEnabled
Boolean
True if the called functions execution times are printed
removeConsoleVerbose
Remove a console verbose level
core . removeConsoleVerbose ( level )
Parameters
Name
Type
Default
Description
level
Verbose
Verbose level
removeLogFileVerbose
Remove a log file verbose level
core . removeLogFileVerbose ( level )
Parameters
Name
Type
Default
Description
level
Verbose
Verbose level
removeSessionLogFileVerbose
Remove a session log file (lastSession.log) verbose level
core . removeSessionLogFileVerbose ( level )
Parameters
Name
Type
Default
Description
level
Verbose
Verbose level
setLogFile
Set the path of the log file
Parameters
Name
Type
Default
Description
path
OutputFilePath
Path of the log file
Geom
Apply a transformation matrix to a geometrical entity
geom . applyTransform ( entity , [[ 1 , 0 , 0 , 0 ],[ 0 , 1 , 0 , 0 ],[ 0 , 0 , 1 , 0 ],[ 0 , 0 , 0 , 1 ]])
Parameters
Name
Type
Default
Description
entity
GeomEntity
The geometric entity
matrix
Matrix4
[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]
The transformation matrix
getEntityAABB
Retrieve the Axis-Aligned Bounded Box of a geometric entity
geom . getEntityAABB ( entity )
Parameters
Name
Type
Default
Description
entity
GeomEntity
The geometric entity
Returns
Name
Type
Description
aabb
AABB
The axis aligned bounded box
changeOfBasisMatrix
Construct a Change of Basis Matrix (e.g multiplying the point [0,0,0] will result to the point origin)
geom . changeOfBasisMatrix ( origin , x , y , z )
Parameters
Name
Type
Default
Description
origin
Point3
Origin of the new basis
x
Vector3
X axis of the new basis
y
Vector3
Y axis of the new basis
z
Vector3
Z axis of the new basis
Returns
Name
Type
Description
changeOfBasis
Matrix4
The change of basis matrix
fromLookAtMatrix
Get camera position, up and target vectors
geom . fromLookAtMatrix ( matrix , 1 )
Parameters
Name
Type
Default
Description
matrix
Matrix4
The created Matrix
distanceFromTarget
Distance
1
Returns
Name
Type
Description
position
Point3
The camera position
up
Vector3
The up vector
target
Point3
The target position
fromOriginNormal
Create a Matrix from an origin and a normal vector
geom . fromOriginNormal ( origin , normal )
Parameters
Name
Type
Default
Description
origin
Point3
The origin point
normal
Vector3
The normal vector
Returns
Name
Type
Description
matrix
Matrix4
The created Matrix
fromTRS
Create a Matrix from translation, rotation and scaling vectors
Parameters
Name
Type
Default
Description
T
Vector3
The translation vector
R
Vector3
The rotations vector
S
Vector3
The scaling vector
Returns
Name
Type
Description
matrix
Matrix4
The created Matrix
invertMatrix
Invert a matrix
geom . invertMatrix ( geom . IdentityMatrix4 )
Parameters
Name
Type
Default
Description
matrix
Matrix4
geom.IdentityMatrix4
The matrix to invert
Returns
Name
Type
Description
inverted
Matrix4
The inverted matrix
lookAtMatrix
Create a matrix from a camera position, up and target
geom . lookAtMatrix ( position , up , target )
Parameters
Name
Type
Default
Description
position
Point3
The camera position
up
Vector3
The up vector
target
Point3
The target position
Returns
Name
Type
Description
matrix
Matrix4
The created matrix
multiplyMatrices
Multiply two matrices, returns left*right
geom . multiplyMatrices ( geom . IdentityMatrix4 , geom . IdentityMatrix4 )
Parameters
Name
Type
Default
Description
left
Matrix4
geom.IdentityMatrix4
Left side matrix
right
Matrix4
geom.IdentityMatrix4
Right side matrix
Returns
Name
Type
Description
result
Matrix4
Result of the matrices multiplication
multiplyMatrixPoint
Multiply a point by a matrix (i.e apply the matrix to a point)
geom . multiplyMatrixPoint ( geom . IdentityMatrix4 , point )
Parameters
Name
Type
Default
Description
matrix
Matrix4
geom.IdentityMatrix4
The matrix to apply
point
Point3
The point to multiply
Returns
Name
Type
Description
result
Point3
The resulting point
multiplyMatrixVector
Multiply a vector by a matrix (i.e apply the matrix to a vector)
geom . multiplyMatrixVector ( geom . IdentityMatrix4 , vector )
Parameters
Name
Type
Default
Description
matrix
Matrix4
geom.IdentityMatrix4
The matrix to apply
vector
Vector3
The vector to multiply
Returns
Name
Type
Description
result
Vector3
The resulting point
orthographicMatrix
Create an orthographic matrix from a 3D width, a 3D height, a near, and a far clipping distance
geom . orthographicMatrix ( width3D , height3D , nearClipDistance , farClipDistance )
Parameters
Name
Type
Default
Description
width3D
Double
The 3D width to consider
height3D
Double
The 3D height to consider
nearClipDistance
Distance
The near clipping distance
farClipDistance
Distance
The far clipping distance
Returns
Name
Type
Description
matrix
Matrix4
The created matrix
perspectiveMatrix
Create a perspective matrix from a fovX, an aspect ratio, a near, and a far clipping distance
geom . perspectiveMatrix ( fovX , aspectRatio , nearClipDistance , farClipDistance )
Parameters
Name
Type
Default
Description
fovX
Double
The field of view on the x axis (degrees)
aspectRatio
Double
The aspect ratio foxX/fovY
nearClipDistance
Distance
The near clipping distance
farClipDistance
Distance
The far clipping distance
Returns
Name
Type
Description
matrix
Matrix4
The created matrix
toTRS
Decompose a Matrix into translation, rotation and scaling vectors
geom . toTRS ( geom . IdentityMatrix4 )
Parameters
Name
Type
Default
Description
matrix
Matrix4
geom.IdentityMatrix4
The Matrix to be decomposed
Returns
IO exportSceneToReflect
Export current scene to a reflect project
io . exportSceneToReflect ( 0 , "" , "" , False , "" , True )
Parameters
Name
Type
Default
Description
root
Occurrence
0
Identifier of the destination occurrence
sourceName
String
""
Push source name
uid
String
""
UID of the push, overwrite old push if it's same UID
keepHierarchy
Boolean
false
Keep hierarchy or rake tree
configFile
FilePath
""
Use existing JSON config file, discard reflect UI prompt
disableDecimation
Boolean
true
Forces to disable the decimation applied on SyncObjectInstances on Reflect Server side
exportScene
Export a file
io . exportScene ( fileName , 0 )
Parameters
Name
Type
Default
Description
fileName
OutputFilePath
Path of the file to export
root
Occurrence
0
Identifier of the root occurrence to export
exportSelection
Export the selection to a file
io . exportSelection ( fileName , False )
Parameters
Name
Type
Default
Description
fileName
OutputFilePath
Path of the file to export
keepIntermediaryNodes
Boolean
false
If true, intermerdiary hierarchy is kept
Give all the format name and their extensions that can be exported in Pixyz
Returns
Name
Type
Description
formats
FormatList
Formats that can be exported in Pixyz
Give all the format name and their extensions that can be imported in Pixyz
Returns
Name
Type
Description
formats
FormatList
Formats that can be imported in Pixyz
importFiles
Import files
io . importFiles ( fileNames , 0 )
Parameters
Name
Type
Default
Description
fileNames
FilesList
List of files's paths to import
root
Occurrence
0
Identifier of the destination occurrence
Returns
Name
Type
Description
dest
OccurrenceList
The root occurrences of each imported file
importPicture
Imports a picture and applies is at as a texture on a 3D plane created in the scene.
io . importPicture ( filename , 0 )
Parameters
Name
Type
Default
Description
filename
FilePath
Path of the file to import
root
Occurrence
0
Identifier of the destination occurrence
Returns
Name
Type
Description
dest
Occurrence
The root occurrence if defined, otherwise a new occurrence created by the importer
importScene
Import a file
io . importScene ( fileName , 0 )
Parameters
Name
Type
Default
Description
fileName
FilePath
Path of the file to import
root
Occurrence
0
Identifier of the destination occurrence
Returns
Name
Type
Description
dest
Occurrence
The root occurrence if defined, otherwise a new occurrence created by the importer
splitPointCloudio . splitPointCloud ( files , outputDirectory , minVoxSize , UseKDTree , aabb , - 1 )
Parameters
Name
Type
Default
Description
files
FilePathList
Path of the point cloud files to process
outputDirectory
OutputDirectoryPath
Output directory
minVoxSize
Double
Size of minimum leaves (mm)
useKDTree
Boolean
If true, uses a kd_tree, otherwise, uses an octree
aabb
AABB
Global scene aabb
density
Double
-1
Point cloud density (-1 to compute)
SceneGUI
Add widget component to the application
scenegui . addWidgetComponent ( occurrence , widget , width , height )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
Targeted occurrence
widget
QWidget
Widget to attach
width
Double
Widget width
height
Double
Widget height
Returns
collapseTree
Collapse the product structure
Forward event to widget
scenegui . deliverWidgetEvent ( event , coord , component )
Parameters
expandTree
Expand the product structure
findSelectionInTree
Find selection in product structure
scenegui . findSelectionInTree ()
Scene addComponent
Add a component to an occurrence
scene . addComponent ( occurrence , componentType )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
The occurrence to add the new component
componentType
ComponentType
Type of the component
Returns
Name
Type
Description
component
Component
The new component added to occurrence
addComponents
Add a components to each occurrence in the array
scene . addComponents ( occurrences , componentType )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences that need the component to be added
componentType
ComponentType
Type of the component
Returns
Name
Type
Description
components
ComponentList
Component that were added or retrieved
addLightComponent
Add a light component to an occurrence
scene . addLightComponent ( occurrence )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
The occurrence to add the new component
Returns
Name
Type
Description
component
Component
The new component added to occurrence
Add a new metadata property to a metadata component
scene . addMetadata ( metadata , "name" , "value" )
Parameters
Name
Type
Default
Description
metadata
Metadata
The metadata component
name
String
The new property name
value
String
The new property value
Add a new metadata property to a metadata component
scene . addMetadataBlock ( metadata , names , values )
Parameters
Name
Type
Default
Description
metadata
Metadata
The metadata component
names
StringList
The new properties names
values
StringList
The new properties values
cleanUnusedImages
Remove unused images from texture library
scene . cleanUnusedImages ()
Returns
Name
Type
Description
nbTextureDeleted
Int
The number of texture deleted by the clean
cleanUnusedMaterials
Remove unused materials from material library
scene . cleanUnusedMaterials ( False )
Parameters
Name
Type
Default
Description
cleanImages
Boolean
false
Call cleanUnusedImages if true
Returns
Name
Type
Description
nbMaterialDeleted
Int
The number of material deleted by the clean
computeSubTreeChecksum
Compute the checksum of a sub-tree
scene . computeSubTreeChecksum ( root )
Parameters
Name
Type
Default
Description
root
Occurrence
Occurrence to compute
Returns
Name
Type
Description
checksum
String
convertMaterialsToColor
Convert all materials to materials with a color pattern, trying to keep the visual aspect as similar as possible
scene . convertMaterialsToColor ([])
Parameters
Name
Type
Default
Description
materials
MaterialList
[]
Materials to merge (merge all materials if empty)
convertMaterialsToPBR
Convert all materials to materials with a PBR pattern, trying to keep the visual aspect as similar as possible
scene . convertMaterialsToPBR ([])
Parameters
Name
Type
Default
Description
materials
MaterialList
[]
Materials to merge (merge all materials if empty)
createCone
Create a new cone
scene . createCone ( 250 , 500 , 16 , True )
Parameters
Name
Type
Default
Description
bottomRadius
Double
250
Radius of the bottom of the cone
height
Double
500
Height of the cone
sides
Int
16
Number of sides of the cone
generateUV
Boolean
true
Generation of the UV
Returns
Name
Type
Description
occurrence
Occurrence
The created Occurrence
createCube
Create a new cube
scene . createCube ( 1000 , 1000 , 1000 , 1 , True )
Parameters
Name
Type
Default
Description
sizeX
Double
1000
Size of the Cube on the x axis
sizeY
Double
1000
Size of the Cube on the y axis
sizeZ
Double
1000
Size of the Cube on the z axis
subdivision
Int
1
Subdivision of the Cube on all the axis
generateUV
Boolean
true
Generation of the UV
Returns
Name
Type
Description
occurrence
Occurrence
The created Occurrence
createCylinder
Create a new cylinder
scene . createCylinder ( 250 , 1000 , 16 , True )
Parameters
Name
Type
Default
Description
radius
Double
250
Radius of the Cylinder
height
Double
1000
Height of the Cylinder
sides
Int
16
Number of Sides of the Cylinder
generateUV
Boolean
true
Generation of the UV
Returns
Name
Type
Description
occurrence
Occurrence
The created Occurrence
createDirectionalLight
Create a new directional light
scene . createDirectionalLight ( core . Color ( 1 , 1 , 1 , 1 ), 1.0 , geom . Vector3 ( 0 , 0 , 1 ))
Parameters
Name
Type
Default
Description
color
Color
core.Color(1,1,1,1)
Color of the light
power
Double
1.0
Intensity of the light
direction
Vector3
geom.Vector3(0,0,1)
Relative direction of the light
Returns
createImmersion
Create a new bagel klein
scene . createImmersion ( 2.5 , 100 , 15 )
Parameters
Name
Type
Default
Description
radius
Double
2.5
Radius of the Immersion
subdivisionX
Int
100
Subdivision of the Immersion on the Latitude
subdivisionY
Int
15
Subdivision of the Immersion on the Longitude
Returns
Name
Type
Description
occurrence
Occurrence
The created Occurrence
Create Metadata components from definitions
scene . createMetadatasFromDefinitions ( occurrences , definitions )
Parameters
Returns
Name
Type
Description
metadatas
MetadataList
List of metadata components created from definitions (if definition is empty no component is created)
createOBBMeshscene . createOBBMesh ( occurrence )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
Returns
Name
Type
Description
obbOccurrence
Occurrence
The create occurrence
createOccurrence
Create a new occurrence
scene . createOccurrence ( "name" , parent )
Parameters
Name
Type
Default
Description
name
String
Name of the new occurrence
parent
Occurrence
Create the occurrence as a child of parent, if not set the parent will be root
Returns
Name
Type
Description
occurrence
Occurrence
Created occurrence
createOccurrenceFromSelection
Create a new occurrence and add the given occurrences as children
scene . createOccurrenceFromSelection ( "name" , children , parent , True )
Parameters
Name
Type
Default
Description
name
String
Name of the new occurrence
children
OccurrenceList
Add given occurrence as children (if any)
parent
Occurrence
If defined, the new occurrence will be created as a child of this parent. Else if children are defined, the first common parent of children will be used as a parent for this new occurrence. Last resort will be to use the root as parent
keepMaterialAssignment
Boolean
true
If defined, material assignation will be updated to keep the visual same aspect
Returns
Name
Type
Description
occurrence
Occurrence
Created occurrence
createOccurrenceFromText
Creates an occurrence from string
scene . createOccurrenceFromText ( "text" , "ChicFont" , 64 , color , 40 )
Parameters
Name
Type
Default
Description
text
String
The occurrence's name
font
String
"ChicFont"
The font to use
fontSize
Int
64
The font size
color
ColorAlpha
The occurrence color
heigth3D
Double
40
3D height of text
Returns
createOccurrences
Create one new occurrence under each given parent
scene . createOccurrences ( "name" , parents )
Parameters
Name
Type
Default
Description
name
String
Name of the new occurrence
parents
OccurrenceList
Create the occurrences as a child of each parent. If empty, one occurrence will be created with root as parent
Returns
createPartsFromMeshes
Create a set of Parts given meshes and occurrences
scene . createPartsFromMeshes ( occurrences , meshes )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
The occurrence which will contains the part component of the mesh at the same index
meshes
MeshList
List of mesh to create part, if the mesh is invalid (e.g 0) no part will be created and 0 will be returned in the parts list at this index
Returns
Name
Type
Description
parts
PartList
List of created parts components, if there is no mesh at an index, no part is created and the identifier is 0
createPlane
Create a new plane
scene . createPlane ( 1000 , 1000 , 1 , 1 , True )
Parameters
Name
Type
Default
Description
sizeY
Double
1000
Size of the Plane on the y axis
sizeX
Double
1000
Size of the Plane on the x axis
subdivisionX
Int
1
Subdivision of the Plane on the x axis
subdivisionY
Int
1
Subdivision of the Plane on the y axis
generateUV
Boolean
true
Generation of the UV
Returns
Name
Type
Description
occurrence
Occurrence
The created Occurrence
createPositionalLight
Create a new positional light
scene . createPositionalLight ( core . Color ( 1 , 1 , 1 , 1 ), 1.0 , position )
Parameters
Name
Type
Default
Description
color
Color
core.Color(1,1,1,1)
Color of the light
power
Double
1.0
Intensity of the light
position
Point3
Relative position of the light
Returns
createSceneFromMeshes
Create a scene tree with a list of meshes, all meshes becomes part occurrences with the same root. The same mesh Id can be used several times to handle create instances (prototypes)
scene . createSceneFromMeshes ( meshes , matrices , True )
Parameters
Name
Type
Default
Description
meshes
MeshList
List of input meshes
matrices
Matrix4List
List of matrices of input meshes (if empty Identity will be used)
centerPartPivots
Boolean
true
If True, the input meshes will be centered in their local coordinate system and the translation will be set as part matrix. If you want to rollback the meshes to their initial pivots use 'resetPartTransform' function
Returns
Name
Type
Description
root
Occurrence
The created root occurrence
createSphere
Create a new sphere
scene . createSphere ( 500 , 16 , 16 , True )
Parameters
Name
Type
Default
Description
radius
Double
500
Radius of the Sphere
subdivisionLatitude
Int
16
Subdivision of the Sphere on the Latitude
subdivisionLongitude
Int
16
Subdivision of the Sphere on the Longitude
generateUV
Boolean
true
Generation of the UV
Returns
Name
Type
Description
occurrence
Occurrence
The created Occurrence
createSpotLight
Create a new spot light
scene . createSpotLight ( core . Color ( 1 , 1 , 1 , 1 ), 1.0 , position , geom . Vector3 ( 0 , 0 , 1 ), 20 )
Parameters
Name
Type
Default
Description
color
Color
core.Color(1,1,1,1)
Color of the light
power
Double
1.0
Intensity of the light
position
Point3
Relative position of the light
direction
Vector3
geom.Vector3(0,0,1)
Relative direction of the light
cutoff
Angle
20
Cutoff angle of the spot light
Returns
Name
Type
Description
light
SpotLight
The created spot light
createSubTree
Create a complete scene tree
scene . createSubTree ( tree , 0 , True )
Parameters
Name
Type
Default
Description
tree
PackedTree
root
Occurrence
0
Specify the root occurrence of the scene
replaceRoot
Bool
true
If true, the root occurrence will be replaced by the root of the given tree, else it will be added as a child
Returns
Name
Type
Description
occurrences
OccurrenceList
Create occurrences (equivalent to tree.occurrences)
createTorus
Create a new torus
scene . createTorus ( 250 , 75 , 16 , 16 )
Parameters
Name
Type
Default
Description
majorRadius
Double
250
Major Radius
minorRadius
Double
75
Minor Radius
subdivisionLatitude
Int
16
Subdivision of the Torus on the Latitude
subdivisionLongitude
Int
16
Subdivision of the Torus on the Longitude
Returns
Name
Type
Description
occurrence
Occurrence
The created Occurrence
deleteComponentByType
Delete component from type
scene . deleteComponentByType ( componentType , occurrence , True )
Parameters
Name
Type
Default
Description
componentType
ComponentType
Type of the component
occurrence
Occurrence
The occurrence to remove components from
followPrototypes
Bool
true
If true and if the component is not set on the occurrence, try to find it on its prototyping chain
deleteComponentsByType
Delete all components on subtree from type
scene . deleteComponentsByType ( componentType , rootOccurrence )
Parameters
Name
Type
Default
Description
componentType
ComponentType
Type of the component
rootOccurrence
Occurrence
The root occurrence to remove components from
deleteEmptyOccurrences
Delete all empty assemblies
scene . deleteEmptyOccurrences ( 0 )
Parameters
Name
Type
Default
Description
root
Occurrence
0
Root occurrence for the process
deleteOccurrences
Delete a liste of occurrences
scene . deleteOccurrences ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences to delete
findByActiveMaterial
Find all part occurrence with a given material as active material (i.e. as seen in the rendering)
scene . findByActiveMaterial ( material , roots )
Parameters
Name
Type
Default
Description
material
Material
A material
roots
OccurrenceList
If specified, restrict the search from the given roots
Returns
Name
Type
Description
occurrence
OccurrenceList
Occurrences of parts with the given material as active material
Returns all occurrences which a metadata property value matches the given regular expression (ECMAScript)
scene . findByMetadata ( "property" , regex , roots )
Parameters
Name
Type
Default
Description
property
String
Property name
regex
Regex
Regular expression (ECMAScript)
roots
OccurrenceList
If specified, restrict the search from the given roots
Returns
Name
Type
Description
occurrences
OccurrenceList
Occurrences which matches the given regular expression
findByProperty
Returns all occurrences which a property value matches the given regular expression (ECMAScript)
scene . findByProperty ( "property" , regex , roots )
Parameters
Name
Type
Default
Description
property
String
Property name
regex
Regex
Regular expression (ECMAScript)
roots
OccurrenceList
If specified, restrict the search from the given roots
Returns
Name
Type
Description
occurrences
OccurrenceList
Occurrences which matches the given regular expression
findPartOccurrencesInAABB
Find part occurrences in the scene in a given axis aligned bounding box
scene . findPartOccurrencesInAABB ( aabb )
Parameters
Name
Type
Default
Description
aabb
AABB
The axis aligned bounding box
Returns
Name
Type
Description
occurrences
OccurrenceList
Occurrences found in the given axis aligned bounded box
generateOctaViewsscene . generateOctaViews ( radius , XFrames , YFrames , False )
Parameters
Name
Type
Default
Description
radius
Double
XFrames
Int
YFrames
Int
hemi
Bool
false
Returns
Name
Type
Description
occurrence
Occurrence
The created Occurrence
getAABB
Returns the axis aligned bounding box of a list of scene paths
scene . getAABB ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
List of occurrences to retrieve the AABB
Returns
Name
Type
Description
aabb
AABB
The axis aligned bounding box of all given occurrences
getActiveMaterial
Get the active material on occurrence
scene . getActiveMaterial ( occurrence )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
The occurrence
Returns
Name
Type
Description
material
Material
The material
getActivePropertyValue
Get the value of a property on the first parent that own it
scene . getActivePropertyValue ( occurrence , "propertyName" , False )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
An occurrence
propertyName
String
Property name
cacheProperty
Boolean
false
If true, the property will be copied on all ancestor of occurrence below the property owner to speed up future calls
Returns
Name
Type
Description
value
String
Property value
getActivePropertyValues
Get the value of a property on the first parent that own it for each given occurrence
scene . getActivePropertyValues ( occurrences , "propertyName" , False )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
List of occurrences
propertyName
String
Property name
cacheProperty
Boolean
false
If true, the property will be copied on all ancestor of occurrence below the property owner to speed up future calls
Returns
Name
Type
Description
values
StringList
Property value for each occurrence
getAnnotationGroups
Returns the list of the AnnotationGroup from a PMIComponent
scene . getAnnotationGroups ( pmiComponent )
Parameters
Name
Type
Default
Description
pmiComponent
Component
The pmi component
Returns
getAnnotations
Returns the list of the Annotation from a AnnotationGroup
scene . getAnnotations ( group )
Parameters
Returns
getChildren
Get the children of an occurrence
scene . getChildren ( occurrence )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
The occurrence
Returns
getComponent
Returns a component on an occurrence
scene . getComponent ( occurrence , componentType , True )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
The occurrence
componentType
ComponentType
Type of the component
followPrototypes
Bool
true
If true and if the component is not set on the occurrence, try to find it on its prototyping chain
Returns
Name
Type
Description
component
Component
The component
getComponentByOccurrence
Returns one component of the specified type by occurrence if it exists
scene . getComponentByOccurrence ( occurrences , componentType , True )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
The occurrences list
componentType
ComponentType
Type of the component
followPrototypes
Bool
true
If true and if the component is not set on the occurrence, try to find it on its prototyping chain
Returns
Name
Type
Description
components
ComponentList
List of component synchronized with occurrences
getComponentOccurrence
Get the occurrence that own a component
scene . getComponentOccurrence ( component )
Parameters
Name
Type
Default
Description
component
Component
The component
Returns
Name
Type
Description
occurrence
Occurrence
The occurrence
getComponentType
Get the type of a component
scene . getComponentType ( component )
Parameters
Name
Type
Default
Description
component
Component
The component
Returns
Name
Type
Description
componentType
ComponentType
Type of the component
getGlobalMatrix
Returns the global matrix on an occurrence
scene . getGlobalMatrix ( occurrence )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
Occurrence to get the global matrix
Returns
Name
Type
Description
matrix
Matrix4
The global matrix of the occurrence
getGlobalVisibility
Returns the global visibility of a given occurrence
scene . getGlobalVisibility ( occurrence )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
Occurrence to get the global visibility
Returns
Name
Type
Description
visible
Boolean
True if the occurrence is visible, else False
getLocalMatrix
Returns the local matrix on an occurrence
scene . getLocalMatrix ( occurrence )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
Node to get the local matrix
Returns
Name
Type
Description
matrix
Matrix4
The node local matrix
getMBB
Returns the Minimum Bounding Box of a list of scene paths
scene . getMBB ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
List of occurrences to retrieve the AABB
Returns
Name
Type
Description
mbb
MBB
The minimum bounding box of all given occurrences
getMaterialsFromSubtreescene . getMaterialsFromSubtree ( occurrence )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
Root occurrence of the subtree on which to get the materials and images
Returns
Name
Type
Description
materials
MaterialList
The retrieved materials
Get a metadata property value from a metadata component
scene . getMetadata ( metadata , "name" )
Parameters
Name
Type
Default
Description
metadata
Metadata
The metadata component
name
String
The metadata property name
Returns
Name
Type
Description
component
String
The property value
Returns definition of Metadata components
scene . getMetadatasDefinitions ( metadatas )
Parameters
Name
Type
Default
Description
metadatas
MetadataList
List of metadata component to retrieve definition
Returns
Name
Type
Description
definitions
MetadataDefinitionList
List of metadata definition for each given metadata component
getNodeName
Returns the name of an occurrence
scene . getNodeName ( occurrence )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
The occurrence to get the name
Returns
Name
Type
Description
name
String
The occurrence name
getOBB
Returns the Oriented Bounding Box of a list of scene paths (works only on meshes, fast method, not the Minimum Volume Box)
scene . getOBB ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
List of occurrences to retrieve the AABB
Returns
Name
Type
Description
obb
OBB
The oriented bounding box of all given occurrences
getOccurrenceActiveMaterial
Returns the active material on a given occurrence
scene . getOccurrenceActiveMaterial ( occurrence )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
Occurrence to get the active material
Returns
Name
Type
Description
material
Material
The active material of the occurrence
getOccurrenceAncestorsscene . getOccurrenceAncestors ( occurrence )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
The occurrence to find ancestors
Returns
Name
Type
Description
ancestors
OccurrenceList
List of ancestors (start with the root and end with occurrence parent). Empty if occurrence is a root
getOccurrencesAncestorsscene . getOccurrencesAncestors ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
The list of occurrences to find ancestors
Returns
Name
Type
Description
ancestorsList
OccurrenceListList
For each given occurrence, the list of ancestors (start with the root and end with occurrence parent). Empty if occurrence is a root
getParent
Get the parent of an occurrence
scene . getParent ( occurrence )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
The occurrence
Returns
Name
Type
Description
parent
Occurrence
The parent occurrence
getPartActiveShape
Returns the active shape of a part
scene . getPartActiveShape ( part )
Parameters
Name
Type
Default
Description
part
Part
The part
Returns
Name
Type
Description
shape
Shape
The active shape of a part
getPartOccurrences
Recursively get all the occurrences containing a part component
scene . getPartOccurrences ( from )
Parameters
Name
Type
Default
Description
from
Occurrence
Source occurrence of the recursion
Returns
getPolygonCount
Returns the number of polygon in the parts meshes
scene . getPolygonCount ( occurrences , False , False , False )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
The part occurrences
asTriangleCount
Bool
false
If true count the equivalent of triangles for each polygon
countOnceEachInstance
Bool
false
If true ignore multiple instance of each tessellation
countHidden
Bool
false
If true, also count hidden components
Returns
Name
Type
Description
polygonCount
Int
The number of polygons
getReferencers
Returns all the occurrences prototyping the given occurrence
scene . getReferencers ( prototype )
Parameters
Name
Type
Default
Description
prototype
Occurrence
The prototype occurrence
Returns
Name
Type
Description
referencers
OccurrenceList
The referencers occurrences
getRoot
Get the root occurrence of the product structure
Returns
Name
Type
Description
root
Occurrence
The root occurrence
getSubTree
Returns a packed version of the whole scene tree
scene . getSubTree ( 0 , 1 , - 1 )
Parameters
Name
Type
Default
Description
root
Occurrence
0
Specify the root of the returned scene
visibilityMode
VisibilityMode
1
The visibility mode
depth
Int
-1
Maximum depth
Returns
getSubTreeStats
Returns some stats of a sub tree
scene . getSubTreeStats ( root )
Parameters
Name
Type
Default
Description
root
Occurrence
The root of the sub tree
Returns
Name
Type
Description
partCount
Int
Number of parts in the sub-tree (instances are counted once)
partOccurrenceCount
Int
Number of part occurrence in the sub-tree (instances are counted multiple times)
triangleCount
Int
Number of triangles in the sub-tree (instances are counted once, quadrangle count for 2 triangles)
triangleOccurrenceCount
Int
Number of triangles in the sub-tree (instances are counted multiples times, quadrangle count for 2 triangles)
vertexCount
Int
Number of surfacic vertices in the sub-tree (instances are counted once)
vertexOccurrenceCount
Int
Number of surfacic vertices in the sub-tree (instances are counted multiples times)
getVertexCount
Returns the number of vertices in the parts meshes
scene . getVertexCount ( occurrences , False , False , False , False )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
The part occurrences
countOnceEachInstance
Bool
false
If true ignore multiple instance of each tessellation
countHidden
Bool
false
If true, also count hidden components
countPoints
Bool
false
If true, also count points (for points cloud)
countMergedVertices
Bool
false
If true count all merged vertices in each tessellation
Returns
Name
Type
Description
vertexCount
Int
The number of vertices
getViewpointsFromCavities
Returns viewpoints from model cavities
scene . getViewpointsFromCavities ( voxelSize , minCavityVolume )
Parameters
Name
Type
Default
Description
voxelSize
Distance
Precision for cavities detection
minCavityVolume
Distance
Minimum volume for a cavity to be returned
Returns
Name
Type
Description
positions
Point3List
List of viewpoint positions
directions
Point3List
List of viewpoint directions
hasComponent
Returns True if the given occurrence has the given component type
scene . hasComponent ( occurrence , componentType , True )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
The occurrence
componentType
ComponentType
Type of the component
followPrototypes
Bool
true
If true and if the component is not set on the occurrence, try to find it on its prototyping chain
Returns
Name
Type
Description
hasComp
Boolean
hide
Hide the given occurrence
Parameters
Name
Type
Default
Description
occurrence
Occurrence
The occurrence to hide
insertDefaultLightsInTree
Create the default light
scene . insertDefaultLightsInTree ()
listComponent
List all components on a type on the whole tree
scene . listComponent ( componentType )
Parameters
Name
Type
Default
Description
componentType
ComponentType
The component type
Returns
Name
Type
Description
components
ComponentList
The component list of the type chosen
listComponents
List all components on an occurrence
scene . listComponents ( occurrence , True )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
The occurrence to list the components
followPrototypes
Bool
true
If true list also components owned by the prototype
Returns
Name
Type
Description
components
ComponentList
The components owned by the occurrence
listPartSubMaterials
List all the materials used in the part shape
scene . listPartSubMaterials ( part )
Parameters
Name
Type
Default
Description
part
Part
The part which contains sub materials
Returns
mergeImages
Merge all equivalent images (i.e. with same pixels)
Parameters
Name
Type
Default
Description
images
ImageList
[]
Images to merge (merge all images if empty)
Returns
Name
Type
Description
nbTexture
Int
The number of texture after the merge
mergeMaterials
Merge all equivalent materials (i.e. with same appearance)
scene . mergeMaterials ([], False )
Parameters
Name
Type
Default
Description
materials
MaterialList
[]
Materials to merge (merge all materials if empty)
evaluateNames
Boolean
false
If true, materials names will be taken into consideration (on top of other properties). It means that materials having same properties but different names won't be merged together.
Returns
Name
Type
Description
nbMaterial
Int
The number of material after the merge
moveOccurrences
Move an occurrence, adjusting the transformation to keep objects at the same place in the world space
scene . moveOccurrences ( occurrences , destination )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
The occurrences to move
destination
Occurrence
Destination occurrence (the new parent)
removeMaterials
Remove all materials appplied to the selection
Remove a property from a metadata
scene . removeMetadata ( metadata , "name" )
Parameters
Name
Type
Default
Description
metadata
Metadata
The occurrence
name
String
The name of the property
renameLongOccurrenceName
Truncate names of occurrence with too long names
scene . renameLongOccurrenceName ( 128 )
Parameters
Name
Type
Default
Description
maxLength
Int
128
Maximum name length
replaceMaterial
Replace a material by another everywhere it is used
scene . replaceMaterial ( originalMaterial , newMaterial , occurrences )
Parameters
Name
Type
Default
Description
originalMaterial
Material
The material to replace everywhere
newMaterial
Material
The new material to set in place of originalMaterial
occurrences
OccurrenceList
The occurrences on which replacing the materials
resizeTextures
Resizes the textures from a selection of occurrences (resizes all textures used by these occurrences), or from a selection of textures
scene . resizeTextures ( inputMode , resizeMode , True )
Parameters
Name
Type
Default
Description
inputMode
ResizeTexturesInputMode
Defines if the textures to resize are textures used by a selection of Occurrences, or a selection among the textures available in the scene
resizeMode
ResizeTexturesResizeMode
Defines if the textures are resized following a ratio or following a maximum size/resolution (only textures above the defined maximum are downsized)
replaceTextures
Bool
true
If True, overwrites textures from the selection
selectByMaterial
Selects occurrences for which the property "Material" is the given material
scene . selectByMaterial ( material )
Parameters
Name
Type
Default
Description
material
Material
A material
selectByVisibleMaterial
Selects parts for which the given material is visible in the viewer
scene . selectByVisibleMaterial ( material )
Parameters
Name
Type
Default
Description
material
Material
A material
selectPartOccurrencesInBox
Find part occurrences in the scene in a given box and add them to the selection
scene . selectPartOccurrencesInBox ( box , StrictlyIncludes )
Parameters
Name
Type
Default
Description
box
ExtendedBox
The extension box
strictlyIncludes
Boolean
If false, parts only need to intersect the box to be selected
setComponentOccurrence
Move a component to an occurrence
scene . setComponentOccurrence ( component , occurrence )
Parameters
Name
Type
Default
Description
component
Component
The component
occurrence
Occurrence
The occurrence
setDefaultVariant
Set the default variant
scene . setDefaultVariant ()
setOccurrenceMaterial
Set the material on a occurrence
scene . setOccurrenceMaterial ( occurrence , material )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
Occurrence to set the material
material
Material
The new occurrence material
setParent
Set the parent of an occurrence
scene . setParent ( occurrence , parent , False , insertBefore )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
The occurrence
parent
Occurrence
The parent occurrence
addInParentInstances
Boolean
false
If True, each occurrence whose prototype is the target parent will generate a child whose prototype is the occurrence itself
insertBefore
Occurrence
Add before this child occurrence in the children list of the parent occurrence
show
Show the given occurrence
Parameters
Name
Type
Default
Description
occurrence
Occurrence
The occurrence to show
showOnly
Show only the given occurrence
scene . showOnly ( occurrence )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
The occurrence to show
transferCADMaterialsOnPartOccurrences
Set all materials on part occurrences
scene . transferCADMaterialsOnPartOccurrences ( rootOccurrence )
Parameters
Name
Type
Default
Description
rootOccurrence
Occurrence
Root occurrence
transferMaterialsOnPatches
Take the first instance material and set it one the mesh patches
scene . transferMaterialsOnPatches ( rootOccurrence )
Parameters
Name
Type
Default
Description
rootOccurrence
Occurrence
Root occurrence
createAlternativeTree
Create a new alternative tree
scene . createAlternativeTree ( "name" , root )
Parameters
Name
Type
Default
Description
name
String
The name of the new alternative tree
root
Occurrence
The root occurrence
Returns
getAlternativeTreeRoot
Returns the root occurrence associated with the given AlternativeTree
scene . getAlternativeTreeRoot ( tree )
Parameters
Name
Type
Default
Description
tree
AlternativeTree
Targeted alternative tree
Returns
Name
Type
Description
root
Occurrence
The root occurrence
listAlternativeTrees
Returns all the available alternative trees
scene . listAlternativeTrees ()
Returns
addKeyframe
Adds a keyframe in the curve
scene . addKeyframe ( channel , time , value )
Parameters
Returns
Name
Type
Description
keyframe
Keyframe
The corresponding keyframe
addKeyframeFromCurrentPosition
Adds keyframes in a given AnimChannel based on current position
scene . addKeyframeFromCurrentPosition ( channel , time )
Parameters
Name
Type
Default
Description
channel
AnimChannel
The channel one wants to add a keyframe in
time
AnimationTime
The time
animatesThisOccurrence
Does this Animation animates this Occurrence - or one of its parents (thus animating it indirectly) ?
scene . animatesThisOccurrence ( animation , occurrence )
Parameters
Name
Type
Default
Description
animation
Animation
The Animation
occurrence
Occurrence
The supposedly animated occurrence
Returns
Name
Type
Description
isAnimated
Bool
The answer to this question
bakeAnimation
Baking soda
scene . bakeAnimation ( animation , occurrence , end , interval )
Parameters
createAnimation
Creates an animation
scene . createAnimation ( "name" )
Parameters
Name
Type
Default
Description
name
String
Name of the animation
Returns
Name
Type
Description
animation
Animation
The created animation
createSkeletonMesh
Create a skeleton mesh from a joint component tree
scene . createSkeletonMesh ( root )
Parameters
Name
Type
Default
Description
root
Occurrence
Root joint component node
decimateAnimChannelBySegment
Decimates by segment a given AnimChannel
scene . decimateAnimChannelBySegment ( channel , precision )
Parameters
Name
Type
Default
Description
channel
AnimChannel
The channel
precision
Double
The precision
deleteAnimation
Deletes an animation
scene . deleteAnimation ( animation )
Parameters
Name
Type
Default
Description
animation
Animation
The created animation
deleteEmptyAnimation
Delete all animation that contain 0 keyframes
scene . deleteEmptyAnimation ()
displayAllKeyframesFromAnimChannel
Displays info on the selected AnimChannel
scene . displayAllKeyframesFromAnimChannel ( channel )
Parameters
Name
Type
Default
Description
channel
AnimChannel
The channel
displayAllKeyframesFromAnimation
Displays info on the selected animation
scene . displayAllKeyframesFromAnimation ( animation )
Parameters
Name
Type
Default
Description
animation
Animation
The animation
displayValueFromAnimChannelAtTime
Displays the value
scene . displayValueFromAnimChannelAtTime ( channel , time , False )
Parameters
getAnimChannelIfExists
Returns the main AnimChannel of an Occurrence according to a given Animation
scene . getAnimChannelIfExists ( animation , occurrence )
Parameters
Name
Type
Default
Description
animation
Animation
The Animation
occurrence
Occurrence
The Occurrence
Returns
getAnimChannelOccurrence
Returns the Occurrence related to a given AnimChannel
scene . getAnimChannelOccurrence ( channel )
Parameters
Name
Type
Default
Description
channel
AnimChannel
The channel
Returns
Name
Type
Description
occurrence
Occurrence
The corresponding occurrence
getJointDefinition
Get joint definition from id
scene . getJointDefinition ( joint )
Parameters
Name
Type
Default
Description
joint
Joint
Id of the joint
Returns
Name
Type
Description
jointDefinition
JointDefinition
The jointDefinition matching the id provided
getJointDefinitions
Get joint definition from id
scene . getJointDefinitions ( joints )
Parameters
Name
Type
Default
Description
joints
JointList
Ids of joints
Returns
Name
Type
Description
jointDefinitions
JointDefinitionList
An array of all jointDefinition matching joint provided
getKeyframeParentAnimChannel
Returns the parent AnimChannel of a given Keyframe
scene . getKeyframeParentAnimChannel ( keyframe )
Parameters
Name
Type
Default
Description
keyframe
Keyframe
The keyframe one wants the parent of
Returns
Name
Type
Description
animChannel
AnimChannel
The Parent
getKeyframes
Returns a list of all keyframes of a simple animChannel
scene . getKeyframes ( channel )
Parameters
Name
Type
Default
Description
channel
AnimChannel
The channel one wants to extract the keyframs from
Returns
Name
Type
Description
keyframelist
KeyframeList
The list of keyframes
getMainChannel
Returns the main AnimChannel of a given AnimChannel
scene . getMainChannel ( channel )
Parameters
Name
Type
Default
Description
channel
AnimChannel
The channel one wants the main of
Returns
Name
Type
Description
mainChannel
AnimChannel
The corresponding main Channel
getOccurrenceJoint
Returns the Joint assigned to an occurrence if any
scene . getOccurrenceJoint ( occurrence )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
The occurrence
Returns
Name
Type
Description
joint
Joint
The joint assigned to the given occurrence
getParentChannel
Returns (if exists) the parent AnimChannel of a given AnimChannel
scene . getParentChannel ( channel )
Parameters
Name
Type
Default
Description
channel
AnimChannel
The channel one wants the parent of
Returns
Name
Type
Description
parentChannel
AnimChannel
The corresponding parent Channel
getSubChannel
Returns the subchannel of a given name from an AnimChannel
scene . getSubChannel ( channel , "name" )
Parameters
Name
Type
Default
Description
channel
AnimChannel
The channel one wants the subchannel of
name
String
The name of the subchannel
Returns
Name
Type
Description
subChannel
AnimChannel
The corresponding subchannel
getSubChannels
Returns all the sub channel of an AnimChannel
scene . getSubChannels ( channel )
Parameters
Name
Type
Default
Description
channel
AnimChannel
The channel one wants the subchannel of
Returns
Name
Type
Description
subChannels
AnimChannelList
The list of direct sub channels
linkPropertyToAnimation
Creates a Binder in an Animation stack to animate an entity's property
scene . linkPropertyToAnimation ( animation , entity , "propertyName" )
Parameters
Name
Type
Default
Description
animation
Animation
The Animation stack where to put a animated property
entity
Entity
The entity object to animate
propertyName
String
The name of the property to animate
Returns
Name
Type
Description
mainChannel
AnimChannel
The main channel of the binder
listAnimations
List all Animations from the scene
Returns
Name
Type
Description
animList
AnimationList
The list containing animations
listMainChannels
List all main AnimChannel from a given Animation
scene . listMainChannels ( animation )
Parameters
Name
Type
Default
Description
animation
Animation
The Animation one wants to list the channels from
Returns
Name
Type
Description
channelList
AnimChannelList
The list containing the AnimChannels
makeDefaultKeyframe
Creates keyframes with the default values of the channel at time 0
scene . makeDefaultKeyframe ( channel )
Parameters
Name
Type
Default
Description
channel
AnimChannel
The channel
moveAnimation
Moving animation
scene . moveAnimation ( animation , target , newParent , interval )
Parameters
removeKeyframe
Removes a keyframe in the curve
scene . removeKeyframe ( channel , time )
Parameters
Name
Type
Default
Description
channel
AnimChannel
The channel one wants to remove a keyframe from
time
AnimationTime
The time
unlinkPropertyToAnimation
Unlinks a binder
scene . unlinkPropertyToAnimation ( animation , entity , "propertyName" )
Parameters
Name
Type
Default
Description
animation
Animation
The Animation stack where to put a animated property
entity
Entity
The entity object to animate
propertyName
String
The name of the property to animate
getBRepInfosReturns
Name
Type
Description
partCount
Int
The part count
totalPartCount
Int
The total part count
vertexCount
Int
The vertex count
totalVertexCount
Int
The total vertex count
edgeCount
Int
The edge count
totalEdgeCount
Int
The total edge count
domainCount
Int
The domain count
totalDomainCount
Int
The total domain count
bodyCount
Int
The body count
totalBodyCount
Int
The total body count
area2Dsum
Double
The 2D area sum
boundaryCount
Int
The boundary count
boundaryEdgeCount
Int
The boundary edge count
getTessellationInfosscene . getTessellationInfos ()
Returns
Name
Type
Description
partCount
Int
The part count
totalPartCount
Int
The total part count
vertexCount
Int
The vertex count
totalVertexCount
Int
The total vertex count
edgeCount
Int
The edge count
totalEdgeCount
Int
The total edge count
polygonCount
Int
The polygon count
totalPolygonCount
Int
The total polygon count
patchCount
Int
The patch count
totalPatchCount
Int
The total patch count
boundaryCount
Int
The boundary count
boundaryEdgeCount
Int
The boundary edge count
print
Print an occurrence tree on log
Parameters
Name
Type
Default
Description
root
Occurrence
0
Occurrence tree root
addFilterToLibrary
Add a filter to the filters library
scene . addFilterToLibrary ( "name" , expr )
Parameters
Returns
Name
Type
Description
filterId
Ident
Identifier of the created filter
evaluateExpression
Evaluate the given filter expression
scene . evaluateExpression ( filter )
Parameters
Returns
Name
Type
Description
result
String
Result of the given expression
evaluateExpressionOnOccurrences
Evaluate the given filter expression on all occurrences under the given occurrence and returns the result
scene . evaluateExpressionOnOccurrences ( occurrences , filter )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences on which to evaluate the expression
filter
FilterExpression
The filter expression
Returns
Name
Type
Description
evaluations
StringList
The evaluation of the expression on the occurrence at the same index in given occurrences
evaluateExpressionOnSubTree
Evaluate the given filter expression on all occurrences under the given occurrence and returns the result
scene . evaluateExpressionOnSubTree ( filter , from )
Parameters
Returns
Name
Type
Description
occurrences
OccurrenceList
evaluations
StringList
The evaluation of the expression on the occurrence at the same index in occurrences
exportFilterLibrary
Export filters from a given file
scene . exportFilterLibrary ( file )
Parameters
Name
Type
Default
Description
file
FilePath
File path to export
findFilterByName
Returns the first filter in the filter library with the given name
scene . findFilterByName ( "name" )
Parameters
Name
Type
Default
Description
name
String
Name of the filter to retrieve (case sensitive)
Returns
Name
Type
Description
filter
Filter
The retrieved filter
getFilterExpression
Returns the filter expression (string) from a filter id stored in the library
scene . getFilterExpression ( filterId )
Parameters
Name
Type
Default
Description
filterId
Ident
Identifier of the filter to fetch
Returns
getFilterFromLibrary
Retrieve a filter from the library with its identifier
scene . getFilterFromLibrary ( filterId )
Parameters
Name
Type
Default
Description
filterId
Ident
Identifier of the filter to retrieve
Returns
Name
Type
Description
filter
Filter
The retrieved filter
getFilteredOccurrences
Recursively get all the occurrences validating the given filter expression
scene . getFilteredOccurrences ( filter , from )
Parameters
Returns
importFilterLibrary
Import filters from a given file
scene . importFilterLibrary ( file )
Parameters
Name
Type
Default
Description
file
FilePath
File containing the filter library
listFilterLibrary
Returns all the filter stored in the filter library
scene . listFilterLibrary ()
Returns
Name
Type
Description
filters
FilterList
All the filters stored in the filter library
removeFilterFromLibrary
Remove a filter from the filters library
scene . removeFilterFromLibrary ( filterId )
Parameters
Name
Type
Default
Description
filterId
Ident
Identifier of the filter to remove
isolate
Enter isolate mode by isolating a subset of the scene for process, export, viewer, ...
scene . isolate ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences to isolate
unisolate
Exit the isolate mode
mergeByRegions
Merge all parts within the same area.
scene . mergeByRegions ( roots , mergeBy , strategy )
Parameters
Name
Type
Default
Description
roots
OccurrenceList
Roots occurrences for the process (will not be removed)
mergeBy
MergeByRegionsStrategy
Number: number of output parts (or regions of parts)\nSize: diagonal size of output regions
strategy
MergeStrategy
Choose the regions merging strategy
Returns
Name
Type
Description
mergedOccurrences
OccurrenceList
Resulting merged occurrences
mergeByTreeLevel
Merge all parts over maxLevel level
scene . mergeByTreeLevel ( partOccurrences , 5 , 2 )
Parameters
Name
Type
Default
Description
partOccurrences
OccurrenceList
Occurrence of the parts to merge
maxLevel
Int
5
Maximum tree level
mergeHiddenPartsMode
MergeHiddenPartsMode
2
Hidden parts handling mode, Destroy them, make visible or merge separately
mergeFinalLevel
Merge final level (occurrences with only occurrence with part component as children)
scene . mergeFinalLevel ( 0 , 2 , False )
Parameters
Name
Type
Default
Description
roots
OccurrenceList
0
Roots occurrences for the process (will not be removed)
mergeHiddenPartsMode
MergeHiddenPartsMode
2
Hidden parts handling mode, Destroy them, make visible or merge separately
CollapseToParent
Boolean
false
If true, final level unique merged part will replace it's parent
mergeParts
Merge a set of parts
scene . mergeParts ( partOccurrences , 2 )
Parameters
Name
Type
Default
Description
partOccurrences
OccurrenceList
Occurrence of the parts to merge
mergeHiddenPartsMode
MergeHiddenPartsMode
2
Hidden parts handling mode, Destroy them, make visible or merge separately
Returns
Name
Type
Description
mergedOccurrences
OccurrenceList
Resulting merged occurrences
mergePartsByAssemblies
Merge all parts under each assembly together
scene . mergePartsByAssemblies ( 0 , 2 )
Parameters
Name
Type
Default
Description
roots
OccurrenceList
0
Roots occurrences for the process (will not be removed)
mergeHiddenPartsMode
MergeHiddenPartsMode
2
Hidden parts handling mode, Destroy them, make visible or merge separately
mergePartsByMaterials
Merge a set of parts by materials
scene . mergePartsByMaterials ( partOccurrences , True , 2 , True )
Parameters
Name
Type
Default
Description
partOccurrences
OccurrenceList
Occurrence of the parts to merge
mergeNoMaterials
Boolean
true
If true, merge all parts with no active material together, else do not merge them
mergeHiddenPartsMode
MergeHiddenPartsMode
2
Hidden parts handling mode, Destroy them, make visible or merge separately
combineMeshes
Boolean
true
If true, explode and remerge the input parts by visible materials
Returns
Name
Type
Description
mergedOccurrences
OccurrenceList
Resulting merged occurrences
mergePartsByName
Merge all parts by occurrences names
scene . mergePartsByName ( 0 , 2 )
Parameters
Name
Type
Default
Description
root
Occurrence
0
Root occurrence of the subtree to process
mergeHiddenPartsMode
MergeHiddenPartsMode
2
Hidden parts handling mode, Destroy them, make visible or merge separately
Apply a transformation to the local matrix of an occurrence
scene . applyTransformation ( occurrence , matrix )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
Occurrence to apply the matrix on
matrix
Matrix4
Transformation to matrix
createSymmetry
Create symmetries from selection
scene . createSymmetry ( occurrences , plane )
Parameters
rotate
Modify the local matrix of the scene node to apply a rotation
scene . rotate ( occurrence , axis , angle )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
Occurrence to rotate
axis
Vector3
Axis of rotation
angle
Angle
Angle of rotation
setLocalMatrix
Change the local matrix on an occurrence
scene . setLocalMatrix ( occurrence , matrix )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
Occurrence to set the local matrix
matrix
Matrix4
The new occurrence local matrix
getPartMesh
Return the mesh of the TesselatedShape
Parameters
Name
Type
Default
Description
part
Part
The part component
Returns
Name
Type
Description
mesh
Mesh
The mesh of the tessellated shape of the part
getPartModel
Return the model of the BRepShape
Parameters
Name
Type
Default
Description
part
Part
The part component
Returns
Name
Type
Description
model
Model
The model of the BRep shape of the part
getPartsMeshes
Return the meshes of the TesselatedShape for each given parts if any
scene . getPartsMeshes ( parts )
Parameters
Name
Type
Default
Description
parts
PartList
The list of part component
Returns
Name
Type
Description
meshes
MeshList
The list of mesh of the tessellated shape of each part
getPartsModels
Return the models of the BRepShape for each given parts if any
scene . getPartsModels ( parts )
Parameters
Name
Type
Default
Description
parts
PartList
The list of part component
Returns
Name
Type
Description
models
ModelList
The list of models of the BRep shape of each part
Returns the transform matrix of each given parts
scene . getPartsTransforms ( parts )
Parameters
Name
Type
Default
Description
parts
PartList
The parts to retrieve transform
Returns
Name
Type
Description
transforms
Matrix4List
The transform matrix of each part
Returns the transform matrix of each given parts (indexed mode)
scene . getPartsTransformsIndexed ( parts )
Parameters
Name
Type
Default
Description
parts
PartList
The parts to retrieve transform
Returns
Name
Type
Description
indices
IntList
The transform matrix index for each parts (0 for Identity)
transforms
Matrix4List
The list of transform matrices (the first is always Identity)
setPartMesh
Add a mesh to a part (create a TessellatedShape on the part)
scene . setPartMesh ( part , mesh )
Parameters
Name
Type
Default
Description
part
Part
The part component
mesh
Mesh
The mesh to add to the part
setPartModel
Add a model to a part (create a BRepShape on the part)
scene . setPartModel ( part , model )
Parameters
Name
Type
Default
Description
part
Part
The part component
model
Model
The model to add to the part
Set the transform matrix of each given parts
scene . setPartsTransforms ( parts , transforms )
Parameters
Name
Type
Default
Description
parts
PartList
The parts to retrieve transform
transforms
Matrix4List
The transform matrix of each part
Set the transform matrix of each given parts (indexed mode)
scene . setPartsTransformsIndexed ( parts , indices , transforms )
Parameters
Name
Type
Default
Description
parts
PartList
The parts to retrieve transform
indices
IntList
The transform matrix index for each parts
transforms
Matrix4List
The list of transform matrices
alignPivotPointToWorld
Re-orient the Pivot Point straight to world origin (the grid)
scene . alignPivotPointToWorld ( occurrences , False )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
The occurrences to modify
applyToChildren
Bool
False
If True, all the pivot of the descending occurrences from occurrence will be affected
movePivotPointToOccurrenceCenter
Move the pivot point of each occurrence listed in the function input, to the center of its bounding box (and of its children if the parameter is True)
scene . movePivotPointToOccurrenceCenter ( occurrences , False )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences (or the roots occurrences if recursively=True)
applyToChildren
Bool
False
If True, all the pivot of the descending occurrences from occurrence will be affected
movePivotPointToOrigin
Move the pivot point of an occurrence (and its descendants if recursively) to the origin (0,0,0)
scene . movePivotPointToOrigin ( occurrence , False )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
The occurrence (or the root occurrence if recursively=True)
applyToChildren
Bool
False
If True, all the pivot of the descending occurrences from occurrence will be affected
movePivotPointToSelectionCenter
Move the pivot point of all given occurrences to the center of all occurrences
scene . movePivotPointToSelectionCenter ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
The occurrences to modify
movePivotPointToTargetedOccurrenceCenter
Move the pivot point of each occurrence listed in the function input, to the center of the targeted occurrence Center (and of its children if the parameter is True)
scene . movePivotPointToTargetedOccurrenceCenter ( occurrences , target , False )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
The occurrence (or the root occurrence if recursively=True)
target
Occurrence
The target occurrence
applyToChildren
Bool
False
If True, all the pivot of the descending occurrences from occurrence will be affected
setPivotOnly
Set the pivot of an occurrence to the given transformation matrix, the geometry will not be moved (warning: do not confuse with property Transform which actually move the occurrence)
scene . setPivotOnly ( occurrence , pivot )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
The occurrence to move the pivot
pivot
Matrix4
The new transformation matrix for the occurrence (pivot)
getPrototype
Returns the prototype of an occurrence
scene . getPrototype ( occurrence )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
The occurrence
Returns
Name
Type
Description
prototype
Occurrence
The prototype (if any)
prototypeSubTree
Create occurrences that prototype the given occurrence and all its subtree
scene . prototypeSubTree ( prototype )
Parameters
Name
Type
Default
Description
prototype
Occurrence
The root occurrence of the sub-tree to prototype
Returns
Name
Type
Description
occurrence
Occurrence
The root occurrence of the prototyped sub-tree
setPrototype
Sets the prototype of an occurrence
scene . setPrototype ( occurrence , prototype )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
The occurrence
prototype
Occurrence
The prototype
clearSelection
Clear the current selection
deleteSelection
Delete all selected occurrences, and/or sub-occurrence elements
explodeSelection
For each occurrence, create a new occurrence with the selected sub-occurrence elements and remove them from the original occurrence
getSelectedOccurrences
Returns all the selected occurrences
scene . getSelectedOccurrences ()
Returns
Name
Type
Description
selection
OccurrenceList
The list of selected occurrences
invertOrientationSelection
Invert the orientation of each selected item (occurrences and/or sub-occurrence elements
scene . invertOrientationSelection ()
invertSelection
Replace the selection by all unselected part occurrences
select
Add occurrences to selection
scene . select ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences to add to the selection
selectAllPartOccurrences
Select all part occurrences
scene . selectAllPartOccurrences ()
separateSelection
Separate all polygones form their original parts into a new one
scene . separateSelection ()
Returns
Name
Type
Description
newOccurrence
Occurrence
The new occurrence created
unselect
Remove occurrences to selection
scene . unselect ( occurrence )
Parameters
Name
Type
Default
Description
occurrence
OccurrenceList
Occurrences to remove from the selection
SelectionChangedParameters
Name
Type
Description
type
SelectionChangeType
Type of change (CLEARED, ADDED or REMOVED)
occurrences
OccurrenceList
Only if type is ADDED or REMOVED, list of added or removed occurrences
VariantChangedParameters
compress
Compress a sub-tree by removing occurrence containing only one Child or empty, and by removing useless instances (see removeUselessInstances)
Parameters
Name
Type
Default
Description
occurrence
Occurrence
0
Root occurrence for the process
Returns
Name
Type
Description
resultingOccurrences
Occurrence
The resulting occurrences of compression
Modify the visible properties of the sub-tree to look like old school visibility (only hidden/inherited)
scene . convertToOldSchoolVisibility ( 0 )
Parameters
Name
Type
Default
Description
root
Occurrence
0
Root occurrence
getDuplicatedParts
Get duplicated parts
scene . getDuplicatedParts ( 0 , 0.01 , 0.1 , 0.01 , 0.1 )
Parameters
Name
Type
Default
Description
root
Occurrence
0
Root occurrence for the process
acceptVolumeRatio
Real
0.01
If the ratio of volumes of two part is lower than acceptVolumeRatio, they will be considered duplicated
acceptPolycountRatio
Real
0.1
If the ratio of polygon counts of two part is lower than acceptPolycountRatio, they will be considered duplicated
acceptAABBAxisRatio
Real
0.01
If the ratio of AABB axis of two part is lower than acceptAABBAxisRatio, they will be considered duplicated
acceptAABBCenterDistance
Distance
0.1
If the ratio of AABB centers of two part is lower than acceptAABBCenterRatio, they will be considered duplicated
Returns
Name
Type
Description
duplicatedParts
OccurrenceList
Duplicated part occurrences
identifyInstances
Identify parts with more than one occurrence on the scene
scene . identifyInstances ( 2 )
Parameters
Name
Type
Default
Description
minOccurrenceCount
Int
2
Min occurrence count
makeInstanceUnique
Singularize all instances on the sub-tree of an occurrence
scene . makeInstanceUnique ( 0 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
0
Root occurrence for the process
rake
Set the same parent to all descending parts (all parts will be singularized)
Parameters
Name
Type
Default
Description
occurrence
Occurrence
0
Root occurrence for the process
keepInstances
Boolean
false
If false, the part will be singularized
removeSymmetryMatrices
Remove symmetry matrices (apply matrices on geometries on nodes under an occurrence with a symmetry matrix
scene . removeSymmetryMatrices ( 0 )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
0
Root occurrence for the process
removeUselessInstances
Remove instances where they are not needed (prototype referenced once, ...)
scene . removeUselessInstances ( 0 )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
0
Root occurrence for the process
Set all part transformation matrices to identity in a sub-tree, transformation will be applied to the shapes
scene . resetPartTransform ( 0 )
Parameters
Name
Type
Default
Description
root
Occurrence
0
Root occurrence for the process
Set all transformation matrices to identity in a sub-tree.
scene . resetTransform ( root , True , True , False )
Parameters
Name
Type
Default
Description
root
Occurrence
Root occurrence for the process
recursive
Boolean
true
If False, transformation will be applied only on the root and its components
keepInstantiation
Boolean
true
If False, all occurrences will be singularized
keepPartTransform
Boolean
false
If False, transformation will be applied to the shapes (BRepShape points or TessellatedShape vertices)
selectByMaximumSize
Select all parts meeting the criteria
scene . selectByMaximumSize ( roots , 150 , - 1 , False )
Parameters
Name
Type
Default
Description
roots
OccurrenceList
Roots occurrences for the process
maxDiagLength
Distance
150
If the diagonal axis of the bounding box is less than maxDiagLength, part will be selected. -1 to ignore
maxSize
Distance
-1
If the longer axis of the box is less than maxLength, part will be selected. -1 to ignore
selectHidden
Boolean
false
If true, hidden parts meeting the criteria will be selected as well
selectDuplicated
Select duplicated parts
scene . selectDuplicated ( 0.01 , 0.1 , 0.01 , 0.1 )
Parameters
Name
Type
Default
Description
acceptVolumeRatio
Real
0.01
If the ratio of volumes of two part is lower than acceptVolumeRatio, they will be considered duplicated
acceptPolycountRatio
Real
0.1
If the ratio of polygon counts of two part is lower than acceptPolycountRatio, they will be considered duplicated
acceptAABBAxisRatio
Real
0.01
If the ratio of AABB axis of two part is lower than acceptAABBAxisRatio, they will be considered duplicated
acceptAABBCenterDistance
Distance
0.1
If the ratio of AABB centers of two part is lower than acceptAABBCenterRatio, they will be considered duplicated
selectInstances
Select occurrences sharing the same prototype as the given one
scene . selectInstances ( occurrence )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
Reference part occurrence
selectPartsFromNoShow
Select hidden parts
scene . selectPartsFromNoShow ()
selectVisibleParts
Select visible parts
scene . selectVisibleParts ()
createRayProber
Creates a ray prober
Returns
Name
Type
Description
id
Ident
createSphereProber
Creates a sphere prober
scene . createSphereProber ()
Returns
Name
Type
Description
id
Ident
rayCastParameters
Name
Type
Default
Description
ray
Ray
The ray to cast
root
Occurrence
The root occurrence to cast from
Returns
Name
Type
Description
hit
RayHit
Information of the first ray hit
rayCastAllscene . rayCastAll ( ray , root )
Parameters
Name
Type
Default
Description
ray
Ray
The ray to cast
root
Occurrence
The root occurrence to cast from
Returns
Name
Type
Description
hits
RayHitList
Information of the first ray hit
updateRayProber
Updates the designed ray prober
scene . updateRayProber ( proberID , ray )
Parameters
Name
Type
Default
Description
proberID
Ident
The ray prober Id
ray
Ray
Update the prober's ray values
updateSphereProber
Updates the designed sphere prober
scene . updateSphereProber ( proberID , sphereCenter , sphereRadius )
Parameters
Name
Type
Default
Description
proberID
Ident
The sphere prober Id
sphereCenter
Vector3
The new prober center
sphereRadius
Double
The new prober radius
onRayProbeParameters
Name
Type
Description
proberID
Ident
The ray propber ID
proberInfo
ProberInfo
The prober's info
onSphereProbeParameters
Name
Type
Description
proberID
Ident
The sphere propber ID
proberInfo
ProberInfo
The prober's info
getMultipleOccurrenceUserData
Batch version of getOccurrenceUserData
scene . getMultipleOccurrenceUserData ( userDataId , occurrences )
Parameters
Name
Type
Default
Description
userDataId
OccurrenceUserData
UserData identifier provided by subscribeToOccurrenceUserData
occurrences
OccurrenceList
Occurrences that store the user data
Returns
Name
Type
Description
userDataList
PtrList
User data stored for each given occurrence
getOccurrenceUserData
Set or replace a userdata stored on an occurrence
scene . getOccurrenceUserData ( userDataId , occurrence )
Parameters
Name
Type
Default
Description
userDataId
OccurrenceUserData
UserData identifier provided by subscribeToOccurrenceUserData
occurrence
Occurrence
Occurrence that store the user data
Returns
Name
Type
Description
userData
Ptr
User data stored in the given occurrence
hasMultipleOccurrenceUserData
Batch version of hasOccurrenceUserData
scene . hasMultipleOccurrenceUserData ( userDataId , occurrences )
Parameters
Name
Type
Default
Description
userDataId
OccurrenceUserData
UserData identifier provided by subscribeToOccurrenceUserData
occurrences
OccurrenceList
Occurrences that potentially store the user data
Returns
Name
Type
Description
results
BoolList
Returns an array of bool that are true if a userdata is stored on the occurrence at the same index for the given userDataId
hasOccurrenceUserData
Set or replace a userdata stored on an occurrence
scene . hasOccurrenceUserData ( userDataId , occurrence )
Parameters
Name
Type
Default
Description
userDataId
OccurrenceUserData
UserData identifier provided by subscribeToOccurrenceUserData
occurrence
Occurrence
Occurrence that potentially store the user data
Returns
Name
Type
Description
result
Bool
Returns true if a userdata is stored on this occurrence for the given userDataId
setMultipleOccurrenceUserData
Batch version of setOccurrenceUserData
scene . setMultipleOccurrenceUserData ( userDataId , occurrences , userDataList )
Parameters
Name
Type
Default
Description
userDataId
OccurrenceUserData
UserData identifier provided by subscribeToOccurrenceUserData
occurrences
OccurrenceList
Occurrences that will store the user data
userDataList
PtrList
User data to store on each occurrence
setOccurrenceUserData
Set or replace a userdata stored on an occurrence
scene . setOccurrenceUserData ( userDataId , occurrence , userData )
Parameters
Name
Type
Default
Description
userDataId
OccurrenceUserData
UserData identifier provided by subscribeToOccurrenceUserData
occurrence
Occurrence
Occurrence that will store the user data
userData
Ptr
User data to store in the given occurrence
subscribeToOccurrenceUserData
Subscribe to occurrence user data. multiple different userdata can be stored on the same occurrences if subscribeToOccurrenceUserData is called multiple times
scene . subscribeToOccurrenceUserData ()
Returns
Name
Type
Description
userDataId
OccurrenceUserData
UserData identifier to pass to setUserData/getUserData functions
unsetMultipleOccurrenceUserData
Batch version of unsetOccurrenceUserData
scene . unsetMultipleOccurrenceUserData ( userDataId , occurrences )
Parameters
Name
Type
Default
Description
userDataId
OccurrenceUserData
UserData identifier provided by subscribeToOccurrenceUserData
occurrences
OccurrenceList
Occurrences that will store the user data
unsetOccurrenceUserData
Unset the userdata stored on an occurrence
scene . unsetOccurrenceUserData ( userDataId , occurrence )
Parameters
Name
Type
Default
Description
userDataId
OccurrenceUserData
UserData identifier provided by subscribeToOccurrenceUserData
occurrence
Occurrence
Occurrence that will store the user data
unsubscribeFromOccurrenceUserDatascene . unsubscribeFromOccurrenceUserData ( userDataId )
Parameters
Name
Type
Default
Description
userDataId
OccurrenceUserData
UserData identifier to unsubscribe
addVariant
Create a new variant
Parameters
Name
Type
Default
Description
name
String
The name of the new variant
Returns
Name
Type
Description
variant
Variant
The new variant
duplicateVariant
Create a new variant which is a copy of an existing variant
scene . duplicateVariant ( variant , "name" )
Parameters
Name
Type
Default
Description
variant
Variant
The variant to duplicated
name
String
Name of the new variant
Returns
Name
Type
Description
newVariant
Variant
The created variant
getVariantComponentsDefinitions
Returns the definitions of multiple variant components
scene . getVariantComponentsDefinitions ( variantComponents )
Parameters
Name
Type
Default
Description
variantComponents
VariantComponentList
The list of variant components to retrieve definitions
Returns
Name
Type
Description
definitions
VariantDefinitionListList
For each variant component, returns one list of variant definition (one by variant)
getVariantTree
Get the alternative tree used by this variant
scene . getVariantTree ( variant )
Parameters
Name
Type
Default
Description
variant
Variant
The variant
Returns
Name
Type
Description
tree
AlternativeTree
The alternative tree used by this variant
listVariants
Returns all the available variants
Returns
Name
Type
Description
variants
VariantList
All variants
removeVariant
Remove a variant
scene . removeVariant ( variant )
Parameters
Name
Type
Default
Description
variant
Variant
The variant to remove
setCurrentVariant
Change the current variant used
scene . setCurrentVariant ( variant )
Parameters
Name
Type
Default
Description
variant
Variant
The variant to enable (can be null)
setVariantTree
Set the alternative tree to use for this variant
scene . setVariantTree ( variant , tree )
Parameters
Name
Type
Default
Description
variant
Variant
The variant to modify
tree
AlternativeTree
The alternative tree to use for this variant
Algo assembleCAD
Assemble faces of CAD shapes
algo . assembleCAD ( occurrences , 0.1 , True )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to assemble
tolerance
Distance
0.1
Assembling tolerance
removeDuplicatedFaces
Boolean
true
If True, duplicated faces will be removed
backToInitialBRep
Create the BRep shape from a Tessellated shape with Domain Patch Attributes (after tessellate)
algo . backToInitialBRep ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
bakeImpostor
Bakes impostors textures
algo . bakeImpostor ( occurrence , XFrames , YFrames , False , 1024 , 0 , False , False , False )
Parameters
Returns
Name
Type
Description
octahedralImp
OctahedralImpostor
The structure containing impostor data
bakeVertexAttributes
Bake vertex attributes on meshes from other meshes
algo . bakeVertexAttributes ( destinationOccurrences , [], True , False , False )
Parameters
Name
Type
Default
Description
destinationOccurrences
OccurrenceList
Occurrences of the meshes where to store the baked vertex attributes
sourceOccurrences
OccurrenceList
[]
Occurrences of components from which to bake vertex attributes
skinnedMesh
Boolean
True
Enabling skinned mesh baking (joint assignation for animation transfer)
positions
Boolean
False
Enabling vertex position baking
useCurrentPositionAsTPose
Boolean
false
Use the current position as the T-Pose
calculateNormalsInPointClouds
Calculate the normal of each point of a Point Cloud
algo . calculateNormalsInPointClouds ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
combineMeshesByMaterials
Explode and (re)merge a set of mesh parts by visible materials
algo . combineMeshesByMaterials ( occurrences , True , 0 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of the parts to merge
mergeNoMaterials
Boolean
true
If true, merge all parts with no active material together, else do not merge them
mergeHiddenPartsMode
MergeHiddenPartsMode
0
Hidden parts handling mode, Destroy them, make visible or merge separately
Returns
Name
Type
Description
mergedOccurrences
OccurrenceList
Resulting occurrences of the merged parts
convertSimilarOccurencesToInstances
Create instances when there are similar parts.
algo . convertSimilarOccurencesToInstances ( occurrences , True , True , 5 , True , True , 5 , False )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrence for which we want to find similar parts and create instances using prototypes.
checkMeshTopo
Boolean
true
checkVertexPositions
Boolean
true
vertexPositionPrecision
Int
5
checkUVTopo
Boolean
true
checkUVVertexPositions
Boolean
true
UVPositionprecision
Int
5
keepExistingPrototypes
Boolean
false
convexDecomposition
Explode each mesh to approximated convex decomposition
algo . convexDecomposition ( occurrences , 1024 , 64 , True , 100000 , 0.001 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
maxCount
Int
1024
Maximum number of convex hull to generated
vertexCount
Int
64
Maximum number of vertices per convex hull
approximate
Boolean
true
Approximate method
resolution
Int
100000
Resolution
concavity
Double
0.001
Concavity
Returns
Name
Type
Description
newOccurrences
OccurrenceList
Resulting occurrences of the convexDecomposition
crackCADMoebiusStrip
Detect Moebius strip and crack them if there is somme of them in the selection
algo . crackCADMoebiusStrip ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to check
crackEdges
Crack polygonal edges according to given criteria
algo . crackEdges ( occurrences , True , False , - 1 , False )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
useAttributesFilter
Boolean
true
Filters by attribute
useSharpEdgeFilter
Boolean
false
Filters by edge sharpness.
sharpAngleFilter
Angle
-1
Sharp angle, if negative the default sharp angle value is used
useNonManifoldFilter
Boolean
false
Filters by manifold-ness.
createFreeEdgesFromPatches
Create free edges from patch borders
algo . createFreeEdgesFromPatches ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
createIdentifiedPatchesFromPatches
Create identified patch from existing patch (this is useful before cloning for baking)
algo . createIdentifiedPatchesFromPatches ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
createInstancesBySimilarity
Create instances when there are similar parts. This can be used to repair instances or to simplify a model that has similar parts that could be instantiated instead to reduce the number of unique meshes (reduces drawcalls, GPU memory usage and file size). Using 1.0 (100%) in all similarity criteria is non destructive. Using lower values will help finding more similar parts, even if their polycount or dimensions varies a bit.
algo . createInstancesBySimilarity ( occurrences , 0.98 , 0.98 , False , True , True )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrence for which we want to find similar parts and create instances using prototypes.
dimensionsSimilarity
Coeff
0.98
The percentage of similarity on dimensions. A value of 1.0 (100%) will find parts that have exactly the same dimensions. A lower value will increase the likelihood to find similar parts, at the cost of precision.
polycountSimilarity
Coeff
0.98
The percentage of similarity on polycount. A value of 1.0 (100%) will find parts that have exactly the same polycount. A lower value will increase the likelihood to find similar parts, at the cost of precision.
ignoreSymmetry
Boolean
false
If True, symmetries will be ignored, otherwise negative scaling will be applied in the occurrence transformation.
keepExistingPrototypes
Boolean
true
If True, existing prototypes will be kept. Otherwise, the selection will be singularized and instanced will be created from scratch.
createNewOccurrencesForPrototypes
Boolean
true
If True, a new occurrence will be created for each prototype. Those occurrences won't appear in the hierarchy, and so deleting one of the part in the scene has no risks of singularizing. If set to False, an arbitrary occurrence will be used as the prototype for other similar occurrences, which is less safe but will result in less occurrences.
createNormals
Create normal attributes on tessellations
algo . createNormals ( occurrences , - 1 , True , False )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to create attributes
sharpEdge
Angle
-1
Edges with an angle between their polygons greater than sharpEdge will be considered sharp (default use the Pixyz sharpAngle parameter)
override
Boolean
true
If true, override existing normals, else only create normals on meshes without normals
useAreaWeighting
Boolean
false
If true, normal computation will be weighted using polygon areas
createPointCloudKDTree
Create a KD-Tree from some point clouds occurrence, the given occurrences are deleted (even if they contains triangles) and the KD-Tree is represented in a new occurrence sub tree
algo . createPointCloudKDTree ( occurrences , depth , True )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences to process
depth
Int
Kd tree depth
addToScene
Bool
true
Add the KD-Tree to the current scene
Returns
Name
Type
Description
root
Occurrence
KD-Tree root occurrence
createTangents
Create tangent attributes on tessellations
algo . createTangents ( occurrences , 0 , True )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to create attributes
uvChannel
Int
0
UV channel to use for the tangents creation
override
Boolean
true
If true, override existing tangents, else only create tangents on meshes without tangents
createVisibilityPatchesFromPatch
Create visibility patches from existing patches
algo . createVisibilityPatchesFromPatch ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
decimate
Reduce the polygon count by removing some vertices
algo . decimate ( occurrences , 1 , 0.1 , 5 , - 1 , False )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
surfacicTolerance
Distance
1
Maximum distance between surfacic vertices and resulting simplified surfaces
lineicTolerance
Distance
0.1
Maximum distance between lineic vertices and resulting simplified lines
normalTolerance
Angle
5
Maximum angle between original normals and those interpolated on the simplified surface
texCoordTolerance
Double
-1
Maximum distance (in UV space) between original texcoords and those interpolated on the simplified surface
releaseConstraintOnSmallArea
Boolean
false
If True, release constraint of normal and/or texcoord tolerance on small areas (according to surfacicTolerance)
decimateEdgeCollapse
Reduce the polygon count by collapsing some edges to obtain an simplified mesh
algo . decimateEdgeCollapse ( occurrences , 0.1 , 1. , 1. , 1. , 1. , 10. , - 1 , True , - 1 , - 1 , False , 0 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
surfacicTolerance
Distance
0.1
Error max between the simplified mesh et the old one
boundaryWeight
Double
1.
Boundary importance during the decimation
normalWeight
Double
1.
Normal importance during the decimation
UVWeight
Double
1.
UV importance during the decimation
sharpNormalWeight
Double
1.
Importance of sharp edges during the decimation
UVSeamWeight
Double
10.
Importance of UV seams during the decimation
normalMaxDeviation
Angle
-1
Constraint the normals deviation on decimated model
forbidUVOverlaps
Boolean
true
Forbid UV to fold over and overlap during the decimation
UVMaxDeviation
Double
-1
Constraint the uv deviation on decimated model
UVSeamMaxDeviation
Double
-1
Constraint the uv seams deviation on decimated model
protectTopology
Boolean
false
If false, the topology of the mesh can change and some edges can become non-manifold. But the visual quality will be better on model with complex topology
qualityTradeoff
QualitySpeedTradeoff
0
For big models it is recommended to choose PreferSpeed tradeoff. In PreferSpeed mode, quadrics are computed only on position (and not on other vertex attributes)
decimatePointClouds
Decimate Point Cloud Occurrences according to tolerance
algo . decimatePointClouds ( occurrences , 500 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
tolerance
Distance
500
Avarage distance between points
decimateTarget
Reduce the polygon count by collapsing some edges to obtain a target triangle count (iterative version that use less memory)
algo . decimateTarget ( occurrences , targetStrategy , 0 , False , 5000000 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
List of occurrences to process
targetStrategy
DecimateOptionsSelector
Select between targetCount or ratio to define the number of triangles left after the decimation process
UVImportance
UVImportanceEnum
0
Select importance of texture coordinates
protectTopology
Boolean
false
If False, the topology of the mesh can change and some edges can become non-manifold
iterativeThreshold
Int
5000000
Number of triangles above which the iterative algorithm is used to limit the memory usage
deleteAttibute
Delete designed attribute on tessellations
algo . deleteAttibute ( occurrence , type )
Parameters
Name
Type
Default
Description
occurrence
Occurrence
Occurrence to detele attribute from
type
AttributType
Attribute type
deleteBRepShapes
Delete BRep representation on parts
algo . deleteBRepShapes ( occurrences , True )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
onlyTessellated
Boolean
true
If True, delete only BRep represensation on part with a tessellated shape
deleteFreeVertices
Delete all free vertices of the mesh of given parts
algo . deleteFreeVertices ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
deleteLines
Delete all free line of the mesh of given parts
algo . deleteLines ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
deleteNormals
Remove normal attributes on tessellations
algo . deleteNormals ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to delete
deletePatches
Delete patches attributes on tessellations
algo . deletePatches ( occurrences , True )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
keepOnePatchByMaterial
Boolean
true
If set, one patch by material will be kept, else all patches will be deleted and materials on patches will be lost
deletePolygons
Delete all polygons of the mesh of given parts
algo . deletePolygons ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
deleteTangents
Remove tangent attributes on tessellations
algo . deleteTangents ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to delete
deleteTextureCoordinates
Delete texture coordinates on tessellations
algo . deleteTextureCoordinates ( occurrences , - 1 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
channel
Int
-1
Choose Texture coordinates channel to delete (-1 for all channels)
deleteVisibilityPatches
Delete the visibility patches of given occurrences
algo . deleteVisibilityPatches ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
evalDecimateErrorForTarget
Returns the max error to set to reach a given target
algo . evalDecimateErrorForTarget ( occurrences , TargetStrategy , 1. , 1. , 1. , 1. , 10. , True , False )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
List of occurrences to process
TargetStrategy
DecimateOptionsSelector
Select between targetCount or ratio to define the number of triangles left after the decimation process
boundaryWeight
Double
1.
Defines how important the edges defining the mesh boundaries (free edges) are during the decimation process, to preserve them from distortion
normalWeight
Double
1.
Defines how important vertex normals are during the decimation process, to preserve the smoothing of the mesh from being damaged
UVWeight
Double
1.
Defines how important UVs (texture coordinates) are during the decimation process, to preserve them from being distorted (along with the textures using the UVs)
sharpNormalWeight
Double
1.
Defines how important sharp edges (or hard edges) are during the decimation process, to preserve them from being distorted
UVSeamWeight
Double
10.
Defines how important UV seams (UV islands contours) are during the decimation process, to preserve them from being distorted (along with the textures using the UVs)
forbidUVFoldovers
Boolean
true
Forbids UVs to fold over and overlap each other during the decimation
protectTopology
Boolean
false
If False, the topology of the mesh can change and some edges can become non-manifold; but the visual quality will be better on model with complex topology
Returns
Name
Type
Description
errorMax
Double
Max error that can be used in decimateEdgeCollapse function
explodeBodies
Explode all CAD Parts by body
algo . explodeBodies ( occurrences , False )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
groupOpenShells
Boolean
false
Group all open shells in one part
explodeConnectedMeshes
Explode connected set of polygons to parts
algo . explodeConnectedMeshes ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
explodePartByMaterials
Explode all parts by material
algo . explodePartByMaterials ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
explodePatches
Explode all parts by patch
algo . explodePatches ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
explodeVertexCount
Explode parts to respect a maximum vertex count
algo . explodeVertexCount ( occurrences , 65534 , 65534 , True )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
maxVertexCount
Int
65534
The maximum number of vertices by part
maxTriangleCount
Int
65534
The maximum number of triangles by part (quadrangles count twice)
countMergedVerticesOnce
Boolean
true
If true, one vertex used in several triangles with different normals will be counted once (for Unity must be False)
explodeVoxel
Explode parts by voxel
algo . explodeVoxel ( occurrences , 500 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
voxelSize
Distance
500
Voxel size
Extract neutral axis from tessellations
algo . extractNeutralAxis ( occurrences , 100 , True )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
maxDiameter
Distance
100
Maximum diameter of beams
removeOriginalMesh
Boolean
true
Remove or not the original mesh at the end of the algorithm
getTessellations
Returns all the tessellation of the given occurrences (only returns editable mesh, see algo.toEditableMesh)
algo . getTessellations ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
Returns
Name
Type
Description
tessellations
TessellationList
All the tessellation of the given occurrences
getVisibilityStats
Returns the visibility statistics for some occurrences
algo . getVisibilityStats ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
Returns
Name
Type
Description
visibleCountFront
Int
visibleCountBack
Int
identifyPatches
Create cad patches on tessellation (needed by some functions)
algo . identifyPatches ( occurrences , True , False , - 1 , True , True , True , False )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
useAttributesFilter
Boolean
true
Filters by attributes
useSharpEdgeFilter
Boolean
false
Filters by edge sharpness
sharpAngle
Angle
-1
Sharp angle in degree, if negative the default sharp angle value is used
useBoundaryFilter
Boolean
true
Filters by boundaries
useNonManifoldFilter
Boolean
true
Filters by manifold-ness
useLineEdgeFilter
Boolean
true
Filters by edge
useQuadLineFilter
Boolean
false
Filters by quad lines
lineToTexture
Generate a textured quadrangle over an existing mesh of coplanar lines
algo . lineToTexture ( lines , useColor , 512 , 5 )
Parameters
Name
Type
Default
Description
lines
OccurrenceList
Lines to select
useColor
UseColorOption
Set color policy.
resolution
Int
512
Texture resolution
thickness
Int
5
The thickness of the lines in pixels
listFeatures
List features from tessellations
algo . listFeatures ( occurrences , True , False , - 1 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
throughHoles
Boolean
true
List through holes
blindHoles
Boolean
false
List blind holes
maxDiameter
Distance
-1
Maximum diameter of the holes to be list (-1=no max diameter)
Returns
marchingCubes
Replace the tessellations of the selected parts by a marching cube representation
algo . marchingCubes ( occurrences , 50 , 0 , 0 , False )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
voxelSize
Distance
50
Size of voxels
elements
ElementFilter
0
Type of elements used to detect the voxels, polygons or points or hybrid
dilation
Int
0
Dilation iterations on the voxel grid (only if surfacic=false)
surfacic
Boolean
false
Prefer this mode if the source is surfacic, the result is not guaranteed to be watertight
Returns
Name
Type
Description
marchingCubePart
Occurrence
Resulting part occurrence
mergeVertices
Merge near vertices according to the given distance
algo . mergeVertices ( occurrences , maxDistance , mask )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
maxDistance
Distance
Maximum distance between two vertex to merge
mask
TopologyCategoryMask
Topological category of the vertices to merge
noiseMesh
Apply noise to vertex positions along their normals
algo . noiseMesh ( occurrences , 1 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of parts to noise
maxAmplitude
Distance
1
Maximum distance between original vertex and noisy vertex
optimizeCADLoops
Optimize CAD Face loops by merging useless loop edges
algo . optimizeCADLoops ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to optimize
optimizeForRendering
Optimize mesh for rendering (lossless, only reindexing)
algo . optimizeForRendering ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to optimize
optimizeSubMeshes
Sort sub meshes by materials
algo . optimizeSubMeshes ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of parts to process
optimizeTextureSize
Resizes scene textures based on a number of texels per 3D space units (e.g: mm)
algo . optimizeTextureSize ( root , 2 )
Parameters
Name
Type
Default
Description
root
Occurrence
Root from which texture resizing will process
texelPerMm
Double
2
Number of texel per millimeter in a 3D space
proxyMesh
Replace the tessellations of the selected parts by a proxy mesh based on a voxelization
algo . proxyMesh ( occurrences , 50 , 0 , 0 , False )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
voxelSize
Distance
50
Size of voxels
elements
ElementFilter
0
Type of elements used to detect the voxels, polygons or points or hybrid
dilation
Int
0
Dilation iterations on the voxel grid (only if surfacic=false)
surfacic
Boolean
false
Prefer this mode if the source is surfacic, the result is not guaranteed to be watertight
Returns
Name
Type
Description
proxyMeshPart
Occurrence
Resulting part occurrence
removeHoles
Remove some features from tessellations
algo . removeHoles ( occurrences , True , False , False , - 1 , 0 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
throughHoles
Boolean
true
Remove through holes
blindHoles
Boolean
false
Remove blind holes
surfacicHoles
Boolean
false
Remove surfacic holes
maxDiameter
Distance
-1
Maximum diameter of the holes to be removed (-1=no max diameter)
fillWithMaterial
Material
0
If set, the given material will be used to fill the holes
repairCAD
Repair CAD shapes, assemble faces, remove duplicated faces, optimize loops and repair topology
algo . repairCAD ( occurrences , 0.1 , True )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to clean
tolerance
Distance
0.1
Tolerance
orient
Boolean
true
If true reorient the model
replaceBy
Replace geometries by other shapes, or primitives
algo . replaceBy ( occurrences , [ "Occurrence" , algo . ReplaceByOccurrenceOptions ( 0 , False )])
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to replace
replaceBy
ReplaceByOption
["Occurrence", algo.ReplaceByOccurrenceOptions(0, False)]
Shape replacement option
replaceByBox
Replace objects by a bounding box
algo . replaceByBox ( occurrences , boxType )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to replace
boxType
ReplaceByBoxType
Bounding box type, oriented, axis-aligned, ...
replaceByConvexHull
Replace objects by convex hull
algo . replaceByConvexHull ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to replace
replaceByPrimitive
Replace objects by a primitive shapes
algo . replaceByPrimitive ( occurrences , primitive , True )
Parameters
retessellate
Update the tessellated representation of each CAD part with new tessellation parameters
algo . retessellate ( occurrences , 0.2 , - 1 , - 1 , True , 0 , 1 , 0.0 , False , False )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to tessellate
maxSag
Distance
0.2
Maximum distance between the geometry and the tessellation
maxLength
Distance
-1
Maximum length of elements
maxAngle
Angle
-1
Maximum angle between normals of two adjacent elements
createNormals
Boolean
true
If true, normals will be generated
uvMode
UVGenerationMode
0
Select the texture coordinates generation mode
uvChannel
Int
1
The UV channel of the generated texture coordinates (if any)
uvPadding
Double
0.0
The UV padding between UV island in UV coordinate space (between 0-1). This parameter is handled as an heuristic so it might not be respected
createTangents
Boolean
false
If true, tangents will be generated
createFreeEdges
Boolean
false
If true, free edges will be created for each patch borders
retopologize
Replace the tessellations of the selected parts by a retopology of the external hull
algo . retopologize ( occurrences , 1000 , True , False , - 1 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
targetTriangleCount
Int
1000
Target triangle count
pureQuad
Bool
true
Retopologize to a pure quad mesh if True, else the resulting mesh will be quad dominant but can contains triangles
pointCloud
Bool
false
Set to true if occurrences are point cloud, else False
precision
Distance
-1
If set, define the precision of the features to preserve
Returns
Name
Type
Description
retopologizedPart
Occurrence
Resulting part occurrence
selectSimilar
Selects occurrences in the whole scene that are similar to the selected occurrences. If several occurrences are selected, the selection afterwards will contain similar parts for each input occurrence.
algo . selectSimilar ( occurrences , 0.98 , 0.98 , False )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences for which we want to find similar occurrences in the scene.
dimensionsSimilarity
Coeff
0.98
The percentage of similarity on dimensions. A value of 1.0 (100%) will find parts that have exactly the same dimensions. A lower value will increase the likelihood to find similar parts, at the cost of precision.
polycountSimilarity
Coeff
0.98
The percentage of similarity on polycount. A value of 1.0 (100%) will find parts that have exactly the same polycount. A lower value will increase the likelihood to find similar parts, at the cost of precision.
ignoreSymmetry
Boolean
false
If True, symmetries will be ignored, otherwise negative scaling will be applied in the occurrence transformation.
smoothMeshalgo . smoothMesh ( occurrences , mode , 100 , True )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
mode
CostEvaluation
Computation of cost
maxIterations
Int
100
Maximum number of swapping iteration
lockSignificantEdges
Boolean
true
Forbid to swap significant edges (e.g. UV seams, sharp edges, patch borders, ...)
sweep
Extrudes a circular section along an underlying polyline (curve)
algo . sweep ( occurrences , 1 , 10 , True , False , True )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to check
radius
Distance
1
Radius of cylinders
sides
Int
10
Number of points to create cylinders
createNormals
Boolean
true
keepLines
Boolean
false
generateUV
Boolean
true
tessellate
Create a tessellated representation from a CAD representation for each given part
algo . tessellate ( occurrences , 0.2 , - 1 , - 1 , True , 0 , 1 , 0.0 , False , False , True , False )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to tessellate
maxSag
Distance
0.2
Maximum distance between the geometry and the tessellation
maxLength
Distance
-1
Maximum length of elements
maxAngle
Angle
-1
Maximum angle between normals of two adjacent elements
createNormals
Boolean
true
If true, normals will be generated
uvMode
UVGenerationMode
0
Select the texture coordinates generation mode
uvChannel
Int
1
The UV channel of the generated texture coordinates (if any)
uvPadding
Double
0.0
The UV padding between UV island in UV coordinate space (between 0-1). This parameter is handled as an heuristic so it might not be respected
createTangents
Boolean
false
If true, tangents will be generated
createFreeEdges
Boolean
false
If true, free edges will be created for each patch borders
keepBRepShape
Boolean
true
If true, BRep shapes will be kept for Back to Brep or Retessellate
overrideExistingTessellation
Boolean
false
If true, already tessellated parts will be re-tessellated
tessellatePointClouds
Tessellate point clouds to replace the geometry with a polygonal connect mesh
algo . tessellatePointClouds ( occurrences , 20 , False , True )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
kNeighbors
Int
20
The number of neighbor points used to compute normals
keepPoints
Boolean
false
Keep points after meshing if enabled
colorize
Boolean
true
If enabled, vertex colors will be generated on the resulting mesh
tessellateRelativelyToAABB
Creates a tessellated representation from a CAD representation for each given part. It multiplies the length of the diagonal of the bounding box by the sagRatio. If the output value is above maxSag, then maxSag is used as tessellation value. Else if the output value is below maxSag, it is used as tessellation value.
algo . tessellateRelativelyToAABB ( occurrences , 0.2 , 0.001 , - 1 , - 1 , True , 0 , 1 , 0.0 , False , False , True , False )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to tessellate
maxSag
Distance
0.2
Maximum distance between the geometry and the tessellation
sagRatio
Double
0.001
Maximum ratio distance between the geometry and the tessellation
maxLength
Distance
-1
Maximum length of elements
maxAngle
Angle
-1
Maximum angle between normals of two adjacent elements
createNormals
Boolean
true
If true, normals will be generated
uvMode
UVGenerationMode
0
Select the texture coordinates generation mode
uvChannel
Int
1
The UV channel of the generated texture coordinates (if any)
uvPadding
Double
0.0
The UV padding between UV island in UV coordinate space (between 0-1). This parameter is handled as an heuristic so it might not be respected
createTangents
Boolean
false
If true, tangents will be generated
createFreeEdges
Boolean
false
If true, free edges will be created for each patch borders
keepBRepShape
Boolean
true
If true, BRep shapes will be kept for Back to Brep or Retessellate
overrideExistingTessellation
Boolean
false
If true, already tessellated parts will be re-tessellated
voxelize
Replace the tessellations of the selected parts by a voxelization of the external skin
algo . voxelize ( occurrences , 50 , 0 , 0 , False )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
voxelSize
Distance
50
Size of voxels
elements
ElementFilter
0
Type of elements used to detect the voxels, polygons or points or hybrid
dilation
Int
0
Dilation iterations on the voxel grid
useCurrentAnimationPosition
Boolean
false
Use the current animation position instead of the t-pose
Returns
Name
Type
Description
voxelizedPart
Occurrence
Resulting part occurrence
voxelizePointClouds
Explode point clouds to voxels
algo . voxelizePointClouds ( occurrences , 500 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
voxelSize
Distance
500
Size of voxels
bakeUV
Bake UV from a mesh to another mesh
algo . bakeUV ( source , destination , 0 , 0 , 0.001 )
Parameters
Name
Type
Default
Description
source
Occurrence
Occurrence of the source mesh
destination
Occurrence
Occurrence of the destination mesh
sourceChannel
Int
0
Source UV channel to bake
destinationChannel
Int
0
Destination UV channel to bake to
tolerance
Distance
0.001
Tolerance when point is projected on seam (if the model come from a decimation it is recommended to use the lineic tolerance here)
combineMeshes
Combine all given meshes to one mesh with one material (baked)
algo . combineMeshes ( occurrences , bakingOptions , False )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
bakingOptions
BakeOption
Baking options
overrideExistingUVs
Boolean
false
If True, override existing UVs on channel
Returns
Create visilibity information on parts viewed from a set of camera automatically placed on a sphere around the scene
algo . createVisibilityInformation ( occurrences , 0 , 1024 , 16 , 90 , False )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
level
SelectionLevel
0
Level of parts to remove : Parts, Patches or Polygons
resolution
Int
1024
Resolution of the visibility viewer
sphereCount
Int
16
Segmentation of the sphere sphereCount x sphereCount
fovX
Double
90
Horizontal field of view (in degree)
considerTransparentOpaque
Boolean
false
If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque
Create visilibity information on parts viewed from a given set of camera
algo . createVisibilityInformationFromViewPoints ( occurrences , cameraPositions , cameraDirections , cameraUps , 1024 , 90 , False )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
cameraPositions
Point3List
List of camera positions
cameraDirections
Point3List
List of camera directions
cameraUps
Point3List
List of camera up vectors
resolution
Int
1024
Resolution of the visibility viewer
fovX
Double
90
Horizontal field of view (in degree)
considerTransparentOpaque
Boolean
false
If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque
getHiddenOccurrences
Return parts occurrences not viewed from a sphere around the scene
algo . getHiddenOccurrences ( occurrences , 1024 , 16 , 90 , False )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
resolution
Int
1024
Resolution of the visibility viewer
sphereCount
Int
16
Segmentation of the sphere sphereCount x sphereCount
fovX
Double
90
Horizontal field of view (in degree)
considerTransparentOpaque
Boolean
false
If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque
Returns
Name
Type
Description
hiddenOccurrences
OccurrenceList
Hidden occurrences
hiddenRemoval
Delete parts, patches or polygons not viewed from a sphere around the scene
algo . hiddenRemoval ( occurrences , 0 , 1024 , 16 , 90 , False , 1 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
level
SelectionLevel
0
Level of parts to remove : Parts, Patches or Polygons
resolution
Int
1024
Resolution of the visibility viewer
sphereCount
Int
16
Segmentation of the sphere sphereCount x sphereCount
fovX
Double
90
Horizontal field of view (in degree)
considerTransparentOpaque
Boolean
false
If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque
adjacencyDepth
Int
1
Mark neighbors polygons as visible
Returns
Name
Type
Description
viewedOccurrences
BoolList
For each occurrence in occurrences, tell if the occurrence has been viewed (True) or not (True)
hiddenRemovalCamera
Delete parts, patches or polygons not viewed from spheres generated with a set of camera position
algo . hiddenRemovalCamera ( occurrences , 0 , cameraPositions , 1024 , 16 , 90 , False , 1 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
level
SelectionLevel
0
Level of parts to remove : Parts, Patches or Polygons
cameraPositions
Point3List
List of camera positions
resolution
Int
1024
Resolution of the visibility viewer
sphereCount
Int
16
Segmentation of the sphere sphereCount x sphereCount
fovX
Double
90
Horizontal field of view (in degree)
considerTransparentOpaque
Boolean
false
If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque
adjacencyDepth
Int
1
Mark neighbors polygons as visible
Returns
Name
Type
Description
viewedOccurrences
BoolList
For each occurrence in occurrences, tell if the occurrence has been viewed (True) or not (True)
hiddenRemovalViewPoints
Delete parts, patches or polygons not viewed from a set of camera position/orientation
algo . hiddenRemovalViewPoints ( occurrences , 0 , cameraPositions , cameraDirections , cameraUps , 1024 , 90 , False , 1 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
level
SelectionLevel
0
Level of parts to remove : Parts, Patches or Polygons
cameraPositions
Point3List
List of camera positions
cameraDirections
Point3List
List of camera directions
cameraUps
Point3List
List of camera up vectors
resolution
Int
1024
Resolution of the visibility viewer
fovX
Double
90
Horizontal field of view (in degree)
considerTransparentOpaque
Boolean
false
If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque
adjacencyDepth
Int
1
Mark neighbors polygons as visible
Returns
Name
Type
Description
viewedOccurrences
BoolList
For each occurrence in occurrences, tell if the occurrence has been viewed (True) or not (True)
hiddenSelection
Select parts not viewed from a sphere around the scene
algo . hiddenSelection ( occurrences , 1024 , 16 , 90 , False )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
resolution
Int
1024
Resolution of the visibility viewer
sphereCount
Int
16
Segmentation of the sphere sphereCount x sphereCount
fovX
Double
90
Horizontal field of view (in degree)
considerTransparentOpaque
Boolean
false
If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque
Create visilibity information on parts viewed from a set of camera automatically generated
algo . smartHiddenCreateVisibilityInformation ( occurrences , 100 , 1 , 256 , 0 , False )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
voxelSize
Distance
100
Size of the voxels in mm (smaller it is, more viewpoints there are)
minimumCavityVolume
Volume
1
Minimum volume of a cavity in cubic meter (smaller it is, more viewpoints there are)
resolution
Int
256
Resolution of the visibility viewer
mode
SmartHiddenType
0
Select where to place camera (all cavities, only outer or only inner cavities)
considerTransparentOpaque
Boolean
false
If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque
smartHiddenRemoval
Delete parts, patches or polygons not viewed from a set of camera automatically generated
algo . smartHiddenRemoval ( occurrences , 0 , 100 , 1 , 256 , 0 , False , 1 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
level
SelectionLevel
0
Level of parts to remove : Parts, Patches or Polygons
voxelSize
Distance
100
Size of the voxels in mm (smaller it is, more viewpoints there are)
minimumCavityVolume
Volume
1
Minimum volume of a cavity in cubic meter (smaller it is, more viewpoints there are)
resolution
Int
256
Resolution of the visibility viewer
mode
SmartHiddenType
0
Select where to place camera (all cavities, only outer or only inner cavities)
considerTransparentOpaque
Boolean
false
If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque
adjacencyDepth
Int
1
Mark neighbors polygons as visible
Returns
Name
Type
Description
viewedOccurrences
BoolList
For each occurrence in occurrences, tell if the occurrence has been viewed (True) or not (True)
smartHiddenSelection
Select parts not viewed from a set of camera automatically generated
algo . smartHiddenSelection ( occurrences , 100 , 1 , 256 , 0 , False )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
voxelSize
Distance
100
Size of the voxels in mm (smaller it is, more viewpoints there are)
minimumCavityVolume
Volume
1
Minimum volume of a cavity in cubic meter (smaller it is, more viewpoints there are)
resolution
Int
256
Resolution of the visibility viewer
mode
SmartHiddenType
0
Select where to place camera (all cavities, only outer or only inner cavities)
considerTransparentOpaque
Boolean
false
If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque
sawWithAABB
Saw the mesh with an axis-aligned bounding box
algo . sawWithAABB ( occurrences , aabb , mode , "_inner" , "_outer" )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
aabb
AABB
Axis-Aligned Bounding Box
mode
SawingMode
The sawing mode
innerSuffix
String
"_inner"
Only if mode is set to SawAndSplit, set the suffix of the inner part
outerSuffix
String
"_outer"
Only if mode is set to SawAndSplit, set the suffix of the outer part
sawWithOBB
Saw the mesh with an oriented bounding box
algo . sawWithOBB ( occurrences , obb , mode , "_inner" , "_outer" )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
obb
OBB
Minimum Bounding Box
mode
SawingMode
The sawing mode
innerSuffix
String
"_inner"
Only if mode is set to SawAndSplit, set the suffix of the inner part
outerSuffix
String
"_outer"
Only if mode is set to SawAndSplit, set the suffix of the outer part
sawWithPlane
Saw the mesh with a plane
algo . sawWithPlane ( occurrences , planeOrigin , planeNormal , mode , "_inner" , "_outer" )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
planeOrigin
Point3
The plane origin
planeNormal
Vector3
The plane normal
mode
SawingMode
The sawing mode
innerSuffix
String
"_inner"
Only if mode is set to SawAndSplit, set the suffix of the inner part
outerSuffix
String
"_outer"
Only if mode is set to SawAndSplit, set the suffix of the outer part
Apply a transformation matrix on texture coordinates
algo . applyUvTransform ( occurrences , matrix , 0 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
matrix
Matrix4
Transformationmatrix
channel
Int
0
UV channel to transform
automaticUVMapping
Generates the texture coordinates and automatically cut
algo . automaticUVMapping ( occurrences , 0 , 0.5 , - 1 , True , True )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
channel
Int
0
The UV channel which will contains the texture coordinates
maxAngleDistorsion
Double
0.5
Maximum angle distorsion
maxAreaDistorsion
Double
-1
Maximum area distorsion before scale to 1.
sharpToSeam
Bool
true
If enabled, sharp edges are automatically considered as UV seams
forbidOverlapping
Bool
true
If enabled, UV cannot overlap
copyUV
Copy an UV channel to another UV channel
algo . copyUV ( occurrences , 0 , 0 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
sourceChannel
Int
0
The source UV channel to copy
destinationChannel
Int
0
The destination UV channel to copy into
flattenUV
Flatten the UVs on the occurrence
algo . flattenUV ( occurrences , 0 , 1 , 1.0 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
channel
Int
0
UV channel to merge
iterations
Int
1
Number of iterations to perform
newtonTolf
Double
1.0
Threshold for gradient normals
getRatioUV3D
Compute the ratio between the UV and the 3D size
algo . getRatioUV3D ( occurrences , ratioMode , 0 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
ratioMode
RatioUV3DMode
Choose how to compute the ratio
channel
Int
0
UV channel to use
Returns
Name
Type
Description
ratios
DoubleList
Ratios 3Dsize/UVsize of the input occurrences
mapUvOnAABB
Generate texture coordinates using the projection on object Axis Aligned Bounding Box
algo . mapUvOnAABB ( occurrences , False , 100 , 0 , True , True )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
useLocalAABB
Bool
false
If enabled, uses part own bounding box, else use global one
uv3dSize
Distance
100
3D size of the UV space [0-1]
channel
Int
0
The UV channel which will contains the texture coordinates
overrideExistingUVs
Boolean
true
If True, override existing UVs on channel
ignoreScale
Boolean
true
If this and useLocalAABB are true, ignore local scale
mapUvOnBox
Generate texture coordinates using the projection on a box
algo . mapUvOnBox ( occurrences , box , 0 , True )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
box
Box
Box definition
channel
Int
0
The UV channel which will contains the texture coordinates
overrideExistingUVs
Boolean
true
If True, override existing UVs on channel
mapUvOnCubicAABB
Generate texture coordinates using the projection on object AABB, with same scale on each axis
algo . mapUvOnCubicAABB ( occurrences , 100 , 0 , True )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
uv3dSize
Distance
100
3D size of the UV space [0-1]
channel
Int
0
The UV channel which will contains the texture coordinates
overrideExistingUVs
Boolean
true
If True, override existing UVs on channel
mapUvOnCustomAABB
Generate texture coordinates using the projection on custom AABB
algo . mapUvOnCustomAABB ( occurrences , aabb , 100 , 0 , True )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
aabb
AABB
Axis aligned bounding box to project on
uv3dSize
Distance
100
3D size of the UV space [0-1]
channel
Int
0
The UV channel which will contains the texture coordinates
overrideExistingUVs
Boolean
true
If True, override existing UVs on channel
mapUvOnCylinder
Generate texture coordinates using the projection on a cylinder
algo . mapUvOnCylinder ( occurrences , cylinder , 0 , True )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
cylinder
Cylinder
Cylinder definition
channel
Int
0
The UV channel which will contains the texture coordinates
overrideExistingUVs
Boolean
true
If True, override existing UVs on channel
mapUvOnFittingCylinder
Generate texture coordinates using the projection on a fitting cylinder
algo . mapUvOnFittingCylinder ( occurrences , 0 , True , True )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
channel
Int
0
The UV channel which will contains the texture coordinates
overrideExistingUVs
Boolean
true
If True, override existing UVs on channel
useAABB
Boolean
true
If true use for the fitting the global Axis Aligned Bounding Box (AABB), else use a Minimum Bounding Box (MBB only based on transformed AABB of occurrences)
mapUvOnFittingSphere
Generate texture coordinates using the projection on a fitting sphere
algo . mapUvOnFittingSphere ( occurrences , 0 , True , True )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
channel
Int
0
The UV channel which will contains the texture coordinates
overrideExistingUVs
Boolean
true
If True, override existing UVs on channel
useAABB
Boolean
true
If true use for the fitting the global Axis Aligned Bounding Box (AABB), else use a Minimum Bounding Box (MBB only based on transformed AABB of occurrences)
mapUvOnMBB
Generate texture coordinates using the projection on object Minimum Bounding Box
algo . mapUvOnMBB ( occurrences , False , 100 , 0 , True )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
useLocalMBB
Bool
false
If enabled, uses part own bounding box, else use global one
uv3dSize
Distance
100
3D size of the UV space [0-1]
channel
Int
0
The UV channel which will contains the texture coordinates
overrideExistingUVs
Boolean
true
If True, override existing UVs on channel
mapUvOnPlane
Generate texture coordinates using the projection on a plane
algo . mapUvOnPlane ( occurrences , plane , 0 , True )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
plane
Plane
Plane definition
channel
Int
0
The UV channel which will contains the texture coordinates
overrideExistingUVs
Boolean
true
If True, override existing UVs on channel
mapUvOnSphere
Generate texture coordinates using the projection on a sphere
algo . mapUvOnSphere ( occurrences , sphere , 0 , True )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
sphere
Sphere
Sphere definition
channel
Int
0
The UV channel which will contains the texture coordinates
overrideExistingUVs
Boolean
true
If True, override existing UVs on channel
mergeUVIslands
Minimizes the number of seams in the UV mapping
algo . mergeUVIslands ( occurrences , 1 , 0 , 1.2 , - 1 , 0 , - 1 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
usePolygonsWeights
Double
1
Use polygons weights to prioritize seams between polygons with less weight. The value represents the feature weight
channel
Int
0
UV channel to merge
maxScaleVariationFactor
Double
1.2
Maximum scaling factor allowed, -1 meaning no limits
useVerticesWeights
Double
-1
Use vertices weights to prioritize seams where vertices with less weight. The value represents the feature weight
scaleWeights
Double
0
Weight to assign to scale for the merging priority
curvatureWeights
Double
-1
Weight to assign to curvature for the merging priority
normalizeUV
Normalize UVs to fit in the [0-1] uv space
algo . normalizeUV ( occurrences , 0 , - 1 , True , True , False )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
sourceUVChannel
Int
0
UV Channel to normalize
destinationUVChannel
Int
-1
UV channel to store the normalized UV (if -1, sourceUVChannel will be replaced)
uniform
Boolean
true
If true, the scale will be uniform. Else UV can be deformed with a non-uniform scale
sharedUVSpace
Boolean
true
If true, all parts will be processed as if they were merged to avoid overlapping of their UV coordinates
ignoreNullIslands
Boolean
false
If true, islands with null height and width will be ignored and their UV coordinates will be set to 0,0
relaxUV
Relax UVs
algo . relaxUV ( occurrences , method , 100 , 0 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
method
RelaxUVMethod
What the method used to relax is based on
iterations
Int
100
Number of relax iterations
channel
Int
0
The UV channel to repack
removeUV
Remove one or all UV channel(s)
algo . removeUV ( occurrences , - 1 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
channel
Int
-1
The UV channel to remove (all if channel=-1)
repackUV
Pack existing UV (create atlas)
algo . repackUV ( occurrences , 0 , True , 1024 , 2 , False , 3 , True )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
channel
Int
0
The UV channel to repack
shareMap
Boolean
true
If True, the UV of all given parts will be packed together
resolution
Int
1024
Resolution wanted for the final map
padding
UInt
2
Set the padding (in pixels) between UV islands
uniformRatio
Boolean
false
If true, UV of different part will have the same ratio
iterations
Int
3
Fitting iterations
removeOverlaps
Boolean
true
Remove overlaps to avoid multiple triangles UVs to share the same pixel
Returns
Name
Type
Description
failedParts
OccurrenceList
Parts which failed to be repacked at this resolution (try to increase the resolution or decrease the padding)
resizeUVsToTextureSize
Rescale the UV coordinates to fit the input texture size
algo . resizeUVsToTextureSize ( occurrences , 100 , 0 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences to use for the rescaling
TextureSize
Distance
100
Texture size to use for the UV coordinates (in millimeters)
channel
Int
0
UV channel to use
scaleUV
Apply a scale on texture coordinates
algo . scaleUV ( occurrences , scaleU , scaleV , 0 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
scaleU
Double
Scale to apply to U coordinate
scaleV
Double
Scale to apply to V coordinate
channel
Int
0
UV channel to transform
segmentDiskFront
Create UV patches with disk-like topology
algo . segmentDiskFront ( occurrences , 25.0 , 0 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
threshold
Double
25.0
Threshold of the front's Gaussian Curvature
channel
Int
0
The UV channel to repack
smoothUV
Smooth texture coordinates
algo . smoothUV ( occurrences , 1 , 0 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
iterations
Int
1
Number of smooth iterations
channel
Int
0
The UV channel which will contains the texture coordinates to smooth
swapUvChannels
Swap two UV channels
algo . swapUvChannels ( occurrences , 0 , 0 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of part to process
firstChannel
Int
0
First UV Channel to swap
secondChannel
Int
0
Second UV Channel to swap
transferVisibilityToPolygonalWeight
Set Polygonal Weight Attribute from Visibility Attribute
algo . transferVisibilityToPolygonalWeight ( occurrences , 0 )
Parameters
getFittingCylinder
Returns the fitting cylinder of a set of occurrences (based on MBB)
algo . getFittingCylinder ( occurrences , True )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences to fit
useAABB
Boolean
true
If true use the global Axis Aligned Bounding Box (AABB), else use a Minimum Bounding Box MBB only based on transformed AABB of occurrences)
Returns
Name
Type
Description
affine
Affine
Affine transformation of the cylinder
getFittingSphere
Returns the fitting sphere of a set of occurrences
algo . getFittingSphere ( occurrences , True )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences to fit
useAABB
Boolean
true
If true use the global Axis Aligned Bounding Box (AABB), else use a Minimum Bounding Box (MBB only based on transformed AABB of occurrences)
Returns
Name
Type
Description
affine
Affine
Affine transformation of the sphere
bakeMaps
Bake texture maps on meshes from self or other meshes
algo . bakeMaps ( destinationOccurrences , [], [], 0 , 1024 , 1 , True , "" , additionalCustomMaps , - 1 , 0 , 0.1 , False , 0 , [])
Parameters
Name
Type
Default
Description
destinationOccurrences
OccurrenceList
Occurrences of the meshes where to store the baked map
sourceOccurrences
OccurrenceList
[]
Occurrences of components from which to bake maps (if empty use destination)
mapsToBake
BakeMapList
[]
List of map to generate (Normal, Diffuse, ...)
channel
Int
0
UV channel of destOccurrence to use for the map generation
resolution
Int
1024
Map resolution
padding
Int
1
Add padding to the map. A negative value means that the texture will be filled, and the padding for uv island is the absolute value
shareMaps
Boolean
true
If true, all the destinationOccurrences will share the same maps
mapSuffix
String
""
Add a suffix to the map names
additionalCustomMaps
CustomBakeMapList
Additional custom maps to bake
tolerance
Distance
-1
Tolerance of projection for baking from source to destination
method
BakingMethod
0
Method to find source color if source occurrences are different than destination occurrences (Prefer ProjOnly for point clouds and RayOnly for meshes)
opacityThreshold
Coeff
0.1
If the opacity is under this threshold, considers as fully transparent and store the color behind the intersection
useCurrentPosition
Boolean
false
Use the current position instead of the T-Pose of the input occurrence
offset
Distance
0
Offset from mesh
callbackList
getPixelValueList
[]
Callbacks that returns a color
Returns
Name
Type
Description
bakedMaps
ImageList
Baked map list
convertNormalMap
Convert an existing normal map between Object-space and Tangent-space
algo . convertNormalMap ( occurrences , normalMap , 0 , True , False , True , True , True , - 1 , 1 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components using the given map
normalMap
Image
Source normal map to convert
uvChannel
Int
0
UV channel used on the given map
sourceIsObjectSpace
Boolean
true
If True, consider the given normalMap in Object-space representation, else Tangent-space
destinationIsObjectSpace
Boolean
false
If True, convert the given normalMap to Object-space representation, else Tangent-space
sourceIsRightHanded
Boolean
true
Considers source normal map as part of a right-handed coordinates system
destinationIsRightHanded
Boolean
true
Generate destination normal map as part of a right-handed coordinates system
replaceMap
Boolean
true
If true, the given normalMap will be replaced by the converted one
resolution
Int
-1
New map resolution (if replaceMap=false), if resolution=-1, the input resolution will be used
padding
Int
1
Number of pixels to add for padding. A negative value means that the texture will be filled, and the padding for uv island is the absolute value
Returns
Name
Type
Description
convertedNormalMap
Image
Converted normal map (equals normalMap if replaceMap=true)
createBillboard
Create a billboard imposter
algo . createBillboard ( occurrences , 1024 , True , True , True , True , True , True , True , False )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences to bake in the billboard
resolution
Int
1024
Total resolution of the billboard (contains all wanted faces)
XPositive
Bool
true
Bake face facing X+
XNegative
Bool
true
Bake face facing X-
YPositive
Bool
true
Bake face facing Y+
YNegative
Bool
true
Bake face facing Y-
ZPositive
Bool
true
Bake face facing Z+
ZNegative
Bool
true
Bake face facing Z-
moveFacesToCenter
Bool
true
If true, all face are moved to the center of the AABB of the occurrences, else it will shape an AABB
leftHandedNormalMap
Bool
false
If true, a left handed normal map will be generated
Returns
Name
Type
Description
billboard
Occurrence
Resulting billboard
orientNormalMap
Orient a tangent space normal map (all Z positive)
algo . orientNormalMap ( normalMap )
Parameters
Name
Type
Default
Description
normalMap
Image
Normal map to orient
barySmooth
Smooth the tessellations by moving the vertices to the barycenter of their neighbors
algo . barySmooth ( occurrences , 1 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
iteration
Int
1
Number of iterations
crackMoebiusStrips
Remove moebius strip by topologically cracking them (make it orientable)
algo . crackMoebiusStrips ( occurrences , 3 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to repair
maxEdgeCount
Int
3
Maximum number of edges to crack to remove one moebius strip
crackNonManifoldVertices
Splits non-manifold vertices
algo . crackNonManifoldVertices ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to repair
createCavityOccurrences
Identify cavities and create occurrences to show them
algo . createCavityOccurrences ( occurrences , 100 , 1 , 0 , parent )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences set to identify cavities
voxelSize
Distance
100
Size of the voxels in mm
minimumCavityVolume
Volume
1
Minimum volume of a cavity in cubic meter
mode
SmartHiddenType
0
Select where to place camera (all cavities, only outer or only inner cavities)
parent
Occurrence
The create occurrence root will be added under the parent if given, else it will be added under the deeper parent of given occurrences
Returns
Name
Type
Description
root
Occurrence
Parent occurrence of the cavity occurrences
invertOrientation
Invert the orientation of tessellation elements
algo . invertOrientation ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
moebiusCracker
Splits moebius ring
algo . moebiusCracker ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to repair
orient
Orient tessellation elements
algo . orient ( occurrences , True , False , 0 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
makeOrientable
Boolean
true
Crack moebius strips to make the model orientable
useArea
Boolean
false
Use the area instead of counting the number of triangle
orientStrategy
OrientStrategy
0
Strategy to adopt with this algorithm
orientFromCamera
Properly orient all polygons in the same direction, using a specified viewpoint
algo . orientFromCamera ( occurrences , cameraPosition , cameraDirection , cameraUp , 1024 , 90 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences to orient
cameraPosition
Point3
Camera position
cameraDirection
Point3
Camera direction
cameraUp
Point3
Camera up vector
resolution
Int
1024
Resolution of the visibility viewer
fovX
Double
90
Horizontal field of view (in degree)
orientFromFace
Orient all connect polygones in the same orientation of the polygon selectionned
orientNormals
Orient existing normal according to the polygons clockwise
algo . orientNormals ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to orient normals
remeshSurfacicHoles
Resmesh surfacic holes of tessellations
algo . remeshSurfacicHoles ( occurrences , 0.1 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
maxDiameter
Distance
0.1
Maximum surfacic holes diameters
removeDegeneratedPolygons
Remove some kinds of degenerated polygons
algo . removeDegeneratedPolygons ( occurrences , 0.1 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
tolerance
Distance
0.1
Degenerated tolerance
removeMultiplePolygon
Remove multiple polygon
algo . removeMultiplePolygon ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to repair
removeZFighting
Remove Z-fighting (surfaces overlapping) by slightly shrinking the selected parts' surfaces
algo . removeZFighting ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences to process
Returns
Name
Type
Description
offset
Distance
Offset value used by the algorithm
repairMesh
Launch the repair process to repair a disconnected or not clean tessellation
algo . repairMesh ( occurrences , 0.1 , True , True )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
tolerance
Distance
0.1
Connection tolerance
crackNonManifold
Bool
true
At the end of the repair process, crack resulting non-manifold edges
orient
Boolean
true
If true reorient the model
repairNullNormals
Create normal on an existing normal set when normal is null (polygons appears black)
algo . repairNullNormals ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to repair null normals
separateToManifold
Remove non manifold edges and try to reconnect manifold groups of triangles
algo . separateToManifold ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
sewBoundary
Sew boundaries between them
algo . sewBoundary ( occurrences , maxDistance )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to repair
maxDistance
Distance
Maximum distance between bundaries
smartOrient
Properly orient all polygons in the same direction, using visibility attributes
algo . smartOrient ( occurrences , 100 , 1 , 64 , 0 , True , 0 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences to orient
voxelSize
Distance
100
Size of the voxels in mm (smaller it is, more viewpoints there are)
minimumCavityVolume
Volume
1
Minimum volume of a cavity in cubic meter (smaller it is, more viewpoints there are)
resolution
Int
64
Resolution of the visibility viewer
mode
SmartHiddenType
0
Select where to place camera (all cavities, only outer or only inner cavities)
considerTransparentOpaque
Boolean
true
If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque
orientStrategy
SmartOrientStrategy
0
Strategy to adopt with this algorithm
vertexOffset
Move the vertices by the offsset along their normal
algo . vertexOffset ( occurrences , 1 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences to process
offset
Distance
1
Displacement
equilateralize
Sswap edges to make triangles more equilateral
algo . equilateralize ( occurrences , 1 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
maxIterations
Int
1
Maximum number of swapping iteration
quadify
Merge all triangle polygons in the meshes to quadrangles
algo . quadify ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
requadify
Advanced function to requadify a triangle tessellation coming from full quad mesh
algo . requadify ( occurrences , True )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
forceFullQuad
Bool
true
Force the results to be only full quad. It it's impossible, nothing is done
toEditableMesh
Convert all static mesh to editable mesh
algo . toEditableMesh ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences to convert to editable mesh
toStaticMesh
Convert all editable mesh to static mesh
algo . toStaticMesh ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences to convert to static mesh
triangularize
Split all non-triangle polygons in the meshes to triangles
algo . triangularize ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
createVertexWeightsFromVertexColors
Use vertex colors attributes on meshes of the given occurrence to create vertex weights attributes used by the decimation functions, the finals weights will be computed with w = offset + (red - blue) * scale
algo . createVertexWeightsFromVertexColors ( occurrences , 0 , 1 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
offset
Double
0
Offset value for weight computation
scale
Double
1
Scale value for weight computation
createVertexWeightsFromVisibilityAttributes
Use visibility attributes on meshes of the given occurrence to create vertex weights attributes used by the decimation functions. The finals weights will be computed with w = offset + (visibility/maxVisibility) * scale
algo . createVertexWeightsFromVisibilityAttributes ( occurrences , 0 , 1 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to process
offset
Double
0
Offset value for weight computation
scale
Double
1
Scale value for weight computation
createVisibilityAttributes
Create visibility attributes on tessellations
algo . createVisibilityAttributes ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to create attributes
deleteVisibilityAttributes
Delete visibility attributes on tessellations
algo . deleteVisibilityAttributes ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to delete attributes
flagVisibilityAttributesOnTransparents
Add one count to all visiblility attributes (poly and patch) on transparent patches
algo . flagVisibilityAttributesOnTransparents ( occurrences )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Occurrences of components to create attributes
CAD setPrecision
Set the CAD precision
Parameters
Name
Type
Default
Description
precision
Distance
0.01
CAD precision
solidIntersection
Perform boolean operation intersection on two bodies (A ^ B)
cad . solidIntersection ( A , B )
Parameters
Name
Type
Default
Description
A
Body
The first body
B
Body
The second body
Returns
Name
Type
Description
result
BodyList
List of resulting bodies
solidSubstraction
Perform boolean operation subtract on two bodies (A - B)
cad . solidSubstraction ( A , B )
Parameters
Name
Type
Default
Description
A
Body
The first body
B
Body
The second body
Returns
Name
Type
Description
result
BodyList
List of resulting bodies
solidUnion
Perform boolean operation union on two bodies (A + B)
Parameters
Name
Type
Default
Description
A
Body
The first body
B
Body
The second body
Returns
Name
Type
Description
result
BodyList
List of resulting bodies
createBezierCurve
Create a Bezier curve
cad . createBezierCurve ( poles )
Parameters
Name
Type
Default
Description
poles
Point3List
Poles list
Returns
Name
Type
Description
BezierCurve
Curve
Bezier curve
createBoundedCurve
Create a bounded curve from a curve
cad . createBoundedCurve ( curve , minBound , maxBound )
Parameters
Name
Type
Default
Description
curve
Curve
Curve to bound
minBound
Double
Minimum bound parameter
maxBound
Double
Maximum bound parameter
Returns
Name
Type
Description
boundedCurve
LimitedCurve
Curve bounded with given bounds
createCircleCurve
Create a new circle
cad . createCircleCurve ( radius , geom . IdentityMatrix4 )
Parameters
Name
Type
Default
Description
radius
Distance
Circle radius
matrix
Matrix4
geom.IdentityMatrix4
Transformation matrix
Returns
Name
Type
Description
circleCurve
Curve
Generated circle curve
createCompositeCurve
Create a composite curve from a list of limited curves
cad . createCompositeCurve ( limitedCurveList )
Parameters
Name
Type
Default
Description
limitedCurveList
LimitedCurveList
List of limited curves
Returns
Name
Type
Description
compositeCurve
LimitedCurve
Composite curve created from the list of limited curves
createCosinusCurve
Create a cosinus curve
cad . createCosinusCurve ( Amplitude , Offset , Period , matrix )
Parameters
Name
Type
Default
Description
Amplitude
Distance
Cosinus amplitude
Offset
Distance
Cosinus offset
Period
Distance
Cosinus period
matrix
Matrix4
Transformation matrix
Returns
Name
Type
Description
cosinusCurve
Curve
Cosinus curve
createEllipseCurve
Create an ellipse curve
cad . createEllipseCurve ( URadius , VRadius , geom . IdentityMatrix4 )
Parameters
Name
Type
Default
Description
URadius
Distance
Ellipse radius in u direction
VRadius
Distance
Ellipse radius in v direction
matrix
Matrix4
geom.IdentityMatrix4
Transformation matrix
Returns
Name
Type
Description
ellipseCurve
Curve
Ellipse curve
createHelixCurve
Create an helix curve
cad . createHelixCurve ( radius , pitch , geom . IdentityMatrix4 , True )
Parameters
Name
Type
Default
Description
radius
Distance
Radius of the helix
pitch
Distance
Height of one revolution
matrix
Matrix4
geom.IdentityMatrix4
Transformation matrix
trigonometrixOrientation
Boolean
true
Orientation of the rotation
Returns
Name
Type
Description
helixCurve
Curve
Helix curve
createHermiteCurve
Create a Hermite Curve
cad . createHermiteCurve ( FirstPoint , FirstTangent , SecondPoint , SecondTangent )
Parameters
Name
Type
Default
Description
FirstPoint
Point3
Starting point of the curve
FirstTangent
Point3
Tangent of the starting point
SecondPoint
Point3
Ending point of the curve
SecondTangent
Point3
Tangent of the ending point
Returns
Name
Type
Description
HermiteCurve
LimitedCurve
Hermite curve
createHyperbolaCurve
Create an hyperBola curve
cad . createHyperbolaCurve ( URadius , VRadius , geom . IdentityMatrix4 )
Parameters
Name
Type
Default
Description
URadius
Double
Hyperbola radius in u direction
VRadius
Double
Hyperbola radius in v direction
matrix
Matrix4
geom.IdentityMatrix4
Transformation matrix
Returns
Name
Type
Description
parabolaCurve
Curve
Hyperbola curve
createIntersectionCurve
Create a Intersection Curve
cad . createIntersectionCurve ( firstSurface , secondSurface , chart , minBounds , maxBounds )
Parameters
Name
Type
Default
Description
firstSurface
Surface
First surface of the intersection curve
secondSurface
Surface
Second surface of the intersection curve
chart
PolylineCurve
Direction curve of the intersection curve
minBounds
Double
Minimum value of the bounds of the intersection curve
maxBounds
Double
Maximum value of the bounds of the intersection curve
Returns
Name
Type
Description
IntersectionCurve
LimitedCurve
Intersection curve
createLineCurve
Create a Line Curve
cad . createLineCurve ( OriginPt , DirectionPt )
Parameters
Name
Type
Default
Description
OriginPt
Point3
Orinin point of the line curve
DirectionPt
Point3
Direction vector of the line curve
Returns
Name
Type
Description
LineCurve
Curve
Line curve
createNURBSCurve
Create a NURBS curve
cad . createNURBSCurve ( degree , knots , poles , weights )
Parameters
Returns
Name
Type
Description
NURBSCurve
Curve
NURBS curve
createParabolaCurve
Create an parabola curve
cad . createParabolaCurve ( focalLength , geom . IdentityMatrix4 )
Parameters
Name
Type
Default
Description
focalLength
Double
Focal lecngth of the parabola
matrix
Matrix4
geom.IdentityMatrix4
Transformation matrix
Returns
Name
Type
Description
parabolaCurve
Curve
Parabola curve
createPolylineCurve
Create a Polyline curve
cad . createPolylineCurve ( points )
Parameters
Name
Type
Default
Description
points
Point3List
Points of polyline curve
Returns
Name
Type
Description
polylineCurve
Curve
Polyline curve
createSegmentCurve
Create a segment curve from two given points
cad . createSegmentCurve ( firstPoint , secondPoint )
Parameters
Name
Type
Default
Description
firstPoint
Point3
First point
secondPoint
Point3
Second point
Returns
Name
Type
Description
segmentCurve
LimitedCurve
Segment curve created from the two given points
createSurfacicCurve
Create a curve from a surface
cad . createSurfacicCurve ( surface , curve2D )
Parameters
Name
Type
Default
Description
surface
Surface
Surface to bound
curve2D
LimitedCurve
Curve to project
Returns
Name
Type
Description
surfacicCurve
LimitedCurve
Curve projected on given surface
Create a curve from a surface
cad . createTransformedCurve ( curve , geom . IdentityMatrix4 )
Parameters
Name
Type
Default
Description
curve
LimitedCurve
Curve to transform
matrix
Matrix4
geom.IdentityMatrix4
Matrix of the transformation
Returns
Name
Type
Description
transformedCurve
LimitedCurve
Curve transformed by the given matrix
invertCurve
Invert a curve parametricaly
cad . invertCurve ( curve , precision )
Parameters
Name
Type
Default
Description
curve
Curve
The curve to invert
precision
Double
The precision used to invert the curve
Returns
Name
Type
Description
invertedCurve
Curve
The inverted curve
getFaceMaterial
Get the material on a face
cad . getFaceMaterial ( face )
Parameters
Name
Type
Default
Description
face
Face
The face
Returns
Name
Type
Description
material
Material
The material
setFaceMaterial
Set the material on a face
cad . setFaceMaterial ( face , material )
Parameters
Name
Type
Default
Description
face
Face
The face
material
Material
The material
addToModel
Add shape to the model
cad . addToModel ( shape , model )
Parameters
Name
Type
Default
Description
shape
Shape
Shape added to the model
model
Model
Model
buildFaces
Build faces from a surface and a set of loop
cad . buildFaces ( surface , loopList )
Parameters
Name
Type
Default
Description
surface
Surface
Surface used to build the faces
loopList
LoopList
List of Loops used to build the faces
Returns
Name
Type
Description
domain
Domain
The created domain (face or openShell)
splittingInfo
SplittedEdgeList
Map between the old edges and the new ones
createModel
Create a new model
Returns
Name
Type
Description
model
Model
The created model
getAllModelFaces
Get all the face of a model recursively
cad . getAllModelFaces ( model )
Parameters
Name
Type
Default
Description
model
Model
Model
Returns
Name
Type
Description
faces
FaceList
List of faces in the given model
getModelBodies
Get the list of bodies contained in a model
cad . getModelBodies ( model )
Parameters
Name
Type
Default
Description
model
Model
Model
Returns
Name
Type
Description
bodies
BodyList
List of bodies contained in the given model
getModelBoundaries
Get boundary edges of a model grouped by cycles
cad . getModelBoundaries ( model )
Parameters
Name
Type
Default
Description
model
Model
Model
Returns
Name
Type
Description
boundaries
EdgeListList
List of boundary edges grouped by cycles in the given model
getModelDomains
Get the list of domains (Face or OpenShell) contained in a model
cad . getModelDomains ( model )
Parameters
Name
Type
Default
Description
model
Model
Model
Returns
Name
Type
Description
domains
DomainList
List of domains contained in the given model
getModelEdges
Get the list of free edges contained in a model
Parameters
Name
Type
Default
Description
model
Model
Model
Returns
Name
Type
Description
edges
EdgeList
List of edges contained in the given model
getModelVertices
Get the list of free vertices contained in a model
cad . getModelVertices ( model )
Parameters
Name
Type
Default
Description
model
Model
Model
Returns
Name
Type
Description
vertices
VertexList
List of vertices contained in the given model
getReferencers
Returns the entities referencing a given CAD entity
cad . getReferencers ( entity )
Parameters
Name
Type
Default
Description
entity
CADEntity
CAD entity to get the referencers
Returns
Name
Type
Description
referencers
EntityList
List of CAD entities referencing the given entity
evalCurvatureOnCurve
Evaluate curvature on a curve
cad . evalCurvatureOnCurve ( curve , parameter )
Parameters
Name
Type
Default
Description
curve
Curve
The curve
parameter
Double
Parameter to evaluate
Returns
Name
Type
Description
curvature
Double
Curvature on curve at parameter
evalCurvatureOnSurface
Evaluate main curvatures on a surface
cad . evalCurvatureOnSurface ( surface , parameter )
Parameters
Name
Type
Default
Description
surface
Surface
The surface
parameter
Point2
Parameter to evaluate
Returns
Name
Type
Description
curvatures
Curvatures
Main curvatures on surface at parameter
evalOnCurve
Evaluate a point and derivatives on a curve
cad . evalOnCurve ( curve , parameter , 0 )
Parameters
Name
Type
Default
Description
curve
Curve
The curve
parameter
Double
Parameter to evaluate
derivation
Int
0
Derivation level (0,1,2)
Returns
evalOnSurface
Evaluate a point and derivatives on a surface
cad . evalOnSurface ( surface , parameter , 0 )
Parameters
Name
Type
Default
Description
surface
Surface
The surface
parameter
Point2
Parameter to evaluate
derivation
Int
0
Derivation level (0,1,2)
Returns
getBodyClosedShells
Get all closedShells contain in the body
cad . getBodyClosedShells ( body )
Parameters
Name
Type
Default
Description
body
Body
The body
Returns
Name
Type
Description
closedShells
ClosedShellList
The closedShells contain within the body
getBoundedCurveDefinition
Get all parameters contained in the boundedCurve
cad . getBoundedCurveDefinition ( boundedCurve )
Parameters
Name
Type
Default
Description
boundedCurve
BoundedCurve
The boundedCurve
Returns
Name
Type
Description
curve
Curve
The curve of the boundedCurve
bounds
Bounds1D
The boudns of the boundedCurve
getCircleCurveDefinition
Get all parameters contained in the circleCurve
cad . getCircleCurveDefinition ( circleCurve )
Parameters
Name
Type
Default
Description
circleCurve
CircleCurve
The circleCurve
Returns
Name
Type
Description
radius
Double
The radius of the circle
matrix
Matrix4
The matrix transformation of the circle
getClosedShellOrientedDomains
Get all orienteDomains contain in the closedShell
cad . getClosedShellOrientedDomains ( closedShell )
Parameters
Name
Type
Default
Description
closedShell
ClosedShell
The closedShell
Returns
Name
Type
Description
orientedDomains
OrientedDomainList
The orientedDomains contain within the closedShell
getCoEdgeDefinition
Get all parameters contained in the coEdge
cad . getCoEdgeDefinition ( coEdge )
Parameters
Name
Type
Default
Description
coEdge
CoEdge
The coEdge
Returns
Name
Type
Description
edge
Edge
The edge of the coEdge
edgeOrientation
Orientation
Orientation of the edge
loop
Loop
The loop containing the coEdge
surface
Surface
The surface of the coEdge
parametricCurve
LimitedSurface
The parametricCurve of the coEdge
getCompositeCurveDefinition
Get all parameters contained in the compositeCurve
cad . getCompositeCurveDefinition ( compositeCurve )
Parameters
Name
Type
Default
Description
compositeCurve
CompositeCurve
The compositeCurve
Returns
Name
Type
Description
curves
LimitedCurveList
The curves of the compositeCurve
parameters
DoubleList
The parameters of the compositeCurve
getConeSurfaceDefinition
Get all parameters contained in the coneSurface
cad . getConeSurfaceDefinition ( coneSurface )
Parameters
Name
Type
Default
Description
coneSurface
ConeSurface
The coneSurface
Returns
Name
Type
Description
radius
Double
The radius of the coneSurface
semiAngle
Double
The semiAngle of coneSurface
matrix
Matrix4
The transformation matrix of coneSurface
getCurveExtrusionSurfaceDefinition
Get all parameters contained in the curveExtrusionSurface
cad . getCurveExtrusionSurfaceDefinition ( curveExtrusionSurface )
Parameters
Returns
Name
Type
Description
generatrixCurve
LimitedCurve
The generatrix curve of the curveExtrusionSurface
directrixCruve
LimitedCurve
The directrix curve of the curveExtrusionSurface
surfaceReference
Surface
The reference surface of curveExtrusionSurface
getCurveLimits
Get the parametric space limits of a curve
cad . getCurveLimits ( curve )
Parameters
Returns
Name
Type
Description
limits
Bounds1D
Curve limits
getCylinderSurfaceDefinition
Get all parameters contained in the cylinderSurface
cad . getCylinderSurfaceDefinition ( cylinderSurface )
Parameters
Name
Type
Default
Description
cylinderSurface
CylinderSurface
The cylinderSurface
Returns
Name
Type
Description
radius
Double
The radius of the cylinderSurface
matrix
Matrix4
The transformation matrix of cylinderSurface
getEdgeDefinition
Get all parameters contained in the edge
cad . getEdgeDefinition ( edge )
Parameters
Name
Type
Default
Description
edge
Edge
The edge
Returns
Name
Type
Description
vertex1
Vertex
The first vertex of the edge
vertex2
Vertex
The second vertex of the edge
curve
Curve
The curve of the edge
bounds
Bounds1D
The bounds of the edge
getEllipseCurveDefinition
Get all parameters contained in the ellipseCurve
cad . getEllipseCurveDefinition ( ellipseCurve )
Parameters
Name
Type
Default
Description
ellipseCurve
EllipseCurve
The ellipseCurve
Returns
Name
Type
Description
radius1
Double
The radius on x of the ellipse
radius2
Double
The radius on y of the ellipse
matrix
Matrix4
The transformation matrix of the ellipse
getEllipticConeSurfaceDefinition
Get all parameters contained in the ellipticConeSurface
cad . getEllipticConeSurfaceDefinition ( ellipticConeSurface )
Parameters
Returns
Name
Type
Description
radius1
Double
The radius on X of the coneSurface
radius2
Double
The radius on Y of the coneSurface
semiAngle
Double
The semiAngle of coneSurface
matrix
Matrix4
The transformation matrix of coneSurface
getFaceDefinition
Get all parameters contain in the face
cad . getFaceDefinition ( face )
Parameters
Name
Type
Default
Description
face
Face
The face
Returns
Name
Type
Description
surface
Surface
The surface contain within the face
loops
LoopList
The loops contain within the face
orientation
Orientation
Relative orientation of the surface
limits
Bounds2D
Face limits on surfaces
getFaceParametricBoundaries
Get parametric definition of each face loop
cad . getFaceParametricBoundaries ( face )
Parameters
Name
Type
Default
Description
face
Face
The face
Returns
Name
Type
Description
boundaries
Point2ListList
The parametric boundaries
getHelixCurveDefinition
Get all parameters contained in the helixCurve
cad . getHelixCurveDefinition ( helixCurve )
Parameters
Name
Type
Default
Description
helixCurve
HelixCurve
The helixCurve
Returns
Name
Type
Description
radius
Double
The radius of the helixCurve
matrix
Matrix4
The matrix of the helixCurve
trigonometricOrientation
Boolean
The trigonometricOrientation of the helixCurve
getHermiteCurveDefinition
Get all parameters contained in the hermiteCurve
cad . getHermiteCurveDefinition ( hermiteCurve )
Parameters
Name
Type
Default
Description
hermiteCurve
HermiteCurve
The HermiteCurve
Returns
Name
Type
Description
firstPoint
Point3
The first point of the hermiteCurve
secondPoint
Point3
The second point of the hermiteCurve
firstTangent
Point3
The first tangent of the hermiteCurve
secondTangent
Point3
The second tangent of the hermiteCurve
getHyperbolaCurveDefinition
Get all parameters contained in the hyperbolaCurve
cad . getHyperbolaCurveDefinition ( hyperbolaCurve )
Parameters
Name
Type
Default
Description
hyperbolaCurve
HyperbolaCurve
The hyperbolaCurve
Returns
Name
Type
Description
radius1
Double
The radius on x of the hyperbola
radius2
Double
The radius on y of the hyperbola
matrix
Matrix4
The transformation matrix of the hyperbola
getIntersectionCurveDefinition
Get all parameters contained in the intersectionCurve
cad . getIntersectionCurveDefinition ( intersectionCurve )
Parameters
Name
Type
Default
Description
intersectionCurve
IntersectionCurve
The intersectionCurve
Returns
Name
Type
Description
surface1
Surface
The first surface of the intersectionCurve
surface2
Surface
The second surface of the intersectionCurve
chart
PolylineCurve
The chart of the intersectionCurve
bounds
Bounds1D
The boudns of the intersectionCurve
getLineCurveDefinition
Get all parameters contain in the lineCurve
cad . getLineCurveDefinition ( lineCurve )
Parameters
Name
Type
Default
Description
lineCurve
LineCurve
The lineCurve
Returns
Name
Type
Description
origin
Point3
The origin of the lineCurve
direction
Point3
The direction of the lineCurve
getLoopCoEdges
Get all coEdges contain in the loop
Parameters
Name
Type
Default
Description
loop
Loop
The loop
Returns
Name
Type
Description
coEdges
CoEdgeList
The coEdges contain within the loop
getNURBSCurveDefinition
Get all parameters contained in the nurbsCurve
cad . getNURBSCurveDefinition ( nurbsCurve )
Parameters
Name
Type
Default
Description
nurbsCurve
NURBSCurve
The nurbsCurve
Returns
Name
Type
Description
degree
Int
The degree of the nurbsCurve
knots
DoubleList
The knots of the nurbsCurve
poles
Point3List
The poles of the nurbsCurve
weights
DoubleList
The weights of the poles of the nurbsCurve
getNURBSSurfaceDefinition
Get all parameters contained in the nurbsSurface
cad . getNURBSSurfaceDefinition ( nurbsSurface )
Parameters
Name
Type
Default
Description
nurbsSurface
NURBSSurface
The nurbsSurface
Returns
Name
Type
Description
degreeU
Int
The degree on U of the nurbsSurface
degreeV
Int
The degree on V of the nurbsSurface
knotsU
DoubleList
The knots on U of the nurbsSurface
knotsV
DoubleList
The knots on V of the nurbsSurface
poles
Point3ListList
The poles of nurbsSurface
weights
DoubleListList
The weights of the poles of nurbsSurface
getOffsetCurveDefinition
Get all parameters contained in the offsetCurve
cad . getOffsetCurveDefinition ( offsetCurve )
Parameters
Name
Type
Default
Description
offsetCurve
OffsetCurve
The offsetCurve
Returns
Name
Type
Description
curve
LimitedCurve
The curve of the offsetCurve
direction
Point3
The direction of the offset
distance
Double
The distance of the offset
surfaceReference
Surface
The surfaceReference of the offsetCurve
getOffsetSurfaceDefinition
Get all parameters contained in the offsetSurface
cad . getOffsetSurfaceDefinition ( offsetSurface )
Parameters
Name
Type
Default
Description
offsetSurface
OffsetSurface
The offsetSurface
Returns
Name
Type
Description
baseSurface
Surface
The initial surface
distance
Double
The distance offset
getOpenShellOrientedDomains
Get all orienteDomains contain in the openShell
cad . getOpenShellOrientedDomains ( openShell )
Parameters
Name
Type
Default
Description
openShell
OpenShell
The openShell
Returns
Name
Type
Description
orientedDomains
OrientedDomainList
The orientedDomains contain within the openShell
getParabolaCurveDefinition
Get all parameters contained in the parabolaCurve
cad . getParabolaCurveDefinition ( parabolaCurve )
Parameters
Name
Type
Default
Description
parabolaCurve
ParabolaCurve
The parabolaCurve
Returns
Name
Type
Description
focalLength
Double
The radius of the hyperbola
matrix
Matrix4
The transformation matrix of the hyperbola
getPlaneSurfaceDefinition
Get all parameters contained in the planeSurface
cad . getPlaneSurfaceDefinition ( planeSurface )
Parameters
Name
Type
Default
Description
planeSurface
PlaneSurface
The planeSurface
Returns
Name
Type
Description
matrix
Matrix4
The transformation matrix of planeSurface
getPolylineCurveDefinition
Get all parameters contained in the polylinCurve
cad . getPolylineCurveDefinition ( polylineCurve )
Parameters
Name
Type
Default
Description
polylineCurve
PolylineCurve
The polylineCurve
Returns
Name
Type
Description
points
Point3List
The points of the polylineCurve
parameters
DoubleList
The parameters of the polylineCurve
getRevolutionSurfaceDefinition
Get all parameters contained in the revolutionSurface
cad . getRevolutionSurfaceDefinition ( revolutionSurface )
Parameters
Name
Type
Default
Description
revolutionSurface
RevolutionSurface
The revolutionSurface
Returns
Name
Type
Description
generatricCurve
LimitedCurve
Thegeneratrix curve of the revolutionSurface
axisOrigin
Point3
The origin of the axis of the revolutionSurface
axisDirection
Point3
The direction of the axis of the revolutionSurface
startAngle
Double
The starting angle of the revolutionSurface
endAngle
Double
The ending angle of the revolutionSurface
getRuledSurfaceDefinition
Get all parameters contained in the ruledSurface
cad . getRuledSurfaceDefinition ( ruledSurface )
Parameters
Name
Type
Default
Description
ruledSurface
RuledSurface
The ruledSurface
Returns
Name
Type
Description
firstCurve
LimitedCurve
The first curve of the ruledSurface
secondCurve
LimitedCurve
The second curve of the ruledSurface
getSegmentCurveDefinition
Get all parameters contained in the segmentCurve
cad . getSegmentCurveDefinition ( segmentCurve )
Parameters
Name
Type
Default
Description
segmentCurve
SegmentCurve
The segmentCurve
Returns
Name
Type
Description
startPoint
Point3
The first point of the segmentCurve
endPoint
Point3
The second point of the segmentCurve
getSphereSurfaceDefinition
Get all parameters contained in the sphereSurface
cad . getSphereSurfaceDefinition ( sphereSurface )
Parameters
Name
Type
Default
Description
sphereSurface
SphereSurface
The sphereSurface
Returns
Name
Type
Description
radius
Double
The radius of the sphereSurface
matrix
Matrix4
The transformation matrix of sphereSurface
getSurfaceLimits
Get the parametric space limits of a surface
cad . getSurfaceLimits ( surface )
Parameters
Returns
Name
Type
Description
limits
Bounds2D
Surface limits
getSurfacicCurveDefinition
Get all parameters contained in the surfacicCurve
cad . getSurfacicCurveDefinition ( surfacicCurve )
Parameters
Name
Type
Default
Description
surfacicCurve
SurfacicCurve
The surfacicCurve
Returns
Name
Type
Description
surface
Surface
The surface of the surfacicCurve
curve2D
LimitedCurve
The 2D curve of the surfacicCurve
getTabulatedCylinderSurfaceDefinition
Get all parameters contained in the TabulatedCylinderSurface
cad . getTabulatedCylinderSurfaceDefinition ( tabulatedCylinderSurface )
Parameters
Returns
Name
Type
Description
directrixCurve
LimitedCurve
The directrix curve of the tabulatedCylinderSurface
generatrixLine
Point3
The generatrix line of the tabulatedCylinderSurface
range
Bounds1D
The range of the tabulatedCylinderSurface
getTorusSurfaceDefinition
Get all parameters contained in the torusSurface
cad . getTorusSurfaceDefinition ( torusSurface )
Parameters
Name
Type
Default
Description
torusSurface
TorusSurface
The torusSurface
Returns
Name
Type
Description
majorRadius
Double
The major radius of the torusSurface
minorRadius
Double
The minor radius of the torusSurface
matrix
Matrix4
The transformation matrix of torusSurface
Get all parameters contained in the transformedCurve
cad . getTransformedCurveDefinition ( transformedCurve )
Parameters
Name
Type
Default
Description
transformedCurve
TransformedCurve
The transformedCurve
Returns
Name
Type
Description
curve
LimitedCurve
The initial curve
matrix
Matrix4
The transformation matrix
getVertexPosition
Get the position of the vertex
cad . getVertexPosition ( vertex )
Parameters
Name
Type
Default
Description
vertex
Vertex
The vertex
Returns
Name
Type
Description
position
Point3
The position of the vertex
invertOnCurve
Invert a point to a curve
cad . invertOnCurve ( curve , point , - 1 )
Parameters
Name
Type
Default
Description
curve
Curve
The curve
point
Point3
The point to invert
precision
Double
-1
Inversion precision
Returns
Name
Type
Description
parameter
Double
The inversion parameter on the curve
invertOnSurface
Invert a point to a surface
cad . invertOnSurface ( surface , point , - 1 )
Parameters
Name
Type
Default
Description
surface
Surface
The surface
point
Point3
The point to invert
precision
Double
-1
Inversion precision
Returns
Name
Type
Description
parameter
Point2
The inversion parameter on the surface
isCurveClosed
If the curve is closed, return true, return false otherwise
Parameters
Name
Type
Default
Description
curve
Curve
The curve
Returns
Name
Type
Description
closed
Boolean
The value
isCurvePeriodic
If the curve is periodic return true, return false otherwise
cad . isCurvePeriodic ( curve )
Parameters
Name
Type
Default
Description
curve
Curve
The curve
Returns
Name
Type
Description
periodic
Boolean
The value
period
Double
If th curve is periodic, this value is equal to the period value, equal to 0 otherwise
isSurfaceClosed
Return if the surface is closed on U or on V
cad . isSurfaceClosed ( surface )
Parameters
Name
Type
Default
Description
surface
Surface
The surface
Returns
Name
Type
Description
closedU
Boolean
The value on U
closedV
Boolean
The value on V
isSurfacePeriodic
Return if the surface is periodic on U or on V
cad . isSurfacePeriodic ( surface )
Parameters
Name
Type
Default
Description
surface
Surface
The surface
Returns
Name
Type
Description
periodicU
Boolean
The value on U
periodicV
Boolean
The value on V
periodU
Double
If th curve is periodic on U, this value is equal to the period value, equal to 0 otherwise
periodV
Double
If th curve is periodic on V, this value is equal to the period value, equal to 0 otherwise
projectOnCurve
Project a point to a curve
cad . projectOnCurve ( curve , point , - 1 )
Parameters
Name
Type
Default
Description
curve
Curve
The curve
point
Point3
The point to project
precision
Double
-1
Projection precision
Returns
Name
Type
Description
projectionParameter
Double
The projection parameter on the curve
projectOnSurface
Project a point to a surface
cad . projectOnSurface ( surface , point , - 1 )
Parameters
Name
Type
Default
Description
surface
Surface
The surface
point
Point3
The point to project
precision
Double
-1
Projection precision
Returns
Name
Type
Description
projectionParameter
Point2
The projection parameter on the surface
createBody
Create a body from a surface
cad . createBody ( outerShell , innerShells )
Parameters
Name
Type
Default
Description
outerShell
ClosedShell
ClosedShell used to create the body
innerShells
ClosedShellList
List of closedShell used to create the body
Returns
Name
Type
Description
body
Body
The created body
createClosedShell
Create a closedShell from a set of domains of a set of orientations
cad . createClosedShell ( domains , orientations )
Parameters
Name
Type
Default
Description
domains
DomainList
List of domains composing the closedShell
orientations
OrientationList
List of orientations for each domain
Returns
Name
Type
Description
closedShell
ClosedShell
The created closedShell
createCoEdge
Create an coEdge with a edge and an orientation
cad . createCoEdge ( edge , orientation , 0 , 0 )
Parameters
Name
Type
Default
Description
edge
Edge
Edge used to create the coEdge
orientation
Orientation
Orientation of the edge regarding the loop
surface
Surface
0
The surface trimmed by the edge
curve2D
Curve
0
Surfacic curve of the edge on the surface trimmed
Returns
Name
Type
Description
coEdge
CoEdge
The created edge
createEdge
Create an edge with a curve an extremity vertices
cad . createEdge ( curve , startVertex , endVertex )
Parameters
Name
Type
Default
Description
curve
Curve
Curve used to create the edge
startVertex
Vertex
The start vertex
endVertex
Vertex
The end vertex
Returns
Name
Type
Description
edge
Edge
The created edge
createEdgeFromCurve
Create an edge from a limited curve
cad . createEdgeFromCurve ( curve )
Parameters
Name
Type
Default
Description
curve
LimitedCurve
Limited curve used to create the edge
Returns
Name
Type
Description
edge
Edge
The created edge
createFace
Create a face from a surface
cad . createFace ( surface , loopList , False )
Parameters
Name
Type
Default
Description
surface
Surface
Surface used to create the face
loopList
LoopList
List of Loops used to create the face
useSurfaceOrientation
Boolean
false
If True, the face will have the same orientation than the surface and loops will be inverted if they are inconsistent
Returns
Name
Type
Description
face
Face
The created face
createLoop
Create a loop from a set of edges of a set of orientations
cad . createLoop ( coEdges , True )
Parameters
Name
Type
Default
Description
coEdges
CoEdgeList
List of coEdges composing the loop
check
Boolean
true
If true, the loop check if edges are well connected or not
Returns
Name
Type
Description
loop
Loop
The created loop
createOpenShell
Create a openShell from a set of domains of a set of orientations and set of loops
cad . createOpenShell ( domains , orientations , loopList )
Parameters
Name
Type
Default
Description
domains
DomainList
List of domains composing the openShell
orientations
OrientationList
List of orientations for each domain
loopList
LoopList
List of loops restricted the openShell
Returns
Name
Type
Description
openShell
OpenShell
The created openShell
createVertex
Create a vertex from a position
cad . createVertex ( position )
Parameters
Name
Type
Default
Description
position
Point3
Vertex position
Returns
Name
Type
Description
vertex
Vertex
The created vertex
createBezierSurface
Create a new bezier surface
cad . createBezierSurface ( degreeU , degreeV , poles )
Parameters
Name
Type
Default
Description
degreeU
Int
U degree
degreeV
Int
V degree
poles
Point3List
Poles list
Returns
Name
Type
Description
bezierSurface
Surface
The new Bezier surface
createConeSurface
Create a new cone surface
cad . createConeSurface ( radius , semiAngle , geom . IdentityMatrix4 )
Parameters
Name
Type
Default
Description
radius
Distance
Radius of the cone at origin
semiAngle
Angle
Semi-angle of the cone
matrix
Matrix4
geom.IdentityMatrix4
Positionning matrix of the cone
Returns
Name
Type
Description
coneSurface
Surface
The new cone surface
createCurveExtrusionSurface
Create a new curveExtrusion surface
cad . createCurveExtrusionSurface ( generatrixCurve , directrixCurve , refSurface , precision )
Parameters
Name
Type
Default
Description
generatrixCurve
LimitedCurve
The generatrix curve
directrixCurve
LimitedCurve
The directrix curve
refSurface
Surface
The reference surface
precision
Double
The precision for the evaluation of points
Returns
Name
Type
Description
curveExtrusionSurface
Surface
The new curveExtrusion surface
createCylinderSurface
Create a new cylinder surface
cad . createCylinderSurface ( radius , geom . IdentityMatrix4 )
Parameters
Name
Type
Default
Description
radius
Distance
Radius of the cylinder
matrix
Matrix4
geom.IdentityMatrix4
Positionning matrix of the cylinder
Returns
Name
Type
Description
cylinderSurface
Surface
The new cylinder surface
createEllipticConeSurface
Create a new elliptic cone surface
cad . createEllipticConeSurface ( radius1 , radius2 , semiAngle , geom . IdentityMatrix4 )
Parameters
Name
Type
Default
Description
radius1
Distance
Radius of the cone at origin on the X axis
radius2
Distance
Radius of the cone at origin on the Y axis
semiAngle
Angle
Semi-angle of the cone
matrix
Matrix4
geom.IdentityMatrix4
Positionning matrix of the cone
Returns
Name
Type
Description
ellipticConeSurface
Surface
The new elliptic cone surface
createNURBSSurface
Create a new NURBS surface
cad . createNURBSSurface ( degreeU , degreeV , knotsU , knotsV , poles , weights )
Parameters
Returns
Name
Type
Description
NURBSSurface
Surface
The new NURBS surface
createOffsetSurface
Create a new offset surface
cad . createOffsetSurface ( baseSurface , distance )
Parameters
Name
Type
Default
Description
baseSurface
Surface
The base surface
distance
Double
The offset distance
Returns
Name
Type
Description
offsetSurface
Surface
The new offset surface
createPlaneSurface
Create a new plane surface
cad . createPlaneSurface ( geom . IdentityMatrix4 )
Parameters
Name
Type
Default
Description
matrix
Matrix4
geom.IdentityMatrix4
Positionning matrix of the plane
Returns
Name
Type
Description
planeSurface
Surface
The new plane surface
createRevolutionSurface
Create a new revolution surface
cad . createRevolutionSurface ( generatrixCurve , axisOrigin , axisDirection , 0 , 360.0 )
Parameters
Name
Type
Default
Description
generatrixCurve
LimitedCurve
Generatrix curve rotated to create the revolution surface
axisOrigin
Point3
Axis origin point
axisDirection
Vector3
Axis direction vector
startAngle
Angle
0
Start angle of the revolution surface
endAngle
Angle
360.0
End angle of the revolution surface
Returns
Name
Type
Description
revolutionSurface
Surface
Revolution surface generated by rotating the given curve around the axis
createRuledSurface
Create a new ruled surface
cad . createRuledSurface ( firstCurve , secondCurve )
Parameters
Returns
Name
Type
Description
ruledSurface
Surface
The new ruled surface
createSphereSurface
Create a new sphere surface
cad . createSphereSurface ( radius , geom . IdentityMatrix4 )
Parameters
Name
Type
Default
Description
radius
Distance
Radius of the sphere
matrix
Matrix4
geom.IdentityMatrix4
Positionning matrix of the sphere
Returns
Name
Type
Description
sphereSurface
Surface
The new sphere surface
createTabulatedCylinderSurface
Create a new tabulated cylinder surface
cad . createTabulatedCylinderSurface ( directrixCurve , GeneratixLine , minRange , maxRange )
Parameters
Name
Type
Default
Description
directrixCurve
LimitedCurve
Directrix Curve
GeneratixLine
Point3
Generatrix Line
minRange
Distance
Minimimum value of the range
maxRange
Distance
Maximum value of the range
Returns
Name
Type
Description
tabulatedCylinderSurface
Surface
The new tabulated cylinder surface
createTorusSurface
Create a new torus surface
cad . createTorusSurface ( radiusMax , radiusMin , geom . IdentityMatrix4 )
Parameters
Name
Type
Default
Description
radiusMax
Distance
Major radius
radiusMin
Distance
Minor radius
matrix
Matrix4
geom.IdentityMatrix4
Positionning matrix of the sphere
Returns
Name
Type
Description
torusSurface
Surface
The new torus surface
ViewGUI getMainViewerPropertyWidget
Get main viewer property widget
viewgui . getMainViewerPropertyWidget ( "property" )
Parameters
Name
Type
Default
Description
property
String
Property name
Returns
Name
Type
Description
propertyWidget
QWidget
Get viewer widget
viewgui . getViewerWidget ()
Returns
Name
Type
Description
viewerWidget
QWidget
View AfterFramebufferCreate
Event emitted once the frame buffer is created
Parameters
Name
Type
Description
viewer
Viewer
BeforeFramebufferDelete
Event emitted before the frame buffer is deleted
Parameters
Name
Type
Description
viewer
Viewer
BeforeRefresh
Event emitted before frame refreshes on the main viewer
Parameters
Name
Type
Description
globalTimeMillisecond
ULong
Global time in millisecond
pauseAnimation
Pauses an animation
playAnimation
Plays an animation
view . playAnimation ( animation , 1 , - 1 )
Parameters
Name
Type
Default
Description
animation
Animation
Animation to play
speed
Double
1
Speed
times
Int
-1
Number of loops
stopAnimation
Stops an animation
getViewerDrawPrimitives
Get draw primitives configuration for the given viewer
view . getViewerDrawPrimitives ( - 1 )
Parameters
Name
Type
Default
Description
viewer
Viewer
-1
Returns
setViewerDrawPrimitives
Set draw primitives configuration for the given viewer
view . setViewerDrawPrimitives ( primitivies , - 1 )
Parameters
showBRepsParameters
Name
Type
Default
Description
show
Boolean
True to enable, False to disable
viewer
Viewer
-1
showEdgesParameters
Name
Type
Default
Description
show
Boolean
True to enable, False to disable
viewer
Viewer
-1
showHidden
Switch between show hidden and show visible mode
view . showHidden ( Enable , - 1 )
Parameters
Name
Type
Default
Description
enable
Boolean
True to enable, False to disable
viewer
Viewer
-1
showLinesParameters
Name
Type
Default
Description
show
Boolean
True to enable, False to disable
viewer
Viewer
-1
showPatchesBordersview . showPatchesBorders ( Show , - 1 )
Parameters
Name
Type
Default
Description
show
Boolean
True to enable, False to disable
viewer
Viewer
-1
showPointsview . showPoints ( Show , - 1 )
Parameters
Name
Type
Default
Description
show
Boolean
True to enable, False to disable
viewer
Viewer
-1
showPolygonsview . showPolygons ( Show , - 1 )
Parameters
Name
Type
Default
Description
show
Boolean
True to enable, False to disable
viewer
Viewer
-1
showSkeletonview . showSkeleton ( Show , - 1 )
Parameters
Name
Type
Default
Description
show
Boolean
True to enable, False to disable
viewer
Viewer
-1
pauseViewer
Pause the viewer
This function is deprecated
Parameters
Name
Type
Default
Description
viewer
Viewer
-1
Viewer to pause
resumeViewer
Resume the viewer
This function is deprecated
Parameters
Name
Type
Default
Description
viewer
Viewer
-1
Viewer to resume
getColorTextureHandleview . getColorTextureHandle ( - 1 , 0 )
Parameters
Returns
getDepthTextureHandle
Get depth texture handle
view . getDepthTextureHandle ( - 1 )
Parameters
Name
Type
Default
Description
viewer
Viewer
-1
Targeted viewer
Returns
getFXAATextureHandleview . getFXAATextureHandle ( - 1 )
Parameters
Name
Type
Default
Description
viewer
Viewer
-1
Returns
getFinalTextureHandleview . getFinalTextureHandle ( - 1 )
Parameters
Name
Type
Default
Description
viewer
Viewer
-1
Returns
getRenderTargetIndexview . getRenderTargetIndex ( rt , - 1 )
Parameters
Returns
addSharedD3D11Textureview . addSharedD3D11Texture ( interop , pxzTexture , dxTexture )
Parameters
createD3D11Interopview . createD3D11Interop ( viewer , device )
Parameters
Returns
deleteD3D11Interopview . deleteD3D11Interop ( interop )
Parameters
isD3D11InteropLockedview . isD3D11InteropLocked ( interop )
Parameters
Returns
Name
Type
Description
locked
Bool
lockD3D11Interopview . lockD3D11Interop ( interop )
Parameters
removeSharedD3D11Textureview . removeSharedD3D11Texture ( interop , pxzTexture )
Parameters
unlockD3D11Interopview . unlockD3D11Interop ( interop )
Parameters
addRoot
Add a viewer root
Parameters
Name
Type
Default
Description
root
Occurrence
Occurrence to add
viewer
Viewer
-1
Viewer to modify
createViewer
Create a new viewer
view . createViewer ( width , height , True , True , view . GLContextHandle ( nullptr , nullptr ))
Parameters
Name
Type
Default
Description
width
Int
Width of the viewer framebuffer
height
Int
Height of the viewer framebuffer
handleSelection
Bool
true
Does the viewer handle selection of occurrences
forward
Bool
true
Does the viewer use forward (true) or deferred (false) rendering
glContextHandle
GLContextHandle
view.GLContextHandle(nullptr, nullptr)
OpenGL context handle
Returns
Name
Type
Description
viewer
Viewer
destroyViewerview . destroyViewer ( viewer )
Parameters
Name
Type
Default
Description
viewer
Viewer
Viewer to destroy
drawCappingPlane
Create a mesh capping the cutting plane and display it
view . drawCappingPlane ( - 1 )
Parameters
Name
Type
Default
Description
viewer
Viewer
-1
Viewer to use
fit
Fit viewer camera to the given occurrences
view . fit ( occurrences , - 1 )
Parameters
Name
Type
Default
Description
occurrences
OccurrenceList
Parts to fit
viewer
Viewer
-1
Viewer to modify
getCuttingPlaneProperty
Get a cutting plane property value
view . getCuttingPlaneProperty ( "propertyName" , - 1 )
Parameters
Name
Type
Default
Description
propertyName
String
viewer
Viewer
-1
Returns
Name
Type
Description
propertyValue
String
getExplodeViewProperty
Get an explode view property value
view . getExplodeViewProperty ( "propertyName" , - 1 )
Parameters
Name
Type
Default
Description
propertyName
String
viewer
Viewer
-1
Returns
Name
Type
Description
propertyValue
String
getViewerGLContext
Get GL Context handle
view . getViewerGLContext ( viewer )
Parameters
Name
Type
Default
Description
viewer
Viewer
Width of the viewer framebuffer
Returns
getViewerMatricesview . getViewerMatrices ( - 1 )
Parameters
Name
Type
Default
Description
viewer
Viewer
-1
Returns
getViewerProperty
Get a viewer property value
view . getViewerProperty ( "propertyName" , - 1 )
Parameters
Name
Type
Default
Description
propertyName
String
viewer
Viewer
-1
Returns
Name
Type
Description
propertyValue
String
getViewerSize
Retrieve the viewport size of a viewer
Parameters
Name
Type
Default
Description
viewer
Viewer
-1
Returns
Name
Type
Description
width
Int
height
Int
listCuttingPlaneProperties
Get the list of cutting plane properties
view . listCuttingPlaneProperties ( - 1 )
Parameters
Name
Type
Default
Description
viewer
Viewer
-1
Returns
listExplodeViewProperties
Get the list of explode view properties
view . listExplodeViewProperties ( - 1 )
Parameters
Name
Type
Default
Description
viewer
Viewer
-1
Returns
listViewerProperties
Get the list of viewer properties
view . listViewerProperties ( - 1 )
Parameters
Name
Type
Default
Description
viewer
Viewer
-1
Returns
makeCurrentParameters
Name
Type
Default
Description
viewer
Viewer
-1
Targeted viewer
pickParameters
Returns
Name
Type
Description
occurrence
Occurrence
Picked occurrence, 0 if not occurrence picked
position
Point3
World space position of the picking point
refreshViewer
Refresh the viewer
view . refreshViewer ( - 1 , 1 , False )
Parameters
Name
Type
Default
Description
viewer
Viewer
-1
Viewer to refresh
frameCount
Int
1
Number of frames to render
forceUpdate
Boolean
false
Force the viewer to update pending modification on the geometry. By default this is disabled while running process
removeRoot
Remove a viewer root
view . removeRoot ( root , - 1 )
Parameters
Name
Type
Default
Description
root
Occurrence
Occurrence to remove
viewer
Viewer
-1
Viewer to modify
resizeViewerview . resizeViewer ( width , height , - 1 )
Parameters
Name
Type
Default
Description
width
Int
Width of the viewer framebuffer
height
Int
Height of the viewer framebuffer
viewer
Viewer
-1
setCuttingPlaneProperty
Set a cutting plane property value
view . setCuttingPlaneProperty ( "propertyName" , "propertyValue" , - 1 )
Parameters
setExplodeViewProperty
Set an explode view property value
view . setExplodeViewProperty ( "propertyName" , "propertyValue" , - 1 )
Parameters
setViewerMatricesview . setViewerMatrices ( views , projs