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

3.1             Concept

The Finder object is used to traverse AP-238 files and find data. The functions in the finder object return three kinds of results

 

1.      A requested value. For example, the x, y and z coordinates of the next point in a tool path.

2.      The identity of an object as an integer. For example, the identity of the first tool path in a working step. Typically this identity will then be used as an argument for another function. Note that are per Section 2.129 this identity is only valid until the data is saved to a file.

3.      A null value returned as a 0 to show that something has not been found. For example, if a function requests the tool of a workingstep and no tool is defined then the result returned will be zero.

 

A typical Finder object program starts with the main_workplan and traverses the nested workplans, and workingsteps in that program extracting information and when necessary modifying the information using the other objects in the STEP-NC DLL such as Feature and Process.

 

In a traversal “dead ends” are indicated by returning null values until the system determines that the application must be lost. When this determination is made an error message is issued. For example, if a workingstep does not contain a tool, but the application goes ahead and asks for the diameter of the tool anyway, then an error is issued because the program should have been written to test for the tool first.

 

When it finds a value the Finder object returns the nominal value. If the value can have plus/minus values then the Query object should be used to get this additional information. The query object is similar to the Finder object but with additional functionality to get information about lower and upper limits.

 

Except for two caveats, the Finder object is meant to be able to find any data in an AP-238 file. The first caveat is for plus/minus values as per the description above. The second caveat is for geometric and dimensional tolerances and their associated geometry. This information is found using the Tolerance object.

 

3.2             Navigating an AP-238 data set using the Finder Object

The Finder object uses a subset of the entities in AP-238 as sentinels for finding the data. These sentinels are organized by their functionality so in order to get a value you first need to know which sentinel leads to that value. For example, if you want a feed value then you need to know to find the technology or path object that defines the feed.

 

The sentinel objects for navigating the program structure are as follows:

·        Executable. An executable is an element of a STEP-NC program. It could be a workplan, an NC function, workingstep or a selective. Most Finder applications start with the Main workplan and then navigate through the program structure until the desired workingstep is found.

·        Workplan. A Workplan is a type of executable that contains a list of other executables. A special workplan is called the Main Workplan. The STEP-NC program starts at the main workplan and executes each executable in that workplan in turn. If the executable is another nested workplan then the current plan is put onto a stack while the nested one is executed and then the current plan continues.

·        Selective. A Selective is another type of executable that is similar in structure to a workplan. The difference is that at run time only one of the executable in a selective is to be executed. How the executatble is chosen is determined by the user at run time. For the Finder object navigating a Selective is similar to navigating a Workplan and there is functionality in the DLL that will treat both equally. Selective and Workplan are both examples of Program Structure executables. Other types of program structure are allowed in the AP-238 standard but not yet supported by the DLL.

·        NC Function. An NC function is a CNC function that does not require axis movements. There are relatively few of these functions in STEP-NC. The most common are the Display function, the GoHome function, the Optional Stop function and the Stop function.

·        Workingstep. A workingstep is the most important and rich type of executable. A workingstep describes an operation to machine a feature on the part. It can describe the operation explicitly as a set of machining parameters, or implicitly as a set of tool paths.

 

In a STEP-NC program the main workplan can be found using the GetMainWorkplan function. You can then navigate through the executables using two sets of functions. If you only care about Workplans you can use the GetWorkplanExecutableCount and GetWorkplanExecutbaleNext functions to visit each executable in the main workplan. If you want your code to be more generic then you can also use GetNestedExectubaleCount and GetNestedExecutableNext functions.

 

The following code sample shows how to navigate the program structure.

 

Find->Open238(“sample.238”);

int wp_id = Find->GetMainWorkplan ();

printf (“Workplan name: %s\n”, GetExecutableName (wp_id));

int size = Find->GetNestedExecutableCount (wp_id);

printf (“Workplan size is %d\n”, size);

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

     int exe_id = Find->GetNestedExecutableNext (wp_id, I);

     CString type = Find->GetExecutableType (exe_id);

     printf (“Item at %d is a %s\n”, type);

}

 

Notice how the code ends with a call to GetExecutableType function to find out the type of each executable. This is one way to decode the structure in a workplan. The other way is to use the IsProgramStructure, IsWorkplan, IsNcFunction, IsWorkingstep and IsSelective functions to test for the type of of executable. For example,

 

