OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::Arachne::STHalfEdgeNode Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/Arachne/SkeletalTrapezoidationGraph.hpp>

Inheritance diagram for Slic3r::Arachne::STHalfEdgeNode:
Collaboration diagram for Slic3r::Arachne::STHalfEdgeNode:

Public Member Functions

 STHalfEdgeNode (SkeletalTrapezoidationJoint data, Point p)
bool isMultiIntersection ()
bool isCentral () const
bool isLocalMaximum (bool strict=false) const
bool operator== (const node_t &other)

Public Attributes

SkeletalTrapezoidationJoint data
Point p
edge_t * incident_edge

Private Types

using edge_t = STHalfEdge
using node_t = STHalfEdgeNode

Detailed Description

Member Typedef Documentation

◆ edge_t

◆ node_t

Constructor & Destructor Documentation

◆ STHalfEdgeNode()

Member Function Documentation

◆ isCentral()

bool Slic3r::Arachne::STHalfEdgeNode::isCentral ( ) const
156{
157 edge_t* edge = incident_edge;
158 do
159 {
160 if (edge->data.isCentral())
161 {
162 return true;
163 }
164 assert(edge->twin); if (!edge->twin) return false;
165 } while (edge = edge->twin->next, edge != incident_edge);
166 return false;
167}
STHalfEdge edge_t
Definition SkeletalTrapezoidationGraph.hpp:61

References Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::data, Slic3r::Arachne::HalfEdgeNode< SkeletalTrapezoidationJoint, SkeletalTrapezoidationEdge, STHalfEdgeNode, STHalfEdge >::incident_edge, Slic3r::Arachne::SkeletalTrapezoidationEdge::isCentral(), Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::next, and Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::twin.

Here is the call graph for this function:

◆ isLocalMaximum()

bool Slic3r::Arachne::STHalfEdgeNode::isLocalMaximum ( bool strict = false) const

Check whether this node has a locally maximal distance_to_boundary

Parameters
strictWhether equidistant edges can count as a local maximum
170{
171 if (data.distance_to_boundary == 0)
172 {
173 return false;
174 }
175
176 edge_t* edge = incident_edge;
177 do
178 {
179 if (edge->canGoUp(strict))
180 {
181 return false;
182 }
183 assert(edge->twin); if (!edge->twin) return false;
184
185 if (!edge->twin->next)
186 { // This point is on the boundary
187 return false;
188 }
189 } while (edge = edge->twin->next, edge != incident_edge);
190 return true;
191}

References Slic3r::Arachne::STHalfEdge::canGoUp(), Slic3r::Arachne::HalfEdgeNode< SkeletalTrapezoidationJoint, SkeletalTrapezoidationEdge, STHalfEdgeNode, STHalfEdge >::data, Slic3r::Arachne::HalfEdgeNode< SkeletalTrapezoidationJoint, SkeletalTrapezoidationEdge, STHalfEdgeNode, STHalfEdge >::incident_edge, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::next, and Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::twin.

Referenced by Slic3r::Arachne::SkeletalTrapezoidation::filterCentral(), Slic3r::Arachne::SkeletalTrapezoidation::filterCentral(), and Slic3r::Arachne::SkeletalTrapezoidation::updateBeadCount().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isMultiIntersection()

bool Slic3r::Arachne::STHalfEdgeNode::isMultiIntersection ( )
138{
139 int odd_path_count = 0;
140 edge_t* outgoing = this->incident_edge;
141 do
142 {
143 if ( ! outgoing)
144 { // This is a node on the outside
145 return false;
146 }
147 if (outgoing->data.isCentral())
148 {
149 odd_path_count++;
150 }
151 } while (outgoing = outgoing->twin->next, outgoing != this->incident_edge);
152 return odd_path_count > 2;
153}

References Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::data, Slic3r::Arachne::HalfEdgeNode< SkeletalTrapezoidationJoint, SkeletalTrapezoidationEdge, STHalfEdgeNode, STHalfEdge >::incident_edge, Slic3r::Arachne::SkeletalTrapezoidationEdge::isCentral(), Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::next, and Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::twin.

Referenced by Slic3r::Arachne::SkeletalTrapezoidation::connectJunctions().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator==()

32 {
33 return this == &other;
34 }
Definition HalfEdgeNode.hpp:19

Member Data Documentation

◆ data

◆ incident_edge

◆ p


The documentation for this class was generated from the following files: