Getting C3D Vision Parameters
The command below is used to get an object with some parameters from a C3D Vision instance.
Common command example (TypeScript):
let result = view.runCommand({
name: "GetParametersCommand",
type: GetParametersTypes.AnnotationList
})
Available request types:
Constant name |
Value |
Optional parameters |
Description |
---|---|---|---|
|
|
|
Returns objects added to a model. |
|
|
– |
Returns current camera parameters (projection, orientation and up vector for the standard projection). Details. |
|
|
|
Returns node UUIDs selected by command. |
|
|
|
Returns a bounding box. |
New in version 1.5.0: Added the optional filter
parameter.
New in version 1.8.0: Added the request type GetParametersTypes.BoundingBox
.
Common result type of command (TypeScript):
type GetParametersCommandResult = {
name: ResultTypes.Parameters // "Parameters"
result: Promise<{
name: GetParametersTypes // command run type
<RESULT>
}>
}
This command returns an object storing the following: a constant name which is ResultTypes.Parameters
or just "Parameters"
and a promise object with a command type name and
<RESULT> depending on a command type.
Command type |
<RESULT> |
---|---|
|
|
|
|
|
|
|
|
In some cases, a command is able to fail. Then it returns another result, with the message
containing an error message, for further excepting.
Error result type of command (TypeScript):
type ErrorResult = {
name: ResultTypes.Error // "Error"
message: string
}
Also, there might be an empty result (e.g. in case of an invalid type name) with the following type.
Empty GetParameters result type (TypeScript):
type NoneResult = {
name: ResultTypes.None // "None"
}
Bounding Box Result
The bounding box is defined by two opposite points (minimum and maximum). Such a box includes all
geometries which UUIDs are passed via the command "GetParametersCommand"
with the type GetParametersTypes.BoundingBox
.
Bounding box result type (TypeScript):
export type GetBoundingBoxResult = {
name: GetParametersTypes.BoundingBox
min: C3DViewPoint
max: C3DViewPoint
}