Multi Chair Placement
Multi Chair Placement enhances the placement of chairs so they can automatically be placed around a table. When placing a chair from the toolbox, hover the chair above a Worksurface and it will show the placement of the chosen chair around the whole table.
Worksurface Methods
In Worksurface
in Abstract Office, there are 3 methods are relevant to this functionality:
/** * Allow multi chair placement. */ extend public bool allowMultiChairPlacement() { return false; }
/** * Mulit chair spacing. */ extend public double multiChairSpacing(Snapper chair) { return 29.5inch; }
/** * Chair placer. */ extend public ChairPlacer chairPlacer(Snapper chair) { }
Chair
The Chair
class may need to implement the following methods:
/** * Multi chair insert position. */ extend public point multiChairInsertPoint() { return tableSnap ? tableSnap.pos : (0, 0, 0); } /** * Multi chair insert rotation. */ extend public angle multiChairInsertRot() { return tableSnap ? tableSnap.rot.yaw : 0deg; }
The ChairPlacer Class
The ChairPlacer
class instantiates a temporary (unstreamable) object that are used during the InsertAnimation of a Chair
. The ChairPlacer
class should be filled in with information about how to place chairs around a specific worksurface/table using the method in Worksurface
(or overriden to handle other types of Snappers).
It contains 1 or more SnapperPlacerItem
that are created in chairPlacer()
in Worksurface
(or overriden to handle other types of Snappers) and describes how a specific chair should be placed.
These two classes resides in cm/abstract/office/chairPlacer.cm
Customization Needs
If your Tables/Worksurfaces are inheriting from the abstract office class Worksurface
, the base coding that needs to be done on the Table is:
/** * Allow multi chair placement. */ public bool allowMultiChairPlacement() { return true; }
If not, similar code to that found in Worksurface
must be implemented in the base class.
If the chair 0-point and/or rotations does not match the standard in abstract office, the multiChairInsertPos()
and multiChairInsertRot()
should be implemented from the Chair
.
Comments
0 comments
Please sign in to leave a comment.