if (Find->IsWorkingstep (exe_id))

decode_workingstep (exe_id);

 

Where decode_workingstep is a user defined function to look at the properties in a workingstep that we will discuss in the next section.

 

3.3             Navigating a Workingstep

A workingstep is probably the key unit of functionality in a STEP-NC program. The following objects are attached to a workingstep.

 

 

The following code illustrates a possible implementation for the decode_workingstep function discussed in the last section.

 

Void decode_workingstep (int exe_id){

     int tl_id = Find->GetWorkingstepTool (exe_id);

     if (tl_id == 0)

          printf (“Error workingstep has no tool\n”);

     else {

          CString t_num = Find->GetToolNumber (tl_id);

          Cstring t_id = Find->GetToolIdentitifier (tl_id);

          Printf (“Tool Number is %s\n”, t_num);

          Printf (“Manufacturer’s name is %s\n”,t_id);

     }

     int p_id = Find->GetWorkingstepProcessFeature(exe_id);

     CString type = Find->GetFeatureType (p_id);

     printf (“Process feature type is %s\n”, type);

     int c = Find->GetWorkingstepFinalFeatureCount (e_id);

     printf (“Number of final features is %d\n”, count);

     for (int I = 0; I < c; I++) {

          type = Find->GetWorkingstepFinalFeatureNext

 (p_id, I);

          printf (“\tType is %s\n”, type);

     }

     decode_paths (e_id);

     return;

}

 

Most AP-238 data sets use a free form milling operation that does not have any parameters so the GetOperationXxx functions are not illustrated in the above example. Most AP-238 data sets also do not make significant use of features. In these data sets the process feature is most often a toolpath feature (type = “TOOLPATH_FEATURE) and there are zero final features. The exceptions are a few data sets made from AP-224 data, and the few data sets made from Mastercam data.

 

A Toolpath feature is a feature that has no parameters, but it may have a set of faces describing its shape. These faces are important for cutter compensation algorithms and can be manipulated using functionality in the Tolerance object.

 

3.4             Navigating a Toolpath

The example in the last section ended with a call to another user defined function called decode_paths. In this section we will talk about manipulating path objects.

 

First some code to visit each toolpath in a workingstep.

 

void decode_paths (int ws_id) {

     int count = Find->GetWorkingstepPathCount (ws_id);

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

int path_id = Find->GetWorkingstepPathNext

(ws_id, I);

          decode_path (path_id);

}

 

A path is made up of bounded curves. Each curve describes one aspect of the tool path. The two most important aspects are the tool geometry curve and the tool axis curve. Other curves describe the cutting depth, the linearization tolerance and other qualities. Currently the DLL includes functionality to access a cross_section area curve that describes the area of contact between the cutting tool and the workpiece and enable dynamic feed and speed computation for different machining conditions and cutting tools.

 

Each curve is found using its own function. The two functions that we will discuss in this section are GetPathCurve for the geometry curve and GetPathAxis for the axis curve. Each function has two flavors, for example GetPathCurveCount and GetPathCurveNext. The two flavors iterate over the segements in the corresponding curve. One of the rules of STEP-NC requires evey curve in the same path to have the same number of segments so GetPathCurveCount should return the same result as GetPathAxisCount and the similar count functions for the other types of curves.

 

The following code segement checks that the geometry and axis curves have the same number of segements and then decodes each of those curves. The axis curve is optional for a tool path so the axis curve is only decoded if count2 is greater than zero.

 

void decode_path (int path_id) {

     int count1 = Find->GetPathCurveCount (path_id);

     int count2 = Find->GetPathAxisCount (path_id);

     if (count2 != 0 && count1 != count2) {

          printf (“Error: Bad parameterization\n”);

          return;

     }

     decode_geometry (count1, path_id);

     if (count2 != 0)

          decode_axis (count2, path_id);

     decode_process (path_id);

     return;

}

 

The next code segement visits each segement in a geometry curve and prints its type. The two types can be “polyline” or “trimmed_curve”. Today the trimmed curve is assumed to be an arc. In the near future b_spline curves will also be supported. If the curve is an arc then its parameters can be decoded using the GetPathArc function. If it is a polyline then the functions to decode that polyline will be illustrated in our next example.

 

void decode_geometry (int path_id, int count) {

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

          int cve_id = Find->GetPathCurveNext (path_id, I);

          CString type = Find->GetPathCurveType (cve_id);

          Printf (“Curve type is %s\n”);

     }

}

 

