Inherits ScriptObject.
Public Attributes | |
Integer | unit |
Specifies the original unit of the section (this may be different from the output unit). | |
Vector | workOrigin |
The work origin in the WCS. | |
Matrix | workPlane |
The work plane in the WCS. | |
Vector | wcsOrigin |
The work coordinate system (WCS) origin. | |
Matrix | wcsPlane |
The work coordinate system (WCS) plane. | |
Integer | workOffset |
The work offset corresponding to the WCS. | |
Integer | probeWorkOffset |
The work offset corresponding to the Probe WCS. | |
Integer | wcsIndex |
The index used in the WCS. | |
String | wcs |
The WCS. | |
Integer | dynamicWorkOffset |
Boolean | axisSubstitution |
Specifies that the section uses axis substitution. | |
Number | axisSubstitutionRadius |
Specifies the nominal axis substitution radius. | |
Integer | type |
Specifies the type of the section (TYPE_MILLING, TYPE_TURNING, or TYPE_JET). | |
Integer | quality |
Specifies the associated quality. | |
Boolean | tailstock |
Specifies that tailstock is used. | |
Boolean | partCatcher |
Specifies that part catcher should be activated if available. | |
Integer | spindle |
Specifies the active spindle. | |
Map | properties |
The operation properties. | |
String | strategy |
Specifies the strategy type of the section. | |
Integer | machiningType |
Specifies machining type for section (3-Axis, 5-Axis, Polar and so on). | |
Vector | polarDirection |
User-specified polar direction for Polar machining type. | |
Boolean | polarRapidLinks |
True if polar rapid links requested by user. | |
Integer | polarMode |
Returns type of polar mode requested: in computer or in control. | |
An NC section. A section is a group of NC data which shares the same work plane, tool, and related data.
Returns true if the toolpath belongs to one or several specific strategy groups.
groups | The group flags to be checked. The available group flags are:
|
The function can take more than one flag as argurments. e.g.
Returns true if the given cycle is the last effective move within the section. E.g. if onLinear() would be called after onCycle() this method will return false. onParameter() and onComment() are ignored.
Returns true if the given cycle is the first effective move within the section ignoring positioning moves (ie. rapid and high feed moves). E.g. if onLinear() would be called before onCycle() this method will return false. onParameter(), onComment() and onDwell() are ignored.
Returns true if the given cycle is the first effective move within the section. E.g. if onLinear() would be called before onCycle() this method will return false. onParameter() and onComment() are ignored.
Returns true if the given cycle is the first effective move within the section ignoring positioning moves (ie. rapid and high feed moves). E.g. if onLinear() would be called before onCycle() this method will return false. onParameter(), onComment() and onDwell() are ignored.
Returns true if the given cycle is the only effective move within the section. onParameter() and onComment() are ignored.
Boolean doesToolpathFitWithinLimits | ( | MachineConfiguration | machine, |
Vector | current | ||
) |
Returns 'true' if the section's toolpath fits within the linear axis limits of the machine.
machine | The machine configuration. |
current | The current machine angles. |
Vector getABCByPreference | ( | MachineConfiguration | machine, |
Matrix | orientation, | ||
Vector | current, | ||
Integer | controllingAxis, | ||
Integer | type, | ||
Integer | options | ||
) |
Returns the preferred ABC angles for the specified orientation such that the forward and optionally right directions are maintained. The preferences are defined in the 'controllingAxis', 'control', and 'options' parameters.
machine | The machine configuration. |
orientation | The desired orientation (work plane). |
current | The current machine angles. |
controllingAxis | The axis used to determine the preferred solution. It can be A, B, C for a single axis or ABC to consider all axes. |
type | The preference type. PREFER_PREFERENCE - the preference specified in the createAxis definition. PREFER_CLOSEST- the closest solution. PREFER_POSITIVE - a positive angle. Not valid with ABC. PREFER_NEGATIVE - a negative angle. Not valid with ABC. PREFER_CW - axis moves in a clockwise direction. Not valid with ABC. PREFER_CCW - axis moves in a counter-clockwise direction. Not valid with ABC. |
options | - Options used to control the ABC selection. ENABLE_NONE - disables all options. ENABLE_RESET - respects the 'reset' parameter in the createAxis definition. ENABLE_WCS - solves for a rotary axis perpendicular to the spindle vector as defined by the tool orientation of the operation. ENABLE_LIMITS - solves for a rotary table perpendiculr to the spindle vector in order to keep the linear axes within the limits of the machine. ENABLE_ALL - enables all options (ENABLE_RESET, ENABLE_WCS, and ENABLE_LIMITS). |
Boolean getAxisSubstitution | ( | ) |
Returns true if the section uses axis substitution. In axis substitution mode the coordinates are the following meaning:
X: The offset along the substitution axis. Y: The rotation angle in radians. Z: Radius (always positive)
Number getAxisSubstitutionRadius | ( | ) |
Returns the nominal axis substitution radius.
BoundingBox getBoundingBox | ( | ) |
Returns the bounding box of the toolpath of the section.
Integer getChannel | ( | ) |
Returns the channel ID. Sections with the same channel ID belongs to the same channel.
Integer getContent | ( | ) |
Returns the content flags.
Number getCuttingDistance | ( | ) |
Returns the cutting distance for the section (excluding rapid traversal).
Returns the ID of the given cycle within the section. Raises exception if index exceeds limit returned by Section.getNumberOfCycles().
Returns the value of the first occurrence of the specified parameter within the given cycle.
index | The index of the cycle. |
name | The name of the parameter. |
Number getCycleTime | ( | ) |
Returns the cycle time for the cutting moves the section (rapid traversal is ignored).
Vector getDynamicWCSOrigin | ( | ) |
Returns the dynamic origin of the WCS. Only use if the dynamic work offset is set.
Matrix getDynamicWCSPlane | ( | ) |
Returns the dynamic WCS plane. Only use if the dynamic work offset is set.
Integer getDynamicWorkOffset | ( | ) |
Returns the dynamic work offset for the WCS. The dynamic work offset is used to control the display coordinates.
Vector getFCSOrigin | ( | ) |
Returns the origin of the fixture coordinate system (FCS).
Matrix getFCSPlane | ( | ) |
Returns the fixture coordinate system (FCS) plane.
Integer getFeedMode | ( | ) |
Returns the feed mode. For multi-axis operations it will return the feedrate mode as defined in the machine configuration for multi-axis feedrates if TCP is not enabled. If TCP is enabled, then FEED_PER_MINUTE will be returned for multi-axis operations.
The available modes are:
Vector getFinalPosition | ( | ) |
Returns the final position for the section.
Boolean getFinalSpindleOn | ( | ) |
Returns true if the spindle speed is on at the end of the section. Might be turned off due to final canned cycle.
Number getFinalSpindleSpeed | ( | ) |
Returns the final spindle speed which can be different from the tool spindle speed. Might be turned off due to final canned cycle.
Vector getFinalToolAxis | ( | ) |
Returns the final tool axis for the section as the direction vector.
Vector getFinalToolAxisABC | ( | ) |
Returns the final tool axis machine angles for the section. The section must have been optimized for the machine using optimizeMachineAngles() or similar before called this method.
Integer getFirstCompensationOffset | ( | ) |
Returns the first active compensation for the section.
String getFirstCycle | ( | ) |
Returns the first cycle within the section. Returns empty string is no cycle occurs within the section.
Vector getFirstPosition | ( | ) |
Returns the first position for the section. This method has been replaced by getInitialPosition().
Boolean getForceToolChange | ( | ) |
Returns true if tool change should be forced.
BoundingBox getGlobalBoundingBox | ( | ) |
Returns the bounding box of the toolpath of the section in the global coordinate system.
Vector getGlobalFinalToolAxis | ( | ) |
Returns the final tool axis for the section in the WCS frame. Always returns the direction vector.
Vector getGlobalInitialToolAxis | ( | ) |
Returns the initial tool axis for the section in the WCS frame. Always returns the direction vector.
Returns the range of the toolpath of the section along the global direction.
Vector getGlobalWorkOrigin | ( | ) |
Returns the work origin in the global coordinate system (top view).
Matrix getGlobalWorkPlane | ( | ) |
Returns the work plane in the global coordinate system (top view).
Range getGlobalZRange | ( | ) |
Returns the Z-coordinate range of the toolpath of the section in the global coordinate system.
Integer getId | ( | ) |
Returns the zero-based id of the section.
Vector getInitialPosition | ( | ) |
Returns the initial position for the section.
Boolean getInitialSpindleOn | ( | ) |
Returns true if the spindle speed is on initially. Might be turned off due to initial canned cycle when it starts with positioning moves.
Number getInitialSpindleSpeed | ( | ) |
Returns the initial spindle speed which can be different from the tool spindle speed. Might be turned off due to initial canned cycle.
Vector getInitialToolAxis | ( | ) |
Returns the initial tool axis for the section as the direction vector.
Vector getInitialToolAxisABC | ( | ) |
Returns the initial tool axis machine angles for the section. The section must have been optimized for the machine using optimizeMachineAngles() or similar before called this method.
Integer getJetMode | ( | ) |
Returns the type of waterjet, laser, and plasma cutting of the section.
The available modes are:
Integer getJobId | ( | ) |
Returns the job id of the section.
String getLastCycle | ( | ) |
Returns the last cycle within the section. Returns empty string is no cycle occurs within the section.
Vector getLowerToolAxisABC | ( | ) |
Returns the upper machine angles for a multi-axis section. The section must have been optimized for the machine using optimizeMachineAngles() or similar before called this method.
Integer getMachiningType | ( | ) |
Returns machining type of the section
The available types are:
Number getMaximumFeedrate | ( | ) |
Returns the maximum feedrate for the section.
Number getMaximumSpindleSpeed | ( | ) |
Returns the maximum spindle speed for the section.
Number getMaximumTilt | ( | ) |
Returns the maximum tilt in the range [-1; 1] for the given multi-axis section. 1 corresponds to 0deg tilt. -1 corresponds to 180deg tilt.
Vector getModelOrigin | ( | ) |
Returns the origin of the Model coordinate system.
Matrix getModelPlane | ( | ) |
Returns the Model coordinate system plane.
Integer getMovements | ( | ) |
Returns the movements (as a mask) in use for the section.
Integer getNumberOfCyclePoints | ( | ) |
Returns the number of cycle points for the entire section.
Integer getNumberOfCycles | ( | ) |
Returns the number cycles within the section.
Returns the number of times the given cycle occurs within the section.
Integer getNumberOfPatternInstances | ( | ) |
Returns the number of pattern instances for the section.
Integer getNumberOfRecords | ( | ) |
Returns the number of records in the section.
PostPropertyMap::PropertyMap getOperationProperties | ( | ) |
Returns the operation property map.
BoundingBox getOptimizedBoundingBox | ( | MachineConfiguration | machine, |
Vector | abc | ||
) |
Returns the bounding box of the toolpath of the section in the coordinate system optimized for the rotary axes.
machine | The machine configuration. |
abc | The rotary axis positions. |
Integer getOptimizedTCPMode | ( | ) |
Returns the TCP mode used for the section when it was optimized for a machine configuration.
Returns the value of the first occurrence of the specified parameter.
name | The name of the parameter to return. |
defaultValue | (optional, since r45615) The default value of the parameter to return if it is not defined. |
Vector getPartAttachPoint | ( | ) |
Returns the part attach point in the world coordinate system. The return position is undefined if the machine configuration does not use a machine simulation model.
Boolean getPartCatcher | ( | ) |
Returns true if part catcher should be activated if available for turning.
Integer getPatternId | ( | ) |
Returns the pattern id of the section. You can use this to tell which sections are pattern instances of the same original section. The motion coordinates will be identical for patterned sections but the work plane can be different. Note that, the pattern ids can be different for some types of patterns when the actual motion coordinates are mapped.
Vector getPolarDirection | ( | ) |
Returns user-specified direction for polar machining type
Integer getPolarMode | ( | ) |
Returns polar mode type
The available types are:
Integer getProbeWorkOffset | ( | ) |
Returns the work offset for the WCS.
Integer getQuality | ( | ) |
Returns the associated quality. Used for waterjet, laser, and plasma cutting.
Number getRapidDistance | ( | ) |
Returns the rapid traversal distance for the section.
Integer getSpindle | ( | ) |
Returns the active spindle.
The available values are:
optional< String > getStrategy | ( | ) |
Returns the strategy of the section.
Boolean getTailstock | ( | ) |
Returns true if tailstock is active for turning.
Tool getTool | ( | ) |
Returns the tool.
Integer getToolAxis | ( | ) |
Returns the tool axis coordinate index (0:X, 1:Y, and 2:Z).
Number getToolOrientation | ( | ) |
Returns the turning tool orientation (radians).
Integer getType | ( | ) |
Returns the type of the section.
The available types are:
Integer getUnit | ( | ) |
Returns the original unit of the section. This may be different from the output unit.
The available values are:
Vector getUpperToolAxisABC | ( | ) |
Returns the upper machine angles for a multi-axis section. The section must have been optimized for the machine using optimizeMachineAngles() or similar before called this method.
String getWCS | ( | ) |
Returns the WCS code string. If there is no WCS definition defined or the work offset is out of range, it will return an empty string.
Integer getWCSIndex | ( | ) |
Returns the WCS code index (without format). If there is no WCS definition defined or the work offset is out of range, it will return -1.
Vector getWCSOrigin | ( | ) |
Returns the origin of the WCS.
Matrix getWCSPlane | ( | ) |
Returns the WCS plane.
Integer getWorkOffset | ( | ) |
Returns the work offset for the WCS.
Vector getWorkOrigin | ( | ) |
Returns the work origin in the WCS.
Matrix getWorkPlane | ( | ) |
Returns the work plane in the WCS.
Range getZRange | ( | ) |
Returns the Z-coordinate range of the toolpath of the section.
Boolean hasAnyCycle | ( | ) |
Returns true if the section has any cycle.
Returns true if the specified cycle occurs anywhere within the section.
Returns true if the specified parameter has been defined in the given cycle.
index | The index of the cycle. |
name | The name of the parameter. |
Boolean hasDynamicWorkOffset | ( | ) |
Returns true if the dynamic work offset is defined.
Returns true if the specified parameter has been defined in the section.
Boolean hasWellDefinedPosition | ( | ) |
Returns true if the section has a well-defined position. Sections with no position would cause getInitialPosition() and getFinalPosition() to fail.
Returns true if the milling motion for the section is further away from X0 Y0 than the given distance. Can be used to check if motion gets close to the rotary axis for XZC milling.
distance | The minimum allowed distance from motion to X0 Y0. |
tolerance | Tolerance used to linearize toolpath. |
Boolean isMultiAxis | ( | ) |
Returns true is the section contains multi-axis toolpath.
Boolean isOptimizedForMachine | ( | ) |
Returns true if the section has been optimized for a machine configuration.
Boolean isOptional | ( | ) |
Returns true if the section is optional.
Boolean isPatterned | ( | ) |
Returns true if the section is patterned. Ie. at least one other section shares the same pattern id.
optional< Boolean > isPolarRapidLinks | ( | ) |
Returns true, if rapid polar links should be used, false - for linear rapid links, undefined - if not specified (Fusion assumes they are linear)
Boolean isTopWorkPlane | ( | ) |
Returns true if the work plane is set to the top plane (i.e. looking down the Z-axis) in the WCS.
This method has been deprecated. See isZOriented() instead.
Boolean isXOriented | ( | ) |
Returns true if the work plane is oriented such that forward is along the +X in the WCS.
The same as checking "currentSection.workPlane.forward.x >= (1 - EPSILON)".
Boolean isYOriented | ( | ) |
Returns true if the work plane is oriented such that forward is along the +Y in the WCS.
The same as checking "currentSection.workPlane.forward.y >= (1 - EPSILON)".
Boolean isZOriented | ( | ) |
Returns true if the work plane is oriented such that forward is along the +Z in the WCS.
The same as checking "currentSection.workPlane.forward.z >= (1 - EPSILON)".
optimize3DPositionsByMachine | ( | MachineConfiguration | machine, |
Vector | abc, | ||
Integer | optimizeType | ||
) |
Adjusts the tool end points for the rotary axes positions in 3+2 operations for the active machine configuration.
The directions for onRapid(), onLinear(), onCyclePoint(), and onCircular() are hereafter mapped according to the input rotary axis angles.
machine | The machine configuration. |
abc | The rotary axis positions. |
optimizeType | Can be one of the following. OPTIMIZE_NONE: Maintain tool tip position (TCPM). OPTIMIZE_BOTH: Adjust for tables and heads OPTIMIZE_TABLES: Adjust for tables only. OPTIMIZE_HEADS: Adjust for heads only. OPTIMIZE_AXIS: Adjust per axis definition. |
optimizeMachineAnglesByMachine | ( | MachineConfiguration | machine, |
Integer | optimizeType | ||
) |
Optimizes the machine angles for 5-axis motion given the specified machine configuration.
The directions for onRapid5D() and onLinear5D() are hereafter mapped to machine angles from the initial direction vector. The work plane and origin are mapped into the WCS plane and origin.
machine | The machine configuration. |
optimizeType | 0 = TCP, 1 = adjust for tables and heads, 2 = adjust for tables, 3 = adjust for heads, 4 = adjust per axis definition. |
Integer dynamicWorkOffset |
The dynamic work offset corresponding to the WCS used for controlling the display coordinates.