6#include "reusex/types.hpp"
9#include <pcl/PolygonMesh.h>
11#include <nlohmann/json.hpp>
40 double x = 0,
y = 0,
z = 0;
95 std::string token =
"");
103 std::string
commit(
const std::string &object_id,
104 const std::string &branch =
"main",
105 const std::string &message =
"ReUseX upload");
109 std::string
upload(
const Base &root,
const std::string &branch =
"main",
110 const std::string &message =
"ReUseX upload");
117 void ensure_branch(
const std::string &branch);
119 std::string server_url_;
120 std::string project_id_;
122 std::size_t max_batch_bytes_ = 25 * 1024 * 1024;
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) -> 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
std::string collectionType
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