Drawing
The Drawing manages all necessary data that belong to a model.
On the one hand these are the structure and graphic data by which the CAD model is defined, on the other hand it administers additional data for the support with the client-sided development.
#
DrawingID#
DrawingAPI#
structure#
selection#
interaction#
plugin#
geometry#
graphic#
cad#
resetDeclaration
Returns void
#
DrawingStateMembers
Name | Type | Description |
---|---|---|
api | DrawingAPI |
#
createDrawingState#
StructureDataMembers
Name | Type | Description |
---|---|---|
products | ObjectID[] | |
visibleContainers | GraphicID[] |
#
StructureApi#
getDeclaration
Returns StructureData
#
setDeclaration
Params
Name | Type | Default | Description |
---|---|---|---|
structure | IStructureProtocol |
Returns void
#
applyPatchesDeclaration
Params
Name | Type | Default | Description |
---|---|---|---|
patches | IStructurePatch[] |
Returns void
#
filterTreeDeclaration
Params
Name | Type | Default | Description |
---|---|---|---|
tree | IStructureTree | ||
filter | (obj: IStructureObject) => boolean |
Returns IStructureObject[]
#
findTreeDeclaration
Params
Name | Type | Default | Description |
---|---|---|---|
tree | IStructureTree | ||
filter | (obj: IStructureObject) => boolean |
Returns IStructureObject | undefined
#
collectUsedSolidIdsDeclaration
Returns ObjectID[]
#
collectProductsDeclaration
Params
Name | Type | Default | Description |
---|---|---|---|
root | ObjectID |
Returns IStructureObject[]
#
getProductSolidIdsDeclaration
Params
Name | Type | Default | Description |
---|---|---|---|
productId | ObjectID |
Returns any[]
#
postProcessStructureUpdateDeclaration
Returns void
#
calculateGlobalTransformationCalculates the global transformation matrix for the given objectId.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
objectId | ObjectID | The object to calculate the global transformation for. | |
matrix? | THREE.Matrix4 | new THREE.Matrix4().identity() | The initial matrix (mainly used for recursion). It is an out parameter and in the end, it will contain the same matrix as the return value of this function. |
Returns THREE.Matrix4
The global transformation matrix for the given objectId.
#
calculateProductBoundsDeclaration
Params
Name | Type | Default | Description |
---|---|---|---|
productId | ObjectID | ||
base.min | THREE.Vector3 | ||
base.max | THREE.Vector3 |
Returns { center: THREE.Vector3; radius: number; max: THREE.Vector3; min: THREE.Vector3; }
#
getDrawingIdThis is a workaround to get the corresponding drawing id via API.
!!! Should not be used in user code !!!
Declaration
Returns DrawingID
The drawing id.
#
structureData#
structureApi#
GraphicDataMembers
Name | Type | Description |
---|---|---|
containers | Record<number, IGraphicContainer> |
#
GraphicApi#
addPackagesDeclaration
Params
Name | Type | Default | Description |
---|---|---|---|
packages | IGraphicPackage[] |
Returns void
#
cleanupGraphicRecordsDeclaration
Returns void
#
filterDeclaration
Params
Name | Type | Default | Description |
---|---|---|---|
cb | (elem: IGraphicElement) => boolean | ||
options.onlyOne? | boolean | ||
options.containerId? | ObjectID |
Returns { elem: IGraphicElement; containerId: ObjectID; solidId: ObjectID; }[]
#
graphicData#
containers#
graphicApi#
GeometryBoundsMembers
Name | Type | Description |
---|---|---|
center | THREE.Vector3 | |
radius | number | |
max | THREE.Vector3 | |
min | THREE.Vector3 |
#
GeometryConfig#
disabled#
meshesMembers
Name | Type | Description |
---|---|---|
meshes.wireframe | boolean | |
meshes.depthWrite | boolean |
#
edges#
points#
GeometryData#
cacheMembers
Name | Type | Description |
---|---|---|
cache.dirtyStamp | number | The dirty stamp will be updated, as soon as a client side modification of the geometry will happen! Examples: 'setColor' or 'setOpacity' Can for example be used to trigger the render process for this container. |
#
stamp#
bounds#
configMembers
Name | Type | Description |
---|---|---|
config.product | Record<ObjectID, GeometryConfig> |
#
GeometryApi#
updateBoundsUpdates the @see geometry.bounds depending on all products of the model. The update will only happen, if at least one solid of one product is available.
Declaration
Returns void
#
createGeometryIfNotCachedDeclaration
Params
Name | Type | Default | Description |
---|---|---|---|
containerId | ObjectID | ||
color? | number[] |
Returns ContainerGeometryT | undefined
#
setGraphicColorDeclaration
Params
Name | Type | Default | Description |
---|---|---|---|
containerId | ObjectID | ||
graphicId | GraphicID | ||
r | number | ||
g | number | ||
b | number |
Returns void
#
setContainerColorDeclaration
Params
Name | Type | Default | Description |
---|---|---|---|
containerId | ObjectID | ||
r | number | ||
g | number | ||
b | number |
Returns void
#
setOpacityDeclaration
Params
Name | Type | Default | Description |
---|---|---|---|
containerId | ObjectID | ||
opacity | number |
Returns void
#
setConfigDeclaration
Params
Name | Type | Default | Description |
---|---|---|---|
objId | ObjectID | ||
config | Partial<GeometryConfig> l null |
Returns void
#
findDecoratedDeclaration
Returns GeometryElement[]
#
filterDeclaration
Params
Name | Type | Default | Description |
---|---|---|---|
cb | (elem: GeometryElement) => boolean | ||
options.onlyOne? | boolean | ||
options.containerId? | ObjectID |
Returns GeometryElement[]
#
geometryData#
cache#
stamp#
bounds#
center#
radius#
min#
max#
config#
product#
geometryApi#
BuerliScope#
SelectorID#
SeletedItemData#
SelectionScope#
SelectedItem#
id#
scope#
data#
label#
removeConditionDeclaration
Params
Name | Type | Default | Description |
---|---|---|---|
d | DrawingState |
Returns boolean
#
SelectionFilterMembers
Name | Type | Description |
---|
#
CustomSelectMembers
Name | Type | Description |
---|
#
SelectorType for selector.
Members
Name | Type | Description |
---|---|---|
isSelectable | SelectionFilter | |
items | Array<SelectedItem<T>> | |
hoveredItem | SelectedItem<T> l null | |
maxLen | number | |
customSelect | CustomSelect | |
customUnSelect | CustomSelect |
#
SelectionDataMembers
Name | Type | Description |
---|---|---|
refs | Record<SelectorID, Selector> | |
active | SelectorID l null |
#
SelectionApi#
unselectAll#
unselect#
select#
setHovered#
activateSelector#
createSelector#
areItemsSelectedDeclaration
Params
Name | Type | Default | Description |
---|---|---|---|
items | SelectedItem[] | ||
selectorId? | SelectorID |
Returns boolean
#
isItemSelectedDeclaration
Params
Name | Type | Default | Description |
---|---|---|---|
item | SelectedItem | ||
selectorId? | SelectorID |
Returns boolean
#
setItems#
selectGraphicDeclaration
Params
Name | Type | Default | Description |
---|---|---|---|
selectorId | SelectorID | ||
items | { productId: ObjectID; containerId: GraphicID; graphicId?: GraphicID }[] | ||
options.unselectExisting? | boolean |
Returns void
#
getGraphicItemDeclaration
Params
Name | Type | Default | Description |
---|---|---|---|
productId | ObjectID | ||
containerId | GraphicID | ||
graphicId? | GraphicID |
Returns SelectedItem<ProductElement> | null
#
selectionData#
refs#
active#
selectionApi#
createGraphicItem#
PluginDescription#
name#
version#
author#
persistent#
global#
initialStateMembers
Name | Type | Description |
---|
#
Plugin#
RootMembers
Name | Type | Description |
---|
#
ViewMembers
Name | Type | Description |
---|
#
description#
PluginDef#
PluginImplMembers
Name | Type | Description |
---|
#
PluginID#
PluginState#
PluginData#
featureContains ids of feature-plugins
#
globalContains ids of global-plugins
#
refs#
activeMembers
Name | Type | Description |
---|---|---|
active.feature | PluginID l null | |
active.global | PluginID[] |
#
visible#
PluginApi#
setActiveFeatureDeclaration
Params
Name | Type | Default | Description |
---|---|---|---|
id | ObjectID l null |
Returns void
#
setVisiblePluginDeclaration
Params
Name | Type | Default | Description |
---|---|---|---|
id | PluginID | ||
visible | boolean |
Returns void
#
setActiveGlobalDeclaration
Params
Name | Type | Default | Description |
---|---|---|---|
id | PluginID | ||
active | boolean |
Returns void
#
createPluginDeclaration
Params
Name | Type | Default | Description |
---|---|---|---|
def | PluginDef | ||
defaultId? | ObjectID l string | ||
drawingId? | DrawingID | ||
objectId? | ObjectID |
Returns (deactivate?: boolean) => void
#
pluginData#
feature#
global#
refs#
active#
feature#
global#
visible#
pluginApi#
isPromisePluginDeclaration
Params
Name | Type | Default | Description |
---|---|---|---|
def | PluginDef |
Returns def is Promise<Plugin>
#
InteractionDataMembers
Name | Type | Description |
---|---|---|
hovered | InteractionInfo l null | |
selected | InteractionInfo[] |
#
InteractionApi#
setHoveredSets the hovered item in the store to the given item.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
item | InteractionInfo l null | The item. |
Returns void
#
setSelectedReset the 'selected' array to the given items.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
items | InteractionInfo[] | The items. |
Returns void
#
selectAdds the given item to the 'selected' array if it is not yet selected. If the item is already selected, it will be removed from the 'selected' array.
With 'multi' enabled, the already selected items will remain selected.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
item | InteractionInfo | The item to select. | |
multi? | boolean | Do multi select. |
Returns void