mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-23 22:54:08 -06:00
Fix: Initializer list, right initialisation order
This commit is contained in:
parent
eb7464ace6
commit
dd5c5eb931
8 changed files with 25 additions and 25 deletions
|
@ -30,7 +30,7 @@ class BridgeDirectionComparator {
|
||||||
BridgeDetector::BridgeDetector(const ExPolygon &_expolygon, const ExPolygonCollection &_lower_slices,
|
BridgeDetector::BridgeDetector(const ExPolygon &_expolygon, const ExPolygonCollection &_lower_slices,
|
||||||
coord_t _extrusion_width)
|
coord_t _extrusion_width)
|
||||||
: expolygon(_expolygon), lower_slices(_lower_slices), extrusion_width(_extrusion_width),
|
: expolygon(_expolygon), lower_slices(_lower_slices), extrusion_width(_extrusion_width),
|
||||||
angle(-1), resolution(PI/36.0)
|
resolution(PI/36.0), angle(-1)
|
||||||
{
|
{
|
||||||
/* outset our bridge by an arbitrary amout; we'll use this outer margin
|
/* outset our bridge by an arbitrary amout; we'll use this outer margin
|
||||||
for detecting anchors */
|
for detecting anchors */
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
ExtrusionEntityCollection::ExtrusionEntityCollection(const ExtrusionEntityCollection& collection)
|
ExtrusionEntityCollection::ExtrusionEntityCollection(const ExtrusionEntityCollection& collection)
|
||||||
: no_sort(collection.no_sort), orig_indices(collection.orig_indices)
|
: orig_indices(collection.orig_indices), no_sort(collection.no_sort)
|
||||||
{
|
{
|
||||||
this->append(collection.entities);
|
this->append(collection.entities);
|
||||||
}
|
}
|
||||||
|
|
|
@ -209,9 +209,9 @@ REGISTER_CLASS(Wipe, "GCode::Wipe");
|
||||||
#define EXTRUDER_CONFIG(OPT) this->config.OPT.get_at(this->writer.extruder()->id)
|
#define EXTRUDER_CONFIG(OPT) this->config.OPT.get_at(this->writer.extruder()->id)
|
||||||
|
|
||||||
GCode::GCode()
|
GCode::GCode()
|
||||||
: enable_loop_clipping(true), enable_cooling_markers(false), layer_count(0),
|
: placeholder_parser(NULL), enable_loop_clipping(true), enable_cooling_markers(false), layer_count(0),
|
||||||
layer_index(-1), first_layer(false), elapsed_time(0), volumetric_speed(0),
|
layer_index(-1), layer(NULL), first_layer(false), elapsed_time(0), volumetric_speed(0),
|
||||||
_last_pos_defined(false), layer(NULL), placeholder_parser(NULL)
|
_last_pos_defined(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,16 +8,16 @@ namespace Slic3r {
|
||||||
|
|
||||||
Layer::Layer(size_t id, PrintObject *object, coordf_t height, coordf_t print_z,
|
Layer::Layer(size_t id, PrintObject *object, coordf_t height, coordf_t print_z,
|
||||||
coordf_t slice_z)
|
coordf_t slice_z)
|
||||||
: _id(id),
|
: upper_layer(NULL),
|
||||||
_object(object),
|
|
||||||
upper_layer(NULL),
|
|
||||||
lower_layer(NULL),
|
lower_layer(NULL),
|
||||||
regions(),
|
regions(),
|
||||||
slicing_errors(false),
|
slicing_errors(false),
|
||||||
slice_z(slice_z),
|
slice_z(slice_z),
|
||||||
print_z(print_z),
|
print_z(print_z),
|
||||||
height(height),
|
height(height),
|
||||||
slices()
|
slices(),
|
||||||
|
_id(id),
|
||||||
|
_object(object)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -248,7 +248,7 @@ REGISTER_CLASS(Model, "Model");
|
||||||
|
|
||||||
ModelMaterial::ModelMaterial(Model *model) : model(model) {}
|
ModelMaterial::ModelMaterial(Model *model) : model(model) {}
|
||||||
ModelMaterial::ModelMaterial(Model *model, const ModelMaterial &other)
|
ModelMaterial::ModelMaterial(Model *model, const ModelMaterial &other)
|
||||||
: model(model), config(other.config), attributes(other.attributes)
|
: attributes(other.attributes), config(other.config), model(model)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -268,8 +268,7 @@ ModelObject::ModelObject(Model *model)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
ModelObject::ModelObject(Model *model, const ModelObject &other, bool copy_volumes)
|
ModelObject::ModelObject(Model *model, const ModelObject &other, bool copy_volumes)
|
||||||
: model(model),
|
: name(other.name),
|
||||||
name(other.name),
|
|
||||||
input_file(other.input_file),
|
input_file(other.input_file),
|
||||||
instances(),
|
instances(),
|
||||||
volumes(),
|
volumes(),
|
||||||
|
@ -277,7 +276,8 @@ ModelObject::ModelObject(Model *model, const ModelObject &other, bool copy_volum
|
||||||
layer_height_ranges(other.layer_height_ranges),
|
layer_height_ranges(other.layer_height_ranges),
|
||||||
origin_translation(other.origin_translation),
|
origin_translation(other.origin_translation),
|
||||||
_bounding_box(other._bounding_box),
|
_bounding_box(other._bounding_box),
|
||||||
_bounding_box_valid(other._bounding_box_valid)
|
_bounding_box_valid(other._bounding_box_valid),
|
||||||
|
model(model)
|
||||||
{
|
{
|
||||||
if (copy_volumes) {
|
if (copy_volumes) {
|
||||||
this->volumes.reserve(other.volumes.size());
|
this->volumes.reserve(other.volumes.size());
|
||||||
|
@ -647,12 +647,12 @@ REGISTER_CLASS(ModelObject, "Model::Object");
|
||||||
|
|
||||||
|
|
||||||
ModelVolume::ModelVolume(ModelObject* object, const TriangleMesh &mesh)
|
ModelVolume::ModelVolume(ModelObject* object, const TriangleMesh &mesh)
|
||||||
: object(object), mesh(mesh), modifier(false)
|
: mesh(mesh), modifier(false), object(object)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
ModelVolume::ModelVolume(ModelObject* object, const ModelVolume &other)
|
ModelVolume::ModelVolume(ModelObject* object, const ModelVolume &other)
|
||||||
: object(object), name(other.name), mesh(other.mesh), config(other.config),
|
: name(other.name), mesh(other.mesh), config(other.config),
|
||||||
modifier(other.modifier)
|
modifier(other.modifier), object(object)
|
||||||
{
|
{
|
||||||
this->material_id(other.material_id());
|
this->material_id(other.material_id());
|
||||||
}
|
}
|
||||||
|
@ -701,11 +701,11 @@ REGISTER_CLASS(ModelVolume, "Model::Volume");
|
||||||
|
|
||||||
|
|
||||||
ModelInstance::ModelInstance(ModelObject *object)
|
ModelInstance::ModelInstance(ModelObject *object)
|
||||||
: object(object), rotation(0), scaling_factor(1)
|
: rotation(0), scaling_factor(1), object(object)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
ModelInstance::ModelInstance(ModelObject *object, const ModelInstance &other)
|
ModelInstance::ModelInstance(ModelObject *object, const ModelInstance &other)
|
||||||
: object(object), rotation(other.rotation), scaling_factor(other.scaling_factor), offset(other.offset)
|
: rotation(other.rotation), scaling_factor(other.scaling_factor), offset(other.offset), object(object)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -22,7 +22,7 @@ class PerimeterGeneratorLoop {
|
||||||
std::vector<PerimeterGeneratorLoop> children;
|
std::vector<PerimeterGeneratorLoop> children;
|
||||||
|
|
||||||
PerimeterGeneratorLoop(Polygon polygon, unsigned short depth)
|
PerimeterGeneratorLoop(Polygon polygon, unsigned short depth)
|
||||||
: polygon(polygon), depth(depth), is_contour(false)
|
: polygon(polygon), is_contour(false), depth(depth)
|
||||||
{};
|
{};
|
||||||
bool is_external() const;
|
bool is_external() const;
|
||||||
bool is_internal_contour() const;
|
bool is_internal_contour() const;
|
||||||
|
@ -50,8 +50,8 @@ class PerimeterGenerator {
|
||||||
PrintConfig* print_config, ExtrusionEntityCollection* loops,
|
PrintConfig* print_config, ExtrusionEntityCollection* loops,
|
||||||
ExtrusionEntityCollection* gap_fill, SurfaceCollection* fill_surfaces)
|
ExtrusionEntityCollection* gap_fill, SurfaceCollection* fill_surfaces)
|
||||||
: slices(slices), lower_slices(NULL), layer_height(layer_height),
|
: slices(slices), lower_slices(NULL), layer_height(layer_height),
|
||||||
perimeter_flow(flow), ext_perimeter_flow(flow), overhang_flow(flow),
|
layer_id(-1), perimeter_flow(flow), ext_perimeter_flow(flow),
|
||||||
solid_infill_flow(flow), layer_id(-1),
|
overhang_flow(flow), solid_infill_flow(flow),
|
||||||
config(config), object_config(object_config), print_config(print_config),
|
config(config), object_config(object_config), print_config(print_config),
|
||||||
loops(loops), gap_fill(gap_fill), fill_surfaces(fill_surfaces),
|
loops(loops), gap_fill(gap_fill), fill_surfaces(fill_surfaces),
|
||||||
_ext_mm3_per_mm(-1), _mm3_per_mm(-1), _mm3_per_mm_overhang(-1)
|
_ext_mm3_per_mm(-1), _mm3_per_mm(-1), _mm3_per_mm_overhang(-1)
|
||||||
|
|
|
@ -6,9 +6,9 @@
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
PrintObject::PrintObject(Print* print, ModelObject* model_object, const BoundingBoxf3 &modobj_bbox)
|
PrintObject::PrintObject(Print* print, ModelObject* model_object, const BoundingBoxf3 &modobj_bbox)
|
||||||
: _print(print),
|
: typed_slices(false),
|
||||||
_model_object(model_object),
|
_print(print),
|
||||||
typed_slices(false)
|
_model_object(model_object)
|
||||||
{
|
{
|
||||||
// Compute the translation to be applied to our meshes so that we work with smaller coordinates
|
// Compute the translation to be applied to our meshes so that we work with smaller coordinates
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
SVG::SVG(const char* filename)
|
SVG::SVG(const char* filename)
|
||||||
: arrows(true), filename(filename), fill("grey"), stroke("black")
|
: arrows(true), fill("grey"), stroke("black"), filename(filename)
|
||||||
{
|
{
|
||||||
this->f = fopen(filename, "w");
|
this->f = fopen(filename, "w");
|
||||||
fprintf(this->f,
|
fprintf(this->f,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue