SketchOffsetBuilder Class — NXOpen Python API Reference 12.0.0 documentation

# SketchOffsetBuilder Class

class `NXOpen.``SketchOffsetBuilder`

  Bases: `NXOpen.Builder`

  Represents a `NXOpen.SketchOffsetBuilder`

  To create a new instance of this class, use `NXOpen.SketchCollection.CreateSketchOffsetBuilder()`

  Default values.

  Property | Value
  --- | ---
  CapType | Extension
  ConvertToReference | False
  CreateDimension | True
  Degree | 3
  Distance.Value | 5.0 (millimeters part), 2.0 (inches part)
  IsSymmetric | False
  NumberOfCopies | 1

  New in version NX5.0.0.

# Properties

Property | Description
--- | ---
CapType | Returns or sets the type of the cap needed at the corners
ConvertToReference | Returns or sets the flag to indicate if the input curves needs to converted to reference
CreateDimension | Returns or sets the flag to create offset with a dimension or a dimensionless offset
Degree | Returns or sets the degree for approximating offset spline
Distance | Returns the offset distance expression
IsSymmetric | Returns or sets the flag to indicate if the offset needs to be symmetric or not
NumberOfCopies | Returns or sets the number of offset copies
Tag | Returns the Tag for this object.
Tolerance | Returns or sets the tolerance for approximating offset spline

# Methods

Method | Description
--- | ---
BreakChain | This function breaks the base chain and all the associated offsets at a given location
Commit | Commits any edits that have been applied to the builder.
CreateSection | The function creates a new empty section object and adds it to the builder
Destroy | Deletes the builder, and cleans up any objects created by the builder.
EvaluateOffset | This function will solve the offset constraint to update it based on the new data set in the builder
GetCommittedObjects | For builders that create more than one object, this method returns the objects that are created by commit.
GetObject | Returns the object currently being edited by this builder.
GetOutputCurvesOfOffset | This function gets all output curves of an offset
GetSections | This function gets all sections of an offset during create/edit
MergeChains | This function merges the two chains.
RemoveSection | The function removes the given section from the builder
ReverseOffsetDirectionOfChain | This function reverses the offset direction of the chain containing the input geometry
SetEndConstraint | This function removes end constraint from the given offset
ShowResults | Updates the model to reflect the result of an edit to the model for all builders that support showing results.
UpdateLoopsAndCopies | This function will update the offset after curves are selected.
UpdateSolverDistance | This function will update the distance in the sketch solver using the new data set in the builder
Validate | Validate whether the inputs to the component are sufficient for commit to be called.

# Property Detail

## CapType

`SketchOffsetBuilder.``CapType`

  Returns or sets the type of the cap needed at the corners

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

  Getter Method

  Signature `CapType`

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

  New in version NX5.0.0.

  License requirements: None.

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

  Setter Method

  Signature `CapType`

  Parameters: | capType (`NXOpen.SketchOffsetCapType`) –

  New in version NX5.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR geometric_tol (“GDT”)

## ConvertToReference

`SketchOffsetBuilder.``ConvertToReference`

  Returns or sets the flag to indicate if the input curves needs to converted to reference

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

  Getter Method

  Signature `ConvertToReference`

  Returns: |
  Return type: | bool

  New in version NX5.0.0.

  License requirements: None.

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

  Setter Method

  Signature `ConvertToReference`

  Parameters: | reference (bool) –

  New in version NX5.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR geometric_tol (“GDT”)

## CreateDimension

`SketchOffsetBuilder.``CreateDimension`

  Returns or sets the flag to create offset with a dimension or a dimensionless offset

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

  Getter Method

  Signature `CreateDimension`

  Returns: |
  Return type: | bool

  New in version NX5.0.0.

  License requirements: None.

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

  Setter Method

  Signature `CreateDimension`

  Parameters: | createDim (bool) –

  New in version NX5.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR geometric_tol (“GDT”)

## Degree

`SketchOffsetBuilder.``Degree`

  Returns or sets the degree for approximating offset spline

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

  Getter Method

  Signature `Degree`

  Returns: |
  Return type: | int

  New in version NX5.0.0.

  License requirements: None.

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

  Setter Method

  Signature `Degree`

  Parameters: | degree (int) –

  New in version NX5.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR geometric_tol (“GDT”)

## Distance

`SketchOffsetBuilder.``Distance`

  Returns the offset distance expression

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

  Getter Method

  Signature `Distance`

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

  New in version NX5.0.0.

  License requirements: None.

## IsSymmetric

`SketchOffsetBuilder.``IsSymmetric`

  Returns or sets the flag to indicate if the offset needs to be symmetric or not

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

  Getter Method

  Signature `IsSymmetric`

  Returns: |
  Return type: | bool

  New in version NX5.0.0.

  License requirements: None.

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

  Setter Method

  Signature `IsSymmetric`

  Parameters: | symmetric (bool) –

  New in version NX5.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR geometric_tol (“GDT”)

## NumberOfCopies

`SketchOffsetBuilder.``NumberOfCopies`

  Returns or sets the number of offset copies

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

  Getter Method

  Signature `NumberOfCopies`

  Returns: |
  Return type: | int

  New in version NX5.0.0.

  License requirements: None.

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

  Setter Method

  Signature `NumberOfCopies`

  Parameters: | copies (int) –

  New in version NX5.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR geometric_tol (“GDT”)

## Tolerance

`SketchOffsetBuilder.``Tolerance`

  Returns or sets the tolerance for approximating offset spline

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

  Getter Method

  Signature `Tolerance`

  Returns: |
  Return type: | float

  New in version NX5.0.0.

  License requirements: None.

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

  Setter Method

  Signature `Tolerance`

  Parameters: | tolerance (float) –

  New in version NX5.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR geometric_tol (“GDT”)

# Method Detail

## BreakChain

`SketchOffsetBuilder.``BreakChain`

  This function breaks the base chain and all the associated offsets at a given location

  Signature `BreakChain(object1, object2, helpPt)`

  Parameters:

  - object1 (`NXOpen.NXObject`) – An object in chain to break
  - object2 (`NXOpen.NXObject`) – Adjacent object to the previous one
  - helpPt (`NXOpen.Point3d`) – Help point for multiple intersections

  New in version NX5.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR geometric_tol (“GDT”)

## CreateSection

`SketchOffsetBuilder.``CreateSection`

  The function creates a new empty section object and adds it to the builder

  Signature `CreateSection()`

  Returns: | New section object
  Return type: | `NXOpen.Section`

  New in version NX5.0.0.

  License requirements: None.

## EvaluateOffset

`SketchOffsetBuilder.``EvaluateOffset`

  This function will solve the offset constraint to update it based on the new data set in the builder

  Signature `EvaluateOffset()`

  New in version NX8.5.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR geometric_tol (“GDT”)

## GetOutputCurvesOfOffset

`SketchOffsetBuilder.``GetOutputCurvesOfOffset`

  This function gets all output curves of an offset

  Signature `GetOutputCurvesOfOffset()`

  Returns: | All the curves associated with constraint
  Return type: | list of `NXOpen.NXObject`

  New in version NX5.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR geometric_tol (“GDT”)

## GetSections

`SketchOffsetBuilder.``GetSections`

  This function gets all sections of an offset during create/edit

  Signature `GetSections()`

  Returns: | All the sections associated with the builder
  Return type: | list of `NXOpen.Section`

  New in version NX5.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR geometric_tol (“GDT”)

## MergeChains

`SketchOffsetBuilder.``MergeChains`

  This function merges the two chains.

  The last geom of first chain and first geom of next chain are taken as input.

  Signature `MergeChains(object1, object2, helpPt)`

  Parameters:

  - object1 (`NXOpen.NXObject`) – Last geom of first chain
  - object2 (`NXOpen.NXObject`) – First geom of next chain
  - helpPt (`NXOpen.Point3d`) – Help point for multiple intersections

  New in version NX5.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR geometric_tol (“GDT”)

## RemoveSection

`SketchOffsetBuilder.``RemoveSection`

  The function removes the given section from the builder

  Signature `RemoveSection(section)`

  Parameters: | section (`NXOpen.Section`) – Section obj to remove

  New in version NX5.0.0.

  License requirements: None.

## ReverseOffsetDirectionOfChain

`SketchOffsetBuilder.``ReverseOffsetDirectionOfChain`

  This function reverses the offset direction of the chain containing the input geometry

  Signature `ReverseOffsetDirectionOfChain(objectInChain)`

  Parameters: | objectInChain (`NXOpen.NXObject`) – An object in chain to reverse

  New in version NX5.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR geometric_tol (“GDT”)

## SetEndConstraint

`SketchOffsetBuilder.``SetEndConstraint`

  This function removes end constraint from the given offset

  Signature `SetEndConstraint(objectInChain, inx, isStartEnd, constraint)`

  Parameters:

  - objectInChain (`NXOpen.NXObject`) – An object in the base chain
  - inx (int) – Index of the constraint - starts from 0
  - isStartEnd (bool) – TRUE, if we want to remove the start end con
  - constraint (bool) – TRUE to add the con, false to remove

  New in version NX5.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR geometric_tol (“GDT”)

## UpdateLoopsAndCopies

`SketchOffsetBuilder.``UpdateLoopsAndCopies`

  This function will update the offset after curves are selected.

  If the input section is updated to add/remove curves, this function must be called to update the offset constraint. This function will keep the offset constraint synchronised with the edits done to input section.

  Signature `UpdateLoopsAndCopies()`

  New in version NX8.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR geometric_tol (“GDT”)

## UpdateSolverDistance

`SketchOffsetBuilder.``UpdateSolverDistance`

  This function will update the distance in the sketch solver using the new data set in the builder

  Signature `UpdateSolverDistance()`

  New in version NX11.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR geometric_tol (“GDT”)

## Validate

`SketchOffsetBuilder.``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.