FacetSelectionRuleFactory Class

class NXOpen.FacetSelectionRuleFactory

Bases: object

This class contains the factory methods for creating facet selection intent rules

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

New in version NX12.0.0.

Methods

Method Description
CreateRuleBodyFacets Create body facets selection rule: NXOpen.BodyFacetsRule
CreateRuleColorRegionFacets Creates color region facets selection intent rule: NXOpen.ColorRegionRule
CreateRuleFaceFacets Creates face facets selection intent rule: NXOpen.FaceFacetsRule
CreateRuleFillBoundary Creates fill boundary rule: NXOpen.FillBoundaryRule
CreateRuleFineBrushFacets Creates fine brush facets selection intent rule: NXOpen.BrushFacetsRule.
CreateRuleFloodFillFacets Creates flood filled facet region selection intent rule: NXOpen.FloodFillFacetsRule.
CreateRuleRoughBrushFacets Creates rough brush facets selection intent rule: NXOpen.BrushFacetsRule.
CreateRuleSingleFacet Creates single facet selection intent rule: NXOpen.SingleFacetRule

Method Detail

CreateRuleBodyFacets

FacetSelectionRuleFactory.CreateRuleBodyFacets

Create body facets selection rule: NXOpen.BodyFacetsRule

This rule chains to collect all facets of input facet bodies. An Exception is raised if input object is not facet body.

Signature CreateRuleBodyFacets(bodies)

Parameters:bodies (list of NXOpen.NXObject) – a faceted body whose facets are to be collected.
Returns:
Return type:NXOpen.BodyFacetsRule

New in version NX12.0.0.

License requirements: gateway (“UG GATEWAY”)

CreateRuleColorRegionFacets

FacetSelectionRuleFactory.CreateRuleColorRegionFacets

Creates color region facets selection intent rule: NXOpen.ColorRegionRule

This rule chains to collect all neighboring facets of seed (and the neighbor-neighbors) that are of same color as that of seed facet. The chaining grows upto an unicolor region of connected facets. Also the chainging does not cross the boundary of owning face for convergent facets and NX facet body for NX facets.

Signature CreateRuleColorRegionFacets(seedFacet)

Parameters:seedFacet (NXOpen.IFacet) – the seed facet
Returns:
Return type:NXOpen.ColorRegionRule

New in version NX12.0.0.

License requirements: gateway (“UG GATEWAY”)

CreateRuleFaceFacets

FacetSelectionRuleFactory.CreateRuleFaceFacets

Creates face facets selection intent rule: NXOpen.FaceFacetsRule

This rule chains to collect all facets of input faces or faceted bodies. Note that NX faceted body has single face. An Exception is raised if input object is not a face or a faceted body.

Signature CreateRuleFaceFacets(faces)

Parameters:faces (list of NXOpen.NXObject) – a face or NX faceted body whose facets are to be collected.
Returns:
Return type:NXOpen.FaceFacetsRule

New in version NX12.0.0.

License requirements: gateway (“UG GATEWAY”)

CreateRuleFillBoundary

FacetSelectionRuleFactory.CreateRuleFillBoundary

Creates fill boundary rule: NXOpen.FillBoundaryRule

This rule chains to add all neighboring facets of seed (and the neighbor-neighbors) until the region reaches a closed ring of specified boundary facets. While NXOpen.FloodFillFacetsRule smartly identifies the boundary facets from existing collection, NXOpen.FillBoundaryRule chains over existing collected facets until input boundary facets.

Signature CreateRuleFillBoundary(boundaryFacets, seedFacet, includeBoudaryFacets)

Parameters:
  • boundaryFacets (list of NXOpen.IFacet) – boundary facets upto which chaining is done.
  • seedFacet (NXOpen.IFacet) – the seed facet
  • includeBoudaryFacets (bool) – if true, input boundary facets are added to resultant chained collection of facets
Returns:

Return type:

NXOpen.FillBoundaryRule

New in version NX12.0.0.

License requirements: gateway (“UG GATEWAY”)

CreateRuleFineBrushFacets

FacetSelectionRuleFactory.CreateRuleFineBrushFacets

Creates fine brush facets selection intent rule: NXOpen.BrushFacetsRule.

This rule chains to collect all neighboring facets of seed (and the neighbor-neighbors) that are stictly inside brush tool.

Signature CreateRuleFineBrushFacets(brushToolStartPoint, brushToolDirection, brushToolRadius, allowHiddenFacetsSel, seedFacet)

Parameters:
  • brushToolStartPoint (NXOpen.Point3d) – the start point of brush tool
  • brushToolDirection (NXOpen.Vector3d) – the vector defining direction of brush tool
  • brushToolRadius (float) – the radius of brush tool
  • allowHiddenFacetsSel (bool) – the flag to allow selection of invisible facets in view direction specified by brush tool. If this flag is false, facets hidden by parts of the same facet body in current view will not be collected
  • seedFacet (NXOpen.IFacet) – the seed facet
Returns:

Return type:

NXOpen.FineBrushFacetsRule

New in version NX12.0.0.

License requirements: gateway (“UG GATEWAY”)

CreateRuleFloodFillFacets

FacetSelectionRuleFactory.CreateRuleFloodFillFacets

Creates flood filled facet region selection intent rule: NXOpen.FloodFillFacetsRule.

  1. If isDeselectionRule is passed false, This rule chains to add all neighboring facets of seed (and the neighbor-neighbors) until the region reaches a closed ring of already collected facets in collector.
If already collected facets in collector do not form a closed ring, then all facets of owning face of the seed are added to collector.
  1. If isDeselectionRule is passed true, then on adding the rule to collector it removes all facets of region from where seed facet belongs.

Signature CreateRuleFloodFillFacets(seedFacet, isDeselectionRule)

Parameters:
  • seedFacet (NXOpen.IFacet) – seed facet for flood filled facet collection
  • isDeselectionRule (bool) – flag to specify whether it is deselection rule or not.
Returns:

Return type:

NXOpen.FloodFillFacetsRule

New in version NX12.0.0.

License requirements: gateway (“UG GATEWAY”)

CreateRuleRoughBrushFacets

FacetSelectionRuleFactory.CreateRuleRoughBrushFacets

Creates rough brush facets selection intent rule: NXOpen.BrushFacetsRule.

This rule chains to collect all neighboring facets of seed (and the neighbor-neighbors) that are inside or crossing brush tool.

Signature CreateRuleRoughBrushFacets(brushToolStartPoint, brushToolDirection, brushToolRadius, allowHiddenFacetsSel, seedFacet)

Parameters:
  • brushToolStartPoint (NXOpen.Point3d) – the start point of brush tool
  • brushToolDirection (NXOpen.Vector3d) – the vector defining direction of brush tool
  • brushToolRadius (float) – the radius of brush tool
  • allowHiddenFacetsSel (bool) – the flag to allow selection of invisible facets in view direction specified by brush tool. If this flag is false, facets hidden by parts of the same facet body in current view will not be collected
  • seedFacet (NXOpen.IFacet) – the seed facet
Returns:

Return type:

NXOpen.RoughBrushFacetsRule

New in version NX12.0.0.

License requirements: gateway (“UG GATEWAY”)

CreateRuleSingleFacet

FacetSelectionRuleFactory.CreateRuleSingleFacet

Creates single facet selection intent rule: NXOpen.SingleFacetRule

This rule adds given facets to collector without any chaining.

Signature CreateRuleSingleFacet(facets)

Parameters:facets (list of NXOpen.IFacet) – facets to add through the rule.
Returns:
Return type:NXOpen.SingleFacetRule

New in version NX12.0.0.

License requirements: gateway (“UG GATEWAY”)