Further increase widening scale

This commit is contained in:
tamasmeszaros 2022-06-09 16:14:50 +02:00
parent 1a8cf3b029
commit d7c5243300

View File

@ -20,7 +20,7 @@ class BranchingTreeBuilder: public branchingtree::Builder {
// Scaling of the input value 'widening_factor:<0, 1>' to produce resonable // Scaling of the input value 'widening_factor:<0, 1>' to produce resonable
// widening behaviour // widening behaviour
static constexpr double WIDENING_SCALE = 0.08; static constexpr double WIDENING_SCALE = 0.02;
double get_radius(const branchingtree::Node &j) double get_radius(const branchingtree::Node &j)
{ {
@ -232,7 +232,18 @@ void create_branching_tree(SupportTreeBuilder &builder, const SupportableMesh &s
.max_slope(sm.cfg.bridge_slope) .max_slope(sm.cfg.bridge_slope)
.max_branch_length(sm.cfg.max_bridge_length_mm); .max_branch_length(sm.cfg.max_bridge_length_mm);
branchingtree::PointCloud nodes{its, std::move(leafs), props}; auto meshpts = sm.cfg.ground_facing_only ?
std::vector<branchingtree::Node>{} :
branchingtree::sample_mesh(its,
props.sampling_radius());
auto bedpts = branchingtree::sample_bed(props.bed_shape(),
props.ground_level(),
props.sampling_radius());
branchingtree::PointCloud nodes{std::move(meshpts), std::move(bedpts),
std::move(leafs), props};
BranchingTreeBuilder vbuilder{builder, sm, nodes}; BranchingTreeBuilder vbuilder{builder, sm, nodes};
branchingtree::build_tree(nodes, vbuilder); branchingtree::build_tree(nodes, vbuilder);