public interface TCPContributionModel
This interface provides functionality for adding, updating and removing TCPs in PolyScope.
Note: This interface must only be used in an installation contribution.Modifier and Type | Method and Description |
---|---|
TCP |
addTCP(String idKey,
String suggestedName,
Pose offset)
Add a TCP to the current PolyScope installation.
|
TCP |
getTCP(String idKey)
Returns the TCP previously added by this URCap using the same
idKey identifier. |
void |
removeTCP(String idKey)
Remove a TCP added by this URCap from PolyScope.
|
void |
updateTCP(String idKey,
Pose newOffset)
Update the offset of an existing TCP added by this URCap.
|
TCP addTCP(String idKey, String suggestedName, Pose offset)
Add a TCP to the current PolyScope installation.
This makes the TCP selectable by the end user as well as available to to other URCap contributions (through theTCPModel
interface). The TCP is not modifiable by the end user or other URCaps.idKey
- The key to identify this TCP by, not null
nor an empty string. The key is for this URCap only,
i.e. it only has to be unique for this URCap and not "globally" for other URCaps.suggestedName
- Suggested name for the TCP, not null
nor an empty string. Valid names must match
regex [a-zA-Z][a-zA-Z0-9_]{0,14} for a total of 15 characters. The final name can be retrieved
from the returned TCP instance.offset
- The offset of the TCP with respect to the tool output flange, not null
.TCPAlreadyAddedException
- If a TCP has previously been added using the same idKey
identifier.
Use getTCP(String)
to check if the TCP has already been added to the
current installation.
Use updateTCP(String, Pose)
to update the TCP if the offset of the TCP
has changed.IllegalTCPNameException
- If the suggested name does not match required regex.IllegalArgumentException
- If any of the values of the pose specified for the TCP offset are not inside the
valid range of a TCP offset as defined by PolyScope.TCP getTCP(String idKey)
idKey
identifier. Use this to verify if the
TCP is present in the current installation.idKey
- The key to identify this TCP by, not null
nor an empty string.null
if no TCP exists in current installation (with the specified idKey
identifier).void updateTCP(String idKey, Pose newOffset)
idKey
- The key to identify the TCP, not null
nor an empty string. A TCP must have been added using
the same identifier key prior to calling this method.newOffset
- The new offset to set for the TCP with respect to the tool output flange, not null
.TCPNotFoundException
- If no TCP exists with the provided idKey
identifier in the current installation.IllegalArgumentException
- If any of the values of the pose specified for the TCP offset is not inside the
valid range of a TCP offset as defined by PolyScope.void removeTCP(String idKey)
idKey
- The identifier key used to add the TCP with, not null
nor an empty string.TCPNotFoundException
- If no TCP exists with the provided idKey
identifier in the current installation.Copyright © 2021. All rights reserved.