syntax = "proto3"; message Anchor { int32 id = 1; string name = 2; string attributes = 3; int32 parentAnchorId = 4; repeated Anchor children = 5; AnchorType type = 6; oneof subtype { TransformationAnchor transformationAnchor = 10; BIMObject bIMObject = 20; } } enum AnchorActionType { Select = 0; } enum AnchorType { Base = 0; Transformation = 1; ViewportTransformation = 2; Object = 3; CuboidObject = 4; ExtrudeObject = 5; RectangleHoleType = 6; RoundHoleType = 7; SlottedHoleType = 8; OvalHoleType = 9; RoundCornerType = 10; ChamferCornerType = 11; SharpCornerType = 12; TubeObject = 13; } message ArcCurve { Vector2Model centerPoint = 1; LengthUnitModel radius = 2; double startAngle = 3; double endAngle = 4; bool clockwise = 5; } message BIMModel { Anchor initialAnchor = 1; repeated int32 defaultViewports = 2 [packed = false]; } message BIMObject { repeated Anchor customAnchors = 1; repeated Anchor holes = 2; repeated Anchor corners = 3; repeated int32 viewports = 4 [packed = false]; bool useCustomViewports = 5; oneof subtype { ExtrudeBIMObject extrudeBIMObject = 10; CuboidBIMObject cuboidBIMObject = 20; RectangleHole rectangleHole = 30; RoundHole roundHole = 40; OvalHole ovalHole = 50; SlottedHole slottedHole = 60; SharpCorner sharpCorner = 70; RoundCorner roundCorner = 80; ChamferCorner chamferCorner = 90; TubeBIMObject tubeBIMObject = 100; } } message ChamferCorner { LengthUnitModel width = 1; LengthUnitModel height = 2; } message CuboidBIMObject { LengthUnitModel width = 1; LengthUnitModel height = 2; LengthUnitModel depth = 3; } message Curve { oneof subtype { ArcCurve arcCurve = 101; EllipseCurve ellipseCurve = 102; LineCurve lineCurve = 103; QuadraticCurve quadraticCurve = 104; } } message EllipseCurve { Vector2Model centerPoint = 1; LengthUnitModel radiusX = 2; LengthUnitModel radiusY = 3; LengthUnitModel rotation = 4; double startAngle = 5; double endAngle = 6; bool clockwise = 7; } message ExtrudeBIMObject { repeated Shape shapes = 1; LengthUnitModel depth = 2; } message LengthUnitModel { double value = 1; LengthUnitType type = 2; } enum LengthUnitType { Meter = 0; Decimeter = 1; Centimeter = 2; Millimeter = 3; Inch = 4; Foot = 5; Yard = 6; } message LineCurve { Vector2Model startPoint = 1; Vector2Model endPoint = 2; } message MatrixModel { VectorModel baseX = 1; VectorModel baseY = 2; VectorModel baseZ = 3; VectorModel origin = 4; } message OvalHole { LengthUnitModel radiusX = 1; LengthUnitModel radiusY = 2; float angle = 3; repeated Shape shapes = 4; } message QuadraticCurve { Vector2Model startPoint = 1; Vector2Model controlPoint = 2; Vector2Model endPoint = 3; } message RectangleHole { LengthUnitModel width = 1; LengthUnitModel height = 2; repeated Shape shapes = 3; } message RoundCorner { LengthUnitModel radius = 1; } message RoundHole { LengthUnitModel radius = 1; repeated Shape shapes = 2; } message Shape { repeated Curve curves = 1; int32 id = 2; } message SharpCorner { } message SlottedHole { LengthUnitModel width = 1; LengthUnitModel height = 2; repeated Shape shapes = 3; } message TransformationAnchor { MatrixModel transformation = 1; oneof subtype { ViewportActionTransformationAnchor viewportActionTransformationAnchor = 10; } } message TubeBIMObject { double scale = 1; LengthUnitModel radius = 2; uint32 radialSegments = 3; uint32 tubularSegments = 4; string pathX = 5; string pathY = 6; string pathZ = 7; } message Vector2Model { LengthUnitModel x = 3; LengthUnitModel y = 4; reserved 1 to 2; /* Used to be X, Y but double */ } message VectorModel { LengthUnitModel x = 4; LengthUnitModel y = 5; LengthUnitModel z = 6; reserved 1 to 3; /* Used to be X, Y, Z but double */ } message ViewportActionTransformationAnchor { int32 viewport = 1; AnchorActionType actionType = 2; }