SketchEvaluator Class — NXOpen Python API Reference 12.0.0 documentation

# SketchEvaluator Class

class `NXOpen.``SketchEvaluator`

  Bases: `NXOpen.TaggedObject`

  Represents a sketch-on-path evaluator.

  It allows an application to evaluate * a section and a sketch-on-path at specific path locations.

  To create a new instance of this class, use `NXOpen.SketchEvaluatorCollection.Create()`

  New in version NX4.0.1.

# Properties

Property | Description
--- | ---
AngularTolerance | Returns or sets the angle tolerance [degrees]
CreateCurveOption | Returns or sets the option which allows automatic create of non-associative UG curves * for the sketch evaluation.
DistanceTolerance | Returns or sets the distance tolerance
Section | Returns or sets the master section.
SimplifyCurveOption | Returns or sets the option which allows the automatic conversion of curves * into an approximation of sorted sequence of arcs and lines.
Tag | Returns the Tag for this object.

# Methods

Method | Description
--- | ---
Destroy | Deletes the sketch evaluator, and cleans up any objects created by the it
EvaluateOneSketch | Work-horse method that evaluates the master section and its sketch on path * at a specific path location.

# Property Detail

## AngularTolerance

`SketchEvaluator.``AngularTolerance`

  Returns or sets the angle tolerance [degrees]

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

  Getter Method

  Signature `AngularTolerance`

  Returns: |
  Return type: | float

  New in version NX4.0.1.

  License requirements: None.

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

  Setter Method

  Signature `AngularTolerance`

  Parameters: | angleTolerance (float) –

  New in version NX4.0.1.

  License requirements: solid_modeling (“SOLIDS MODELING”)

## CreateCurveOption

`SketchEvaluator.``CreateCurveOption`

  Returns or sets the option which allows automatic create of non-associative UG curves * for the sketch evaluation.

  - Note: [1] This property is only used for a call to method “EvaluateOneSketch”.
  - [2] this property is defaulted to false.

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

  Getter Method

  Signature `CreateCurveOption`

  Returns: |
  Return type: | bool

  New in version NX4.0.1.

  License requirements: solid_modeling (“SOLIDS MODELING”)

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

  Setter Method

  Signature `CreateCurveOption`

  Parameters: | createCurveOption (bool) –

  New in version NX4.0.1.

  License requirements: solid_modeling (“SOLIDS MODELING”)

## DistanceTolerance

`SketchEvaluator.``DistanceTolerance`

  Returns or sets the distance tolerance

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

  Getter Method

  Signature `DistanceTolerance`

  Returns: |
  Return type: | float

  New in version NX4.0.1.

  License requirements: None.

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

  Setter Method

  Signature `DistanceTolerance`

  Parameters: | distanceTolerance (float) –

  New in version NX4.0.1.

  License requirements: solid_modeling (“SOLIDS MODELING”)

## Section

`SketchEvaluator.``Section`

  Returns or sets the master section.

  Variational sweep accepts sections created ONLY on in the context of a Sketch on Path. Make sure this section is coming from sketch curves created using the sketch on path feature. The application should not mutate the section if evaluator object is created with vsweep feature. Return code : 0 : no error, VARSWEEP_SKETCH_NOT_ON_PATH : on an error condition

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

  Getter Method

  Signature `Section`

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

  New in version NX4.0.1.

  License requirements: None.

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

  Setter Method

  Signature `Section`

  Parameters: | section (`NXOpen.Section`) – master section

  New in version NX4.0.1.

  License requirements: solid_modeling (“SOLIDS MODELING”)

## SimplifyCurveOption

`SketchEvaluator.``SimplifyCurveOption`

  Returns or sets the option which allows the automatic conversion of curves * into an approximation of sorted sequence of arcs and lines.

  - This option only convert curves that are not arcs and lines.
  - Note: [1] This property is only used for a call to method “EvaluateOneSketch”.
  - [2] This property is defaulted to false.

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

  Getter Method

  Signature `SimplifyCurveOption`

  Returns: |
  Return type: | bool

  New in version NX4.0.1.

  License requirements: solid_modeling (“SOLIDS MODELING”)

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

  Setter Method

  Signature `SimplifyCurveOption`

  Parameters: | simplifySplineOption (bool) – the simplify spline option

  New in version NX4.0.1.

  License requirements: solid_modeling (“SOLIDS MODELING”)

# Method Detail

## Destroy

`SketchEvaluator.``Destroy`

  Deletes the sketch evaluator, and cleans up any objects created by the it

  Signature `Destroy()`

  New in version NX4.0.1.

  License requirements: None.

## EvaluateOneSketch

`SketchEvaluator.``EvaluateOneSketch`

  Work-horse method that evaluates the master section and its sketch on path * at a specific path location.

  - Pre-conditions :
  - [1] A master section must have been registered with call to mutator set_section()
  - or the sketch evaluator must be constructed with an existing feature.
  - [2] The application should edit the properties “CreateCurveOption”, “SimplifyCurveOption”
  - as needed before calling this method.
  - Post-conditions:
  - [3] If the “create curve” option is set to false, the output curves should be
  - accessed right away.
  - The lifetime of these curves is as long as the next call to method “EvaluateOneSketch”.
  - [4] If the application wants to evaluate the same sketch at multiple path location,
  - it should make several consecutive calls to method “EvaluateOneSketch”.
  - At the end of the operation, the application must call method “Destroy”.
  - [5] If the “simplify curve” option is false, the number of curves will always be the same.
  - [6] The design of this functionality has not been tailored for master section
  - with multiple loops. If the master section has multiple loops, all the curves
  - will be returned in the order of the loops in the section.
  - [7] Method “EvaluateOneSketch” changes the state of the sketch on path. Therefore,
  - the part is temporarily in out of date state. The application should leverage
  - the NX undo mechanism to reset the state to its original. An alternative solution
  - is to suppress and unsuppress the sketch on path and variational sweep features
  - involved.

  Signature `EvaluateOneSketch(pathLocation)`

  Parameters: | pathLocation (float) – input path arc length percent to evaluate at.
  Returns: |
  Return type: | list of `NXOpen.Curve`

  New in version NX4.0.1.

  License requirements: solid_modeling (“SOLIDS MODELING”)