Library | Module

Class pfcSolid



Description

This class defines a solid.
Direct Parent Classes:
pfcFamilyMember, pfcModel
Direct Known Subclasses:
pfcAssembly, pfcPart



Property Summary

/* optional */ numberAbsoluteAccuracy
The absolute accuracy of the solid or null, if relative accuracy is used
/* readonly */ pfcOutline3DGeomOutline
The outline of the solid with respect to the base coordinate system orientation
/* readonly */ booleanIsSkeleton
true if the model is a skeleton model, false otherwise.
/* optional */ numberRelativeAccuracy
The relative accuracy of the solid or null, if absolute accuracy is used



Method Summary

voidActivateSimpRep (pfcSimpRep SimpRep)
Activates the specified simplified representation.
pfcUnitCreateCustomUnit (string Name, pfcUnitConversionFactor ConversionFactor, pfcUnit ReferenceUnit)
Creates a custom unit based on name, conversion factor and reference unit.
pfcFeatureCreateFeature (pfcFeatureCreateInstructions Instructions)
Not implemented in the current release. Creates a feature, based on the instructions provided.
pfcFeatureCreateImportFeat (pfcIntfDataSource IntfData, /* optional */ pfcCoordSystem CoordSys, /* optional */ pfcImportFeatAttr FeatAttr)
Creates a new import feature in the solid (part). Assembly case is not supported.
pfcFeatureGroupCreateLocalGroup (pfcFeatures Members, string Name)
Creates a local group out of the specified set of features.
pfcModelItemCreateNote (stringseq Lines, /* optional */ pfcModelItem Owner)
 
pfcSimpRepCreateSimpRep (pfcCreateNewSimpRepInstructions Instructions)
Creates a simplified representation based on the supplied instructions.
pfcFeatureGroupCreateUDFGroup (pfcUDFGroupCreateInstructions Instructions)
Creates a FeatureGroup, based on the instructions provided.
pfcUnitSystemCreateUnitSystem (string Name, pfcUnitSystemType Type, pfcUnits Units)
Creates a new unit system in the model.
voidDeleteSimpRep (pfcSimpRep SimpRep)
Deletes the specified simplified representation from its owner model.
pfcOutline3DEvalOutline ( /* optional */ pfcTransform3D Trf, /* optional */ pfcModelItemTypes ExcludeTypes)
Computes the outline of a solid.
voidExecuteFeatureOps (pfcFeatureOperations Ops, /* optional */ pfcRegenInstructions Instrs)
Performs the specified feature operations.
voidExportShrinkwrap (pfcShrinkwrapExportInstructions Instructions)
Exports a solid model to shrinkwrap format.
pfcSimpRepGetActiveSimpRep ()
Returns the current active simplified representation.
/* optional */ pfcXSectionGetCrossSection (string Name)
Returns a cross-section object, given its name.
pfcSolidBodyGetDefaultBody ()
Returns the default body of the solid.
pfcSolidBodyGetEdgeSolidBody (pfcEdge thisEdge)
Returns the body to which the edge belongs.
/* optional */ pfcFeatureGetFeatureById (number Id)
Retrieves the specified feature, given its identifier.
/* optional */ pfcFeatureGetFeatureByName (string Name)
Locates the feature object, given its name.
pfcSimpRepGetGeomRep ()
Returns the object representing the solid model's Geometry Rep.
pfcSimpRepGetGraphicsRep ()
Returns the object representing the solid model's Grpahics Rep.
pfcMassPropertyGetMassProperty ( /* optional */ string CoordSysName)
Gets the mass properties for the solid.
pfcMassPropertyGetMassPropertyWithDensity ( /* optional */ string CoordSysName, pfcMPDensityUse DensityOpt, /* optional */ number density)
 
pfcSimpRepGetMasterRep ()
Returns the object representing the solid model's Master Rep.
pfcUnitSystemGetPrincipalUnits ()
Gets the system of units assigned to the solid model.
pfcSimpRepGetSimpRep (string SimpRepName)
Returns the handle to the specified simplified representation.
pfcSolidBodyGetSurfaceSolidBody (pfcSurface thisSurf)
Returns the body to which the surface belongs.
/* optional */ pfcUnitGetUnit (string Name, /* optional */ boolean ByExpression)
Get the handle to a particular unit based on name or expression.
booleanHasRetrievalErrors ()
Identifies if a previous call to retrieve the model resulted in errors.
/* optional */ pfcXSectionsListCrossSections ()
Lists the cross-sections in the solid model.
/* optional */ pfcFeaturesListFailedFeatures ()
Retrieves the list of failed features in the part or assembly.
/* optional */ pfcFeaturesListFeaturesByType ( /* optional */ boolean VisibleOnly, /* optional */ pfcFeatureType Type)
Lists the features according to type.
pfcFeatureGroupsListGroups ()
Collect groups (including UDFs) in the solid.
pfcUnitsListUnits ( /* optional */ pfcUnitType Type)
Lists the units available in the model.
pfcUnitSystemsListUnitSystems ()
Lists the unit systems available in the model.
voidRegenerate ( /* optional */ pfcRegenInstructions Instrs)
Regenerates the solid.
pfcSimpRepSelectSimpRep ()
Enables the user to select a simplified representation.
voidSetPrincipalUnits (pfcUnitSystem Units, pfcUnitConversionOptions Options)
Sets the system of units for the solid.



Property Detail


/* optional */ numberAbsoluteAccuracy

The absolute accuracy of the solid or null, if relative accuracy is used




/* readonly */ pfcOutline3DGeomOutline

The outline of the solid with respect to the base coordinate system orientation




/* readonly */ booleanIsSkeleton

true if the model is a skeleton model, false otherwise.

Exceptions thrown (but not limited to):

pfcXToolkitNotValid - Required license not found.






/* optional */ numberRelativeAccuracy

The relative accuracy of the solid or null, if absolute accuracy is used





Method Detail


voidActivateSimpRep (pfcSimpRep SimpRep)

Activates the specified simplified representation.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - The specified simplified representation was not found in the model.


Parameters:
SimpRep
The simplified representation to activate.



pfcUnitCreateCustomUnit (string Name, pfcUnitConversionFactor ConversionFactor, pfcUnit ReferenceUnit)

Creates a custom unit based on name, conversion factor and reference unit.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - The reference unit was not found in the model.


Parameters:
Name
The name of the unit
ConversionFactor
Information relating the new unit to its reference unit.
ReferenceUnit
The unit upon which the new unit is based.
Returns:
The created pfcUnit



pfcFeatureCreateFeature (pfcFeatureCreateInstructions Instructions)

Not implemented in the current release. Creates a feature, based on the instructions provided.

Object Toolkit users can use WCreateFeature
Parameters:
Instructions
Descriptions of the type of feature to create.
Returns:
pfcFeature object



pfcFeatureCreateImportFeat (pfcIntfDataSource IntfData, /* optional */ pfcCoordSystem CoordSys, /* optional */ pfcImportFeatAttr FeatAttr)

Creates a new import feature in the solid (part). Assembly case is not supported.

Exceptions thrown (but not limited to):

pfcXToolkitUnsupported - Creo Parametric does not support import of the indicated file.

pfcXToolkitNotExist - No profile found.

pfcXToolkitInvalidFile - profile is not readable.


Parameters:
IntfData
The source of data (that is, the file) from which to create the import feature.
CoordSys
A reference coordinate system. If NULL, the method uses the default coordinate system.
FeatAttr
The attributes for creation of the new import feature. If NULL, the method uses the default attributes.
Returns:
The handle to the new import feature.



pfcFeatureGroupCreateLocalGroup (pfcFeatures Members, string Name)

Creates a local group out of the specified set of features.

The supplied features must represent a contiguous set of features in the part or assembly.
Parameters:
Members
The features to be grouped
Name
The name to be assigned to the created local group
Returns:
The local group that was created



pfcModelItemCreateNote (stringseq Lines, /* optional */ pfcModelItem Owner)

 
Parameters:
Lines
 
Owner
 
Returns:
 



pfcSimpRepCreateSimpRep (pfcCreateNewSimpRepInstructions Instructions)

Creates a simplified representation based on the supplied instructions.
Parameters:
Instructions
The Instructions (data) for the simplified representation.
Returns:
The handle to the new simplified representation.



pfcFeatureGroupCreateUDFGroup (pfcUDFGroupCreateInstructions Instructions)

Creates a FeatureGroup, based on the instructions provided.

Exceptions thrown (but not limited to):

pfcXToolkitUnsupported - The input model is Multi-CAD model.


Parameters:
Instructions
Data objects containing parameters for the type of feature group to create.
Returns:
The created UDF group.



pfcUnitSystemCreateUnitSystem (string Name, pfcUnitSystemType Type, pfcUnits Units)

Creates a new unit system in the model.

Units should include at most one occurrence of each basic unit type. If a unit of a basic type is missing then a corresponding one is taken from the standard system 'Creo Parametric Default'.

Exceptions thrown (but not limited to):

pfcXToolkitAmbiguous - The units argument contains multiple units for a type.


Parameters:
Name
The name of the new unit system.
Type
The type of unit system to create (Mass/Length/Time) or (Force/Length/Time).
Units
Sequence of units that makes up the new unit system.
Returns:
The created pfcUnitSystem



voidDeleteSimpRep (pfcSimpRep SimpRep)

Deletes the specified simplified representation from its owner model.
Parameters:
SimpRep
The simplified representation to delete.



pfcOutline3DEvalOutline ( /* optional */ pfcTransform3D Trf, /* optional */ pfcModelItemTypes ExcludeTypes)

Computes the outline of a solid.
Parameters:
Trf
The orientation matrix (with respect to the base coordinatesystem) to which the outline is to be computed
ExcludeTypes
An array of model-item types to exclude from the outline computation. The types that can be excluded are ITEM_COORD_SYS, ITEM_AXIS, and ITEM_POINT.
Returns:
An Outline3D object which contains two points that define the boundaries of the solid in the specified orientation



voidExecuteFeatureOps (pfcFeatureOperations Ops, /* optional */ pfcRegenInstructions Instrs)

Performs the specified feature operations.

This method is not supported in No-Resolve mode (default regeneration mode in Creo Elements/Pro). It will throw pfcXToolkitBadContext, if Creo Parametric is running in No-Resolve mode. To continue with the Pro/ENGINEER Wildfire 4.0 behavior in Resolve mode, set the configuration option 'regen_failure_handling' to 'resolve_mode'.

Exceptions thrown (but not limited to):

pfcXToolkitNotValid - One or more input features is not permitted to be suppressed.

pfcXToolkitSuppressedParents - Suppressed parents were found.

<reference 4 to unknown entity pfcExceptions::pfcXToolkitInvalidPtr> - Feature operation is invalid


Parameters:
Ops
The feature operations (suppress, delete, resume, and so on)
Instrs
The regeneration instructions. This parameter can be null, in which case the Creo Parametric's Fix Model interface is not displayed after a failure.



voidExportShrinkwrap (pfcShrinkwrapExportInstructions Instructions)

Exports a solid model to shrinkwrap format.

Exceptions thrown (but not limited to):

pfcXToolkitBadContext - Invalid combination of input arguments.

pfcXToolkitLineTooLong - Name length of the output file is more than 31 chars.


Parameters:
Instructions
Instructions describing the type and contents of the shrinkwrap model.



pfcSimpRepGetActiveSimpRep ()

Returns the current active simplified representation.
Returns:
The current active simplified representation



/* optional */ pfcXSectionGetCrossSection (string Name)

Returns a cross-section object, given its name.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - Model doesn't have cross-sections.


Parameters:
Name
The name of the cross-section.
Returns:
The cross-section object, or null, if the cross-section with that name does not exist.



pfcSolidBodyGetDefaultBody ()

Returns the default body of the solid.
Returns:
The default solid body object.



pfcSolidBodyGetEdgeSolidBody (pfcEdge thisEdge)

Returns the body to which the edge belongs.
Parameters:
thisEdge
The edge whose solid body is sought.
Returns:
The solid body object.



/* optional */ pfcFeatureGetFeatureById (number Id)

Retrieves the specified feature, given its identifier.

Exceptions thrown (but not limited to):

pfcXToolkitNotExist - Item with such id and type does not exist.


Parameters:
Id
The feature identifier
Returns:
The requested feature or null, if the solid does not contain a featurewith the specified identifier.



/* optional */ pfcFeatureGetFeatureByName (string Name)

Locates the feature object, given its name.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - The item was not found.


Parameters:
Name
The name of the feature to locate.
Returns:
The feature object, or null, if the feature was not found.



pfcSimpRepGetGeomRep ()

Returns the object representing the solid model's Geometry Rep.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - The function did not find the simplified representation in the solid.


See Also:
pfcSolid.GetSimpRep(), pfcSolid.GetGraphicsRep(), pfcSolid.GetMasterRep(), pfcSimpRep.GetSimpRepType()
Returns:
An object representing the Geometry Rep.



pfcSimpRepGetGraphicsRep ()

Returns the object representing the solid model's Grpahics Rep.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - The function did not find the simplified representation in the solid.


See Also:
pfcSolid.GetSimpRep(), pfcSolid.GetGeomRep(), pfcSolid.GetMasterRep(), pfcSimpRep.GetSimpRepType()
Returns:
An object representing the Graphics Rep.



pfcMassPropertyGetMassProperty ( /* optional */ string CoordSysName)

Gets the mass properties for the solid.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - The specified coordinate system was not found.


Parameters:
CoordSysName
The coordinate system name used to compute the mass property.If null, uses the default coordinate system.
Returns:
 



pfcMassPropertyGetMassPropertyWithDensity ( /* optional */ string CoordSysName, pfcMPDensityUse DensityOpt, /* optional */ number density)

 
Parameters:
CoordSysName
DensityOpt
density
Returns:



pfcSimpRepGetMasterRep ()

Returns the object representing the solid model's Master Rep.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - The function did not find the simplified representation in the solid.


See Also:
pfcSolid.GetSimpRep(), pfcSolid.GetGraphicsRep(), pfcSolid.GetGeomRep(), pfcSimpRep.GetSimpRepType()
Returns:
An object representing the Master Rep.



pfcUnitSystemGetPrincipalUnits ()

Gets the system of units assigned to the solid model.
Returns:
The unit system.



pfcSimpRepGetSimpRep (string SimpRepName)

Returns the handle to the specified simplified representation.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - The function did not find the simplified representation in the solid.


Parameters:
SimpRepName
The name of the simplified representation in the solid.
Returns:
 



pfcSolidBodyGetSurfaceSolidBody (pfcSurface thisSurf)

Returns the body to which the surface belongs.
Parameters:
thisSurf
The surface whose solid body is sought.
Returns:
The solid body object.



/* optional */ pfcUnitGetUnit (string Name, /* optional */ boolean ByExpression)

Get the handle to a particular unit based on name or expression.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - The indicated unit name does not exist in the model.


Parameters:
Name
The name, or expression, for the unit.
ByExpression
Specifies whether name is to be treated as an expression (value true) or not (value false).
Returns:
The initialized pfcUnit



booleanHasRetrievalErrors ()

Identifies if a previous call to retrieve the model resulted in errors.

Models may be retrieved even if some component models are missing. The missing components will be suppressed, and geometry referencing these models will be frozen. The retrieval methods will not give an indication that this error occurred. Call this method after retrieval to see if any such errors occurred.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - Errors were not found for this model.


See Also:
pfcBaseSession.RetrieveModel(), pfcBaseSession.RetrieveModelWithOpts(), pfcBaseSession.OpenFile(), pfcBaseSession.RetrieveAssemSimpRep()
Returns:
true if errors occurred during retrieval, false if there was no error.



/* optional */ pfcXSectionsListCrossSections ()

Lists the cross-sections in the solid model.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - Model doesn't have cross-sections.


Returns:
Sequence of cross-section objects.



/* optional */ pfcFeaturesListFailedFeatures ()

Retrieves the list of failed features in the part or assembly.
Returns:
The list of failed features, or null if no failed features has been found



/* optional */ pfcFeaturesListFeaturesByType ( /* optional */ boolean VisibleOnly, /* optional */ pfcFeatureType Type)

Lists the features according to type.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - No failed feature was found.


Parameters:
VisibleOnly
If this is true, the function lists public features only. If this is false, the function lists both public and internal features. Internal features are 'invisible' features and used internally for construction purposes. (If the argument is null, true will be used.)
Type
The feature type or null, if all the solid features are to be listed
Returns:
The list of features or null, if no features of the specified type has been found



pfcFeatureGroupsListGroups ()

Collect groups (including UDFs) in the solid.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - No groups exist in the solid


Returns:
The list of groups.



pfcUnitsListUnits ( /* optional */ pfcUnitType Type)

Lists the units available in the model.
Parameters:
Type
The type of units to list. If this is null, this will list all unit types.
Returns:
The list of units found.



pfcUnitSystemsListUnitSystems ()

Lists the unit systems available in the model.
Returns:
The list of unit systems.



voidRegenerate ( /* optional */ pfcRegenInstructions Instrs)

Regenerates the solid.

Regeneration in No-Resolve mode (default mode in Creo Elements/Pro) is not supported. This method will throw pfcXToolkitBadContext, if Creo Parametric is running in No-Resolve mode. To continue with the Pro/ENGINEER Wildfire 4.0 behavior in Resolve mode, set the configuration option 'regen_failure_handling' to 'resolve_mode'.

Exceptions thrown (but not limited to):

pfcXToolkitUnattachedFeats - Unattached features were detected, but there was no regeneration failure

pfcXToolkitRegenerateAgain - The model is too complex to regenerate the first time

pfcXToolkitBadContext - Invalid regen flags and/or combination of regeneration flags if mixed with pfcRegenInstructions::SetForceRegen as true.


Parameters:
Instrs
The regeneration instructions. This parameter can be null, in which case the Creo Parametric's Fix Model interface is not displayed after a failure.



pfcSimpRepSelectSimpRep ()

Enables the user to select a simplified representation.

Exceptions thrown (but not limited to):

pfcXToolkitUserAbort - The user aborted simplified representation selection.


Returns:
The selected simplified representation.



voidSetPrincipalUnits (pfcUnitSystem Units, pfcUnitConversionOptions Options)

Sets the system of units for the solid.

This will regenerate the model.
Parameters:
Units
The new unit system.
Options
Information about the data conversion should take place.