Adds a listener to an event type.
When an event of the type pType fires, the callback pListener will be called. This function
returns a unique string id that may be used in removeEventListenerById to allow simple
listener removal.
It is possible to add an object that will be included in the callback to avoid creating too many closures.
Calling twice addEventListener with the same parameters results in the second call to be ignored,
only unique pairs callback / object are allowed, in order to avoid calling multiple times the same
thing.
The id of the inserted callback (actually an UUID).
Adds a listener to an event type.
When an event of the type pType fires, the callback pListener will be called. This function
returns a unique string id that may be used in removeEventListenerById to allow simple
listener removal.
The id of the inserted callback (actually an UUID).
Gets the list of all the geometric Instance ids represented by this WorkingSetInterface.
These geometric instance ids are the resulting set from the list of FilterItemInterface(s)
with their operators intersected with the geometric instance ids represented by the WorkingSet set by
if pRunUpdate is true (by default), a DataSessionInterface.update is automatically called.
Optional pRunUpdate: booleanA promise. The promise is resolved with the reason (success, cancelled, reset, bad input), or rejected in case of an
unexpected error. In case of success, the promise is resolved with the list of geometric instances ids represented by this WorkingSetInterface.
Copies this onto pOther WorkingSetInterface.
New filters are created (their ids are set randomly), and dependencies are set (same objects are used).
The copied WorkingSetInterface or undefined if an error occurred.
Gets rid of this object.
After this call, this object can no longer be used.
If the object is an InfiniteObjectDispatcherInterface, then the InfiniteObjectDispatcherInterfaceSignal.ObjectDisposed signal is emitted.
Further uses of the object (with the exception of isDisposed, getInfiniteObjectType and application id retrieval) will log a message with LogLevel.LL_UsingDisposedObject.
Sets the content of the WorkingSetInterface from a former call to toJSON.
Warning, this call removes all working set dependencies. If you want a full copy of the WorkingSetInterface, prefer using DataSessionInterface.fromJSON or copy.
{
"$defs": {
"all": {
"additionalProperties": false,
"properties": {
"enabled": {
"default": true,
"description": "If disabled, this filter is completely ignored during all the computations",
"example": true,
"type": "boolean"
},
"id": {
"description": "an object id : only ascii non control and non blank characters",
"example": "123e4567e89b12d3a456426614174000",
"maxLength": 64,
"pattern": "^[\\x21-\\x7E]{1,64}$",
"type": "string"
},
"inverted": {
"description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
"example": true,
"type": "boolean"
},
"operator": {
"default": "and",
"description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
"enum": [
"or",
"and",
"minus"
],
"example": "or",
"type": "string"
},
"type": {
"const": "all",
"description": "Type of the filter",
"type": "string"
},
"version": {
"description": "Define the version of the object",
"example": 1,
"type": "integer"
}
},
"required": [
"type",
"operator",
"enabled",
"inverted",
"id"
],
"title": "Filter all definition",
"type": "object"
},
"attribute": {
"additionalProperties": false,
"properties": {
"attribute": {
"description": "Name of the attribute to filter with",
"example": "PartNumber",
"minLength": 0,
"type": "string"
},
"containsValues": {
"description": "Elects all the `part instances` having the attribute whose name set with attribute in their `joined attribute set` that have a value that contains at least one of the values in the given string array",
"items": {
"type": "string"
},
"type": "array"
},
"enabled": {
"default": true,
"description": "If disabled, this filter is completely ignored during all the computations",
"example": true,
"type": "boolean"
},
"exactValues": {
"description": "Elects all the `part instances` having the attribute whose name set with `attribute` in their `joined attribute set` that have a value exactly included in the given string array.",
"items": {
"type": "string"
},
"type": "array"
},
"id": {
"description": "an object id : only ascii non control and non blank characters",
"example": "123e4567e89b12d3a456426614174000",
"maxLength": 64,
"pattern": "^[\\x21-\\x7E]{1,64}$",
"type": "string"
},
"inverted": {
"description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
"example": true,
"type": "boolean"
},
"na": {
"description": "Include `part instances` with the `N/A` value",
"type": "boolean"
},
"operator": {
"default": "and",
"description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
"enum": [
"or",
"and",
"minus"
],
"example": "or",
"type": "string"
},
"type": {
"const": "attribute",
"description": "Type of the filter",
"type": "string"
},
"version": {
"description": "Define the version of the object",
"example": 1,
"type": "integer"
}
},
"required": [
"type",
"enabled",
"operator",
"inverted",
"exactValues",
"containsValues",
"na",
"attribute",
"id"
],
"title": "Filter attribute definition",
"type": "object"
},
"boolean": {
"additionalProperties": false,
"properties": {
"attribute": {
"description": "Name of the attribute to filter with",
"example": "PartNumber",
"minLength": 0,
"type": "string"
},
"enabled": {
"default": true,
"description": "If disabled, this filter is completely ignored during all the computations",
"example": true,
"type": "boolean"
},
"id": {
"description": "an object id : only ascii non control and non blank characters",
"example": "123e4567e89b12d3a456426614174000",
"maxLength": 64,
"pattern": "^[\\x21-\\x7E]{1,64}$",
"type": "string"
},
"inverted": {
"description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
"example": true,
"type": "boolean"
},
"operator": {
"default": "and",
"description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
"enum": [
"or",
"and",
"minus"
],
"example": "or",
"type": "string"
},
"type": {
"const": "boolean",
"description": "Type of the filter",
"type": "string"
},
"value": {
"default": false,
"description": "Boolean value of the filter",
"example": false,
"type": "boolean"
},
"version": {
"description": "Define the version of the object",
"example": 1,
"type": "integer"
}
},
"required": [
"type",
"operator",
"enabled",
"inverted",
"attribute",
"value",
"id"
],
"title": "Filter boolean definition",
"type": "object"
},
"box": {
"additionalProperties": false,
"properties": {
"enabled": {
"default": true,
"description": "If disabled, this filter is completely ignored during all the computations",
"example": true,
"type": "boolean"
},
"id": {
"description": "an object id : only ascii non control and non blank characters",
"example": "123e4567e89b12d3a456426614174000",
"maxLength": 64,
"pattern": "^[\\x21-\\x7E]{1,64}$",
"type": "string"
},
"inverted": {
"description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
"example": true,
"type": "boolean"
},
"max": {
"description": "Define the coordinates [x,y,z] of the max point of the AABB",
"items": {
"type": "number"
},
"maxItems": 3,
"minItems": 3,
"type": "array"
},
"min": {
"description": "Define the coordinates [x,y,z] of the min point of the AABB",
"items": {
"type": "number"
},
"maxItems": 3,
"minItems": 3,
"type": "array"
},
"operator": {
"default": "and",
"description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
"enum": [
"or",
"and",
"minus"
],
"example": "or",
"type": "string"
},
"overlap": {
"description": "Specify if AABB test is included or overlap",
"example": true,
"type": "boolean"
},
"precision": {
"description": "Numeric precision will be subtracted/added to min/max point of AABB",
"type": "number"
},
"type": {
"const": "box",
"description": "Type of the filter",
"type": "string"
},
"version": {
"description": "Define the version of the object",
"example": 1,
"type": "integer"
}
},
"required": [
"type",
"operator",
"inverted",
"enabled",
"min",
"max",
"overlap",
"precision",
"id"
],
"title": "Filter box definition",
"type": "object"
},
"compound": {
"additionalProperties": false,
"properties": {
"enabled": {
"default": true,
"description": "If disabled, this filter is completely ignored during all the computations",
"example": true,
"type": "boolean"
},
"id": {
"description": "an object id : only ascii non control and non blank characters",
"example": "123e4567e89b12d3a456426614174000",
"maxLength": 64,
"pattern": "^[\\x21-\\x7E]{1,64}$",
"type": "string"
},
"inverted": {
"description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
"example": true,
"type": "boolean"
},
"operator": {
"default": "and",
"description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
"enum": [
"or",
"and",
"minus"
],
"example": "or",
"type": "string"
},
"subfilters": {
"description": "list of metadata sub filters",
"items": {
"$ref": "#/$defs/compoundfilters"
},
"type": "array"
},
"type": {
"const": "compound",
"description": "Type of the filter",
"type": "string"
},
"version": {
"description": "Define the version of the object",
"example": 1,
"type": "integer"
}
},
"required": [
"type",
"operator",
"enabled",
"inverted",
"subfilters",
"id"
],
"title": "Filter compound definition",
"type": "object"
},
"compoundfilters": {
"oneOf": [
{
"$ref": "#/$defs/boolean"
},
{
"$ref": "#/$defs/hasfield"
},
{
"$ref": "#/$defs/attribute"
},
{
"$ref": "#/$defs/range"
}
]
},
"dependencyItem": {
"additionalProperties": false,
"properties": {
"id": {
"description": "an object id : only ascii non control and non blank characters",
"example": "123e4567e89b12d3a456426614174000",
"maxLength": 64,
"pattern": "^[\\x21-\\x7E]{1,64}$",
"type": "string"
},
"op": {
"default": "and",
"description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
"enum": [
"or",
"and",
"minus"
],
"example": "or",
"type": "string"
}
},
"required": [
"op",
"id"
],
"type": "object"
},
"diagonal": {
"additionalProperties": false,
"properties": {
"enabled": {
"default": true,
"description": "If disabled, this filter is completely ignored during all the computations",
"example": true,
"type": "boolean"
},
"id": {
"description": "an object id : only ascii non control and non blank characters",
"example": "123e4567e89b12d3a456426614174000",
"maxLength": 64,
"pattern": "^[\\x21-\\x7E]{1,64}$",
"type": "string"
},
"inverted": {
"description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
"example": true,
"type": "boolean"
},
"operator": {
"default": "and",
"description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
"enum": [
"or",
"and",
"minus"
],
"example": "or",
"type": "string"
},
"rangeitems": {
"description": "List of range item",
"items": {
"$ref": "#/$defs/rangeitem"
},
"type": "array"
},
"type": {
"const": "diagonal",
"description": "Type of the filter",
"type": "string"
},
"version": {
"description": "Define the version of the object",
"example": 1,
"type": "integer"
}
},
"required": [
"type",
"operator",
"enabled",
"inverted",
"rangeitems",
"id"
],
"title": "Filter diagonal definition",
"type": "object"
},
"filter": {
"oneOf": [
{
"$ref": "#/$defs/box"
},
{
"$ref": "#/$defs/all"
},
{
"$ref": "#/$defs/attribute"
},
{
"$ref": "#/$defs/boolean"
},
{
"$ref": "#/$defs/literal"
},
{
"$ref": "#/$defs/compound"
},
{
"$ref": "#/$defs/diagonal"
},
{
"$ref": "#/$defs/hasfield"
},
{
"$ref": "#/$defs/partinstanceidlist"
},
{
"$ref": "#/$defs/range"
},
{
"$ref": "#/$defs/filterset"
}
]
},
"filterset": {
"additionalProperties": false,
"properties": {
"enabled": {
"default": true,
"description": "If disabled, this filter is completely ignored during all the computations",
"example": true,
"type": "boolean"
},
"id": {
"description": "an object id : only ascii non control and non blank characters",
"example": "123e4567e89b12d3a456426614174000",
"maxLength": 64,
"pattern": "^[\\x21-\\x7E]{1,64}$",
"type": "string"
},
"inverted": {
"description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
"example": true,
"type": "boolean"
},
"operator": {
"default": "and",
"description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
"enum": [
"or",
"and",
"minus"
],
"example": "or",
"type": "string"
},
"subfilters": {
"description": "List of sub filters",
"items": {
"oneOf": [
{
"$ref": "#/$defs/box"
},
{
"$ref": "#/$defs/all"
},
{
"$ref": "#/$defs/attribute"
},
{
"$ref": "#/$defs/boolean"
},
{
"$ref": "#/$defs/literal"
},
{
"$ref": "#/$defs/compound"
},
{
"$ref": "#/$defs/diagonal"
},
{
"$ref": "#/$defs/hasfield"
},
{
"$ref": "#/$defs/partinstanceidlist"
},
{
"$ref": "#/$defs/range"
},
{
"$ref": "#/$defs/filterset"
}
]
},
"type": "array"
},
"type": {
"const": "set",
"description": "Type of the filter",
"type": "string"
},
"version": {
"description": "Define the version of the object",
"example": 1,
"type": "integer"
}
},
"required": [
"type",
"enabled",
"operator",
"inverted",
"subfilters",
"id"
],
"title": "Filter set definition",
"type": "object"
},
"hasfield": {
"additionalProperties": false,
"properties": {
"attribute": {
"description": "Name of the attribute to filter with",
"example": "PartNumber",
"minLength": 0,
"type": "string"
},
"enabled": {
"default": true,
"description": "If disabled, this filter is completely ignored during all the computations",
"example": true,
"type": "boolean"
},
"id": {
"description": "an object id : only ascii non control and non blank characters",
"example": "123e4567e89b12d3a456426614174000",
"maxLength": 64,
"pattern": "^[\\x21-\\x7E]{1,64}$",
"type": "string"
},
"inverted": {
"description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
"example": true,
"type": "boolean"
},
"operator": {
"default": "and",
"description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
"enum": [
"or",
"and",
"minus"
],
"example": "or",
"type": "string"
},
"type": {
"const": "hasfield",
"description": "Type of the filter",
"type": "string"
},
"version": {
"description": "Define the version of the object",
"example": 1,
"type": "integer"
}
},
"required": [
"type",
"operator",
"enabled",
"inverted",
"attribute",
"id"
],
"title": "Filter Has field definition",
"type": "object"
},
"literal": {
"additionalProperties": false,
"properties": {
"enabled": {
"default": true,
"description": "If disabled, this filter is completely ignored during all the computations",
"example": true,
"type": "boolean"
},
"id": {
"description": "an object id : only ascii non control and non blank characters",
"example": "123e4567e89b12d3a456426614174000",
"maxLength": 64,
"pattern": "^[\\x21-\\x7E]{1,64}$",
"type": "string"
},
"inverted": {
"description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
"example": true,
"type": "boolean"
},
"operator": {
"default": "and",
"description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
"enum": [
"or",
"and",
"minus"
],
"example": "or",
"type": "string"
},
"query": {
"description": "Sets the query string in the 3djuump infinite literal and search query language",
"example": ":PartNumber=='bolt'",
"type": "string"
},
"type": {
"const": "literal",
"description": "Type of the filter",
"type": "string"
},
"version": {
"description": "Define the version of the object",
"example": 1,
"type": "integer"
}
},
"required": [
"type",
"operator",
"enabled",
"inverted",
"query",
"id"
],
"title": "Filter literal definition",
"type": "object"
},
"partinstanceidlist": {
"additionalProperties": false,
"properties": {
"buildid": {
"description": "Id of the build use to create the part list instance",
"type": "string"
},
"enabled": {
"default": true,
"description": "If disabled, this filter is completely ignored during all the computations",
"example": true,
"type": "boolean"
},
"id": {
"description": "an object id : only ascii non control and non blank characters",
"example": "123e4567e89b12d3a456426614174000",
"maxLength": 64,
"pattern": "^[\\x21-\\x7E]{1,64}$",
"type": "string"
},
"inverted": {
"description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
"example": true,
"type": "boolean"
},
"list": {
"description": "List of part instance ids",
"items": {
"type": "number"
},
"type": "array"
},
"operator": {
"default": "and",
"description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
"enum": [
"or",
"and",
"minus"
],
"example": "or",
"type": "string"
},
"type": {
"const": "partinstanceidlist",
"description": "Type of the filter",
"type": "string"
},
"version": {
"description": "Define the version of the object",
"example": 1,
"type": "integer"
}
},
"required": [
"type",
"operator",
"enabled",
"inverted",
"buildid",
"list",
"id"
],
"title": "Filter Part instance list definition",
"type": "object"
},
"range": {
"additionalProperties": false,
"properties": {
"attribute": {
"description": "Name of the attribute to filter with",
"example": "PartNumber",
"minLength": 0,
"type": "string"
},
"enabled": {
"default": true,
"description": "If disabled, this filter is completely ignored during all the computations",
"example": true,
"type": "boolean"
},
"id": {
"description": "an object id : only ascii non control and non blank characters",
"example": "123e4567e89b12d3a456426614174000",
"maxLength": 64,
"pattern": "^[\\x21-\\x7E]{1,64}$",
"type": "string"
},
"inverted": {
"description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
"example": true,
"type": "boolean"
},
"operator": {
"default": "and",
"description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
"enum": [
"or",
"and",
"minus"
],
"example": "or",
"type": "string"
},
"rangeitems": {
"description": "List of range item",
"items": {
"$ref": "#/$defs/rangeitem"
},
"type": "array"
},
"type": {
"const": "range",
"description": "Type of the filter",
"type": "string"
},
"version": {
"description": "Define the version of the object",
"example": 1,
"type": "integer"
}
},
"required": [
"type",
"operator",
"enabled",
"inverted",
"attribute",
"rangeitems",
"id"
],
"title": "Filter range definition",
"type": "object"
},
"rangeitem": {
"additionalProperties": false,
"properties": {
"includedLower": {
"description": "Sets if the lower bound value should be included or excluded",
"type": "boolean"
},
"includedUpper": {
"description": "Sets if the upper bound value should be included or excluded",
"type": "boolean"
},
"lower": {
"description": "Lower bound of the range item",
"type": "number"
},
"upper": {
"description": "Upper bound of the range item",
"type": "number"
}
},
"required": [
"includedLower",
"includedUpper"
],
"title": "Range item definition",
"type": "object"
},
"retrievalType": {
"enum": [
"none",
"geometric_instance_ids",
"geometric_and_part_instance_ids"
],
"type": "string"
},
"workingset": {
"additionalProperties": false,
"properties": {
"behavior": {
"description": "The way data is computed inside the working set",
"type": "integer"
},
"configurationids": {
"items": {
"description": "ID of a JSON document",
"maxLength": 255,
"minLength": 1,
"pattern": "^[^_].{0,255}$",
"type": "string"
},
"type": "array"
},
"dependencies": {
"items": {
"$ref": "#/$defs/dependencyItem"
},
"type": "array"
},
"enabled": {
"type": "boolean"
},
"filters": {
"description": "List of sub filters",
"items": {
"$ref": "#/$defs/filter"
},
"type": "array"
},
"id": {
"description": "an object id : only ascii non control and non blank characters",
"example": "123e4567e89b12d3a456426614174000",
"maxLength": 64,
"pattern": "^[\\x21-\\x7E]{1,64}$",
"type": "string"
},
"retrieval": {
"$ref": "#/$defs/retrievalType"
},
"type": {
"const": "workingset",
"type": "string"
},
"version": {
"description": "Define the version of the object",
"example": 1,
"type": "integer"
}
},
"required": [
"id",
"type",
"filters",
"dependencies",
"enabled",
"retrieval",
"configurationids",
"behavior"
],
"title": "WorkingSet definition",
"type": "object"
}
},
"$ref": "#/$defs/workingset",
"$schema": "https://json-schema.org/draft-07/schema#"
}
true if the data is set.
Gets the list of active ConfigurationInterface ids, as set previously by setActiveConfs.
Modifying this array in place results in undefined behavior.
DO NOT modify this array.
Gets a FilterItemInterface previously included by insertFilter given its identifier.
Each FilterItemInterface, upon creation, is given a unique identifier.
The FilterItemInterface with the given id, or undefined if not found.
Gets a FilterItemInterface previously included by insertFilter given its order in the container list.
The FilterItemInterface at the given order, or undefined if pOrder is out of range [0,getFilterCount() -1].
Gets the number of FilterItemInterface in the WorkingSetInterface.
The FilterItemInterfaces count.
Gets the order of the FilterItemInterface represented by the given identifier.
The order of the FilterItemInterface in the WorkingSetInterface, or -1 if not found.
Gets the list of all the geometric instance ids represented by this WorkingSetInterface.
These geometric instance ids are the resulting set from the list of FilterItemInterface(s)
with their operators intersected with the geometric instance ids represented by the WorkingSetInterface set by
The correct value is returned if the WorkingSetInterface has finished computing.
Use addEventListener on the event WorkingSetInterfaceSignal.WorkingSetReady to
know when the WorkingSetInterface is ready (isModified() is false).
If getRetrieveDataMode is WorkingSetDataRetrieval.R_Nothing,
then the function returns an empty array when the data is ready, and undefined if the WorkingSetInterface
is computing.
DO NOT modify this array in place, this results in undefined behavior.
geometric instances ids represented by this WorkingSetInterface, or undefined if the WorkingSetInterface is computing
((isModified() is `false`)) or cancelled (isCancelled() is true) .Tells the type of the given interface.
The type of the given interface.
Gets the last error returned by the update of the WorkingSetInterface.
The error message is updated :
If the WorkingSetInterface is running, returns undefined.
An InfiniteError containing the last error if any, or undefined if no error occurred.
Gets the list of all the part instance ids of the part instances represented by this WorkingSetInterface.
These part instance ids are the resulting set from the list of FilterItemInterface(s)
with their operators intersected with the part instance ids represented by the WorkingSets set by
The value is returned if the WorkingSetInterface has finished computing and if
getRetrieveDataMode is WorkingSetDataRetrieval.R_GeometricInstancesAndPartInstances.
If getRetrieveDataMode is not WorkingSetDataRetrieval.R_GeometricInstancesAndPartInstances,
then the function returns an empty array when the data is ready, and undefined if the WorkingSetInterface
is computing.
Use addEventListener on the event WorkingSetInterfaceSignal.WorkingSetReady to know when the WorkingSetInterface is ready.
part instances ids represented by this WorkingSetInterface,
or undefined if it is modified (isModified() is true) or cancelled (isCancelled() is true).Gets the count of all the part instance ids of the part instances represented by this WorkingSetInterface.
These part instance ids are the resulting set from the list of FilterItemInterface(s)
with their operators intersected with the part instance ids represented by the WorkingSets set by
The value is returned if the WorkingSetInterface has finished computing and is always accurate, regardless of the state of getRetrieveDataMode.
Use addEventListener on the event WorkingSetInterfaceSignal.WorkingSetReady to know when the WorkingSetInterface is ready.
part instances ids represented by this WorkingSetInterface,
or 0 if it is modified (isModified() is true) or cancelled (isCancelled() is true).Tells the way geometric instance ids and part instance ids are retrieved and computed.
Using WorkingSetDataRetrieval.R_Nothing means that the part instance ids and geometric instance ids are not available for this WorkingSetInterface, but data is still computed on the backend, and WorkingSetInterface whose result depend on this WorkingSetInterface will still be correct.
This value is only an optimization parameter.
getRetrieveDataMode() is the one used to create the WorkingSetInterface by default
(DataSessionInterface.createWorkingSet).
The way data will be retrieved computed while presenting the available data when WorkingSetInterfaceSignal.WorkingSetReady is triggered.
Gets the number of triangles of all the geometric instances represented by this WorkingSetInterface.
This should be called after the WorkingSetInterface has finished its computation.
Use addEventListener on the event WorkingSetInterfaceSignal.WorkingSetReady to know when the
WorkingSetInterface is ready.
getTrianglesCount should return -1 if the WorkingSetInterface is running or has never been computed.
getTrianglesCount should return 0 if the WorkingSetInterface has finished its computation and
getRetrieveDataMode is WorkingSetDataRetrieval.R_Nothing.
The number of triangles of the geometric instances of this WorkingSetInterface.
Tells the behavior of the WorkingSetInterface when it contains no filter, no configurations, or no dependencies.
Please refer to WorkingSetBehavior to find the differences between behaviors.
The ored value of the WorkingSetInterface behavior when it contains no filter, no configurations,
or no dependencies.
Gets the given dependency working set by its offset.
The given working set interface.
Gets the given dependency operator applied to this working set dependency.
The given filter operator. If the working set is invalid or not in the dependency list, GroupOperator.GO_INVALID is returned.
Gets the given dependency operator by its offset.
The given filter operator. If the offset is invalid, GroupOperator.GO_INVALID is returned.
Gets the given dependency order in this working set dependency list.
The given working set order in the dependency list. If the working set is invalid or not in the dependency list, -1 is returned.
Gets the identifier of the WorkingSetInterface.
The identifier can be set by the application with DataSessionInterface.createWorkingSet or customized later with setWorkingSetId.
The identifier of the WorkingSetInterface.
Gets all the "parents" of this WorkingSetInterface.
A parent is a WorkingSetInterface that has this WorkingSetInterface in its list of dependencies.
true if the call was successful.
Tells if the EventDispatcher has such a callback registered for the given event type.
true if such a listener is installed for the given type of event.
Inserts a FilterItemInterface at the given position.
Any invalid position will result in the FilterItemInterface being pushed at the end of the list of FilterItemInterfaces. Use addEventListener on the event WorkingSetInterfaceSignal.WorkingSetFilterAdded to know when a FilterItemInterface is added to the WorkingSetInterface.
Returns true if the FilterItemInterface is added, false if the FilterItemInterface has been cleaned up, pOrder is not a number, or if the FilterItemInterface is already inside a container.
true if the FilterItemInterface is added.
Inserts a new WorkingSetInterface dependency with the given operator, at the desired position.
If pOffset is negative or too big, then the working set dependency is appended to the list of
dependencies.
Use addEventListener on the event WorkingSetInterfaceSignal.WorkingSetDependencyAdded to know when a dependency is added.
Returns true if the WorkingSetInterface dependency was added (this is not the case if the WorkingSetInterface is
already in the dependency list).
true if the working set was inserted.
Tells if the WorkingSetInterface has been cancelled.
This is the case after calling DataSessionInterface.cancelUpdate when the WorkingSetInterface is updating (ie isRunning() is true). The WorkingSetInterfaceSignal.WorkingSetReady signal will be sent shortly after DataSessionInterface.cancelUpdate has been called, and shortly after WorkingSetInterfaceSignal.WorkingSetCancelled.
true if the WorkingSetInterface is cancelled.
Tells if this object has been gotten rid off.
true if dispose has been called on this object.
Tells if the WorkingSetInterface is enabled.
If disabled, this WorkingSetInterface is completely ignored during all the computations (the behavior is the same as if it had not been created).
A WorkingSetInterface is enabled by default.
true if the WorkingSetInterface is enabled.
Tells if this WorkingSetInterface will be modified by a call to DataSessionInterface.fromJSON.
If this WorkingSetInterface is excluded from JSON streaming, then a call to DataSessionInterface.fromJSON will leave this WorkingSetInterface almost unmodified (WorkingSetInterface dependencies that are not excluded from streaming are removed), and DataSessionInterface.toJSON will not output the content of this WorkingSetInterface. If this WorkingSetInterface is included in the JSON streaming, then this WorkingSetInterface will be reused or disposed when DataSessionInterface.fromJSON is used, and will be part of the DataSessionInterface.toJSON call.
By default, all WorkingSetInterface are included in the streaming (excluded from streaming is false).
Returns the last value set by setExcludedFromJSONStreaming.
true if this WorkingSetInterface is excluded from the JSON streaming.
Tells if the WorkingSetInterface is updating (running).
This is the case after calling DataSessionInterface.update.
true if the WorkingSetInterface is updating.
Changes the order of the given FilterItemInterface in the container list by its filter id.
Orders number must be in the range of existing orders i.e. [0,getFilterCount() -1].
Use addEventListener on the event WorkingSetInterfaceSignal.WorkingSetFilterMoved to know when a FilterItemInterface is moved.
true if the FilterItemInterface was found and changed.
Changes the order of the given WorkingSetInterface in the dependency list.
Orders number must be in the range of existing orders i.e. [0,getWorkingSetDependencyCount() -1].
Use addEventListener on the event WorkingSetInterfaceSignal.WorkingSetDependencyMoved to know when a dependency is moved.
true if the WorkingSetInterface was found and changed.
Removes all the FilterItemInterface contained in this WorkingSetInterface.
Use addEventListener on the event WorkingSetInterfaceSignal.WorkingSetChanged to know when a FilterItemInterface is changed.
Removes a allWorkingSetInterface dependencies.
Use addEventListener on the event WorkingSetInterfaceSignal.WorkingSetDependencyRemoved to know when a dependency is removed.
Removes a listener from an event type.
If no such listener is found, then the function returns false and does nothing. You must use the exact parameters that were used in addEventListener to actually remove the listener.
The listener function that gets removed.
The listener object that was used when addEventListener was called.
true if the callback was removed else false.
Removes a listener from an event type.
If no such listener is found, then the function returns false and does nothing. You must use the exact parameters that were used in addEventListener to actually remove the listener.
The listener function that gets removed.
true if the callback was removed else false.
Removes a listener by its id.
If no such listener is found, then the function returns false and does nothing. You must use the return value of addEventListener to actually remove the listener.
true if the callback was removed else false.
Removes a FilterItemInterface previously included by insertFilter given its identifier from the container list.
Use addEventListener on the event WorkingSetInterfaceSignal.WorkingSetFilterRemoved to know when a FilterItemInterface is removed.
true if the FilterItemInterface was found and removed.
Removes a working set dependency.
Use addEventListener on the event WorkingSetInterfaceSignal.WorkingSetDependencyRemoved to know when a dependency is removed.
true if the working set was removed from the list of dependencies.
Removes a working set dependency by its position.
Use addEventListener on the event WorkingSetInterfaceSignal.WorkingSetDependencyRemoved to know when a dependency is removed.
true if the working set was removed.
Replaces the given dependency by a new dependency.
Use addEventListener on the event WorkingSetInterfaceSignal.WorkingSetDependencyAdded and WorkingSetInterfaceSignal.WorkingSetDependencyRemoved to know when a dependencies are replaced.
pOperator is GroupOperator.GO_INVALID,
then the filter operator of pOldCtx will be used.false if pNewContext, pOldCtx or pOperator are invalid, or if pOldCtx was not found in the dependency list, or
pNewContext is already in the dependency list.
Sets the ids of the active configurations that are included in this WorkingSetInterface.
An event WorkingSetInterfaceSignal.WorkingSetConfChanged signal is sent.
The consecutive call to DataSessionInterface.update will trigger the
calculation of the part instances inside this union of ConfigurationInterface.getConfigurationId.
If pActiveConfigurationIds is an empty array (the default case), the given WorkingSetInterface is "unconfigured", i.e. it contains
all the part instances of the DMU.
Only unique and valid configuration ids from pActiveConfigurationIds will be activated. If pActiveConfigurationIds contains duplicates or invalid configuration ids they will be skipped which might results as activating an empty array (the default case).
true if the WorkingSetInterface is changed and DataSessionInterface.update must be called.
Sets the WorkingSetInterface enabled/disabled status.
If disabled, this WorkingSetInterface is completely ignored during all the computations (the behavior is the same as if it had not been created).
A WorkingSetInterface is enabled by default.
Excludes/Includes this WorkingSetInterface from being modified by a call to DataSessionInterface.fromJSON.
If this WorkingSetInterface is excluded from JSON streaming, then a call to DataSessionInterface.fromJSON will leave this WorkingSetInterface almost unmodified (WorkingSetInterface dependencies that are not excluded from streaming are removed), and DataSessionInterface.toJSON will not output the content of this WorkingSetInterface. If this WorkingSetInterface is included in the JSON streaming, then this WorkingSetInterface will be reused or disposed when DataSessionInterface.fromJSON is used, and will be part of the DataSessionInterface.toJSON call.
By default, all WorkingSetInterface are included in the streaming (excluded from streaming is false). This call does not change the content of this WorkingSetInterface (isModified is not changed), and thus calling DataSessionInterface.update thereafter is useless.
Tells the WorkingSetInterface to compute and retrieve the given data.
You may choose not to get the part instance ids to save memory (WorkingSetDataRetrieval.R_OnlyGeometricInstances), and
using WorkingSetDataRetrieval.R_Nothing to save memory and network bandwidth.
getRetrieveDataMode() is the one used to create the WorkingSetInterface by default
(DataSessionInterface.createWorkingSet).
Sets the behavior of the WorkingSetInterface when it contains no filter, no configurations, or no dependencies.
Please refer to WorkingSetBehavior to find the differences between behaviors.
ored value of the WorkingSetInterface behavior when it contains no filter, no configurations,
or no dependencies.Sets the working set operator of the dependency of the given dependency.
Use addEventListener on the event WorkingSetInterfaceSignal.WorkingSetDependencyOperatorChanged to know when a dependency operator is changed.
false if the working set has not been found in the dependency list.
Sets the working set operator of the dependency by its offset.
Use addEventListener on the event WorkingSetInterfaceSignal.WorkingSetDependencyOperatorChanged to know when a dependency operator is changed.
false if pWorkingSetOffset is invalid.
Sets the identifier of the WorkingSetInterface.
Make sure the id is unique. A unique WorkingSetInterface identifier is automatically created if the identifier is not overridden.
Gets a deep copy of the internal data of the WorkingSetInterface.
Please refer to JSON.stringify.
Optional pKey: anyThe internal WorkingSetInterface data.
The WorkingSetInterface interface is used to create sets of
part instancesand their 'geometric part instance ids' counterparts.It is the expression of the Working Set.
The WorkingSetInterface is the intersection of three sets of data :
Filters.
The FilterItemInterface serves to elect a list of
part instancesbased on a criterion (or a list of criteria), for example (others can be found in Filters examples):part instanceswhose size is lower than 3 cmspart instancesthat overlaps a given 3D cubepart instancesthat have a metadata "type" equal to "electrical" (electricalpart instances)part instancesthat have a metadata "mounted" to true (mountedpart instances).A WorkingSetInterface is the expression of a combination of multiple FilterItemInterfaces with a specific operator (union/intersection/exclusion), a GroupOperator.
The order of FilterItemInterface in the WorkingSetInterface is relevant and changing the order of the FilterItemInterfaces may (or not) change the final result.
WorkingSetInterface dependencies.
The WorkingSetInterface may be intersected with a list of WorkingSetInterface dependencies. Such a dependency graph will intersect the WorkingSetInterface with a specific operator of other WorkingSetInterfaces ((union/intersection/exclusion), a GroupOperator. Dependencies are added by insertWorkingSetDependency. Contrary to the FilterItemInterface list, the same WorkingSetInterface can be set as a dependency of multiple WorkingSetInterface (the FilterItemInterface can only have one 'parent'). Pay attention not to create an infinite loop, the api will detect loops and set errors.
Configurations.
The list of available configurations is accessible through the DataSessionInterface.getConfigurationList method.
The user may include any number of ConfigurationInterface inside the WorkingSetInterface (by their id), the resulting set will be the union of all the requested ConfigurationInterface : any
part instanceincluded in at least one ConfigurationInterface will be available through the resulting WorkingSetInterface.The active configurations are set through the setActiveConfs method. Each time the setActiveConfs method is called, the WorkingSetInterfaceSignal.WorkingSetConfChanged signal is sent.
Or with async calls :
The setActiveConfs does not trigger a computation on the Infinite servers (see below).
WorkingSetInterface results.
The WorkingSetInterface result is gotten asynchronously when triggered by a DataSessionInterface.update call. The WorkingSetInterface sends the event WorkingSetInterfaceSignal.WorkingSetReady when the result is ready to be fetched.
Warning : there may be cases when the getGeometricInstanceIds is not available such as when the WorkingSetInterface is updating, i.e. when isRunning returns true, or when the WorkingSetInterface has been cancelled, i.e. when isCancelled returns true.
A WorkingSetInterface may be interrupted (cancelled) when the WorkingSetInterface is running and DataSessionInterface.cancelUpdate is called. In such cases, the WorkingSetInterfaceSignal.WorkingSetCancelled signal is fired, and shortly after, WorkingSetInterfaceSignal.WorkingSetReady signal is fired, but getGeometricInstanceIds will return undefined. Just call DataSessionInterface.update and the computation of the WorkingSetInterface will resume.
The result of a WorkingSetInterface may be represented as :
{geometric instance ids}{part instance ids}.The setRetrieveDataMode and getRetrieveDataMode (WorkingSetDataRetrieval enumeration) allows to set the way data is retrieved. If you never get the result of a specific WorkingSetInterface, then it is recommended to set WorkingSetDataRetrieval.R_Nothing.
WorkingSetInterface behavior.
As the WorkingSetInterface is the intersection of configurations, filters and other WorkingSetInterface, this implies that when any of filters, configurations, or dependencies are empty, then the
geometric instance idsof such a WorkingSetInterface are empty.In order to ease the use of WorkingSetInterface, the behavior of the WorkingSetInterface may be customized when any of these properties are empty with getWorkingSetBehavior, setWorkingSetBehavior that uses the enumeration WorkingSetBehavior.
The default behavior is WorkingSetBehavior.B_DefaultBehavior meaning that if any the filter, configuration, or dependencies is empty, then the WorkingSetInterface is empty. On the contrary, with the WorkingSetBehavior.B_DiscardConfigurationsIfEmptyBit | WorkingSetBehavior.B_DiscardFiltersIfEmptyBit | WorkingSetBehavior.B_DiscardDependenciesIfEmptyBit behavior, then if no filters, no dependencies and no configurations are set, then the WorkingSetInterface is represented by ALL the geometric instance ids. Please refer to WorkingSetBehavior for more information about the way data is computed inside a WorkingSetInterface.
When a FilterItemInterface is modified, there is no automatic update of the content of a WorkingSetInterface : indeed, you may want to modify a lot of FilterItemInterface, WorkingSets before getting the expected result. Moreover, any WorkingSet may depend on WorkingSetInterfaces that could lead to massive dependency graphs. For this reason, WorkingSetInterfaces and FilterItemInterfaces are not updated through a dedicated function on each interface but with the DataSessionInterface.update function.
The dependency graph of WorkingSets and FilterItemInterfaces is handled by the DataSessionInterface, this also prevent too many requests to be sent to the server for nothing.
To sum up : modify your FilterItemInterfaces, and WorkingSetInterfaces without taking into account any dependency that may have between them, and when you want the server to compute the result, remember to call DataSessionInterface.update.
Using WorkingSetInterfaces.
The WorkingSetInterface interface is created through the DataSessionInterface.createWorkingSet and is bound to this given DataSessionInterface.
The list of signals the WorkingSetInterface may trigger is available in the WorkingSetInterfaceSignal enumeration.
Discard (with dispose) existing WorkingSetInterface before loading a new DataSessionInterface.
Recommended usage: It is highly advised to create specialized WorkingSetInterface to lower the bandwidth usage and correctly understand the way data is handled. It is advised to have at least one WorkingSetInterface that takes in charge the configurations (and ONLY configurations), using the behavior WorkingSetBehavior.B_DiscardConfigurationsIfEmptyBit | WorkingSetBehavior.B_DiscardFiltersIfEmptyBit | WorkingSetBehavior.B_DiscardDependenciesIfEmptyBit. Such a WorkingSetInterface will then act as a kind of 'Configuration context'. When you want to change the configurations of your visible items, you just change one WorkingSetInterface. This behavior will also help with configured metadata. Indeed, the metadata of the DMU may be configured, meaning that the content of a specific attribute may depend on a 'chosen' configuration. When an id-card request is made, or a filter on a 'configured' attribute is computed, the given algorithm is used to get the 'current' configuration:
or asynchronously :
Please make sure the destination browser supports promises before using async calls.
See