3#include <wmtk/io/ComponentIO.hpp>
5#include <wmtk/Types.hpp>
10namespace wmtk::components::simwild {
44 const std::vector<std::string>& input_paths,
45 const std::vector<Matrix3d>& input_transform = {},
46 const double tol_rel = -1,
47 const double tol_abs = -1,
58 simplify_curves(
const double eps,
const bool use_exact_envelope,
const int num_threads = 0);
75 const MatrixXd& V_emb()
const {
return m_V_emb; }
76 const MatrixXr& V_emb_r()
const {
return m_V_emb_r; }
77 const MatrixXi& F_emb()
const {
return m_F_emb; }
78 const MatrixSi& F_tags()
const {
return m_F_tags; }
81 const MatrixXi& E_curves()
const {
return m_E_curves; }
85 std::pair<Vector2d, Vector2d> bbox_curves_minmax()
const;
87 void write_curves_obj(
const std::string& filename)
const;
89 int m_num_threads = 0;
121 std::vector<MatrixXi> m_Es;
135 MatrixXi m_E_constrained;
Turn a set of 2D curve networks into one tagged triangle mesh.
Definition EmbedCurves.hpp:36
MatrixXd m_V_curves
The union, which is what gets simplified and arranged.
Definition EmbedCurves.hpp:124
void consolidate()
Remove vertices not referenced by any output face.
Definition EmbedCurves.cpp:383
bool embed_curves(const bool tag_from_winding_number=true)
Compute the exact arrangement of the (simplified) curve union.
Definition EmbedCurves.cpp:144
std::vector< size_t > m_E_input
Definition EmbedCurves.hpp:128
std::vector< MatrixXd > m_Vs
Per input, as read: kept separate because the winding number is per input.
Definition EmbedCurves.hpp:120
void simplify_curves(const double eps, const bool use_exact_envelope, const int num_threads=0)
Simplify the input curves while staying within the eps envelope.
Definition EmbedCurves.cpp:105
void tag_from_winding_number()
One binary tag column per input, set where that input's winding number at a face barycenter exceeds 0...
Definition EmbedCurves.cpp:345
std::vector< std::vector< size_t > > m_E_constrained_inputs
Per row of m_E_constrained: which inputs tile it. Only filled for tag_from_provenance.
Definition EmbedCurves.hpp:130
const MatrixXi & E_constrained() const
The constrained edges of the arrangement, i.e. the output edges tiling the input.
Definition EmbedCurves.hpp:83
void tag_from_provenance()
Decide the face tags from the arrangement's segment provenance.
Definition EmbedCurves.cpp:210
const MatrixXd & V_curves() const
The simplified input curves – what the envelope is built from.
Definition EmbedCurves.hpp:80
Definition ComponentIO.hpp:15