mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-19 20:57:53 -06:00
New feature: Bridging angle override through a bridge_angle config
variable. When set to zero, the usual automatic bridge detection applies. The bridging angle override may be set at the Infill->Advanced settings, or through a modifier mesh.
This commit is contained in:
parent
75c72bc59b
commit
71f99423c5
7 changed files with 27 additions and 13 deletions
|
@ -68,20 +68,20 @@ void BridgeDetector::initialize()
|
|||
*/
|
||||
}
|
||||
|
||||
bool
|
||||
BridgeDetector::detect_angle()
|
||||
bool BridgeDetector::detect_angle(double bridge_direction_override)
|
||||
{
|
||||
if (this->_edges.empty() || this->_anchor_regions.empty())
|
||||
// The bridging region is completely in the air, there are no anchors available at the layer below.
|
||||
return false;
|
||||
|
||||
std::vector<BridgeDirection> candidates;
|
||||
{
|
||||
if (bridge_direction_override == 0.) {
|
||||
std::vector<double> angles = bridge_direction_candidates();
|
||||
candidates.reserve(angles.size());
|
||||
for (size_t i = 0; i < angles.size(); ++ i)
|
||||
candidates.push_back(BridgeDirection(angles[i]));
|
||||
}
|
||||
candidates.emplace_back(BridgeDirection(angles[i]));
|
||||
} else
|
||||
candidates.emplace_back(BridgeDirection(bridge_direction_override));
|
||||
|
||||
/* Outset the bridge expolygon by half the amount we used for detecting anchors;
|
||||
we'll use this one to clip our test lines and be sure that their endpoints
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue