Library | Package Java Toolkit

Interface WFeature

package com.ptc.wfc.wfcFeature;

public interface WFeature
  extends com.ptc.wfc.wfcModelItem.WModelItem,
          com.ptc.wfc.wfcLayerState.LayerItem,
          com.ptc.pfc.pfcFeature.Feature



Description

Adds more functionality to Feature.
Direct Known Subclasses:
WHoleFeature, WCoordSysFeat, WCurveFeat, WDatumAxisFeat, WDatumPlaneFeat, WDatumPointFeat, WRoundFeat, AnnotationFeature, WComponentFeat



Method Summary
WFeatureCreatePattern (ElementTree Tree, PatternType Type)
    Creates a pattern of the feature with the element tree provided.
intGetDimensionId (ElementPath Path)
    Retrieves the Dimension identifier for the specified element.
ElementTreeGetElementTree ( /*optional*/ ComponentPath Path, FeatureElemTreeExtractOptions Option)
    Creates a copy of the feature element tree.
/*optional*/ ExternalReferenceInfosGetExternalParents (ExternalReferenceType type)
     Retrieves data on external (and local) parents according to the specified reference type.
ImportFeatureIdMapsGetIdMap ()
     Gets an array of maps between the item_id and user_id.
ImportFeatureDataGetImportFeatureData ()
    Retrieves the current parameters of the specified import feature.
intseqGetItemIds (int UserId, ModelItemType ItemType)
     Converts a user_id to item_id.
SectionsGetSections ()
    Returns sections present in the feature
SolidGetSolid ()
     Retrieves the solid in which the feature is placed.
FeatureStatusFlagGetStatusFlag ()
    Retrieves the status flag object of the feature.
intseqGetUserIds (int ItemId, ModelItemType ItemType)
     Converts a item_id to user_id.
Transform3DsGetZoneFeaturePlaneData ()
     Returns information about zone reference planes used to create a zone feature
ZoneFeatureReferencesGetZoneFeatureReferences ()
    Returns references used to create a zone feature
ZoneXSectionGeometriesGetZoneXSectionGeometry ()
    Returns cross section geometry used to create a zone feature
booleanIsCableCosmetic ()
     check if the feature is a cabling cosmetic feature.
booleanIsElementIncomplete (ElementPath Path)
    Determines whether the specified element is incomplete.
booleanIsElementVisible (ElementPath Path)
    Determines whether the specified element is visible.
booleanIsInFooter ()
     
/*optional*/ ModelItemsListVariedItems ()
     Lists the variant items (dimensions, features, annotations) owned by an inheritance feature or flexible component.
/*optional*/ ParametersListVariedParameters ()
     Lists only the variant parameters owned by an inheritance feature or flexible component.
/*optional*/ IntegerMoveFromFooter ()
     
/*optional*/ IntegerMoveToFooter ()
     
WFeatureRedefineFeature ( /*optional*/ ComponentPath Path, ElementTree Tree, FeatCreateOptions Options, /*optional*/ WRegenInstructions Instrs)
    Redefines the feature from the element tree
WFeatureRedefineImportFeature (ImportFeatureRedefSource Source)
     Redefines an existing import feature from the data source.
StatusVisitItems (VisitingClient visitingClient, /*optional*/ ModelItemType itemType)
    Visits all items of a given type.

Methods Inherited from Interface com.ptc.pfc.pfcBase.ActionSource
AddActionListener, RemoveActionListener, AddActionListenerWithType

Methods Inherited from Interface com.ptc.pfc.pfcObject.Parent
GetChild

Methods Inherited from Interface com.ptc.pfc.pfcModelItem.ParameterOwner
GetParam, CreateParam, ListParams, SelectParam, CreateParamWithUnits, SelectParameters

Methods Inherited from Interface com.ptc.wfc.wfcModelItem.WParameterOwner
ExportParameterTable, ApplyParameterTableset, MathcadParametersSet, MathcadInputParametersGet

Methods Inherited from Interface com.ptc.pfc.pfcModelItem.RelationOwner
DeleteRelations, GetRelations, SetRelations, RegenerateRelations, EvaluateExpression

Methods Inherited from Interface com.ptc.wfc.wfcModelItem.WRelationOwner
GetRelationConstraints, UnitsUsed, UseUnits, EvaluateExpressionWithUnits

Methods Inherited from Interface com.ptc.pfc.pfcObject.Child
GetDBParent, GetOId

Methods Inherited from Interface com.ptc.pfc.pfcModelItem.ModelItem
GetName, SetName, GetId, GetType

Methods Inherited from Interface com.ptc.wfc.wfcModelItem.WModelItem
DeleteUserDefinedName, Unhide, Hide, IsHidden, IsNameReadOnly, IsZoneFeature, GetDefaultName

Methods Inherited from Interface com.ptc.wfc.wfcLayerState.LayerItem
IsLayerItemVisible, RemoveNoUpdate, GetLayers, AddNoUpdate

Methods Inherited from Interface com.ptc.pfc.pfcFeature.Feature
GetFeatType, GetFeatTypeName, GetFeatSubType, GetStatus, GetGroup, GetPattern, GetGroupPattern, GetPatternByType, GetPatternStatus, GetGroupStatus, GetGroupPatternStatus, GetIsVisible, GetIsReadonly, GetNumber, GetVersionStamp, GetIsGroupMember, GetIsEmbedded, CreateSuppressOp, CreateResumeOp, CreateDeleteOp, CreateReorderBeforeOp, CreateReorderAfterOp, ListChildren, ListParents, ListSubItems, GetGroupDirectHeader

Method Detail

GetElementTree

ElementTreeGetElementTree ( /*optional*/ ComponentPath Path, FeatureElemTreeExtractOptions Option)


    Creates a copy of the feature element tree.

The feature can be a regular feature or a pattern.

Exceptions thrown (but not limited to):

XToolkitInvalidType - Extraction of the element tree is not supported for this feature type.


Manual References:
Feature Element Tree: Feature Element Tree, Element Trees: Sketched Features: To Create Sketched Features Element Trees
Parameters:
Path
Option
Returns:


IsElementVisible

booleanIsElementVisible (ElementPath Path)


    Determines whether the specified element is visible.

Invisible elements are those which are added to the tree by Creo Parametric for internal reasons only, and are neither defined as needed for creation of that type of feature, nor otherwise documented.
Manual References:
Features: Feature Information, Features: Feature Information
Parameters:
Path
Returns:


IsElementIncomplete

booleanIsElementIncomplete (ElementPath Path)


    Determines whether the specified element is incomplete.

If a feature is incomplete, this method can be used to find out which element in its tree is at fault. An incomplete feature can arise by using the option PRO_FEAT_CR_INCOMPLETE_FEAT from FeatCreateOption when calling WSolid.WCreateFeature(ElementTree, FeatCreateOptions, /*optional*/ WRegenInstructions), and does not give rise to geometry until completed.
Manual References:
Features: Feature Information, Features: Feature Information
Parameters:
Path
Returns:


GetStatusFlag

FeatureStatusFlagGetStatusFlag ()


    Retrieves the status flag object of the feature.
Manual References:
Features: Feature Information, Features: Feature Information
Returns:


RedefineFeature

WFeatureRedefineFeature ( /*optional*/ ComponentPath Path, ElementTree Tree, FeatCreateOptions Options, /*optional*/ WRegenInstructions Instrs)


    Redefines the feature from the element tree
Manual References:
Feature Element Tree: Redefining Features, Element Trees: Sketched Features: Creating Features Containing Sections, Element Trees: Sketched Features: To Create Sketched Features Element Trees
Parameters:
Path
Tree
Options
Instrs
Returns:


CreatePattern

WFeatureCreatePattern (ElementTree Tree, PatternType Type)


    Creates a pattern of the feature with the element tree provided.

The pattern can be of type PatternType

Exceptions thrown (but not limited to):

XToolkitUnsupported - Unsupported model. For instance, models which come from Multi-CAD assemblies are not supported in this release.


Manual References:
Feature Element Tree: Creating Patterns
Parameters:
Tree
Type
Returns:


GetDimensionId

intGetDimensionId (ElementPath Path)


    Retrieves the Dimension identifier for the specified element.

The element cannot be a compound element.
Manual References:
Feature Element Tree: Feature Elements, Feature Element Tree: Feature Elements
Parameters:
Path
Returns:


GetSections

SectionsGetSections ()


    Returns sections present in the feature

Method do not return sections which are unavailable for use. For example, Selected trajectory for Sweep feature will not be returned

Exceptions thrown (but not limited to):

XToolkitUnavailableSection - The section is not available for use.


Manual References:
Element Trees: Sections: Retrieving a Section, Element Trees: Sections: Retrieving a Section
Returns:


GetImportFeatureData

ImportFeatureDataGetImportFeatureData ()


    Retrieves the current parameters of the specified import feature.
Manual References:
Interface: Import Feature Properties, Interface: Import Feature Properties
Returns:
The import feature data object.


GetIdMap

ImportFeatureIdMapsGetIdMap ()


     Gets an array of maps between the item_id and user_id.

Exceptions thrown (but not limited to):

XToolkitOutOfMemory - Insufficient memory.


Manual References:
Interface: Import Feature Properties, Interface: Import Feature Properties
Returns:
 


GetItemIds

intseqGetItemIds (int UserId, ModelItemType ItemType)


     Converts a user_id to item_id.

Exceptions thrown (but not limited to):

XToolkitNotFound - The identifiers of the geometry items were not found.

XToolkitInvalidType - You specified an invalid type of geometry item.


Manual References:
Interface: Import Feature Properties, Interface: Import Feature Properties
Parameters:
UserId
The user identifier.
ItemType
The type of geometry item (pfcITEM_SURFACE, pfcITEM_EDGE or pfcITEM_QUILT).
Returns:
 


GetUserIds

intseqGetUserIds (int ItemId, ModelItemType ItemType)


     Converts a item_id to user_id.

Exceptions thrown (but not limited to):

XToolkitNotFound - The user identifiers was not found.

XToolkitInvalidType - You specified an invalid type of geometry item.


Manual References:
Interface: Import Feature Properties, Interface: Import Feature Properties
Parameters:
ItemId
The item identifier.
ItemType
The type of geometry item (pfcITEM_SURFACE, pfcITEM_EDGE or pfcITEM_QUILT).
Returns:
 


RedefineImportFeature

WFeatureRedefineImportFeature (ImportFeatureRedefSource Source)


     Redefines an existing import feature from the data source.

Exceptions thrown (but not limited to):

XToolkitNotImplemented - Not implemented.

XToolkitBadContext - no redefine could be done for ATB feature.


Manual References:
Interface: Redefining the Import Feature, Interface: Redefining the Import Feature
Parameters:
Source
The data source to be used for the redefinition.
Returns:
 


GetZoneFeatureReferences

ZoneFeatureReferencesGetZoneFeatureReferences ()


    Returns references used to create a zone feature
Manual References:
Features: Feature Information, Features: Feature Information
Returns:
A zone reference object


GetZoneXSectionGeometry

ZoneXSectionGeometriesGetZoneXSectionGeometry ()


    Returns cross section geometry used to create a zone feature
Manual References:
Features: Feature Information, Features: Feature Information
Returns:
A Sequence of zone cross section geometry


GetZoneFeaturePlaneData

Transform3DsGetZoneFeaturePlaneData ()


     Returns information about zone reference planes used to create a zone feature
Manual References:
Features: Feature Information, Features: Feature Information
Returns:


GetSolid

SolidGetSolid ()


     Retrieves the solid in which the feature is placed.
Returns:
The solid model.


IsCableCosmetic

booleanIsCableCosmetic ()


     check if the feature is a cabling cosmetic feature.
Returns:
true if feature is a cabling cosmetic feature, false if not.


GetExternalParents

/*optional*/ ExternalReferenceInfosGetExternalParents (ExternalReferenceType type)


     Retrieves data on external (and local) parents according to the specified reference type.

Exceptions thrown (but not limited to):

XToolkitNotValid - Required license not found.

XToolkitNotFound - No parents of parent_type are found.

XToolkitOutOfMemory - There are too many references in model. Some references will be excluded.

XToolkitInUse - The external parents is not NULL.


Parameters:
type
Type of external reference for which to retrieve parents
Returns:
The external parents.


VisitItems

StatusVisitItems (VisitingClient visitingClient, /*optional*/ ModelItemType itemType)


    Visits all items of a given type.

The following types are supported for all users: SURFACE, QUILT, EDGE, AXIS, CURVE, POINT, CSYS, DIMENSION.

The following type is supported of licenced users: ANNOTATION_ELEM.

If ApplyAction of the visiting client returns a value other than TK_NO_ERROR, this method returns.

If ApplyFilter returns TK_CONTINUE, the item is skipped (not passed to ApplyAction).

In C++ Object Toolkit, use wfcStatusToPro and wfcStatusFromPro to convert the returned status to ProError and back.

To facilitate the implementation of the visiting client, a default visiting client class is provided. The application can subclass it and override only those methods which it needs.

In ApplyAction & ApplyFilter of the visiting client, pfcObject pointer must be cast to the correct visiting type as follows:

SURFACE - pfcSurface

QUILT - pfcQuilt

EDGE - pfcEdge

AXIS - pfcAxis

CURVE - pfcCurve

POINT - pfcPoint

CSYS - pfcCsys

DIMENSION - pfcDimension

ANNOTATION_ELEM - wfcAnnotationElement

Casting as other types may lead to unexpected behaviour.

Warning: After this method returns, the visiting client stays alive (that is, will not be subject to memory release), to make its data and its methods available for the application. After the applicatoin finishes using the client, it should call WSession.ReleaseVisitor(VisitingClient) on it.

Exceptions thrown (but not limited to):

XToolkitNotFound - No annotation elements were found in the feature.


Manual References:
Overview of Creo Object TOOLKIT Java: Visit Methods, Overview of Creo Object TOOLKIT Java: Visit Methods
Parameters:
visitingClient
The visiting client.
itemType
Returns:
 


IsInFooter

booleanIsInFooter ()


     
Manual References:
Features: Feature Information, Features: Feature Information
Returns:
 


MoveToFooter

/*optional*/ IntegerMoveToFooter ()


     

Exceptions thrown (but not limited to):

XToolkitInvalidType - The specified feature is not permitted to be moved to footer.

XToolkitFound - The specified feature is already in the footer.


Manual References:
Features: Feature Information, Features: Feature Information
Returns:
 


MoveFromFooter

/*optional*/ IntegerMoveFromFooter ()


     

Exceptions thrown (but not limited to):

XToolkitFound - The specified feature is already outside the footer.

XToolkitInvalidType - The specified feature is not permitted to be moved from footer.


Manual References:
Features: Feature Information
Returns:
 


ListVariedItems

/*optional*/ ModelItemsListVariedItems ()


     Lists the variant items (dimensions, features, annotations) owned by an inheritance feature or flexible component.
Manual References:
Assemblies and Components: Variant Items for Flexible Components, Assemblies and Components: Variant Items for Flexible Components
Returns:
Array of the varied items.


ListVariedParameters

/*optional*/ ParametersListVariedParameters ()


     Lists only the variant parameters owned by an inheritance feature or flexible component.
Manual References:
Assemblies and Components: Variant Items for Flexible Components
Returns:
Array of the varied parameters.