SBendCorner Class

class NXOpen.Routing.SBendCorner

Bases: NXOpen.NXObject

The Routing SBendCorner defines a S-Bend.

There are 5 possible S-bend types.

The UI input is two work part line segment-ending RCPs, each of which implicitly provides a 3D point and vector. An S-bend heals the separation between the two segments with a C1 continuous spline segment.

To disambiguate among 5 S-bend types (see below), the user may need to further indicate whether the S-bend starts bending immediately at the end of one or both of the 2 input segments. Some arrangements of 2 segments do not require further user input to disambiguate among the possible S-bend types.

The direction vectors of the 2 input segments must either be perpendicular (types 1,2,3) or parallel (types 4,5).

The closest distance between the (infinite) lines containing the input segments must be less that twice the bend radius. If this condition does not hold, then 2 right angle bends could connect the 2 input segments, i.e., an S-bend is unnecessary.

Every S-bend has two bends, whose radii are always equal. Except for type 2 and 3, the bend angles are equal and in the range [ Pi/4, Pi/2 ].

S-bends never cause a cutback of an input segment, although type 1,2,4 S-bends may add a straight line extension to one of the segment ends before the bending starts. Type 1 S-bends may add a straight line extension to both segment ends.

INPUT

  • R bend radius, which the user supplies, e.g., from a bend table.
  • P1 Work part X,Y,Z of segment 1’s end.
  • Vec1 Tangent at P1, pointing toward the open end of the segment.
  • P2, Vec2 Similar to segment 1 above…

For computation solving purposes, the above input becomes a bend radius, height, width, and possibly a depth.

OUTPUT bend angle(s):

  • a (alpha) (all S-bend types)
  • g (gamma) (Type 3 only)
  • Extension lengths, if any.

Bend angles are computed at the centers of the bend arcs

S-bends fall into two categories:

  • End tangents are perpendicular.

Three types are possible. In the 3D diagrams below:

The constructor line, AB, is the perpendicular distance between the lines that the segments define.

  • Height (H): length of A-B
  • Depth (D): length of A-P1
  • Width (W): length of B-P2

The A-B, A-P1, B-P2 vectors are mutually perpendicular.

  • Features.SewBuilder.Type 1: does not have a middle straight line portion.

/ / seg1 P1 / * / / /

/ / / : A / : | : | , | , <—- bends meet (no straight segment) | : | : | -, | `-,_ +——————`-*———— B P2 seg2

The bend from segment 2 lies in the plane A,B,P2. The bend from segment 1 is always 90 degrees, and thus terminates somewhere in the plane A,B,P2. The bend from segment 1 always starts on an extension of segment 1 that is a distance R from A.

Segment 2 may also have to extend toward B before its bend starts.

Geometrically, the height is the sum of the vertical components of bend 1 and bend 2.

Type 2: middle straight line portion

/ / seg1 P1 / * / / /

/ / / : A / : | : | | <—- straight segment | | <—– bend ends | -, | `-,_ +——————`-*———— B P2 seg2

Similar to Type 1:

The bend from segment 2 lies in the plane A,B,P2.

The bend from segment 1 is always 90 degrees, and thus terminates somewhere in the plane A,B,P2.

The bend from segment 1 always starts on an extension of segment 1 that is a distance R from A.

Unlike Type 1:

Segment 2’s bend always starts at P2, i.e., segment 2 never has an extension.

Type 3: middle straight line portion. user chooses between Type 2-3.

/ / seg1 P1 / *

/ ‘ / ‘ / : <—- segment 1’s bend ends / | / | A / | | | <— straight segment | | | | | | | | | <—- segment 2’s bend ends | -,_ +—————--*———— B P2 seg2

The bend radius isn’t big enough to span the height so a middle straight line segment is necessary.

Neither segment can have an extension, i.e., the bends start at P1 and P2. Unlike in Type 2, segment 2’s bend does not lie in the plane A,B,P2, i.e., both bends immediately start bending toward each other.

End tangents are parallel, i.e., bend lies entirely within a plane. This category falls into two types.

Type 4: no middle straight line portion

seg1 P1 ————-. `. : <— where bends meet `, `-———*——– A E2 P2 seg2

The height, H, is length (A-P1), where A is the projection of P1 onto the line that seg2 defines.

Because both bend angles are the same, the bends meet at half the height H/2.

Type 5: middle straight line portion

seg1 P1 ————-. `. <— middle straight line segment `. `-———— A P2 seg2

The height, H, is length (A-P1), where A is the projection of P1 onto the line that seg2 defines. The width, W, is the A-P2 length.

Support Information:

o An extension as described above is the distance leading up to the bend arc.

Use the NXOpen.Routing.SBendCornerCollection to obtain an instance.

New in version NX4.0.0.

Properties

Property Description
IsOccurrence Returns whether this object is an occurrence or not.
JournalIdentifier Returns the identifier that would be recorded in a journal for this object.
Name Returns the custom name of the object.
OwningComponent Returns the owning component, if this object is an occurrence.
OwningPart Returns the owning part of this object
Prototype Returns the prototype of this object if it is an occurrence.
Tag Returns the Tag for this object.

Methods

Method Description
CreateAttributeIterator Create an attribute iterator
DeleteAllAttributesByType Deletes all attributes of a specific type.
DeleteAttributeByTypeAndTitle Deletes an attribute by type and title.
DeleteUserAttribute Deletes the first attribute encountered with the given Type, Title.
DeleteUserAttributes Deletes the attributes on the object, if any, that satisfy the given iterator
FindObject Finds the NXOpen.NXObject with the given identifier as recorded in a journal.
GetAttributeTitlesByType Gets all the attribute titles of a specific type.
GetBooleanUserAttribute Gets a boolean attribute by Title and array Index.
GetComputationalTimeUserAttribute Gets a time attribute by Title and array Index.
GetIntegerAttribute Gets an integer attribute by title.
GetIntegerUserAttribute Gets an integer attribute by Title and array Index.
GetNextUserAttribute Gets the next attribute encountered on the object, if any, that satisfies the given iterator.
GetPdmReferenceAttributeValue Gets the value of PDM Reference attribute for given object.
GetRealAttribute Gets a real attribute by title.
GetRealUserAttribute Gets a real attribute by Title and array Index.
GetReferenceAttribute Gets the reference string (not the calculated value) of a string attribute that uses a reference string.
GetSBendData Returns the data for the S-Bend object
GetSBendRadius Gets the S-Bend radius of a S-Bend corner.
GetSBendStocks Returns an array of stocks for the S-Bend object
GetSegment Gets the segment being used to represent the S-Bend.
GetStringAttribute Gets a string attribute value by title.
GetStringUserAttribute Gets a string attribute by Title and array Index.
GetTimeAttribute Gets a time attribute by title.
GetTimeUserAttribute Gets a time attribute by Title and array Index.
GetUserAttribute Gets the first attribute encountered on the object, if any, with a given Title, Type and array Index.
GetUserAttributeAsString Gets the first attribute encountered on the object, if any, with a given title, type and array index.
GetUserAttributeCount Gets the count of set attributes on the object, if any, that satisfy the given iterator.
GetUserAttributeLock Determine the lock of the given attribute.
GetUserAttributeSize Gets the size of the first attribute encountered on the object, if any, with a given Title and Type.
GetUserAttributeSourceObjects Returns an array of objects from which this object presents attributes.
GetUserAttributes Gets all the attributes that have been set on the given object, if any, that satisfy the given iterator.
GetUserAttributesAsStrings Gets all the attributes that have been set on the given object.
HasUserAttribute Determines if an attribute exists on the object, that satisfies the given iterator
Print Prints a representation of this object to the system log file.
SetAttribute Creates or modifies an integer attribute.
SetBooleanUserAttribute Creates or modifies a boolean attribute with the option to update or not.
SetName Sets the custom name of the object.
SetPdmReferenceAttribute Sets the value of PDM Reference attribute on the object.
SetReferenceAttribute Creates or modifies a string attribute which uses a reference string.
SetSBendData Set the data for the S-Bend object
SetTimeAttribute Creates or modifies a time attribute.
SetTimeUserAttribute Creates or modifies a time attribute with the option to update or not.
SetUserAttribute Creates or modifies an attribute with the option to update or not.
SetUserAttributeLock Lock or unlock the given attribute.

Property Detail

IsOccurrence

SBendCorner.IsOccurrence

Returns whether this object is an occurrence or not.

-------------------------------------

Getter Method

Signature IsOccurrence

Returns:This object is an occurrence
Return type:bool

New in version NX3.0.0.

License requirements: None.

JournalIdentifier

SBendCorner.JournalIdentifier

Returns the identifier that would be recorded in a journal for this object.

This may not be the same across different releases of the software.

-------------------------------------

Getter Method

Signature JournalIdentifier

Returns:
Return type:str

New in version NX3.0.0.

License requirements: None.

Name

SBendCorner.Name

Returns the custom name of the object.

-------------------------------------

Getter Method

Signature Name

Returns:
Return type:str

New in version NX3.0.0.

License requirements: None.

OwningComponent

SBendCorner.OwningComponent

Returns the owning component, if this object is an occurrence.

-------------------------------------

Getter Method

Signature OwningComponent

Returns:
Return type:NXOpen.Assemblies.Component

New in version NX3.0.0.

License requirements: None.

OwningPart

SBendCorner.OwningPart

Returns the owning part of this object

-------------------------------------

Getter Method

Signature OwningPart

Returns:The owning part of this object or null if it does not have an owner
Return type:NXOpen.BasePart

New in version NX3.0.0.

License requirements: None.

Prototype

SBendCorner.Prototype

Returns the prototype of this object if it is an occurrence.

-------------------------------------

Getter Method

Signature Prototype

Returns:The prototype of this object or null if this object is not an occurrence
Return type:NXOpen.INXObject

New in version NX3.0.0.

License requirements: None.

Method Detail

FindObject

SBendCorner.FindObject

Finds the NXOpen.NXObject 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) – Journal identifier of the object
Returns:
Return type:NXOpen.INXObject

New in version NX3.0.0.

License requirements: None.

GetSBendData

SBendCorner.GetSBendData

Returns the data for the S-Bend object

Signature GetSBendData()

Returns:a tuple
Return type:A tuple consisting of (useBendRatio, sbendType, startRcp, endRcp, segment, radiusOrRatio). useBendRatio is a bool. TRUE: if bend ratio is used; FALSE: otherwise. sbendType is a int. S-Bend type startRcp is a NXOpen.Routing.ControlPoint. S-Bend start Control point endRcp is a NXOpen.Routing.ControlPoint. S-Bend end Control point segment is a NXOpen.Routing.SplineSegment. S-Bend segmentradiusOrRatio is a float. Bend radius or bend_ratio.

New in version NX4.0.0.

License requirements: routing_base (“Routing Basic”)

GetSBendRadius

SBendCorner.GetSBendRadius

Gets the S-Bend radius of a S-Bend corner.

Signature GetSBendRadius()

Returns:
Return type:float

New in version NX4.0.0.

License requirements: routing_base (“Routing Basic”)

GetSBendStocks

SBendCorner.GetSBendStocks

Returns an array of stocks for the S-Bend object

Signature GetSBendStocks()

Returns:Stock objects of the S-Bend corner.
Return type:list of NXOpen.Routing.Stock

New in version NX4.0.0.

License requirements: routing_base (“Routing Basic”)

GetSegment

SBendCorner.GetSegment

Gets the segment being used to represent the S-Bend.

Signature GetSegment()

Returns:
Return type:NXOpen.Routing.SplineSegment

New in version NX4.0.0.

License requirements: routing_base (“Routing Basic”)

Print

SBendCorner.Print

Prints a representation of this object to the system log file.

Signature Print()

New in version NX3.0.0.

License requirements: None.

SetName

SBendCorner.SetName

Sets the custom name of the object.

NOTE: This method should not be used to edit a read-only object such as a Mirrored PMI object. If it is, the changes will be overridden when the part is updated.

Signature SetName(name)

Parameters:name (str) –

New in version NX3.0.0.

License requirements: None.

SetSBendData

SBendCorner.SetSBendData

Set the data for the S-Bend object

Signature SetSBendData(sbendType, startRcp, endRcp, segment, radiusOrRatio, useBendRatio)

Parameters:

New in version NX4.0.0.

License requirements: routing_base (“Routing Basic”)