SOLIDOS API - SolidosGetPointAt(deviceHandle, paramType, param)
SolidsGetPointAt(deviceHandle, paramType, param) - Returns a point at a specific parameter of a linear or longitudinal device
- Input Parameters
- deviceHandle (Dynamo: String, Visual List: Entity Name) - the handle of the linear or longitudinal device
- paramType (String) - the type of parameter to consider:
- "Parameter" - the integer part of the number is the index of the starting vertex of the segment and the fractional part identifies the aspect ratio of the segment
- "Point" - a point. In this case, the point will be projected onto the axis using a plane orthogonal to the Z axis and then the Z elevation of this point on the device axis will be calculated
- "Distance" - the distance in relation to the beginning of the device, considering that the segments are three-dimensional
- "Distance2D" - Projects the device axis onto the XY plane and then calculates the XY coordinates of the given distance on this axis and then calculates the elevation on the 3D axis of the device, projecting the point onto the Z vector
- Output (Point) - a 3D point on the device axis
- Errors that may occur
- "InvalidDeviceHandle" - the device handle is invalid or is not from a linear or longitudinal device
- "NoAxis3D" - the device does not have an axis 3D
It may have construction errors, or it may not be built at all
Example of usage in Visual Lisp:
(setq device (car lstDevices)
dist2d 5.0
final (SolidosGetNodeParam device "Length2D"))
(while (< dist2d final)
(setq
pt (SolidosGetPointAt device "Distance2D" dist2d)
param (SolidosGetParameterAtPoint device pt)
dist2d (+ dist2d 10))
(SolidosCreateNode device "Label" (list "Parameter" param))
)
Example usage in Dynamo:
device = "7651";
dist2d = 10.0;
pt = SolidosAPI.SolidosGetPointAt(device, "Distance2D", dist2d);
param = SolidosAPI.SolidosGetParameterAtPoint(device, pt);
dic = Dictionary.ByKeysValues(["Parameter"], [param]);
label = SolidosAPI.SolidosCreateNode(device, "Label", dic);