4.3.0 Change Notes
Table of contents:
- Geometry
- ECSql enhancements
- Node 20 support
- Electron 27 and Electron 28 support
- Element aspects require locking
- Display
Geometry
Clip any curve
The new ClipUtilities.clipAnyCurve clips any CurvePrimitive
, Path
, or BagOfCurves
and any region including any Loop
, ParityRegion
, or UnionRegion
. One just needs to pass AnyCurve
and a Clipper
and the functions collect portions of any curve that are within the clipper into an array of any curves and returns the array.
ECSql enhancements
Instance properties
ECSQL supports querying instance properties, which are any property in a class selected in ECSql or its derived classes.
ECSQL Instance Properties Documentation
Window functions
ECSQL now supports window functions. This functionality adds the following new keywords that might collide with alias, parameter, property or class names and may break existing queries. Applications should escape those names (or try escaping all names in their queries) to be on the safe side in the future.
CURRENT
EXCLUDE
FILTER
FOLLOWING
GROUPS
LAG
LEAD
NO
NTILE
PARTITION
PRECEDING
RANGE
ROW
ROWS
TIES
UNBOUNDED
Node 20 support
iTwin.js now officially supports Node 20 starting with LTS version of 20.9.0. Node 20 support is in addition to Node 18, not a replacement.
Electron 27 and Electron 28 support
In addition to already supported Electron versions, iTwin.js now supports Electron 27 and Electron 28.
Element aspects require locking
Inserting, updating or deleting an aspect now requires the exclusive lock be held on its element. This is a new requirement to prevent conflicts that may result in corrupt changesets. Before changes may be made to an element's aspects, you must now acquire its exclusive lock (see IModelDb.LockControl.acquireLocks
).
Display
Colorizing clip intersections
Geometry which intersects clip volumes can now be colorized with ClipStyle.intersectionStyle. The images below illustrate this effect, first with the intersection style turned off, second with it turned on.
You can toggle this colorization on and off using ClipStyle.colorizeIntersection. The style of this colorization can be controled using ClipStyle.intersectionStyle by defining a ClipIntersectionStyle. ClipIntersectionStyle.color defines the color to apply to the intersecting geometry, and ClipIntersectionStyle.width defines the number of pixels considered to be intersecting the clip volume, which will therefore be colorized. The image below illustrates an altered ClipStyle.intersectionStyle, with ClipIntersectionStyle.color set to red, and ClipIntersectionStyle.width set to 5.
Thematic transparency
ThematicDisplay colorizes surfaces in a view using a gradient produced from a list of Gradient.KeyColors and a margin color. Each of these colors has a transparency value. However, thematic display has always entirely ignored the gradient's transparency values, using the transparency of the surface itself instead.
Now, you can use ThematicGradientSettings.transparencyMode to specify that the transparency of both the surface and the gradient color should be combined to produce the final transparency value.
Analysis style transparency
An AnalysisStyle colorizes surfaces in a view using a gradient produced from a list of Gradient.KeyColors and a margin color. These colors are intended to entirely override the color of every surface to which the style is applied. However, the transparency of the gradient colors has never been consistently applied. That oversight has now been addressed - the transparency of the surface is ignored in favor of the transparency of the gradient color.
Note: ThematicGradientSettings.transparencyMode has no effect on analysis styles.
Last Updated: 15 May, 2024