Asset Transformer SDK (ex Pixyz) SceneInterface Class
Read time 72 minutes
Last updated 21 hours ago Inheritance
Inherited Members
Namespace: UnityEngine.Pixyz.Scene
public class SceneInterface : Interface
Methods
GetLastError
public static string GetLastError()
Returns
AddComponent
Add a component to an occurrence.
[HandleProcessCorruptedStateExceptions] public uint AddComponent(uint occurrence, ComponentType componentType)
Parameters
Type Name Description uint occurrence The occurrence to add the new component. ComponentType componentType Type of the component.
Returns
AddComponents
Add a components to each occurrence in the array.
[HandleProcessCorruptedStateExceptions] public ComponentList AddComponents(OccurrenceList occurrences, ComponentType componentType)
Parameters
Type Name Description OccurrenceList occurrences Occurrences that need the component to be added. ComponentType componentType Type of the component.
Returns
AddInParentInstances
Add an instance of prototype's child as child in current occurrence recursively.
[HandleProcessCorruptedStateExceptions] public void AddInParentInstances(uint root)
Parameters
Type Name Description uint root The occurrence to test.
CleanUnusedImages
Remove unused images from texture library.
[HandleProcessCorruptedStateExceptions] public int CleanUnusedImages()
Returns
CleanUnusedMaterials
Remove unused materials from material library.
[HandleProcessCorruptedStateExceptions] public int CleanUnusedMaterials(bool cleanImages = false)
Parameters
Type Name Description bool cleanImages Call cleanUnusedImages if true.
Returns
ComputeSubTreeChecksum
Compute the checksum of a sub-tree.
[HandleProcessCorruptedStateExceptions] public string ComputeSubTreeChecksum(uint root = 0)
Parameters
Type Name Description uint root Occurrence to compute.
Returns
ConfigureFunctionLogger
[HandleProcessCorruptedStateExceptions] public void ConfigureFunctionLogger(string functionName, bool enableFunction, bool enableParameters, bool enableExecutionTime)
Parameters
Type Name Description string functionName bool enableFunction bool enableParameters bool enableExecutionTime
ConvertMaterialsToColor
Convert all materials to materials with a color pattern, trying to keep the visual aspect as similar as possible.
[HandleProcessCorruptedStateExceptions] public void ConvertMaterialsToColor(MaterialList materials = null)
Parameters
Type Name Description MaterialList materials Materials to merge (merge all materials if empty).
ConvertMaterialsToPBR
Convert all materials to materials with a PBR pattern, trying to keep the visual aspect as similar as possible.
[HandleProcessCorruptedStateExceptions] public void ConvertMaterialsToPBR(MaterialList materials = null)
Parameters
Type Name Description MaterialList materials Materials to merge (merge all materials if empty).
CreateOBBMesh
[HandleProcessCorruptedStateExceptions] public uint CreateOBBMesh(uint occurrence)
Parameters
Type Name Description uint occurrence
Returns
CreateOccurrence
Create a new occurrence.
[HandleProcessCorruptedStateExceptions] public uint CreateOccurrence(string name, uint parent = 0)
Parameters
Type Name Description string name Name of the new occurrence. uint parent Create the occurrence as a child of parent, if not set the parent will be root.
Returns
CreateOccurrenceFromSelection
Create a new occurrence and add the given occurrences as children.
[HandleProcessCorruptedStateExceptions] public uint CreateOccurrenceFromSelection(string name, OccurrenceList children, uint parent, bool keepMaterialAssignment = true)
Parameters
Type Name Description string name Name of the new occurrence. OccurrenceList children Add given occurrence as children (if any). uint parent 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. bool keepMaterialAssignment If defined, material assignation will be updated to keep the visual same aspect.
Returns
CreateOccurrenceFromText
Creates an occurrence from string.
[HandleProcessCorruptedStateExceptions] public uint CreateOccurrenceFromText(string text, string font = "ChicFont", int fontSize = 64, ColorAlpha? color = null, double heigth3D = 40)
Parameters
Type Name Description string text The occurrence's name. string font The font to use. int fontSize The font size. ColorAlpha color The occurrence color. double heigth3D 3D height of text.
Returns
CreateOccurrences
Create one new occurrence under each given parent.
[HandleProcessCorruptedStateExceptions] public OccurrenceList CreateOccurrences(string name, OccurrenceList parents = null)
Parameters
Type Name Description string name Name of the new occurrence. OccurrenceList parents 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.
[HandleProcessCorruptedStateExceptions] public PartList CreatePartsFromMeshes(OccurrenceList occurrences, MeshList meshes)
Parameters
Type Name Description OccurrenceList occurrences The occurrence which will contains the part component of the mesh at the same index. MeshList meshes 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
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).
[HandleProcessCorruptedStateExceptions] public uint CreateSceneFromMeshes(MeshList meshes, Matrix4List matrices, bool centerPartPivots = true)
Parameters
Type Name Description MeshList meshes List of input meshes. Matrix4List matrices List of matrices of input meshes (if empty Identity will be used). bool centerPartPivots 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
DeleteComponentByType
Delete component from type.
[HandleProcessCorruptedStateExceptions] public void DeleteComponentByType(ComponentType componentType, uint occurrence, bool followPrototypes = true)
Parameters
Type Name Description ComponentType componentType Type of the component. uint occurrence The occurrence to remove components from. bool followPrototypes 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.
[HandleProcessCorruptedStateExceptions] public void DeleteComponentsByType(ComponentType componentType, uint rootOccurrence = 0)
Parameters
Type Name Description ComponentType componentType Type of the component. uint rootOccurrence The root occurrence to remove components from.
DeleteEmptyOccurrences
Delete all empty assemblies.
[HandleProcessCorruptedStateExceptions] public void DeleteEmptyOccurrences(uint root = 0)
Parameters
Type Name Description uint root Root occurrence for the process.
DeleteOccurrences
Delete a liste of occurrences.
[HandleProcessCorruptedStateExceptions] public void DeleteOccurrences(OccurrenceList occurrences)
Parameters
GenerateOctaViews
[HandleProcessCorruptedStateExceptions] public uint GenerateOctaViews(double radius, int XFrames, int YFrames, bool hemi = false)
Parameters
Returns
GetAABB
Returns the axis aligned bounding box of a list of occurrences.
[HandleProcessCorruptedStateExceptions] public AABB GetAABB(OccurrenceList occurrences, bool precise = false)
Parameters
Type Name Description OccurrenceList occurrences List of occurrences to retrieve the AABB. bool precise If true, will take more time but returns the minimal AABB and use the current animation pose. If false, fast but the AABB is approximated and multiple rotation matrices in the tree structure may extend it a lot, also the static pose of the meshes will be used.
Returns
GetActiveMaterial
Get the active material on occurrence.
[HandleProcessCorruptedStateExceptions] public uint GetActiveMaterial(uint occurrence)
Parameters
Type Name Description uint occurrence The occurrence.
Returns
GetActiveMaterials
Get the active materials on multiple occurrences.
[HandleProcessCorruptedStateExceptions] public MaterialList GetActiveMaterials(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences The occurrences to retrieve active material on.
Returns
GetActivePropertyValue
Get the value of a property on the first parent that own it.
[HandleProcessCorruptedStateExceptions] public string GetActivePropertyValue(uint occurrence, string propertyName, bool cacheProperty = false)
Parameters
Type Name Description uint occurrence An occurrence. string propertyName Property name. bool cacheProperty If true, the property will be copied on all ancestor of occurrence below the property owner to speed up future calls.
Returns
GetActivePropertyValues
Get the value of a property on the first parent that own it for each given occurrence.
[HandleProcessCorruptedStateExceptions] public StringList GetActivePropertyValues(OccurrenceList occurrences, string propertyName, bool cacheProperty = false)
Parameters
Type Name Description OccurrenceList occurrences List of occurrences. string propertyName Property name. bool cacheProperty If true, the property will be copied on all ancestor of occurrence below the property owner to speed up future calls.
Returns
GetAncestors
Returns the list of ancestors for one occurrence.
[HandleProcessCorruptedStateExceptions] public OccurrenceList GetAncestors(uint occurrence)
Parameters
Type Name Description uint occurrence The occurrence to test.
Returns
GetBrepShape
Returns the Brep shape of a part.
[HandleProcessCorruptedStateExceptions] public uint GetBrepShape(uint part)
Parameters
Type Name Description uint part The Part.
Returns
GetComponent
Returns a component on an occurrence.
[HandleProcessCorruptedStateExceptions] public uint GetComponent(uint occurrence, ComponentType componentType, bool followPrototypes = true)
Parameters
Type Name Description uint occurrence The occurrence. ComponentType componentType Type of the component. bool followPrototypes If true and if the component is not set on the occurrence, try to find it on its prototyping chain.
Returns
GetComponentByOccurrence
Returns one component of the specified type by occurrence if it exists.
[Obsolete] [HandleProcessCorruptedStateExceptions] public ComponentList GetComponentByOccurrence(OccurrenceList occurrences, ComponentType componentType, bool followPrototypes = true)
Parameters
Type Name Description OccurrenceList occurrences The occurrences list. ComponentType componentType Type of the component. bool followPrototypes If true and if the component is not set on the occurrence, try to find it on its prototyping chain.
Returns
GetComponentOccurrence
Get the occurrence that own a component.
[HandleProcessCorruptedStateExceptions] public uint GetComponentOccurrence(uint component)
Parameters
Type Name Description uint component The component.
Returns
GetComponentType
Get the type of a component.
[HandleProcessCorruptedStateExceptions] public ComponentType GetComponentType(uint component)
Parameters
Type Name Description uint component The component.
Returns
GetComponents
Returns one component of the specified type by occurrence if it exists.
[HandleProcessCorruptedStateExceptions] public ComponentList GetComponents(OccurrenceList occurrences, ComponentType componentType, bool followPrototypes = true)
Parameters
Type Name Description OccurrenceList occurrences The occurrences list. ComponentType componentType Type of the component. bool followPrototypes If true and if the component is not set on the occurrence, try to find it on its prototyping chain.
Returns
GetGlobalMatrices
Returns the global matrix for each given occurrence.
[HandleProcessCorruptedStateExceptions] public Matrix4List GetGlobalMatrices(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Nodes to get the local matrix.
Returns
GetGlobalMatrix
Returns the global matrix on an occurrence.
[HandleProcessCorruptedStateExceptions] public Matrix4 GetGlobalMatrix(uint occurrence)
Parameters
Type Name Description uint occurrence Occurrence to get the global matrix.
Returns
GetGlobalVisibility
Returns the global visibility of a given occurrence.
[HandleProcessCorruptedStateExceptions] public bool GetGlobalVisibility(uint occurrence)
Parameters
Type Name Description uint occurrence Occurrence to get the global visibility.
Returns
GetLocalMatrices
Returns the local matrix for each given occurrence.
[HandleProcessCorruptedStateExceptions] public Matrix4List GetLocalMatrices(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Nodes to get the local matrix.
Returns
GetLocalMatrix
Returns the local matrix on an occurrence.
[HandleProcessCorruptedStateExceptions] public Matrix4 GetLocalMatrix(uint occurrence)
Parameters
Type Name Description uint occurrence Node to get the local matrix.
Returns
GetMBB
Returns the Minimum Bounding Box of a list of occurrences.
[HandleProcessCorruptedStateExceptions] public OBB GetMBB(OccurrenceList occurrences, Point3? forcedAxis = null)
Parameters
Type Name Description OccurrenceList occurrences List of occurrences to retrieve the MBB. Point3 forcedAxis Forced axis of the mbb.
Returns
GetMaterialsFromSubtree
[HandleProcessCorruptedStateExceptions] public MaterialList GetMaterialsFromSubtree(uint occurrence)
Parameters
Type Name Description uint occurrence Root occurrence of the subtree on which to get the materials and images.
Returns
GetOBB
Returns the Oriented Bounding Box of a list of occurrences (works only on meshes, fast method, not the Minimum Volume Box).
[HandleProcessCorruptedStateExceptions] public OBB GetOBB(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences List of occurrences to retrieve the OBB.
Returns
GetOccurrenceActiveMaterial
Returns the active material on a given occurrence.
[HandleProcessCorruptedStateExceptions] public uint GetOccurrenceActiveMaterial(uint occurrence)
Parameters
Type Name Description uint occurrence Occurrence to get the active material.
Returns
GetOccurrenceName
Returns the name of an occurrence.
[HandleProcessCorruptedStateExceptions] public string GetOccurrenceName(uint occurrence)
Parameters
Type Name Description uint occurrence The occurrence to get the name.
Returns
GetOccurrencesWithComponent
Recursively get all the occurrences containing a component of the specified type.
[HandleProcessCorruptedStateExceptions] public OccurrenceList GetOccurrencesWithComponent(ComponentType componentType, uint fromOcc = 0)
Parameters
Type Name Description ComponentType componentType The component type. uint fromOcc Source occurrence of the recursion.
Returns
GetPartActiveShape
Returns the active shape of a part.
[HandleProcessCorruptedStateExceptions] public uint GetPartActiveShape(uint part)
Parameters
Type Name Description uint part The part.
Returns
GetPartOccurrences
Recursively get all the occurrences containing a part component.
[HandleProcessCorruptedStateExceptions] public OccurrenceList GetPartOccurrences(uint fromOcc = 0)
Parameters
Type Name Description uint fromOcc Source occurrence of the recursion.
Returns
GetPartShapeType
Get the part's shape type.
[HandleProcessCorruptedStateExceptions] public ShapeType GetPartShapeType(uint part)
Parameters
Type Name Description uint part The part to test.
Returns
GetPolygonCount
Returns the number of polygon in the parts meshes.
[HandleProcessCorruptedStateExceptions] public ulong GetPolygonCount(OccurrenceList occurrences, bool asTriangleCount = false, bool countOnceEachInstance = false, bool countHidden = false)
Parameters
Type Name Description OccurrenceList occurrences The part occurrences. bool asTriangleCount If true count the equivalent of triangles for each polygon. bool countOnceEachInstance If true ignore multiple instance of each tessellation. bool countHidden If true, also count hidden components.
Returns
GetSubTreeStats
Returns some stats of a sub tree.
[HandleProcessCorruptedStateExceptions] public GetSubTreeStatsReturn GetSubTreeStats(OccurrenceList roots)
Parameters
Type Name Description OccurrenceList roots The root occurrences to get stats on.
Returns
GetVertexCount
Returns the number of vertices in the parts meshes.
[HandleProcessCorruptedStateExceptions] public ulong GetVertexCount(OccurrenceList occurrences, bool countOnceEachInstance = false, bool countHidden = false, bool countPoints = false, bool countMergedVertices = false)
Parameters
Type Name Description OccurrenceList occurrences The part occurrences. bool countOnceEachInstance If true ignore multiple instance of each tessellation. bool countHidden If true, also count hidden components. bool countPoints If true, also count points (for points cloud). bool countMergedVertices If true count all merged vertices in each tessellation.
Returns
GetViewpointsFromCavities
Returns viewpoints from model cavities.
[HandleProcessCorruptedStateExceptions] public GetViewpointsFromCavitiesReturn GetViewpointsFromCavities(double voxelSize, double minCavityVolume)
Parameters
Type Name Description double voxelSize Precision for cavities detection. double minCavityVolume Minimum volume for a cavity to be returned.
Returns
GetVolume
Return the volume of the occurrence.
[HandleProcessCorruptedStateExceptions] public double GetVolume(uint occurrence)
Parameters
Type Name Description uint occurrence Entry occurrence.
Returns
GetVolumes
Return the volume of a set of root occurrences.
[HandleProcessCorruptedStateExceptions] public DoubleList GetVolumes(OccurrenceList iRoots)
Parameters
Returns
HasComponent
Returns True if the given occurrence has the given component type.
[HandleProcessCorruptedStateExceptions] public bool HasComponent(uint occurrence, ComponentType componentType, bool followPrototypes = true)
Parameters
Type Name Description uint occurrence The occurrence. ComponentType componentType Type of the component. bool followPrototypes If true and if the component is not set on the occurrence, try to find it on its prototyping chain.
Returns
Hide
Hide the given occurrences.
[HandleProcessCorruptedStateExceptions] public void Hide(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences The list of occurrences to hide.
InverseVisibility
Inverse the visibility of the given occurrences.
[HandleProcessCorruptedStateExceptions] public void InverseVisibility(OccurrenceList occurrences)
Parameters
IsAncestorOf
Test if an occurrence is an ancestor of another one.
[HandleProcessCorruptedStateExceptions] public bool IsAncestorOf(uint maybeAncestor, uint occurrence)
Parameters
Type Name Description uint maybeAncestor The potential ancestor of the occurrence. uint occurrence The occurrence to test.
Returns
KeepAncestors
Filter a list of occurrences by removing all occurrences which have an ancestor inside the list.
[HandleProcessCorruptedStateExceptions] public OccurrenceList KeepAncestors(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences The list that shall be filtered.
Returns
ListComponent
List all components on a type on the whole tree.
[HandleProcessCorruptedStateExceptions] public ComponentList ListComponent(ComponentType componentType)
Parameters
Returns
ListComponents
List all components on an occurrence.
[HandleProcessCorruptedStateExceptions] public ComponentList ListComponents(uint occurrence, bool followPrototypes = true)
Parameters
Type Name Description uint occurrence The occurrence to list the components. bool followPrototypes If true list also components owned by the prototype.
Returns
MergeImages
Merge all equivalent images (i.e. with same pixels).
[HandleProcessCorruptedStateExceptions] public int MergeImages(ImageList images = null)
Parameters
Type Name Description ImageList images Images to merge (merge all images if empty).
Returns
MergeMaterials
Merge all equivalent materials (i.e. with same appearance).
[HandleProcessCorruptedStateExceptions] public int MergeMaterials(MaterialList materials = null, bool evaluateNames = false)
Parameters
Type Name Description MaterialList materials Materials to merge (merge all materials if empty). bool evaluateNames If true, materials names will be taken into consideration (on top of other properties). It means that materials having same properties but different names won't be merged together.
Returns
RemoveMaterials
Recursively remove all materials.
[HandleProcessCorruptedStateExceptions] public void RemoveMaterials(OccurrenceList roots = null)
Parameters
Type Name Description OccurrenceList roots If specified, remove materials only from the given occurrences and their descendants.
RenameLongOccurrenceName
Truncate names of occurrence with too long names.
[HandleProcessCorruptedStateExceptions] public void RenameLongOccurrenceName(int maxLength)
Parameters
Type Name Description int maxLength Maximum name length.
ReplaceMaterial
Replace a material by another everywhere it is used.
[HandleProcessCorruptedStateExceptions] public void ReplaceMaterial(uint originalMaterial, uint newMaterial, OccurrenceList occurrences = null)
Parameters
Type Name Description uint originalMaterial The material to replace everywhere. uint newMaterial The new material to set in place of originalMaterial. OccurrenceList occurrences 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.
[HandleProcessCorruptedStateExceptions] public void ResizeTextures(ResizeTexturesInputMode inputMode, ResizeTexturesResizeMode resizeMode, bool replaceTextures)
Parameters
Type Name Description ResizeTexturesInputMode inputMode Defines if the textures to resize are textures used by a selection of Occurrences, or a selection among the textures available in the scene. ResizeTexturesResizeMode resizeMode Defines if the textures are resized following a ratio or following a maximum size/resolution (only textures above the defined maximum are downsized). bool replaceTextures If True, overwrites textures from the selection.
SetComponentOccurrence
Move a component to an occurrence.
[HandleProcessCorruptedStateExceptions] public void SetComponentOccurrence(uint component, uint occurrence)
Parameters
Type Name Description uint component The component. uint occurrence The occurrence.
SetDefaultVariant
Set the default variant.
[HandleProcessCorruptedStateExceptions] public void SetDefaultVariant()
SetOccurrenceMaterial
Set the material on a occurrence.
[HandleProcessCorruptedStateExceptions] public void SetOccurrenceMaterial(uint occurrence, uint material)
Parameters
Type Name Description uint occurrence Occurrence to set the material. uint material The new occurrence material.
SetOccurrenceName
Returns the name of an occurrence.
[HandleProcessCorruptedStateExceptions] public void SetOccurrenceName(uint occurrence, string name)
Parameters
Type Name Description uint occurrence The occurrence to get the name. string name The occurrence name.
Show
Show the given occurrences.
[HandleProcessCorruptedStateExceptions] public void Show(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences The list occurrences to show.
ShowOnly
Show only the given occurrences.
[HandleProcessCorruptedStateExceptions] public void ShowOnly(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences The list occurrences to show.
TransferCADMaterialsOnPartOccurrences
Set all materials on part occurrences.
[HandleProcessCorruptedStateExceptions] public void TransferCADMaterialsOnPartOccurrences(uint rootOccurrence = 0)
Parameters
Type Name Description uint rootOccurrence Root occurrence.
TransferMaterialsOnPatches
Take the first instance material and set it one the mesh patches.
[HandleProcessCorruptedStateExceptions] public void TransferMaterialsOnPatches(uint rootOccurrence = 0)
Parameters
Type Name Description uint rootOccurrence Root occurrence.
AddComponentChangedCallback
public uint AddComponentChangedCallback(SceneInterface.ComponentChangedDelegate callback, IntPtr userData)
Parameters
Returns
RemoveComponentChangedCallback
public void RemoveComponentChangedCallback(uint id)
Parameters
Type Name Description uint id
AddSceneChangedCallback
public uint AddSceneChangedCallback(SceneInterface.SceneChangedDelegate callback, IntPtr userData)
Parameters
Returns
RemoveSceneChangedCallback
public void RemoveSceneChangedCallback(uint id)
Parameters
Type Name Description uint id
CreateHierarchicalClusters
Reorganize a sub tree with hierarchical clustering.
[HandleProcessCorruptedStateExceptions] public uint CreateHierarchicalClusters(uint root, int childrenCountByNode = 2, double minFitting = -1)
Parameters
Type Name Description uint root Root of the sub-tree to reorganize. int childrenCountByNode Order of the hierarchical tree. double minFitting Minimal fitting coefficient to allow 2 nodes to be merged/clustered.
Returns
GenerateOctree
Generate a loose octree from the given sub-tree.
[HandleProcessCorruptedStateExceptions] public uint GenerateOctree(uint occurrence, int maxDepth = 5, double looseFactor = 2)
Parameters
Type Name Description uint occurrence Root occurrence of the sub-tree. int maxDepth Defines the depth maximum of the octree. double looseFactor Defines the loose factor of the octree.
Returns
GetClusters
Get groups of occurrences based on spatial proximity.
[HandleProcessCorruptedStateExceptions] public OccurrenceListList GetClusters(OccurrenceList occurrences, MergeByRegionsStrategy strategy)
Parameters
Returns
GetPartOccurrencesGroupedBySimilarity
Get groups of occurrences based on various criteria (see parameters). Returns a list of groups ; each group is either a list of parts considered similar (depending on criteria) or is a singleton that has no similar parts.
[HandleProcessCorruptedStateExceptions] public OccurrenceListList GetPartOccurrencesGroupedBySimilarity(uint root = 0, double acceptVolumeRatio = 0.01, double acceptPolycountRatio = 0.1, double acceptAABBAxisRatio = 0.01, double acceptAABBCenterDistance = 0.1)
Parameters
Type Name Description uint root Root occurrence for the process. double acceptVolumeRatio If the ratio of volumes of two parts is lower than acceptVolumeRatio, they will be considered duplicated. double acceptPolycountRatio If the ratio of polygon counts of two parts is lower than acceptPolycountRatio, they will be considered duplicated. double acceptAABBAxisRatio If the ratio of AABB axis of two parts is lower than acceptAABBAxisRatio, they will be considered duplicated. double acceptAABBCenterDistance If the distance between AABB centers of two parts is lower than acceptAABBCenterDistance, they will be considered duplicated.
Returns
CreateCapsule
Create a new capsule.
[HandleProcessCorruptedStateExceptions] public uint CreateCapsule(double radius, double height, int subdivisionLatitude = 16, int subdivisionLongitude = 16, bool generateUV = true)
Parameters
Type Name Description double radius Radius of the Capsule. double height Height of the Capsule (excluding the two size of half spheres). int subdivisionLatitude Subdivision of the Capsule on the Latitude. int subdivisionLongitude Subdivision of the Capsule (two half spheres) on the Longitude. bool generateUV Generation of the UV.
Returns
CreateCone
Create a new cone.
[HandleProcessCorruptedStateExceptions] public uint CreateCone(double bottomRadius, double height, int sides = 16, bool generateUV = true)
Parameters
Type Name Description double bottomRadius Radius of the bottom of the cone. double height Height of the cone. int sides Number of sides of the cone. bool generateUV Generation of the UV.
Returns
CreateCube
Create a new cube.
[HandleProcessCorruptedStateExceptions] public uint CreateCube(double sizeX, double sizeY, double sizeZ, int subdivision = 1, bool generateUV = true)
Parameters
Type Name Description double sizeX Size of the Cube on the x axis. double sizeY Size of the Cube on the y axis. double sizeZ Size of the Cube on the z axis. int subdivision Subdivision of the Cube on all the axis. bool generateUV Generation of the UV.
Returns
CreateCylinder
Create a new cylinder.
[HandleProcessCorruptedStateExceptions] public uint CreateCylinder(double radius, double height, int sides = 16, bool generateUV = true)
Parameters
Type Name Description double radius Radius of the Cylinder. double height Height of the Cylinder. int sides Number of Sides of the Cylinder. bool generateUV Generation of the UV.
Returns
CreateImmersion
Create a new bagel klein.
[HandleProcessCorruptedStateExceptions] public uint CreateImmersion(double radius, int subdivisionX, int subdivisionY)
Parameters
Type Name Description double radius Radius of the Immersion. int subdivisionX Subdivision of the Immersion on the Latitude. int subdivisionY Subdivision of the Immersion on the Longitude.
Returns
CreatePlane
Create a new plane.
[HandleProcessCorruptedStateExceptions] public uint CreatePlane(double sizeX, double sizeY, int subdivisionX = 1, int subdivisionY = 1, bool generateUV = true)
Parameters
Type Name Description double sizeX Size of the Plane on the x axis. double sizeY Size of the Plane on the y axis. int subdivisionX Subdivision of the Plane on the x axis. int subdivisionY Subdivision of the Plane on the y axis. bool generateUV Generation of the UV.
Returns
CreateSphere
Create a new sphere.
[HandleProcessCorruptedStateExceptions] public uint CreateSphere(double radius, int subdivisionLatitude = 16, int subdivisionLongitude = 16, bool generateUV = true)
Parameters
Type Name Description double radius Radius of the Sphere. int subdivisionLatitude Subdivision of the Sphere on the Latitude. int subdivisionLongitude Subdivision of the Sphere on the Longitude. bool generateUV Generation of the UV.
Returns
CreateTorus
Create a new torus.
[HandleProcessCorruptedStateExceptions] public uint CreateTorus(double majorRadius, double minorRadius, int subdivisionLatitude = 16, int subdivisionLongitude = 16, bool generateUV = true)
Parameters
Type Name Description double majorRadius Major Radius. double minorRadius Minor Radius. int subdivisionLatitude Subdivision of the Torus on the Latitude. int subdivisionLongitude Subdivision of the Torus on the Longitude. bool generateUV Generation of the UV.
Returns
FindDuplicatedPartOccurrences
Get parts that are duplicated. This does not include each first occurrence of a set of duplicates.
[Obsolete] [HandleProcessCorruptedStateExceptions] public OccurrenceList FindDuplicatedPartOccurrences(uint root = 0, double acceptVolumeRatio = 0.01, double acceptPolycountRatio = 0.1, double acceptAABBAxisRatio = 0.01, double acceptAABBCenterDistance = 0.1)
Parameters
Type Name Description uint root Root occurrence. double acceptVolumeRatio If the ratio of volumes of two parts is lower than acceptVolumeRatio, they will be considered duplicated. double acceptPolycountRatio If the ratio of polygon counts of two parts is lower than acceptPolycountRatio, they will be considered duplicated. double acceptAABBAxisRatio If the ratio of AABB axis of two parts is lower than acceptAABBAxisRatio, they will be considered duplicated. double acceptAABBCenterDistance If the distance between AABB centers of two parts is lower than acceptAABBCenterDistance, they will be considered duplicated.
Returns
FindOccurrencesByMaterial
Get occurrences for which the property "Material" is the given material.
[HandleProcessCorruptedStateExceptions] public OccurrenceList FindOccurrencesByMaterial(uint material)
Parameters
Type Name Description uint material A material.
Returns
FindOccurrencesByMetadata
Returns all occurrences which a metadata property value matches the given regular expression (ECMAScript).
[HandleProcessCorruptedStateExceptions] public OccurrenceList FindOccurrencesByMetadata(string property, string regex, OccurrenceList roots = null, bool caseInsensitive = false)
Parameters
Type Name Description string property Property name. string regex Regular expression (ECMAScript). OccurrenceList roots If specified, restrict the search from the given roots. bool caseInsensitive If True, the regex will be insensitive to upper and lower cases.
Returns
FindOccurrencesByMetadataValue
Returns all occurrences with a metadata value matching the given regular expression (ECMAScript).
[HandleProcessCorruptedStateExceptions] public OccurrenceList FindOccurrencesByMetadataValue(string regex, OccurrenceList roots = null, bool caseInsensitive = false)
Parameters
Type Name Description string regex Regular expression (ECMAScript). OccurrenceList roots If specified, restrict the search from the given roots. bool caseInsensitive If True, the regex will be insensitive to upper and lower cases.
Returns
FindOccurrencesByProperty
Returns all occurrences which a property value matches the given regular expression (ECMAScript).
[HandleProcessCorruptedStateExceptions] public OccurrenceList FindOccurrencesByProperty(string property, string regex, OccurrenceList roots = null, bool caseInsensitive = false)
Parameters
Type Name Description string property Property name. string regex Regular expression (ECMAScript). OccurrenceList roots If specified, restrict the search from the given roots. bool caseInsensitive If True, the regex will be insensitive to upper and lower cases.
Returns
FindPartOccurrencesByActiveMaterial
Find all part occurrence with a given material as active material (i.e. as seen in the rendering).
[HandleProcessCorruptedStateExceptions] public OccurrenceList FindPartOccurrencesByActiveMaterial(uint material, OccurrenceList roots = null)
Parameters
Type Name Description uint material A material. OccurrenceList roots If specified, restrict the search from the given roots.
Returns
FindPartOccurrencesByMaximumSize
Get part occurrences by size.
[HandleProcessCorruptedStateExceptions] public OccurrenceList FindPartOccurrencesByMaximumSize(OccurrenceList roots, double maxDiagLength, double maxSize = -1, bool getHidden = false)
Parameters
Type Name Description OccurrenceList roots Roots occurrences for the process. double maxDiagLength If the diagonal axis of the bounding box is less than maxDiagLength, part will be filtered. -1 to ignore. double maxSize If the longer axis of the box is less than maxLength, part will be filtered. -1 to ignore. bool getHidden If true, hidden part occurrences meeting the criteria will be filtered as well.
Returns
FindPartOccurrencesByMinimumNumberOfInstances
Get part occurrences with more than "minInstanciationCount" occurrence on the scene.
[HandleProcessCorruptedStateExceptions] public OccurrenceList FindPartOccurrencesByMinimumNumberOfInstances(int minInstanciationCount)
Parameters
Type Name Description int minInstanciationCount Min occurrence count.
Returns
FindPartOccurrencesByVisibleMaterial
Get part occurrences for which the given material is visible in the viewer.
[HandleProcessCorruptedStateExceptions] public OccurrenceList FindPartOccurrencesByVisibleMaterial(uint material)
Parameters
Type Name Description uint material A material.
Returns
FindPartOccurrencesInAABB
Find part occurrences in the scene in a given axis aligned bounding box.
[HandleProcessCorruptedStateExceptions] public OccurrenceList FindPartOccurrencesInAABB(AABB aabb)
Parameters
Type Name Description AABB aabb The axis aligned bounding box.
Returns
FindPartOccurrencesInBox
Get part occurrences contained in a given box.
[HandleProcessCorruptedStateExceptions] public OccurrenceList FindPartOccurrencesInBox(ExtendedBox box, bool strictlyIncludes)
Parameters
Type Name Description ExtendedBox box The extension box. bool strictlyIncludes If false, parts only need to intersect the box to be selected.
Returns
CreateSubTree
Create a complete scene tree.
[HandleProcessCorruptedStateExceptions] public OccurrenceList CreateSubTree(PackedTree tree, uint root = 0, bool replaceRoot = true)
Parameters
Type Name Description PackedTree tree uint root Specify the root occurrence of the scene. bool replaceRoot If true, the root occurrence will be replaced by the root of the given tree, else it will be added as a child.
Returns
GetChildren
Get the children of an occurrence.
[HandleProcessCorruptedStateExceptions] public OccurrenceList GetChildren(uint occurrence)
Parameters
Type Name Description uint occurrence The occurrence.
Returns
GetChildrenCount
Get the children count of an occurrence.
[HandleProcessCorruptedStateExceptions] public int GetChildrenCount(uint occurrence)
Parameters
Type Name Description uint occurrence The occurrence.
Returns
GetCurrentVariantRoot
Get the current active root. Returns active variant's root if one or global root.
[HandleProcessCorruptedStateExceptions] public uint GetCurrentVariantRoot()
Returns
GetFirstChild
Get the children of an occurrence.
[HandleProcessCorruptedStateExceptions] public uint GetFirstChild(uint occurrence)
Parameters
Type Name Description uint occurrence The occurrence.
Returns
GetNextSibling
Get the next occurrence in parent children.
[HandleProcessCorruptedStateExceptions] public uint GetNextSibling(uint occurrence)
Parameters
Type Name Description uint occurrence The occurrence.
Returns
GetOccurrenceAncestors
Get all ancestors from occurrence until root (occurrence is not included).
[HandleProcessCorruptedStateExceptions] public OccurrenceList GetOccurrenceAncestors(uint occurrence)
Parameters
Type Name Description uint occurrence The occurrence to find ancestors.
Returns
GetOccurrencesAncestors
Batch version of getOccurrenceAncestors.
[HandleProcessCorruptedStateExceptions] public OccurrenceListList GetOccurrencesAncestors(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences The list of occurrences to find ancestors.
Returns
GetParent
Get the parent of an occurrence.
[HandleProcessCorruptedStateExceptions] public uint GetParent(uint occurrence)
Parameters
Type Name Description uint occurrence The occurrence.
Returns
GetPreviousSibling
Get the previous occurrence in parent children.
[HandleProcessCorruptedStateExceptions] public uint GetPreviousSibling(uint occurrence)
Parameters
Type Name Description uint occurrence The occurrence.
Returns
GetRoot
Get the root occurrence of the product structure.
[HandleProcessCorruptedStateExceptions] public uint GetRoot()
Returns
GetSubTree
Returns a packed version of the whole scene tree.
[HandleProcessCorruptedStateExceptions] public PackedTree GetSubTree(uint root = 0, VisibilityMode visibilityMode = VisibilityMode.Hide, int depth = -1)
Parameters
Type Name Description uint root Specify the root of the returned scene. VisibilityMode visibilityMode The visibility mode. int depth Maximum depth.
Returns
MoveOccurrences
Move an occurrence, adjusting the transformation to keep objects at the same place in the world space.
[HandleProcessCorruptedStateExceptions] public void MoveOccurrences(OccurrenceList occurrences, uint destination, uint insertBefore = 0)
Parameters
Type Name Description OccurrenceList occurrences The occurrences to move. uint destination Destination occurrence (the new parent). uint insertBefore Occurrence before witch to move, if null append to destination children.
SetParent
Set the parent of an occurrence.
[HandleProcessCorruptedStateExceptions] public void SetParent(uint occurrence, uint parent, bool addInParentInstances = false, uint insertBefore = 0, bool worldPositionStays = false)
Parameters
Type Name Description uint occurrence The occurrence. uint parent The parent occurrence. bool addInParentInstances If True, each occurrence whose prototype is the target parent will generate a child whose prototype is the occurrence itself. uint insertBefore Add before this child occurrence in the children list of the parent occurrence. bool worldPositionStays If true, the parent-relative position, scale and rotation are modified such that the object keeps the same world space position, rotation and scale as before.
AddLightComponent
Add a light component to an occurrence.
[HandleProcessCorruptedStateExceptions] public uint AddLightComponent(uint occurrence, LightType lightType, Color color, double power = 1, double cutOff = 20)
Parameters
Type Name Description uint occurrence The occurrence to add the new component. LightType lightType The type of the light. Color color Color of the light. double power The power of the light. double cutOff The cutoff angle of the light.
Returns
CreateLight
Create an occurrence with a light component.
[HandleProcessCorruptedStateExceptions] public uint CreateLight(string name, LightType lightType, Color color, double power = 1, double cutOff = 20, uint parent = 0)
Parameters
Type Name Description string name Name of the light. LightType lightType The type of the light. Color color Color of the light. double power The power of the light. double cutOff The cutoff angle of the light. uint parent The parent of the light occurrence.
Returns
AddMetadata
Add a new metadata property to a metadata component.
[HandleProcessCorruptedStateExceptions] public void AddMetadata(uint metadata, string name, string value)
Parameters
Type Name Description uint metadata The metadata component. string name The new property name. string value The new property value.
AddMetadataBlock
Add a new metadata property to a metadata component.
[HandleProcessCorruptedStateExceptions] public void AddMetadataBlock(uint metadata, StringList names, StringList values)
Parameters
Type Name Description uint metadata The metadata component. StringList names The new properties names. StringList values The new properties values.
CreateMetadatasFromDefinitions
Create Metadata components from definitions.
[HandleProcessCorruptedStateExceptions] public MetadataList CreateMetadatasFromDefinitions(OccurrenceList occurrences, MetadataDefinitionList definitions)
Parameters
Returns
GetMetadata
Get a metadata property value from a metadata component.
[HandleProcessCorruptedStateExceptions] public string GetMetadata(uint metadata, string name)
Parameters
Type Name Description uint metadata The metadata component. string name The metadata property name.
Returns
GetMetadatasDefinitions
Returns definition of Metadata components.
[HandleProcessCorruptedStateExceptions] public MetadataDefinitionList GetMetadatasDefinitions(MetadataList metadatas)
Parameters
Type Name Description MetadataList metadatas List of metadata component to retrieve definition.
Returns
RemoveMetadata
Remove a property from a metadata.
[HandleProcessCorruptedStateExceptions] public void RemoveMetadata(uint metadata, string name)
Parameters
Type Name Description uint metadata The occurrence. string name The name of the property.
GetSubpartMaterial
Get a subpart material assignment according to overrides on the scene tree with SubpartMaterial components.
[HandleProcessCorruptedStateExceptions] public uint GetSubpartMaterial(uint occurrence, uint subpartIndex)
Parameters
Type Name Description uint occurrence The Occurrence. uint subpartIndex The subpart index.
Returns
ListActiveShapeMaterials
List all the materials used in the part shape.
[HandleProcessCorruptedStateExceptions] public MaterialList ListActiveShapeMaterials(uint part)
Parameters
Type Name Description uint part The part which contains sub materials.
Returns
ListSubpartMaterials
List all the materials used in the part shape or overrided with a SubpartMaterial component.
[HandleProcessCorruptedStateExceptions] public MaterialList ListSubpartMaterials(uint occurrence)
Parameters
Type Name Description uint occurrence The occurrence which contains sub materials.
Returns
ListSubpartVariantMaterials
List all the materials variants in subpart.
[HandleProcessCorruptedStateExceptions] public VariantMaterialList ListSubpartVariantMaterials(uint occurrence)
Parameters
Type Name Description uint occurrence The occurrence which contains variants.
Returns
SetSubpartMaterial
Set a subpart material assignment using a SubpartMaterial component.
[HandleProcessCorruptedStateExceptions] public void SetSubpartMaterial(uint occurrence, uint subpartIndex, uint material)
Parameters
Type Name Description uint occurrence The Occurrence. uint subpartIndex The subpart index. uint material The material.
SetSubpartMaterials
Set multiple subpart materials at once using a SubpartMaterial component.
[HandleProcessCorruptedStateExceptions] public void SetSubpartMaterials(uint occurrence, MaterialList materials, uint startIndex = 0)
Parameters
Type Name Description uint occurrence The Occurrence on which to apply the materials. MaterialList materials Materials to set. uint startIndex The subpart start index.
SetSubpartVariantMaterials
Set materials in variant.
[HandleProcessCorruptedStateExceptions] public void SetSubpartVariantMaterials(uint occurrence, VariantMaterialList variantMaterials)
Parameters
Type Name Description uint occurrence The occurrence which contains variants. VariantMaterialList variantMaterials List of variant and materials.
SetSubpartVariantMaterialsList
Set all the materials list in variants.
[HandleProcessCorruptedStateExceptions] public VariantMaterialList SetSubpartVariantMaterialsList(VariantList variants, MaterialListList materialListList)
Parameters
Type Name Description VariantList variants The part which contains variants. MaterialListList materialListList The part which contains the list of material variant list.
Returns
TransferSubpartMaterialsOnPatches
Assign SubpartMaterialComponent materials on the occurrence's part shapes. This might affect other Part in the scene if not singularized before.
[HandleProcessCorruptedStateExceptions] public void TransferSubpartMaterialsOnPatches(uint occurrence)
Parameters
Type Name Description uint occurrence The occurrence which has sub materials assigned.
CreateAlternativeTree
Create a new alternative tree.
[HandleProcessCorruptedStateExceptions] public uint CreateAlternativeTree(string name, uint root = 0)
Parameters
Type Name Description string name The name of the new alternative tree. uint root The root occurrence.
Returns
GetAlternativeTreeRoot
Returns the root occurrence associated with the given AlternativeTree.
[HandleProcessCorruptedStateExceptions] public uint GetAlternativeTreeRoot(uint tree)
Parameters
Type Name Description uint tree Targeted alternative tree.
Returns
ListAlternativeTrees
Returns all the available alternative trees.
[HandleProcessCorruptedStateExceptions] public AlternativeTreeList ListAlternativeTrees()
Returns
AddAnimation
Add an animation in Animation library.
[HandleProcessCorruptedStateExceptions] public void AddAnimation(uint animation)
Parameters
Type Name Description uint animation Animation to add.
AddKeyframe
Adds a keyframe in the curve.
[HandleProcessCorruptedStateExceptions] public uint AddKeyframe(uint channel, ulong time, double value)
Parameters
Type Name Description uint channel The channel one wants to add a keyframe in. ulong time The time. double value The value.
Returns
AddKeyframeFromCurrentPosition
Adds keyframes in a given AnimChannel based on current position.
[HandleProcessCorruptedStateExceptions] public void AddKeyframeFromCurrentPosition(uint channel, ulong time)
Parameters
Type Name Description uint channel The channel one wants to add a keyframe in. ulong time The time.
AnimatesThisOccurrence
Does this Animation animates this Occurrence - or one of its parents (thus animating it indirectly) ?.
[HandleProcessCorruptedStateExceptions] public bool AnimatesThisOccurrence(uint animation, uint occurrence)
Parameters
Type Name Description uint animation The Animation. uint occurrence The supposedly animated occurrence.
Returns
BakeAnimation
WARNING: this function is tagged as 'EXPERIMENTAL' Bake an animation. The values are now precalculated and no longer interpolated.
[HandleProcessCorruptedStateExceptions] public void BakeAnimation(uint animation, uint occurrence, uint end, ulong interval)
Parameters
Type Name Description uint animation The Animation. uint occurrence The occurrence. uint end The parent occurrence. ulong interval The interval.
CreateAnimation
Creates an animation, need to use addAnimation when animation is filled.
[HandleProcessCorruptedStateExceptions] public uint CreateAnimation(string name)
Parameters
Type Name Description string name Name of the animation.
Returns
CreateSkeletonMesh
Create a skeleton mesh from a joint component tree.
[HandleProcessCorruptedStateExceptions] public uint CreateSkeletonMesh(uint root)
Parameters
Type Name Description uint root Root joint component node.
Returns
DecimateAnimChannelBySegment
Decimates by segment a given AnimChannel.
[HandleProcessCorruptedStateExceptions] public void DecimateAnimChannelBySegment(uint channel, double precision)
Parameters
Type Name Description uint channel The channel. double precision The precision.
DeleteAnimation
Deletes an animation.
[HandleProcessCorruptedStateExceptions] public void DeleteAnimation(uint animation)
Parameters
Type Name Description uint animation The created animation.
DeleteEmptyAnimation
Delete all animation that contain 0 keyframes.
[HandleProcessCorruptedStateExceptions] public void DeleteEmptyAnimation()
DisplayAllKeyframesFromAnimChannel
Displays info on the selected AnimChannel.
[HandleProcessCorruptedStateExceptions] public void DisplayAllKeyframesFromAnimChannel(uint channel)
Parameters
Type Name Description uint channel The channel.
DisplayAllKeyframesFromAnimation
Displays info on the selected animation.
[HandleProcessCorruptedStateExceptions] public void DisplayAllKeyframesFromAnimation(uint animation)
Parameters
Type Name Description uint animation The animation.
DisplayValueFromAnimChannelAtTime
Displays the value.
[HandleProcessCorruptedStateExceptions] public void DisplayValueFromAnimChannelAtTime(uint channel, ulong time, bool defaultValue = false)
Parameters
Type Name Description uint channel The channel. ulong time The time. bool defaultValue Show default instead ?.
GetAnimChannelIfExists
Returns the main AnimChannel of an Occurrence according to a given Animation.
[HandleProcessCorruptedStateExceptions] public uint GetAnimChannelIfExists(uint animation, uint occurrence)
Parameters
Type Name Description uint animation The Animation. uint occurrence The Occurrence.
Returns
GetAnimChannelInfo
WARNING: this function is tagged as 'EXPERIMENTAL' get an animation channel informations.
[HandleProcessCorruptedStateExceptions] public AnimChannelInfo GetAnimChannelInfo(uint channel)
Parameters
Type Name Description uint channel Animation to get info of.
Returns
GetAnimChannelOccurrence
Returns the Occurrence related to a given AnimChannel.
[HandleProcessCorruptedStateExceptions] public uint GetAnimChannelOccurrence(uint channel)
Parameters
Type Name Description uint channel The channel.
Returns
GetAnimationComponentPropertyBinderLists
WARNING: this function is tagged as 'EXPERIMENTAL' packs all animation-related info in an object.
[HandleProcessCorruptedStateExceptions] public AnimPropertyBinderList GetAnimationComponentPropertyBinderLists(uint animationComponent)
Parameters
Type Name Description uint animationComponent Animation to get info of.
Returns
GetAnimationInfo
WARNING: this function is tagged as 'EXPERIMENTAL' packs all animation-related info in an object.
[HandleProcessCorruptedStateExceptions] public AnimationInfo GetAnimationInfo(uint animation)
Parameters
Type Name Description uint animation Animation to get info of.
Returns
GetAnimationPropertyBinderLists
WARNING: this function is tagged as 'EXPERIMENTAL' packs all animation-related info in an object.
[HandleProcessCorruptedStateExceptions] public AnimPropertyBinderList GetAnimationPropertyBinderLists(uint animation)
Parameters
Type Name Description uint animation Animation to get info of.
Returns
GetJointDefinition
Get joint definition from id.
[HandleProcessCorruptedStateExceptions] public JointDefinition GetJointDefinition(uint joint)
Parameters
Type Name Description uint joint Id of the joint.
Returns
GetJointDefinitions
Get joint definition from id.
[HandleProcessCorruptedStateExceptions] public JointDefinitionList GetJointDefinitions(JointList joints)
Parameters
Type Name Description JointList joints Ids of joints.
Returns
GetKeyframeParentAnimChannel
Returns the parent AnimChannel of a given Keyframe.
[HandleProcessCorruptedStateExceptions] public uint GetKeyframeParentAnimChannel(uint keyframe)
Parameters
Type Name Description uint keyframe The keyframe one wants the parent of.
Returns
GetKeyframes
Returns a list of all keyframes of a simple animChannel.
[HandleProcessCorruptedStateExceptions] public KeyframeList GetKeyframes(uint channel)
Parameters
Type Name Description uint channel The channel one wants to extract the keyframs from.
Returns
GetMainChannel
Returns the main AnimChannel of a given AnimChannel.
[HandleProcessCorruptedStateExceptions] public uint GetMainChannel(uint channel)
Parameters
Type Name Description uint channel The channel one wants the main of.
Returns
GetOccurrenceJoint
Returns the Joint assigned to an occurrence if any.
[HandleProcessCorruptedStateExceptions] public uint GetOccurrenceJoint(uint occurrence)
Parameters
Type Name Description uint occurrence The occurrence.
Returns
GetParentChannel
Returns (if exists) the parent AnimChannel of a given AnimChannel.
[HandleProcessCorruptedStateExceptions] public uint GetParentChannel(uint channel)
Parameters
Type Name Description uint channel The channel one wants the parent of.
Returns
GetSubChannel
Returns the subchannel of a given name from an AnimChannel.
[HandleProcessCorruptedStateExceptions] public uint GetSubChannel(uint channel, string name)
Parameters
Type Name Description uint channel The channel one wants the subchannel of. string name The name of the subchannel.
Returns
GetSubChannels
Returns all the sub channel of an AnimChannel.
[HandleProcessCorruptedStateExceptions] public AnimChannelList GetSubChannels(uint channel)
Parameters
Type Name Description uint channel The channel one wants the subchannel of.
Returns
LinkPropertyToAnimation
Creates a Binder in an Animation stack to animate an entity's property.
[HandleProcessCorruptedStateExceptions] public uint LinkPropertyToAnimation(uint animation, uint entity, string propertyName)
Parameters
Type Name Description uint animation The Animation stack where to put a animated property. uint entity The entity object to animate. string propertyName The name of the property to animate.
Returns
ListAnimations
List all Animations from the scene.
[HandleProcessCorruptedStateExceptions] public AnimationList ListAnimations()
Returns
ListMainChannels
List all main AnimChannel from a given Animation.
[HandleProcessCorruptedStateExceptions] public AnimChannelList ListMainChannels(uint animation)
Parameters
Type Name Description uint animation The Animation one wants to list the channels from.
Returns
MakeDefaultKeyframe
Creates keyframes with the default values of the channel at time 0.
[HandleProcessCorruptedStateExceptions] public void MakeDefaultKeyframe(uint channel)
Parameters
Type Name Description uint channel The channel.
MoveAnimation
Moving animation.
[HandleProcessCorruptedStateExceptions] public void MoveAnimation(uint animation, uint target, uint newParent, ulong interval)
Parameters
Type Name Description uint animation The Animation. uint target The target occurrence. uint newParent The new parent occurrence. ulong interval The interval.
RemoveKeyframe
Removes a keyframe in the curve.
[HandleProcessCorruptedStateExceptions] public void RemoveKeyframe(uint channel, ulong time)
Parameters
Type Name Description uint channel The channel one wants to remove a keyframe from. ulong time The time.
UnlinkPropertyToAnimation
Unlinks a binder.
[HandleProcessCorruptedStateExceptions] public void UnlinkPropertyToAnimation(uint animation, uint entity, string propertyName)
Parameters
Type Name Description uint animation The Animation stack where to put a animated property. uint entity The entity object to animate. string propertyName The name of the property to animate.
AddAnimationAddedCallback
public uint AddAnimationAddedCallback(SceneInterface.AnimationAddedDelegate callback, IntPtr userData)
Parameters
Returns
RemoveAnimationAddedCallback
public void RemoveAnimationAddedCallback(uint id)
Parameters
Type Name Description uint id
AddAnimationChangedCallback
public uint AddAnimationChangedCallback(SceneInterface.AnimationChangedDelegate callback, IntPtr userData)
Parameters
Returns
RemoveAnimationChangedCallback
public void RemoveAnimationChangedCallback(uint id)
Parameters
Type Name Description uint id
AddAnimationClearedCallback
public uint AddAnimationClearedCallback(SceneInterface.AnimationClearedDelegate callback, IntPtr userData)
Parameters
Returns
RemoveAnimationClearedCallback
public void RemoveAnimationClearedCallback(uint id)
Parameters
Type Name Description uint id
AddAnimationRemovedCallback
public uint AddAnimationRemovedCallback(SceneInterface.AnimationRemovedDelegate callback, IntPtr userData)
Parameters
Returns
RemoveAnimationRemovedCallback
public void RemoveAnimationRemovedCallback(uint id)
Parameters
Type Name Description uint id
GetBRepInfos
Get BRep info.
[HandleProcessCorruptedStateExceptions] public GetBRepInfosReturn GetBRepInfos()
Returns
GetTessellationInfos
Get tessellation info.
[HandleProcessCorruptedStateExceptions] public GetTessellationInfosReturn GetTessellationInfos(uint root = 0)
Parameters
Type Name Description uint root Occurrence tree root.
Returns
GetTessellationParameters
Get tessellation parameters.
[HandleProcessCorruptedStateExceptions] public GetTessellationParametersReturn GetTessellationParameters(uint part)
Parameters
Type Name Description uint part The tessellated part.
Returns
Print
Print an occurrence tree on log.
[HandleProcessCorruptedStateExceptions] public void Print(uint root = 0)
Parameters
Type Name Description uint root Occurrence tree root.
AddFilterToLibrary
Add a filter to the filters library.
[HandleProcessCorruptedStateExceptions] public uint AddFilterToLibrary(string name, string expr)
Parameters
Type Name Description string name Name of the filter. string expr The filter expression.
Returns
EvaluateExpression
Evaluate the given filter expression.
[HandleProcessCorruptedStateExceptions] public string EvaluateExpression(string filter)
Parameters
Type Name Description string filter The filter expression.
Returns
EvaluateExpressionOnOccurrences
Evaluate the given filter expression on all occurrences under the given occurrence and returns the result.
[HandleProcessCorruptedStateExceptions] public StringList EvaluateExpressionOnOccurrences(OccurrenceList occurrences, string filter)
Parameters
Type Name Description OccurrenceList occurrences Occurrences on which to evaluate the expression. string filter The filter expression.
Returns
EvaluateExpressionOnSubTree
Evaluate the given filter expression on all occurrences under the given occurrence and returns the result.
[HandleProcessCorruptedStateExceptions] public EvaluateExpressionOnSubTreeReturn EvaluateExpressionOnSubTree(string filter, uint fromOcc = 0)
Parameters
Type Name Description string filter The filter expression. uint fromOcc Source occurrence of the recursion.
Returns
ExportFilterLibrary
Export filters from a given file.
[HandleProcessCorruptedStateExceptions] public void ExportFilterLibrary(string file)
Parameters
Type Name Description string file File path to export.
FindFilterByName
Returns the first filter in the filter library with the given name.
[HandleProcessCorruptedStateExceptions] public Filter FindFilterByName(string name)
Parameters
Type Name Description string name Name of the filter to retrieve (case sensitive).
Returns
GetFilterExpression
Returns the filter expression (string) from a filter id stored in the library.
[HandleProcessCorruptedStateExceptions] public string GetFilterExpression(uint filterId)
Parameters
Type Name Description uint filterId Identifier of the filter to fetch.
Returns
GetFilterFromLibrary
Retrieve a filter from the library with its identifier.
[HandleProcessCorruptedStateExceptions] public Filter GetFilterFromLibrary(uint filterId)
Parameters
Type Name Description uint filterId Identifier of the filter to retrieve.
Returns
GetFilteredOccurrences
Recursively get all the occurrences validating the given filter expression.
[HandleProcessCorruptedStateExceptions] public OccurrenceList GetFilteredOccurrences(string filter, uint fromOcc = 0)
Parameters
Type Name Description string filter The filter expression. uint fromOcc Source occurrence of the recursion.
Returns
ImportFilterLibrary
Import filters from a given file.
[HandleProcessCorruptedStateExceptions] public void ImportFilterLibrary(string file)
Parameters
Type Name Description string file File containing the filter library.
ListFilterLibrary
Returns all the filter stored in the filter library.
[HandleProcessCorruptedStateExceptions] public FilterList ListFilterLibrary()
Returns
RemoveFilterFromLibrary
Remove a filter from the filters library.
[HandleProcessCorruptedStateExceptions] public void RemoveFilterFromLibrary(uint filterId)
Parameters
Type Name Description uint filterId Identifier of the filter to remove.
GetIsolatedOccurrences
Get Occurrences currently being isolated.
[HandleProcessCorruptedStateExceptions] public OccurrenceList GetIsolatedOccurrences()
Returns
IsIsolated
Is in isolate mode.
[HandleProcessCorruptedStateExceptions] public bool IsIsolated()
Returns
Isolate
Enter isolate mode by isolating a subset of the scene for process, export, viewer, ...
[HandleProcessCorruptedStateExceptions] public void Isolate(OccurrenceList occurrences)
Parameters
Unisolate
Exit the isolate mode.
[HandleProcessCorruptedStateExceptions] public void Unisolate()
AddIsolateBeganCallback
public uint AddIsolateBeganCallback(SceneInterface.IsolateBeganDelegate callback, IntPtr userData)
Parameters
Returns
RemoveIsolateBeganCallback
public void RemoveIsolateBeganCallback(uint id)
Parameters
Type Name Description uint id
AddIsolateEndedCallback
public uint AddIsolateEndedCallback(SceneInterface.IsolateEndedDelegate callback, IntPtr userData)
Parameters
Returns
RemoveIsolateEndedCallback
public void RemoveIsolateEndedCallback(uint id)
Parameters
Type Name Description uint id
SceneReadLock
Lock the scene to prevent modification while allowing reading from other threads.
[HandleProcessCorruptedStateExceptions] public void SceneReadLock()
SceneReadUnlock
Unlock the scene for modification.
[HandleProcessCorruptedStateExceptions] public void SceneReadUnlock()
SceneTryReadLock
Try lock the scene to prevent modification while allowing reading from other threads.
[HandleProcessCorruptedStateExceptions] public bool SceneTryReadLock()
Returns
SceneWriteLock
Lock the scene from being read/write by other threads.
[HandleProcessCorruptedStateExceptions] public void SceneWriteLock()
SceneWriteUnlock
Unlock the scene for modification and reading.
[HandleProcessCorruptedStateExceptions] public void SceneWriteUnlock()
FindPartOccurrencesWithUnstitchedOpenShells
Find Part occurrences containing multiple unstitched openShell entities.
[HandleProcessCorruptedStateExceptions] public OccurrenceList FindPartOccurrencesWithUnstitchedOpenShells(uint root)
Parameters
Type Name Description uint root Root occurrence.
Returns
MergeOccurrencesByTreeLevel
Merge all parts over maxLevel level.
[HandleProcessCorruptedStateExceptions] public void MergeOccurrencesByTreeLevel(OccurrenceList roots, int maxLevel, MergeHiddenPartsMode mergeHiddenPartsMode = MergeHiddenPartsMode.MergeSeparately)
Parameters
Type Name Description OccurrenceList roots Roots occurrences for the process. int maxLevel Maximum tree level. MergeHiddenPartsMode mergeHiddenPartsMode Hidden parts handling mode, Destroy them, make visible or merge separately.
MergePartOccurrences
Merge a set of parts.
[HandleProcessCorruptedStateExceptions] public OccurrenceList MergePartOccurrences(OccurrenceList partOccurrences, MergeHiddenPartsMode mergeHiddenPartsMode = MergeHiddenPartsMode.MergeSeparately)
Parameters
Type Name Description OccurrenceList partOccurrences Occurrence of the parts to merge. MergeHiddenPartsMode mergeHiddenPartsMode Hidden parts handling mode, Destroy them, make visible or merge separately.
Returns
MergePartOccurrencesByAssemblies
Merge all parts under each assembly together (grouped by shape type: BRep, Tesselled surface, Joint).
[HandleProcessCorruptedStateExceptions] public void MergePartOccurrencesByAssemblies(OccurrenceList roots = null, MergeHiddenPartsMode mergeHiddenPartsMode = MergeHiddenPartsMode.MergeSeparately)
Parameters
Type Name Description OccurrenceList roots Roots occurrences for the process (will not be removed). MergeHiddenPartsMode mergeHiddenPartsMode Hidden parts handling mode, Destroy them, make visible or merge separately.
MergePartOccurrencesByFinalAssemblies
Merge all final-level parts (ie occurrences having for children exclusively occurrences with part components) under each assembly together (grouped by shape type: BRep, Tesselled surface, Joint).
[HandleProcessCorruptedStateExceptions] public void MergePartOccurrencesByFinalAssemblies(OccurrenceList roots = null, MergeHiddenPartsMode mergeHiddenPartsMode = MergeHiddenPartsMode.Destroy, bool CollapseToParent = true)
Parameters
Type Name Description OccurrenceList roots Roots occurrences for the process (will not be removed). MergeHiddenPartsMode mergeHiddenPartsMode Hidden parts handling mode, Destroy them, make visible or merge separately. bool CollapseToParent If true, final level unique merged part will replace it's parent.
MergePartOccurrencesByMaterials
Merge a set of parts by materials.
[HandleProcessCorruptedStateExceptions] public OccurrenceList MergePartOccurrencesByMaterials(OccurrenceList partOccurrences, bool mergeNoMaterials = true, MergeHiddenPartsMode mergeHiddenPartsMode = MergeHiddenPartsMode.MergeSeparately, bool combineMeshes = true)
Parameters
Type Name Description OccurrenceList partOccurrences Occurrence of the parts to merge. bool mergeNoMaterials If true, merge all parts with no active material together, else do not merge them. MergeHiddenPartsMode mergeHiddenPartsMode Hidden parts handling mode, Destroy them, make visible or merge separately. bool combineMeshes If true, explode and remerge the input parts by visible materials.
Returns
MergePartOccurrencesByName
Merge all parts by occurrences names.
[HandleProcessCorruptedStateExceptions] public void MergePartOccurrencesByName(uint root = 0, MergeHiddenPartsMode mergeHiddenPartsMode = MergeHiddenPartsMode.MergeSeparately)
Parameters
Type Name Description uint root Root occurrence of the subtree to process. MergeHiddenPartsMode mergeHiddenPartsMode Hidden parts handling mode, Destroy them, make visible or merge separately.
MergePartOccurrencesByRegions
Merge all parts within the same area.
[HandleProcessCorruptedStateExceptions] public OccurrenceList MergePartOccurrencesByRegions(OccurrenceList roots, MergeByRegionsStrategy mergeBy, MergeStrategy strategy)
Parameters
Returns
MergePartOccurrencesWithSingleOpenShellByAssemblies
Merge Part occurrences containing a single openShell entity, by assemblies.
[HandleProcessCorruptedStateExceptions] public OccurrenceList MergePartOccurrencesWithSingleOpenShellByAssemblies(uint root)
Parameters
Type Name Description uint root Root of the main assembly to merge.
Returns
ApplyTransformation
Apply a transformation to the local matrix of an occurrence.
[HandleProcessCorruptedStateExceptions] public void ApplyTransformation(uint occurrence, Matrix4 matrix)
Parameters
Type Name Description uint occurrence Occurrence to apply the matrix on. Matrix4 matrix Transformation to matrix.
CreateSymmetry
Create symmetries from selection.
[HandleProcessCorruptedStateExceptions] public void CreateSymmetry(OccurrenceList occurrences, AxisPlane plane)
Parameters
Rotate
Modify the local matrix of the scene node to apply a rotation.
[HandleProcessCorruptedStateExceptions] public void Rotate(uint occurrence, Point3 axis, double angle)
Parameters
Type Name Description uint occurrence Occurrence to rotate. Point3 axis Axis of rotation. double angle Angle of rotation.
SetLocalMatrices
Change the local matrices on a list of occurrences.
[HandleProcessCorruptedStateExceptions] public void SetLocalMatrices(OccurrenceList occurrencesIds, Matrix4List matrices, uint batchSize)
Parameters
Type Name Description OccurrenceList occurrencesIds List of occurrences on which to set the local matrices. Matrix4List matrices The occurrences' new local matrices. uint batchSize Number of matrices to be set per thread.
SetLocalMatrix
Change the local matrix on an occurrence.
[HandleProcessCorruptedStateExceptions] public void SetLocalMatrix(uint occurrence, Matrix4 matrix)
Parameters
Type Name Description uint occurrence Occurrence to set the local matrix. Matrix4 matrix The new occurrence local matrix.
GetPartMesh
Return the mesh of the TesselatedShape.
[HandleProcessCorruptedStateExceptions] public uint GetPartMesh(uint part)
Parameters
Type Name Description uint part The part component.
Returns
GetPartModel
Return the model of the BRepShape.
[HandleProcessCorruptedStateExceptions] public uint GetPartModel(uint part)
Parameters
Type Name Description uint part The part component.
Returns
GetPartsMeshes
Return the meshes of the TesselatedShape for each given parts if any.
[HandleProcessCorruptedStateExceptions] public MeshList GetPartsMeshes(PartList parts)
Parameters
Type Name Description PartList parts The list of part component.
Returns
GetPartsModels
Return the models of the BRepShape for each given parts if any.
[HandleProcessCorruptedStateExceptions] public ModelList GetPartsModels(PartList parts)
Parameters
Type Name Description PartList parts The list of part component.
Returns
GetPartsTransforms
Returns the transform matrix of each given parts.
[HandleProcessCorruptedStateExceptions] public Matrix4List GetPartsTransforms(PartList parts)
Parameters
Type Name Description PartList parts The parts to retrieve transform.
Returns
GetPartsTransformsIndexed
Returns the transform matrix of each given parts (indexed mode).
[HandleProcessCorruptedStateExceptions] public GetPartsTransformsIndexedReturn GetPartsTransformsIndexed(PartList parts)
Parameters
Type Name Description PartList parts The parts to retrieve transform.
Returns
SetPartMesh
Add a mesh to a part (create a TessellatedShape on the part).
[HandleProcessCorruptedStateExceptions] public void SetPartMesh(uint part, uint mesh)
Parameters
Type Name Description uint part The part component. uint mesh The mesh to add to the part.
SetPartModel
Add a model to a part (create a BRepShape on the part).
[HandleProcessCorruptedStateExceptions] public void SetPartModel(uint part, uint model)
Parameters
Type Name Description uint part The part component. uint model The model to add to the part.
SetPartsTransforms
Set the transform matrix of each given parts.
[HandleProcessCorruptedStateExceptions] public void SetPartsTransforms(PartList parts, Matrix4List transforms)
Parameters
Type Name Description PartList parts The parts to retrieve transform. Matrix4List transforms The transform matrix of each part.
SetPartsTransformsIndexed
Set the transform matrix of each given parts (indexed mode).
[HandleProcessCorruptedStateExceptions] public void SetPartsTransformsIndexed(PartList parts, IntList indices, Matrix4List transforms)
Parameters
Type Name Description PartList parts The parts to retrieve transform. IntList indices The transform matrix index for each parts. Matrix4List transforms The list of transform matrices.
GetPartialLoadingStatus
Get the current status of a partial loading component.
[HandleProcessCorruptedStateExceptions] public PartialLoad_Status GetPartialLoadingStatus(uint component)
Parameters
Type Name Description uint component Referenced Data component.
Returns
SetReferencedDataComponentParent
Defines which referenced data is parent to the given component.
[HandleProcessCorruptedStateExceptions] public void SetReferencedDataComponentParent(uint component, uint parent)
Parameters
Type Name Description uint component The referenced data component to alter. uint parent The parent.
SetReferencedDataComponentPath
Defines which path the referenced data is at.
[HandleProcessCorruptedStateExceptions] public void SetReferencedDataComponentPath(uint component, string filePath)
Parameters
Type Name Description uint component The referenced data component to alter. string filePath The filepath.
AlignPivotPointToWorld
Re-orient the Pivot Point straight to world origin (the grid).
[HandleProcessCorruptedStateExceptions] public void AlignPivotPointToWorld(OccurrenceList occurrences, bool applyToChildren)
Parameters
Type Name Description OccurrenceList occurrences The occurrences to modify. bool applyToChildren 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).
[HandleProcessCorruptedStateExceptions] public void MovePivotPointToOccurrenceCenter(OccurrenceList occurrences, bool applyToChildren)
Parameters
Type Name Description OccurrenceList occurrences Occurrences (or the roots occurrences if recursively=True). bool applyToChildren 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).
[HandleProcessCorruptedStateExceptions] public void MovePivotPointToOrigin(uint occurrence, bool applyToChildren)
Parameters
Type Name Description uint occurrence The occurrence (or the root occurrence if recursively=True). bool applyToChildren 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.
[HandleProcessCorruptedStateExceptions] public void MovePivotPointToSelectionCenter(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences 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).
[HandleProcessCorruptedStateExceptions] public void MovePivotPointToTargetedOccurrenceCenter(OccurrenceList occurrences, uint target, bool applyToChildren)
Parameters
Type Name Description OccurrenceList occurrences The occurrence (or the root occurrence if recursively=True). uint target The target occurrence. bool applyToChildren 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).
[HandleProcessCorruptedStateExceptions] public void SetPivotOnly(uint occurrence, Matrix4 pivot)
Parameters
Type Name Description uint occurrence The occurrence to move the pivot. Matrix4 pivot The new transformation matrix for the occurrence (pivot).
AddAnnotationGroup
Add a Annotation Group to the pmi component.
[HandleProcessCorruptedStateExceptions] public uint AddAnnotationGroup(uint component, string name)
Parameters
Type Name Description uint component Component to add the Annotation Group. string name Name of the annotation group.
Returns
AddMeshToAnnotation
Add a mesh and its material to a annotation.
[HandleProcessCorruptedStateExceptions] public void AddMeshToAnnotation(uint annotation, uint material, uint staticmesh)
Parameters
ConvertPMIToOccurrences
Convert each PMI component into a set of occurrences with mesh geometries.
[HandleProcessCorruptedStateExceptions] public void ConvertPMIToOccurrences(OccurrenceList occurrences, bool convertVisibility = false)
Parameters
Type Name Description OccurrenceList occurrences Occurrence selection. bool convertVisibility If True, the visibility will be converted (useful to select a specific view/variant), else all occurrences will be visible.
CreateAnnotationFromDefinition
Create Annotation from definition.
[HandleProcessCorruptedStateExceptions] public uint CreateAnnotationFromDefinition(AnnotationDefinition definition)
Parameters
Returns
CreateOccurrenceFromAnnotation
Convert a single annotation on an occurrence into an occurrence with mesh geometry.
[HandleProcessCorruptedStateExceptions] public uint CreateOccurrenceFromAnnotation(uint annotation, bool convertVisibility = false)
Parameters
Type Name Description uint annotation Annotation that shall be converted to an occurrence with mesh geometry. bool convertVisibility If True, the visibility will be converted (useful to select a specific view/variant), else all occurrences will be visible.
Returns
CreateProductView
Create a productview from definition.
[HandleProcessCorruptedStateExceptions] public uint CreateProductView(ProductViewDefinition definition)
Parameters
Returns
GetAnnotationDefinition
Get definition of given annotation.
[HandleProcessCorruptedStateExceptions] public AnnotationDefinition GetAnnotationDefinition(uint annotation)
Parameters
Type Name Description uint annotation
Returns
GetAnnotationGroups
Returns the list of the AnnotationGroup from a PMIComponent.
[HandleProcessCorruptedStateExceptions] public AnnotationGroupList GetAnnotationGroups(uint pmiComponent)
Parameters
Type Name Description uint pmiComponent The pmi component.
Returns
GetAnnotationListAABB
Get the AABB of the annotation list.
[HandleProcessCorruptedStateExceptions] public AABB GetAnnotationListAABB(AnnotationList annotationList)
Parameters
Returns
GetAnnotations
Returns the list of the Annotation from a AnnotationGroup.
[HandleProcessCorruptedStateExceptions] public AnnotationList GetAnnotations(uint group)
Parameters
Type Name Description uint group The AnnotationGroup.
Returns
GetOccurrenceAnnotationDefinitions
Get all annotations definition of given occurrence.
[HandleProcessCorruptedStateExceptions] public AnnotationDefinitionList GetOccurrenceAnnotationDefinitions(uint occurrence)
Parameters
Type Name Description uint occurrence
Returns
GetProductViewDefinition
Get productview definition.
[HandleProcessCorruptedStateExceptions] public ProductViewDefinition GetProductViewDefinition(uint view)
Parameters
Type Name Description uint view The product view.
Returns
GetProductViewDefinitions
Get all productviews definitions.
[HandleProcessCorruptedStateExceptions] public ProductViewDefinitionList GetProductViewDefinitions()
Returns
SetAnnotationToGroup
Set Annotation to a Annotation Group.
[HandleProcessCorruptedStateExceptions] public void SetAnnotationToGroup(uint annotation, uint group)
Parameters
Type Name Description uint annotation uint group
CleanInstances
Clean prototypes and instances (lonely instances, overriding their prototypes hierarchies...).
[HandleProcessCorruptedStateExceptions] public void CleanInstances(bool removeUselessInstances, bool removeHierarchyOverridingInstances, uint occurrence = 0)
Parameters
Type Name Description bool removeUselessInstances Remove instances where they are not needed (prototype referenced once, ...). bool removeHierarchyOverridingInstances Remove instances overriding their prototypes sub-hierarchies. uint occurrence Root occurrence for the process.
GetDirectInstances
Returns all the occurrences prototyping the given occurrence.
[HandleProcessCorruptedStateExceptions] public OccurrenceList GetDirectInstances(uint prototype)
Parameters
Type Name Description uint prototype The prototype occurrence.
Returns
GetFinalPrototype
Returns the final prototype of an occurrence (ie. The very first one of prototype tree).
[HandleProcessCorruptedStateExceptions] public uint GetFinalPrototype(uint occurrence)
Parameters
Type Name Description uint occurrence The occurrence.
Returns
GetInstances
Get occurrences sharing the same prototype as the given one.
[HandleProcessCorruptedStateExceptions] public OccurrenceList GetInstances(uint occurrence)
Parameters
Type Name Description uint occurrence Reference part occurrence.
Returns
GetPrototype
Returns the prototype of an occurrence.
[HandleProcessCorruptedStateExceptions] public uint GetPrototype(uint occurrence)
Parameters
Type Name Description uint occurrence The occurrence.
Returns
GetPrototypes
Returns the prototype for each given occurrence.
[HandleProcessCorruptedStateExceptions] public OccurrenceList GetPrototypes(OccurrenceList occurrences)
Parameters
Returns
PrototypeSubTree
Create occurrences that prototype the given occurrence and all its subtree.
[HandleProcessCorruptedStateExceptions] public uint PrototypeSubTree(uint prototype)
Parameters
Type Name Description uint prototype The root occurrence of the sub-tree to prototype.
Returns
SetPrototype
Sets the prototype of an occurrence.
[HandleProcessCorruptedStateExceptions] public void SetPrototype(uint occurrence, uint prototype)
Parameters
Type Name Description uint occurrence The occurrence. uint prototype The prototype.
SetPrototypes
Sets the prototype for each given occurrence.
[HandleProcessCorruptedStateExceptions] public void SetPrototypes(OccurrenceList occurrences, OccurrenceList prototypes)
Parameters
UpdateChildrenPrototypes
Update children prototypes of the given occurrence.
[HandleProcessCorruptedStateExceptions] public void UpdateChildrenPrototypes(uint occurrence)
Parameters
Type Name Description uint occurrence The occurrence.
ClearSelection
Clear the current selection.
[HandleProcessCorruptedStateExceptions] public void ClearSelection(uint selectionId = 1)
Parameters
Type Name Description uint selectionId ID of the selection to clear, or current selection (id = 1) will be cleared.
CreateSelectionSnapshot
Get the ID of a copy of the current selection to use it later.
[HandleProcessCorruptedStateExceptions] public uint CreateSelectionSnapshot()
Returns
DeleteSelection
Delete all selected occurrences, and/or sub-occurrence elements.
[HandleProcessCorruptedStateExceptions] public void DeleteSelection(uint selectionId = 1)
Parameters
Type Name Description uint selectionId ID of the selection to delete, or current selection (id = 1) will be deleted.
DeleteSelectionSnapshot
Delete a selection snapshot using its id.
[HandleProcessCorruptedStateExceptions] public void DeleteSelectionSnapshot(uint selectionId)
Parameters
Type Name Description uint selectionId Selection ID of the snapshot to delete.
GetSelectedOccurrences
Returns all the selected occurrences.
[HandleProcessCorruptedStateExceptions] public OccurrenceList GetSelectedOccurrences(bool keepAncestors = false, uint selectionId = 1)
Parameters
Type Name Description bool keepAncestors If True, occurrences with ancestors selected will be remove from the list. uint selectionId ID of the selection to use, or current selection (id = 1) will be used.
Returns
GetSelectedPolygonCount
Returns the number of selected polygons.
[HandleProcessCorruptedStateExceptions] public ulong GetSelectedPolygonCount(uint selectionId = 1)
Parameters
Type Name Description uint selectionId ID of the selection to use, or current selection (id = 1) will be used.
Returns
InvertOrientationSelection
Invert the orientation of each selected item (occurrences and/or sub-occurrence elements.
[HandleProcessCorruptedStateExceptions] public void InvertOrientationSelection(uint selectionId = 1)
Parameters
Type Name Description uint selectionId ID of the selection to invert, or current selection (id = 1) will be inverted.
InvertSelect
Invert occurrences to selection.
[HandleProcessCorruptedStateExceptions] public void InvertSelect(OccurrenceList occurrence, uint selectionId = 1)
Parameters
Type Name Description OccurrenceList occurrence Occurrences to invert from the selection. uint selectionId ID of the selection to use, or current selection (id = 1) will be used.
InvertSelection
Replace the selection by all unselected part occurrences.
[HandleProcessCorruptedStateExceptions] public void InvertSelection(uint selectionId = 1)
Parameters
Type Name Description uint selectionId ID of the selection to invert, or current selection (id = 1) will be inverted.
Select
Add occurrences to selection.
[HandleProcessCorruptedStateExceptions] public void Select(OccurrenceList occurrences, uint selectionId = 1)
Parameters
Type Name Description OccurrenceList occurrences Occurrences to add to the selection. uint selectionId ID of the selection to use, or current selection (id = 1) will be used.
SeparateSelection
Separate all polygons from their original parts into a new one or new ones depending on the parameters.
[HandleProcessCorruptedStateExceptions] public OccurrenceList SeparateSelection(bool createSingleOccurrence = true, uint selectionId = 1)
Parameters
Type Name Description bool createSingleOccurrence Only create a single occurrence, or create occurrences corresponding to every part containing selected elements, at the same place in the hierarchical tree. uint selectionId ID of the selection to separate, or current selection (id = 1) will be separated.
Returns
Unselect
Remove occurrences to selection.
[HandleProcessCorruptedStateExceptions] public void Unselect(OccurrenceList occurrence, uint selectionId = 1)
Parameters
Type Name Description OccurrenceList occurrence Occurrences to remove from the selection. uint selectionId ID of the selection to use, or current selection (id = 1) will be used.
AddSelectionChangedCallback
public uint AddSelectionChangedCallback(SceneInterface.SelectionChangedDelegate callback, IntPtr userData)
Parameters
Returns
RemoveSelectionChangedCallback
public void RemoveSelectionChangedCallback(uint id)
Parameters
Type Name Description uint id
AddVariantChangedCallback
public uint AddVariantChangedCallback(SceneInterface.VariantChangedDelegate callback, IntPtr userData)
Parameters
Returns
RemoveVariantChangedCallback
public void RemoveVariantChangedCallback(uint id)
Parameters
Type Name Description uint id
Compress
Compress a sub-tree by removing occurrence containing only one Child or empty, and by removing useless instances (see removeUselessInstances).
[HandleProcessCorruptedStateExceptions] public uint Compress(uint occurrence = 0)
Parameters
Type Name Description uint occurrence Root occurrence for the process.
Returns
ConvertToOldSchoolVisibility
Modify the visible properties of the sub-tree to look like old school visibility (only hidden/inherited).
[HandleProcessCorruptedStateExceptions] public void ConvertToOldSchoolVisibility(uint root = 0)
Parameters
Type Name Description uint root Root occurrence.
GetHiddenPartOccurrences
Get hidden part occurrences.
[HandleProcessCorruptedStateExceptions] public OccurrenceList GetHiddenPartOccurrences(OccurrenceList roots = null)
Parameters
Type Name Description OccurrenceList roots Roots occurrences for the process.
Returns
GetVisiblePartOccurrences
Get visible part occurrences.
[HandleProcessCorruptedStateExceptions] public OccurrenceList GetVisiblePartOccurrences(OccurrenceList roots = null)
Parameters
Type Name Description OccurrenceList roots Roots occurrences for the process.
Returns
MakeInstanceUnique
Singularize all instances on the sub-tree of an occurrence.
[HandleProcessCorruptedStateExceptions] public void MakeInstanceUnique(OccurrenceList occurrences = null, bool keepOnlyPartInstances = false)
Parameters
Type Name Description OccurrenceList occurrences Root occurrence for the process. bool keepOnlyPartInstances If true, instances of part will not be singularized.
Rake
Set the same parent to all descending parts (all parts will be singularized).
[HandleProcessCorruptedStateExceptions] public void Rake(uint occurrence = 0, bool keepInstances = false)
Parameters
Type Name Description uint occurrence Root occurrence for the process. bool keepInstances If false, the part will be singularized.
RemoveSymmetryMatrices
Remove symmetry matrices (apply matrices on geometries on nodes under an occurrence with a symmetry matrix.
[HandleProcessCorruptedStateExceptions] public void RemoveSymmetryMatrices(uint occurrence = 0)
Parameters
Type Name Description uint occurrence Root occurrence for the process.
ResetPartTransform
Set all part transformation matrices to identity in a sub-tree, transformation will be applied to the shapes.
[HandleProcessCorruptedStateExceptions] public void ResetPartTransform(uint root = 0)
Parameters
Type Name Description uint root Root occurrence for the process.
ResetTransform
Set all transformation matrices to identity in a sub-tree.
[HandleProcessCorruptedStateExceptions] public void ResetTransform(uint root, bool recursive = true, bool keepInstantiation = true, bool keepPartTransform = false)
Parameters
Type Name Description uint root Root occurrence for the process. bool recursive If False, transformation will be applied only on the root and its components. bool keepInstantiation If False, all occurrences will be singularized. bool keepPartTransform If False, transformation will be applied to the shapes (BRepShape points or TessellatedShape vertices).
CreateRayProber
Creates a ray prober.
[HandleProcessCorruptedStateExceptions] public uint CreateRayProber()
Returns
CreateSphereProber
Creates a sphere prober.
[HandleProcessCorruptedStateExceptions] public uint CreateSphereProber()
Returns
RayCast
[HandleProcessCorruptedStateExceptions] public RayHit RayCast(Ray ray, uint root)
Parameters
Type Name Description Ray ray The ray to cast. uint root The root occurrence to cast from.
Returns
RayCastAll
[HandleProcessCorruptedStateExceptions] public RayHitList RayCastAll(Ray ray, uint root)
Parameters
Type Name Description Ray ray The ray to cast. uint root The root occurrence to cast from.
Returns
UpdateRayProber
Updates the designed ray prober.
[HandleProcessCorruptedStateExceptions] public void UpdateRayProber(uint proberID, Ray ray)
Parameters
Type Name Description uint proberID The ray prober Id. Ray ray Update the prober's ray values.
UpdateSphereProber
Updates the designed sphere prober.
[HandleProcessCorruptedStateExceptions] public void UpdateSphereProber(uint proberID, Point3 sphereCenter, double sphereRadius)
Parameters
Type Name Description uint proberID The sphere prober Id. Point3 sphereCenter The new prober center. double sphereRadius The new prober radius.
AddonRayProbeCallback
public uint AddonRayProbeCallback(SceneInterface.onRayProbeDelegate callback, IntPtr userData)
Parameters
Returns
RemoveonRayProbeCallback
public void RemoveonRayProbeCallback(uint id)
Parameters
Type Name Description uint id
AddonSphereProbeCallback
public uint AddonSphereProbeCallback(SceneInterface.onSphereProbeDelegate callback, IntPtr userData)
Parameters
Returns
RemoveonSphereProbeCallback
public void RemoveonSphereProbeCallback(uint id)
Parameters
Type Name Description uint id
GetMultipleOccurrenceUserData
Batch version of getOccurrenceUserData.
[HandleProcessCorruptedStateExceptions] public PtrList GetMultipleOccurrenceUserData(uint userDataId, OccurrenceList occurrences)
Parameters
Type Name Description uint userDataId UserData identifier provided by subscribeToOccurrenceUserData. OccurrenceList occurrences Occurrences that store the user data.
Returns
GetOccurrenceUserData
Set or replace a userdata stored on an occurrence.
[HandleProcessCorruptedStateExceptions] public IntPtr GetOccurrenceUserData(uint userDataId, uint occurrence)
Parameters
Type Name Description uint userDataId UserData identifier provided by subscribeToOccurrenceUserData. uint occurrence Occurrence that store the user data.
Returns
HasMultipleOccurrenceUserData
Batch version of hasOccurrenceUserData.
[HandleProcessCorruptedStateExceptions] public BoolList HasMultipleOccurrenceUserData(uint userDataId, OccurrenceList occurrences)
Parameters
Type Name Description uint userDataId UserData identifier provided by subscribeToOccurrenceUserData. OccurrenceList occurrences Occurrences that potentially store the user data.
Returns
HasOccurrenceUserData
Set or replace a userdata stored on an occurrence.
[HandleProcessCorruptedStateExceptions] public bool HasOccurrenceUserData(uint userDataId, uint occurrence)
Parameters
Type Name Description uint userDataId UserData identifier provided by subscribeToOccurrenceUserData. uint occurrence Occurrence that potentially store the user data.
Returns
SetMultipleOccurrenceUserData
Batch version of setOccurrenceUserData.
[HandleProcessCorruptedStateExceptions] public void SetMultipleOccurrenceUserData(uint userDataId, OccurrenceList occurrences, PtrList userDataList)
Parameters
Type Name Description uint userDataId UserData identifier provided by subscribeToOccurrenceUserData. OccurrenceList occurrences Occurrences that will store the user data. PtrList userDataList User data to store on each occurrence.
SetOccurrenceUserData
Set or replace a userdata stored on an occurrence.
[HandleProcessCorruptedStateExceptions] public void SetOccurrenceUserData(uint userDataId, uint occurrence, IntPtr userData)
Parameters
Type Name Description uint userDataId UserData identifier provided by subscribeToOccurrenceUserData. uint occurrence Occurrence that will store the user data. IntPtr userData User data to store in the given occurrence.
SubscribeToOccurrenceUserData
Subscribe to occurrence user data. multiple different userdata can be stored on the same occurrences if subscribeToOccurrenceUserData is called multiple times.
[HandleProcessCorruptedStateExceptions] public uint SubscribeToOccurrenceUserData()
Returns
UnsetMultipleOccurrenceUserData
Batch version of unsetOccurrenceUserData.
[HandleProcessCorruptedStateExceptions] public void UnsetMultipleOccurrenceUserData(uint userDataId, OccurrenceList occurrences)
Parameters
Type Name Description uint userDataId UserData identifier provided by subscribeToOccurrenceUserData. OccurrenceList occurrences Occurrences that will store the user data.
UnsetOccurrenceUserData
Unset the userdata stored on an occurrence.
[HandleProcessCorruptedStateExceptions] public void UnsetOccurrenceUserData(uint userDataId, uint occurrence)
Parameters
Type Name Description uint userDataId UserData identifier provided by subscribeToOccurrenceUserData. uint occurrence Occurrence that will store the user data.
UnsubscribeFromOccurrenceUserData
[HandleProcessCorruptedStateExceptions] public void UnsubscribeFromOccurrenceUserData(uint userDataId)
Parameters
Type Name Description uint userDataId UserData identifier to unsubscribe.
AddVariant
Create a new variant.
[HandleProcessCorruptedStateExceptions] public uint AddVariant(string name)
Parameters
Type Name Description string name The name of the new variant.
Returns
DuplicateVariant
Create a new variant which is a copy of an existing variant.
[HandleProcessCorruptedStateExceptions] public uint DuplicateVariant(uint variant, string name)
Parameters
Type Name Description uint variant The variant to duplicated. string name Name of the new variant.
Returns
EndModifyAllVariants
Call this function to disable the modifications of all variants at the same time.
[HandleProcessCorruptedStateExceptions] public void EndModifyAllVariants()
GetVariantComponentsDefinitions
Returns the definitions of multiple variant components.
[HandleProcessCorruptedStateExceptions] public VariantDefinitionListList GetVariantComponentsDefinitions(VariantComponentList variantComponents)
Parameters
Type Name Description VariantComponentList variantComponents The list of variant components to retrieve definitions.
Returns
GetVariantTree
Get the alternative tree used by this variant.
[HandleProcessCorruptedStateExceptions] public uint GetVariantTree(uint variant)
Parameters
Type Name Description uint variant The variant.
Returns
ListVariants
Returns all the available variants.
[HandleProcessCorruptedStateExceptions] public VariantList ListVariants()
Returns
RemoveVariant
Remove a variant.
[HandleProcessCorruptedStateExceptions] public void RemoveVariant(uint variant)
Parameters
Type Name Description uint variant The variant to remove.
SetCurrentVariant
Change the current variant used.
[HandleProcessCorruptedStateExceptions] public void SetCurrentVariant(uint variant = 0)
Parameters
Type Name Description uint variant The variant to enable (can be null).
SetVariantTree
Set the alternative tree to use for this variant.
[HandleProcessCorruptedStateExceptions] public void SetVariantTree(uint variant, uint tree)
Parameters
Type Name Description uint variant The variant to modify. uint tree The alternative tree to use for this variant.
StartModifyAllVariants
Call this function to to enable the modifications of all variants at the same time.
[HandleProcessCorruptedStateExceptions] public void StartModifyAllVariants()