Setup Utility Routines

Toolpath-mesh intersection utility routines are used to activate the toolpath-mesh intersection module and to access data computed by the module. Setup utility routines are invoked at the beginning of an analysis step from user subroutines UEPACTIVATIONSETUP and UMDFLUXSETUP.

This page discusses:

PtkSetMeshAndEventSeries

Construct a singleton object for the toolpath-mesh intersection module, and set mesh and event series data.

Utility Routine Interface

#include <PtkUtilitySubs.hdr>
#include <aba_ptk_enums.inc>

       character *80 cElSetName, cEventSeries
       call PtkSetMeshAndEventSeries (cElSetName, cEventSeries)

Variables to Be Provided to the Utility Routine

cElSetName
Name of the element set.
cEventSeries
Name of the event series describing the toolpath.

PtkSetEventSeriesProperties

Define the shape of a toolpath and the algorithm to be used in intersection computations. Refer to Figure 1 for box toolpath descriptions.

Utility Routine Interface

#include <PtkUtilitySubs.hdr>
#include <aba_ptk_enums.inc>

       character *80 cEventSeries
       dimension jPtkEvtOps (nPtkEventOpt_ArraySize)
       dimension jPtkEvtProps (nPtkIntEventProperties_ArraySize)
       dimension rPtkEvtProps (nPtkRealEventProperties_ArraySize)

       call PtkSetEventSeriesProperties (cEventSeries, cPtkID, iEventType,
     *                             jPtkEvtOps, jPtkEvtProps, rPtkEvtProps)

Variables to Be Provided to the Utility Routine

cEventSeries

Name of the event series.

cPtkID

Tag name assigned to the event series.

iEventType

Integer flag indicating the type of the toolpath. Set iEventType to iPtkEventSeriesShape_Point, iPtkEventSeriesShape_InfiniteLine, or iPtkEventSeriesShape_Box.

jPtkEvtOps

Integer array of size nPtkEventOpt_ArraySize.

jPtkEvtOps(iPtkEventOpt_Algorithm) Indicates the algorithm to be used for the toolpath-mesh intersection. For a box toolpath, set JPtkEvtOps(iPtkEventOpt_Algorithm) to iPtkEventSeriesAlgorithm_SubElement or iPtkEventSeriesAlgorithm_SubSegment. For point or infinite line toolpaths, set JPtkEvtOps(iPtkEventOpt_Algorithm) to iPtkEventSeriesAlgorithm_Undefined.
jPtkEvtOps(iPtkEventOpt_AbsoluteOffsets) Indicates whether components of the offset vector F to position the box with respect to the path are normalized by the box lengths in the segment local xl-, yl-, and zl-directions or by absolute values. Set jPtkEvtOps(iPtkEventOpt_AbsoluteOffsets)=1 to interpret components of the offset vector as absolute values. Components of the offset vector must be between –1 and 1 if they are normalized by box lengths. (Unused for point or infinite line toolpaths).
jPtkEvtOps(iPtkEventOpt_SegmentTransition) Set jPtkEvtOps(iPtkEventOpt_SegmentTransition)=1 to activate transitioning between segments in a box toolpath. Transitioning between segments results in no overlap of the path swept by the box. (Unused for point or infinite line toolpaths).
jPtkEvtOps(iPtkEventOpt_Conservative) Set jPtkEvtOps(iPtkEventOpt_Conservative)=1 to indicate that if part of a path segment for a point toolpath or part of a subsegment for a box toolpath using the subsegment approach is outside the external mesh boundary, fields of part of segments or subsegments that are inside the mesh boundary are incremented proportionally to conserve the total field. (Unused for infinite line toolpaths).
jPtkEvtProps

Integer array of size nPtkIntEventProperties_ArraySize).

jPtkEvtProps(iPtkIntEventProperties_BoxSubDiv1) Number of subdivisions along the segment local xl-direction for a box toolpath using the subsegment method. (Unused for point or infinite line toolpaths).
jPtkEvtProps(iPtkIntEventProperties_BoxSubDiv2) Number of subdivisions along the segment local yl-direction for a box toolpath using the subsegment method. (Unused for point or infinite line toolpaths).
jPtkEvtProps(iPtkIntEventProperties_BoxSubDiv3) Number of subdivisions along the segment local zl-direction for a box toolpath using the subsegment method. (Unused for point or infinite line toolpaths).
rPtkEvtProps

Real array of size nPtkRealEventProperties_ArraySize.

rPtkEvtProps(iPtkRealEventProperties_Offset1) Component of the offset vector F with respect to the segment local xl-direction for a box toolpath. (Unused for point or infinite line toolpaths).
rPtkEvtProps(iPtkRealEventProperties_Offset2) Component of the offset vector F with respect to the segment local yl-direction for a box toolpath. (Unused for point or infinite line toolpaths).
rPtkEvtProps(iPtkRealEventProperties_Offset3) Component of the offset vector F with respect to the segment local zl-direction for a box toolpath. (Unused for point or infinite line toolpaths.)
rPtkEvtProps(iPtkRealEventProperties_NormalVector1) Component of a vector v defining the segment local z1x1 plane for a box toolpath. The xl-direction is along the segment. Component must be given with respect to the global coordinate system. (Unused for point or infinite line toolpaths.)
rPtkEvtProps(iPtkRealEventProperties_NormalVector2) Component of a vector v defining the segment local z1x1 plane for a box toolpath. The yl-direction is y1=v×x1. Component must be given with respect to the global coordinate system. (Unused for point or infinite line toolpaths.)
rPtkEvtProps(iPtkRealEventProperties_NormalVector3) Component of a vector v defining the segment local z1x1 plane for a box toolpath. The zl-direction is z1=x1×y1. Component must be given with respect to the global coordinate system. (Unused for point or infinite line toolpaths.)
rPtkEvtProps(iPtkRealEventProperties_BoxLength1) Length of box along the segment local xl-direction for a box toolpath. (Unused for point or infinite line toolpaths.)
rPtkEvtProps(iPtkRealEventProperties_BoxLength2) Length of box along the segment local yl-direction for a box toolpath. (Unused for point or infinite line toolpaths.)
rPtkEvtProps(iPtkRealEventProperties_BoxLength3) Length of box along the segment local zl-direction for a box toolpath. (Unused for point or infinite line toolpaths.)

Figures

Box toolpath-mesh intersection using the subsegment approach.

PtkGetEventSeriesNumDivisionPoints

Retrieve number of subdivision points in a box toolpath using the subsegment algorithm for intersection computations.

Utility Routine Interface

#include <PtkUtilitySubs.hdr>
#include <aba_ptk_enums.inc>

       character *80 cEventSeries
       call ptkGetEventSeriesNumDivisionPoints(cEventSeries,numSubDiv)

Variables to Be Provided to the Utility Routine

cEventSeries
Name of the event series.
cEventSeries
Name of the event series describing the toolpath.

Variables Returned from the Utility Routine

numSubDiv
Number of subdivisions.

PtkGetEventSeriesDivisionCoordinates

Retrieve coordinates of subdivision points in the segment local coordinate system defined by x1, y1, and z1 (see Figure 1) in a box toolpath using the subsegment algorithm.

Utility Routine Interface

#include <PtkUtilitySubs.hdr>
#include <aba_ptk_enums.inc>

       character *80 cPtkID
       call ptkGetEventSeriesDivisionCoordinates(cPtkID,subDivPtCoords)

Variables to Be Provided to the Utility Routine

cPtkID
Tag name of the event series defined in PtkSetEventSeriesProperties.

Variables Returned from the Utility Routine

subDivPtCoords
Real array containing coordinates of the subdivision points. Array size is 3 x numSubDiv.

PtkSetEventSeriesDivisionPointWeights

