Compile Time Changes

class K2AlternativeValidateFun

Removed: findNearbyOwners(Snapper{} ownerCandidates, Snapper->Snapper{} existing)

Consider using e.g. nearbySnappersWithAutoAdopt(K2Snapper this, LayerExpr tag) instead, to get owners near a certain snappers. If you want all nearby owner candidates, use K2AlternativeValidateFun.findOwnerCandidates(Snapper snapper, Snapper->Snapper{} existing) instead.

class K2WorktopEdgeBendAnimation

Various terms used in properties, variable names, and methods were renamed to be more descriptive. Few public interfaces were affected:

Old: bendAngle property
New: arcTangentAngle property
Old: bendDistance property
New: arcHeight property
Old: bendRadius property
New: arcRadius property

Xp classes made abstract

The following xp classes have been made abstract since they are not intended to be instantiated.

Old: public class XpBool
New: public class XpBool : abstract
Old: public class XpMaterialAccess
New: public class XpMaterialAccess : abstract
Old: public class XpMeasure
New: public class XpMeasure : abstract
Old: public class XpMoldingHeight
New: public class XpMoldingHeight : abstract
Old: public class XpNode
New: public class XpNode : abstract
Old: public class XpNodePositioning
New: public class XpNodePositioning : abstract
Old: public class XpNodeSizing
New: public class XpNodeSizing : abstract
Old: public class XpRsStr
New: public class XpRsStr : abstract
Old: public class XpSnapAnimationBehavior extends XpAnimationBehavior
New: public class XpSnapAnimationBehavior extends XpAnimationBehavior : abstract
Old: public class XpStr
New: public class XpStr : abstract

Straight corner cabinet changes

The following classes have been made abstract:

Old: public class K2CabinetGfxBehavior extends K2Behavior
New: public class K2CabinetGfxBehavior extends K2Behavior : abstract

The following classes have been deprecated:

Old: public class XpStraightCornerShape2 extends XpShape
New: public class XpStraightCornerShape2 extends XpShape : deprecated
Old: public class XpStraightCornerShapeDef2 extends XpShapeDef
New: public class XpStraightCornerShapeDef2 extends XpShapeDef : deprecated
Old: public class XpStraightCornerGfxBehavior2 extends XpCabinetGfxBehavior
New: public class XpStraightCornerGfxBehavior2 extends XpCabinetGfxBehavior : deprecated

Instead, the following classes should be used. The new shape have separate measure properties for covers and fillers. It's recommended to create a new straight corner cabinet snapper in K2Creator using the new classes. That way saved drawings will not change upon being loaded.

New: public class K2StraightCornerGfxBehavior3 extends K2CabinetGfxBehavior
New: public class XpStraightCornerShape3 extends XpShape
New: public class XpStraightCornerShapeDef3 extends XpShapeDef

class K2DataSymFileGfxBehavior

Old: public void applyXpLayout(XpLayout layout, XpShape parentShape, SymNode root)
New: public void applyXpLayout(XpLayout layout, XpShape parentShape, SymNode root, XpShapeTree shapeTree=null)

Use toShapeTree() to get the shapeTree for the snapper you're applying the layout to.

class K2InsertNodeChooser

Old: public str lastStructureKey
New: public str lastPreviewCacheKey

The package-visible k2StructureKey was removed, and a previewCacheKey was added to K2Snapper. This field also had its name changed to reflect this.

class XpLayout (and child classes)

Old: XpNodeRes[] eval(XpShape parentShape, XpLayoutNode node, str->XpShape[] existing)
New: XpNodeRes[] eval(XpShape parentShape, XpLayoutNode node, str->XpShape[] existing, XpShapeTree shapeTree=null)

Old: XpNodeRes[] allPossible(XpShape parentShape, XpShape shape)
New: allPossible(XpShape parentShape, XpShape shape, XpShapeTree shapeTree=null)

Old: public XpNodeRes eval(XpShape parentShape, XpNodeRes res)
New: public XpNodeRes eval(XpShape parentShape, XpNodeRes res, XpShapeTree shapeTree=null)

Use toShapeTree() to get the shapeTree for the snapper you're evalutating the layout on. null is an acceptable value if no such snapper exists.

class XpLayoutAccess (and child classes)

