ModelClipGroups Class

Describes how to clip groups of models in the context of a ViewDefinition3d or ViewState3d. Each group will be clipped by the ClipVector associated with the group to which it belongs. A model belongs to the first group in the list for which ModelClipGroup.includesModel() returns true. A catch-all group can be defined by a ModelClipGroup with an undefined array of model Ids; any model whose Id does not appear in any group's list would belong to this group. If a catch-all group exists, it should appear last in the list. A group of models can be exempted from clipping by a ModelClipGroup with an undefined ClipVector.

note A ModelClipGroups obtained from a ViewDetails3d should not be modified directly. Clone it instead and modify the clone.

see ViewDetails3d.modelClipGroups to define the clip groups for a ViewDefinition3d or ViewState3d.


Name Description
constructor(groups: ModelClipGroup[] = []): ModelClipGroups Create a new ModelClipGroups.  
clone(): ModelClipGroups Create a deep copy of this ModelClipGroups.  
findGroup(modelId: Id64String): ModelClipGroup | undefined Find the first group to which the specified model Id belongs, if any.  
findGroupIndex(modelId: Id64String): number Returns the array index of the group to which the specified model belongs, or -1 if the model belongs to no group.  
getClipForModel(modelId: Id64String): ClipVector | undefined Find the clip that should be applied to the specified model.  
toJSON(): ModelClipGroupProps[] Convert to JSON representation.  
fromJSON(props: ModelClipGroupProps[] | undefined): ModelClipGroups Static Create from JSON representation.  


Name Type Description
groups ModelClipGroup[] The groups of models and their associated clips.  

Defined in

Last Updated: 05 April, 2021