mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-14 10:17:55 -06:00
Update the codes to 01.01.00.10 for the formal release
1. first formal version of macos 2. add the bambu networking plugin install logic 3. auto compute the wipe volume when filament change 4. add the logic of wiping into support 5. refine the GUI layout and icons, improve the gui apperance in lots of small places 6. serveral improve to support 7. support AMS auto-mapping 8. disable lots of unstable features: such as params table, media file download, HMS 9. fix serveral kinds of bugs 10. update the document of building 11. ...
This commit is contained in:
parent
e1528e4299
commit
e9e4d75877
267 changed files with 10326 additions and 32228 deletions
|
@ -762,40 +762,7 @@ bool compSecondMoment(const ExPolygons& expolys, double& smExpolysX, double& smE
|
|||
return true;
|
||||
}
|
||||
|
||||
// BBS: thermal length is calculated according to the material of a volume
|
||||
double getThermalLength(const ModelVolume* modelVolumePtr) {
|
||||
double thermalLength = 200.;
|
||||
auto aa = modelVolumePtr->extruder_id();
|
||||
if (Model::extruderParamsMap.find(aa) != Model::extruderParamsMap.end()) {
|
||||
if (Model::extruderParamsMap.at(aa).materialName == "ABS" ||
|
||||
Model::extruderParamsMap.at(aa).materialName == "PA-CF" ||
|
||||
Model::extruderParamsMap.at(aa).materialName == "PET-CF") {
|
||||
thermalLength = 100;
|
||||
}
|
||||
if (Model::extruderParamsMap.at(aa).materialName == "PC") {
|
||||
thermalLength = 40;
|
||||
}
|
||||
if (Model::extruderParamsMap.at(aa).materialName == "TPU") {
|
||||
thermalLength = 1000;
|
||||
}
|
||||
|
||||
}
|
||||
return thermalLength;
|
||||
}
|
||||
|
||||
// BBS: thermal length calculation for a group of volumes
|
||||
double getThermalLength(const std::vector<ModelVolume*> modelVolumePtrs)
|
||||
{
|
||||
double thermalLength = 1250.;
|
||||
|
||||
for (const auto& modelVolumePtr : modelVolumePtrs) {
|
||||
if (modelVolumePtr != nullptr) {
|
||||
// the thermal length of a group is decided by the volume with shortest thermal length
|
||||
thermalLength = std::min(thermalLength, getThermalLength(modelVolumePtr));
|
||||
}
|
||||
}
|
||||
return thermalLength;
|
||||
}
|
||||
|
||||
//BBS: config brimwidth by volumes
|
||||
double configBrimWidthByVolumes(double deltaT, double adhension, double maxSpeed, const ModelVolume* modelVolumePtr, const ExPolygons& expolys)
|
||||
|
@ -825,7 +792,7 @@ double configBrimWidthByVolumes(double deltaT, double adhension, double maxSpeed
|
|||
const double& bboxX = bbox2.size()(0);
|
||||
const double& bboxY = bbox2.size()(1);
|
||||
double thermalLength = sqrt(bboxX * bboxX + bboxY * bboxY) * SCALING_FACTOR;
|
||||
double thermalLengthRef = getThermalLength(modelVolumePtr);
|
||||
double thermalLengthRef = Model::getThermalLength(modelVolumePtr);
|
||||
|
||||
double height_to_area = std::max(height / Ixx * (bbox2.size()(1) * SCALING_FACTOR), height / Iyy * (bbox2.size()(0) * SCALING_FACTOR));
|
||||
double brim_width = adhension * std::min(std::min(std::max(height_to_area * maxSpeed / 24, thermalLength * 8. / thermalLengthRef * std::min(height, 30.) / 30.), 18.), 1.5 * thermalLength);
|
||||
|
@ -846,8 +813,12 @@ double configBrimWidthByVolumeGroups(double adhension, double maxSpeed, const st
|
|||
BoundingBoxf3 mergedBbx;
|
||||
for (const auto& modelVolumePtr : modelVolumePtrs) {
|
||||
if (modelVolumePtr->is_model_part()) {
|
||||
auto rawBoundingbox = modelVolumePtr->mesh().transformed_bounding_box(modelVolumePtr->get_matrix());
|
||||
auto bbox = modelVolumePtr->get_object()->instances.front()->transform_bounding_box(rawBoundingbox);
|
||||
Slic3r::Transform3d t;
|
||||
if (modelVolumePtr->get_object()->instances.size() > 0)
|
||||
t = modelVolumePtr->get_object()->instances.front()->get_matrix() * modelVolumePtr->get_matrix();
|
||||
else
|
||||
t = modelVolumePtr->get_matrix();
|
||||
auto bbox = modelVolumePtr->mesh().transformed_bounding_box(t);
|
||||
mergedBbx.merge(bbox);
|
||||
}
|
||||
}
|
||||
|
@ -870,7 +841,7 @@ double configBrimWidthByVolumeGroups(double adhension, double maxSpeed, const st
|
|||
const double& bboxX = bbox2.size()(0);
|
||||
const double& bboxY = bbox2.size()(1);
|
||||
double thermalLength = sqrt(bboxX * bboxX + bboxY * bboxY) * SCALING_FACTOR;
|
||||
double thermalLengthRef = getThermalLength(modelVolumePtrs);
|
||||
double thermalLengthRef = Model::getThermalLength(modelVolumePtrs);
|
||||
|
||||
double height_to_area = std::max(height / Ixx * (bbox2.size()(1) * SCALING_FACTOR), height / Iyy * (bbox2.size()(0) * SCALING_FACTOR));
|
||||
double brim_width = adhension * std::min(std::min(std::max(height_to_area * maxSpeed / 24, thermalLength * 8. / thermalLengthRef * std::min(height, 30.) / 30.), 18.), 1.5 * thermalLength);
|
||||
|
@ -884,26 +855,13 @@ double configBrimWidthByVolumeGroups(double adhension, double maxSpeed, const st
|
|||
}
|
||||
|
||||
//BBS: create all brims
|
||||
static ExPolygons outer_inner_brim_area(const Print& print, const ConstPrintObjectPtrs& top_level_objects_with_brim,
|
||||
static ExPolygons outer_inner_brim_area(const Print& print,
|
||||
const float no_brim_offset, std::map<ObjectID, ExPolygons>& brimAreaMap,
|
||||
std::map<ObjectID, ExPolygons>& supportBrimAreaMap,
|
||||
std::vector<std::pair<ObjectID, unsigned int>>& objPrintVec,
|
||||
std::vector<unsigned int>& printExtruders)
|
||||
{
|
||||
std::unordered_set<size_t> top_level_objects_idx;
|
||||
top_level_objects_idx.reserve(top_level_objects_with_brim.size());
|
||||
for (const PrintObject* object : top_level_objects_with_brim)
|
||||
top_level_objects_idx.insert(object->id().id);
|
||||
|
||||
unsigned int support_material_extruder = printExtruders.front() + 1;
|
||||
auto allExtruders = print.extruders();
|
||||
if (print.has_support_material()) {
|
||||
assert(top_level_objects_with_brim.front()->config().support_filament >= 0);
|
||||
if (top_level_objects_with_brim.front()->config().support_filament > 0)
|
||||
support_material_extruder = top_level_objects_with_brim.front()->config().support_filament;
|
||||
allExtruders.push_back(support_material_extruder - 1);
|
||||
sort_remove_duplicates(allExtruders);
|
||||
}
|
||||
|
||||
ExPolygons brim_area;
|
||||
ExPolygons no_brim_area;
|
||||
|
@ -927,7 +885,6 @@ static ExPolygons outer_inner_brim_area(const Print& print, const ConstPrintObje
|
|||
float brim_offset = scale_(object->config().brim_object_gap.value);
|
||||
double flowWidth = print.brim_flow().scaled_spacing() * SCALING_FACTOR;
|
||||
float brim_width = scale_(floor(object->config().brim_width.value / flowWidth / 2) * flowWidth * 2);
|
||||
const bool top_outer_brim = top_level_objects_idx.find(object->id().id) != top_level_objects_idx.end();
|
||||
const float scaled_flow_width = print.brim_flow().scaled_spacing();
|
||||
const float scaled_additional_brim_width = scale_(floor(5 / flowWidth / 2) * flowWidth * 2);
|
||||
const float scaled_half_min_adh_length = scale_(1.1);
|
||||
|
@ -1017,8 +974,13 @@ static ExPolygons outer_inner_brim_area(const Print& print, const ConstPrintObje
|
|||
if (brimAreaMap.find(object->id()) != brimAreaMap.end())
|
||||
expolygons_append(brim_area, brimAreaMap[object->id()]);
|
||||
}
|
||||
if ((print.config().print_sequence == PrintSequence::ByObject) && top_level_objects_with_brim.front()->config().support_filament == 0)
|
||||
support_material_extruder = objectWithExtruder.second;
|
||||
support_material_extruder = object->config().support_filament;
|
||||
if (support_material_extruder == 0 && object->has_support_material()) {
|
||||
if (print.config().print_sequence == PrintSequence::ByObject)
|
||||
support_material_extruder = objectWithExtruder.second;
|
||||
else
|
||||
support_material_extruder = printExtruders.front() + 1;
|
||||
}
|
||||
if (support_material_extruder == extruderNo && brimToWrite.at(object->id()).sup) {
|
||||
if (!object->support_layers().empty()) {
|
||||
for (const Polygon& support_contour : object->support_layers().front()->support_fills.polygons_covered_by_spacing()) {
|
||||
|
@ -1658,10 +1620,7 @@ void make_brim(const Print& print, PrintTryCancel try_cancel, Polygons& islands_
|
|||
std::map<ObjectID, ExPolygons> supportBrimAreaMap;
|
||||
Flow flow = print.brim_flow();
|
||||
const auto scaled_resolution = scaled<double>(print.config().resolution.value);
|
||||
std::vector<ExPolygons> bottom_layers_expolygons = get_print_bottom_layers_expolygons(print);
|
||||
ConstPrintObjectPtrs top_level_objects_with_brim = get_top_level_objects_with_brim(print, bottom_layers_expolygons);
|
||||
Polygons islands = top_level_outer_brim_islands(top_level_objects_with_brim, scaled_resolution);
|
||||
ExPolygons islands_area_ex = outer_inner_brim_area(print, top_level_objects_with_brim,
|
||||
ExPolygons islands_area_ex = outer_inner_brim_area(print,
|
||||
float(flow.scaled_spacing()), brimAreaMap, supportBrimAreaMap, objPrintVec, printExtruders);
|
||||
|
||||
// BBS: Find boundingbox of the first layer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue