Create path interpolations between given toolpath elements.
[Example]
interpolationHandler = Operator.GetInterpolationHandler()
program = Operator.GetActiveProgram()
tpes = program.GetTpElements()
firstTpe = tpes[0]
lastTpe = tpes[-1]
if firstTpe and lastTpe:
result = interpolationHandler.CreatePathInterpolation(firstTpe, lastTpe, [INTERPOLATIONTYPE_OFFSETRELATIVE, INTERPOLATIONTYPE_TANGENTRELATIVE])
if result != 0: logging.LogError(f"Create interpolation error = {result}.")
Delete path interpolations between given toolpath elements.
[Example]
interpolationHandler = Operator.GetInterpolationHandler()
program = Operator.GetActiveProgram()
tpes = program.GetTpElements()
firstTpe = tpes[0]
lastTpe = tpes[-1]
if firstTpe and lastTpe:
result = interpolationHandler.DeletePathInterpolation(firstTpe, lastTpe, [INTERPOLATIONTYPE_TANGENTRELATIVE])
if result != 0: logging.LogError(f"Delete interpolation error = {result}.")
|
|
Start toolpath element
|
|
|
End toolpath element
|
|
|
One or more current types of interpolation that should be switched: InterpolationType
|
|
|
ERR_NO_ERROR (0) if successful, error code otherwise(InterpolationErrorCodes)
|
Switch path interpolations types for given toolpath elements between Relative and Absolute, or between JoltSmooth and JoltFix.
[Example]
interpolationHandler = Operator.GetInterpolationHandler()
program = Operator.GetActiveProgram()
tpes = program.GetTpElements()
firstTpe = tpes[0]
lastTpe = tpes[-1]
if firstTpe and lastTpe:
result = interpolationHandler.SwitchPathInterpolationType(firstTpe, lastTpe, [INTERPOLATIONTYPE_OFFSETRELATIVE])
if result != 0: logging.LogError(f"Switch interpolation type error = {result}.")
Add given toolpath element as support for the specified types of path interpolations.
[Example]
interpolationHandler = Operator.GetInterpolationHandler()
program = Operator.GetActiveProgram()
tpes = program.GetTpElements()
mid = int(len(tpes)/2)
middleTpe = tpes[mid]
if middleTpe:
result = interpolationHandler.AddPathInterpolationSupport(middleTpe, [INTERPOLATIONTYPE_OFFSETRELATIVE, INTERPOLATIONTYPE_TANGENTRELATIVE])
if result != 0: logging.LogError(f"Add support error = {result}.")
Remove given toolpath element as support for the specified types of path interpolations.
[Example]
interpolationHandler = Operator.GetInterpolationHandler()
program = Operator.GetActiveProgram()
tpes = program.GetTpElements()
mid = int(len(tpes)/2)
middleTpe = tpes[mid]
if middleTpe:
result = interpolationHandler.RemovePathInterpolationSupport(middleTpe, [INTERPOLATIONTYPE_TANGENTRELATIVE])
if result != 0: logging.LogError(f"Remove support error = {result}.")
Create surface interpolations between given toolpath tracks.
[Example]
interpolationHandler = Operator.GetInterpolationHandler()
program = Operator.GetActiveProgram()
tracks = program.GetTracks()
firstTrack = racks[0]
lastTrack = racks[-1]
if firstTrack and lastTrack:
result = interpolationHandler.CreateSurfaceInterpolation(firstTrack, lastTrack, [INTERPOLATIONTYPE_NORMALABSOLUTE, INTERPOLATIONTYPE_TANGENTRELATIVE])
if result != 0: logging.LogError(f"Create interpolation error = {result}.")
Delete surface interpolations between given toolpath tracks.
[Example]
interpolationHandler = Operator.GetInterpolationHandler()
program = Operator.GetActiveProgram()
tracks = program.GetTracks()
firstTrack = racks[0]
lastTrack = racks[-1]
if firstTrack and lastTrack:
result = interpolationHandler.DeleteSurfaceInterpolation(firstTrack, lastTrack, [INTERPOLATIONTYPE_NORMALABSOLUTE, INTERPOLATIONTYPE_TANGENTRELATIVE])
if result != 0: logging.LogError(f"Delete interpolation error = {result}.")
|
|
Start toolpath track
|
|
|
End toolpath track
|
|
|
One or more current types of interpolation that should be switched: InterpolationType
|
|
|
ERR_NO_ERROR (0) if successful, error code otherwise(InterpolationErrorCodes)
|
Switch surface interpolations types for given toolpath elements between Relative and Absolute, or between JoltSmooth and JoltFix.
[Example]
interpolationHandler = Operator.GetInterpolationHandler()
program = Operator.GetActiveProgram()
tracks = program.GetTracks()
firstTrack = racks[0]
lastTrack = racks[-1]
if firstTrack and lastTrack:
result = interpolationHandler.SwitchSurfaceInterpolationType(firstTrack, lastTrack, [INTERPOLATIONTYPE_NORMALABSOLUTE])
if result != 0: logging.LogError(f"Switch interpolation type error = {result}.")
•
|
AddSurfaceInterpolationSupport(track: CENPyOlpTrack, types: list ): int
|
Add given toolpath element as support for the specified types of surface interpolations.
[Example]
interpolationHandler = Operator.GetInterpolationHandler()
program = Operator.GetActiveProgram()
tracks = program.GetTracks()
mid = int(len(tracks)/2)
middleTrack = tracks[mid]
if middleTrack:
result = interpolationHandler.AddSurfaceInterpolationSupport(middleTrack, [INTERPOLATIONTYPE_NORMALABSOLUTE, INTERPOLATIONTYPE_TANGENTRELATIVE])
if result != 0: logging.LogError(f"Add support error = {result}.")
•
|
RemoveSurfaceInterpolationSupport(track: CENPyOlpTrack, types: list ): int
|
Add given toolpath element as support for the specified types of surface interpolations.
[Example]
interpolationHandler = Operator.GetInterpolationHandler()
program = Operator.GetActiveProgram()
tracks = program.GetTracks()
mid = int(len(tracks)/2)
middleTrack = tracks[mid]
if middleTrack:
result = interpolationHandler.RemoveSurfaceInterpolationSupport(middleTrack, [INTERPOLATIONTYPE_TANGENTRELATIVE])
if result != 0: logging.LogError(f"Remove support error = {result}.")
Check whether or not the given toolpath element has the path interpolation of the given type.
[Example]
interpolationHandler = Operator.GetInterpolationHandler()
program = Operator.GetActiveProgram()
tpes = program.GetTpElements()
firstTpe = tpes[0]
if firstTpe:
isInterpolated = interpolationHandler.IsInterpolated(firstTpe, INTERPOLATIONTYPE_OFFSETRELATIVE)
logging.LogInfo(f"Interpolated result of first TPE = {isInterpolated}.")
Check whether or not the given track has the surface interpolation of the given type.
Track is considered as interpolated if its event based start toolpath element has interpolation.
[Example]
interpolationHandler = Operator.GetInterpolationHandler()
program = Operator.GetActiveProgram()
tracks = program.GetTracks()
firstTrack = racks[0]
if firstTrack:
isInterpolated = interpolationHandler.IsInterpolated(firstTrack, INTERPOLATIONTYPE_NORMALRELATIVE)
logging.LogInfo(f"Interpolated result of first track = {isInterpolated}.")
Check whether or not the given toolpath element is a support of any kind for a particular interpolation type.
[Example]
interpolationHandler = Operator.GetInterpolationHandler()
program = Operator.GetActiveProgram()
tpes = program.GetTpElements()
mid = int(len(tpes)/2)
middleTpe = tpes[mid]
if middleTpe:
isSupport = interpolationHandler.IsSupport(middleTpe, INTERPOLATIONTYPE_NORMALRELATIVE) # True
logging.LogInfo(f"Support result of middle TPE = {isSupport}.")
Check whether or not the given track is a support of any kind for a particular interpolation type.
Track is considered as a support if its event based start toolpath element is a support.
[Example]
interpolationHandler = Operator.GetInterpolationHandler()
program = Operator.GetActiveProgram()
tracks = program.GetTracks()
mid = int(len(tracks)/2)
middleTrack = tracks[mid]
if middleTrack:
isSupport = interpolationHandler.IsSupport(middleTrack, INTERPOLATIONTYPE_NORMALRELATIVE) # True
logging.LogInfo(f"Support result of middle track = {isSupport}.")
|