Overview

PickShape Changes

Some classes and methods associated with REDPicker3D have been updated to include a new default, optional parameter checkForPickSurface=false to allow developer greater control over whether pick surfaces are detected during picking operations.

Note that the previous implementation implies a value of checkForPickSurface=true, while the new optional parameter defaults to checkForPickSurface=false to be consistent with other existing methods. Simply add or change the parameter to true to retain previous behavior.

Compile Time Changes

cm.core.parttag.partTagsInWorld

highlightedPartTagCategory, highlightedPartTag and tagToBeUsedAtInsert are now all changed from globals to getter and setter functions that takes a World argument.

The reason for the change is to store the parttag on the world instead of globally to prevent memory leaks on new drawing.

old: public PartTagCategory highlightedPartTagCategory;

/**
 * Highlighted tag category (selected in tagging dialog).
 */
new: public PartTagCategory highlightedPartTagCategory(World world) {
    return world.?getCached("highlightedPartTagCategory").?PartTagCategory;
}
new: public void setHighlightedPartTagCategory(World world, PartTagCategory tag) {
    world.?putCached("highlightedPartTagCategory", tag);
}

old: public PartTag highlightedPartTag;

/**
 * Highlighted tag (selected in tagging dialog).
 */
new: public PartTag highlightedPartTag(World world) {
    return world.?getCached("highlightedPartTag").?PartTag;
}
new: public void setHighlightedPartTag(World world, PartTag tag) {
    world.?putCached("highlightedPartTag", tag);
}

old: public PartTag tagToBeUsedAtInsert;


/**
 * Tag to be used at insert (selected in tagging dialog).
 */
new: public PartTag tagToBeUsedAtInsert(World world) {
    return world.?getCached("tagToBeUsedAtInsert").?PartTag;
}
new: public void setTagToBeUsedAtInsert(World world, PartTag tag) {
    world.?putCached("tagToBeUsedAtInsert", tag);
}

Primitive3D changes

Optimization of primitive move command to just change the 'pos' on the transform instead of creating a new transform.

Added: public Primitive3D unsafeFastMove(vectorF v); 

Added: public Primitive3D unsafeFastMove(vector v); 

Added: public Primitive3D unsafeFastMove(vector2D v);

The methods to handle this and core3D package now uses these method for move(..).

Deprecated CorePropObj methods

The following method in CorePropObj has been deprecated since 12.5 and is now removed:

   Removed: extend public void orderFactoryProperties(CoreProperties properties) 
   Use: extend public void postBuildOrderProperties(PropertyOrder order, CoreProperties properties)

PropDefs and PropInputSetting attributes

Traditionally the attributes of PropInputSettings and PropDefs have always been sync-ed during the building of core properties G2. This has been changed in 13.5 so that the attributes you provide to your PropInputSettings will no longer be copied over to your propDef's attribute set, to better separate the responsibilities between the two concepts.

If you previously have #symDef defined as an attribute in your propDef's PropInputSetting, consider putting it directly in your propDef instead. With the props syntax you could also define it as below to achieve the same result:

/**
* Props
*/
public props {
    "w" : sym=true;
}

However, we still provide some public methods to access the different attributes - you may refer to the method headers for information:

// cm/props/advanced/preCorePropObj.cm
public symbol{} allDefAttributes(PropObj this, PropDef def)
public str->Object getPropsWithDefAttribute(PropObj this, symbol attr)
public symbol{} getSettingAttributes(PropObj this, PropDef def, Object env=null)

PriceChangeEnv

Added PriceChangeEnv ( cm/core/calculation.cm ) affecting the following:

//Package: cm.core.calc
Old: public bool refreshArticleViews(World world, bool validate, function():bool interrupt, bool force)
New: public bool refreshArticleViews(World world, bool validate, PriceChangeEnv env)

//Package: cm.core.itemTag
Old: public bool updateWorldItemTags(World world, bool validate, function():bool interrupt, bool force)
New: public bool updateWorldItemTags(World world, bool validate, PriceChangeEnv env)

//Package: cm.core
Old: public alias priceChangedFun = (function(World world, bool validate, function():bool interruptget, bool force):bool)
New: public alias priceChangedFun = (function(World world, bool validate, PriceChangeEnv env):bool)

Old: public bool rebuildNativePartList(World world, bool validate, function():bool interrupt, bool force)
New: public bool rebuildNativePartList(World world, bool validate, PriceChangeEnv env)

Runtime/Behavior Changes

Pick Shape Changes

The following classes and methods associated with REDPicker3D have been updated to include a new default, optional parameter checkForPickSurface=false to allow developer greater control over whether pick surfaces are detected during picking operations.

Please note that the previous implementation implies a value of checkForPickSurface=true, while the new optional parameter defaults to checkForPickSurface=false to be consistent with other existing methods. Simply add or change the parameter to true to retain previous behavior.

REDPicker3D

    removed: extend public REDPick pickShape(REDShape shape, Object z, lineF ln, angle coneAngle=0deg, pointF cameraLoc=pointF()) {
    added: extend public REDPick pickShape(REDShape shape, Object z, lineF ln, angle coneAngle=0deg, pointF cameraLoc=pointF(), bool checkForPickSurface=false) {
    
    removed: extend public PickIntersection3D[] pick(line ln, bool visible=true, bool findPickedType=false, Object[] objectsToPickFrom=null, bool allowRemoveClipped=true) {
    added: extend public PickIntersection3D[] pick(line ln, bool visible=true, bool findPickedType=false, Object[] objectsToPickFrom=null, bool allowRemoveClipped=true, bool checkForPickSurface=false) {

your propDef’s attribute set,

REDCorePicker3D

    removed: extend public PickIntersection3D[] envPick(FindObjectsEnv env, line ln, bool visible=true, bool findPickedType=false, Object[] objectsToPickFrom=null, ClassSubSet subset=null) {
    added: extend public PickIntersection3D[] envPick(FindObjectsEnv env, line ln, bool visible=true, bool findPickedType=false, Object[] objectsToPickFrom=null, ClassSubSet subset=null, bool checkForPickSurface=false) {

View3D

    removed: extend public PickIntersection3D[] envPick(FindObjectsEnv env, ClassSubSet subset=null) {
    added: extend public PickIntersection3D[] envPick(FindObjectsEnv env, ClassSubSet subset=null, bool checkForPickSurface=false) {

PropsScheme 13.5 changes

In 13.5, all newly saved .cmScheme files will have 2 additional suffixes appended to the filename by default:

Scheme Group name Extension name (a.k.a. systemName) The main reason behind this is to have a clearer identifier in the scheme filename to indicate which manufacturer and extension the scheme comes from.

Take Fika Scheme as example:

  • Fika Scheme is under Group "FAM"
  • Fika Scheme's extension name is "Fika"
  • User created a new scheme labelled as "MyFikaScheme"

Output filename when saved:

  • MyFikaScheme.FAM.Fika.cmScheme Some extensions might have slightly lengthy group or extension names, and it might not look too good when they are appended as part of filename. For this reason, we have added new methods in PropsScheme class to allow customization on the group and extension naming for filename:

cm/core/propsScheme/propsScheme.cm

added: extend public str groupAbbreviation() {
added: extend public str systemNameAbbreviation() {

Updates to dll.geometry

Updated hash methods for box, boxF, line, line2D, lineF, lineF2D, plane, planeF, pointI, rectl and sizel to avoid hash collisions.

  old: export inline int hash(box& z, double precision=1e-6) {
      return (hash(z.p0, precision) ^ (4 << hash(z.p1, precision)));
  }
 new: export inline int hash(box& z, double precision=1e-6) {
      return (hash(z.p0, precision) ^ rotateRight(hash(z.p1, precision), 4));
  }