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
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
softStopAsyncEventManager
Ask the async EventManager to join the main thread, enableEventManagerAsync must be enable
core.softStopAsyncEventManager()
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 choosen 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 informations 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, usefull 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 usefull 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 assiocated 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 |
StringList |
Properties names of the module |
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 |
StringList |
Names of available properties |
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 |
|
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
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, matrix)
Parameters
| Name |
Type |
Default |
Description |
entity |
GeomEntity |
|
The geometric entity |
matrix |
Matrix4 |
|
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 |
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(matrix)
Parameters
| Name |
Type |
Default |
Description |
matrix |
Matrix4 |
|
The matrix to invert |
Returns
| Name |
Type |
Description |
inverted |
Matrix4 |
The inverted matrix |
multiplyMatrices
Multiply two matrices, returns left*right
geom.multiplyMatrices(left, right)
Parameters
| Name |
Type |
Default |
Description |
left |
Matrix4 |
|
Left side matrix |
right |
Matrix4 |
|
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(matrix, point)
Parameters
| Name |
Type |
Default |
Description |
matrix |
Matrix4 |
|
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(matrix, vector)
Parameters
| Name |
Type |
Default |
Description |
matrix |
Matrix4 |
|
The matrix to apply |
vector |
Vector3 |
|
The vector to multiply |
Returns
| Name |
Type |
Description |
result |
Vector3 |
The resulting point |
toTRS
Decompose a Matrix into translation, rotation and scaling vectors
Parameters
| Name |
Type |
Default |
Description |
matrix |
Matrix4 |
|
The Matrix to be decomposed |
Returns
IO
exportSceneToReflect
Export current scene to a reflect project
io.exportSceneToReflect(0, "", "", False, "")
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 |
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
Import a picture
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, oterwise 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, oterwise a new occurrence created by the importer |
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 |
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 |
|
createCompleteTree
Create a complete scene tree
scene.createCompleteTree(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) |
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 thes 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) |
createOBBMesh
scene.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)
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 |
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
createRayProber
Creates a ray prober
Returns
| Name |
Type |
Description |
id |
Ident |
|
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 shpere
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 |
createSphereProber
Creates a sphere prober
scene.createSphereProber()
Returns
| Name |
Type |
Description |
id |
Ident |
|
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 |
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 occurences 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 |
generateOctaViews
scene.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
getCompleteTree
Returns a packed version of the whole scene tree
scene.getCompleteTree(0, 1)
Parameters
| Name |
Type |
Default |
Description |
root |
Occurrence |
0 |
Specify the root of the returned scene |
visibilityMode |
VisibilityMode |
1 |
The visibility mode |
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 |
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 |
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 |
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)
Returns
| Name |
Type |
Description |
nbTexture |
Int |
The number of texture after the merge |
mergeMaterials
Merge all equivalent materials (i.e. with same appearance)
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) |
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 occurences 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 |
updateRayProber
Updates the designed ray prober
scene.updateRayProber(proberID, matrix)
Parameters
| Name |
Type |
Default |
Description |
proberID |
Ident |
|
The ray prober Id |
matrix |
Matrix4 |
|
The new ray prober matrix |
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 |
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 supposingly animated occurrence |
Returns
| Name |
Type |
Description |
isAnimated |
Bool |
The answer to this question |
bakeAnimation
Baking soda
scene.bakeAnimation(animation, occurrence, end, intervall)
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 |
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 |
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, intervall)
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 |
getBRepInfos
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 |
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 |
getTessellationInfos
scene.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 |
onRayProbe
Parameters
| Name |
Type |
Description |
proberID |
Ident |
The ray propber ID |
proberInfo |
ProberInfo |
The prober's info |
onSphereProbe
Parameters
| Name |
Type |
Description |
proberID |
Ident |
The sphere propber ID |
proberInfo |
ProberInfo |
The prober's info |
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 occurences 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 |
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 |
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
removeMaterials
Remove all materials appplied to the selection
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
Seperate 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 |
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 occurences 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 bouding 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()
rayCast
Parameters
| 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 |
rayCastAll
scene.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 |
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 transfert) |
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 |
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 usefull 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 instanciated instead to reduce the number of unique meshes (reduces drawcalls, GPU memory usage and file size). Using 1.0 (100%) in all similarity criterias 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 likelyhood 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 likelyhood 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 |
createTangents
Create tangent attributes on tessellations
algo.createTangents(occurrences, -1, 0, True)
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) |
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 recommanded to choose PreferSpeed tradeoff. In PreferSpeed mode, quadrics are computed only on position (and not on other vertex attributes) |
decimatePointClouds
Decimate Point Cloud Occurences 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 likelyhood 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 likelyhood 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. |
smoothMesh
algo.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 |
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 recommanded 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, overide 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 |
mapUvOnAABB
Generate texture coordinates using the projection on object Axis Aligned Bounding Box
algo.mapUvOnAABB(occurrences, False, 100, 0, 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, overide existing UVs on channel |
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, overide 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, overide 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, overide 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, overide 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, overide 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, overide 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, overide 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, overide 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, overide existing UVs on channel |
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 |
Int |
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) |
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 |
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 |
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 |
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 overlaping) 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 substract 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, matrix)
Parameters
| Name |
Type |
Default |
Description |
radius |
Distance |
|
Circle radius |
matrix |
Matrix4 |
|
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 |
createEllipseCurve
Create an ellipse curve
cad.createEllipseCurve(URadius, VRadius, matrix)
Parameters
| Name |
Type |
Default |
Description |
URadius |
Distance |
|
Ellipse radius in u direction |
VRadius |
Distance |
|
Ellipse radius in v direction |
matrix |
Matrix4 |
|
Transformation matrix |
Returns
| Name |
Type |
Description |
ellipseCurve |
Curve |
Ellipse curve |
createHelixCurve
Create an helix curve
cad.createHelixCurve(radius, pitch, matrix, True)
Parameters
| Name |
Type |
Default |
Description |
radius |
Distance |
|
Radius of the helix |
pitch |
Distance |
|
Height of one revolution |
matrix |
Matrix4 |
|
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, matrix)
Parameters
| Name |
Type |
Default |
Description |
URadius |
Double |
|
Hyperbola radius in u direction |
VRadius |
Double |
|
Hyperbola radius in v direction |
matrix |
Matrix4 |
|
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, matrix)
Parameters
| Name |
Type |
Default |
Description |
focalLength |
Double |
|
Focal lecngth of the parabola |
matrix |
Matrix4 |
|
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, matrix)
Parameters
| Name |
Type |
Default |
Description |
curve |
LimitedCurve |
|
Curve to transform |
matrix |
Matrix4 |
|
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 |
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
addNotification
Add a notification
view.addNotification("text", 3000)
Parameters
| Name |
Type |
Default |
Description |
text |
String |
|
Notification text |
time |
Ident |
3000 |
Time to stay |
addRootToMainViewer
Add a root to the main viewer
view.addRootToMainViewer(occurrence)
Parameters
| Name |
Type |
Default |
Description |
occurrence |
Occurrence |
|
Occurrence to add |
fit
Fit the main camera to the given parts
Parameters
setCameraPosition
Set the camera position
view.setCameraPosition(newPosition)
Parameters
| Name |
Type |
Default |
Description |
newPosition |
Point3 |
|
New camera position |
toOrigin
Place the camera to origin
AfterFramebufferCreate
Event emited once the frame buffer is created
BeforeFramebufferDelete
Event emited before the frame buffer is deleted
BeforeRefresh
Event emited before frame refreshes
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
createOccurrenceOnCameraTarget
Create an occurrence on the target position of the camera (mid-click)
view.createOccurrenceOnCameraTarget("name", parent)
Parameters
| Name |
Type |
Default |
Description |
name |
String |
|
Name of the new occurrence |
parent |
Occurrence |
|
If defined, the new occurrence will be added as a child of the parent. Else the new parent will be the root of the current variant |
Returns
| Name |
Type |
Description |
occurrence |
Occurrence |
The created occurrence |
disableOverrideMaterial
view.disableOverrideMaterial()
enableOverrideMaterial
view.enableOverrideMaterial(material)
Parameters
| Name |
Type |
Default |
Description |
material |
Material |
|
The material to enable as override material |
PickResult
Emits when a pick was performed and there is a result to share
Parameters
ViewSessionResized
Emits when a view session is done resizing
Parameters
addViewSessionRoot
view.addViewSessionRoot(session, root)
Parameters
isViewSessionExist
view.isViewSessionExist(session)
Parameters
Returns
| Name |
Type |
Description |
result |
Bool |
|
pickOccurrences
view.pickOccurrences(session, x, y)
Parameters
removeViewSessionRoot
view.removeViewSessionRoot(session, root)
Parameters
resizeViewSession
Call this function when the texture has to be resized. the resize will take effect during the next render
view.resizeViewSession(session, width, height, textures)
Parameters
setViewSessionViewerProperty
view.setViewSessionViewerProperty(session, "name", "value")
Parameters
ViewSessionInitialized
Emits when a session is initialized (via getInitfunction)
Parameters
getViewSessionDrawPrimitives
Returns ViewSession viewer's draw properties
view.getViewSessionDrawPrimitives(session)
Parameters
Returns
setViewSessionDrawPrimitives
Set ViewSession viewer's draw properties
view.setViewSessionDrawPrimitives(session, primitives)
Parameters
updateExplodeView
Update explode settings for the viewer associated to the ViewSession
view.updateExplodeView(session, Enabled, factor, X, Y, Z)
Parameters
updateViewSessionCuttingPlane
Update cut plane for the viewer associated to the ViewSession
view.updateViewSessionCuttingPlane(session, Enabled, matrix)
Parameters
showBReps
Parameters
| Name |
Type |
Default |
Description |
show |
Boolean |
|
True to enable, False to disable |
viewer |
Viewer |
-1 |
|
showEdges
Parameters
| 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 |
|
showLines
Parameters
| Name |
Type |
Default |
Description |
show |
Boolean |
|
True to enable, False to disable |
viewer |
Viewer |
-1 |
|
showPatchesBorders
view.showPatchesBorders(Show, -1)
Parameters
| Name |
Type |
Default |
Description |
show |
Boolean |
|
True to enable, False to disable |
viewer |
Viewer |
-1 |
|
showPoints
view.showPoints(Show, -1)
Parameters
| Name |
Type |
Default |
Description |
show |
Boolean |
|
True to enable, False to disable |
viewer |
Viewer |
-1 |
|
showPolygons
view.showPolygons(Show, -1)
Parameters
| Name |
Type |
Default |
Description |
show |
Boolean |
|
True to enable, False to disable |
viewer |
Viewer |
-1 |
|
showSkeleton
view.showSkeleton(Show, -1)
Parameters
| Name |
Type |
Default |
Description |
show |
Boolean |
|
True to enable, False to disable |
viewer |
Viewer |
-1 |
|
addSharedD3D11Texture
view.addSharedD3D11Texture(interop, pxzTexture, dxTexture)
Parameters
createD3D11Interop
view.createD3D11Interop(viewer, device)
Parameters
Returns
deleteD3D11Interop
view.deleteD3D11Interop(interop)
Parameters
isD3D11InteropLocked
view.isD3D11InteropLocked(interop)
Parameters
Returns
| Name |
Type |
Description |
locked |
Bool |
|
lockD3D11Interop
view.lockD3D11Interop(interop)
Parameters
removeSharedD3D11Texture
view.removeSharedD3D11Texture(interop, pxzTexture)
Parameters
unlockD3D11Interop
view.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)
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 |
Returns
| Name |
Type |
Description |
viewer |
Viewer |
|
destroyViewer
view.destroyViewer(viewer)
Parameters
| Name |
Type |
Default |
Description |
viewer |
Viewer |
|
Viewer to destroy |
fitView
Fit scene to viewer
Parameters
| Name |
Type |
Default |
Description |
viewer |
Viewer |
-1 |
Viewer to modify |
getColorTextureHandle
view.getColorTextureHandle(-1, 0)
Parameters
| Name |
Type |
Default |
Description |
viewer |
Viewer |
-1 |
|
index |
Int |
0 |
|
Returns
getCuttingPlaneProperty
Get a viewer property value
view.getCuttingPlaneProperty("propertyName", -1)
Parameters
| Name |
Type |
Default |
Description |
propertyName |
String |
|
|
viewer |
Viewer |
-1 |
|
Returns
| Name |
Type |
Description |
propertyValue |
String |
|
getDepthTextureHandle
Get depth texture handle
view.getDepthTextureHandle(-1)
Parameters
| Name |
Type |
Default |
Description |
viewer |
Viewer |
-1 |
Targeted viewer |
Returns
getExplodeViewProperty
Get a viewer property value
view.getExplodeViewProperty("propertyName", -1)
Parameters
| Name |
Type |
Default |
Description |
propertyName |
String |
|
|
viewer |
Viewer |
-1 |
|
Returns
| Name |
Type |
Description |
propertyValue |
String |
|
getFXAATextureHandle
view.getFXAATextureHandle(-1)
Parameters
| Name |
Type |
Default |
Description |
viewer |
Viewer |
-1 |
|
Returns
getFinalTextureHandle
view.getFinalTextureHandle(-1)
Parameters
| Name |
Type |
Default |
Description |
viewer |
Viewer |
-1 |
|
Returns
getViewerDrawPrimitives
view.getViewerDrawPrimitives(-1)
Parameters
| Name |
Type |
Default |
Description |
viewer |
Viewer |
-1 |
|
Returns
getViewerMatrices
view.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 |
|
listViewerProperties
Get the list of viewer properties
view.listViewerProperties(-1)
Parameters
| Name |
Type |
Default |
Description |
viewer |
Viewer |
-1 |
|
Returns
makeCurrent
Parameters
| Name |
Type |
Default |
Description |
viewer |
Viewer |
-1 |
Targeted viewer |
pick
Parameters
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 |
resizeViewer
view.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 viewer property value
view.setCuttingPlaneProperty("propertyName", "propertyValue", -1)
Parameters
setExplodeViewProperty
Set a viewer property value
view.setExplodeViewProperty("propertyName", "propertyValue", -1)
Parameters
setViewerDrawPrimitives
view.setViewerDrawPrimitives(primitivies, -1)
Parameters
setViewerMatrices
view.setViewerMatrices(views, projs, clipping, -1)
Parameters
setViewerProperty
Set a viewer property value
view.setViewerProperty("propertyName", "propertyValue", -1)
Parameters
takeScreenshot
Take a screenshot
view.takeScreenshot(filename, -1)
Parameters
| Name |
Type |
Default |
Description |
filename |
FilePath |
|
File path to save at |
viewer |
Viewer |
-1 |
Targeted viewer |
getCurrentCamera
Returns the information of the current camera (used in the main viewer)
Returns
| Name |
Type |
Description |
camera |
Camera |
Current camera |
getMainViewerCuttingPlaneProperty
Get a viewer property value
view.getMainViewerCuttingPlaneProperty("propertyName")
Parameters
| Name |
Type |
Default |
Description |
propertyName |
String |
|
Property name |
Returns
| Name |
Type |
Description |
propertyValue |
String |
|
getMainViewerExplodeViewProperty
Get a viewer property value
view.getMainViewerExplodeViewProperty("propertyName")
Parameters
| Name |
Type |
Default |
Description |
propertyName |
String |
|
Property name |
Returns
| Name |
Type |
Description |
propertyValue |
String |
|
getMainViewerProperty
Get a viewer property value
view.getMainViewerProperty("propertyName")
Parameters
| Name |
Type |
Default |
Description |
propertyName |
String |
|
Property name |
Returns
| Name |
Type |
Description |
propertyValue |
String |
|
getProjectionMatrix
Returns the main viewer current view matrix
view.getProjectionMatrix()
Returns
| Name |
Type |
Description |
projection |
Matrix4 |
Projection matrix of the current camera in the main viewer |
getViewMatrix
Returns the main viewer current view matrix
Returns
| Name |
Type |
Description |
view |
Matrix4 |
View matrix of the current camera in the main viewer |
listMainViewerCuttingPlaneProperties
Get the list of viewer properties
view.listMainViewerCuttingPlaneProperties()
Returns
listMainViewerExplodeViewProperty
Get the list of viewer properties
view.listMainViewerExplodeViewProperty()
Returns
listMainViewerProperties
Get the list of viewer properties
view.listMainViewerProperties()
Returns
pauseViewer
Pause the viewer
resumeViewer
Pause the viewer
setMainViewerCuttingPlaneProperty
Set a viewer property value
view.setMainViewerCuttingPlaneProperty("propertyName", "propertyValue")
Parameters
| Name |
Type |
Default |
Description |
propertyName |
String |
|
Property name |
propertyValue |
String |
|
Property value |
setMainViewerExplodeViewProperty
Set a viewer property value
view.setMainViewerExplodeViewProperty("propertyName", "propertyValue")
Parameters
| Name |
Type |
Default |
Description |
propertyName |
String |
|
Property name |
propertyValue |
String |
|
Property value |
setMainViewerProperty
Set a viewer property value
view.setMainViewerProperty("propertyName", "propertyValue")
Parameters
| Name |
Type |
Default |
Description |
propertyName |
String |
|
Property name |
propertyValue |
String |
|
Property value |
Returns
| Name |
Type |
Description |
propertyValue |
String |
|
beginVisibilitySession
Start a new visibility session
view.beginVisibilitySession(width, height)
Parameters
| Name |
Type |
Default |
Description |
width |
Int |
|
Width of the renderer used for the visibility session |
height |
Int |
|
Width of the renderer used for the visibility session |
Returns
| Name |
Type |
Description |
visibilitySession |
Ident |
Identifier of the visibility session |
drawCappingPlane
Create a mesh capping the cutting plane and display it
endVisibilitySession
Terminate a visibility session
view.endVisibilitySession(visibilitySession)
Parameters
| Name |
Type |
Default |
Description |
visibilitySession |
Ident |
|
Identifier of the visibility session |
setVisibilitySessionCamera
Place the camera of a given visibility session
view.setVisibilitySessionCamera(visibilitySession, position, view, up, 90)
Parameters
| Name |
Type |
Default |
Description |
visibilitySession |
Ident |
|
Identifier of the visibility session |
position |
Point3 |
|
Position of the camera |
view |
Vector3 |
|
View direction of the camera |
up |
Vector3 |
|
Up direction of the camera |
fovx |
Angle |
90 |
Horizontal field of view (in degree) |
visibilityShoot
Render one frame of the visibility session
view.visibilityShoot(visibilitySession, True, True, True, False)
Parameters
| Name |
Type |
Default |
Description |
visibilitySession |
Ident |
|
Identifier of the visibility session |
parts |
Bool |
true |
If false, optimize when parts seen are not wanted |
patches |
Bool |
true |
If false, optimize when patches seen are not wanted |
polygons |
Bool |
true |
If false, optimize when polygons seen are not wanted |
countOnce |
Bool |
false |
Optimize when it is not needed to count the numbers of pixels seen during the session |
Returns
| Name |
Type |
Description |
sceneOccurrences |
OccurrenceList |
The list of scene paths seen from this shoot |
Material
Add a shader uniform parameter to the given custom pattern
material.addUniformProperty(pattern, "name", type)
Parameters
clearAllMaterials
Remove and delete all the materials
material.clearAllMaterials()
convertAllMaterialsToColors
Converts all the material in the scene to color materials
material.convertAllMaterialsToColors()
convertHeightMapToNormalMap
Convert a height map to a normal map
material.convertHeightMapToNormalMap(hmap, 0.5)
Parameters
| Name |
Type |
Default |
Description |
hmap |
Image |
|
Height map reference |
height |
Double |
0.5 |
Maximum height |
Returns
| Name |
Type |
Description |
nmap |
Image |
Normal map |
createCustomMaterialPattern
Create a new custom material pattern
material.createCustomMaterialPattern("name")
Parameters
| Name |
Type |
Default |
Description |
name |
String |
|
Name of the pattern |
Returns
createImageFromDefinition
Import an image from its raw data
material.createImageFromDefinition(imageDefinition)
Parameters
| Name |
Type |
Default |
Description |
imageDefinition |
ImageDefinition |
|
The image definition |
Returns
| Name |
Type |
Description |
image |
Image |
The created image |
createImagesFromDefinitions
Import images from their raw data
material.createImagesFromDefinitions(imageDefinitions)
Parameters
Returns
| Name |
Type |
Description |
images |
ImageList |
The created images |
createMaterial
Create a new material from pattern
material.createMaterial("name", "pattern")
Parameters
| Name |
Type |
Default |
Description |
name |
String |
|
Name of the material |
pattern |
String |
|
Name of the pattern |
Returns
| Name |
Type |
Description |
material |
Material |
The created material |
createMaterialFromDefinition
Create PBR material from a material definition
material.createMaterialFromDefinition(materialDefinition)
Parameters
| Name |
Type |
Default |
Description |
materialDefinition |
MaterialDefinition |
|
The structure containing all the PBR material informations |
Returns
| Name |
Type |
Description |
material |
Material |
The created material |
createMaterialsFromDefinitions
Create PBR materials from material definitions
material.createMaterialsFromDefinitions(materialDefinitions)
Parameters
| Name |
Type |
Default |
Description |
materialDefinitions |
MaterialDefinitionList |
|
Material definitions containing properties for each given material |
Returns
| Name |
Type |
Description |
materials |
MaterialList |
The created materials |
createMaterialsFromMaps
Automatically creates PBR materials when importing PBR texture maps from a folder
material.createMaterialsFromMaps(directory)
Parameters
| Name |
Type |
Default |
Description |
directory |
DirectoryPath |
|
Directory path |
exportImage
Export an image
material.exportImage(image, filename)
Parameters
| Name |
Type |
Default |
Description |
image |
Image |
|
Identifier of the image to export |
filename |
OutputFilePath |
|
Filename of the file to export |
findCustomMaterialPatternByName
Returns the material pattern which has the given name
material.findCustomMaterialPatternByName("name")
Parameters
| Name |
Type |
Default |
Description |
name |
String |
|
The name of the material pattern |
Returns
findMaterialsByPattern
Returns all materials using the given pattern
material.findMaterialsByPattern("pattern")
Parameters
| Name |
Type |
Default |
Description |
pattern |
String |
|
A material pattern |
Returns
| Name |
Type |
Description |
materials |
MaterialList |
Materials using the pattern |
findMaterialsByProperty
Returns all materials which match a given property value
material.findMaterialsByProperty("propertyName", propertyValue)
Parameters
| Name |
Type |
Default |
Description |
propertyName |
String |
|
Name of the property to match |
propertyValue |
Regex |
|
Regular expression to match for the property value |
Returns
| Name |
Type |
Description |
materials |
MaterialList |
Materials matching the property value |
getAllImages
Returns all the images loaded in the current session
Returns
| Name |
Type |
Description |
images |
ImageList |
A list containing all images identifiers |
getAllMaterialPatterns
Returns all the material patterns in the current session
material.getAllMaterialPatterns()
Returns
| Name |
Type |
Description |
shaders |
StringList |
A list containing all material patterns |
getAllMaterials
Retrieve the list of all the materials in the material library
material.getAllMaterials()
Returns
| Name |
Type |
Description |
materials |
MaterialList |
List of materials in the material library |
getColorMaterialInfos
Get color material properties
material.getColorMaterialInfos(material)
Parameters
| Name |
Type |
Default |
Description |
material |
Material |
|
The material to get properties |
Returns
getCustomMaterialPattern
Returns the custom material pattern associated to the custom material
material.getCustomMaterialPattern(material)
Parameters
| Name |
Type |
Default |
Description |
material |
Material |
|
Custom material to get the pattern from |
Returns
getImageDefinition
Returns the raw data of an image
material.getImageDefinition(image)
Parameters
| Name |
Type |
Default |
Description |
image |
Image |
|
Image's definition |
Returns
| Name |
Type |
Description |
imageDefinition |
ImageDefinition |
Definition of the image |
getImageDefinitions
Returns the raw data of a set of images
material.getImageDefinitions(images)
Parameters
| Name |
Type |
Default |
Description |
images |
ImageList |
|
The images |
Returns
getImageSize
Returns the size of an image
material.getImageSize(image)
Parameters
| Name |
Type |
Default |
Description |
image |
Image |
|
The image to get the size from |
Returns
| Name |
Type |
Description |
width |
Int |
The width of the image in pixels |
height |
Int |
The height of the image in pixels |
getImpostorMaterialInfos
Get impostor texture material properties
material.getImpostorMaterialInfos(material)
Parameters
| Name |
Type |
Default |
Description |
material |
Material |
|
The material to get properties |
Returns
getMaterialDefinition
Returns the properties of a PBR Material
material.getMaterialDefinition(material)
Parameters
| Name |
Type |
Default |
Description |
material |
Material |
|
The PBR Material |
Returns
getMaterialDefinitions
Returns the properties of a set of PBR Materials
material.getMaterialDefinitions(materials)
Parameters
| Name |
Type |
Default |
Description |
materials |
MaterialList |
|
The PBR Materials |
Returns
getMaterialPatternType
Returns the MaterialPatternType name of the material
material.getMaterialPatternType(material)
Parameters
| Name |
Type |
Default |
Description |
material |
Material |
|
The material to find the pattern |
Returns
getPBRMaterialInfos
Get PBR material properties
material.getPBRMaterialInfos(material)
Parameters
| Name |
Type |
Default |
Description |
material |
Material |
|
The material to get properties |
Returns
getStandardMaterialInfos
Get standard material properties
material.getStandardMaterialInfos(material)
Parameters
| Name |
Type |
Default |
Description |
material |
Material |
|
The material to get properties |
Returns
Get a shader uniform shader property type
material.getUniformPropertyType(pattern, "name")
Parameters
Returns
getUnlitTextureMaterialInfos
Get unlit texture material properties
material.getUnlitTextureMaterialInfos(material)
Parameters
| Name |
Type |
Default |
Description |
material |
Material |
|
The material to get properties |
Returns
importImage
Import an image
material.importImage(filename)
Parameters
| Name |
Type |
Default |
Description |
filename |
FilePath |
|
Filename of the image to import |
Returns
| Name |
Type |
Description |
image |
Image |
Identifier of the imported image |
makeMaterialNamesUnique
Rename materials to have a unique name for each one
material.makeMaterialNamesUnique()
resizeImage
Resize an image
material.resizeImage(image, width, height)
Parameters
| Name |
Type |
Default |
Description |
image |
Image |
|
Image to be resize |
width |
Int |
|
New image width |
height |
Int |
|
New image height |
setFragmentShader
Set the fragment shader of a custom pattern
material.setFragmentShader(pattern, "code")
Parameters
| Name |
Type |
Default |
Description |
pattern |
CustomMaterialPattern |
|
The custom pattern to edit |
code |
String |
|
The GLSL code of the fragment shader |
setMaterialMainColor
Set the main color on any material pattern type
material.setMaterialMainColor(material, color)
Parameters
| Name |
Type |
Default |
Description |
material |
Material |
|
The material to apply the color on |
color |
ColorAlpha |
|
The color to apply |
setMaterialPattern
Sets the MaterialPattern name of the material
material.setMaterialPattern(material, "pattern")
Parameters
| Name |
Type |
Default |
Description |
material |
Material |
|
The material to find the pattern |
pattern |
String |
|
The pattern of the material |
setPBRMaterialInfos
Set PBR material properties
material.setPBRMaterialInfos(material, infos)
Parameters
| Name |
Type |
Default |
Description |
material |
Material |
|
The material to set properties |
infos |
PBRMaterialInfos |
|
The PBRMaterialInfos properties |
setVertexShader
Set the vertex shader of a custom pattern
material.setVertexShader(pattern, "code")
Parameters
updateImageFromDefinition
Update an image from its raw data
material.updateImageFromDefinition(image, imageDefinition)
Parameters
| Name |
Type |
Default |
Description |
image |
Image |
|
The image to update |
imageDefinition |
ImageDefinition |
|
The new data to apply |
updateImagesFromDefinitions
Update images from their raw data
material.updateImagesFromDefinitions(image, imageDefinitions)
Parameters
Polygonal
computeMeshTopoChecksum
Compute a checksum of the mesh topology, connectivity
polygonal.computeMeshTopoChecksum(mesh)
Parameters
| Name |
Type |
Default |
Description |
mesh |
Mesh |
|
The mesh |
Returns
| Name |
Type |
Description |
checksum |
String |
The mesh |
computeMeshVertexPositionsChecksum
Compute a checksum of the mesh vertices positions
polygonal.computeMeshVertexPositionsChecksum(mesh, -1)
Parameters
| Name |
Type |
Default |
Description |
mesh |
Mesh |
|
The mesh |
precisionFloat |
Int |
-1 |
Floating point precision [1..24], number of significant numbers kept. -1 means no rounded will be applied |
Returns
| Name |
Type |
Description |
checksum |
String |
The mesh |
computeUVTopoChecksum
Compute a checksum of the uvs topology, connectivity
polygonal.computeUVTopoChecksum(mesh, uvChannel)
Parameters
| Name |
Type |
Default |
Description |
mesh |
Mesh |
|
The mesh |
uvChannel |
Int |
|
The uv channel |
Returns
| Name |
Type |
Description |
checksum |
String |
The mesh |
computeUVVertexPositionsChecksum
Compute a checksum of the vertices positions in uv space
polygonal.computeUVVertexPositionsChecksum(mesh, uvChannel, -1)
Parameters
| Name |
Type |
Default |
Description |
mesh |
Mesh |
|
The mesh |
uvChannel |
Int |
|
The uv channel |
precisionFloat |
Int |
-1 |
Floating point precision [1..24], number of significant numbers kept. -1 means no rounded will be applied |
Returns
| Name |
Type |
Description |
checksum |
String |
The mesh |
dracoDecode
Decode a mesh using draco
polygonal.dracoDecode(buffer, -1, -1)
Parameters
| Name |
Type |
Default |
Description |
buffer |
ByteList |
|
|
jointIndicesId |
Int |
-1 |
Unique ID of Generic attribute encoding joint indices |
jointWeightsId |
Int |
-1 |
Unique ID of Generic attribute encoding joint weights |
Returns
dracoEncode
Encode a mesh using draco
polygonal.dracoEncode(mesh, 7, -1, -1, -1)
Parameters
| Name |
Type |
Default |
Description |
mesh |
StaticMesh |
|
|
compressionLevel |
Int |
7 |
0=faster but the worst compression, 10=slower but the best compression |
quantizationPosition |
Int |
-1 |
Number of quantization bits used for position attributes |
quantizationNormal |
Int |
-1 |
Number of quantization bits used for normal attributes |
quantizationTexCoord |
Int |
-1 |
Number of quantization bits used for texture coordinates attributes |
Returns
| Name |
Type |
Description |
buffer |
ByteList |
|
jointIndicesId |
Int |
Unique ID of Generic attribute encoding joint indices (-1 if not applicable or if enocdeSkeleton is false) |
jointWeightsId |
Int |
Unique ID of Generic attribute encoding joint weights (-1 if not applicable or if enocdeSkeleton is false) |
getNormal
Return the normal attribute of a polygon at a specified vertex
polygonal.getNormal(Polygon, Vertex)
Parameters
| Name |
Type |
Default |
Description |
Polygon |
Polygon |
|
The polygon |
Vertex |
Vertex |
|
The vertex |
Returns
| Name |
Type |
Description |
normal |
Vector3 |
The normal |
getTextureCoordinates
Return the texture coordinates attribute of all the polygons from the tessellation
polygonal.getTextureCoordinates(tessellation)
Parameters
| Name |
Type |
Default |
Description |
tessellation |
Tessellation |
|
The tessellation of the wanted polygons |
Returns
| Name |
Type |
Description |
textureCoordinates |
UVCoordList |
The textures coordinates |
getVisiblePolygons
Return the visible polygons from the Visibility attributes (see algo.createVisibilityAttributes)
polygonal.getVisiblePolygons(tessellation)
Parameters
| Name |
Type |
Default |
Description |
tessellation |
Tessellation |
|
The tessellation of the wanted polygons |
Returns
| Name |
Type |
Description |
polygons |
PolygonList |
The polygons seen at least once |
pixelCounts |
IntList |
The number of pixels seen during the whole visibility session |
createJointPlaceholders
Create fake joint to store in mesh definitions. Thus we can retrieve stored data from getJointPlaceholders
polygonal.createJointPlaceholders(data, worldMatrices)
Parameters
| Name |
Type |
Default |
Description |
data |
ULongList |
|
Create as much joints as there are data, each joint store one data |
worldMatrices |
Matrix4List |
|
World matrix for each joints |
Returns
createMeshFromDefinition
Create a new mesh with the given MeshDefinition
polygonal.createMeshFromDefinition(meshDefinition)
Parameters
| Name |
Type |
Default |
Description |
meshDefinition |
MeshDefinition |
|
Mesh definition |
Returns
| Name |
Type |
Description |
mesh |
Mesh |
The new mesh |
createMeshesFromDefinitions
Create new meshes with the given MeshDefinitions
polygonal.createMeshesFromDefinitions(meshDefinitions)
Parameters
Returns
| Name |
Type |
Description |
meshes |
MeshList |
The new Meshes |
getEdgePolygons
Returns the polygons connected to an edge
polygonal.getEdgePolygons(edge)
Parameters
| Name |
Type |
Default |
Description |
edge |
Edge |
|
The edge |
Returns
| Name |
Type |
Description |
polygons |
PolygonList |
The edge polygons |
getEdgeVertices
Returns the vertices of an edge
polygonal.getEdgeVertices(edge)
Parameters
| Name |
Type |
Default |
Description |
edge |
Edge |
|
The edge |
Returns
| Name |
Type |
Description |
vertices |
VertexList |
The edge vertices |
getEdges
Returns the edges corresponding to the given connectivity
polygonal.getEdges(tessellation, category)
Parameters
Returns
| Name |
Type |
Description |
edges |
EdgeList |
The edges |
getFreeEdges
Returns the free edges of a tessellation
polygonal.getFreeEdges(tessellation)
Parameters
| Name |
Type |
Default |
Description |
tessellation |
Tessellation |
|
The tessellation |
Returns
| Name |
Type |
Description |
freeEdges |
EdgeList |
All free edges of the tessellation |
getFreeVertices
Returns the free vertices of a tessellation
polygonal.getFreeVertices(tessellation)
Parameters
| Name |
Type |
Default |
Description |
tessellation |
Tessellation |
|
The tessellation |
Returns
| Name |
Type |
Description |
freeVertices |
VertexList |
All free vertices of the tessellation |
getJointPlaceholders
Get data stored in joint placeholders
polygonal.getJointPlaceholders(joints)
Parameters
Returns
| Name |
Type |
Description |
data |
ULongList |
Data stored in each placehold joint (for invalid joint, returned data is undefined) |
getMeshDefinition
Returns the definition
polygonal.getMeshDefinition(mesh)
Parameters
| Name |
Type |
Default |
Description |
mesh |
Mesh |
|
The mesh to get definition |
Returns
getMeshDefinitions
Returns the definition
polygonal.getMeshDefinitions(meshes)
Parameters
| Name |
Type |
Default |
Description |
meshes |
MeshList |
|
The meshes to get definitions |
Returns
getMeshSkinning
Returns the joints/IBMs list of a given mesh (those referenced by jointIndices)
polygonal.getMeshSkinning(mesh)
Parameters
Returns
getPatches
Returns the patches of a tessellation
polygonal.getPatches(tessellation)
Parameters
| Name |
Type |
Default |
Description |
tessellation |
Tessellation |
|
The tessellation |
Returns
| Name |
Type |
Description |
patches |
PatchList |
All patches of the tessellation |
getPolygonEdges
Returns the edges of a a polygon
polygonal.getPolygonEdges(polygon)
Parameters
| Name |
Type |
Default |
Description |
polygon |
Polygon |
|
The polygon |
Returns
| Name |
Type |
Description |
edges |
EdgeList |
The polygon edges |
getPolygonVertices
Returns the vertices of a a polygon
polygonal.getPolygonVertices(polygon)
Parameters
| Name |
Type |
Default |
Description |
polygon |
Polygon |
|
The polygon |
Returns
| Name |
Type |
Description |
vertices |
VertexList |
The polygon vertices |
getPolygons
Returns the polygons of a tessellation
polygonal.getPolygons(tessellation)
Parameters
| Name |
Type |
Default |
Description |
tessellation |
Tessellation |
|
The tessellation |
Returns
| Name |
Type |
Description |
polygons |
PolygonList |
All polygons of the tessellation |
getTessellationBoundaries
Get boundary edges of a tessellation grouped by cycles
polygonal.getTessellationBoundaries(tessellation)
Parameters
| Name |
Type |
Default |
Description |
tessellation |
Tessellation |
|
The Tessellation |
Returns
| Name |
Type |
Description |
boundaries |
EdgeListList |
List of boundary edges grouped by cycles in the given tessellation |
getVertexCoordinates
Returns the vertex coordinates in the tessellation local space
polygonal.getVertexCoordinates(vertex)
Parameters
| Name |
Type |
Default |
Description |
vertex |
Vertex |
|
The vertex |
Returns
| Name |
Type |
Description |
coordinates |
Point3 |
Vertex coordinates |
getVertexEdges
Returns the edges connected to a vertex
polygonal.getVertexEdges(vertex)
Parameters
| Name |
Type |
Default |
Description |
vertex |
Vertex |
|
The vertex |
Returns
| Name |
Type |
Description |
edges |
EdgeList |
The vertex edges |
getVertexPolygons
Returns the polygons connected to a vertex
polygonal.getVertexPolygons(vertex)
Parameters
| Name |
Type |
Default |
Description |
vertex |
Vertex |
|
The vertex |
Returns
| Name |
Type |
Description |
polygons |
PolygonList |
The vertex polygons |
getVertices
Returns the vertices of a tessellation
polygonal.getVertices(tessellation, category)
Parameters
Returns
| Name |
Type |
Description |
vertices |
VertexList |
All vertices of the tessellation |
setMeshSkinning
Set/Replace the list of joints/IBMs of a given mesh (those referenced by jointIndices)
polygonal.setMeshSkinning(mesh, joints, IBMs)
Parameters
destroyElements
Destroy all the given elements
polygonal.destroyElements(elements)
Parameters
| Name |
Type |
Default |
Description |
elements |
ElementList |
|
List of elements to destroy |
invertElements
Invert the orientation of all the given elements
polygonal.invertElements(elements)
Parameters
| Name |
Type |
Default |
Description |
elements |
ElementList |
|
List of elements to invert |
Cloud
downloadDirectoryFromS3
cloud.downloadDirectoryFromS3("bucketName", "region", "directoryPath", directory)
Parameters
| Name |
Type |
Default |
Description |
bucketName |
String |
|
S3 bucket to download from |
region |
String |
|
AWS region |
directoryPath |
String |
|
Remote path to directory |
directory |
DirectoryPath |
|
Local directory to dowmload in |
downloadFileFromS3
cloud.downloadFileFromS3("bucketName", "region", "filePath", directory)
Parameters
| Name |
Type |
Default |
Description |
bucketName |
String |
|
S3 bucket to download from |
region |
String |
|
AWS region |
filePath |
String |
|
Remote path to file |
directory |
DirectoryPath |
|
Local directory to dowmload in |
listFilesFromS3
cloud.listFilesFromS3("bucketName", "region", "prefix")
Parameters
| Name |
Type |
Default |
Description |
bucketName |
String |
|
S3 bucket to list |
region |
String |
|
AWS region |
prefix |
String |
|
Prefix for filtering |
Returns
| Name |
Type |
Description |
fileList |
StringList |
List of files |
uploadDirectoryToS3
cloud.uploadDirectoryToS3("bucketName", "region", directoryPath, /)
Parameters
| Name |
Type |
Default |
Description |
bucketName |
String |
|
S3 bucket to upload in |
region |
String |
|
AWS region |
directoryPath |
DirectoryPath |
|
Local directory |
directory |
String |
/ |
Remote path to upload in |
uploadFileToS3
cloud.uploadFileToS3("bucketName", "region", filePath, /)
Parameters
| Name |
Type |
Default |
Description |
bucketName |
String |
|
S3 bucket to upload in |
region |
String |
|
AWS region |
filePath |
FilePath |
|
Local file |
directory |
String |
/ |
Remote path to upload in |
Process
decimateTargetBake
Automatically decimates a selection of meshes, using as a target a triangle count or a ratio (reduction percentage), and bakes Normals information into a texture (plus other textures).
process.decimateTargetBake(occurrences, decimationTargetType, bakingOptions, True)
Parameters
generateLODChain
Automatically generates 3 LODs for the current selection.
process.generateLODChain(occurrences, [process.DecimateParameters(1., 0.1, 5.), process.DecimateParameters(2., 1., 10.)])
Parameters
| Name |
Type |
Default |
Description |
occurrences |
OccurrenceList |
|
Scene paths of components to process |
decimateParametersList |
DecimateParametersList |
[process.DecimateParameters(1., 0.1, 5.), process.DecimateParameters(2., 1., 10.)] |
The list of all LOD decimate parameters |
generatePhantomMesh
Automatically generates one unique optimized mesh out of the models in the scene, with material(s).
process.generatePhantomMesh(occurrences, ["yes", process.BakeDiffuseOptions(1024, 1)])
Parameters
| Name |
Type |
Default |
Description |
occurrences |
OccurrenceList |
|
Occurrences to process |
generateDiffuseMap |
GenerateDiffuseMap |
["yes", process.BakeDiffuseOptions(1024, 1)] |
|
guidedImport
The Guided import automatically converts and readies your 3D model(s) with guided parameters.
process.guidedImport([''], coordinateSystem, tessellation, otherOptions, False, False, False, False, False, False)
Parameters
| Name |
Type |
Default |
Description |
fileNames |
ImportFilePathList |
[''] |
List of files to import |
coordinateSystem |
CoordinateSystemOptions |
|
"Position and Scale" parameters are meant to properly position, orient and scale the imported model, to match Pixyz Studio's own coordinate sytem (right-handed, Y is the Up-axis) and units (mm).
|
tessellation |
TessellationSettings |
|
Tessellation is the process of converting CAD models into meshes, usable by any 3D app (check out "About Tessellation" in the documentation for more information). With 'Use Preset', Pixyz Studio automatically sets tessellation values to reach a predefined mesh quality. With 'Use custom values', tessellation values can be set by the user. Note that the Tessellation process is ignored when importing files containing only meshes (polygonal or 3D printing models for example), or Point clouds: this Tessellation process does not affect or change them. |
otherOptions |
ImportOptions |
|
Use the following parameters to fine-tune the import process |
importLines |
Boolean |
false |
Use to import the lines (which can be CAD curves or polylines) included in the imported model, that are important to import and preserve. |
importPoints |
Boolean |
false |
Use to import the points (which can be CAD point or free points, used as references for example) included in the imported model, that are important to import and preserve. No need to enable this parameter when importing Point clouds. |
importHidden |
Boolean |
false |
Use to import the parts that are originally hidden in the imported model. They are imported but not made visible though. |
importPMI |
Boolean |
false |
Use to import the PMI attached to the imported model (applicable for CAD models only) |
importVariants |
Boolean |
false |
Use to import the variants attached to the imported model (applicable for CAD models only) |
useAlternativeImporter |
Boolean |
false |
Some 3D/CAD formats handled by Pixyz Studio can be imported through 2 different importing technologies (or libraries). When one file/model is not properly imported, or not imported at all, using this parameter allows to test importing through an alternative importer and having a better luck (providing the format offers an alternative importer). |
Returns
| Name |
Type |
Description |
dest |
OccurrenceList |
The root occurrences of each imported file |
proxyFromMeshes
Automatically generates a Proxy Mesh out of a selection of meshes, with optional automatic textures generation.
process.proxyFromMeshes(occurrences, 50, generateTextures, True, True)
Parameters
| Name |
Type |
Default |
Description |
occurrences |
OccurrenceList |
|
Occurrences to process |
gridResolution |
Int |
50 |
Resolution of the voxel grid used to generated the proxy |
generateTextures |
BakeOptionSelector |
|
Option maps baking |
transferAnimations |
Bool |
True |
If false, skinned animations will be lost |
keepOriginalMesh |
Bool |
True |
If true, does not delete original mesh at the end of the process |
Returns
| Name |
Type |
Description |
proxyMesh |
Occurrence |
The generated proxy mesh |
proxyFromPointCloud
Automatically generates a Proxy Mesh out of a selection of Point Cloud, with optional automatic diffuse texture generation.
process.proxyFromPointCloud(occurrences, 50, generateDiffuseTexture, True)
Parameters
| Name |
Type |
Default |
Description |
occurrences |
OccurrenceList |
|
Occurrences to process |
gridResolution |
Int |
50 |
Resolution of the voxel grid used to generated the proxy |
generateDiffuseTexture |
GenerateDiffuseMap |
|
Baking options |
keepOriginalPointCloud |
Bool |
True |
If true, does not delete original point cloud at the end of the process |
Returns
| Name |
Type |
Description |
proxyMesh |
Occurrence |
The generated proxy mesh |
runGenericProcess
Automatically creates optimized meshes out of any 3D model (mesh or CAD).
process.runGenericProcess(False, False)
Parameters
| Name |
Type |
Default |
Description |
overrideExistingUVs |
Boolean |
false |
If True, UVs for channel 0 will be recreated (algo GenerateUVonAABB , size=100) |
repackUVs |
Boolean |
false |
If True, UVs for Channel 1 will be automatically repacked. Do not use if the original UV layout is fine (meshes already properly UVed). |
Constants
| Name |
Type |
Description |
Epsilon |
Double |
1e-6 |
EpsilonSquare |
Double |
1e-12 |
HalfPi |
Double |
1.5707963267948966192313215 |
IdentityMatrix4 |
Matrix4 |
[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]] |
Infinity |
Double |
1e12 |
OneDegree |
Double |
0.017453292519943295769236907684886 |
Pi |
Double |
3.141592653589793238462643 |
TwoPi |
Double |
6.283185307179586476925286 |
Types
Algo types
| Name |
Type |
Description |
AttributType |
Enumeration |
- Patches = 4020
- PatchMaterials = 4021
- PatchBoundaries = 4022
- UVs = 4035
- Normals = 4036
- Tangents = 4037
- Binormals = 4038
|
BakeMap |
Structure |
Structured type
[ MapType type, PropertyValueList properties ] |
BakeMapList |
List of BakeMap |
|
BakeMaps |
Structure |
Structured type
[ Boolean diffuse, Boolean normal, Boolean roughness, Boolean metallic, Boolean opacity, Boolean ambientOcclusion, Boolean emissive ] |
BakeOption |
Structure |
Structured type
[ BakingMethod bakingMethod, Int resolution, Int padding, BakeMaps textures ] |
BakingMethod |
Enumeration |
- RayOnly = 0
- ProjOnly = 1
- RayAndProj = 2
|
Box |
Structure |
Structured type
[ Affine position, Double length, Double height, Double depth ] |
BoxParameters |
Structure |
Structured type
[ Double SizeX, Double SizeY, Double SizeZ, Int Subdivision ] |
ComputingQuality |
Enumeration |
- High = 0
- Medium = 1
- Low = 2
|
ConeParameters |
Structure |
Structured type
[ Double BottomRadius, Double Height, Int Sides ] |
ConvexityConstraint |
Enumeration |
- REMOVE_CONVEX_ONLY = 0
- REMOVE_CONCAVE_ONLY = 1
- REMOVE_BOTH = 2
|
CostEvaluation |
Enumeration |
- SumEvaluation = 0
- MaxEvaluation = 1
- AverageEvaluation = 2
|
CreateOccluder |
Enumeration |
|
CustomBakeMap |
Structure |
Structured type
[ String name, Int component ] |
CustomBakeMapList |
List of CustomBakeMap |
|
Cylinder |
Structure |
Structured type
[ Affine position, Double radius, Double length ] |
CylinderParameters |
Structure |
Structured type
[ Double Radius, Double Height, Int Sides ] |
DecimateOptionsSelector |
|
Select one of possible choices: type
|
ElementFilter |
Enumeration |
- Polygons = 0
- Points = 1
- Hybrid = 2
|
Feature |
Structure |
Structured type
[ FeatureType type, FeatureInputList inputs ] |
FeatureInput |
Structure |
Structured type
[ Point3 position, Vector3 direction, Distance diameter ] |
FeatureInputList |
List of FeatureInput |
|
FeatureList |
List of Feature |
|
FeatureType |
Enumeration |
- Unknown = 0
- ThroughHole = 1
- BlindHole = 2
|
FlatteningStopCondition |
Enumeration |
- MEAN_DEFORMATION = 0
- ABSOLUTE_DEFORMATION = 1
|
HexahedronParameters |
Structure |
Structured type
[ Double XLength, Double YLength, Double ZLength ] |
MapType |
Enumeration |
- Diffuse = 0
- Normal = 1
- Opacity = 2
- Roughness = 3
- Specular = 4
- Metallic = 5
- AO = 6
- Emissive = 7
- PartId = 8
- MaterialId = 9
- ComputeAO = 10
- Bent = 11
- UV = 12
- Displacement = 13
- LocalPosition = 14
- GlobalPosition = 15
- Depth = 16
|
MapTypeList |
List of MapType |
|
OccurrenceFeatures |
Structure |
Structured type
[ Occurrence occurrence, FeatureList features ] |
OccurrenceFeaturesList |
List of OccurrenceFeatures |
|
OctahedralImpostor |
Structure |
Structured type
[ Matrix4 OctaTransform, Double Radius, Image NormalMap, Image DepthMap, Image DiffuseMap, Image MetallicMap, Image AOMap, Image RoughnessMap ] |
OrientStrategy |
Enumeration |
- ExteriorOnly = 0
- VisibilityOrExterior = 1
- VisibilityByConnected = 2
- VisibilityByPolygon = 3
- ConformToMajority = 4
|
Plane |
Structure |
Structured type
[ Affine position, Double length, Double height ] |
PlaneParameters |
Structure |
Structured type
[ Double SizeX, Double SizeY, Int SubdivisionX, Int SubdivisionY ] |
PrimitiveShapeParameters |
|
Select one of possible choices: type
|
QualityMemoryTradeoff |
Enumeration |
- PreferQuality = 0
- PreferMemory = 1
|
QualitySpeedTradeoff |
Enumeration |
- PreferQuality = 0
- PreferSpeed = 1
|
RelaxUVMethod |
Enumeration |
|
ReplaceByBoxType |
Enumeration |
- Minimum = 0
- LocallyAligned = 1
|
ReplaceByMode |
Enumeration |
|
ReplaceByOccurrenceOptions |
Structure |
Structured type
[ Occurrence Occurrence, Boolean Aligned ] |
ReplaceByOption |
|
Select one of possible choices: type
|
ReplaceByPrimitiveOptions |
Structure |
Structured type
[ PrimitiveShapeParameters Type, Boolean Aligned, Boolean GenerateUV ] |
SawingMode |
Enumeration |
- SawOnly = 0
- SawAndSplit = 1
- KeepInside = 2
- KeepOutside = 3
|
SelectionLevel |
Enumeration |
- Parts = 0
- Patches = 1
- Polygons = 2
|
SmartHiddenType |
Enumeration |
- All = 0
- OnlyOuter = 1
- OnlyInners = 2
|
SmartOrientStrategy |
Enumeration |
- VisibilityByConnected = 0
- VisibilityByPolygon = 1
|
Sphere |
Structure |
Structured type
[ Affine position, Double radius ] |
SphereParameters |
Structure |
Structured type
[ Double Radius, Int Latitude, Int Longitude ] |
UVGenerationMode |
Enumeration |
- NoUV = 0
- IntrinsicUV = 1
- ConformalScaledUV = 2
|
UVImportanceEnum |
Enumeration |
- PreserveSeamsAndReduceDeformation = 0
- PreserveSeams = 1
- IgnoreUV = 2
|
UseColorOption |
|
Select one of possible choices: type
|
getPixelValue |
|
|
getPixelValueList |
List of getPixelValue |
|
CAD types
| Name |
Type |
Description |
Body |
CAD_BODY Alias of Shape |
A Body is the topological entity which defines a volume. It is bounded by a set of shells |
BodyList |
List of Body |
|
BoundedCurve |
CAD_CURVE_BOUNDED Alias of LimitedCurve |
Curve limited by a bound |
Bounds1D |
Structure |
1-Dimension bounds
[ Double min, Double max ] |
Bounds2D |
Structure |
2-Dimensions bounds
[ Bounds1D u, Bounds1D v ] |
CADEntity |
CAD_ENTITY Alias of GeomEntity |
CADEntity is the base type for the CAD module entities |
CircleCurve |
CAD_CURVE_CIRCLE Alias of Curve |
Circle curve |
ClosedShell |
CAD_CLOSED_SHELL Alias of CADEntity |
A Face is the topological entity relative to a set of surface, which is closed |
ClosedShellList |
List of ClosedShell |
|
CoEdge |
CAD_COEDGE Alias of CADEntity |
A connected edge is an edge part of a loop. |
CoEdgeList |
List of CoEdge |
|
CompositeCurve |
CAD_CURVE_COMPOSITE Alias of LimitedCurve |
Curve compose of multiple curves |
ConeSurface |
CAD_SURFACE_CONE Alias of LimitedSurface |
Cone surface |
Curve |
CAD_CURVE Alias of CADEntity |
A Curve is a CAD entity defining the geometrical representation of a CAD spline |
CurveExtrusionSurface |
CAD_SURFACE_CURVE_EXTRUSION Alias of LimitedSurface |
Extrusion of a curve by a curve |
CurveList |
List of Curve |
|
CylinderSurface |
CAD_SURFACE_CYLINDER Alias of LimitedSurface |
Cylinder surface |
Domain |
CAD_DOMAIN Alias of Shape |
A Domain is a topological entity which defines a face or a shell |
DomainList |
List of Domain |
|
Edge |
CAD_EDGE Alias of Shape |
An Edge is the topological entity relative to a Curve |
EdgeList |
List of Edge |
|
EdgeListList |
List of EdgeList |
|
EllipseCurve |
CAD_CURVE_ELLIPSE Alias of Curve |
Ellipse curve |
EllipticConeSurface |
CAD_SURFACE_ELLIPTIC_CONE Alias of LimitedSurface |
Elliptical cone surface |
Face |
CAD_FACE Alias of Domain |
A Face is the topological entity relative to a surface and bounded by loops |
FaceList |
List of Face |
|
HelixCurve |
CAD_CURVE_HELIX Alias of Curve |
Helix curve |
HermiteCurve |
CAD_CURVE_HERMITE Alias of LimitedCurve |
Hermite curve |
HyperbolaCurve |
CAD_CURVE_HYPERBOLA Alias of Curve |
Hyperbola curve |
IntersectionCurve |
CAD_CURVE_INTERSECTION Alias of LimitedCurve |
The result of the intersection between txo surfaces |
LimitedCurve |
CAD_CURVE_LIMITED Alias of Curve |
A LimitedCurve is a special curve which define a curve with bounds, so it has limits in its parameter space. |
LimitedCurveList |
List of LimitedCurve |
|
LimitedSurface |
CAD_SURFACE_LIMITED Alias of Surface |
A Surface is a special surface with bounds, so it has limits in its parameter space. |
LineCurve |
CAD_CURVE_LINE Alias of Curve |
Line curve |
Loop |
CAD_LOOP Alias of CADEntity |
A Loop is a cyclic list of edges. It is used to define boundaries of faces |
LoopList |
List of Loop |
|
Model |
CAD_MODEL Alias of CADEntity |
A Model is a CAD entity which contains a set of bodies and surfacic domains |
ModelList |
List of Model |
|
NURBSCurve |
CAD_CURVE_LINE Alias of LimitedCurve |
Nurbs curve |
NURBSSurface |
CAD_SURFACE_NURBS Alias of LimitedSurface |
Nurbs surface |
OffsetCurve |
CAD_CURVE_OFFSET Alias of LimitedCurve |
Offset curve |
OffsetSurface |
CAD_SURFACE_OFFSET Alias of LimitedSurface |
Offset surface |
OpenShell |
CAD_OPEN_SHELL Alias of Domain |
A OpenShell is the topological entity relative to a set of surface, which is open. It can be restricted by a set of loops |
OpenShellList |
List of OpenShell |
|
OrientedDomain |
Structure |
Domain with an orientation
[ Domain domain, Orientation orientation ] |
OrientedDomainList |
List of OrientedDomain |
|
OrientedEdge |
Structure |
Edge with an orientation
[ Edge edge, Orientation orientation ] |
OrientedEdgeList |
List of OrientedEdge |
|
ParabolaCurve |
CAD_CURVE_PARABOLA Alias of Curve |
Parabola curve |
PlaneSurface |
CAD_SURFACE_PLANE Alias of Surface |
Plane surface |
PolylineCurve |
CAD_CURVE_POLYLINE Alias of LimitedCurve |
Line curve |
RevolutionSurface |
CAD_SURFACE_REVOLUTION Alias of LimitedSurface |
Revolution of curve around an axis |
RuledSurface |
CAD_SURFACE_RULED Alias of LimitedSurface |
Ruled surface between two curves |
SegmentCurve |
CAD_CURVE_SEGMENT Alias of LimitedCurve |
Segment curve |
Shape |
CAD_SHAPE Alias of CADEntity |
A Shape is the base type for CAD topology entities |
SphereSurface |
CAD_SURFACE_SPHERE Alias of LimitedSurface |
Sphere surface |
SplittedEdge |
Structure |
Structured type
[ Edge oldEdge, EdgeList newEdges ] |
SplittedEdgeList |
List of SplittedEdge |
|
Surface |
CAD_SURFACE Alias of CADEntity |
A Surface is a CAD entity defining the geometrical representation of a CAD surface |
SurfacicCurve |
CAD_CURVE_SURFACIC Alias of LimitedCurve |
Surfacic curve |
TabulatedCylinderSurface |
CAD_SURFACE_TABULATED_CYLINDER Alias of LimitedSurface |
Extrusion of a curve by a segment |
TorusSurface |
CAD_SURFACE_TORUS Alias of LimitedSurface |
Torus surface |
TransformedCurve |
CAD_CURVE_TRANSFORMED Alias of LimitedCurve |
Transoformed curve |
Vertex |
CAD_VERTEX Alias of Shape |
A Vertex is the topological entity used to define a point in space |
VertexList |
List of Vertex |
|
Core types
| Name |
Type |
Description |
AliasTypeDesc |
Structure |
Structured type
[ String name, String module, String description, String alias ] |
ArrayTypeDesc |
Structure |
Structured type
[ String name, String module, String description, String arrayType ] |
AutoValueReturn |
Structure |
Auto value function return
[ StringPairList values, String message ] |
BaseTypeDesc |
Structure |
Structured type
[ String name, String module, String description ] |
Bool |
|
Base type |
BoolList |
List of Bool |
|
Boolean |
Alias of Bool |
|
Byte |
|
Base type |
ByteList |
List of Byte |
|
Coeff |
Alias of Double |
|
Color |
Structure |
A Color defines a color RGB
[ Double r, Double g, Double b ] |
ColorAlpha |
Structure |
A Color defines a color RGBA
[ Double r, Double g, Double b, Double a ] |
ColorAlphaList |
List of ColorAlpha |
|
ColorList |
List of Color |
|
Date |
Structure |
Structured type
[ Int year, Int month, Int day ] |
DirectoryPath |
Alias of String |
|
Double |
|
Base type |
DoubleList |
List of Double |
|
DoubleListList |
List of DoubleList |
|
Entity |
ENTITY Alias of Ident |
An entity is the Pixyz base object. All objects manipulated in Pixyz are derived from Entity |
EntityList |
List of Entity |
|
EntityListList |
List of EntityList |
|
EnumTypeDesc |
Structure |
Structured type
[ String name, String module, String description, IntList values, StringList labels, String valueType ] |
EventDesc |
Structure |
Structured type
[ String module, String name, String description, ParameterDescList parameters ] |
Field |
Structure |
Structured type
[ String name, String type, String defaultValue, String description, StringPairList predefinedValues ] |
FieldList |
List of Field |
|
FilePath |
Alias of String |
|
FilePathList |
List of FilePath |
|
FunctionDesc |
Structure |
Structured type
[ String name, String module, ParameterDescList parameters, ParameterDescList returns ] |
FunctionDescList |
List of FunctionDesc |
|
GroupDesc |
Structure |
Structured type
[ String name, String description, FunctionDescList functions ] |
GroupDescList |
List of GroupDesc |
|
Ident |
|
Base type |
IdentPair |
Structure |
Structured type
[ Ident key, Ident value ] |
IdentPairList |
List of IdentPair |
|
InheritableBool |
Enumeration |
- False = 0
- True = 1
- Inherited = 2
|
InheritableBoolList |
List of InheritableBool |
|
Int |
|
Base type |
IntList |
List of Int |
|
IntListList |
List of IntList |
|
LicenseInfos |
Structure |
Structured type
[ String version, String customerName, String customerCompany, String customerEmail, Date startDate, Date endDate ] |
ListTypeDesc |
Structure |
Structured type
[ String name, String module, String description, String listType ] |
Long |
|
Base type |
ModuleDesc |
Structure |
Structured type
[ String name, String description, String author, GroupDescList groups ] |
ModuleDescList |
List of ModuleDesc |
|
None |
|
Base type |
OutputDirectoryPath |
Alias of DirectoryPath |
|
OutputFilePath |
Alias of FilePath |
|
ParameterDesc |
Structure |
Structured type
[ String name, TypeDesc type, String description, Bool optional, String defaultValue ] |
ParameterDescList |
List of ParameterDesc |
|
Password |
Alias of String |
|
Percent |
Alias of Double |
|
PreferredRangeCoef |
Alias of Coeff |
|
Ptr |
|
Base type |
Real |
Alias of Double |
|
Regex |
Alias of String |
Regular expression using the ECMAScript syntax |
SelectTypeDesc |
Structure |
Structured type
[ String name, String module, String description, TypeDescType type ] |
Short |
|
Base type |
String |
|
Base type |
StringList |
List of String |
|
StringPair |
Structure |
Structured type
[ String key, String value ] |
StringPairList |
List of StringPair |
|
StringPairListList |
List of StringPairList |
|
StructTypeDesc |
Structure |
Structured type
[ String name, String module, String description, TypeDescType type, FieldList fields ] |
TypeDesc |
|
Select one of possible choices: type
|
TypeDescType |
Enumeration |
- UNKNOWN = 0
- BASE = 1
- ALIAS = 2
- ENUM = 3
- LIST = 4
- ARRAY = 5
- STRUCT = 6
- SELECT = 7
|
UInt |
|
Base type |
ULong |
|
Base type |
ULongList |
List of ULong |
|
UShort |
|
Base type |
Verbose |
Enumeration |
The verbose level defines the amount of information shown in outputs
- ERR = 0
- WARNING = 1
- INFO = 2
- SCRIPT = 5
|
WebLicenseInfo |
Structure |
Structured type
[ Ident id, String product, Date validity, Int count, Int inUse, Bool onMachine, Bool current ] |
WebLicenseInfoList |
List of WebLicenseInfo |
|
CoreGUI types
| Name |
Type |
Description |
QAction |
|
Base type |
QDialog |
|
Base type |
QWidget |
|
Base type |
Geom types
| Name |
Type |
Description |
AABB |
Structure |
AABB stands for Axis Aligned Bounding Box. It is a bounding volume which is aligned with the axes of the coordinates system
[ Point3 low, Point3 high ] |
Affine |
Structure |
Affine transformation
[ Point3 origin, Vector3 xAxis, Vector3 yAxis, Vector3 zAxis ] |
Angle |
Alias of Double |
Angle defines an angle in degree (in scripts). In the GUI, the unit can be modified |
Area |
Alias of Double |
Area defines a surface in quadric meters (in scripts). In the GUI, the unit can be modified |
Array3 |
Array of 3 Double |
|
Array4 |
Array of 4 Double |
|
Axis |
Enumeration |
|
AxisPlane |
Enumeration |
|
CameraCalibration |
Structure |
Calibration of a pinhole camera (intrisic+distortion parameters)
[ Double radial1, Double radial2, Double radial3, Double tangential1, Double tangential2, Double focalX, Double focalY, Double centerX, Double centerY, Double skew ] |
Curvatures |
Structure |
Structured type
[ Double k1, Double k2, Vector3 v1, Vector3 v2 ] |
CurvaturesList |
List of Curvatures |
|
Distance |
Alias of Double |
Distance defines a distance in millimeters (in scripts). In the GUI, the unit can be modified |
ExtendedBox |
Structure |
A box defined by a location and extension sizes
[ Point3 position, Distance extentX, Distance extentY, Distance extentZ ] |
GeomEntity |
GEOM_ENTITY Alias of Entity |
|
MBB |
Alias of OBB |
MBB stands for Minimum Bounding Box |
Matrix3 |
Array of 3 Array3 |
A Matrix3 is a 3x3 Matrix, an homogeneous matrix representing a transformation (translation, rotation, scale) in a 2D coordinates system |
Matrix4 |
Array of 4 Array4 |
A Matrix4 is a 4x4 Matrix, an homogeneous matrix representing a transformation (translation, rotation, scale) in a 3D coordinates system |
Matrix4List |
List of Matrix4 |
|
OBB |
Structure |
OBB stands for Oriented Bounding Box
[ Point3 corner, Vector3 xAxis, Vector3 yAxis, Vector3 zAxis ] |
Orientation |
Alias of Boolean |
An orientation can be normal (True) or inverted (False) |
OrientationList |
List of Orientation |
|
Point2 |
Structure |
A Point2 defines a position in 2D space
[ Double x, Double y ] |
Point2List |
List of Point2 |
|
Point2ListList |
List of Point2List |
|
Point3 |
Structure |
A Point3 defines a position in 3D space
[ Double x, Double y, Double z ] |
Point3List |
List of Point3 |
|
Point3ListList |
List of Point3List |
|
Point4 |
Structure |
A Point4 defines a position in 3D space
[ Double x, Double y, Double z, Double w ] |
Point4List |
List of Point4 |
|
Ray |
Structure |
Structured type
[ Point3 origin, Vector3 direction ] |
Vector2 |
Alias of Point2 |
|
Vector3 |
Alias of Point3 |
A Vector3 defines a vector in 3D space |
Vector3List |
List of Vector3 |
|
Vector4 |
Alias of Point4 |
|
Vector4I |
Structure |
A Vector4 has 4 int components
[ Int x, Int y, Int z, Int w ] |
Vector4IList |
List of Vector4I |
|
Vector4List |
List of Vector4 |
|
Volume |
Alias of Double |
Volume defines a volume in cubic meters (in scripts). In the GUI, the unit can be modified |
IO types
| Name |
Type |
Description |
CloudDirectory |
|
Select one of possible choices: type
|
CloudFile |
|
Select one of possible choices: type
|
DropBoxAccess |
Structure |
DropBox connection informations
[ String path, String token ] |
ExportFilePath |
Alias of OutputFilePath |
File path of a supported file for export |
ExportFilePathList |
List of ExportFilePath |
|
FilesList |
List of FilePath |
|
Format |
Structure |
Structured type
[ String name, StringList extensions ] |
FormatList |
List of Format |
|
ImportFilePath |
Alias of FilePath |
File path of a supported file for import |
ImportFilePathList |
List of ImportFilePath |
|
LocalDirectoryAccess |
Structure |
Local file
[ DirectoryPath path ] |
LocalFileAccess |
Structure |
Local file
[ FilePath path ] |
OpenStackAccess |
Structure |
OpenStack connection informations
[ String path, String authUrl, String region, String user, Password password, String domainId, String projectId, String container, String objectStore ] |
OwnCloudAccess |
Structure |
OwnCloud connection informations
[ String path, String authUrl, String user, Password password ] |
Protocol |
Enumeration |
Web access protocol
|
WebDAVAccess |
Structure |
WebDAV connection informations
[ String path, String host, UShort port, Protocol protocol, String user, Password password, String url ] |
Material types
| Name |
Type |
Description |
CoeffOrTexture |
|
Select one of possible choices: type
|
ColorMaterialInfos |
Structure |
Structured type
[ String name, ColorAlpha color ] |
ColorOrTexture |
|
Select one of possible choices: type
|
CustomMaterialPattern |
MATERIAL_CUSTOM_MATERIAL_PATTERN Alias of Entity |
A Custom MaterialPattern is an entity which defines an abstract custom Shader. It is used by the Materials |
Image |
MATERIAL_IMAGEREF Alias of Entity |
An Image is an entity which represents an image in the Image library |
ImageDefinition |
Structure |
Structured type
[ Image id, String name, Int width, Int height, Int bitsPerComponent, Int componentsCount, ByteList data ] |
ImageDefinitionList |
List of ImageDefinition |
|
ImageList |
List of Image |
|
ImpostorMaterialInfos |
Structure |
Structured type
[ String name, ColorOrTexture albedo, ColorOrTexture normal, CoeffOrTexture roughness, CoeffOrTexture ao, CoeffOrTexture depth, Int nbFrames, Boolean fullOcta, Double octaDiameter, Int linearSteps, Int binarySteps ] |
Material |
MATERIAL_MATERIAL Alias of Entity |
The Material is an Entity that contains visual definition that can be applied to the Components of the scene |
MaterialDefinition |
Structure |
Structured type
[ String name, Material id, ColorOrTexture albedo, ColorOrTexture normal, CoeffOrTexture metallic, CoeffOrTexture roughness, CoeffOrTexture ao, CoeffOrTexture opacity, ColorOrTexture emissive ] |
MaterialDefinitionList |
List of MaterialDefinition |
|
MaterialList |
List of Material |
|
MaterialPatternType |
Enumeration |
- CUSTOM = 0
- COLOR = 1
- STANDARD = 2
- UNLIT_TEXTURE = 3
- PBR = 4
- IMPOSTOR = 5
|
PBRMaterialInfos |
Structure |
Structured type
[ String name, ColorOrTexture albedo, ColorOrTexture normal, CoeffOrTexture metallic, CoeffOrTexture roughness, CoeffOrTexture ao, CoeffOrTexture opacity ] |
ShaderUniformType |
Enumeration |
The possible types of shader uniform parameters
- INTEGER = 2
- BOOLEAN = 9
- REAL = 11
- COEFF = 13
- POINT3 = 23
- POINT2 = 22
- COLOR = 15
- COLOR_ALPHA = 16
- TEXTURE = 34
- COLORORTEXTURE = 35
- COEFFORTEXTURE = 36
|
StandardMaterialInfos |
Structure |
Structured type
[ String name, ColorOrTexture diffuse, ColorOrTexture specular, ColorOrTexture ambient, ColorOrTexture emissive, Coeff shininess, Coeff transparency ] |
Texture |
Structure |
Structured type
[ Image image, Int channel, Point2 offset, Point2 tilling ] |
UnlitTextureMaterialInfos |
Structure |
Structured type
[ String name, Texture texture ] |
Polygonal types
| Name |
Type |
Description |
DressedPoly |
Structure |
Polygon with material
[ Material material, Int firstTri, Int triCount, Int firstQuad, Int quadCount, Ident externalId ] |
DressedPolyList |
List of DressedPoly |
|
Edge |
POLYGONAL_EDGE Alias of Element |
An Edge is composed by two vertices and is connected to the polygons of a tessellation. It is the dimension-1 element |
EdgeList |
List of Edge |
|
EdgeListList |
List of EdgeList |
|
Element |
POLYGONAL_ELEMENT Alias of GeomEntity |
Element is the base type for polygons, edges and vertices |
ElementList |
List of Element |
|
Joint |
POLYGONAL_IJOINT Alias of Entity |
A Joint is a bone of a skeleton |
JointList |
List of Joint |
|
Mesh |
POLYGONAL_MESH Alias of GeomEntity |
A mesh is the base class for a polygonal mesh. It is structured with polygons, edges and vertices |
MeshDefinition |
Structure |
Mesh definition
[ Mesh id, Ident externalId, Point3List vertices, Vector3List normals, Vector4List tangents, IntList uvChannels, Point2ListList uvs, ColorAlphaList vertexColors, CurvaturesList curvatures, IntList triangles, IntList quadrangles, IntList vertexMerged, DressedPolyList dressedPolys, Point3List linesVertices, StylizedLineList lines, Point3List points, Vector3List pointsColors, JointList joints, Matrix4List inverseBindMatrices, Vector4List jointWeights, Vector4IList jointIndices ] |
MeshDefinitionList |
List of MeshDefinition |
|
MeshList |
List of Mesh |
|
Patch |
POLYGONAL_ATTRIBUTE_PATCH Alias of TessellationAttribute |
A Patch is a tessellation attribute used to segment the tessellation by grouping a set of polygons |
PatchList |
List of Patch |
|
PlaceholderJoint |
POLYGONAL_PLACEHOLDERJOINT Alias of Joint |
A placeholder joint is a fake joint that contains user defined data for SDK integration purpose |
PlaceholderJointList |
List of PlaceholderJoint |
|
Polygon |
POLYGONAL_POLYGON Alias of Element |
A Polygon is composed by 3 or more edges. It is the dimension-2 element |
PolygonList |
List of Polygon |
|
PolygonListList |
List of PolygonList |
|
StaticMesh |
POLYGONAL_STATIC_MESH Alias of Mesh |
A static mesh is a mesh representation used for storage |
StyleType |
Enumeration |
|
StylizedLine |
Structure |
Structured type
[ IntList lines, Double width, StyleType type, Int pattern, ColorAlpha color, Ident externalId ] |
StylizedLineList |
List of StylizedLine |
|
Tessellation |
POLYGONAL_TESSELLATION Alias of Mesh |
A Tessellation is a dynamic mesh representation |
TessellationAttribute |
POLYGONAL_TESSELLATION_ATTRIBUTE Alias of Entity |
A TessellationAttribute is an attribute applied to the elements of the tessellation. It can be normals, texture coordinates, patches or more advanced types like visibility attributes, curvatures attributes, etc... |
TessellationList |
List of Tessellation |
|
TopologyCategoryMask |
Structure |
The topology cmasl is a combination of TopologyConnectivityMask and TopologyDimensionMask
[ TopologyDimensionMask dimension, TopologyConnectivityMask connectivity ] |
TopologyConnectivityMask |
Enumeration |
The topology connectivity mask is used to filter some processus using the topological connectivity of elements (border, non-manifold, etc...)
- NONE = 0
- MANIFOLD = 1
- BOUNDARY = 2
- NONMANIFOLD = 4
- BOUNDARY_NONMANIFOLD = 6
- FREE = 8
- ALL = 15
|
TopologyDimensionMask |
Enumeration |
The topology dimension mask is used to filter some processes using the topological dimension of the support of vertices
- NONE = 0
- VERTEX = 1
- LINE = 2
- FACE = 4
- ALL = 7
|
UVCoord |
POLYGONAL_ATTRIBUTE_TEXCOORD Alias of TessellationAttribute |
An UVCoord is a tessellation attribute which defines Texture Coordinates |
UVCoordList |
List of UVCoord |
|
Vertex |
POLYGONAL_VERTEX Alias of Element |
A Vertex is defined by a position and is connected to the edges of a tessellation. It is the dimension-0 element |
VertexList |
List of Vertex |
|
VertexListList |
List of VertexList |
|
Process types
| Name |
Type |
Description |
BakeDiffuseOptions |
Structure |
Structured type
[ Int mapResolution, Int padding ] |
BakeOptionSelector |
|
Select one of possible choices: type
|
BakeOptions |
Structure |
Structured type
[ Int resolution, Int padding, BakeMaps textures ] |
CoordinateSystemOptions |
Structure |
Structured type
[ OrientationSelect orientation, ScaleSelect scale, Boolean snapToGround, Boolean centerToOrigin ] |
DecimateParameters |
Structure |
Structured type
[ Distance surfacicTolerance, Distance linearTolerance, Angle normalTolerance ] |
DecimateParametersList |
List of DecimateParameters |
|
GenerateDiffuseMap |
|
Select one of possible choices: type
|
HierarchyMode |
Enumeration |
- Full = 0
- Compress = 1
- Rake = 2
- MergeAll = 3
- MergeFinalLevel = 4
|
ImportOptions |
Structure |
Structured type
[ Boolean orientFaces, Boolean preserveOriginalUVs, Boolean removeDuplicatedMeshes ] |
NoBaking |
Alias of None |
|
Orientation |
Structure |
Structured type
[ Boolean zUP, Boolean leftHanded ] |
OrientationSelect |
|
Select one of possible choices: type
|
QualityPreset |
Enumeration |
- VeryHigh = 0
- High = 1
- Medium = 2
- Low = 3
|
ScaleSelect |
|
Select one of possible choices: type
|
TessellationQuality |
Structure |
Structured type
[ Distance maxSag, Distance maxLength, Angle maxAngle ] |
TessellationSettings |
|
Select one of possible choices: type
|
Scene types
| Name |
Type |
Description |
AlternativeTree |
SCENE_ALTERNATIVE_TREE Alias of Entity |
An AlternativeTree is an alternative product structure tree |
AlternativeTreeList |
List of AlternativeTree |
|
AnimChannel |
SCENE_ANIMCHANNEL Alias of Entity |
A container of AnimCurves |
AnimChannelList |
List of AnimChannel |
|
Animation |
SCENE_ANIMATION Alias of Entity |
An Animation allows to animate several properties through several AnimPropertyBinder |
AnimationList |
List of Animation |
|
AnimationTime |
Alias of Long |
|
Annotation |
SCENE_ANNOTATION Alias of Entity |
A group of annotation |
AnnotationGroup |
SCENE_ANNOTATIONGROUP Alias of Entity |
A group of annotation |
AnnotationGroupList |
List of AnnotationGroup |
|
AnnotationList |
List of Annotation |
|
BRepShape |
SCENE_SHAPE_BREP Alias of Shape |
A BRepShape is a Shape that contains BRep geometry |
Camera |
Structure |
Structured type
[ Point3 position, Vector3 direction, Vector3 up, Double fov ] |
Component |
SCENE_COMPONENT Alias of Entity |
A component add behavior to an occurrence |
ComponentList |
List of Component |
|
ComponentType |
Enumeration |
- Part = 0
- PMI = 1
- Light = 2
- VisualBehavior = 3
- InteractionBehavior = 4
- Metadata = 5
- Variant = 6
- Animation = 7
- Joint = 8
- Widget = 9
- OoCComponent = 10
- LODComponent = 11
- ExternalDataComponent = 12
|
DirectionalLight |
SCENE_DIRECTIONALLIGHT Alias of Entity |
A Directional Light is a light which emit in one direction (mostly used as sky lighting) |
ExternalDataComponent |
SCENE_EXTERNALDATACOMPONENT Alias of Component |
A ExternalDataComponent is a component that add external data to an occurrence |
Filter |
Structure |
Structured type
[ Ident id, String name, FilterExpression expr ] |
FilterExpression |
Alias of String |
A filter expression (see documentation) |
FilterList |
List of Filter |
|
JointComponent |
SCENE_JOINTCOMPONENT Alias of Component |
A joint for rigged animations |
Keyframe |
SCENE_KEYFRAME Alias of Entity |
A keyframe to interpolate an AnimCurve from |
KeyframeList |
List of Keyframe |
|
LOD |
SCENE_LOD Alias of Entity |
A Level of Detail (references an Occurrence) |
LODComponent |
SCENE_LODCOMPONENT Alias of Component |
A Levels of Detail component (contains multiple LOD) |
LODComponentList |
List of LODComponent |
|
LODList |
List of LOD |
|
Light |
SCENE_LIGHT Alias of Entity |
A Light is a an entity, can be positional, spot or directional |
LightComponent |
SCENE_LIGHTCOMPONENT Alias of Component |
A LightComponent is a component that add a light behavior to an occurrence |
MergeByRegionsStrategy |
|
Select one of possible choices: type
|
MergeHiddenPartsMode |
Enumeration |
- Destroy = 0
- MakeVisible = 1
- MergeSeparately = 2
|
MergeStrategy |
Enumeration |
- MergeParts = 0
- MergeByMaterials = 1
|
Metadata |
SCENE_METADATA Alias of Component |
A metadata is a component that contains all metadata properties of an occurrence |
MetadataDefinition |
Alias of PropertyValueList |
All properties of a metadata component |
MetadataDefinitionList |
List of MetadataDefinition |
|
MetadataList |
List of Metadata |
|
Occurrence |
SCENE_OCCURRENCE Alias of GeomEntity |
An occurrence is the main type of node in the product structure, it can have children and prototypes |
OccurrenceList |
List of Occurrence |
|
OccurrenceListList |
List of OccurrenceList |
|
OoCComponent |
SCENE_OOCCOMPONENT Alias of Component |
An Out of Core component |
PackedTree |
Structure |
Packed view of the scene tree
[ OccurrenceList occurrences, IntList parents, StringList names, InheritableBoolList visibles, MaterialList materials, IntList transformIndices, Matrix4List transformMatrices, StringPairListList customProperties ] |
Part |
SCENE_PART Alias of Component |
A part is the geometrical definition of product occurrence |
PartList |
List of Part |
|
PositionalLight |
SCENE_POINTLIGHT Alias of Entity |
A Positional Light is a light positioned in the space which emit in all directions |
Primitive_Type |
Enumeration |
- CUBE = 0
- SPHERE = 1
- PLAN = 2
- CONE = 3
- ARROW = 4
- CYLINDER = 5
|
ProberInfo |
Structure |
Structured type
[ Occurrence occurrence, Point3 position ] |
PropertyValue |
Structure |
A structure containing a property name and its value
[ String name, String value ] |
PropertyValueList |
List of PropertyValue |
list of PropertyValue |
RayHit |
Structure |
Structured type
[ Double rayParam, Occurrence occurrence, Int triangleIndex, Point2 triangleParam ] |
RayHitList |
List of RayHit |
|
ResizeByMaximumSizeOptions |
Structure |
Structured type
[ Int TextureSize, Boolean KeepTextureRatio ] |
ResizeByTexturesOptions |
|
Select one of possible choices: type
|
ResizeTexturesInputMode |
|
Select one of possible choices: type
|
ResizeTexturesResizeMode |
|
Select one of possible choices: type
|
Shape |
SCENE_SHAPE Alias of GeomEntity |
A Shape is the geometrical representation of a Part. It can be BRep or polygonal |
SpotLight |
SCENE_SPOTLIGHT Alias of Entity |
A Positional Light is a light positioned in the space which emit in a cone |
TessellatedShape |
SCENE_SHAPE_TESSELLATED Alias of Shape |
A TessellatedShape is a Shape that contains Polygonal geometry |
Variant |
SCENE_VARIANT Alias of Entity |
A variant allows to override some occurrences properties |
VariantComponent |
SCENE_VARIANTCOMPONENT Alias of Component |
A variant component is a component that contains variant definitions for an occurrence |
VariantComponentList |
List of VariantComponent |
|
VariantDefinition |
Structure |
Structured type
[ Variant variant, PropertyValueList overridedProperties ] |
VariantDefinitionList |
List of VariantDefinition |
|
VariantDefinitionListList |
List of VariantDefinitionList |
|
VariantList |
List of Variant |
|
VisibilityMode |
Enumeration |
|
SceneGUI types
| Name |
Type |
Description |
MouseEventType |
Enumeration |
- MouseMove = 0
- MouseButtonDlbClick = 1
- MouseButtonPress = 2
- MouseButtonRelease = 3
|
View types
| Name |
Type |
Description |
D3D11Interop |
Alias of Ident |
|
DrawPrimitives |
Structure |
Structured type
[ Boolean polygons, Boolean breps, Boolean wireframe, Boolean points, Boolean freeLines, Boolean patchBoundaries ] |
ID3D11Device |
Alias of Ptr |
|
ID3D11RenderTargetView |
Alias of Ptr |
|
ID3D11Resource |
Alias of Ptr |
|
ID3D11ShaderResourceView |
Alias of Ptr |
|
ImportFilePath |
Alias of FilePath |
File path of a supported file for import |
PickResult |
Structure |
Structured type
[ OccurrenceList occurrences, Point3List positions ] |
TextureHandle |
Alias of Int |
|
ViewSession |
Alias of Ident |
|
ViewSessionTexture |
Structure |
Structured type
[ ViewSessionTextureType type, Ptr texture ] |
ViewSessionTextureList |
List of ViewSessionTexture |
|
ViewSessionTextureType |
Enumeration |
|
Viewer |
Alias of Int |
|