FacetedBodyCollection Class — NXOpen Python API Reference 12.0.0 documentation

# FacetedBodyCollection Class

class `NXOpen.Facet.``FacetedBodyCollection`

  Bases: `object`

  Represents a collection of faceted bodies in a part

  To obtain an instance of this class, refer to `NXOpen.Part`

  New in version NX5.0.0.

  “FacetModelingCollection”, “Returns the FacetModelingCollection instance belonging to this part “

# Methods

Method | Description
--- | ---
Convert | Converts the internal representation of this faceted body to the specified type.
Copy | Copies a faceted body and optionally changes the internal representation to the given type (This is only valid for JT to NX copy)
CreateBestFitAlignBuilder | Creates a `NXOpen.Facet.BestFitAlignBuilder`
CreateBridgeFacetBodyBuilder | Creates a `NXOpen.Facet.BridgeFacetBodyBuilder`
CreateDecimateFacetBodyBuilder | Creates a `NXOpen.Facet.DecimateFacetBodyBuilder`
CreateExtrudeFacetBodyBuilder | Creates a `NXOpen.Facet.ExtrudeFacetBodyBuilder`
CreateExtrudeProfileBuilder | Creates a `NXOpen.Facet.ExtrudeProfileBuilder`
CreateFacetBody | Creates a JT `NXOpen.Facet.FacetedBody` using the default faceting tolerances.
CreateFacetBodyFromFaces | Creates a JT `NXOpen.Facet.FacetedBody` using the default faceting tolerances.
CreateFacetCurvatureBuilder | Create a `NXOpen.Facet.CurvatureBuilder` object.
CreateFacetFeatureExtractionBuilder | Create a `NXOpen.Facet.FeatureExtractionBuilder` object.
CreateFillHoleBuilder | Creates a `NXOpen.Facet.FillHoleBuilder`
CreateMergeFacetBodyBuilder | Creates a `NXOpen.Facet.MergeFacetBodyBuilder`
CreateMultiPatchAlignmentBuilder | Creates a `NXOpen.Facet.MultiPatchAlignmentBuilder`
CreateSTLImportBuilder | Creates a `NXOpen.Facet.STLImportBuilder`
CreateSewFacetBodyBuilder | Creates a `NXOpen.Facet.SewFacetBodyBuilder`
CreateSmoothFacetBodyBuilder | Creates a `NXOpen.Facet.SmoothFacetBodyBuilder`
CreateSnipFacetBodyBuilder | Creates a `NXOpen.Facet.SnipFacetBodyBuilder`
CreateSubdivideFacetBodyBuilder | Creates a `NXOpen.Facet.SubdivideFacetBodyBuilder`
DeleteTemporaryFacesAndEdges | Delete any temporary faces and edges on faceted bodies that may have been created in the specified part.
FindObject | Finds the `NXOpen.Facet.FacetedBody` with the given identifier as recorded in a journal.
GetAssociatedFacetedBodies | Returns the loaded solid bodies associated with the argument faceted body.

# Enumerations

FacetedBodyCollectionType Enumeration | Specifies the type of facets created when copying or converting faceted bodies

## FacetModelingCollection

`FacetedBodyCollection.``FacetModelingCollection`

  Returns the FacetModelingCollection instance belonging to this part

  Signature `FacetModelingCollection`

  New in version NX10.0.0.

  Returns: |
  Return type: | `NXOpen.Facet.FacetModelingCollection`

# Method Detail

## Convert

`FacetedBodyCollection.``Convert`

  Converts the internal representation of this faceted body to the specified type.

  This does not create a new body

  Signature `Convert(fromBody, toFacetType)`

  Parameters:

  - fromBody (`NXOpen.Facet.FacetedBody`) – The faceted body to convert
  - toFacetType (`NXOpen.Facet.FacetedBodyCollectionType`) – To facet type

  New in version NX5.0.0.

  License requirements: None.

## Copy

`FacetedBodyCollection.``Copy`

  Copies a faceted body and optionally changes the internal representation to the given type (This is only valid for JT to NX copy)

  Signature `Copy(fromBody, toPart, toFacetType)`

  Parameters:

  - fromBody (`NXOpen.Facet.FacetedBody`) – The faceted body to copy
  - toPart (`NXOpen.Part`) – Part to create the copy in
  - toFacetType (`NXOpen.Facet.FacetedBodyCollectionType`) – To facet type

  Returns: | New body
  Return type: | `NXOpen.Facet.FacetedBody`

  New in version NX5.0.0.

  License requirements: None.

## CreateBestFitAlignBuilder

`FacetedBodyCollection.``CreateBestFitAlignBuilder`

  Creates a `NXOpen.Facet.BestFitAlignBuilder`

  Signature `CreateBestFitAlignBuilder()`

  Returns: |
  Return type: | `NXOpen.Facet.BestFitAlignBuilder`

  New in version NX6.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR nx_freeform_1 (“basic freeform modeling”)

## CreateBridgeFacetBodyBuilder

`FacetedBodyCollection.``CreateBridgeFacetBodyBuilder`

  Creates a `NXOpen.Facet.BridgeFacetBodyBuilder`

  Signature `CreateBridgeFacetBodyBuilder()`

  Returns: |
  Return type: | `NXOpen.Facet.BridgeFacetBodyBuilder`

  New in version NX9.0.0.

  License requirements: studio_free_form (“STUDIO FREE FORM”) OR die_engineering (“DIE ENGINEERING”)

## CreateDecimateFacetBodyBuilder

`FacetedBodyCollection.``CreateDecimateFacetBodyBuilder`

  Creates a `NXOpen.Facet.DecimateFacetBodyBuilder`

  Signature `CreateDecimateFacetBodyBuilder()`

  Returns: |
  Return type: | `NXOpen.Facet.DecimateFacetBodyBuilder`

  New in version NX7.5.0.

  License requirements: studio_free_form (“STUDIO FREE FORM”)

## CreateExtrudeFacetBodyBuilder

`FacetedBodyCollection.``CreateExtrudeFacetBodyBuilder`

  Creates a `NXOpen.Facet.ExtrudeFacetBodyBuilder`

  Signature `CreateExtrudeFacetBodyBuilder()`

  Returns: |
  Return type: | `NXOpen.Facet.ExtrudeFacetBodyBuilder`

  New in version NX9.0.0.

  License requirements: studio_free_form (“STUDIO FREE FORM”) OR die_engineering (“DIE ENGINEERING”)

## CreateExtrudeProfileBuilder

`FacetedBodyCollection.``CreateExtrudeProfileBuilder`

  Creates a `NXOpen.Facet.ExtrudeProfileBuilder`

  Signature `CreateExtrudeProfileBuilder()`

  Returns: |
  Return type: | `NXOpen.Facet.ExtrudeProfileBuilder`

  New in version NX9.0.0.

  License requirements: studio_free_form (“STUDIO FREE FORM”) OR die_engineering (“DIE ENGINEERING”)

## CreateFacetBody

`FacetedBodyCollection.``CreateFacetBody`

  Creates a JT `NXOpen.Facet.FacetedBody` using the default faceting tolerances.

  The output facetBodies and errorTable arrays are the same size as the input nSolidBodies. The errorTable array provides information about any errors encountered when faceting bodies. Note that it is possible that faceted bodies with 0 facets are created (and returned in the facetBodies parameter). For this case, the errorTable will contain the UF_FACET_err_zero_facets_produced error. If there is an existing facet body it will get refaceted with the previous tolerance used to tessellate it . See `NXOpen.Body.GetFacetedBody()` for ways to check for this situation.

  Signature `CreateFacetBody(solidBodies)`

  Parameters: | solidBodies (list of `NXOpen.Body`) –
  Returns: | a tuple
  Return type: | A tuple consisting of (facetBodies, errorTable). facetBodies is a list of `NXOpen.Facet.FacetedBody`. errorTable is a list of int.

  New in version NX7.5.5.

  License requirements: adv_assemblies (“ADVANCED ASSEMBLIES”)

## CreateFacetBodyFromFaces

`FacetedBodyCollection.``CreateFacetBodyFromFaces`

  Creates a JT `NXOpen.Facet.FacetedBody` using the default faceting tolerances.

  The output facetBodies and errorTable arrays are the same size as the input nSolidFaces. The errorTable array provides information about any errors encountered when faceting bodies. Note that it is possible that faceted bodies with 0 facets are created (and returned in the facetBodies parameter). For this case, the errorTable will contain the UF_FACET_err_zero_facets_produced error. If there is an existing facet body it will get refaceted with the previous tolerance used to tessellate it . See `NXOpen.Body.GetFacetedBody()` for ways to check for this situation.

  Signature `CreateFacetBodyFromFaces(solidFaces)`

  Parameters: | solidFaces (list of `NXOpen.Face`) –
  Returns: | a tuple
  Return type: | A tuple consisting of (facetBodies, errorTable). facetBodies is a list of `NXOpen.Facet.FacetedBody`. errorTable is a list of int.

  New in version NX8.5.0.

  License requirements: adv_assemblies (“ADVANCED ASSEMBLIES”)

## CreateFacetCurvatureBuilder

`FacetedBodyCollection.``CreateFacetCurvatureBuilder`

  Create a `NXOpen.Facet.CurvatureBuilder` object.

  Signature `CreateFacetCurvatureBuilder()`

  Returns: |
  Return type: | `NXOpen.Facet.CurvatureBuilder`

  New in version NX5.0.0.

  License requirements: None.

## CreateFacetFeatureExtractionBuilder

`FacetedBodyCollection.``CreateFacetFeatureExtractionBuilder`

  Create a `NXOpen.Facet.FeatureExtractionBuilder` object.

  Signature `CreateFacetFeatureExtractionBuilder()`

  Returns: |
  Return type: | `NXOpen.Facet.FeatureExtractionBuilder`

  New in version NX5.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”)

## CreateFillHoleBuilder

`FacetedBodyCollection.``CreateFillHoleBuilder`

  Creates a `NXOpen.Facet.FillHoleBuilder`

  Signature `CreateFillHoleBuilder()`

  Returns: |
  Return type: | `NXOpen.Facet.FillHoleBuilder`

  New in version NX6.0.0.

  License requirements: studio_free_form (“STUDIO FREE FORM”)

## CreateMergeFacetBodyBuilder

`FacetedBodyCollection.``CreateMergeFacetBodyBuilder`

  Creates a `NXOpen.Facet.MergeFacetBodyBuilder`

  Signature `CreateMergeFacetBodyBuilder()`

  Returns: |
  Return type: | `NXOpen.Facet.MergeFacetBodyBuilder`

  New in version NX9.0.0.

  License requirements: studio_free_form (“STUDIO FREE FORM”) OR die_engineering (“DIE ENGINEERING”)

## CreateMultiPatchAlignmentBuilder

`FacetedBodyCollection.``CreateMultiPatchAlignmentBuilder`

  Creates a `NXOpen.Facet.MultiPatchAlignmentBuilder`

  Signature `CreateMultiPatchAlignmentBuilder()`

  Returns: |
  Return type: | `NXOpen.Facet.MultiPatchAlignmentBuilder`

  New in version NX7.5.0.

  License requirements: studio_free_form (“STUDIO FREE FORM”)

## CreateSTLImportBuilder

`FacetedBodyCollection.``CreateSTLImportBuilder`

  Creates a `NXOpen.Facet.STLImportBuilder`

  Signature `CreateSTLImportBuilder()`

  Returns: |
  Return type: | `NXOpen.Facet.STLImportBuilder`

  New in version NX6.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR nx_freeform_1 (“basic freeform modeling”)

## CreateSewFacetBodyBuilder

`FacetedBodyCollection.``CreateSewFacetBodyBuilder`

  Creates a `NXOpen.Facet.SewFacetBodyBuilder`

  Signature `CreateSewFacetBodyBuilder()`

  Returns: |
  Return type: | `NXOpen.Facet.SewFacetBodyBuilder`

  New in version NX9.0.0.

  License requirements: studio_free_form (“STUDIO FREE FORM”) OR die_engineering (“DIE ENGINEERING”)

## CreateSmoothFacetBodyBuilder

`FacetedBodyCollection.``CreateSmoothFacetBodyBuilder`

  Creates a `NXOpen.Facet.SmoothFacetBodyBuilder`

  Signature `CreateSmoothFacetBodyBuilder()`

  Returns: |
  Return type: | `NXOpen.Facet.SmoothFacetBodyBuilder`

  New in version NX7.5.0.

  License requirements: studio_free_form (“STUDIO FREE FORM”)

## CreateSnipFacetBodyBuilder

`FacetedBodyCollection.``CreateSnipFacetBodyBuilder`

  Creates a `NXOpen.Facet.SnipFacetBodyBuilder`

  Signature `CreateSnipFacetBodyBuilder()`

  Returns: |
  Return type: | `NXOpen.Facet.SnipFacetBodyBuilder`

  New in version NX6.0.0.

  License requirements: studio_free_form (“STUDIO FREE FORM”)

## CreateSubdivideFacetBodyBuilder

`FacetedBodyCollection.``CreateSubdivideFacetBodyBuilder`

  Creates a `NXOpen.Facet.SubdivideFacetBodyBuilder`

  Signature `CreateSubdivideFacetBodyBuilder()`

  Returns: |
  Return type: | `NXOpen.Facet.SubdivideFacetBodyBuilder`

  New in version NX7.5.0.

  License requirements: studio_free_form (“STUDIO FREE FORM”)

## DeleteTemporaryFacesAndEdges

`FacetedBodyCollection.``DeleteTemporaryFacesAndEdges`

  Delete any temporary faces and edges on faceted bodies that may have been created in the specified part.

  Please note that this call will invoke an Update operation.

  Signature `DeleteTemporaryFacesAndEdges()`

  New in version NX5.0.2.

  License requirements: None.

## FindObject

`FacetedBodyCollection.``FindObject`

  Finds the `NXOpen.Facet.FacetedBody` with the given identifier as recorded in a journal.

  An object may not return the same value as its JournalIdentifier in different versions of the software. However newer versions of the software should find the same object when FindObject is passed older versions of its journal identifier. In general, this method should not be used in handwritten code and exists to support record and playback of journals.

  An exception will be thrown if no object can be found with the given journal identifier.

  Signature `FindObject(journalIdentifier)`

  Parameters: | journalIdentifier (str) – Identifier of the faceted body you want
  Returns: | Faceted body with this identifier
  Return type: | `NXOpen.Facet.FacetedBody`

  New in version NX5.0.0.

  License requirements: None.

## GetAssociatedFacetedBodies

`FacetedBodyCollection.``GetAssociatedFacetedBodies`

  Returns the loaded solid bodies associated with the argument faceted body.

  Also returns the number of unloaded associated faceted bodies.

  Signature `GetAssociatedFacetedBodies(solidBody)`

  Parameters: | solidBody (`NXOpen.Body`) – The body for which to get associated faceted bodies
  Returns: | a tuple
  Return type: | A tuple consisting of (associatedFacetedBodies, numberOfUnloadedFacetedBodies). associatedFacetedBodies is a list of `NXOpen.Facet.FacetedBody`. Array of loaded associated faceted bodies numberOfUnloadedFacetedBodies is a int. The number of unloaded associated faceted bodies for this solids body

  New in version NX5.0.0.

  License requirements: None.