32 loop->m_edge_next = loop;
33 loop->m_edge_previous = loop;
38 loop->m_edge_next = m_head;
39 loop->m_edge_previous = m_head->m_edge_previous;
40 m_head->m_edge_previous->m_edge_next = loop;
41 m_head->m_edge_previous = loop;
50 loop->m_edge_next->m_edge_previous = loop->m_edge_previous;
51 loop->m_edge_previous->m_edge_next = loop->m_edge_next;
56 m_head = loop->m_edge_next;
71 ab->m_vertices[0] =
a;
72 ab->m_vertices[1] =
b;
75 a->m_edges.push_back(
ab);
76 b->m_edges.push_back(
ab);
90 edge->
vertices().front()->m_edges.remove(edge);
91 edge->
vertices().back()->m_edges.remove(edge);
107 if (!
a->edges().empty() && !
b->edges().empty() &&
a !=
b)
111 const std::size_t n = std::min<std::size_t>(
a->edges().size(),
b->edges().size());
112 for (std::size_t i = 0; i < n; ++i)
124 ea = ea->m_vertex_next[ea->
vertices()[1] ==
a];
125 eb = eb->m_vertex_next[eb->
vertices()[1] ==
b];
void erase(brep_edge *edge) override
Erases an edge and all dependent loops and faces.
void clear() noexcept
Erases all edges and their dependent loops and faces.
brep_edge * find(brep_vertex *a, brep_vertex *b) const
Finds an edge bounded by vertices a and b (in any order).
constexpr bool empty() const noexcept
Returns true if the list is empty, false otherwise.
void push_back(brep_loop *loop)
Appends a loop to the end of the list.
void remove(brep_loop *loop)
Removes an loop from the list.
brep_loop * back() const noexcept
Returns the last loop.
Curve segment bounded by two vertices.
constexpr const brep_edge_loop_list & loops() const noexcept
Returns the list of loops that share this edge.
constexpr const std::array< brep_vertex *, 2 > & vertices() const noexcept
Returns the pair of vertices that bound this edge.
constexpr std::size_t size() const noexcept
Returns the number of elements in the container.
virtual void erase(element_type *element)
Erases an element from the container.
constexpr bool empty() const noexcept
Returns true if the container is empty, false otherwise.
constexpr element_type * back() const noexcept
Returns the last element.
virtual element_type * emplace_back()
Appends a new element to the end of the container.
void erase(brep_face *face) override
Erases a face and all of its loops.
Connected boundary of a single face.
constexpr brep_face * face() const noexcept
Returns a pointer to the loop face.
const brep_face_container & faces() const noexcept
Returns the mesh faces.