33 loop->m_face_next = loop;
34 loop->m_face_previous = loop;
39 loop->m_face_next = m_head;
40 loop->m_face_previous = m_head->m_face_previous;
41 m_head->m_face_previous->m_face_next = loop;
42 m_head->m_face_previous = loop;
50 loop->m_face_next = next;
51 loop->m_face_previous = next->m_face_previous;
52 next->m_face_previous->m_face_next = loop;
53 next->m_face_previous = loop;
61 loop->m_face_next->m_face_previous = loop->m_face_previous;
62 loop->m_face_previous->m_face_next = loop->m_face_next;
67 m_head = loop->m_face_next;
75 if (vertices.size() < 3)
81 std::vector<brep_edge*> edges(vertices.size());
82 std::size_t i = vertices.size() - 1;
83 for (std::size_t j = 0; j < vertices.size(); ++j)
96 face->m_index =
size() - 1;
99 for (std::size_t i = 0; i < vertices.size(); ++i)
103 loop->m_vertex = vertices[i];
104 loop->m_edge = edges[i];
123 loop->m_edge->m_loops.
remove(loop);
125 brep_loop* next_loop = loop->m_face_next;
151 loop->m_vertex = loop->edge()->vertices()[loop->edge()->vertices()[0] == loop->vertex()];
154 std::swap(loop->m_face_next, loop->m_face_previous);
brep_edge * emplace_back(brep_vertex *a, brep_vertex *b)
Appends a new edge to the end of the container.
brep_edge * find(brep_vertex *a, brep_vertex *b) const
Finds an edge bounded by vertices a and b (in any order).
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.
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 clear() noexcept
Erases all faces and their loops.
void erase(brep_face *face) override
Erases a face and all of its loops.
void reverse(brep_face *face)
Reverses the direction of a face's bounding loops.
brep_loop * front() const noexcept
Returns the first loop.
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 insert(brep_loop *next, brep_loop *loop)
Inserts a loop before a given loop.
void remove(brep_loop *loop)
Removes an loop from the list.
Portion of a shell bounded by loops.
constexpr const brep_face_loop_list & loops() const noexcept
Returns the list of loops associated with this face.
Connected boundary of a single face.
const brep_edge_container & edges() const noexcept
Returns the mesh edges.
const brep_loop_container & loops() const noexcept
Returns the mesh loops.