The next function traverses the axis curve of a tool path. Each segement should be a polyline. If the polyline only contains two points then it probably corresponds to an arc in the geometry curve. If the geometry curve only contains polylines then there is no need to break the curves up into segments and instead both curves will be described using one long polyline containing all the points. Another STEP-NC rule requires each curve to contain the same number of points in each curve segment so if the geometry curve segment contains an arc then the corresponding axis curve segment must contain two polyline points.

 

 void decode_axis (int path_id, int count) {

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

          int cve_id = Find->GetPathAxisNext (path_id, I);

          int count2 = Find->GetPathPolylineCount (cve_id);

          for (J = 0; J < count2; J++)

              double ai, aj, ak;

              Find-GetPathPolylinePointNext (cve_id, J,

 ai, aj, ak);

              printf (“\t(%f, %f, %f)\n”, ai, aj, ak);

          }

 

     }

}

 

GetPathPolylinePointNext can also be applied to the curve segements in the geometry curve. In this case the values returned will be the x, y and z coordinates of the next point instead of the i, j and k components of the next axis position.

 

3.5             Navigating the Process Parameters

In addition to the path geometries a tool path has process parameters describing the feedrate, the spindle speed and coolant switches. The easiest way to access this information is using the GetPathProcess function as illustrated by the following code segement.

 

void decode_process (int path_id) {

     double f, s;

     int is_rap, co_on;

     Find->GetPathProcess (path_id, f, s, is_rap, co_on);

     if (is_rap)) {

          printf (“This path is rapid\n”);

     }

     printf (“Feed = %f, Speed = %f\n”, f, s);

     return;

}

 

The feed and speed values will have units. If you want to know these units then GetPathTechnologyID function can be used to access the technology object that is attached to the tool path. The GetProcessFeedUnit and GetProcessSpeedUnit functions can then be used to find the units of these two values.

 

Finally, if you do not want to access values in their native units but instead need them to be delivered in the units required by your program then you can define these units using the APIUnitsFeed and APIUnitsSpeed functions. For example, if you require the feedrate to be in inches per minute then you can request this unit and the DLL will convert any values that are in other units.

 

3.6             Other access methods

The normal way to access data using the Finder object is to go to the main workplan and then navigate to the desired workingstep. However, other access paths are available for applications that do not want to find data via the workingsteps. In the Finder object these functions have the name “All” somewhere in their title.

 

For example, GetFeatureAllCount returns a count of all the features in the program (both process and final features) amd GetFeatureAllNext gives you access to each feature in turn. Similarly, GetTechnologyAllCount/Next gives you direct access to all the technology objects and GetToolAllCount/Next gives you direct accss to all of the cutting tools.

 

The following code segment visits all of the features and prints out their types. The Finder object contains a lot of methods to access the attributes of the different types of features after their types have been decoded.

 

     CString type;

     int count = Find->GetFeatureAllCount ();

     printf (“Number of features is %d\n”, count);

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

          int f_id = Find->GetFeatureAllNext (I);

type = Find->GetFeatureType (f_id);

          printf (“Type is %s\n”, type);

     }

 

 

3.7             APIUnitsNative

The APTUnitsNative function tells all of the other functions to return units in their native unit system. For example, if a value is 3 inches then the value returned will be three, and it the value is three millimeters then the value returned will also be 3. APTUnitsInch and APIUnitsMM tell the finder object to return length values in inch and millimeter units respectively. APIUnitsNative is the default.

 

Arguments:

None

 

Result:

The function has a void result.

 

Related Functions

APIUnitsInch:                           If a length value is not inch then convert to inch.

APIUnitsMM:                          If a length value is not millimeter then convert to millimeter.

 

Common Errors:

None.

 

3.8             APIUnitsInch

The APTUnitsInch function tells all of the other functions to return units as inch values. For example, if a value is 3 inches then the value returned will be three, and if the value is 25.4 millimeters then it will be 1.

 

The APIUnitsInch function also sets the speed unit to revolutions per minute (rpm), the feed unit to inches per minute (ipm), the power unit to horse power (hp), and the torque unit to pound foot.

 

Arguments:

None

 

Result:

The function has a void result.

 

Related Functions

APIUnitsNative:                       Return length values as-is.

APIUnitsMM:                          If a length value is not millimeter then convert to millimeter.

 

Common Errors:

None.

 

3.9             APIUnitsMM

The APTUnitsMM function tells all of the other functions to return length units as  millimeter values. For example, if a value is 3 inches then the value returned will be 76.2, and it the value is 3 millimeters then it will be 3.

 

The APIUnitsInch function also sets the speed unit to revolutions per minute (rpm), the feed unit to millimeters per minute (mmpm), the power unit to kilowatt (kw), and the torque unit to Newton meter.

 

Arguments:

None

 

Result:

The function has a void result.

 

Related Functions

APIUnitsNative:                       Return length values as-is.

APIUnitsInch:                           If a length value is not inch then convert to inch.

 

Common Errors:

None.

 

3.10        APIUnitsFeed

The APTUnitsFeed function tells all of the other functions that return feed values the unit to be used for those values. If the value in the AP-238 file is not one of these then it is converted to the requested unit. For example, if the native value is “ipm” and the requested value is “ips” then the native value will be multiplied by 60. The APIUnitFeed function accepts the following arguments.

 

            “as-is”                                      No conversions

            “mmps”                                    millimeters per second

            “mmpm”                                   millimeters per minute

            “cmps”                                     centimeters per second

            “mps”                                       meters per second

            “ips”                                         inches per second

            “ipm”                                        inches per minute

            “fps”                                         feet per second

            “fpm”                                       feet per minute

            “iprev”                                      inches per revolution

            “mmprev”                                 millimeters per revolution

 

Arguments:

One of the strings given above

 

Result:

The function has a void result.

 

Related Functions

GetProcessFeed:                                  Gets the feedrate of a workingstep or toolpath.

GetProcessFeedUnit:                            Gets the units used by a feedrate in the data.

 

Common Errors:

None.

 

3.11        APIUnitsSpeed

The APTUnitsSpeed function tells all of the other functions that return speed values the unit to be used for those values. If the value in the AP-238 file is not one of these then it is converted to the requested unit. The APIUnitSpeed function accepts the following arguments.

 

            “as-is”                                      No conversions

            “rpm”                                       revolutions per minute

            “hetrz”                                      revolutions per second

 

Arguments:

One of the strings given above

 

Result:

The function has a void result.

 

Related Functions

GetProcessSpeed:                                Gets spindle speed of a workingstep or toolpath.

GetProcessSpeedUnit:                          Gets units used by spindle speed in the data.

 

Common Errors:

None.

 

3.12        ContainsMilling

The ContainsMilling function returns the value 1 if the AP-238 file contains any milling technology or milling machine functions. The function is used to determine if the STEP-NC program can be sent to a milling machine.

 

Arguments:

None

 

Result:

Integer:                                     Value is 1 if the program contains any milling technology or functions.

 

Related Functions

ContainsTurning:                       Determines if the program contains any turning technology or functions. If a program contains both milling and turning then it should be sent to a mill-turn machine.

 

Common Errors:

Project not defined:                   There is no AP-238 file open.

 

3.13        ContainsTurning

The ContainsTurning function returns the value 1 if the AP-238 file contains any turning technology or turning machine functions. The function is used to determine if the STEP-NC program can be sent to a turning machine.

 

Arguments:

None

 

Result:

Integer:                                     Value is 1 if the program contains any turning technology or functions.

 

Related Functions

ContainsMilling:                        Determines if the program contains any milling technology or functions. If a program contains both milling and turning then it should be sent to a mill-turn machine.

 

Common Errors:

Project not defined:                   There is no AP-238 file open.

 

3.14        GetCompoundFeatureCount

A compound feature is a list of features that have been grouped together so that they can be machined by the same operation.  This function returns the number of features in the compound.

 

Arguments:

[in] feature_id                           The identity of the compound feature.

 

A compound feature can have its own coordinate system. If set then this coordinate system changes the direction and orientation of the features in the compound. The z direction of the axis of the compound feature is returned by the GetFeatureAxisDirection function. The x direction of the axis of the feature is returned by the GetFeatureAxisRefDirection function. The origin of the axis is returned by the GetFeatureAxisOrigin function.

 

 

Result:

Return the number of features in the compound or zero if it is not compound.    

 

Related Functions

GetCompoundFeatureNext:            Returns the identities of the member features.

GetFeatureAxisDirection:                Returns the z direction of the axis of the compound feature.

GetFeatureAxisRefDirection:           Returns the x direction of the axis of the compound feature.

GetFeatureAxisOrigin:                    Returns the origin of the axis of the compound feature.

 

See Section 3.190. for a note on the roles of process features and final features.

 

Common Errors:

Project not defined:                   There is no AP-238 file open.

 

3.15        GetCompoundFeatureNext

A compound feature is a list of features that have been grouped together so that they can be machined by the same operation.  This function returns the identity of one of the features in the compound.

 

Arguments:

[in] feature_id                           The identity of the compound feature.

[in] index                                  The index of the requested member.

 

Result:

The identity of the feature at position index.      

 

Related Functions

GetCompoundFeatureCount:    Returns the number of features in the compound.

GetFeatureType:                       Returns the type of a feature.

 

Common Errors:

Project not defined:                   There is no AP-238 file open.

Not a compound feature:          GetCompoundFeatureCount should have returned 0.

Invalid index:                            The index is not in the range [0, Count – 1]

 

3.16        GetExecutableName

The name of an executable is an identifier that can be used to describe it purpose of the end user and to find the executable at a later time. Any type of executable can have a name including Workplans, Workingsteps and NC functions.

 

Arguments:

[in] exe_id                                The identity of the executable.

 

Result:

A string describing the name of the executable. 

 

Related Functions

GetNestedExecutableNext:       Returns an executable in a workplan or selective.

GetMainWorkplan:                   Returns the main workplan of a project.

GetExecutableType:                  Return the type of an executable.

IsWorkingstep:                         Returns 1 if true.

IsNcFunction:                           Returns 1 if true.

IsProgramStructure:                  Returns 1 if true.

 

Common Errors:

Project not defined:                   There is no AP-238 file open.

 

3.17        GetExecutableType

An executable is something that is executed. There are many types of executables. This function returns the type of an executable. The following type names may be returned if the executable is an NC function.

 

type = "DISPLAY_MESSAGE"

            type = "EXTENDED_NC_FUNCTION"

            type = "PROGRAM_STOP"

            type = "RETURN_HOME"

 

The following type names are returned if the executable is program structure.

 

type = "SELECTIVE"

            type = "TURNING_WORKINGSTEP”

            type = "WORKPLAN"

 

However, if the executable is a “MACHINING_WORKINGSTEP” then one of the following type names will be returned to indicate the type of operation in that workingstep.

 

type = "CONTOURING_ROUGH"

type = "BORING"

type = "BOTTOM_AND_SIDE_FINISH_MILLING"

type = "BOTTOM_AND_SIDE_ROUGH_MILLING"

type = "CONTOURING_FINISH"

type = "CONTOURING_ROUGH"

type = "DEFINED_MARKING"

type = "DRILLING"

type = "FACING_FINISH"

            type = "FACING_ROUGH"

type = "FREEFORM_OPERATION"

            type = "PLANE_ROUGH_MILLING"

            type = "PLANE_FINISH_MILLING"

            type = "MULTISTEP_DRILLING"

            type = "REAMING"

type = "SIDE_FINISH_MILLING"

            type = "SIDE_ROUGH_MILLING"

 

Finally, if the Machining workingstep contains a probing operation then the following string will be returned. The functions that manipulate probing workingsteps are in the Tolerance object.

 

            type = "WORKPIECE_PROBING"

 

 

Arguments:

[in] exe_id                                The identity of the executable to be tested.

 

Result:

A string describing the type of the executable.   

 

Related Functions

GetNestedExecutableNext:       Returns an executable in a workplan or selective.

GetMainWorkplan:                   Returns the main workplan of a project.

GetExecutableName:                Return the identity of an executable.

IsWorkingstep:                         Returns 1 if true.

IsNcFunction:                           Returns 1 if true.

IsProgramStructure:                  Returns 1 if true.

 

Common Errors:

Project not defined:                   There is no AP-238 file open.

 

3.18        GetFeatureAllCount

This function returns a count of all the features in the currently open AP-238 file. Most applications get to the features via the workingsteps that contain those features. This is another access path that is independent of the workingsteps.

 

Arguments:

None.

 

Result:

Returns the number of features in the file.          

 

Related Functions

GetFeatureAllNext:                               Returns the id of a feature using an index.

GetWorkingstepProcessFeature:           Gets the process feature of a workingstep

GetWorkingstepFinalFeatureCount:      Gets a count of the final features in a workingstep.

GetWorkingstepFinalFeatureNext:        Gets one of the final features in a workingstep.

 

See Section 3.190. for a note on the roles of process features and final features.

 

Common Errors:

No file open:                             There is no file open.

 

3.19        GetFeatureAllNext

This function returns the identity of a feature in the currently open AP-238 file. Most applications get to the features via the workingsteps that contain those features. This is another access path that is independent of the workingsteps.

 

Arguments:

[in] index                                  The index of the requested feature.

 

Result:

Returns the identifier of the requested face.       

 

Related Functions

GetFeatureAllCount:                 Returns the number of features in a file.

GetFeatureType:                       Returns a type description of the feature.

GetFeatureName:                     Returns the name of the feature.

GetFeatureAxisOrigin:              Returns the origin of the feature axis.

GetFeatureAxisDirection:          Returns the z direction of the feature axis.

GetFeatureAxisRefDirection:     Returns the x direction of the feature axis.

 

 

Common Errors:

Project not defined:                   There is no AP-238 file open.

Invalid index                             The index is not in the range defined by GetFeatureAllCount.

 

3.20        GetFeatureAxisDirection

Except for transition features, every feature has an axis direction that defines the z direction for that feature. If the feature is vertical then this direction will be “0, 0, 1”, but if it is horizontal then it could be “1 0, 0” or “0, 1, 0”.

 

Arguments:

[in] feature_id                           The index of the requested feature.

[out] i, j, k                                Components of the feature z axis.

 

Result:

None.  

 

Related Functions

GetFeatureType:                       Returns a type description of the feature.

GetFeatureName:                     Returns the name of the feature.

GetFeatureAxisOrigin:              Returns the origin of the feature axis.

GetFeatureAxisRefDirection:     Returns the x direction of the feature axis.

 

 

Common Errors:

Project not defined:                There is no AP-238 file open.

Bad identity                           The argument does not identify a feature with an axis.

 

3.21        GetFeatureAxisRefDirection

Except for transition features, every feature has an axis reference direction that defines the x direction for that feature. For features that are circular the reference direction does not matter, but for others it is critical because, for example, it is the only way to give a rectangular feature the correct orientation.

 

Arguments:

[in] feature_id                           The index of the requested feature.

[out] a, b, c                              Components of the feature x axis.

 

Result:

None.  

 

Related Functions

GetFeatureType:                       Returns a type description of the feature.

GetFeatureName:                     Returns the name of the feature.

GetFeatureAxisOrigin:              Returns the origin of the feature axis.

GetFeatureAxisDirection:          Returns the z direction of the feature axis.

 

 

Common Errors:

Project not defined:                There is no AP-238 file open.

Bad identity                           The argument does not identify a feature with an axis.

 

3.22        GetFeatureAxisOrigin

Except for transition features, every feature has an axis reference direction that defines a local origin for the feature. For most features the value of this origin is (0, 0, 0) so unlike the other axis components it has no effect of the feature display.

 

Arguments:

[in] feature_id                           The index of the requested feature.

[out] x, y, z                               Coordinates of the axis origin.

 

Result:

None.  

 

Related Functions

GetFeatureType:                       Returns a type description of the feature.

GetFeatureName:                     Returns the name of the feature.

GetFeatureAxisDirection:          Returns the z direction of the feature axis.

GetFeatureAxisRefDirection:     Returns the x direction of the feature axis.

 

 

Common Errors:

Project not defined:                There is no AP-238 file open.

Bad identity                           The argument does not identify a feature with an axis.

 

3.23        GetFeatureChamfer

If a manufacturing feature is a chamfer then this function returns the parametric definition of that chamfer. Like an edge round, a chamfer is a transition feature so it is different to the other features. A transition feature connects two other features so many of its parameters are defined by its intersection with those features. This function returns the definition of the plane that defines the chamfer.

 

Arguments:

[in] feature_id                           The identity of the feature.

[out] x, y, z                               Origin of the plane that defines the chamfer.

[out] i, j, k                                Components of the plane’s z-direction

[out] a, b, c                              Components of the plane’s x-direction

 

Result:

Returns 0 if the chamfer face is not defined by a plane with a single loop otherwise returns the identity this plane.

 

