Overview

The Feature class is used to create manufacturing features. The features include holes, pockets and outside profiles as well as generic features defined by a boundary loop or by a set of faces on a part. The features made by the Feature object are compatible with all of the STEP-Manufacturing standards.

Other sources of feature data include AP-219, AP-224 and AP-238 files. If the data comes from an external source then your application will probably need to find and query its features and the Finder object contains API functions for manipulating the features created by the Feature object as well as those found in AP-219, AP-224 and AP-238 files.

AddFace()

void AddFace (
	System::Int64 ws_or_fea_id,
	System::Int64 face_or_rep_id
	);

The AddFace() function adds an advanced face to a feature. The face will be displayed with the feature. For complex features many faces may be added to the geometry by calling the AddFace() function many times. For some features it may be necessary to add other types of geometry as well such as edges. When the feature is manufactured the result should make the added geometry. Tolerances may be applied to the faces to define manufacturing requirements.

Arguments

ws_or_fe_id
The identity of the feature. The identity may be given directly or indirectly be identifying a workingstep that makes the feature.
face_or_rep_id
Identity of an advanced face (preferred) or other geometry item if necessary.

Related Functions

Common Errors

Arc()

void Arc (
	System::String^ label,
	double x,
	double y,
	double z,
	double cx,
	double cy,
	double cz,
	double radius,
	System::Boolean ccw
	);

The Arc() function adds an arc to a profile. Profiles describe the perimeter of a feature. They can be open or closed. The internal geometry of a profile is very similar to that of a tool path. Profiles are created by making a series of calls to the Arc and LineTo functions. If a new feature needs to contain a profile, then that profile should be defined first.

Arguments

x, y, z
Coordinates for the end of the arc.
cx, cy, cz
Coordinates of the center of the circle containing the arc.
radius
Radius of the circle containing the arc.
ccw
If true then the arc moves from the current point to the new end point in the counter clockwise direction. The current point will be the end point last defined by an Arc or LineTo function.

Related Functions

Common Errors

BottomAtEnd()

void BottomAtEnd (
	System::int64 ws_or_feature_id
	);

The BottomAtEnd() function changes the location of the bottom of a hole or pocket when its origin has been defined at the top instead of the bottom. By default the origin of these features is given at the bottom so that it will not need to change if the hole or pocket depth changes. However, many systems assume the opposite so this function enables the definition of a hole or pocket from the data of these systems without performing any mathematics.

Arguments

ws_or_feature_id
The identity of a feature, or of a workingstep defined by the feature.

Related Functions

Common Errors

ChangeWorkpiece()

void ChangeWorkpiece (
	System::String^ piece_name
	);

The ChangeWorkpiece() function selects the workpiece in the current project that will contain the new features defined by the Feature object. In STEP-NC features are defined on workpieces.

Arguments

piece_name
The name of the workpiece. The current project will be searched for a workpiece with this name

Related Functions

Common Errors

CircularBoss()

System::Int64 CircularBoss (
	System::Int64 feature_id,
	System::String^ name,
	double height,
	double diameter
	);

The CircularBoss() function adds a circular boss to a feature. The function defines the diameter and height of the boss and returns the identity of the new boss. The placement (origin) of the boss is defined using the SetLocation function.

Arguments

feature_id
The identity of the feature that is to contain the new boss.
name
A string name for the boss
height
The height of the boss from the base.
diameter
The diameter of the circular boss.

Related Functions

Common Errors

ClosedCircularOutsideProfile()

System::Int64 ClosedCircularOutsideProfile (
	System::Int64 ws_id,
	System::String^ name,
	double depth,
	double diameter
	);

The ClosedCircularOutsideProfile() function creates a type of feature that describes a volume whose perimeter is to be machined and returns the id of the new feature.

The name is confusing. It is the opposite of a closed circular pocket in the sense that for an outside profile the material outside the feature is machined away and for a closed circular pocket the material inside the feature is machine away.

Arguments

ws_id
The identity of the workingstep that is to use the new feature as its process feature.
name
Name (label) for the new feature.
depth
The depth of the profile from the base.
diameter
The diameter of the profile.

Related Functions

Common Errors

ClosedCircularPocket()

System::Int64 ClosedCircularPocket (
	System::Int64 ws_id,
	System::String^ name,
	double depth,
	double diameter
	);

The ClosedCircularPocket() function creates closed circular pocket and returns the id of the new feature. A closed circular pocket is similar to a round hole but the expectation is that a closed circular pocket will be milled and a round hole will be drilled.

Arguments

ws_id
The identity of the workingstep that is to use the new feature as its process feature.
name
Name (label) for the new feature.
depth
The depth of the pocket.
diameter
The diameter of the profile.

Related Functions

Common Errors

ClosedGeneralOutsideProfile()

System::Int64 ClosedGeneralOutsideProfile (
	System::Int64 ws_id,
	System::String^ name,
	double depth
	);

The ClosedGeneralOutsideProfile() function creates a closed general outside profile feature and returns the id of the new feature.

