04-07-2023, 06:10 PM
From the documentation:
From the actual `.py` file:
The API documentation allows the use of `FEATURE_CURVE` and `FEATURE_POINTS`, but the actual code prevents this. Additionally, the actual code takes only one argument, disallowing the `feature_id` parameter that the API documentation specifies.
Am I doing something wrong, or is this a bug?
Python 3.11.1
RoboDK 5.4.3
Windows 10 Pro
Code:
GetPoints(feature_type=1, feature_id=0)
Retrieves the point under the mouse cursor, a curve or the 3D points of an object. The points are provided in [XYZijk] format in relative coordinates. The XYZ are the local point coordinate and ijk is the normal of the surface.
Parameters
feature_type (int)——将FEATURE_SURFACE to retrieve the point under the mouse cursor, FEATURE_CURVE to retrieve the list of points for that wire, or FEATURE_POINT to retrieve the list of points.
feature_id (int) – used only if FEATURE_CURVE is specified, it allows retrieving the appropriate curve id of an object
Returns
List of points
From the actual `.py` file:
Code:
def GetPoints(self, feature_type=FEATURE_HOVER_OBJECT_MESH)
...
if feature_type < FEATURE_HOVER_OBJECT_MESH:
raise Exception("Invalid feature type, use FEATURE_HOVER_OBJECT_MESH, FEATURE_HOVER_OBJECT or equivalent")
The API documentation allows the use of `FEATURE_CURVE` and `FEATURE_POINTS`, but the actual code prevents this. Additionally, the actual code takes only one argument, disallowing the `feature_id` parameter that the API documentation specifies.
Am I doing something wrong, or is this a bug?
Python 3.11.1
RoboDK 5.4.3
Windows 10 Pro