Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
priv::IntersectionSources Struct Reference

Corefine visitor Store intersection source for vertices of constrained edge of tm1 Must be used with corefine flag no modification of tm2. More...

+ Collaboration diagram for priv::IntersectionSources:

Public Member Functions

void intersection_point_detected (std::size_t i_id, int sdim, HI h_f, HI h_e, const CutMesh &tm_f, const CutMesh &tm_e, bool is_target_coplanar, bool is_source_coplanar)
 
void new_vertex_added (std::size_t i_id, VI v, const CutMesh &tm)
 Store VI to intersections by i_id.
 
void before_subface_creations (FI, CutMesh &)
 
void after_subface_created (FI, CutMesh &)
 
void after_subface_creations (CutMesh &)
 
void before_subface_created (CutMesh &)
 
void before_edge_split (HI, CutMesh &)
 
void edge_split (HI, CutMesh &)
 
void after_edge_split ()
 
void add_retriangulation_edge (HI, CutMesh &)
 

Public Attributes

const CutMeshpatch
 
const CutMeshmodel
 
VertexSourceMap vmap
 
Sourcessources
 

Detailed Description

Corefine visitor Store intersection source for vertices of constrained edge of tm1 Must be used with corefine flag no modification of tm2.

Member Function Documentation

◆ add_retriangulation_edge()

void priv::IntersectionSources::add_retriangulation_edge ( HI  ,
CutMesh  
)
inline
2389{}

◆ after_edge_split()

void priv::IntersectionSources::after_edge_split ( )
inline
2388{}

◆ after_subface_created()

void priv::IntersectionSources::after_subface_created ( FI  ,
CutMesh  
)
inline
2383{}

◆ after_subface_creations()

void priv::IntersectionSources::after_subface_creations ( CutMesh )
inline
2384{}

◆ before_edge_split()

void priv::IntersectionSources::before_edge_split ( HI  ,
CutMesh  
)
inline
2386{}

◆ before_subface_created()

void priv::IntersectionSources::before_subface_created ( CutMesh )
inline
2385{}

◆ before_subface_creations()

void priv::IntersectionSources::before_subface_creations ( FI  ,
CutMesh  
)
inline
2382{}

◆ edge_split()

void priv::IntersectionSources::edge_split ( HI  ,
CutMesh  
)
inline
2387{}

◆ intersection_point_detected()

void priv::IntersectionSources::intersection_point_detected ( std::size_t  i_id,
int  sdim,
HI  h_f,
HI  h_e,
const CutMesh tm_f,
const CutMesh tm_e,
bool  is_target_coplanar,
bool  is_source_coplanar 
)
inline
2328 {
2329 Source source;
2330 if (&tm_e == model) {
2331 source = {h_e, sdim};
2332 // check other CGAL model that is patch
2333 assert(&tm_f == patch);
2334 if (is_target_coplanar) {
2335 assert(sdim == 0);
2336 vmap[tm_f.source(h_f)] = source;
2337 }
2338 if (is_source_coplanar) {
2339 assert(sdim == 0);
2340 vmap[tm_f.target(h_f)] = source;
2341 }
2342
2343 // clear source to be able check that this intersection source is
2344 // not used any more
2345 if (is_source_coplanar || is_target_coplanar) source = {};
2346 } else {
2347 source = {h_f, sdim};
2348 assert(&tm_f == model && &tm_e == patch);
2349 assert(!is_target_coplanar);
2350 assert(!is_source_coplanar);
2351 // if (is_target_coplanar) vmap[tm_e.source(h_e)] = source;
2352 // if (is_source_coplanar) vmap[tm_e.target(h_e)] = source;
2353 // if (sdim == 0)
2354 // vmap[tm_e.target(h_e)] = source;
2355 }
2356
2357 // By documentation i_id is consecutive.
2358 // check id goes in a row, without skips
2359 assert(sources->size() == i_id);
2360 // add source of intersection
2361 sources->push_back(source);
2362 }
Sources * sources
Definition CutSurface.cpp:2317
const CutMesh * patch
Definition CutSurface.cpp:2310
const CutMesh * model
Definition CutSurface.cpp:2311
VertexSourceMap vmap
Definition CutSurface.cpp:2313

References model, patch, sources, and vmap.

◆ new_vertex_added()

void priv::IntersectionSources::new_vertex_added ( std::size_t  i_id,
VI  v,
const CutMesh tm 
)
inline

Store VI to intersections by i_id.

Parameters
i_idOrder number of intersection point
vNew added vertex
tmAffected mesh
2371 {
2372 // check that it is first insertation into item of vmap
2373 assert(!vmap[v].hi.is_valid());
2374 // check valid addresing into sources
2375 assert(i_id < sources->size());
2376 // check that source has value
2377 assert(sources->at(i_id).hi.is_valid());
2378 vmap[v] = sources->at(i_id);
2379 }
constexpr auto size(const C &c) -> decltype(c.size())
Definition span.hpp:183

References sources, and vmap.

Member Data Documentation

◆ model

const CutMesh* priv::IntersectionSources::model

◆ patch

const CutMesh* priv::IntersectionSources::patch

◆ sources

Sources* priv::IntersectionSources::sources

◆ vmap

VertexSourceMap priv::IntersectionSources::vmap

The documentation for this struct was generated from the following file: