fix(build): add remap_paint param to split() defs, Point3 typing in LayerRegion.cpp
This commit is contained in:
@@ -296,8 +296,8 @@ static void perimeter_texture_accumulate_path_image_weights_for_path(const Extru
|
||||
|
||||
const double pitch_scaled = std::max(1.0, double(scale_(context.high_resolution_texture_sampling ? 0.08 : 0.16)));
|
||||
for (size_t idx = 1; idx < path.polyline.points.size(); ++idx) {
|
||||
const Point &a = path.polyline.points[idx - 1];
|
||||
const Point &b = path.polyline.points[idx];
|
||||
const Point3 &a = path.polyline.points[idx - 1];
|
||||
const Point3 &b = path.polyline.points[idx];
|
||||
const double dx = double(b.x()) - double(a.x());
|
||||
const double dy = double(b.y()) - double(a.y());
|
||||
const double len = std::hypot(dx, dy);
|
||||
@@ -1957,8 +1957,8 @@ static bool perimeter_texture_split_path_by_recolor_masks(const ExtrusionPath
|
||||
bool saw_override = false;
|
||||
|
||||
for (size_t idx = 1; idx < path.polyline.points.size(); ++idx) {
|
||||
const Point &a = path.polyline.points[idx - 1];
|
||||
const Point &b = path.polyline.points[idx];
|
||||
const Point a = path.polyline.points[idx - 1].to_point();
|
||||
const Point b = path.polyline.points[idx].to_point();
|
||||
if (a == b)
|
||||
continue;
|
||||
saw_segment = true;
|
||||
|
||||
@@ -2745,7 +2745,7 @@ static void invalidate_translations(ModelObject* object, const ModelInstance* sr
|
||||
}
|
||||
}
|
||||
|
||||
void ModelObject::split(ModelObjectPtrs* new_objects)
|
||||
void ModelObject::split(ModelObjectPtrs* new_objects, bool remap_paint)
|
||||
{
|
||||
std::vector<TriangleMesh> all_meshes;
|
||||
std::vector<Transform3d> all_transfos;
|
||||
@@ -3437,7 +3437,7 @@ std::string ModelVolume::type_to_string(const ModelVolumeType t)
|
||||
// Split this volume, append the result to the object owning this volume.
|
||||
// Return the number of volumes created from this one.
|
||||
// This is useful to assign different materials to different volumes of an object.
|
||||
size_t ModelVolume::split(unsigned int max_extruders)
|
||||
size_t ModelVolume::split(unsigned int max_extruders, bool remap_paint)
|
||||
{
|
||||
std::vector<TriangleMesh> meshes = this->mesh().split();
|
||||
if (meshes.size() <= 1)
|
||||
|
||||
@@ -520,7 +520,7 @@ public:
|
||||
void delete_connectors();
|
||||
void clone_for_cut(ModelObject **obj);
|
||||
|
||||
void split(ModelObjectPtrs*new_objects, bool remap_paint);
|
||||
void split(ModelObjectPtrs*new_objects, bool remap_paint = false);
|
||||
void merge();
|
||||
|
||||
// BBS: Boolean opts - Musang King
|
||||
@@ -1163,7 +1163,7 @@ public:
|
||||
// Split this volume, append the result to the object owning this volume.
|
||||
// Return the number of volumes created from this one.
|
||||
// This is useful to assign different materials to different volumes of an object.
|
||||
size_t split(unsigned int max_extruders, bool remap_paint);
|
||||
size_t split(unsigned int max_extruders, bool remap_paint = false);
|
||||
void translate(double x, double y, double z) { translate(Vec3d(x, y, z)); }
|
||||
void translate(const Vec3d& displacement);
|
||||
void scale(const Vec3d& scaling_factors);
|
||||
|
||||
Reference in New Issue
Block a user