The name is confusing. This is a type of feature. It describes a volume whose perimeter is to be machined. It is the opposite of a closed general pocket in the sense that for an outside profile the material outside the feature is machined away and for a closed general pocket the material inside the feature is machined away.

A general profile is defined by a loop that consists of lines and arcs. See the Arc and LineTo functions for details on how to define a profile. When a closed general outside profile is defined the current profile will be closed by connecting the last point in the profile to the first point if they are not already the same.

When a closed general outside profile is defined the current profile will be reset to empty and the next call to LineTo will define the first point of the next profile.

As shown in the figure a general outside profile is defined by moving the profile shape by the distanced defined by the depth in the direction of the path. In the current the API the path is defined implicitly and will be perpendicular to the plane of the profile.

Arguments

ws_id
The identity of the workingstep that is to use the new feature as its process feature.
name
Name (label) for the new feature.
depth
The depth of the profile from the base.

Related Functions

Common Errors

ClosedGeneral/Bound/Pocket()

System::Int64 ClosedGeneralPocket (
	System::Int64 ws_id,
	System::String^ name,
	double depth
	);

System::Int64 ClosedBoundPocket (
	System::Int64 ws_id,
	System::Int64 bound_id,
	System::String^ name,
	double depth
	);

The ClosedGeneralPocket() function creates a closed general pocket feature and returns the id of the new feature.

A closed general pocket describes a volume whose interior is to be machined. A general pocket is define by a loop that consists of lines and arcs. See the Arc and LineTo functions for details on how to define a profile. When a closed general pocket is defined the current profile will be closed by connecting the last point defined in the profile to the first point if they are not the same. An open general pocket is not closed in this way.

When a closed general pocket is defined the current profile will be reset to empty and the next call to LineTo will define the first point of the next profile.

The ClosedBoundPocket() function creates a closed general pocket using an existing face boundary. This function is useful when the feature to be machined is defined by a hole in a face.

The ClosedLoopPocket() function creates a closed general pocket using an existing list of curves which must define a closed boundary. This function is useful when the feature to be machined is defined by a hole that spans multiple faces.

Arguments

ws_id
The identity of the workingstep that is to use the new feature as its process feature. If 0 then the workingstep will be defined at a later time or not at all if the data is going to be saved as an AP242 file.
bound_id
The identity of a face boundary.
name
Name (label) for the new feature.
depth
The depth of the profile from the base.

Related Functions

Common Errors

ClosedLoopPocket/OutsideProfile/Boss()

System::Int64 ClosedLoopPocket (
	System::Int64 ws_id,
	System::String^ name,
	double depth
	System::Collections::Generic::List^ curves
	);

System::Int64 ClosedLoopOutsideProfile (
	System::Int64 ws_id,
	System::String^ name,
	double depth
	System::Collections::Generic::List^ curves
	);

System::Int64 ClosedLoopBoss (
	System::Int64 ws_id,
	System::String^ name,
	double depth
	System::Collections::Generic::List^ curves
	);

A closed loop is a list of surface edges that form a continuous loop. The closed loop functions define a feature profile using this loop. The edges may be defined by many types of curves and they may belong to many faces.

The ClosedLoopPocket() function creates a closed pocket.

The ClosedLoopOutsideProfile() function creates an outside profile.

The ClosedLoopBoss() function creates a boss. See the related functions for more details on each type of feature.

Arguments

ws_id
The identity of the workingstep that is to use the new feature as its process feature. If 0 then the workingstep will be defined at a later time or not at all if the data is going to be saved as an AP242 file.
name
Name (label) for the new feature.
depth
The depth (or height) of the profile from the base.
curves
A list of curves that must define a closed loop.

Related Functions

Common Errors

ClosedRectangularOutsideProfile()

System::Int64 ClosedRectangularOutsideProfile (
	System::Int64 ws_id,
	System::String^ name,
	double depth,
	double length,
	double width
	);

The ClosedRectangularOutsideProfile() function creates a closed rectangular outside profile feature and returns the id of the new feature.

The name is confusing. This is a type of feature. It describes a volume whose perimeter is to be machined. It is the opposite of a closed rectangular pocket in the sense that for an outside profile the material outside the feature is machined away and for a pocket the material inside the feature is machined away.

Arguments

ws_id
The identity of the workingstep that is to use the new feature as its process feature. If 0 then the workingstep will be defined at a later time or not at all if the data is going to be saved as an AP242 file.
name Name (label) for the new feature.
depth
The depth of the profile from the base.
length
The length of pocket rectangle.
width
The width of the pocket from the base.

Related Functions

Common Errors

ClosedRectangularPocket()

System::Int64 ClosedRectangularPocket (
	System::Int64 ws_id,
	System::String^ name,
	double depth,
	double length,
	double width,
	double orthogonal_radius
	);

The ClosedRectangularPocket() function creates a closed rectangular pocket feature and returns the id of the new feature.

