4.2.0 Change Notes

Table of contents:

Geometry

Clip any curve

The new method ClipUtilities.clipAnyCurve clips the input curve or region. One just needs to pass an AnyCurve and a Clipper, and the method returns the clipped curves or regions that lie inside the clipper.

Here is an example of clipping a union region: Clip union region and an example of clipping a parity region: Clip parity region

Drape region onto mesh

The new method PolyfaceClip.drapeRegion computes the portion of the input Polyface that lies inside the clipper generated by sweeping the input AnyRegion along a direction. For example, the red polygon below is swept downward onto the white mesh, and the green mesh is returned:

Draped region

Electron 26 support

In addition to already supported Electron versions, iTwin.js now supports Electron 26.

Locating and serializing schemas

New APIs like SchemaLoader allow you to locate schemas in the context of an iModel. You can serialize schemas using the new functions SchemaXml.writeFile and SchemaXml.writeString.

API deprecations

@itwin/appui-abstract

UiEvent is a duplicate of BeUiEvent. UiEventDispatcher is only consumed internally from SyncUiEventDispatcher in @itwin/appui-react, which should be used in its place. Similarly, UiSyncEventArgs and [UiSyncEvent] have been also moved to appui-react.

PointProps was created primarily to avoid a dependency on @itwin/core-geometry, which contains an identical interface named XAndY. PointProps is now deprecated in favor of XAndY, or your own simple implementation. Similarly, UiAdmin.createXAndY has been deprecated.

Alpha API Removals

@itwin/appui-abstract

isLetter has been removed. Should you need that functionality, please implement it in your own code.

Last Updated: 25 October, 2023