Skip to content

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¤

Field Type Label Description
guid string optional
name string optional
node_keys AnyData repeated node keys in order (arbitrary hashable)
node_attributes AttributeColumn repeated column-wise, including x/y/z coordinates
attributes GraphData.AttributesEntry repeated
default_node_attributes GraphData.DefaultNodeAttributesEntry repeated
default_edge_attributes GraphData.DefaultEdgeAttributesEntry repeated
edge_u uint32 repeated Edges as index pairs into node_keys, with edge attributes stored column-wise.
edge_v uint32 repeated
edge_attributes AttributeColumn repeated

GraphData.AttributesEntry¤

Field Type Label Description
key string
value AnyData

GraphData.DefaultEdgeAttributesEntry¤

Field Type Label Description
key string
value AnyData

GraphData.DefaultNodeAttributesEntry¤

Field Type Label Description
key string
value AnyData

MeshData¤

Field Type Label Description
guid string optional
name string optional
vertices double repeated flat coordinate array: 3 doubles (x, y, z) per vertex
face_vertices uint32 repeated Faces in CSR form: all face vertex indices concatenated, with face_sizes giving the vertex count of each face (so face i spans the next face_sizes[i] entries).
face_sizes uint32 repeated
attributes MeshData.AttributesEntry repeated
vertex_attribute_columns AttributeColumn repeated vertex attrs, column-wise (by vertex index)
face_attribute_columns AttributeColumn repeated face attrs, column-wise (by face index)
edge_attribute_columns AttributeColumn repeated edge attrs, column-wise (aligned to edge_keys)
edge_keys AnyData repeated keys of edges carrying attributes
default_vertex_attributes MeshData.DefaultVertexAttributesEntry repeated
default_face_attributes MeshData.DefaultFaceAttributesEntry repeated
default_edge_attributes MeshData.DefaultEdgeAttributesEntry repeated

MeshData.AttributesEntry¤

Field Type Label Description
key string
value AnyData

MeshData.DefaultEdgeAttributesEntry¤

Field Type Label Description
key string
value AnyData

MeshData.DefaultFaceAttributesEntry¤

Field Type Label Description
key string
value AnyData

MeshData.DefaultVertexAttributesEntry¤

Field Type Label Description
key string
value AnyData

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¤

Field Type Label Description
guid string
name string
circle CircleData
start_angle double
end_angle double

BezierData¤

Field Type Label Description
guid string
name string
points double repeated flat x,y,z triplets // control points
degree int32

BoxData¤

Field Type Label Description
guid string
name string
frame FrameData
xsize double
ysize double
zsize double

CapsuleData¤

Field Type Label Description
guid string
name string
radius double
height double
frame FrameData

CircleData¤

Field Type Label Description
guid string
name string
radius double
frame FrameData

ConeData¤

Field Type Label Description
guid string
name string
radius double
height double
frame FrameData

CylinderData¤

Field Type Label Description
guid string
name string
radius double
height double
frame FrameData

EllipseData¤

Field Type Label Description
guid string
name string
major double
minor double
frame FrameData

FrameData¤

Field Type Label Description
guid string
name string
point PointData
xaxis VectorData
yaxis VectorData

HyperbolaData¤

Field Type Label Description
guid string
name string
major double
minor double
frame FrameData

LineData¤

Field Type Label Description
guid string
name string
start PointData
end PointData

ParabolaData¤

Field Type Label Description
guid string
name string
focal double
frame FrameData

PlaneData¤

Field Type Label Description
guid string
name string
point PointData
normal VectorData

PointData¤

Field Type Label Description
guid string no inheritance, so Data will have to repeat but apparently
name string
x double
y double
z double

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¤

Field Type Label Description
guid string
name string
w double
x double
y double
z double

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¤

Field Type Label Description
guid string
name string
radius double
frame FrameData

TorusData¤

Field Type Label Description
guid string
name string
radius_axis double
radius_pipe double
frame FrameData

TransformationData¤

Field Type Label Description
guid string
name string
matrix double repeated 4x4 matrix stored as flat array of 16 floats

TranslationData¤

Field Type Label Description
guid string
name string
translation_vector VectorData

VectorData¤

Field Type Label Description
guid string
name string
x double
y double
z double

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

Field Type Label Description
items DictData.ItemsEntry repeated

DictData.ItemsEntry¤

Field Type Label Description
key string
value AnyData

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)