ClipPlaneAPI¶
Interface ClipPlaneAPI
changeClippingRoom(properties?: ClipRoomProperties): ClipRoomProperties;
changeClippingRoom(
name?: string,
size?: number[] | Float32Array<ArrayBufferLike>,
transformation?: number[] | Float32Array<ArrayBufferLike>,
disabled?: boolean,
invisible?: boolean,
): ClipRoomProperties;
changeClipPlane(
clipPlaneId: number,
properties: ClipPlaneProperties,
): ClipPlaneProperties;
changeClipPlane(
clipPlaneID: number,
normal?: number[] | Float32Array<ArrayBufferLike>,
point?: number[] | Float32Array<ArrayBufferLike>,
name?: string,
thickness?: number,
tangent?: number[] | Float32Array<ArrayBufferLike>,
disabled?: boolean,
invisible?: boolean,
exclusive?: boolean,
): void;
clipOtherParts(target: number | number[]): void;
createCapping(clipPlaneId: number): Promise<void>;
createClippingRoom(properties?: ClipRoomProperties): void;
createClippingRoom(
name?: string,
size?: number[] | Float32Array<ArrayBufferLike>,
transformation?: number[] | Float32Array<ArrayBufferLike>,
disabled?: boolean,
invisible?: boolean,
): void;
createClipPlane(properties?: ClipPlaneProperties): number;
createClipPlane(
normal?: number[] | Float32Array<ArrayBufferLike>,
point?: number[] | Float32Array<ArrayBufferLike>,
name?: string,
thickness?: number,
tangent?: number[] | Float32Array<ArrayBufferLike>,
disabled?: boolean,
invisible?: boolean,
exclusive?: boolean,
): number;
disableCapping(clipPlaneId: number): Promise<void>;
enableCapping(clipPlaneId: number): Promise<void>;
getClipPlanes(): number[];
getClipRoom(): number;
removeCapping(clipPlaneId: number): Promise<void>;
removeClippingRoom(safe?: boolean): RemoveState;
removeClipPlane(clipPlaneId: number, safe?: boolean): RemoveState;
requestClipPlaneData(clipPlaneId: number): Promise<ClipPlaneProperties>;
requestClipRoomData(): Promise<ClipRoomProperties>;
}
Hierarchy (View Summary)
- ClipPlaneAPI
Methods
change Clipping Room
- changeClippingRoom(properties?: ClipRoomProperties): ClipRoomProperties
Parameters
Optionalproperties: ClipRoomPropertiesThe properties of the clip room you want change.
Returns ClipRoomProperties
An object with the changed properties.
- changeClippingRoom(
name?: string,
size?: number[] | Float32Array<ArrayBufferLike>,
transformation?: number[] | Float32Array<ArrayBufferLike>,
disabled?: boolean,
invisible?: boolean,
): ClipRoomProperties Parameters
Optionalname: stringThe name of the clip room.
Optionalsize: number[] | Float32Array<ArrayBufferLike>The size of the clip room.
Optionaltransformation: number[] | Float32Array<ArrayBufferLike>The transformation of the clip room.
Optionaldisabled: booleanThe disabled state of the clip room.
Optionalinvisible: booleanThe invisible state of the clip room.
Returns ClipRoomProperties
An object with the changed properties.
change Clip Plane
- changeClipPlane(
clipPlaneId: number,
properties: ClipPlaneProperties,
): ClipPlaneProperties Changes one or more properties of a clip plane with the specified id.
Parameters
- clipPlaneId: number
The id of the clip plane you want to change.
- properties: ClipPlaneProperties
The properties of the clip plane you want change.
Returns ClipPlaneProperties
An Object with the changed Properties.
- clipPlaneId: number
- changeClipPlane(
clipPlaneID: number,
normal?: number[] | Float32Array<ArrayBufferLike>,
point?: number[] | Float32Array<ArrayBufferLike>,
name?: string,
thickness?: number,
tangent?: number[] | Float32Array<ArrayBufferLike>,
disabled?: boolean,
invisible?: boolean,
exclusive?: boolean,
): void Changes the properties of the clip plane defined by the clipPlaneID with the optional parameters normal, points and name.
Parameters
- clipPlaneID: number
The ID of an existing clip plane which should be changed
Optionalnormal: number[] | Float32Array<ArrayBufferLike>The new normal of the clip plane
Optionalpoint: number[] | Float32Array<ArrayBufferLike>An arbitrary new point in space which lies on the clip plane
Optionalname: stringThe new name for the clip plane
Optionalthickness: numberThe thickness for the clip plane
Optionaltangent: number[] | Float32Array<ArrayBufferLike>The tangent of the clip plane
Optionaldisabled: booleanThe enabled state of the clip plane
Optionalinvisible: booleanInvisible on the UI
Optionalexclusive: booleanset the exclusive flag to clip geometry when using exclusiveClipplanes property
Returns void
- clipPlaneID: number
clip Other Parts
create Capping
- createCapping(clipPlaneId: number): Promise<void>
ExperimentalGenerates capping geometry for the surface that is cut by the clip plane. The generated surfaces allow measurements and all other operations which can be performed on usual geometry.
Parameters
- clipPlaneId: number
the id of the clip plane
Returns Promise<void>
- clipPlaneId: number
create Clipping Room
- createClippingRoom(properties?: ClipRoomProperties): void
Creates a new clip room.
Parameters
Optionalproperties: ClipRoomPropertiesInitial properties of the created clip room.
Returns void
- createClippingRoom(
name?: string,
size?: number[] | Float32Array<ArrayBufferLike>,
transformation?: number[] | Float32Array<ArrayBufferLike>,
disabled?: boolean,
invisible?: boolean,
): void Parameters
Optionalname: stringThe name of the clip room.
Optionalsize: number[] | Float32Array<ArrayBufferLike>The size of the clip room.
Optionaltransformation: number[] | Float32Array<ArrayBufferLike>The transformation of the clip room.
Optionaldisabled: booleanThe disabled state of the clip room.
Optionalinvisible: booleanThe invisible state of the clip room.
Returns void
create Clip Plane
- createClipPlane(properties?: ClipPlaneProperties): number
Creates a new clip plane.
Parameters
Optionalproperties: ClipPlanePropertiesInitial properties of the created clip plane.
Returns number
The id of the newly created clip plane.
- createClipPlane(
normal?: number[] | Float32Array<ArrayBufferLike>,
point?: number[] | Float32Array<ArrayBufferLike>,
name?: string,
thickness?: number,
tangent?: number[] | Float32Array<ArrayBufferLike>,
disabled?: boolean,
invisible?: boolean,
exclusive?: boolean,
): number Creates a clip plane defined by the plane’s normal, positioned at an optional point (otherwise at the world space origin) and an optional name. Returns the ID of the clip plane.
Parameters
Optionalnormal: number[] | Float32Array<ArrayBufferLike>The normal of the clip plane
Optionalpoint: number[] | Float32Array<ArrayBufferLike>An arbitrary point in space which lies on the clip plane
Optionalname: stringThe name of the clip plane
Optionalthickness: numberThe thickness of the clip plane
Optionaltangent: number[] | Float32Array<ArrayBufferLike>The tangent of the clip plane
Optionaldisabled: booleanThe state of the clip plane
Optionalinvisible: booleanInvisible on the UI
Optionalexclusive: booleanset the exclusive flag to clip geometry when using exclusiveClipplanes property
Returns number
The ID of the newly created clip plane
disable Capping
enable Capping
get Clip Planes
get Clip Room
remove Capping
remove Clipping Room
- removeClippingRoom(safe?: boolean): RemoveState
Removes the clip room from the scene and all related Snapshots.
Parameters
Optionalsafe: booleanPerforms a safe remove which interrupt the removal process if the ClipRoom is part of one or more Snapshots.
Returns RemoveState
remove Clip Plane
- removeClipPlane(clipPlaneId: number, safe?: boolean): RemoveState
Removes a clip room with the specified id.
Parameters
- clipPlaneId: number
The id of the clip room you want to remove.
Optionalsafe: booleanPerforms a safe remove which interrupt the removal process if the ClipPlane is part of one or more Snapshots.
Returns RemoveState
- clipPlaneId: number
request Clip Plane Data
- requestClipPlaneData(clipPlaneId: number): Promise<ClipPlaneProperties>
Returns the ClipPlaneData for the specified clip plane id.
Parameters
- clipPlaneId: number
The id of the clip plane you want to request the data for.
Returns Promise<ClipPlaneProperties>
The requested clip plane data.
- clipPlaneId: number
request Clip Room Data
- requestClipRoomData(): Promise<ClipRoomProperties>
Returns the ClipRoomData.
Returns Promise<ClipRoomProperties>
The requested clip room data.
Changes one or more properties of the clip room.