6#include "reusex/types.hpp"
9#include <pcl/PolygonMesh.h>
11#include <nlohmann/json.hpp>
44 double x = 0,
y = 0,
z = 0;
93 speckle_type =
"Speckle.Core.Models.Instances.InstanceDefinitionProxy";
101 std::array<double, 16>
transform{1, 0, 0, 0, 0, 1, 0, 0,
102 0, 0, 1, 0, 0, 0, 0, 1};
107 speckle_type =
"Speckle.Core.Models.Instances.InstanceProxy";
129 std::vector<std::shared_ptr<InstanceDefinitionProxy>>
133 speckle_type =
"Speckle.Core.Models.Collections.Collection";
147 std::string token =
"");
155 std::string
commit(
const std::string &object_id,
156 const std::string &branch =
"main",
157 const std::string &message =
"ReUseX upload");
161 std::string
upload(
const Base &root,
const std::string &branch =
"main",
162 const std::string &message =
"ReUseX upload");
169 void ensure_branch(
const std::string &branch);
171 std::string server_url_;
172 std::string project_id_;
174 std::size_t max_batch_bytes_ = 25 * 1024 * 1024;
207 -> std::vector<SpeckleModel>;
SpeckleClient(std::string server_url, std::string project_id, std::string token="")
Construct a client.
std::string send(const Base &root)
Send a root object and all its children to the server.
std::string commit(const std::string &object_id, const std::string &branch="main", const std::string &message="ReUseX upload")
Create a commit/version pointing to a root object hash.
std::string upload(const Base &root, const std::string &branch="main", const std::string &message="ReUseX upload")
Convenience: send + commit in one call.
void set_max_batch_size(std::size_t bytes)
Max HTTP batch payload size in bytes (default: 25 MB).
auto export_to_speckle(const ExportScene &scene, const ExportConfig &cfg) -> std::vector< SpeckleModel >
Build per-model Speckle objects from an ExportScene.
Pointcloud to_speckle(CloudConstPtr cloud)
Convert a PCL point cloud to a Speckle Pointcloud.
typename Cloud::ConstPtr CloudConstPtr
Intermediate representation for exporting all project data.
Base class for all Speckle objects.
std::vector< std::shared_ptr< Base > > elements
Child objects (serialized as detached @elements).
std::string applicationId
std::map< std::string, nlohmann::json > properties
Custom properties — serialized nested under a "properties" sub-path (Speckle v3 DataObject convention...
int version
Speckle SDK version marker.
std::vector< std::shared_ptr< InstanceDefinitionProxy > > instanceDefinitionProxies
std::string collectionType
bool embed_elements
When true, child elements are serialized inline (under the key elements, no @ prefix) instead of as d...
Configuration for building Speckle objects from an ExportScene.
std::string image_url_base
std::string definitionAppId
std::vector< std::string > objects
InstanceDefinitionProxy()
std::array< double, 16 > transform
std::vector< double > vertices
Flat [x,y,z,x,y,z,...].
std::vector< int > faces
Packed [n, i0, i1, ..., n, i0, i1, ...].
std::vector< int > colors
ARGB integers.
Point(double x, double y, double z)
std::vector< double > sizes
Per-point sizes.
std::vector< int > colors
ARGB integers.
std::vector< double > points
Flat [x,y,z,x,y,z,...].
One model (branch) to upload to Speckle.
std::string model_name
branch name (e.g., "cloud", "semantic")
std::shared_ptr< Base > root
root object for this model's version