Fixing and freezing 3D geometric objects

Any geometric object created in the constraint system is initially free, i.e. it has all the degrees of freedom inherent to a 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, API GCM supports two methods: GCM_FreezeGeom, GCM_FixGeom_, freezing and fixing. Both calls fix a geometric object using different methods. Only the application can change the state of frozen and fixed geometric objects using the GCM_SetPlacement call.

Freezing is convenient when you need to fix a geometric object for its entire lifetime or temporarily. For example, when adding a new part to an assembly, it is convenient to bind it to other assembly elements from the very beginning. You can position a part using constraints, but other assembly objects are better remaining in the same places. Then, when adding an object we can freeze all assembly elements to which the new part is being bound. Once the positioning is finished, the freezing is disabled. A geometric object can be frozen using the following method:

void GCM_FreezeGeom(GCM_system gSys, GCM_geom g)

Note that freezing is not a constraint. It makes the respective object fixed for the solver within the coordinate system where the object was defined using GCM_AddGeom and GCM_SubGeom methods. The result of the GCM_FreezeGeom call can be cancelled by calling

void GCM_FreeGeom(GCM_system gSys, GCM_geom g)  

which releases the g object and returns its degree of freedom.

An alternative method to fix a geometric object for the solver is to create a constraint that fixes the object within the global coordinate system using the following function:

GCM_constraint GCM_FixGeom_(GCM_system gSys, GCM_geom g)    

The function returns the descriptor of the new constraint which totally fixes the g object within the World Coordinate System. The result of this call is cancelled by the GCM_RemoveConstraint call, i.e. removed as a normal constraint.

So, there are two aspects that differ freezing and fixing using GCM_FixGeom_:

  • Freezing GCM_FreezeGeom removes degrees of freedom of the object without creating a new constraint;

  • If a frozen geometric object is added using GCM_SubGeom, the solver leaves its position fixed but only within the LCS of the cluster where it had been declared; the Global degree of freedom of a frozen sub-object is determined by the degree of freedom of its cluster.