editor › Globals › MeshChangeEvent
Class: MeshChangeEvent
A MeshChangeEvent is emitted after a MeshOperation has modified one or more meshes. Each modified mesh emits a MeshChange event for itself.
Hierarchy
- MeshChangeEvent
Implements
Index
Constructors
Properties
Constructors
constructor
+ new MeshChangeEvent(mesh: Mesh, succeedingMeshes: Mesh[], firstImplementationOnNegativeSide?: boolean, scale?: number, mirror?: IMirrorMapping): MeshChangeEvent
Defined in src/model/data/Concepts/Mesh/MeshChangeEvent.ts:55
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
mesh |
Mesh | - | the mesh that was modified |
succeedingMeshes |
Mesh[] | [mesh] | defaults to [mesh], @see MeshChangeEvent.succeedingMeshes |
firstImplementationOnNegativeSide? |
boolean | - | @see MeshChangeEvent.firstImplementationOnNegativeSide |
scale? |
number | - | the scale change that happened |
mirror? |
IMirrorMapping | - | the mirror change event supplied in modify |
Returns: MeshChangeEvent
Properties
Optional Readonly firstImplementationOnNegativeSide
• firstImplementationOnNegativeSide? : boolean
Defined in src/model/data/Concepts/Mesh/MeshChangeEvent.ts:39
For split operations, provide information on which side of the split plane this implementation lies
Optional Readonly mirror
• mirror? : IMirrorMapping
Defined in src/model/data/Concepts/Mesh/MeshChangeEvent.ts:55
For mirror operations, provide information about the mapping of old to mirrored edges. PointOnSurfaceAnchors and MeshEdgeAnchors can re-find themselves by simply looking into the map and directly getting the mirrored surface (just look for any edge in map and get surface from that) and edge.
For more details and reasons to use this datatype check out: https://gitlab.dev.kyub.io/laser-project/general-issues/-/issues/3781
Optional Readonly scale
• scale? : number
Defined in src/model/data/Concepts/Mesh/MeshChangeEvent.ts:45
For scale operations, provide information about the relative scale change. E.g. scale = 2 indicates that the Mesh was scaled up by a factor of 2.
Readonly source
• source: Mesh
Implementation of IModelElementEvent.source
Defined in src/model/data/Concepts/Mesh/MeshChangeEvent.ts:20
This is the mesh where the event comes from
Readonly succeedingMeshes
• succeedingMeshes: Mesh[] = []
Defined in src/model/data/Concepts/Mesh/MeshChangeEvent.ts:34
This array contains the meshes that "exist" after a change. Possible cases are:
- The mesh was just modified: in this case, succeedingMeshes contains one mesh, which is the source mesh again.
- The mesh was merged with another mesh and is now contained in the "instance" of the other mesh. In this case, succeeding meshes contains the other mesh.
- This mesh was split up into several meshes. All of the split-apart meshes are in succeedingMeshes (the "source" instance may be re-used).
- This mesh is now empty, e.g. because surfaces have been removed or it was the subtrahend of a difference operation and has been removed from the other mesh. In this case, succeedingMeshes is empty.