Old: public XpNodeRes[] eval(XpShape parentShape, XpLayoutNode node, str->XpShape[] existing)
New: public XpNodeRes[] eval(XpShape parentShape, XpLayoutNode node, str->XpShape[] existing, XpShapeTree shapeTree=null)

See section on class XpLayout for context.

class XpListItem

Old: str partNo
New: XpStr returnValueWhenTrue

XpListItem previously had a field typed as str named partNo. It is now typed as XpStr and called returnValueWhenTrue for more a descriptive name, and to support non-fixed strings. If you were using the partNo field, please used the returnValueWhenTrue instead, with an XpFixedString containing the value previously in partNo.

class XpShape

Old: public str[] dataForValueHash()
Old: public str valueHash()
New: public str previewCacheKey(double distancePrecision, angle anglePrecision)

Removed: public XpShape copyWithMeasuresOnly()

previewCacheKey(distancePrecision=0, anglePrecision=0deg) is a good replacement for valueHash(). Both provide a representation of the shapes value. The former is different though, containing more data which defines the shapes structure.

copyWithMeasuresOnly was no longer needed, and was therefore removed.

cm/abstract/k2/k2InsertNodePreviewSnapperSpawner.cm

Old: public constructor(K2SnapperSpawner parentSpawner, K2InsertNodeRef childNodeRef)
New: public constructor(K2SnapperSpawner parentSpawner, K2Snapper parent, K2InsertNodeRef childNodeRef)

cm/abstract/k2/k2Property.cm

Removed: public void k2PropagatePropChanged(Snapper snapper, str key, Object value, Object env)

cm/abstract/k2/animation/k2FaceAnimation.cm

Old: public class XpFaceAnimation extends ToolAnimationG2
New: public class XpFaceAnimation extends ToolAnimationG2 : abstract
Old: extend public XpFace[] getAlternativeFaces()
New: extend public XpFace[] alternativeFaces() : abstract
Removed: public XpFace[] alternativeFaces;
Removed: extend public void updateAlternativeFaces(Snapper snapper)
Removed: extend public XpFace[] findAlternativeFaces(Snapper{} snappers=null)
Removed: extend public LayerSet faceAlternativeFilter()
Removed: public void candidateChanged(Snapper old)

cm/abstract/k2/worktop/k2WorktopJointAnimation.cm

Old: public class K2WorktopJointAnimation extends XpFaceAnimation
New: public class K2WorktopJointAnimation extends XpFaceAnimation : abstract
Old: final public XpFace[] getWorktopFaces()
New: final public XpFace[] worktopFaces()
Old: final public XpFace[] getJointFaces()
New: final public XpFace[] jointFaces()
Removed: public XpFace[] worktopFaces;
Removed: extend public XpFace[] jointAlternatives(XpFace[] worktopFaces)

cm/abstract/k2/engine/k2AlternativeValidateFunction.cm

Removed: extend public Snapper{} findNearbyOwners(Snapper{} ownerCandidates, Snapper->Snapper{} existing)

cm/abstract/k2/behavior/k2AutoLightEngineBehavior.cm

Old: public class K2AutoLightAppendExisitingFun extends K2EngineAppendExistingFun
New: public class K2AutoLightAppendExistingFun extends K2EngineAppendExistingFun

cm/abstract/k2/engine/k2EngineFun.cm

Old: extend public bool shouldHideExisting(Snapper exisiting)
New: extend public bool shouldHideExisting(Snapper existing)

cm/abstract/k2/face/xpFaceToFaceFilter.cm

Removed: public bool excludeEdges;
Old: public constructor(bool excludeEdges=false)
New: public constructor()

cm/abstract/k2/library/k2Library.cm

Removed: public str->int visibleSpawnerStartIndex;
Removed: public str->int visibleSpawnerMaxIndex;
Removed: private void updateSpawnersPage(Control c, bool nextPage=true)
Removed: private void showNextSpawnersCB(Control c)
Removed: private void showPreviousSpawnersCB(Control c)
Old: extend public LibraryLimb addSearchLimb(LibraryLimb parent)
New: extend public void addSearchLimb(LibraryLimb parent)

cm/abstract/k2/library/k2PageLimb.cm

Removed: public class K2PageLimb extends LibraryLimb

cm/abstract/k2/node/k2InsertNodeRef.cm

Removed: public constructor(K2SnapperSpawner spawner, XpNodeRes res, K2LayoutBehavior layout, K2SnapperSpawner parentSpawner=null)

cm/abstract/k2/node/k2LayoutHandleInsertAnimationBehavior.cm

Removed: extend public void putHandle(K2Snapper handle, K2LayoutHandleInsertAlternative alt)
Removed: extend public Snapper{} getTargetsWithoutAlternatives(AnimationMouseInfo mi, K2Snapper handle)
Removed: extend public void putHandleToTargets(Snapper{} targets, K2Snapper handle)
Removed: package bool anyIntersect(symbol{} set1, symbol{} set2)

cm/abstract/k2/panel/k2Panel.cm

Removed: extend public K2Cabinet nearestCabinet(K2Panel{} visited=null)

cm/abstract/k2/worktop/k2Worktop.cm

Removed: extend public str groupKey()
Removed: extend public void edgePropertyChanged(K2WorktopEdge edge, str key, Object value, Object oldValue)
Removed: extend public str->K2WorktopEdge{} edgeGroups()

cm/abstract/k2/xp/xpFace.cm

Removed: final public rect bound()

cm/abstract/k2/worktop/k2WorktopBuiltInPosFun.cm

Old: public class K2WorktopBuiltInPosAppendExisitingFun extends K2EngineAppendExistingFun
New: public class K2WorktopBuiltInPosAppendExistingFun extends K2EngineAppendExistingFun

cm/abstract/k2/worktop/k2WorktopEdge.cm

Removed: extend public K2WorktopEdgeStyleBehavior style()
Removed: extend public GMaterial3D material()
Removed: extend public str groupKey()

cm/abstract/k2/worktop/k2WorktopEdgeStyleBehavior.cm

Removed: public class K2WorktopEdgeStyleBehavior extends K2Behavior

cm/abstract/k2/worktop/K2WorktopEdgeOperationsMenuBehavior.cm

Removed: final private void updateVesselsVisibility(Space space)

Runtime/Behavior Changes

Cabinet insert previews cache

Previews for cabinet inserts are now cached on a fuzzy basis: A cabinet with similar shape to one already cached will reuse the preview. Two cabinets count as similar if their shapes have the same previewCacheKey(). Note that the user can always clear their cache through the "Clear cached images" button in the Essential Kitchen EU library.

K2AlternativeValidateFunction

Due to a bug, alternatives would spread through any snappers it existed on before the update (regardless of their auto adoption flags), if it had at least one snapper next to it that was auto adopting. It now respects snappers auto adoption state as it should.

This will also cause alternatives to not spread to snappers unless they've been invalidated. Verify that your alternatives (custom implemented moldings/worktops/soffits for example) updates as they should when invalidated through e.g. a #connect event.

If your code relied on this bug to force snappers to update, you might need to make sure that more of your snappers than before are invalidated. Call <snapper>.invalidateBehaviorsIfRequired(...) with #connect or #propagatedConnect as the argument to invalidate them. See cm/abstract/k2/molding/k2AutoMoldingBehavior.cm for an example of this.

K2WtBuiltInPlacementBehavior

K2WtBuiltInPlacementBehavior used to automatically add K2AutoWorktopBuiltInPosBehavior to snappers spawned by its spawner. This no longer happens automatically.

In K2Creator, please add a basic K2AutoWorktopBuiltInPosBehavior behavior to each spawner that uses K2WtBuiltInPlacementBehavior. This is needed for its graphics to update properly as alignment is changed.

K2CategoryBehavior changes

K2CategoryBehavior is now added to all snappers by default from K2SnapperSpawner.gatherBehaviors(). If it has been manually added in K2Creator it needs to be removed from the catalog.

Multiple assortments

For appliances we now support selecting inserts from multiple assortments. To utilize this feature the properties for the insert need to be on the root insert snapper and the insert needs to manage the connection to the catalog for those properties. To make the front responsible for its properties it needs a behavior that has set to true.

Removed reduntant updateSymByRebuild

Removed updateSymByRebuild from K2CabinetGfxBehavior::userPropertyChanged. Should no longer be needed since updateSym gets called after every shape prop change.

XpLengthPartQuantity

XpLengthPartQuantity has been renamed to XpCutRunningMeterPartQuantity and XpRunningMeterPartQuantity has been added.

XpRunningMeterPartQuantity gives a quantity equal to the length of the measure. XpCutRunningMeterPartQuantity gives a quantity equal to the number of articles of a given length that are needed.