HTTP Method | Request URL |
---|---|
POST | https://developers.curvsurf.com/FindSurface/${findType}[.json] |
${findType}
must be replaced with one of following feature types:
Generally, FindSurface provides a response as binary format.
If you attach .json
at the end of requested URL above,
server will provide a response as JSON format.
Request Find Plane with binary format response
https://developers.curvsurf.com/FindSurface/plane
Request Find Torus with JSON format response
https://developers.curvsurf.com/FindSurface/torus.json
Header Name | Header Value |
---|---|
Content-Type | application/x-findsurface-request |
Content-Length | (the size of the body content, in bytes) |
NOTE: To use optional header field(s) below, Content-Type
must be set to application/x-findsurface-request.
Header Name | Header Value |
---|---|
Content-Encoding | deflate |
X-Content-Endian | big |
X-Accept-Endian | big |
If Content-Encoding
is presented, it lets the server knows a request body is deflated with zlib.
If X-Content-Endian
is presented, it lets the server knows a byte order of a request body as Big-endian.
Otherwise, as Little-endian.
If X-Accept-Endian
is presented, it lets the server knows the client wants a byte order of a response body as Big-endian.
Otherwise, as Little-endian.
Note that, X-Accept-Endian
is ignored when response format is in JSON format.
Request body consists of two parts: Header and Array of Point Attributes.
NOTE: Point Attributes must contains Position Attribute, which is a 3-dimensional vector.
Body Header | |||
---|---|---|---|
01 | 02 | 03 | 04 |
Signature | Version | ||
Header Size | |||
Point Count | |||
Point Offset | |||
Point Stride | |||
Measurement Accuracy | |||
Mean Distance | |||
Touch Radius | |||
Seed Index | |||
Find Type | Rad. Exp. | Lat. Ext. | Option Flags |
Point Attributes Array | |||||
---|---|---|---|---|---|
01 | 02 | … | … | … | Point Stride |
Point Attributes[0] | |||||
Point Attributes[1] | |||||
Point Attributes[2] | |||||
… | |||||
Point Attributes[Point Count - 1] |
uint8_t[2]
[0] = 'F'; [1] = 'S'
uint8_t[2]
[0] = major, [1] = minor
uint32_t
uint32_t
uint32_t
A byte offset of the first position component of the first Point Attributes in the array.
**Please refer to Example 2 below.
uint32_t
**Please refer the examples below for the details.
float (IEEE754 Single)
float (IEEE754 Single)
float (IEEE754 Single)
uint32_t
uint8_t
uint8_t
0 1 ----- 5 ----- 10
off moderate default
(recommanded) radical expansion
uint8_t
0 1 ----- 5 ----- 10
off moderate default
(recommanded) radical extension
uint8_t
Additional options specified in a combination of the following constants with or( | ) operator:
0x01
- Set this flag if you want to get inlier and outlier flags on a response body. 0x02
- Set this flag if position attribute of Point Attributes in a request body uses double precision floating point numbers.
or 0x00
for not to use any option.
Suppose we have Point Attributes array of which each attribute contains position attribute (single precision) only. Such Point Attributes can be defined as C-like style code below:
typedef struct{ float x, y, z; } PointAttributes;
And also we have following conditions:
Offset | Size | Hex value | Value | Description |
---|---|---|---|---|
Header | ||||
0x00 | 2 | 46 53 |
"FS" | Signature field |
0x02 | 2 | 01 00 |
1.0 | Version |
0x04 | 4 | 28 00 00 00 |
40 bytes | Size of this header |
0x08 | 4 | 64 00 00 00 |
100 points | The number of points |
0x0C | 4 | 00 00 00 00 |
0 byte offset | Byte offset of first position attribute component. For most of the cases this value is 0. |
0x10 | 4 | 0C 00 00 00 |
12 byte | Byte size per Point Attributes in the array. or you may set the value to 0 with this example 1. |
0x14 | 4 | A6 9B 44 3B |
0.003 | Measurement Accuracy (error) |
0x18 | 4 | CD CC 4C 3D |
0.05 | Mean Distance |
0x1C | 4 | CD CC 4C 3E |
0.2 | Touch Radius |
0x20 | 4 | 1F 00 00 00 |
31 (32nd) | Seed Index |
0x24 | 1 | 00 |
Unused | Currently not used. |
0x25 | 1 | 05 |
Level 5 (default) | Radial Expansion |
0x26 | 1 | 05 |
Level 5 (default) | Lateral Extension |
0x27 | 1 | 00 |
No options | Option Flags |
Point Attributes Array | ||||
0x28 | 1200 | Total Bytes = Point Count * Point Stride |
Suppose we have Point Attributes such as below (C-like style code):
typedef struct {
uint32_t uniqueId;
double x, y, z;
uint32_t color;
} PointAttributes;
And also we have following conditions:
Offset | Size | Hex value | Value | Description |
---|---|---|---|---|
Header | ||||
0x00 | 2 | 46 53 |
"FS" | Signature field |
0x02 | 2 | 01 00 |
1.0 | Version |
0x04 | 4 | 28 00 00 00 |
40 bytes | Size of this header |
0x08 | 4 | 64 00 00 00 |
100 points | The number of points |
0x0C | 4 | 04 00 00 00 |
4 byte offset | Byte offset of first position attribute component. |
0x10 | 4 | 20 00 00 00 |
32 byte | Byte size per Point Attributes in the array. |
0x14 | 4 | A6 9B 44 3B |
0.003 | Measurement Accuracy (error) |
0x18 | 4 | CD CC 4C 3D |
0.05 | Mean Distance |
0x1C | 4 | CD CC 4C 3E |
0.2 | Touch Raidus |
0x20 | 4 | 1F 00 00 00 |
31 (32nd) | Seed Index |
0x24 | 1 | 00 |
Unused | Currently not used. |
0x25 | 1 | 05 |
Level 5 (default) | Radial Expansion |
0x26 | 1 | 05 |
Level 5 (default) | Lateral Extension |
0x27 | 1 | 02 |
Use double precision | Option Flags |
Point Attributes Array | ||||
0x28 | 3200 | Total Bytes = Point Count * Point Stride |