ReUseX
0.0.5
3D Point Cloud Processing for Building Reuse
Toggle main menu visibility
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
14
namespace
reusex::geometry
{
15
19
struct
MeshOptions
{
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;
27
IndicesConstPtr
filter
=
nullptr
;
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
48
SolverChoice
solver
=
SolverChoice::automatic
;
49
};
50
63
pcl::PolygonMeshPtr
mesh
(
CloudConstPtr
cloud,
CloudNConstPtr
normals,
64
EigenVectorContainer<double, 4>
&planes,
65
EigenVectorContainer<double, 3>
¢roids,
66
std::vector<IndicesPtr> &inliers,
CloudLConstPtr
rooms,
67
MeshOptions
const
opt =
MeshOptions
{});
68
}
// namespace reusex::geometry
reusex::geometry
Definition
visual_observer.hpp:33
reusex::geometry::SolverChoice
SolverChoice
Which MIP backend the Solidifier should use for each (sub)problem.
Definition
Solidifier.hpp:48
reusex::geometry::SolverChoice::automatic
@ automatic
Definition
Solidifier.hpp:48
reusex::geometry::mesh
pcl::PolygonMeshPtr mesh(CloudConstPtr cloud, CloudNConstPtr normals, EigenVectorContainer< double, 4 > &planes, EigenVectorContainer< double, 3 > ¢roids, std::vector< IndicesPtr > &inliers, CloudLConstPtr rooms, MeshOptions const opt=MeshOptions{})
Generate a mesh from point cloud and geometric primitives.
reusex::IndicesConstPtr
pcl::IndicesConstPtr IndicesConstPtr
Definition
point_types.hpp:25
reusex::CloudLConstPtr
typename CloudL::ConstPtr CloudLConstPtr
Definition
point_types.hpp:37
reusex::CloudConstPtr
typename Cloud::ConstPtr CloudConstPtr
Definition
point_types.hpp:29
reusex::EigenVectorContainer
std::vector< Eigen::Matrix< Scalar, Rows, 1 >, Eigen::aligned_allocator< Eigen::Matrix< Scalar, Rows, 1 > > > EigenVectorContainer
Definition
eigen_types.hpp:20
reusex::CloudNConstPtr
typename CloudN::ConstPtr CloudNConstPtr
Definition
point_types.hpp:33
reusex::geometry::MeshOptions
Options for mesh generation.
Definition
mesh.hpp:19
reusex::geometry::MeshOptions::search_threshold
float search_threshold
Search threshold for mesh generation.
Definition
mesh.hpp:25
reusex::geometry::MeshOptions::max_cells
size_t max_cells
Maximum cells the cell complex may generate before failing fast (#213).
Definition
mesh.hpp:37
reusex::geometry::MeshOptions::alpha
double alpha
Objective wall-weight passed to the Solidifier (was hardcoded, #212).
Definition
mesh.hpp:34
reusex::geometry::MeshOptions::filter
IndicesConstPtr filter
Optional filter to limit processing.
Definition
mesh.hpp:27
reusex::geometry::MeshOptions::solver
SolverChoice solver
MIP backend + fallback policy: auto (primary with HiGHS fallback), cuopt, or highs (issue #226).
Definition
mesh.hpp:48
reusex::geometry::MeshOptions::sectioned
bool sectioned
Solve the MIP per horizontal section when the arrangement is multi-storey and large enough,...
Definition
mesh.hpp:41
reusex::geometry::MeshOptions::time_limit_seconds
double time_limit_seconds
MIP solver wall-clock time limit in seconds (issue #212).
Definition
mesh.hpp:31
reusex::geometry::MeshOptions::sectioned_threshold
size_t sectioned_threshold
Cell-count threshold above which the sectioned solve engages (issue #226).
Definition
mesh.hpp:44
reusex::geometry::MeshOptions::new_plane_offset
float new_plane_offset
Offset for new plane creation.
Definition
mesh.hpp:26
libs
reusex
include
reconstruction
mesh.hpp
Generated by
1.17.0