Compile Time Changes

K2Creator changes

Data catalogue behaviors (K2XpToDataControllerBehavior) will now use the 'Code' field from Smart Objects (XpSnapperSpawner) as part no. The Part No field on XpDataBehavior is no longer used, but remains to make the transition easier.

cm/abstract/k2/assortment.cm

Removed: K2Assortment::public K2StyleStore styleStore

cm/abstract/k2/k2CatalogAccess.cm

Old: extend public K2PropDef propDef(XpPropDef def) {
New: extend public K2PropDef propDef(XpPropDef def, XpShape shape) {

cm/abstract/k2/k2Property.cm

Old: public constructor(XpPropDef xpPropDef) {
New: public constructor(XpPropDef xpPropDef, XpShape shape) {

cm/abstract/k2/k2StyleStore.cm

Removed: public class K2StyleStore

cm/abstract/k2/xpDefinitions.cm

Old: public Class{} allNonAbstractSubclasses(Class definition) {
New: private Class{} allNonAbstractSubclasses(Class definition) {

Removed: public Class[] runtimeGetAllXpDefinitions() {
Removed: public void checkXpDefinitions() { }

cm/abstract/k2/k2SnapperSpawner.cm

Old: public class K2SnapperSpawner extends SnapperSpawner : inherit constructors {
New: public class K2SnapperSpawner extends SnapperSpawner : abstract, inherit constructors {

cm/abstract/k2/xpToK2.cm

Removed: public K2PropDef toK2PropDef(XpPropDef xpPropDef, K2Assortment assortment=null) {

Old: public PropDef toK2(XpPropDef xpPropDef, K2Assortment assortment=null) {
New: public PropDef toK2(XpPropDef xpPropDef, XpShape shape, K2Assortment assortment=null) {

Old: public PropInputSetting toK2(XpPropInputSetting xpPropInputSetting, XpPropDef xpPropDef, str label=null) {
New: public PropInputSetting toK2(XpPropInputSetting xpPropInputSetting, XpPropDef xpPropDef, XpShape shape, str label=null) {

Removed: public Object k2Default(XpPropDef xpPropDef) {

cm/abstract/k2/behavior/k2BehaviorStreamRenamer.cm

Old: extend public K2Behavior process(K2Behavior unstreamed, K2Assortment assortment) {
New: extend public K2Behavior[] process(K2Behavior unstreamed, K2Assortment assortment) {

cm/abstract/k2/behavior/k2ShapeInvalidationEnv.cm

Old: public class K2ShapeInvalidationEnv extends K2InvalidationEnv {
New: package class K2ShapeInvalidationEnv extends K2InvalidationEnv {

cm/abstract/k2/data/k2DataCatalogAccess.cm

Old: public K2PropDef propDef(XpPropDef def) {
New: public K2PropDef propDef(XpPropDef def, XpShape shape) {

cm/abstract/k2/engine/k2AlternativeFunctions.cm

Old: public XpShape[] findAlternatives(K2AlternativeEngine this, Line mouseLine=null, Point2D p=null, Space space=null) {
New: public XpShape[] findAlternatives(K2AlternativeEngine this, Snapper existing, Line mouseLine=null, Point2D p=null, Space space=null) {

cm/abstract/k2/face/xpFaceToFaceFilter.cm

Removed: XpFaceIntersectFilter::public bool excludeEdges

cm/abstract/k2/face/xpGeometricFaceOps.cm

Old: K2ExcludeNotInCornerToCornerFaceOp::public LayerExpr corner0
New: K2ExcludeNotInCornerToCornerFaceOp::public LayerExpr corner0LayerExpr

Old: K2ExcludeNotInCornerToCornerFaceOp::public LayerExpr corner1
New: K2ExcludeNotInCornerToCornerFaceOp::public LayerExpr corner1LayerExpr

Old: K2ExcludeNotInCornerToCornerFaceOp::constructor(LayerExpr corner0=null, LayerExpr corner1=null)
New: K2ExcludeNotInCornerToCornerFaceOp::constructor(LayerExpr corner0LayerExpr, LayerExpr corner1LayerExpr)

cm/abstract/k2/library/k2Library.cm

Removed: K2Library::extend public str splitStr(str s, int length) {

Old: public constructor(LayerExpr expr=null, str sortKey=null, function() viewModeHook=function k2SetDefaultViewModes) {
New: public constructor(LayerExpr expr=null, str sortKey=null, function() viewModeHook=function k2SetDefaultViewModes, int maxVisibleSpawners=20) {

cm/abstract/k2/library/k2GeneralLibrary.cm

Removed: K2GeneralLibrary::extend public void addProjectInfoLimb(LibraryLimb parent) {

cm/abstract/k2/library/k2InsertNodeChooser.cm

Removed: K2InsertNodeChooser::public K2InsertNodeFinder finder

cm/abstract/k2/library/k2InsertNodeFinder.cm

Removed: public class K2InsertNodeFinder

cm/abstract/k2/worktop/k2WorktopCandidateFaces.cm

Old: public XpFace[] worktopCandidateFacesToShapeAlternativeFaces(XpFace[] candidates, LayerExpr faceFilter, WindowView view) {
New: public XpFace[] buildWorktopCandidateFaces(XpFace[] faces, LayerExpr candidateTag, WindowView view) {

Old: public void bridgeWorktopCandidateFaces(XpFace[] candidates) {
New: private void bridgeWorktopFaces(XpFace[] candidates) {

Old: public void adaptAdaptableWorktopFaces(XpFace[] faces) {
New: private void adaptAdaptableWorktopFaces(XpFace[] faces) {

cm/abstract/k2/worktop/k2SoffitCandidateFaces.cm

Old: public XpFace[] soffitCandidateFacesToShapeAlternativeFaces(XpFace[] candidates, LayerExpr faceFilter, WindowView view) {
New: package XpFace[] buildSoffitCandidateFaces(XpFace[] faces, LayerExpr faceFilter, WindowView view) {

cm/abstract/k2/worktop/k2WorktopAlternatives.cm

Old: public XpWorktopShape k2DefaultWorktopShapeAlternative(XpFace[] candidateFaces, XpFace[] joints, Line mouseLine=null, Point2D p=null, double z=0, LayerExpr layer=null) {
New: package XpWorktopShape defaultWorktopAlternative(WorktopAlternativeEnv env) {

Old: public XpWorktopShape k2ExtendBackWorktopShapeAlternative(XpFace[] candidateFaces, XpFace[] joints, Line mouseLine=null, Point2D p=null, double z=0, LayerExpr layer=null) {
New: package XpWorktopShape extendBackWorktopAlternative(WorktopAlternativeEnv env) {

Old: public XpWorktopShape k2ExtendOverlappingBackWorktopShapeAlternative(XpFace[] candidateFaces, XpFace[] joints, Line mouseLine=null, Point2D p=null, double z=0, LayerExpr layer=null) {
New: package XpWorktopShape extendOverlappingBackWorktopAlternative(WorktopAlternativeEnv env) {

Old: public XpWorktopShape k2MergedAndJoinedWorktopShapeAlternative(XpFace[] candidateFaces, XpFace[] joints, Line mouseLine=null, Point2D p=null, double z=0, LayerExpr layer=null) {
New: package XpWorktopShape mergedAndJoinedWorktopAlternative(WorktopAlternativeEnv env) {

Old: public XpWorktopShape k2ExtendSideWorktopShapeAlternative(XpFace[] candidateFaces, XpFace[] joints, Line mouseLine=null, Point2D p=null, double z=0, LayerExpr layer=null) {
New: package XpWorktopShape extendSideWorktopAlternative(WorktopAlternativeEnv env) {

Old: public XpWorktopShape createWorktopShapeAlternativeWithJoints(XpFace[] faces, Line mouseLine=null, Point2D p=null, double z=0, XpFace[] joints=null) {
New: public XpWorktopShape createWorktopShapeAlternativeWithJoints(WorktopAlternativeEnv env, XpFace[] faces) {

cm/abstract/k2/worktop/k2WorktopLayout.cm

Removed: extend public double frontOverhang() {
Removed: extend public double sideOverhang() {
Replaced with K2WorktopOverhangModifier (behavior).

cm/abstract/k2/worktop/k2WorktopModifierBehavior.cm

Old: extend public void modifyFaces(K2Snapper owner, XpFace[] faces) {
New: extend public void modifyFaces(K2Snapper owner, XpFace[] faces, WindowView view) {

cm/abstract/k2/worktop/worktopFeatureFaces.cm

Old: public XpFace[] k2GenericSnapperShapeWorktopFaces(K2Snapper snapper, symbol engineTag, double z, double h, double overhang) {
New: package XpFace[] k2GenericSnapperShapeWorktopFaces(K2Snapper snapper, symbol engineTag, double z, double h) {

Old: public XpFace[] k2AdaptableFrontGapWorktopFaces(K2Snapper snapper, symbol engineTag, double z, double h, double overhang) {
New: package XpFace[] k2AdaptableFrontGapWorktopFaces(K2Snapper snapper, symbol engineTag, double z, double h) {

Old: public XpFace[] k2AdaptableFrontAndSideWorktopFaces(K2Snapper snapper, symbol engineTag, double z, double h, double overhang) {
New: package XpFace[] k2AdaptableFrontAndSideWorktopFaces(K2Snapper snapper, symbol engineTag, double z, double h) {

cm/abstract/k2/worktop/k2BacksplashCutoutsEngine.cm

Old: public class K2GenericInvalidateFun extends K2EngineInvalidateFun {
New: private class K2GenericInvalidateFun extends K2EngineInvalidateFun {

Old: public class K2AppendArchitecturalCutoutsFun extends K2EngineFun {
New: private class K2AppendArchitecturalCutoutsFun extends K2EngineFun {

cm/abstract/k2/xp/xpAnglePropDef.cm

Old: public Object default() {
New: public Object default(XpShape shape) {

Old: public XpDomain domain() {
New: public XpDomain domain(XpShape shape) {

cm/abstract/k2/xp/xpBehaviorPropDef.cm

Old: public Object default() {
New: public Object default(XpShape shape) {

Old: public XpDomain domain() {
New: public XpDomain domain(XpShape shape) {

cm/abstract/k2/xp/xpBool.cm

Old: extend public SubSet subset() {
New: extend public SubSet subset(XpShape shape) {

Old: public SubSet subset() {
New: public SubSet subset(XpShape shape) {

cm/abstract/k2/xp/xpBoolPropDef.cm

Old: public Object default() {
New: public Object default(XpShape shape) {

Old: public XpDomain domain() {
New: public XpDomain domain(XpShape shape) {

cm/abstract/k2/xp/xpBoolSelector.cm

Old: public Object default() {
New: public Object default(XpShape shape) {

cm/abstract/k2/xp/xpDataMaterialPropDef.cm

Old: public Object default() {
New: public Object default(XpShape shape) {

cm/abstract/k2/xp/xpFace.cm

XpFace now now supports bent faces, i.e a face is described by an arc rather than a line. The bend of the face is controlled by the relativeBendTangentAngle member.

Most things should work the same way for straight faces (whether a face is straight can be checked with isStraight()), but you must be mindful that a face now describes an arc when you use it. For example, a point between p0 and p1 might not be on the face, if it isn't straight.

Because of this, some of its methods has changed name and/or behavior.

Old: final public point center()

// midPoint describes the center between p0 and p1, i.e the old center() if you ignore the bend of the face.
// The midPoint isn't necessarily located on the face.
New: final public point midPoint()

// bendZenith describes the center of the arc of the face.
// For straight faces, this is the same as midPoint().
New: final public point2D bendZenith()
Old: final public double length()

// The actual length of the worktop, considering the bend.
// Always greater than or equal to the old length().
// Equals the old length() for straight faces.
New: final public double length()

// The length of the straight line from p0 to p1
// Same as the old implementation of length().
// Equals the new length() as well as the old for straight faces.
New: final public double backLength() 
Old: final public bool contains(point2D& p, double precision=1e-6)

// The new implementation ignores the bend of the line. It works exactly the same as before.
// Might not be what you want.
New: final public bool straightContains(point2D& p, double precision=1e-6)

// Returns the distance between a point and the face, including bend.
New: final public double distance(point2D p)
Old: final public rect bound()
New: final public box  bound(double thickness=0)
New: final public rect bound2D(double thickness=0)

cm/abstract/k2/xp/xpFaceShapeDef.cm

Old: public constructor(XpFace face) {
New: public constructor(XpFace face, XpMeasureBasePropDef def) {

cm/abstract/k2/xp/xpFeaturePropDef.cm

Old: public Object inputAttributes() {
New: public Object inputAttributes(XpShape shape) {

cm/abstract/k2/xp/xpGenerateStrPropDef.cm

Old: public Object default() {
New: public Object default(XpShape shape) {

cm/abstract/k2/xp/xpLayoutPropDef.cm

Old: public Object default() {
New: public Object default(XpShape shape) {

Old: public XpDomain domain() {
New: public XpDomain domain(XpShape shape) {

cm/abstract/k2/xp/xpMaterialPropDef.cm

Old: public Object inputAttributes() {
New: public Object inputAttributes(XpShape shape) {

Old: public Object default() {
New: public Object default(XpShape shape) {

Old: public XpDomain domain() {
New: public XpDomain domain(XpShape shape) {

cm/abstract/k2/xp/xpMeasure.cm

Old: extend public Object default() {
New: extend public Object default(XpShape shape) {

Old: extend public SubSet subset() {
New: extend public SubSet subset(XpShape shape) {

Old: public Object default() {
New: public Object default(XpShape shape) {

Old: public SubSet subset() {
New: public SubSet subset(XpShape shape) {

Old: public constructor() {
New: public constructor(XpMeasureBasePropDef def) {

cm/abstract/k2/xp/xpMeasurePropDef.cm

Old: public str->Object inputArgs() {
New: public str->Object inputArgs(XpShape shape) {

Old: public Object default() {
New: public Object default(XpShape shape) {

Old: public SubSet domain() {
New: public SubSet domain(XpShape shape) {

Old: public class XpMeasurePropDef extends XpPropDef {
New: public class XpMeasurePropDef extends XpMeasureBasePropDef {

cm/abstract/k2/xp/xpPanelShapeDef.cm

Old: public XpPropInputSetting propInputSetting(str key) {
New: public XpPropInputSetting propInputSetting(str key, XpShape shape) {

cm/abstract/k2/xp/xpPropDef.cm

Old: extend public Object inputAttributes() {
New: extendpublic Object inputAttributes(XpShape shape) {

Old: extend public str->Object inputArgs() {
New: extend public str->Object inputArgs(XpShape shape) {

Old: extend public Object default() {
New: extend public Object default(XpShape shape) {

Old: extend public XpDomain domain() {
New: extend public XpDomain domain(XpShape shape) {

Old: extend public SubSet subset() {
New: extend public SubSet subset(XpShape shape) {

cm/abstract/k2/xp/xpPropDefArgs.cm

Old: extend public str->Object args(XpPropDef def) : abstract { }
New: extend public str->Object args(XpPropDef def, XpShape shape) : abstract { }

Old: public str->Object args(XpPropDef def) {
New: public str->Object args(XpPropDef def, XpShape shape) {

cm/abstract/k2/xp/xpRsStr.cm

Removed: public class XpParentRsStr

cm/abstract/k2/xp/xpShapeDef.cm

Old: extend public XpPropInputSetting propInputSetting(str key) {
New: extend public XpPropInputSetting propInputSetting(str key, XpShape shape) {

cm/abstract/k2/xp/xpSnapperSpawnerPropDef.cm

Old: public Object default() {
New: public Object default(XpShape shape) {

Old: public SubSet domain() {
New: public SubSet domain(XpShape shape) {

cm/abstract/k2/xp/xpSplitPanelShapeDef.cm

Old: public XpPropInputSetting propInputSetting(str key) {
New: public XpPropInputSetting propInputSetting(str key, XpShape shape) {

cm/abstract/k2/xp/xpStylePropDef.cm

Old: public Object default() {
New: public Object default(XpShape shape) {

Old: public SubSet domain() {
New: public SubSet domain(XpShape shape) {

cm/abstract/k2/xp/xpStyleSelector.cm

Old: public Object default() {
New: public Object default(XpShape shape) {

cm/abstract/k2/xp/xpUserStrPropDef.cm

Old: public Object default() {
New: public Object default(XpShape shape) {

Old: public SubSet domain() {
New: public SubSet domain(XpShape shape) {

cm/abstract/k2/xp/xpWorktopLayout.cm

Removed: XpWorktopLayout::public double frontOverhang
Removed: XpWorktopLayout::public double sideOverhang

Runtime/Behavior Changes

K2Creator changes

XpWorktopTypeBehavior has been deprecated* Instead, the thickness property should be defined on the worktop shape, and the material should be defined on the worktop graphics behavior.

K2Worktop2DBehavior, k2Worktop3DBehavior and K2Backsplash2DBehavior have all been deprecated*. Instead a new behavior called K2WorktopGfxBehavior will replace all of them.

*Deprecated behaviors will remain in 14.0 and should keep functioning. But they are planned to be entirely removed in 14.5.