Driving dimensions

Driving dimensions are dimension constraints that determine a distance or angle between two geometric objects and, therefore, add numeric parameters to a geometric scene that control the positions of its objects. By modifying the dimension parameters, you can control the model state and create different variants of parametric model instances.

Driving dimensions can be created using the following calls: GCM_AddDistance, GCM_AddAngle, and GCM_FixRadius. The main purpose of driving dimensions is to control the positions of geometric objects using the numeric parameter of length, radius, or angle. Note, that constraints of patterns created using the GCM_AddGeomToPattern method also relate to driving dimensions, since the pattern elements are also characterized by numeric parameters that determine their linear or angular positions.

Function

GCM_result GCM_ChangeDrivingDimension(GCM_system gSys, GCM_constraint dItem, double dVal)   

facilitates modification of any value of the dItem dimension and, therefore, control of the state of the parametric model.

Input parameters of the call:

  • gSys – constraint system of the parametric model;

  • dItem – dimension constraint descriptor;

  • dVal – new diameter value set in length units for distance dimensions or in radians for angle dimensions.

Returned values:

  • GCM_RESULT_Ok for successful operations;

  • GCM_RESULT_ItsNotDrivingDimension means that the returned constraint is not driving dimensions or a driving parameter, for example, if the constraint is a variational dimension.

  • GCM_RESULT_None or GCM_RESULT_Unregistered are returned if the delivered gSys or dItem descriptors are invalid.

Note, that this function does not calculate anything, just prepares the change of the driving dimension. You should call GCM_Evaluate for the change to come into effect. If you need to modify two or more driving dimensions at the same time, first make a series of GCM_ChangeDrivingDimension calls to each of them and then call GCM_Evaluate once.