Removed head_back_radius and added pillar widening factor to the parameter layers

This commit is contained in:
tamasmeszaros 2018-11-23 11:51:45 +01:00
parent cabfca1031
commit a05bda5347
8 changed files with 43 additions and 40 deletions

View file

@ -309,7 +309,7 @@ struct Head {
}
double request_pillar_radius(double radius) const {
const double rmax = r_back_mm /* * 0.65*/ ;
const double rmax = r_back_mm;
return radius > 0 && radius < rmax ? radius : rmax;
}
};
@ -1186,7 +1186,7 @@ bool SLASupportTree::generate(const PointSet &points,
// If the pillars are so close that they touch each other,
// there is no need to bridge them together.
if(pillar_dist > 2*cfg.pillar_radius_mm &&
if(pillar_dist > 2*cfg.head_back_radius_mm &&
bridge_distance < cfg.max_bridge_length_mm)
while(sj(Z) > pillar.endpoint(Z) &&
ej(Z) > nextpillar.endpoint(Z))
@ -1225,7 +1225,7 @@ bool SLASupportTree::generate(const PointSet &points,
Result& result)
{
const double hbr = cfg.head_back_radius_mm;
const double pradius = cfg.pillar_radius_mm;
const double pradius = cfg.head_back_radius_mm;
const double maxbridgelen = cfg.max_bridge_length_mm;
const double gndlvl = result.ground_level;
@ -1478,7 +1478,7 @@ bool SLASupportTree::generate(const PointSet &points,
result.add_pillar(idx,
Vec3d{headend(X), headend(Y), headend(Z) - gh + hl},
cfg.pillar_radius_mm
cfg.head_back_radius_mm
).base = base_head.mesh;
}
};
@ -1493,7 +1493,7 @@ bool SLASupportTree::generate(const PointSet &points,
// For now we will just generate smaller headless sticks with a sharp
// ending point that connects to the mesh surface.
const double R = 0.5*cfg.pillar_radius_mm;
const double R = cfg.headless_pillar_radius_mm;
const double HWIDTH_MM = R/3;
// We will sink the pins into the model surface for a distance of 1/3 of

View file

@ -41,13 +41,16 @@ struct SupportConfig {
// Width in mm from the back sphere center to the front sphere center.
double head_width_mm = 1.0;
// Radius in mm of the support pillars.
// Warning: this value will be at most 65% of head_back_radius_mm
// TODO: This parameter is invalid. The pillar radius will be dynamic in
// nature. Merged pillars will have an increased thickness. This parameter
// may serve as the maximum radius, or maybe an increase when two are merged
// The default radius will be derived from head_back_radius_mm
double pillar_radius_mm = 0.8;
// Radius in mm of the support pillars. The actual radius of the pillars
// beginning with a head will not be higher than head_back_radius but the
// headless pillars will have half of this value.
double headless_pillar_radius_mm = 0.4;
// TODO: unimplemented at the moment. This coefficient will have an impact
// when bridges and pillars are merged. The resulting pillar should be a bit
// thicker than the ones merging into it. How much thicker? I don't know
// but it will be derived from this value.
double pillar_widening_factor = 0.5;
// Radius in mm of the pillar base.
double base_radius_mm = 2.0;