Interpolated Profile File Format (.asc)
Motion Sizer can export cam diagrams to .asc files. Motion Sizer can import .asc files as user-defined motion profiles.
.asc files describe cubic spline interpolated profiles.
o.asc files are text files with UTF-8 encoding.
oThe end of line is encoded in Windows style by a CR LF (carriage return, line feed).
oThe dot (.) is used as decimal separator character for numbers. Double precision is used, as defined in https://msdn.microsoft.com/en-us/library/678hzkk9.aspx. Exponent notation is allowed (for example, 1.91446788459615E-05).
o.asc files encode a position profile.
They provide a cubic spline interpolation of a profile of equidistant position values.
An .asc file consists of two types of data:
oHeader data in lines 1...10.
oProfile data in lines 11 and following.
In the following .asc file example:
oHeader data is available in lines 1...10.
oProfile data is available in lines 11 and following.
Line |
Content |
---|---|
1 |
Header=SoMachine Motion Builder |
The header data in lines 1...10 of each .asc file contains the following information:
Line |
Type of information |
Admissible values |
Description |
Example |
---|---|---|---|---|
1 |
Software name |
Text |
Identifies the software that was used to create this .asc file. |
Header=Motion Sizer |
2 |
Software version |
Text |
Identifies the software version that was used to create this .asc file. |
Version=1.0 |
3 |
Y factor |
YFactor= followed by a decimal number. |
Identifies the default scale of the y axis. It is applied by default to a segment when this profile is used as a user-defined profile and when you import a cam diagram from this .asc file. |
YFactor=100 |
4 |
X factor |
XFactor= followed by a decimal number. |
Identifies the default scale of the x axis that is used to determine the x coordinate of the segment end point when you import a cam diagram from this .asc file. |
XFactor=360 |
5 |
Y offset |
YOffset= followed by a decimal number. |
Identifies the default y coordinate of the start point of the cam segment when you import a cam diagram from this .asc file. |
YOffset=0 |
6 |
X offset |
XOffset= followed by a decimal number. |
Identifies the x coordinate of the start point of the cam segment when you import a cam diagram from this .asc file. |
XOffset=0 |
7 |
Start slope |
StartSlope= followed by a decimal number. |
Identifies the slope of the position profile at the first point of the profile. The value of this parameter is only evaluated if InterpolationMode=1 is used (refer to line 9 of the .asc file). |
StartSlope=0 |
8 |
End slope |
EndSlope= followed by a decimal number. |
Identifies the slope of the position profile at the last point of the profile. The value of this parameter is only evaluated if InterpolationMode=1 is used (refer to line 9 of the .asc file). |
EndSlope=0 |
9 |
Interpolation mode |
InterpolationMode= followed by one of the following values: o0 for natural spline o1 for spline on base of the slope of the borders o2 for periodic spline |
Defines how the edge condition at the start point and end point of the profile is resolved. oNatural spline: The curvature at the start point and at the end point is 0. oSpline on base of the slope of the borders: The values for the slope at the start point and at the end point are defined by the values given in lines 7 and 8. oPeriodic spline: The same slope and curvature apply at the start point and at the end point. |
InterpolationMode=1 |
10 |
Separator |
CamPoints (Only this text is allowed.) |
Identifies the end of the header and the beginning of the profile data. |
CamPoints |
Lines 11 and following until the end of the .asc file contain the profile data. Each profile value is provided as a decimal number, followed by a CR LF.
.asc files exported from Motion Sizer contain exactly 360 profile values.
Motion Sizer allows you to import .asc files containing a maximum of 1000 profile values.
Each profile value represents a y value of the profile, normalized to a range from 0 to 1. The parameters YFactor and YOffset provided in the header data restore the relation to the actual position range.
Profile values are spaced equidistantly along the x axis. The parameters XFactor and XOffset provided in the header data restore the relation to the x values of the profile.