ReUseX  0.0.5
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
mesh.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2025 Povl Filip Sonne-Frederiksen
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#pragma once
6#include "reusex/reconstruction/Solidifier.hpp"
7#include "reusex/types.hpp"
8
9#include <pcl/PolygonMesh.h>
10#include <pcl/common/common.h>
11
12#include <memory>
13
14namespace reusex::geometry {
15
20 // Defaults reconciled with the CLI in issue #217. The `rux create mesh` CLI
21 // shipped with the tuned production values 0.60 / 0.25 (its footer examples
22 // and workflow assume them); the old library defaults 10.0 / 0.05 were never
23 // exercised through the CLI. Per docs/STANDARDS.md ยง4 the library is the
24 // single source of truth, so the better CLI values were promoted here.
25 float search_threshold = 0.60f;
26 float new_plane_offset = 0.25f;
28
31 double time_limit_seconds = 120.0;
32
34 double alpha = 0.04;
35
37 size_t max_cells = 5000;
38
41 bool sectioned = true;
42
44 size_t sectioned_threshold = 2000;
45
49};
50
63pcl::PolygonMeshPtr mesh(CloudConstPtr cloud, CloudNConstPtr normals,
66 std::vector<IndicesPtr> &inliers, CloudLConstPtr rooms,
67 MeshOptions const opt = MeshOptions{});
68} // namespace reusex::geometry
SolverChoice
Which MIP backend the Solidifier should use for each (sub)problem.
pcl::PolygonMeshPtr mesh(CloudConstPtr cloud, CloudNConstPtr normals, EigenVectorContainer< double, 4 > &planes, EigenVectorContainer< double, 3 > &centroids, std::vector< IndicesPtr > &inliers, CloudLConstPtr rooms, MeshOptions const opt=MeshOptions{})
Generate a mesh from point cloud and geometric primitives.
pcl::IndicesConstPtr IndicesConstPtr
typename CloudL::ConstPtr CloudLConstPtr
typename Cloud::ConstPtr CloudConstPtr
std::vector< Eigen::Matrix< Scalar, Rows, 1 >, Eigen::aligned_allocator< Eigen::Matrix< Scalar, Rows, 1 > > > EigenVectorContainer
typename CloudN::ConstPtr CloudNConstPtr
Options for mesh generation.
Definition mesh.hpp:19
float search_threshold
Search threshold for mesh generation.
Definition mesh.hpp:25
size_t max_cells
Maximum cells the cell complex may generate before failing fast (#213).
Definition mesh.hpp:37
double alpha
Objective wall-weight passed to the Solidifier (was hardcoded, #212).
Definition mesh.hpp:34
IndicesConstPtr filter
Optional filter to limit processing.
Definition mesh.hpp:27
SolverChoice solver
MIP backend + fallback policy: auto (primary with HiGHS fallback), cuopt, or highs (issue #226).
Definition mesh.hpp:48
bool sectioned
Solve the MIP per horizontal section when the arrangement is multi-storey and large enough,...
Definition mesh.hpp:41
double time_limit_seconds
MIP solver wall-clock time limit in seconds (issue #212).
Definition mesh.hpp:31
size_t sectioned_threshold
Cell-count threshold above which the sectioned solve engages (issue #226).
Definition mesh.hpp:44
float new_plane_offset
Offset for new plane creation.
Definition mesh.hpp:26