Protocol Documentation
Table of Contents
Top
compas_pb/generated/datastructures.proto
AttributeColumn
A single vertex attribute stored column-wise across vertices.
If indices is empty the column is dense: one value per vertex, in vertex order.
Otherwise indices[k] is the vertex index carrying the k-th value (sparse).
Exactly one of the typed arrays / values is populated, selected by kind.
| Field |
Type |
Label |
Description |
| name |
string |
|
|
| indices |
uint32 |
repeated |
|
| kind |
uint32 |
|
0 = double, 1 = int, 2 = bool, 3 = generic AnyData |
| doubles |
double |
repeated |
|
| ints |
sint64 |
repeated |
|
| bools |
bool |
repeated |
|
| values |
AnyData |
repeated |
mixed / non-numeric columns |
FaceData
| Field |
Type |
Label |
Description |
| vertex_indices |
int32 |
repeated |
indices into the vertices array |
GraphData
GraphData.AttributesEntry
GraphData.DefaultEdgeAttributesEntry
GraphData.DefaultNodeAttributesEntry
MeshData
MeshData.AttributesEntry
MeshData.DefaultEdgeAttributesEntry
MeshData.DefaultFaceAttributesEntry
MeshData.DefaultVertexAttributesEntry
PolyhedronData
| Field |
Type |
Label |
Description |
| guid |
string |
optional |
|
| name |
string |
optional |
|
| vertices |
double |
repeated |
flat x,y,z triplets |
| faces |
FaceData |
repeated |
|
Top
compas_pb/generated/geometry.proto
ArcData
BezierData
| Field |
Type |
Label |
Description |
| guid |
string |
|
|
| name |
string |
|
|
| points |
double |
repeated |
flat x,y,z triplets // control points |
| degree |
int32 |
|
|
BoxData
CapsuleData
CircleData
ConeData
CylinderData
EllipseData
FrameData
HyperbolaData
LineData
ParabolaData
PlaneData
PointData
PointcloudData
| Field |
Type |
Label |
Description |
| guid |
string |
|
|
| name |
string |
|
|
| points |
double |
repeated |
flat x,y,z triplets |
PolygonData
| Field |
Type |
Label |
Description |
| guid |
string |
|
|
| name |
string |
|
|
| points |
double |
repeated |
flat x,y,z triplets |
PolylineData
| Field |
Type |
Label |
Description |
| guid |
string |
|
|
| name |
string |
|
|
| points |
double |
repeated |
flat x,y,z triplets |
ProjectionData
| Field |
Type |
Label |
Description |
| guid |
string |
|
|
| name |
string |
|
|
| matrix |
double |
repeated |
4x4 matrix stored as flat array of 16 floats |
QuaternionData
ReflectionData
| Field |
Type |
Label |
Description |
| guid |
string |
|
|
| name |
string |
|
|
| matrix |
double |
repeated |
4x4 matrix stored as flat array of 16 floats |
RotationData
| Field |
Type |
Label |
Description |
| guid |
string |
|
|
| name |
string |
|
|
| matrix |
double |
repeated |
4x4 matrix stored as flat array of 16 doubles (exact round-trip) |
ScaleData
| Field |
Type |
Label |
Description |
| guid |
string |
|
|
| name |
string |
|
|
| matrix |
double |
repeated |
4x4 matrix stored as flat array of 16 floats |
ShearData
| Field |
Type |
Label |
Description |
| guid |
string |
|
|
| name |
string |
|
|
| matrix |
double |
repeated |
4x4 matrix stored as flat array of 16 floats |
SphereData
TorusData
| Field |
Type |
Label |
Description |
| guid |
string |
|
|
| name |
string |
|
|
| matrix |
double |
repeated |
4x4 matrix stored as flat array of 16 floats |
TranslationData
VectorData
Top
compas_pb/generated/message.proto
AnyData
arbitrary container to hold message data and default data
| Field |
Type |
Label |
Description |
| message |
google.protobuf.Any |
|
|
| value |
google.protobuf.Value |
|
null / bool / str / bytes |
| fallback |
FallbackData |
|
|
| int_value |
int64 |
|
explicit int so it is not coerced from a float |
| double_value |
double |
|
explicit float so an integral value stays a float |
| dict_value |
DictData |
|
plain dict without the google.protobuf.Any type_url overhead |
| list_value |
ListData |
|
plain list without the google.protobuf.Any type_url overhead |
DictData
repeated serves as a dict in protobuf
DictData.ItemsEntry
FallbackData
| Field |
Type |
Label |
Description |
| data |
DictData |
|
|
ListData
repeated serves as a list in protobuf
| Field |
Type |
Label |
Description |
| items |
AnyData |
repeated |
|
MessageData
root serialization element
| Field |
Type |
Label |
Description |
| data |
AnyData |
|
|
| version |
string |
optional |
|
Scalar Value Types
| .proto Type |
Notes |
C++ |
Java |
Python |
Go |
C# |
PHP |
Ruby |
| double |
|
double |
double |
float |
float64 |
double |
float |
Float |
| float |
|
float |
float |
float |
float32 |
float |
float |
Float |
| int32 |
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. |
int32 |
int |
int |
int32 |
int |
integer |
Bignum or Fixnum (as required) |
| int64 |
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. |
int64 |
long |
int/long |
int64 |
long |
integer/string |
Bignum |
| uint32 |
Uses variable-length encoding. |
uint32 |
int |
int/long |
uint32 |
uint |
integer |
Bignum or Fixnum (as required) |
| uint64 |
Uses variable-length encoding. |
uint64 |
long |
int/long |
uint64 |
ulong |
integer/string |
Bignum or Fixnum (as required) |
| sint32 |
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. |
int32 |
int |
int |
int32 |
int |
integer |
Bignum or Fixnum (as required) |
| sint64 |
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. |
int64 |
long |
int/long |
int64 |
long |
integer/string |
Bignum |
| fixed32 |
Always four bytes. More efficient than uint32 if values are often greater than 2^28. |
uint32 |
int |
int |
uint32 |
uint |
integer |
Bignum or Fixnum (as required) |
| fixed64 |
Always eight bytes. More efficient than uint64 if values are often greater than 2^56. |
uint64 |
long |
int/long |
uint64 |
ulong |
integer/string |
Bignum |
| sfixed32 |
Always four bytes. |
int32 |
int |
int |
int32 |
int |
integer |
Bignum or Fixnum (as required) |
| sfixed64 |
Always eight bytes. |
int64 |
long |
int/long |
int64 |
long |
integer/string |
Bignum |
| bool |
|
bool |
boolean |
boolean |
bool |
bool |
boolean |
TrueClass/FalseClass |
| string |
A string must always contain UTF-8 encoded or 7-bit ASCII text. |
string |
String |
str/unicode |
string |
string |
string |
String (UTF-8) |
| bytes |
May contain any arbitrary sequence of bytes. |
string |
ByteString |
str |
[]byte |
ByteString |
string |
String (ASCII-8BIT) |