Book Contents | Previous Chapter | Next Chapter
Search STEP Tools Web Support

4.1             Concept

The Tolerance object is used to create and manipulate tolerance data. Applications that can be implemented using the tolerance object include:

 

1.      Finding the tolerances in an AP-203 Edition 2 or AP-214 file.

2.      Making tolerances for an AP-203 Edition 2 or AP-214 file.

3.      Generating probing operations to measure points related to a tolerance value.

4.      Computing relationships between tolerances and tools so that tolerance errors can be compensated in the next round of machining.

 

The Tolerance object uses the APT object to read and write data so any program that contains the tolerance object must also contain the APT object.

 

The Tolerance object combines CAD and CAM system data to enable new functionality on the CNC. CAM systems define a process for making a part that includes information, given either implicitly or explicitly, about which faces are being machined in each operation. CAD systems define tolerance constraints that are applied to faces in the part. The Tolerance object provided navigation functions that bridges the two information domains so that:

 

·        You can find the probing operations that test the location of each face.

·        You can find the tolerances that are applied to each face.

·        You can compute a measured value for each tolerance using the results of the associated probing operations.

·        Or you can use a guage or other device to measure the tolerance directly.

 

Next:

 

·        You can find the tool that is responsible for maching each face

·        You can use the geometry of the face to deduce which edge of the tool is being used for the machining.

·        You can use the type of the tolerance and the geometry of the face to deduce a compensation value that will correct the tolerance error in the next round of machining.

·        Alternatively, you can use functionality in the Tolerance object to compute these compensations automatically.

 

The following figure shows how the functions in the Tolerance object enable the functionality. In the figure a subset of the entities defined in the STEP-NC model are shown. These entities are the ones that provide the key functionality for the tolerance object. The functions that navigate between those entities are shown with an arrow in the direction of the navigation.

 

NavigateToolToWorkingstep

 

 

The datum entity defines one or more faces that are a reference point for a tolerance. See the AddTolerance functions for a description of how each tolerance uses its datums.

 

The Tolerance entity defines a constraint on the part being machined. A tolerance is applied to one or more faces. If a tolerance is geometric then it may have one or more datums.

 

A face entity defines a region on the surface of a part. Face is the key entity that is shared between the CAD and the CAM data.

 

A geometry entity defines a mathematical surface such as a plane, cylinder or b-spline. Measurements are made by comparing the mathematical definition of the surface with the definition that can be computed by measuring points on the surface.

 

A workingstep entity defines a machining operation that is applied to one or more faces.  If there are errors in the tolerances applied to a face then it must have been caused by errors in the machining process defined by the workingstep.

 

A cutting tool is used by a workingstep to machine a feature on the part. If there are errors in the tolerances then those errors are most likely caused by wear on the cutting tools and geometric reasoning performed by an application or by the DLL can correct the tolerances by compensating for the wear.

 

A probing workingstep is a speial type of workingstep that uses a probe to touch a part. The difference between the expected value of the touch point and the actual value of the point can be used as the “raw” material for evaluating the faces, measuring the tolerances and compensating the tools.

 

The figure shows some of the functions in the Tolerance object. In the figure the functions that begin with “Get” define functionality that was put into the STEP-NC data model during its definition. The functions that begin with “Navigate” are value added provided by the Tolerance object. These functions were implicit in the STEP-NC model and they are defined explicitly in the DLL to enable the evaluation, measurement and compensation functionality.

 

4.2             Finding tolerance data

The following code segment shows how to find the tolerances in a workpiece and print out their type and current value. The program starts by using the APT object to read the AP-203 file into the workpiece. The program then finds the number of tolerances and loops over each tolerance printing its value for a geometric tolerance and a surface texture parameter, or its lower and upper limits for a size dimension and location dimension.

 

apt->Workpiece ("example.stp");

int wp_id = apt->GetCurrentWorkpiece ();

int count = tol->GetWorkpieceToleranceCount (wp_id);

printf ("Tolerance count is %d\n", count);

double value, lower, upper;

 

for (int i = 0; i < count; i++) {

   int tol_id = tol->GetWorkpieceToleranceNext (wp_id, i);

   CString type = tol->GetToleranceType (tol_id);

   value = tol->GetToleranceValue (tol_id);

 

   if (tol->IsSizeDimension (tol_id) ||

tol->IsLocationDimension (tol_id)) {

      tol->GetTolerancePlusMinus (tol_id, &lower, &upper);

      printf ("lower = %f, upper = %f, type = %s\n",

value + lower, value + upper, type);

   }

   else if (tol->IsGeometricTolerance(tol_id) ||

tol->IsSurfaceTextureParameter (tol_id)) {

         printf ("value = %f, type = %s\n", value, type);

   }

}

 

There are four types of tolerances in STEP. Geometric tolerances such as flatness define a tolerance value. Size dimension tolerances such as Diameter_size_dimension define a dimension wth an upper and lower bound. Location dimension tolerances define a distance between two items also using an upper and lower bound. Surface texture parameter tolerances define the allowed properties for a surface using a tolerance value.  You can argue that only Geometric Tolerances are “real” tolerances but all four types count as tolerances within the context of the functionality of the Tolerance object.

 

The figure below lists the types of tolerances allowed in each category.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4.3             Finding toleranced surfaces

Each tolerance is applied to one or more surfaces. The following program shows how to find these toleranced surfaces.  It also prints out the geometric type of each surface. In this example the data is read from an AP-238 file and all of the geometry models in that file are searched including the workpieces, rawpieces, fixtures and cutting tools.

 

apt->Open238 ("example.238");

int count = tol->GetToleranceAllCount ();

printf ("Tolerance count is %d\n", count);

for (int i = 0; i < count; i++) {

   int tol_id = tol->GetToleranceAllNext (i);

   int count2 = tol->GetToleranceFaceCount (tol_id);

   printf ("Face count for tol at id %d is %d\n\t",

              tol_id, count2);

   for (int j = 0; j < count2; j++) {

      int fid = tol->GetToleranceFaceNext (tol_id, j);

      CString type = tol->GetFaceMeasureGeometryType (fid);

      printf ("%s ", face_type);

   }

   printf ("\n");

}

 

Location dimension tolerances have both a source and target set of faces. The GetToleranceFaceCount/Next functions return both sets of faces. If your program needs to be more specific then use the GetToleranceFaceOriginCount/Next and GetToleranceFaceTargetCount/Next functions.

 

The faces in a tolerance are important for many reasons. When a tolerance is tested using a guage or probes the testing is implemented by measuring the surfaces of the faces. When tolerances are corrected by changing tool compensations, the tool to be corrected is found by comparing the faces in the tolerance with the faces in the features being machined by the tool.

 

4.4             Finding the Datum’s of geometric tolerances

The datum of a tolerance defines reference geometry that is used in the measurement of the tolerance. The following program lists out the datums of each tolerance on the fixture. The GetCurrentFixture function of the APT object is used to get the identity of the fixture. Only geometric tolerances have datums. If one of the other kinds of tolerances is used as the argument for the GetToleranceDatumCount then the result returned will be 0.

 

apt->Open238 ("example.238");

int wp_id = apt->GetCurrentFixture ();

int count = tol->GetWorkpieceToleranceCount (wp_id);

printf ("Tolerance count is %d\n", count);

for (int i = 0; i < count; i++) {

   int td = tol->GetWorkpieceToleranceNext (wp_id, i);

   int count2 = tol->GetToleranceDatumCount (tol_id);

   printf ("Datum count for tol at id %d is %d\n\t",

tol_id, count2);

   for (int j = 0; j < count2; j++) {

      CString l = tol->GetToleranceDatumNextLabel (td, j);

      int p = tol->GetToleranceDatumNextPrecedence (td, j);

      printf ("(%s %d)", l, p);

   }

   printf ("\n");

}

 

Datums also have a set of one or more faces. You can get the faces of a datum using the GetDatumFaceCount/Next functions. These functions require a datum_id which is delivered by the GetToleranceDatumNext function.

 

4.5             Defining tolerances

STEP data containing tolerances is not yet widely available from CAD vendors. Therefore, many applications will need to create their own tolerances. This can be done using the user interface of the STEP-NC Explorer or using the AddToleranceXXX functions of the DLL which are also used by the Explorer.

 

Some of the AddTolerance functions require datum’s. The following code fragment uses the GetFaceXXX functions to define faces for three datums and then creates a position tolerance of value 0.1 that uses the three datums. The last parameter of the AddTolerancePosition function names the three datums. This function and all of the other functions to make geometric tolerances assume the datums will be given by names that consist of a single letter.  If this condition cannot be met then the datums must added individually using the AddDatumToTolerance function. The C datum has the Maximum Material Condition modifier set.

 

    tol->AddDatum ("A", tol->GetFaceTop());

    tol->AddDatum ("B", tol->GetFaceLeft());

    tol->AddDatumMax ("C", tol->GetFaceFront());

    tol->AddTolerancePosition (tol->GetFaceBottom (),

0.1, "ABC");

 

The next code fragment builds a diameter size tolerance. The code finds all the cylinders in the file and applies the same tolerance to every cylinder which may not be very realistic. Size dimension tolerances do not require datum’s.

 

int count = tol->GetFaceAllCount ();

printf ("File contains %d faces\n", count);

for (int i = 0; i < count; i++) {

   int fid = tol->GetFaceAllNext (i);

   CString type = tol->GetFaceMeasureGeometryType (fid);

   if (type == "cylindrical_surface") {

      int gid = tol->GetFaceMeasureGeometry (fid);

      double rad = tol->GetMeasureGeometryRadius (gid);

      tol->AddToleranceSizeDiameter (fid, 2 * rad,

0.01, -0.005);

   }

}

 

Our last code fragment for this section creates a linear distance tolerance. This code illustrates how to create a tolerance with origin and target faces. It also shows how to create a tolerance that applies to multiple faces using a Callout. A Callout is a collection of faces on a workpiece. Every tolerance is applied to a Callout but most callout’s only contain one face so the callout is created implicitly by the functions.  In this code we use the AddFaceToCalloutAdd function to add a second face to the Callout created for the origin. Location dimension tolerances also do not require datums.

 

int origin = tol->GetFaceTop();

tol->AddFaceToCalloutAdd (source, tol->GetFaceLeft ());

int target = tol->GetFaceFront ();

tol->AddToleranceDistanceLinear (origin, target,

10, 0.01, -0.02);

 

4.6             Defining Probing Operations

Probes are an on machine device to test the location of a point. By defining a probing operation a program can determine the difference between the actual and predicted location of the point and use the difference to determine the accuracy of a tolerance.

 

The following progam fragement defines a profile tolerance for every b_spline surface in the workpiece and then picks twenty points on each surface for probing. The probing operations are put into a nested workplan and each of these workplans is added to the start of the main workplan.

 

int wp_id = apt->GetCurrentWorkpiece ();

int plan_id = apt->GetCurrentWorkplan ();

int count = tol->GetWorkpieceFaceCount (wp_id);

printf ("File contains %d faces in piece at %d\n",

count, wp_id);

for (int i = 0; i < count; i++) {

   int fid = tol->GetWorkpieceFaceNext (wp_id, i);

   CString type = tol->GetFaceMeasureGeometryType (fid);

   if (type == "b_spline_surface_with_knots") {

      tol->AddToleranceSurfaceProfile (face_id, 0.1, "");

      tol->PlanBSplineProbing (plan_id, -1, "test",

                                       face_id, 4, 5);

      break;

   }

}

4.7             Measurements

After a tolerance has been evaluated its measured value can be set using the PutToleranceMeasuredValue () function. The following code fragment illustrates by setting the current value of all of the tolerances defined for the workpiece to 5% more than their programmed value.

 

In general measuring tolerances can be quite complex. Depending on the type of the tolerance, and the type of the faces constrained by the tolerance, there may be a special type of device that can measure that tolerance (for example a circular_runout tolerance is measured by a special device),  or there may be an algorithm  that can compute a measured value for the tolerance by comparing the expected geometry of the faces with the actual geometry evaluated from the measurements made by touch probing.

 

int count = tol->GetWorkpieceToleranceCount (wp_id);

printf ("Workpiece contains %d tolerances\n", count);

for (int i = 0; i < count; i++) {

   int tol_id = tol->GetWorkpieceToleranceNext (wp_id, i);

   double value = tol->GetToleranceValue (tol_id);

   tol->PutToleranceMeasuredValue (tol_id, value * 1.05);

}

4.8             Defining the faces machined by a tool

Tool compensations are computed by finding the faces machinined by the tool and comparing them with the faces measured by a tolerance.

 

If the “raw” STEP-NC data created by combining AP-203 geometery with APT-CL files does NOT include a description of the faces being machined by each tool then this must be added. There are three methods for doing this in the STEP-NC DLL.

 

 

apt->Open238 ("example.238");

find->Open238 ("example.238");

int wp_id = find->GetMainWorkplan ();

int size = find->GetNestedExecutableCount (wp_id);

for (int i = 0; i < size; i++) {

   int exe_id = find->GetNestedExecutableNext (wp_id, i);

   printf ("i = %d, ws = %s\n", i,

find->GetExecutableName (exe_id));

   if (find->IsWorkingstep (exe_id))

      tol->AddFacesWithinThresholdToWorkingstep (exe_id,

 1.01);

}

Values are very rarely exact in CNC machining so the parameter “1.01” of the function defines a fudge factor that allowsa  face to be found if the gap distance between the tool and the face is within 1% of the diameter of the tool.

4.9             Finding the faces machined by a tool

After faces have been assigned to the workingsteps, several new navigation paths become available. In particular from a face we can find both the tools responsible for machining that face using the NavigateFaceToToolCount/Next functions, and the tolerances that constrain a face using the NavigateFaceToToleranceCount/Next functions.

 

The following code illustrates by iterating over all of the faces in a workpiece and listing  the tools and tolerances that apply to each face.

 

int count = tol->GetWorkpieceFaceCount (wp_id);

for (i = 0; i < count; i++) {

   int fid = tol->GetWorkpieceFaceNext (wp_id, i);

   int size = tol->NavigateFaceToToolCount (face_id);

   for (int j = 0; j < size; j++) {

      int tool_id = tol->NavigateFaceToToolNext (fid, j);

      printf ("Face at '%d' is machined by Tool at '%d'\n",

                                           fid, tool_id);

   }

   size = tol->NavigateFaceToToleranceCount (face_id);

   for (j = 0; j < size; j++) {

      int tid = tol->NavigateFaceToToleranceNext (fid, j);

      printf ("Face at '%d' is belongs to Tol at '%d'\n",

 fid, tid);

   }

}

 

4.10        Finding the tolerances machined by a tool

The connection between tools and tolerances enabled by their common faces allows other navigation functions to be implemented such as NavigateToleranceToToolCount/Next and NavigateToolToToleranceCount/Next. These functions combine the functionality of the navigation functions shown in the Figure of Section 4.1 and have the added advantage of removing duplicates from the result.

 

The following function illustrates by finding the tool(s) responsible for machining each tolerance in a STEP-NC file.

 

int count = tol->GetToleranceAllCount ();

for (int j = 0; j < count; j++) {

   int tol_id = tol->GetToleranceAllNext (j);

   int size = tol->NavigateToleranceToToolCount (tol_id);

   for (int j = 0; j < size; j++) {

      int tool_id = tol->NavigateToleranceToToolNext

                                           (tol_id, j);

      printf ("Tolerance '%d' is machined by Tool'%d'\n",

                                  tol_id, tool_id);

   }

}

 

If only one tool is responsible for machining a tolerance then obviously that tool is the one that must be compensated to correct the tolerance.

 

4.11        Determining the type of Compensation

For 2.5D machining the compensation required to correct a tolerance will depend on the type and direction of the face. If the face is a horizontal plane then the tool length should be compensated. If the face is a vertical plane or a cylinder then the tool diameter should be compensated.

 

The following code fragement gets the first surface in the first tolerance of the workpiece and if it is a plane determines if the plane is horizontal or vertical using a simple test on the value of the z axis.

 

int tol_id = tol->GetWorkpieceToleranceNext (wp_id, 0);

int face_id = tol->GetToleranceFaceNext (tol_id, 0);

 

double x, y, z, i, j, k, a, b, c;

int geo_id = tol->GetFaceMeasureGeometry (face_id);

CString type = tol->GetMeasureGeometryType (geo_id);

if (type == "plane") {

   tol->GetMeasureGeometryPlacement (geo_id, &x, &y, &z,

 &i, &j, &k, &a, &b, &c);

   if (k == 1 || k == -1)

      printf ("Tol '%d' is for a horizontal plane\n",

 tol_id);

   else

      printf ("Tol '%d' is for a vertical plane\n",

tol_id);

}

4.12        Determining the Compensation value

The method used to correct a tolerance depends on the type of the tolerance. In this section we will assume we are correcting a linear distance tolerance. Ideally the measured value of the tolerance should be at the mid-point of the lower and upper values.

 

wp_id = find->GetWorkpieceID ();

int tol_id = tol->GetWorkpieceToleranceNext (wp_id, 1);

if (!tol->IsLocationDimension (tol_id)) {

   printf ("'%d' is not a location distance dimension\n",

 tol_id);

   return 0;

}

 

double upper, lower;

tol->GetTolerancePlusMinus (tol_id, &lower, &upper);

 

long defined_set, measured_set, nominal_set, current_set;

double defined_value, measured_value,

double nominal_value, current_value;

measured_value = tol->GetToleranceMeasuredValue (tol_id,

          &defined_set, &measured_set, &defined_value);

if (!measured_set) {

   printf ("Tolerance at '%d' has no measured value\n",

tol_id); 

   return 0;

}

 

double mid_point_value = defined_value + (upper + lower)/2;

printf ("Measured value is %f desired value is %f\n",

measured_value, mid_point_value);

 

double compensate = measured_value - mid_point_value;

int tool_id = tol->NavigateToleranceToToolNext (tol_id, 0);

tol->GetToolCurrentLength (tool_id, &nominal_set,

 &current_set, &nominal_value);

printf ("Setting tool length to %f from %f\n",

              nominal_value, nominal_value - compensate);

tol->PutToolCurrentLength (tool_id,

nominal_value - compensate);

 

When the compensation value has been determined, the tool responsible for the tolerance is found and its length is adjusted because this is assumed to be a vertical tolerance for a planar face. The code also assumes the face being measured is the top one for the tolerance.

 

A more complete piece of code would have to test for all of these cases. A more robust solution is to use the TakeToolAdvice function to correct the tool compensations. This function compares all the toleances for all of the tools and computes a best order for making the compensations so that a compensation made for one face can be used to adjust the compensation for the next face.

 

4.13        AddDatum

The AddDatum function creates a new datum with the given label.

 

Arguments:

[in] label:                                           The name of the datum. Other functionality in the DLL will work best if this label is a single letter.

[in] face_id:                                       The identity of a face to be used in the datum.

 

Result:

The identity of the new datum.

 

Related Functions

AddDatumMax:                                 Creates a datum with the max condition.

AddDatumToTolerance:                    Adds a datum to a tolerance.

AddFaceToCalloutAdd:                    Adds a second, or third face etc. to a datum.

GetDatumCount/Next:                       Iterate over the datums in the project.

GetDatumUsingLabel:                        Finds a datum using its label.

GetToleranceDatumCount/Next         Iterate over the datums in a tolerance.

 

Common Errors:

Invalid identity. The system could not find the face.

 

4.14        AddDatumMax

The AddDatumMax function creates a new datum with the maximum material condition modifier. See AddDatum for a description of the arguments and results. See GetToleranceDatumNextModifer for a description of the datum modifiers allowed in STEP-NC.

 

4.15        AddDatumToTolerance

The AddDatumToTolerance function adds a datum to a tolerance with a given precedence.

 

Arguments:

[in] tol_id:                                          The identity of the tolerance that is have the datum.

[in] datum_id:                                    The identity of the datum.

[in] precedence:                                 The precedence to be given to the datum in this tolerance.

 

Result:

None

 

Related Functions

AddTolerancePosition:                       Creates a position tolerance.

AddDatum:                                        Creates a datum.

GetDatumCount/Next:                       Iterate over the datums in the project.

GetToleranceDatumCount/Next         Iterate over the datums in a tolerance.

GetDatumUsingLabel:                        Find a datum using its label.

 

 

Common Errors:

Invalid identity. The system could not find the tolerance or the datum.

 

4.16        AddFacesWithinThresholdToWorkingstep

The AddFacesWithinThresholdToWorkingstep function uses the tool paths in a working step to determine which faces should be added to the process feature in that workingstep.

 

Arguments:

[in] ws_id:                                         The identity of the workingstep.

[in] fudge_factor:                               A percentage to be applied to the tool diameter to allow for the selection of faces that are not quite touching the tool.  The default is 1.01 or 1%. This default will be used if the given fudge_factor is zero or less than zero.

 

Result:

None.

 

Related Functions

AddFaceToCalloutAdd:                    Add a face to any type of callout including the process feature in a workingstep.

AddFaceToCalloutRemove:               Remove a face from any type of callout including the process feature in a workingstep

AddFaceToCalloutRemoveAll:          Remove all the faces from any type of callout including the process feature in a workingstep

 

 

Common Errors:

Invalid identity. The system could not find the workingstep.

 

4.17        AddFaceToCalloutAdd

Adds a face to a callout. The callout can be a datum, a tolerance or a feature. The callout is most commonly identified by giving the identity of a face already in the callout.

 

Arguments:

[in] callout_id:                                    The identity of a workingstep, tolerance, datum or face. If a face is given then the system will look for a callout containing the face or make a new callout.

[in] face_id                                        The face to be added to the callout.

 

Result:

None.

 

Related Functions

AddFaceToCalloutRemove               Remove a face from any type of callout.

AddFaceToCalloutRemoveAll           Remove all the faces from any type of callout.

 

 

Common Errors:

Invalid identity. The system could not find the face.

 

 

4.18        AddFaceToCalloutRemove

Removes a face from a callout. The callout can be a datum, a tolerance or a feature. The callout is most commonly identified by giving the identity of a face already in that callout.

 

Arguments:

[in] callout_id:                                    The identity of a workingstep, tolerance, datum or face. If a face is given then the system will look for a callout containing the face.

[in] face_id                                        The face to be removed from the callout.

 

Result:

None.

 

Related Functions

AddFaceToCalloutAdd                     Add a face to a callout.

AddFaceToCalloutRemoveAll           Remove all the faces from a callout.

 

 

Common Errors:

Invalid identity. The system could not find the face.

 

4.19        AddFaceToCalloutRemoveAll

Removes all the faces a face to a callout. The callout can be a datum, a tolerance or a feature.

 

Arguments:

[in] callout_id:                                    The identity of a workingstep, feature, tolerance or datum.

 

Result:

None.

 

Related Functions

AddFaceToCalloutAdd:                    Add a face to a callout.

AddFaceToCalloutRemove:               Remove a face from a callout.

 

Common Errors:

Invalid identity. The system could not find the callout.

 

4.20        AddSurfaceTextureParameter

Create a new surface texture parameter. See the GetSurfaceTextureParameter functions for a description of the parameters. The AddSurfaceTextureParameter function adds the new parameter to the current workpiece. If the parameter needs to be added to a different type of workpiece such as the rawpiece, fixture or cutting tool then it should be imported and exported as the workpiece using the APT functionality and then imported as the required type of workpiece.

 

Arguments:

[in] face_id:                                       The identity of a face, workingstep, tolerance, datum or feaure. If a face is given then the system will look for a callout containing the face or make a new callout.

[in] parameter_name:                         The name of the parameter e.g. “Ra” see GetSurfaceTextureParameterName for a description of the allowed names.

[in] value:                                           The value of the texture. The unit will be micoinches if the APT object is currently in inch mode and micrometers if the APT object is currently in millimeter mode.

[in] measurement_method:                 The ISO standard that defines the measurement method e.g. “ISO 2487” see the GetSurfaceParameterMeasurementMethod function for a description of the allowed measurement methods.

 

Result:

None.

 

Related Functions

IsSurfaceTextureParameter                Returns true if a tolerance is a surface texture parameter.

GetSurfaceTextureParameterMeasuringMethod

                                                         Returns the standard that defines the measurement method: “ISO 4287”, “ISO 12085” or “ISO 13565”.

GetSurfaceTextureParameterName

                                                         Returns the name of the surface texture parameter.

GetSurfaceTextureParameterValue

                                                         Returns the value.

GetSurfaceTextureParameterValueUnit

                                                         Returns the unit of the value.

GetToleranceFaceCount/Next           Returns the faces in a surface texture parameter.

 

Common Errors:

Invalid identity. The system could not find the callout or face.

 

4.21        AddToleranceAngularity

Create a new angularity tolerance. See the figure below. The size of the angle (25 degree’s) in the example below is computed by examining the underlying geometry in the toleranced face and the datum.  The tolerance describes the range in which the toleranced face must exist if the part is to be considered correct.

 

 

Arguments:

[in] face_id:                                       The identity of the face (or callout) to be toleranced.

[in] value:                                           The size of the tolerance zone (0.08 in above figure)

[in] datums:                                        A list of datums given as a string (“A” in the above figure). Each datum name must be given as a single letter and must correspond to the name of a datum in the model.

 

Result:

Tol_id:                                               The identity of the new tolerance.  

 

Related Functions

GetToleranceValue                            Returns the defined value of a tolerance.

GetToleranceMeasuredValue:            Returns the measured value of a tolerance

GetToleranceFaceCount/Next           Iterate over the faces in a tolerance.

GetToleranceDatumCount/Next         Iterate over the datums in a tolerance.

GetToleranceType                             Returns the type “ANGULARITY_TOLERANCE”

 

 

Common Errors:

Invalid identity  The system could not find the callout or face.

Invalid datum                The system could not find a datum for one of the letters in the datums argument

 

4.22        AddToleranceCircularRunout

Create a new circular runout tolerance. See the figure below. The tolerance zone defines a maximum and minimum range for the path of the circle created by rotating the feature.

 

 

Arguments:

[in] face_id                                        The identity of the face (or callout) to be toleranced.

[in] value                                           The size of the tolerance zone (0.08 in above figure)

[in] datums                                        A list of datums given as a string (“AB” in the above figure). Each datum name must be given as a single letter and must correspond to the name of a datum in the model.

 

Result:

Tol_id                                               The identity of the new tolerance.  

 

Related Functions

GetToleranceValue                            Returns the defined value of a tolerance.

GetToleranceMeasuredValue:            Returns the measured value of a tolerance

GetToleranceFaceCount/Next           Iterate over the faces in a tolerance.

GetToleranceDatumCount/Next         Iterate over the datums in a tolerance.

GetToleranceType                             Returns the type

“CIRCULAR_RUNOUT_TOLERANCE”

 

 

Common Errors:

Invalid identity  The system could not find the callout or face.

Invalid datum                The system could not find a datum for one of the letters in the daums argument

 

 

4.23        AddToleranceCoaxiality

Create a new coaxality tolerance. See the figure below. The tolerance zone defines a cylinder that must contain the axis of the circle.

 

 

Arguments:

[in] face_id                                        The identity of the face (or callout) to be toleranced.

[in] value                                           The diameter of the tolerance zone.

[in] datums                                        A list of datums given as a string (“A” in the above figure). Each datum name must be given as a single letter and must correspond to the name of a datum in the model.

 

Result:

Tol_id                                               The identity of the new tolerance.  

 

Related Functions

GetToleranceValue                            Returns the defined value of a tolerance.

GetToleranceMeasuredValue:            Returns the measured value of a tolerance

GetToleranceFaceCount/Next           Iterate over the faces in a tolerance.

GetToleranceDatumCount/Next         Iterate over the datums in a tolerance.

GetToleranceType                             Returns the type “COAXIALITY_TOLERANCE”

 

Common Errors:

Invalid identity  The system could not find the callout or face.

Invalid datum                The system could not find a datum for one of the letters in the daums argument

 

 

4.24        AddToleranceConcentricity

Create a new concentricity tolerance. See the figure below. The tolerance zone defines a ball where the center of two spheres must coincide or a cylinder for the common axis of one or more surfaces of revolution.

 

 

 

 

 

Arguments:

[in] face_id                                        The identity of the face (or callout) to be toleranced.

[in] value                                           The size of the tolerance zone (0.08 in above figure)

[in] datums                                        A list of datums given as a string (“AB” in the above figure). Each datum name must be given as a single letter and must correspond to the name of a datum in the model.

 

Result:

Tol_id                                               The identity of the new tolerance.  

 

Related Functions

GetToleranceValue                            Returns the defined value of a tolerance.

GetToleranceMeasuredValue:            Returns the measured value of a tolerance

GetToleranceFaceCount/Next           Iterate over the faces in a tolerance.

GetToleranceDatumCount/Next         Iterate over the datums in a tolerance.

GetToleranceType                             Returns the type “

                                                         “CONCENTRICITY_TOLERANCE”

 

 

Common Errors:

Invalid identity  The system could not find the callout or face.

Invalid datum                The system could not find a datum for one of the letters in the daums argument

 

 

4.25        AddToleranceCylindricity

Create a new cylindricity tolerance. See the figure below. The tolerance zone defines an inner and outer cylinder for all points on the cylindrical face.

 

 

 

Arguments:

[in] face_id                                        The identity of the face (or callout) to be toleranced.

[in] value                                           The size of the tolerance zone defined as the difference in radius between the inner and out cylinders.

 

Note: no datums.

 

Result:

Tol_id                                               The identity of the new tolerance.  

 

Related Functions

GetToleranceValue                            Returns the defined value of a tolerance.

GetToleranceMeasuredValue:            Returns the measured value of a tolerance

GetToleranceFaceCount/Next           Iterate over the faces in a tolerance.

GetToleranceType                             Returns the type “CYLINDRICITY_TOLERANCE”

AddToleranceFlatness                       Similar to cylindricity but for planes

 

Common Errors:

Invalid identity  The system could not find the callout or face.

 

4.26        AddToleranceDistanceAngularLocation

Create a new tolerance describing an angle between a source and target. Distance tolerances defined a value with a plus and minus range.

 

Arguments:

[in] source_id                                    The identity of the source face or callout to be toleranced.

[in] target_id                                      The identity of the target face or callout to be toleranced.

[in] value                                           The defined value of the tolerance.

[in] plus delta                                     The upper value allowed for the tolerance given as a delta for the defined value.

[in] minus delta                                  The lower value allowed for the tolerance (value given should normally be negative) also given as a delta.

 

Note: no datums.

 

Result:

Tol_id                                               The identity of the new tolerance.  

 

Related Functions

GetToleranceValue                            Returns the defined value of a tolerance.

GetToleranceMeasuredValue:            Returns the measured value of a tolerance

GetToleranceFaceCount/Next           Iterate over the faces in a tolerance.

GetToleranceType                             Returns the type