mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-08 08:11:14 +00:00
Belt: refresh comments that described earlier code
BeltBrim.cpp still described the brim as running inside the parallel support step; it runs sequentially after it (generate_belt_brim). The GCodeWriter, calib.cpp and calib.hpp comments referred to an inheritance layout and a dynamic_cast that no longer exist. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
441113cf3b
commit
a564ec23fe
@@ -376,15 +376,12 @@ static void belt_brim_band_paths(const BeltBrimContext &bc,
|
||||
// overhang outside the belt footprint and land in the brim ring, which the flattened
|
||||
// brim_object_gap - a belt-plane separation - does not cover.
|
||||
//
|
||||
// THREADING: this runs inside posSupportMaterial, which Print::process() executes for all
|
||||
// objects in a tbb::parallel_for (Print.cpp). Object slices are finished by then and safe
|
||||
// to read across objects, but SUPPORT layers are not: another object's thread may be
|
||||
// inside clear_support_layers() - which deletes the SupportLayer pointers - right now, so
|
||||
// touching a foreign object's support_layers() here is a use-after-free. Only this
|
||||
// object's own supports are consulted; they are complete, because make_belt_brim() runs at
|
||||
// the tail of this object's own generate_support_material(). The cost is that the brim
|
||||
// does not dodge a *different* object's support at the same Z, which needs the objects to
|
||||
// overlap in the belt direction in the first place.
|
||||
// SEQUENCING: this reads the layers and support layers of every object on the plate, so
|
||||
// it must not overlap with another object's support step, which rebuilds them.
|
||||
// Print::process() therefore generates the belt brims one object after the other once the
|
||||
// parallel support step is over (PrintObject::generate_belt_brim()), and an object that
|
||||
// arrives on or leaves the plate invalidates every other object's support step
|
||||
// (PrintApply.cpp) so the brims are clipped against what is there now.
|
||||
// `region_bbox` bounds the brim; anything outside it cannot clip a brim line, so whole
|
||||
// objects are skipped without materialising their polygons. On a typical plate the
|
||||
// objects do not overlap and every foreign object drops out here, which matters because
|
||||
|
||||
@@ -236,8 +236,8 @@ protected:
|
||||
Vec3d apply_axis_remap(const Vec3d &pos) const;
|
||||
|
||||
// Motion uses the global/base process variant until a filament becomes active.
|
||||
// Protected so subclasses index the per-extruder speed options (travel_speed,
|
||||
// travel_speed_z, initial_layer_travel_speed) exactly as the base writer does.
|
||||
// Indexes the per-extruder speed options (travel_speed, travel_speed_z,
|
||||
// initial_layer_travel_speed).
|
||||
size_t m_cached_extruder_idx;
|
||||
|
||||
private:
|
||||
|
||||
@@ -896,8 +896,7 @@ void CalibPressureAdvancePattern::_refresh_writer(bool is_bbl_machine, const Mod
|
||||
}
|
||||
m_writer = std::move(belt_writer);
|
||||
} else if (m_writer && dynamic_cast<const BeltKinematics *>(&m_writer->kinematics()) != nullptr) {
|
||||
// Previously configured for a belt printer; drop back to a plain writer,
|
||||
// exactly as the old dynamic_cast<BeltGCodeWriter*> check did.
|
||||
// Previously configured for a belt printer; drop back to a plain writer.
|
||||
m_writer = std::make_shared<GCodeWriter>();
|
||||
}
|
||||
|
||||
|
||||
@@ -370,9 +370,9 @@ private:
|
||||
|
||||
const Calib_Params &m_params;
|
||||
|
||||
// Polymorphic so belt printers get belt kinematics in world-coordinates
|
||||
// mode (_refresh_writer); shared_ptr keeps the class copyable — the writer
|
||||
// is rebuilt by refresh_setup() before every use anyway.
|
||||
// Belt printers get belt kinematics installed on it (_refresh_writer);
|
||||
// shared_ptr keeps the class copyable — the writer is rebuilt by
|
||||
// refresh_setup() before every use anyway.
|
||||
std::shared_ptr<GCodeWriter> m_writer{std::make_shared<GCodeWriter>()};
|
||||
Vec3d m_starting_point;
|
||||
bool m_is_start_point_fixed = false;
|
||||
|
||||
Reference in New Issue
Block a user