3#include <wmtk/Types.hpp>
8namespace wmtk::components::simwild {
42 const std::vector<std::string>& input_paths,
43 const std::vector<Matrix3d>& input_transform = {},
44 const double tol_rel = -1,
45 const double tol_abs = -1);
55 simplify_curves(
const double eps,
const bool use_exact_envelope,
const int num_threads = 0);
72 const MatrixXd& V_emb()
const {
return m_V_emb; }
73 const MatrixXr& V_emb_r()
const {
return m_V_emb_r; }
74 const MatrixXi& F_emb()
const {
return m_F_emb; }
75 const MatrixSi& F_tags()
const {
return m_F_tags; }
78 const MatrixXi& E_curves()
const {
return m_E_curves; }
82 std::pair<Vector2d, Vector2d> bbox_curves_minmax()
const;
84 void write_curves_obj(
const std::string& filename)
const;
86 int m_num_threads = 0;
118 std::vector<MatrixXi> m_Es;
132 MatrixXi m_E_constrained;
Turn a set of 2D curve networks into one tagged triangle mesh.
Definition EmbedCurves.hpp:34
MatrixXd m_V_curves
The union, which is what gets simplified and arranged.
Definition EmbedCurves.hpp:121
void consolidate()
Remove vertices not referenced by any output face.
Definition EmbedCurves.cpp:380
bool embed_curves(const bool tag_from_winding_number=true)
Compute the exact arrangement of the (simplified) curve union.
Definition EmbedCurves.cpp:136
std::vector< size_t > m_E_input
Definition EmbedCurves.hpp:125
std::vector< MatrixXd > m_Vs
Per input, as read: kept separate because the winding number is per input.
Definition EmbedCurves.hpp:117
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:97
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:337
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:127
const MatrixXi & E_constrained() const
The constrained edges of the arrangement, i.e. the output edges tiling the input.
Definition EmbedCurves.hpp:80
void tag_from_provenance()
Decide the face tags from the arrangement's segment provenance.
Definition EmbedCurves.cpp:202
const MatrixXd & V_curves() const
The simplified input curves – what the envelope is built from.
Definition EmbedCurves.hpp:77