Related Functions

GetFeatureType:                       Returns the type of a feature.

 

Common Errors:

Project not defined:                   There is no AP-238 file open.

 

3.24        GetFeatureBossCircular

Planar face, open and closed pocket manufacturing features can have one or more bosses. Each boss defines an island in the feature where material is not to be removed by the manufacturing operation. This function returns the parametric definition of a circular boss.

 

Arguments:

[in] feature_id                           The identity of the feature containing the boss.

[in] index                                  The boss number

[out] profile_id                          0 if this is not a circular boss

[out] height                               Height of the boss

[out] diameter                           Diameter of the boss

[out] x, y, z                               Bottom of the boss.

 

Result:

Returns 0 if this boss is not cylindrical.  

 

Related Functions

GetFeatureBossCount:              Function to get the bosses on a feature.

GetFeatureBossType:               Function to get the type of a boss

GetFeaturePocketClosedXx:    Closed pockets can have bosses

GetFeaturePocketOpenXx:       Open pockets can have bosses

GetFeaturePlanarFace:             Planar face features can have bosses

 

Common Errors:

Project not defined:                   There is no AP-238 file open.

 

3.25        GetFeatureBossCount

Planar face, open and closed pocket manufacturing features can have one or more bosses. Each boss defines an island in the feature where material is not to be removed by the manufacturing operation. This function returns a count of the number of bosses on a feature. The function will return 0 for feature types that cannot contains bosses.

 

Arguments:

[in] feature_id                           The identity of the feature containing the boss.

 

Result:

Returns a count of the number of bosses which can be 0.          

 

Related Functions

GetFeatureBossType:               Function to get the type of a boss

 

Common Errors:

Project not defined:                   There is no AP-238 file open.

 

3.26        GetFeatureBossGeneral

Planar face, open and closed pocket manufacturing features can have one or more bosses. Each boss defines an island in the feature where material is not to be removed by the manufacturing operation. This function returns the parametric definition of a general boss and the identity of the closed loop profile that defines the top of the boss

 

Arguments:

[in] feature_id                           The identity of the feature containing the boss.

[in] index                                  The boss number

[out] profile_id                          0 if this is not a general boss, otherwise the identity of the closed loop that defines the boss

[out] height                               Height of the boss

[out] x, y, z                               Bottom of the boss.

 

Result:

Returns 0 if this boss is not a general boss.       

 

Related Functions

GetFeatureProfileSegmentCount/Next      Functons to iterate over the segments in a closed loop profile.

GetFeatureBossCount:                             Function to get the number of bosses on a feature.

GetFeatureBossType:                              Function to get the type of a boss

GetFeaturePocketClosedXx:                   Closed pockets can have bosses

GetFeaturePocketOpenXx:                      Open pockets can have bosses

GetFeaturePlanarFace:                            Planar face features can have bosses

 

Common Errors:

Project not defined:                   There is no AP-238 file open.

 

3.27        GetFeatureBossRectangular

Planar face, open and closed pocket manufacturing features can have one or more bosses. Each boss defines an island in the feature where material is not to be removed by the manufacturing operation. This function returns the parametric definition of a rectangular boss.

 

Arguments:

[in] feature_id                           The identity of the feature containing the boss.

[in] index                                  The boss number

[out] profile_id                          0 if this is not a circular boss

[out] height                               Height of the boss

[out] length                               Length (x dimension) of the boss

[out] width                                Width (y dimension) of the boss

[out] x, y, z                               Bottom of the boss.

 

The z direction of the axis of the boss is returned by the GetFeatureAxisDirection function. The x direction of the axis of the boss is returned by the GetFeatureAxisRefDirection function. The origin of the axis of the boss is returned by the function and can also be accessed using the GetFeatureAxisOrigin function.

 

Result:

Returns 0 if this boss is not rectangular.

 

Related Functions

GetFeatureAxisDirection:          Returns the z direction of the axis of the boss.

GetFeatureAxisRefDirection:     Returns the x direction of the axis of the boss.

GetFeatureBossCount:              Function to get the bosses on a feature.

GetFeatureBossType:               Function to get the type of a boss

GetFeaturePocketClosedXx:    Closed pockets can have bosses

GetFeaturePocketOpenXx:       Open pockets can have bosses

GetFeaturePlanarFace:             Planar face features can have bosses

 

Common Errors: