Fixing and Freezing Geometric Objects
Any geometric object created in the constraint system is initially free, i.e. it has all the degrees of freedom inherent to particular object type. During calculations, the C3D Solver may change the state of geometric objects when it is needed to satisfy the constraints. Sometimes it is necessary to fix a part of geometric objects so that the solver would leave the position of the geometric object unchanged. For this purpose, the GCE API can call methods that can freeze or fix the geometric object. Only the application can change the state of frozen or fixed geometric objects by calling
GCE_SetPointXY и GCE_SetCoordValue.
It is useful to freeze geometric objects when it is required to fix some part of the drawing. For example, in CAD systems a part of drawing geometry might be created by projecting a 3D model, and therefore it will be permanently linked with it by a unilateral associative link: 3D model -> flat projection.
A geometric object can be frozen using
bool GCE_FreezeGeom(GCE_system gSys, geom_item g).
The method will return true, if the geometric object g became actually frozen. It should be noted that freezing is not considered a constraint, so the value returned by the GCE_IsConstrainedGeom method does not depend on whether the object was frozen. The degree of freedom of a frozen object is zero.
An alternative method used to fix a geometric object for the solver is to set object fixing constraint using
constraint_item GCE_FixGeom(GCE_system gSys, geom_item g).
The function fixes the object g belonging to the gSys constraint system and returns the descriptor of newly added “object fix” constraint. Unlike GCE_FreezeGeom, this method creates a constraint that can be deleted at any moment by the GCE_RemoveConstraint method used to release the object. The fixing constraint is also described in Item Unary Constraints: Horizontality/Verticality and Fixing Variants.