ReUseX  0.0.1
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
Solidifier.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/geometry/CellComplex.hpp"
7
8#include <functional>
9#include <memory>
10#include <optional>
11#include <set>
12#include <unordered_map>
13#include <utility>
14
15namespace ReUseX::geometry {
16
24 public:
27
28 Solidifier() = delete;
29 explicit Solidifier(std::shared_ptr<const CellComplex> cc);
31
32 // Delete copy (contains unique_ptr to incomplete type)
33 Solidifier(const Solidifier &) = delete;
34 Solidifier &operator=(const Solidifier &) = delete;
35
36 // Delete move (simpler, could be implemented if needed)
37 Solidifier(Solidifier &&) = delete;
39
45 std::optional<std::pair<std::unordered_map<Cd, int>,
46 std::unordered_map<Cd, std::set<int>>>>
48
54 std::pair<Eigen::MatrixXd, Eigen::MatrixXi>
55 toMesh(std::function<bool(const Cd)> filter);
56
57 protected:
58 // Internal accessor for implementations in separate compilation units
59 std::shared_ptr<const CellComplex> get_cell_complex() const;
60
61 private:
62 class Impl;
63 std::unique_ptr<Impl> pimpl_;
64};
65
66} // namespace ReUseX::geometry
boost::graph_traits< Graph >::vertex_descriptor Vertex
std::pair< Eigen::MatrixXd, Eigen::MatrixXi > toMesh(std::function< bool(const Cd)> filter)
Convert solved cell complex to mesh.
Solidifier(std::shared_ptr< const CellComplex > cc)
Solidifier(const Solidifier &)=delete
std::shared_ptr< const CellComplex > get_cell_complex() const
Solidifier & operator=(Solidifier &&)=delete
std::optional< std::pair< std::unordered_map< Cd, int >, std::unordered_map< Cd, std::set< int > > > > solve()
Solve the MIP problem for room segmentation.
CellComplex::Vertex Fd
Solidifier & operator=(const Solidifier &)=delete
CellComplex::Vertex Cd
Solidifier(Solidifier &&)=delete