MasterCutBuilder Class — NXOpen Python API Reference 12.0.0 documentation

# MasterCutBuilder Class

class `NXOpen.Features.``MasterCutBuilder`

  Bases: `NXOpen.Features.FeatureBuilder`

  Represents a master cut feature builder that creates, inquires, or edits a master cut feature associated with a Cut View.

  This class provides methods to set and get the various master cut sub components.

  The following are default options and values.

  ** Cut View </b> The work view

  ** Tool Body </b> Extrude feature tool body used to perform the cut. The user must set this

  ** Target Components </b> Components and/or solid bodies to cut. Unset unless the work part only contains one body

  ** Material Outside Loop </b> true, i.e., the material is outside the loop used to create the extrude body

  ** Use Cut Hatch </b> true, i.e., cut faces are crosshatched in static wireframe mode

  ** Hatch Angle </b> 45.0 degrees.

  ** Hatch Distance </b> 0.236/6.0 [in/mm]

  ** Use Cut Color </b> true, i.e., cut faces are colored in shaded mode

  ** Cut Color </b> Medium violet magenta

  ** Use Save As </b> true, i.e., save the cut view with a new name

  ** Save As Name </b> “SECTION OF work view name”

  To create a new instance of this class, use `NXOpen.Features.FeatureCollection.CreateMasterCutBuilder()`

  Default values.

  Property | Value
  --- | ---
  CutColor | 193
  Extrude.SmartVolumeProfile.OpenProfileSmartVolumeOption | 0
  HatchAngle | 45
  HatchDistance | 6.0 (millimeters part), 0.236 (inches part)
  MaterialOutsideLoop | True
  UseCutColor | True
  UseCutHatch | True
  UseSaveAs | True

  New in version NX4.0.0.

# Properties

Property | Description
--- | ---
CutColor | Returns or sets the cut face color
CutView | Returns or sets the cut view
Extrude | Returns the extrude builder
HatchAngle | Returns or sets the hatch angle
HatchDistance | Returns or sets the hatch distance
MaterialOutsideLoop | Returns or sets the flag whether or not the material is outside the loop used to create the extruded body
ParentFeatureInternal | Returns or sets whether or not the latest timestamped parent feature of this feature should be made internal
PatchSolutionFlag | Returns or sets the patch solution flag
PatchSurfaceFilename | Returns or sets the patch surface filename
SaveAsName | Returns or sets the cut save as name
SurroundingPatchSurfaceFilename | Returns or sets the surrounding patch surface filename
Tag | Returns the Tag for this object.
TargetComponents | Returns the target components that are cut
ToolBody | Returns or sets the tool body used to perform the cut, which is an extruded body
UseCutColor | Returns or sets the flag whether or not to use the specified color for the cut faces
UseCutHatch | Returns or sets the flag whether or not the cut faces are crosshatched in wireframe mode
UseSaveAs | Returns or sets the flag whether or not to save the work view with a new name

# Methods

Method | Description
--- | ---
CalcThroughLimits | Calculate start and end through limit values
Commit | Commits any edits that have been applied to the builder.
CommitFeature | Commits the feature parameters and creates the feature
Destroy | Deletes the builder, and cleans up any objects created by the builder.
GetCommittedObjects | For builders that create more than one object, this method returns the objects that are created by commit.
GetFeature | Returns the feature currently being edited by this builder.
GetObject | Returns the object currently being edited by this builder.
HideInternalParentFeatureAfterEdit | Re-suppress an internal parent feature (a slave feature) after it has been edited.
RecalculateLimits | Recalculates extrude limits to cut through target components
SetParentFeatureInternal | Set the parent features which would be internal or slaves to the feature being created or commited
SetTargetComponents | The target components that are cut
ShowInternalParentFeatureForEdit | Unsuppress an internal parent feature (a slave feature) so it can be edited.
ShowResults | Updates the model to reflect the result of an edit to the model for all builders that support showing results.
UnsetParentFeatureInternal | Set the internal parent feature of the feature being edited to external
Validate | Validate whether the inputs to the component are sufficient for commit to be called.

# Property Detail

## CutColor

`MasterCutBuilder.``CutColor`

  Returns or sets the cut face color

  `-------------------------------------`

  Getter Method

  Signature `CutColor`

  Returns: | cut face color
  Return type: | int

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”)

  `-------------------------------------`

  Setter Method

  Signature `CutColor`

  Parameters: | cutColor (int) – cut face color

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”)

## CutView

`MasterCutBuilder.``CutView`

  Returns or sets the cut view

  `-------------------------------------`

  Getter Method

  Signature `CutView`

  Returns: | cut view
  Return type: | `NXOpen.ModelingView`

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”)

  `-------------------------------------`

  Setter Method

  Signature `CutView`

  Parameters: | cutView (`NXOpen.ModelingView`) – cut view

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”)

## Extrude

`MasterCutBuilder.``Extrude`

  Returns the extrude builder

  `-------------------------------------`

  Getter Method

  Signature `Extrude`

  Returns: | the extrude builder
  Return type: | `NXOpen.Features.ExtrudeBuilder`

  New in version NX5.0.0.

  License requirements: None.

## HatchAngle

`MasterCutBuilder.``HatchAngle`

  Returns or sets the hatch angle

  `-------------------------------------`

  Getter Method

  Signature `HatchAngle`

  Returns: | hatch angle used when crosshatching the cut faces
  Return type: | float

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”)

  `-------------------------------------`

  Setter Method

  Signature `HatchAngle`

  Parameters: | hatchAngle (float) – hatch angle used when crosshatching the cut faces

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”)

## HatchDistance

`MasterCutBuilder.``HatchDistance`

  Returns or sets the hatch distance

  `-------------------------------------`

  Getter Method

  Signature `HatchDistance`

  Returns: | hatch distance used when crosshatching the cut faces
  Return type: | float

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”)

  `-------------------------------------`

  Setter Method

  Signature `HatchDistance`

  Parameters: | hatchDistance (float) – hatch distance used when crosshatching the cut faces

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”)

## MaterialOutsideLoop

`MasterCutBuilder.``MaterialOutsideLoop`

  Returns or sets the flag whether or not the material is outside the loop used to create the extruded body

  `-------------------------------------`

  Getter Method

  Signature `MaterialOutsideLoop`

  Returns: | if true, the material is outside the loop used to create the extruded body
  Return type: | bool

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”)

  `-------------------------------------`

  Setter Method

  Signature `MaterialOutsideLoop`

  Parameters: | materialOutsideLoop (bool) – if true, the material is outside the loop used to create the extruded body

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”)

## SaveAsName

`MasterCutBuilder.``SaveAsName`

  Returns or sets the cut save as name

  `-------------------------------------`

  Getter Method

  Signature `SaveAsName`

  Returns: | cut save as name
  Return type: | str

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”)

  `-------------------------------------`

  Setter Method

  Signature `SaveAsName`

  Parameters: | saveAsName (str) – cut save as name

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”)

## TargetComponents

`MasterCutBuilder.``TargetComponents`

  Returns the target components that are cut

  `-------------------------------------`

  Getter Method

  Signature `TargetComponents`

  Returns: |
  Return type: | `NXOpen.SelectDisplayableObjectList`

  New in version NX5.0.0.

  License requirements: None.

## ToolBody

`MasterCutBuilder.``ToolBody`

  Returns or sets the tool body used to perform the cut, which is an extruded body

  `-------------------------------------`

  Getter Method

  Signature `ToolBody`

  Returns: | tool body used to perform the cut
  Return type: | `NXOpen.Body`

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”)

  `-------------------------------------`

  Setter Method

  Signature `ToolBody`

  Parameters: | toolBody (`NXOpen.Body`) – tool body used to perform the cut

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”)

## UseCutColor

`MasterCutBuilder.``UseCutColor`

  Returns or sets the flag whether or not to use the specified color for the cut faces

  `-------------------------------------`

  Getter Method

  Signature `UseCutColor`

  Returns: | if true, use the specified color for the cut faces
  Return type: | bool

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”)

  `-------------------------------------`

  Setter Method

  Signature `UseCutColor`

  Parameters: | useCutColor (bool) – if true, use the specified color for the cut faces

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”)

## UseCutHatch

`MasterCutBuilder.``UseCutHatch`

  Returns or sets the flag whether or not the cut faces are crosshatched in wireframe mode

  `-------------------------------------`

  Getter Method

  Signature `UseCutHatch`

  Returns: | if true, cut faces are crosshatched in wireframe mode
  Return type: | bool

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”)

  `-------------------------------------`

  Setter Method

  Signature `UseCutHatch`

  Parameters: | useCutHatch (bool) – if true, cut faces are crosshatched in wireframe mode

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”)

## UseSaveAs

`MasterCutBuilder.``UseSaveAs`

  Returns or sets the flag whether or not to save the work view with a new name

  `-------------------------------------`

  Getter Method

  Signature `UseSaveAs`

  Returns: | if true, save the work view with a new name
  Return type: | bool

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”)

  `-------------------------------------`

  Setter Method

  Signature `UseSaveAs`

  Parameters: | useSaveAs (bool) – if true, save the work view with a new name

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”)

# Method Detail

## CalcThroughLimits

`MasterCutBuilder.``CalcThroughLimits`

  Calculate start and end through limit values

  Signature `CalcThroughLimits(direction)`

  Parameters: | direction (`NXOpen.Direction`) – the extrude direction
  Returns: | a tuple
  Return type: | A tuple consisting of (limit1, limit2) limit1 is a float. start limit value limit2 is a float. end limit value

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”)

## RecalculateLimits

`MasterCutBuilder.``RecalculateLimits`

  Recalculates extrude limits to cut through target components

  Signature `RecalculateLimits()`

  New in version NX5.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”)

## SetTargetComponents

`MasterCutBuilder.``SetTargetComponents`

  The target components that are cut

  Signature `SetTargetComponents(targetComponents)`

  Parameters: | targetComponents (list of `NXOpen.NXObject`) – target components to be cut

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”)

## Validate

`MasterCutBuilder.``Validate`

  Validate whether the inputs to the component are sufficient for commit to be called.

  If the component is not in a state to commit then an exception is thrown. For example, if the component requires you to set some property, this method will throw an exception if you haven’t set it. This method throws a not-yet-implemented NXException for some components.

  Signature `Validate()`

  Returns: | Was self validation successful
  Return type: | bool

  New in version NX3.0.1.

  License requirements: None.