public interface Stock extends NXObject, ICharacteristic
Stock
object represents a material (such as as pipe or tube)
that covers a path of segments. The material is defined in the StockData
object. Stock
consists of a StockData
object, as well as references to at most one of the CrossSection
and
Anchor
objects that are associated with that
StockData
.
Stock
object may exist in one of two modes ; Legacy Stock or
Stock as Components Stock. Legacy Stock is modeled as a sweep feature in the work part. Stock
as Components Stock is modeled as a child component (of the work part) that contains a sweep
feature. Legacy Stock and Stock as Components stock cannot exist in the same part file with
the exception of Bundled stock.
Stock
object that have automatically been generated by the bundling
algorithm used for routing wires are Bundled stock. Bundled stocks are always created as
Legacy Stocks (even in parts containing Stock as Component stocks). Any StockData
object that defines a bundled stock has a type of Routing.StockDataType#BUNDLED
. Editing the segments or the stock data of a Bundled stock may result in undefined
behavior.
StockStyle.DETAILED
style (if availble, otherwise it uses the StockStyle.DETAILED
style) and
the stocks style cannot be changed.
Modifier and Type | Interface and Description |
---|---|
static class |
Stock.PortsData
This class holds the data returned from
getPorts() |
NXObject.AttributeInformation, NXObject.AttributeType, NXObject.ComputationalTime, NXObject.DateAndTimeFormat
Modifier and Type | Method and Description |
---|---|
void |
addSegments(Curve[] segments)
Adds new segments to this object.
|
void |
alignStock(Vector3d vector)
Align stock to new rotation vector.
|
void |
colorBodies()
Colors the solid bodies of the stock based on the COLOR characteristic specified in the
StockData of the stock. |
void |
enableFeatures()
Deprecated.
Deprecated in NX10.0.0. Change stock style to anything other than centerline instead.
|
Anchor |
getAnchor()
Gets the
Anchor that currently modifies the profile for the stock. |
Component |
getComponent()
Returns the
Component created and controlled by the stock for a
Stock as Components stock. |
CrossSection |
getCrossSection()
Gets the
CrossSection that currently defines the profile for the stock. |
nxopen.features.Feature[] |
getFeatures()
Returns the sweep features that are created and controlled by this object.
|
Flip |
getFlippedStatus()
Gets whether or not the profile is flipped.
|
ComponentName |
getNameStatus()
Returns whether or not the component associated with a Stock as Components Stock has a
permanent or temporary name.
|
double |
getOriginalLength()
Returns the original length for a stock that has been deformed (it's use is
Routing.StockUse#DEFORMED ). |
Stock.PortsData |
getPorts()
Returns the
nxopen.routing.StockPort at each end of the stock. |
ProfileFrom |
getProfileEnd()
Gets the end that defines profile.
|
double |
getRotationAngle()
Gets the rotation angle applied to the profile.
|
Curve[] |
getSegments()
Gets the segments that the
Stock object is placed on top of. |
StockData |
getStockData()
Gets the
StockData . |
StockStyle |
getStockStyle()
Gets the
StockStyle of the Stock . |
StockUse |
getStockUse()
Returns the use of the stock.
|
double |
getTwistAngle()
Gets the twist angle applied to the profile.
|
boolean |
negateOffsetsFlag()
Returns the negate offsets flag of this
Stock . |
void |
removeSegments(Curve[] segments)
Removes segments from this object.
|
void |
renameStockComponent(String partName)
Renames the stock component part with given name
License requirements: routing_base ("Routing Basic") . |
void |
setAnchor(Anchor anchor)
Sets the
Anchor . |
void |
setCrossSection(CrossSection crossSection)
Sets the
CrossSection . |
void |
setFlippedStatus(Flip flipped)
Sets whether or not the profile is flipped.
|
void |
setNegateOffsetsFlag(boolean offsetFlag)
Sets the negate offsets flag of this
Stock . |
void |
setProfileEnd(ProfileFrom profileEnd)
Sets the end that defines profile.
|
void |
setRotationAngle(double rotationAngle)
Sets the rotation angle applied to the profile.
|
void |
setStockData(StockData stockData)
Sets the
StockData . |
void |
setStockStyle(StockStyle style)
Sets the
StockStyle of the Stock . |
void |
setTwistAngle(double twistAngle)
Sets the twist angle applied to the profile.
|
void |
syncComponentAttrs(boolean isNewPart)
Set the characteristics of the given stock's
component so that it has the same characteristics as the
Stock and its stock data. |
deleteAllAttributesByType, deleteAllAttributesByType, deleteAttributeByTypeAndTitle, deleteAttributeByTypeAndTitle, deleteUserAttribute, deleteUserAttributes, getAttributeTitlesByType, getBooleanUserAttribute, getComputationalTimeUserAttribute, getIntegerAttribute, getIntegerUserAttribute, getRealAttribute, getRealUserAttribute, getReferenceAttribute, getStringAttribute, getStringUserAttribute, getTimeAttribute, getTimeUserAttribute, getUserAttribute, getUserAttribute, getUserAttributeAsString, getUserAttributeCount, getUserAttributeCount, getUserAttributeLock, getUserAttributes, getUserAttributes, getUserAttributes, getUserAttributesAsStrings, getUserAttributeSize, getUserAttributeSourceObjects, hasUserAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setBooleanUserAttribute, setReferenceAttribute, setReferenceAttribute, setTimeAttribute, setTimeAttribute, setTimeUserAttribute, setTimeUserAttribute, setUserAttribute, setUserAttribute, setUserAttribute, setUserAttribute, setUserAttribute, setUserAttributeLock
printTestData, printTestData, tag, tagValue
deleteCharacterstics, getCharacteristics, getDestinationCharacteristics, getIntegerCharacteristic, getRealCharacteristic, getStringCharacteristic, setCharacteristic, setCharacteristic, setCharacteristic, setCharacteristics
findObject, isOccurrence, journalIdentifier, name, owningComponent, owningPart, print, prototype, setName
StockData getStockData() throws NXException, RemoteException
NXException
RemoteException
void setStockData(StockData stockData) throws NXException, RemoteException
StockData
. After setting the StockData, the
caller must also make sure to set the CrossSection and Anchor so that the Stock
object only references objects associated with this StockData
object.
stockData
- NXException
RemoteException
CrossSection getCrossSection() throws NXException, RemoteException
CrossSection
that currently defines the profile for the stock.
Routing.StockStyle#NONE
NXException
RemoteException
void setCrossSection(CrossSection crossSection) throws NXException, RemoteException
CrossSection
. The given object must be one of the
CrossSection
objects referenced by the StockData
object that defines this Stock
object. setStockStyle(nxopen.routing.StockStyle)
should be used (when possible) instead of this routine.
crossSection
- Must be referenced by the StockData
associated with this Stock
object.NXException
RemoteException
Anchor getAnchor() throws NXException, RemoteException
Anchor
that currently modifies the profile for the stock.
Anchor
NXException
RemoteException
void setAnchor(Anchor anchor) throws NXException, RemoteException
Anchor
. The given object must be one of the
Anchor
objects referenced by the StockData
object that defines this Stock
object.
anchor
- Must be referenced by the StockData
associated with this Stock
object.NXException
RemoteException
StockStyle getStockStyle() throws NXException, RemoteException
StockStyle
of the Stock
.
NXException
RemoteException
void setStockStyle(StockStyle style) throws NXException, RemoteException
StockStyle
of the Stock
. This may
cause update to fire, and can be a time-consuming operation as it may require the building of a
new sweep feature. When style is set to StockStyle.NONE
this routine
deletes the stock sweep feature. Only call on Legacy Stocks.
style
- NXException
RemoteException
Curve[] getSegments() throws NXException, RemoteException
Stock
object is placed on top of.
NXException
RemoteException
void addSegments(Curve[] segments) throws NXException, RemoteException
Stock
will split so that there is a
copy of this object on each continuous path formed by the input segments.
segments
- List of segments to add. Ignores any segments that
are already referenced by this object.NXException
RemoteException
void removeSegments(Curve[] segments) throws NXException, RemoteException
Stock
will split so
that there is a copy of this object on each continuous path. This object will delete itself inside of
update if all segments are removed.
segments
- List of segments to remove. Ignores any segments that
are not already referenced by this object.NXException
RemoteException
double getRotationAngle() throws NXException, RemoteException
NXException
RemoteException
void setRotationAngle(double rotationAngle) throws NXException, RemoteException
rotationAngle
- The angle in radians. Valid values are 0.0 to ( 2 * Pi ).NXException
RemoteException
double getTwistAngle() throws NXException, RemoteException
NXException
RemoteException
void setTwistAngle(double twistAngle) throws NXException, RemoteException
twistAngle
- The angle in radians. Valid values are 0.0 to ( 2 * Pi ).NXException
RemoteException
ProfileFrom getProfileEnd() throws NXException, RemoteException
NXException
RemoteException
void setProfileEnd(ProfileFrom profileEnd) throws NXException, RemoteException
profileEnd
- NXException
RemoteException
Flip getFlippedStatus() throws NXException, RemoteException
NXException
RemoteException
void setFlippedStatus(Flip flipped) throws NXException, RemoteException
flipped
- NXException
RemoteException
Stock.PortsData getPorts() throws NXException, RemoteException
nxopen.routing.StockPort
at each end of the stock.
NXException
RemoteException
StockUse getStockUse() throws NXException, RemoteException
NXException
RemoteException
nxopen.features.Feature[] getFeatures() throws NXException, RemoteException
NXException
RemoteException
Component getComponent() throws NXException, RemoteException
Component
created and controlled by the stock for a
Stock as Components stock. Only returns a component if the stock type is
Routing.StockUse#STOCK_AS_COMPONENT
.
NXException
RemoteException
ComponentName getNameStatus() throws NXException, RemoteException
NXException
RemoteException
double getOriginalLength() throws NXException, RemoteException
Routing.StockUse#DEFORMED
). This is the length of the original stock
in the component part at the time that the deformed stock was created.
NXException
RemoteException
void colorBodies() throws NXException, RemoteException
StockData
of the stock. The color string can contain
the name of a color, a hex string specifying the RGB values, a comma separated list of RGB integer values and
a simple integer specifying the color index directly.
NXException
RemoteException
void syncComponentAttrs(boolean isNewPart) throws NXException, RemoteException
Stock
and its stock data.
isNewPart
- Is the part new?NXException
RemoteException
boolean negateOffsetsFlag() throws NXException, RemoteException
Stock
.
NXException
RemoteException
void setNegateOffsetsFlag(boolean offsetFlag) throws NXException, RemoteException
Stock
.
offsetFlag
- NXException
RemoteException
void enableFeatures() throws NXException, RemoteException
NXException
RemoteException
void alignStock(Vector3d vector) throws NXException, RemoteException
vector
- Rotation vector.NXException
RemoteException
void renameStockComponent(String partName) throws NXException, RemoteException
partName
- Part name to be set NXException
RemoteException
Copyright 2011 Siemens Product Lifecycle Management Software Inc. All Rights Reserved.