Set weights to subdivision points of a box toolpath using the subsegment algorithm.

Utility Routine Interface

#include <PtkUtilitySubs.hdr>
#include <aba_ptk_enums.inc>

       character *80 cPtkID
       call ptkSetEventSeriesDivisionPointWeights(cPtkID, subDivPtWts)

Variables to Be Provided to the Utility Routine

cPtkID
Tag name of the event series defined in PtkSetEventSeriesProperties.
subDivPtWts
Real array containing weights of subdivision points. Array size is numSubDiv.

PtkSetMeshAndScanstrategies

Construct a singleton object for the toolpath mesh intersection module, and set mesh and scan pattern data. Refer to Figure 2 for scan pattern descriptions and to Figure 3 for scan pattern orientations.

Utility Routine Interface

#include <PtkUtilitySubs.hdr>
#include <aba_ptk_enums.inc>

       character *80 cEventSeries, cPtkID
       dimension rPtkScanData(*), iPtkScanData(*), iPtkScanOpts(*)

       call PtkSetMeshAndScanstrategies(cElsetName, cPtkID, iPtkScanOpts,
      *                                 iPtkScanData, rPtkScanData)

Variables to Be Provided to the Utility Routine

cElsetName

Name of the element set.

cPtkID

User given name of the scan strategy.

iPtkScanOpts

Integer array of size iPtkScanPatternOpt_Size.

iPtkScanOpts (iPtkScanPatternOpt_LayerByLayerActivation) Indicates which algorithm to use for activation. Set to 1 for sweep activation. Set to 0 for layer-by-layer activation.
iPtkScanData

Variable length integer array.

iPtkScanData(iPtkIntScanPatternProps_numRegions) Number of scan regions: nRegions.
For nth region, n = 1 to nRegions:
iPtkScanData(iPtkIntScanPatternProps_variableDataStart + (size of data for (n-1) previous regions ) + iPtkIntScanRegion_numIslands) Number of scan patches/islands in the pattern: nIsland.
For pth patch, p = 1 to nPatches:
iPtkScanData(iPtkIntScanPatternProps_variableDataStart + (size of data for (n-1) previous regions ) + (size of (p-1) previous patches +iPtkIntScanIsland_StrainID) Strain tensor ID (see how to define an eigenstrain library below) assigned to pth scan patch.
rPtkScanData

Variable length real array.

rPtkScanData (iPtkRealScanPatternProps_sliceHeight) Height h of the slice/layers in the scan pattern.
rPtkScanData(iPtkRealScanPatternProps_ori11) Component of vector I along the global xg-direction.
rPtkScanData(iPtkRealScanPatternProps_ori12) Component of vector I along the global yg-direction.
rPtkScanData(iPtkRealScanPatternProps_ori13) Component of vector I along the global zg-direction.
rPtkScanData(iPtkRealScanPatternProps_ori21) Component of vector J along the global xg-direction.
rPtkScanData(iPtkRealScanPatternProps_ori22) Component of vector J along the global yg-direction.
rPtkScanData(iPtkRealScanPatternProps_ori23) Component of vector J along the global zg-direction.
rPtkScanData(iPtkRealScanPatternProps_ori31) Component of vector K along the global xg-direction.
rPtkScanData(iPtkRealScanPatternProps_ori32) Component of vector K along the global yg-direction.
rPtkScanData(iPtkRealScanPatternProps_ori33) Component of vector K along the global zg-direction. IJK must be orthonormal, and they form the build axis system.
rPtkScanData(iPtkRealScanPatternProps_origin1) x-coordinate of the origin of build axis system.
rPtkScanData(iPtkRealScanPatternProps_origin2) y-coordinate of the origin of build axis system.
rPtkScanData(iPtkRealScanPatternProps_origin3) z-coordinate of the origin of build axis system.
rPtkScanData(iPtkRealScanPatternProps_startTime) Print start time.
rPtkScanData(iPtkRealScanPatternProps_endTime) Print end time.
For nth region, n = 1 to nRegions:
rPtkScanData (iPtkRealScanPatternProps_variableDataStart + (size of data for (n-1) previous regions ) + iPtkRealScanRegion_rotation) Layer-to-layer rotation angle in degrees.
rPtkScanData(iPtkRealScanPatternProps_variableDataStart variableDataStart + (size of data for (n-1) previous regions ) + iPtkRealScanRegion_xMin : iPtkRealScanPatternProps_variableDataStart variableDataStart + (size of data for (n-1) previous regions ) + iPtkRealScanRegion_zMax) Array of length six. Defines (xmin, ymin, zmin) and (xmax, ymax, zmax) of the scanning region with respect to the build system IJK
For ith patch, i = 1 to nIsland:
rPtkScanData(iPtkRealScanPatternProps_variableDataStart + (size of data for (n-1) previous regions ) + (size of (i-1) previous islands + iPtkRealScanIsland_localRotation) Local rotation of φ ith patch.
rPtkScanData(iPtkRealScanPatternProps_variableDataStart + (size of data for (n-1) previous regions ) + (size of (i-1) previous islands ) + iPtkRealScanIsland_xMin : iPtkRealScanPatternProps_variableDataStart + (size of data for (n-1) previous regions ) + (size of (i-1) previous islands ) + iPtkRealScanIsland_yMax) Real array of size four. (xmin, ymin) and (xmax, ymax) of ith patch.

Figures

Scan pattern.

Scan pattern orientation.

PtkSetEigLibrary

Create an eigenstrain library.

Utility Routine Interface

#include <PtkUtilitySubs.hdr>
#include <aba_ptk_enums.inc>

       character *80 cEigLibID
       dimension iEigLib(iSMAPtkStrainLibOptions_Size)
       dimension rEigLib(6, numEigenStrainsInLib)
       character*80 cEigLib(numEigenStrainsInLib)

       call PtkSetEigLibrary (cEigLibID, iEigLib, rEigLib, cEigLib)

Variables to Be Provided to the Utility Routine

cEigLibID

User-defined name for the eigenstrain library.

iEigLib (iSMAPtkStrainLibOptions_Size)

Integer array of size iSMAPtkStrainLibOptions_Size.

iEigLib (iSMAPtkStrainLibOptions_numStrains) Total number of strains in the library numEigenStrainsInLib.
rEigLib

Real array of size 6 x numEigenStrainsInLib. Set to six components of eigenstrains for each of numEigenStrainsInLib strains.

cEigLib

Character*80 array of size numEigenStrainsInLib. Set to a tag name of Character*80 for each of numEigenStrainsInLib strains. These tags are used in diagnostic messages from the toolpath-mesh intersection module.

PtkAssignEigLibToScanStrategies

Associate an eigenstrain library with a scan pattern.

Utility Routine Interface

#include <PtkUtilitySubs.hdr>
#include <aba_ptk_enums.inc>

       character *80 cEigLibID, cPtkID
       call PtkAssignEigLibToScanStrategies (cEigLibID,cPtkID)

Variables to Be Provided to the Utility Routine

cEigLibID

User-defined name for the eigenstrain library.

cEigLibID

Name for the eigenstrain library defined in PtkSetEigLibrary.

cPtkID

Name of the scan strategy defined in PtkSetMeshAndScanstrategies.

PtkAssignEigLibToES

Associate an eigenstrain library with an event series describing a toolpath.

Utility Routine Interface

#include <PtkUtilitySubs.hdr>
#include <aba_ptk_enums.inc>

       character *80 cEigLibID, cPtkID
       call PtkAssignEigLibToES (cEigLibID,cPtkID)

Variables to Be Provided to the Utility Routine

cEigLibID

User-defined name for the eigenstrain library.

cEigLibID

Name for the eigenstrain library defined in PtkSetEigLibrary.

cPtkID

Tag name associated with an event series describing the toolpath.