Library | Module

Class pfcPart



Description

This class defines the material data for a part.
Direct Parent Classes:
pfcSolid



Property Summary

/* optional */ pfcMaterialCurrentMaterial
The part material



Method Summary

pfcMaterialCreateMaterial (string Name)
Creates a material of the specified name (with default values) in the part.
/* optional */ pfcMaterialGetMaterial (string Name)
Locates a material by name.
pfcMaterialsListMaterials ()
Lists the materials that exist in the part.
pfcMaterialRetrieveMaterial (string FileName)
Reads the named material properties from file and adds (or updates) the specified material name to the part's database.



Property Detail


/* optional */ pfcMaterialCurrentMaterial

The part material

By default, assigning a material to a sheetmetal part through pfcPart.CurrentMaterial modifies the values of the sheetmetal properties such as Y factor and/or bend table as per the material file definition. This triggers a regeneration and a modification of the developed length calculations of the sheetmetal part. However, you can avoid this behavior by setting the value of the config option "material_update_smt_bend_table" to "never_replace".





Method Detail


pfcMaterialCreateMaterial (string Name)

Creates a material of the specified name (with default values) in the part.

Exceptions thrown (but not limited to):

pfcXToolkitFound - The material name already exists.


Parameters:
Name
The material name
Returns:
The new material



/* optional */ pfcMaterialGetMaterial (string Name)

Locates a material by name.

The material must be stored in the part and not stored in an external file.
See Also:
pfcPart.RetrieveMaterial(), pfcPart.ListMaterials()
Parameters:
Name
The name of the material to find.
Returns:
The material object, or null, if the material was not found.



pfcMaterialsListMaterials ()

Lists the materials that exist in the part.
Returns:
The list of materials



pfcMaterialRetrieveMaterial (string FileName)

Reads the named material properties from file and adds (or updates) the specified material name to the part's database.

Exceptions thrown (but not limited to):

pfcXToolkitInvalidType - The model handle you passed to the function is not a part.

pfcXToolkitNotFound - The specifed file was not found on the drive.


Parameters:
FileName
The name of the material file. The method will look for'matl_name'.mtl (a modern material file) first, and then 'matl_name'.mat.
Returns:
The material properties