A pocket describes a volume whose interior is to be machined. A rectangular pocket defines this volume using a length and width. The length defines a distance along the x axis and the width defined a distance along the y axis. The orientation of the length and width can be changed using the SetDirection method. The origin of the pocket can be changed using the SetLocation function. Other functions in the system can be used to define the pocket bottom.

Arguments

ws_id
The identity of the workingstep that is to use the new feature as its process feature.
name
Name (label) for the new feature.
depth
The depth of the pocket bottom.
length
The length of pocket rectangle.
width
The width of the pocket rectangle
orthogonal_radius
Fillet between the sides of the pocket – see figure for PocketFlatBottom

Related Functions

Common Errors

CompoundAddFeature()

void CompoundAddFeature (
	System::Int64 compound_id,
	System::Int64 feature_id
	);

The CompoundAddFeature() function adds a feature to a compound feature. A compound feature is a feature made up of other features. The most common types of compound features are counter sunk and counter bore holes. These two types are defined using their own functions.

Arguments

compound_id
The identity of the compound feature.
feature_id
The identity of the feature to be added to this compound feature.

Related Functions

Common Errors

CompoundFeature()

System::Int64 CompoundFeature (
	System::Int64 ws_id,
	System::String^ name
	);

The CompoundFeature() function creates a compound feature and returns the id of the new feature. A compound feature is a feature made up of other features. The most common types of compound features are counter sunk and counter bore holes. These two types are defined using their own functions.

Arguments

ws_id
The identity of the workingstep that is to use the new feature as its process feature.
name
A name or label for the new compound feature.

Related Functions

Common Errors

CounterboreHole()/CounterboreHoleTemplate()

System::Int64 CounterboreHole (
	System::Int64 ws_id,
	System::String^ name,
	double small_hole_depth,
	double small_hole_diameter,
	double large_hole_depth,
	double large_hole_diameter
	);

System::Int64 CounterboreHoleTemplate (
	System::String^ name,
	double small_hole_depth,
	double small_hole_diameter,
	double large_hole_depth,
	double large_hole_diameter
	);

The CounterboreHole() function creates a counterbore feature and returns the id of the new feature. A counterbore hole is defined by a large hole and a small hole. The first function creates an instanced feature which means it is a complete stand-alone definition. The second function creates a template that can be shared between many instances using the PlacedFeature() function. This saves data and allows multiple instances to be edited by changing the shared template.

Arguments

ws_id
The identity of the workingstep that is to use the new feature. This parameter is optional and should not be used (by setting ws_id = 0) when making design (AP242) data.
name
Name (label) for the new feature.
small_hole_depth
The depth of the material to be removed for the small hole.
small_hole_diameter
The diameter of the material to be removed for the small hole.
large_hole_depth
The depth of the material to be removed for the large hole.
large_hole_diameter
The diameter of the material to be removed for the large hole.

Related Functions

Common Errors

CountersunkHole()/CountersunkHoleTemplate()

System::Int64 CountersunkHole (
	System::Int64 ws_id,
	System::String^ name,
	double constant_hole_depth,
	double constant_hole_diameter,
	double taper_hole_depth,
	double taper_hole_diameter,
	double taper_angle
	);

System::Int64 CountersunkHoleTemplate (
	System::String^ name,
	double constant_hole_depth,
	double constant_hole_diameter,
	double taper_hole_depth,
	double taper_hole_diameter,
	double taper_angle
	);

The CountersunkHole() function creates a countersunk feature and returns the id of the new feature. A countersunk hole is defined by a constant hole and a taper hole. The first function creates an instanced feature which means it is a complete stand-alone definition. The second function creates a template that can be shared between many instances using the PlacedFeature() function. This saves data and allows multiple instances to be edited by changing the shared template.

The taper hole hole starts at the top and reduces in size to the constant hole. The taper angle defines the slope of the reduction. If the taper depth and angle do not reduce the diameter of the taper to the diameter of the constant, then there is a lip between the end of the taper hole and the start of the constant hole.

Arguments

ws_id
The identity of the workingstep that is to use the new feature. This parameter is optional and should not be used (by setting ws_id = 0) when making design (AP242) data.
name
Name (label) for the new feature.
constant_hole_depth
The depth of the material to be removed for the hole.
constant_hole_diameter
The diameter of the material to be removed for the hole.
taper_hole_depth
The depth of the material to be removed for the tapered hole.
taper_hole_diameter
The diameter at the top of the material to be removed for the tapered hole.
taper_angle
The angle of reduction from top to the bottom.

Related Functions

Common Errors

DoubleCounterboreHole()/DoubleCounterboreHoleTemplate()

System::Int64 DoubleCounterboreHole (
	System::Int64 ws_id,
	System::String^ name,
	double large_hole_depth,
	double large_hole_diameter,
	double middle_hole_depth,
	double middle_hole_diameter,
	double small_hole_depth,
	double small_hole_diameter
	);

System::Int64 DoubleCounterboreHoleTemplate (
	System::String^ name,
	double large_hole_depth,
	double large_hole_diameter,
	double middle_hole_depth,
	double middle_hole_diameter,
	double small_hole_depth,
	double small_hole_diameter
	);

The DoubleCounterboreHole() function creates a double counterbore feature and returns the id of the new feature. A double counterbore hole is defined by a large hole, a middle hole and a small hole. The first function creates an instanced feature which means it is a complete stand-alone definition. The second function creates a template that can be shared between many instances using the PlacedFeature() function. This saves data and allows multiple instances to be edited by changing the shared template.

Arguments

ws_id
The identity of the workingstep that is to use the new feature. This parameter is optional and should not be used (by setting ws_id = 0) when making design (AP242) data.
name
Name (label) for the new feature.
large_hole_depth
The depth of the material to be removed for the large hole.
large_hole_diameter
The diameter of the material to be removed for the large hole.
middle_hole_depth
The depth of the material to be removed for the middle hole.
middle_hole_diameter
The diameter of the material to be removed for the middle hole.
small_hole_depth
The depth of the material to be removed for the small hole.
small_hole_diameter
The diameter of the material to be removed for the small hole.

Related Functions

Common Errors

DoubleSpotfaceHole()/DoubleSpotfaceHoleTemplate()

System::Int64 DoubleSpotfaceHole (
	System::Int64 ws_id,
	System::String^ name,
	double small_hole_depth,
	double small_hole_diameter,
	double middle_hole_radius,
	double middle_hole_depth,
	double middle_hole_diameter,
	double large_hole_radius,
	double large_hole_depth,
	double large_hole_diameter
	);

System::Int64 DoubleSpotfaceTemplate (
	System::String^ name,
	double small_hole_depth,
	double small_hole_diameter,
	double middle_hole_radius,
	double middle_hole_depth,
	double middle_hole_diameter,
	double large_hole_radius,
	double large_hole_depth,
	double large_hole_diameter
	);

The DoubleSpotfaceHole() function creates a double spotface feature and returns the id of the new feature. A double spotface hole is defined by a large hole, a middle hole and a small hole. A spotface hole is similar to a counterbore hole but with a radius on the interior hole bottoms. The first function creates an instanced feature which means it is a complete stand-alone definition. The second function creates a template that can be shared between many instances using the PlacedFeature() function. This saves data and allows multiple instances to be edited by changing the shared template.

Arguments

ws_id
The identity of the workingstep that is to use the new feature. This parameter is optional and should not be used (by setting ws_id = 0) when making design (AP242) data.
name
Name (label) for the new feature.
small_hole_depth
The depth of the material to be removed for the small hole.
small_hole_diameter
The diameter of the material to be removed for the small hole.
middle_hole_radius
The radius for the bottom of the middle hole.
middle_hole_depth
The depth of the material to be removed for the middle hole.
middle_hole_diameter
The diameter of the material to be removed for the middle hole.
large_hole_radius
The radius for the botton of the large hole.
large_hole_depth
The depth of the material to be removed for the large hole.
large_hole_diameter
The diameter of the material to be removed for the large hole.

Related Functions

Common Errors

GeneralBoss()

System::Int64 GeneralBoss (
	System::Int64 feature_id,
	System::String^ name,
	double height
	);

The GeneralBoss() function creates a general boss within a feature and returns the id of the new boss. A general boss is defined by a profile and a height. The profile consists of a series of line and arc segments that can be made using the Arc and LineTo functions. A general boss is very similar to a general outside profile feature except that the boss is inside another feature.

Arguments

feature_id
The identity of the feature that is to contain the new boss.
height
The height of the boss from the base.

Related Functions

Common Errors

HoleConicalBottom()

System::Int64 HoleConicalBottom (
	System::Int64 feature_id,
	double tip_angle,
	double tip_radius
	);

The HoleConicalBottom() function creates a conical bottom condition within a hole feature feature and returns the id of the new bottom. A canonical hole bottom is defined by a tip angle and a tip radius. The default bottom type for a hole is through. The HoleCanonicalBottom function can be used to change this default.

Arguments

feature_id
The identity of the hole that is to contain the new bottom.
tip_angle
The angle between the base of the hole and side of the cone.
tip_radius
The radius of the cone at its tip. If 0 then the cone continues to the very end of the tip

Related Functions

HoleFlatBottom()

System::Int64 HoleFlatBottom (
	System::Int64 feature_id
	);

The HoleFlatBottom() function creates a flat bottom condition within a hole feature feature and returns the id of the new bottom. See HoleConicalBottom for a figure.

Arguments

feature_id
The identity of the hole that is to contain the new bottom.

Related Functions

Common Errors

HoleFlatWithRadiusBotttom()

System::Int64 HoleFlatWithRadiusBotttom (
	System::Int64 feature_id,
	double corner_radius
	);

The HoleFlatWithRadiusBotttom() function creates a radiused bottom condition within a hole feature feature and returns the id of the new bottom. A flat hole with radius bottom is a flat hole that has a fillet radius at its edges. See HoleCanonicalBottom for a figure.

Arguments

feature_id
The identity of the hole that is to contain the new bottom.
radius
The radius of the fillet.

Related Functions

Common Errors

HoleSphericalBottom()

System::Int64 HoleSphericalBottom (
	System::Int64 feature_id,
	double radius
	);

The HoleSphericalBottom() function creates a spherical bottom condition within a hole feature feature and returns the id of the new bottom. A spherical hole bottom is defined by a radius. See HoleCanonicalBottom for a figure.

Arguments

feature_id
The identity of the hole that is to contain the new bottom.
radius
The radius of the half sphere that defines the hole bottom.

Related Functions

Common Errors

Inches()

void Inches ();

The Inches() function sets the system so that all subsequently defined lengths will be in inches.

LineTo()

void LineTo (
	System::String^ label,
	double x,
	double y,
	double z
	);

The LineTo() function adds another boundary point to a profile. Several features including GeneralPockets GeneralOutsideProfiles and GeneralBosses are defined using a profile and a depth. The profile defines a boundary for the feature. In the current API the profile can be made up of lines and arcs but in future versions any type of bounded curve geometry will be allowed.

When the LineTo function is first called for an empty profile it will define the first point in the profile. After the first point has been defined subsequent calls to LineTo will create a line to the new point and calls to Arc will create an arc to the new point.

When a feature that requires a profile is defined the profile will be finished and a new empty profile will be started for the next feature. If the feature requires a closed profile then a final line will be added to the profile if the current last point is not the same as the first point. If the profile is open then it will be used as is.

Arguments

name
If this is the first point in a new profile then the given name will be used to label the profile.
xyz
Coordinates of the first point in the profile or the next point in the profile. If it is the next point then a line will be drawn to the new point.

Related Functions

LinearOutsideProfile()

System::Int64 LinearOutsideProfile (
	System::Int64 ws_id,
	System::String^ name,
	double depth,
	double length
	);

The LinearOutsideProfile() function creates a linear outside profile feature that defines a wall and returns the id of the new feature. The material is on the left of the wall. The direction and origin of the wall can be set using the SetLocation and SetDirection functions. The default is for the origin to be at (0, 0, 0) and the for direction to be the X axis.

Arguments

ws_id
The identity of the workingstep that is to use the new feature as its process feature.
depth
The depth or height of wall.
length
The length of the wall.

Related Functions

Common Errors

Millimeters()

void Millimeters ();

The Millimeters() function sets the system so that all subsequently defined lengths will be in millimeters.

OpenGeneralOutsideProfile()

System::Int64 OpenGeneralOutsideProfile (
	System::Int64 ws_id,
	System::String^ name,
	double depth
	);

The OpenGeneralOutsideProfile() function creates an open general outside profile feature and returns the id of the new feature. The feature is defined by a profile so that the material on the left of the profile is to be removed. See the Arc and LineTo functions for details on how to define a profile.

Arguments

ws_id
The identity of the workingstep that is to use the new feature as its process feature.
name
Name (label) for the new feature.
depth
The depth of the profile from the base.

Related Functions

Common Errors

OpenGeneralPocket()

System::Int64 OpenGeneralPocket (
	System::Int64 ws_id,
	System::String^ name,
	double depth
	);

The OpenGeneralPocket() function creates an open general pocket feature and returns the id of the new feature.

An open general pocket describes a volume whose interior is to be machined. A general pocket is define by a loop that consists of lines and arcs. See the Arc and LineTo functions for details on how to define a profile.

An open general pocket is similar to a closed general pocket except these is an open side to the pocket (between the last point of the profile and the first) that can be used to enter the pocket during milling. As with all of the other features defined by a profile the material on the left of the profile is to be removed.

Arguments

ws_id
The identity of the workingstep that is to use the new feature as its process feature.
name
Name (label) for the new feature.
depth
The depth of the profile from the base.

Related Functions

Common Errors

OpenLoopPocket/OutsideProfile()

System::Int64 OpenLoopPocket (
	System::Int64 ws_id,
	System::String^ name,
	double depth
	System::Collections::Generic::List^ curves
	);

System::Int64 OpenLoopOutsideProfile (
	System::Int64 ws_id,
	System::String^ name,
	double depth
	System::Collections::Generic::List^ curves
	);

An open loop is a list of surface edges that is not closed. The open loop functions define a feature profile using this loop. The edges may be defined by many types of curves and they may belong to many faces.

The OpenLoopPocket() function creates a closed pocket.

The OPenLoopOutsideProfile() function creates an outside profile. See the related functions for more details on each type of feature.

Arguments

ws_id
The identity of the workingstep that is to use the new feature as its process feature. If 0 then the workingstep will be defined at a later time or not at all if the data is going to be saved as an AP242 file.
name
Name (label) for the new feature.
depth
The depth (or height) of the profile from the base.
curves
A list of curves that define the open loop.

Related Functions

Common Errors

OpenNewWorkpiece()

void OpenNewWorkpiece (
	System::String^ file_name
	);

The OpenNewWorkpiece() function

OpenPartialCircularPocket()

System::Int64 OpenPartialCircularPocket (
	System::Int64 ws_id,
	System::String^ name,
	double depth,
	double radius,
	double sweep_angle
	);

The OpenPartialCircularPocket() function creates an open partial circular pocket feature and returns the id of the new feature. A partial circular pocket is an open pocket defind by an arc. The parameters of the feature describe the radius of the arc and the sweep of the arc as an angle. The x-axis is at the mid-point of the sweep angle.

Arguments

ws_id
The identity of the workingstep that is to use the new feature as its process feature. If the value is 0 then the workingstep will be assigned at a later time or not at all if the data is going to be saved as an AP242 file.
name
Name (label) for the new feature.
depth
The depth of the profile from the base.
radius
Radius of the pocket arc.
sweep_angle
Size of the arc.

Related Functions

Common Errors

OpenSpecificWorkpiece()

void OpenSpecificWorkpiece (
	System::String^ file_name,
	System::String^ piece_name
	);

The OpenSpecificWorkpiece() function opens a STEP-NC project and selects a specific workpiece to be the one that will be used for any new features. In STEP-NC features are defined on workpieces.

Arguments

file_name
The name of the file that contains the project/workpiece. The file must be one that has already been read into the APT or Finder object. Only the base name of the file matters. Any directory data in the file name is ignored.
piece_name
The name of the workpiece. It can be any workpeice in the file so it may represent a final part of the project, a rawpiece, a fixture, a cutting tool or any the intermediate parts used by any of the workingsteps.

Related Functions

Common Errors

OpenWorkpiece()

void OpenWorkpiece (
	System::String^ file_name,
	System::String^ piece_name,
	System::Boolean force_p21
	);

The OpenWorkpiece() function opens a STEP-NC project that is assumed to only contain one workpiece and makes that workpiece the one that will be used for any new features. In STEP-NC features are defined on workpieces.

Arguments

file_name
The name of the file that contains the project/workpiece. The file must be one that has already been read into the APT or Finder object. Only the base name of the file matters. Any directory data in the file name is ignored.

Related Functions

Common Errors

PartialCircularOutsideProfile()

System::Int64 PartialCircularOutsideProfile (
	System::Int64 ws_id,
	System::String^ name,
	double depth,
	double radius,
	double sweep_angle
	);

The PartialCircularOutsideProfile() function creates a partial circular outside profile feature and returns the id of the new feature.

A partial circular outside profile is a profile defind by an arc. The parameters of the feature describe the radius of the arc and the sweep of the arc as an angle. The x-axis is at the mid-point of the sweep angle. Unlike an OpenPartialCircularPocket an outside pofile does not need a bottom.

Arguments

ws_id
The identity of the workingstep that is to use the new feature as its process feature.
name
Name (label) for the new feature.
depth
The depth of the profile from the base.
radius
Radius of the profile arc.
sweep_angle
Size of the arc.

Related Functions

Common Errors

PlacedFeature()

System::Int64 PlacedFeature (
	System::Int64 template_id,
	System::String^ name,
	double x,
	double y,
	double z
	);

System::Int64 PlacedProcessFeature (
	System::Int64 template_id,
	System::Int64 ws_id,
	System::String^ name,
	double x,
	double y,
	double z
	);

System::Int64 PlacedFeature (
	System::Int64 template_id,
	System::String^ name,
	double x,
	double y,
	double z,
	double i,
	double j,
	double k
	);

System::Int64 PlacedProcessFeature (
	System::Int64 template_id,
	System::Int64 ws_id,
	System::String^ name,
	double x,
	double y,
	double z,
	double i,
	double j,
	double k
	);

System::Int64 PlacedFeature (
	System::Int64 template_id,
	System::String^ name,
	double x,
	double y,
	double z,
	double i,
	double j,
	double k,
	double a,
	double b,
	double c
	);

System::Int64 PlacedProcessFeature (
	System::Int64 template_id,
	System::Int64 ws_id,
	System::String^ name,
	double x,
	double y,
	double z,
	double i,
	double j,
	double k,
	double a,
	double b,
	double c
	);

The PlacedFeature() function places an instance of a template feature at the given set of coordinates. If the axis direction and referece direction are not set then the system uses the Z and X axes respectively. Placed features save data by allowing a template to be shared by many feature instances.

The PlacedProcessFeature() function uses a ws_id to make the placed feature the process feature of a workingstep.

Arguments

template_id
Template for the placed feature.
ws_id
Workingstep for the new feature.
name
Name (label) for the new feature.
x, y, z
The location for the new feature.
i, j, k
The axis direction for the new feature.
a, b, c
The reference direction for the new feature.

Related Functions

Common Errors

PlanarFace()

System::Int64 PlanarFace (
	System::Int64 ws_id,
	System::String^ name,
	double depth,
	double length,
	double width
	);

The PlanarFace() function creates a planar face feature and returns the id of the new feature. A planar face has a definition similar to a closed rectangular pocket but unlike a pocket all of the sides of a planar face are open, so the machine tool can enter the planar face from any direction.

Arguments

ws_id
The identity of the workingstep that is to use the new feature as its process feature.
name
Name (label) for the new feature.
depth
The depth of the material to be removed.
length
The length of pocket rectangle.
width
The width of the pocket from the base.

Related Functions

Common Errors

PocketFlatBottom()

System::Int64 PocketFlatBottom (
	System::Int64 feature_id,
	double planar_radius
	);

The PocketFlatBottom() function creates a flat bottom condition for a pocket feature and returns the id of the new bottom. A pocket with a flat bottom is like a dog with bad breath not very attractive. The default bottom condition for a pocket is through. This function will change this default so that the pocket has a flat bottom.

Arguments

pocket_id
The identity of the feature that is to have the new bottom.
planar_radius
The radius between the bottom of the pocket and the sides – see figure. If no radius is needed then the parameter value should be 0.

Related Functions

Common Errors

PocketRadiusedBottom()

System::Int64 PocketRadiusedBottom (
	System::Int64 feature_id,
	double radius,
	double x,
	double y,
	double z
	);

The PocketRadiusedBottom() function creates a radiused bottom condition for a pocket feature and returns the id of the new bottom. A pocket with a radiused bottom has a floor center and radius. The default bottom condition for a pocket is through. This function will change this default so that the pocket has a flat bottom.

Arguments

pocket_id
The identity of the feature that is to have the new bottom.
x, y, z
The floor center – see figure.
radius
The floor radius – see figure.

Related Functions

Common Errors

PocketTaper()

System::Int64 PocketTaper (
	System::Int64 feature_id,
	double taper_angle
	);

The PocketTaper() function defines a taper slope for a pocket feature. The function returns the id of the new taper.

Arguments

pocket_id
The identity of the feature that is to have the new taper.
taper
The taper (slope) angle in degrees.

Related Functions

Common Errors

QualifyDepth()

void QualifyDepth (
	System::Int64 feature_id,
	double lower,
	double upper
	);

System::Int64  QualifyDepthID (
	System::Int64 feature_id
	);

The QualifyDepth() function qualifies a depth parameter with upper and lower bounds. The function can be used to qualify a hole, a pocket or any feature containing a linear path.

The QualifyDepthID() function returns the identity of a depth qualifier so that it can be given additional qualifications.

QualifyDiameter()

void QualifyDiameter (
	System::Int64 feature_id,
	double lower,
	double upper
	);

System::Int64  QualifyDiameterID (
	System::Int64 feature_id
	);

The QualifyDiameter() function qualifies a diameter parameter with upper and lower bounds. The function can be used to qualify a hole, a pocket or feature containing a circular profile.

The QualifyDiameterID() function returns the identity of a diameter qualifier so that it can be given additional qualifications.

QualifyUncertainty()

void QualifyUncertainty (
	System::Int64 qualiifer_id,
	System::String^ measure_name,
	System::String^ measure_value
	);

The QualifyUncertainty() function qualifies a parameter with a description of the uncertainty. For example, the name of an uncertainty might be "form variance" and the value might be "h".

QualifyValue()

void QualifyValue (
	System::Int64 qualiifer_id,
	System::String^ measure_name,
	double measure_value
	);

The QualifyValue() function qualifies a parameter with the value of an uncertainty. For example, the name of an uncertainty might be "lower limit" and the value might be 0.15. The names "upper limit" and "lower limit" are used to define the upper and lower bounds of a range.

RectangularBoss()

System::Int64 RectangularBoss (
	System::Int64 feature_id,
	System::String^ name,
	double height,
	double length,
	double width
	);

The RectangularBoss() function creates a rectangular boss on a feature and returns the id of the new boss. The function defines the length, width and height of the boss. The placement (origin) of the boss is defined using the SetLocation function. The orientation is defined using the SetDirection function. By default the direction of the boss is so that the length is along the X axis.

Arguments

feature_id
The identity of the feature that is to contain the new boss.
height
The height of the boss from the base.
length
The x-dimension of the boss.
width
The y-dimension of the boss.

Related Functions

Common Errors

RemoveFace()

void RemoveFace (
	System::Int64 ws_id,
	System::Int64 face_id
	);

The RemoveFace() function

Reset()

void Reset ();

The Reset() function

RoundHole()/RoundHoleTemplate()

System::Int64 RoundHole (
	System::Int64 ws_id,
	System::String^ name,
	double depth,
	double diameter
	);

System::Int64 RoundHoleTemplate (
	System::String^ name,
	double depth,
	double diameter
	);

The RoundHole() function creates a round hole feature and returns the id of the new feature. A round hole has a diameter and a depth. By default the hole is define with a through bottom. Other types of bottom can be defined using the HoleBottom functions. The first function creates an instanced feature which means it is a complete stand-alone definition. The second function creates a template that can be shared between many instances using the PlacedFeature() function. This saves data and allows multiple instances to be edited by changing the shared template.

Arguments

ws_id
The identity of the workingstep that is to use the new feature. This parameter is optional and should not be used (by setting ws_id = 0) when making design (AP242) data.
name
Name (label) for the new feature.
depth
The depth of the material to be removed.
diameter
The diameter of the hole.

Related Functions

Common Errors

SetDirection()

void SetDirection (
	double i,
	double j,
	double k,
	double a,
	double b,
	double c
	);

The SetDirection() function defines a default direction for the Z axis and the X axis of any new feature. For example, if you want to define a rectangular pocket that is not aligned with the X-axis then you can define an alternate X axis for the pocket using this function. Similarly, if you want to define a hole that is not vertical then you can define an alternate Z axis using this function.

The axis directions set using the SetDirection function will be used for all subsequent features until a new directions are set by making another call to the function.

Arguments

i, j, k
The direction components of the Z axis.
a, b, c
The direction components of the X axis.

Related Functions

SetLocation()

void SetLocation (
	double x,
	double y,
	double z
	);

The SetLocation() function defines a default origin for any new feature. For example, if you want to define a rectangular pocket that is not centered on the origin.

The origin set using the SetLocation function will be used for all subsequent features until a new values are set by making another call to the function.

Arguments

x, y, z
The new origin for subsequent features.

Related Functions

Shutdown()

void Shutdown ();

The Shutdown() function shuts the Feature object down so that it is no longer uses any data storage. The feature object shares data with the APT and Finder objects and data cannot be read into the Feature object until it has first been read into one of those objects. Similarly, if data created by the Feature object needs to be saved then it must be saved using a save function of those objects.

Related Functions

SpotfaceHole()/SpotfaceHoleTemplate()

System::Int64 SpotfaceHole (
	System::Int64 ws_id,
	System::String^ name,
	double small_hole_depth,
	double small_hole_diameter,
	double large_hole_radius,
	double large_hole_depth,
	double large_hole_diameter
	);

System::Int64 SpotfaceHoleTemplate (
	System::String^ name,
	double small_hole_depth,
	double small_hole_diameter,
	double large_hole_radius,
	double large_hole_depth,
	double large_hole_diameter
	);

The SpotfaceHole() function creates a counterbore feature with a radius on the bottom of the large hole. A counterbore hole is defined by a large hole and a small hole. The first function creates an instanced feature which means it is a complete stand-alone definition. The second function creates a template that can be shared between many instances using the PlacedFeature() function. This saves data and allows multiple instances to be edited by changing the shared template.

Arguments

ws_id
The identity of the workingstep that is to use the new feature. This parameter is optional and should not be used (by setting ws_id = 0) when making design (AP242) data.
name
Name (label) for the new feature.
small_hole_depth
The depth of the material to be removed for the small hole.
small_hole_diameter
The diameter of the material to be removed for the small hole.
large_hole_radius
The radius for the bottom of the large hole.
large_hole_depth
The depth of the material to be removed for the large hole.
large_hole_diameter
The diameter of the material to be removed for the large hole.

Related Functions

Common Errors

WorkingstepAddFinalFeature()

void WorkingstepAddFinalFeature (
	System::Int64 ws_id,
	System::Int64 feature_id
	);

The WorkingstepAddFinalFeature() function defines final features by reusing process features. If a process feature is also to be used as a final feature then it can be added to the list of final features for a workingstep using this function. If necessary the workingstep that contains the process feature can be deleted after the process feature has been captured as a final feature.

The functions in the Feature object create process features for workingsteps that are given as arguments to the functions – see for example ClosedRectangularPocket. A second type of feature called the Final Feature is also allowed in STEP-NC.

A process feature defines a data volume that is to be removed by the operation defined in a workingstep. A final feature defines a characteristic of the workpiece that is a target of the operations defined in a workplan. For example, in the figure below one of the final features is an open slot. Two process features are machined to make this open slot. The closed slot is made in workingstep #1. The open slot is completed in workingstep #2 by machining the step.

Sometimes the same feature is used as both a process feature and a final feature for a workingstep. This is shown in the figure where the step is both a process feature and a final feature for wokingstep #2. More commonly several operations are necessary to create a final feature. For example, both workingsteps have the open slot as a final feature because both operations are contributing to the machining of that final feature.

A STEP-NC program for machining only needs to define process features. However, a STEP-NC program for machining and measurement may need to define both types of features because the final features represent required characteristics of the final part. Typically they will be defined in CAD, not CAM, and they will include dimensions and tolerances that can be evaluated using measurement systems.

Arguments

ws_id
The identity of the workingstep that is to use the feature as a final feature.
feature_id
Feature previously made in the API or found using functionality in the Finder object..

Common Errors

WorkingstepProcessFeature()

System::Int64 WorkingstepProcessFeature (
	System::Int64 feature_id,
	System::Int64 ws_id
	);

The WorkingstepProcessFeature() function makes an existing feature the process feature of a workingstep.

Arguments

feature_id
Feature that is to be used to define the process
ws_id
Workingstep for the new feature.

Related Functions

Common Errors