Merge branch 'feature_anti_support' into feature_support_mesh

Esse commit está contido em:
Tim Kuipers
2016-11-02 16:01:41 +01:00
4 arquivos alterados com 15 adições e 15 exclusões
+2 -2
Ver Arquivo
@@ -153,13 +153,13 @@ bool FffPolygonGenerator::sliceModel(MeshGroup* meshgroup, TimeKeeper& timeKeepe
}
continue;
}
if (mesh.getSettingBoolean("overhang_mesh"))
if (mesh.getSettingBoolean("support_mesh"))
{
for (unsigned int layer_nr = 0; layer_nr < slicer->layers.size(); layer_nr++)
{
SupportLayer& support_layer = storage.support.supportLayers[layer_nr];
SlicerLayer& slicer_layer = slicer->layers[layer_nr];
support_layer.overhang_mesh.add(slicer_layer.polygons);
support_layer.support_mesh.add(slicer_layer.polygons);
}
continue;
}
+4 -4
Ver Arquivo
@@ -11,7 +11,7 @@ void carveMultipleVolumes(std::vector<Slicer*> &volumes)
Slicer& volume_1 = *volumes[volume_1_idx];
if (volume_1.mesh->getSettingBoolean("infill_mesh")
|| volume_1.mesh->getSettingBoolean("anti_overhang_mesh")
|| volume_1.mesh->getSettingBoolean("overhang_mesh")
|| volume_1.mesh->getSettingBoolean("support_mesh")
)
{
continue;
@@ -21,7 +21,7 @@ void carveMultipleVolumes(std::vector<Slicer*> &volumes)
Slicer& volume_2 = *volumes[volume_2_idx];
if (volume_2.mesh->getSettingBoolean("infill_mesh")
|| volume_2.mesh->getSettingBoolean("anti_overhang_mesh")
|| volume_2.mesh->getSettingBoolean("overhang_mesh")
|| volume_2.mesh->getSettingBoolean("support_mesh")
)
{
continue;
@@ -55,7 +55,7 @@ void generateMultipleVolumesOverlap(std::vector<Slicer*> &volumes)
int overlap = volume->mesh->getSettingInMicrons("multiple_mesh_overlap");
if (volume->mesh->getSettingBoolean("infill_mesh")
|| volume->mesh->getSettingBoolean("anti_overhang_mesh")
|| volume->mesh->getSettingBoolean("overhang_mesh")
|| volume->mesh->getSettingBoolean("support_mesh")
|| overlap == 0)
{
continue;
@@ -69,7 +69,7 @@ void generateMultipleVolumesOverlap(std::vector<Slicer*> &volumes)
{
if (other_volume->mesh->getSettingBoolean("infill_mesh")
|| other_volume->mesh->getSettingBoolean("anti_overhang_mesh")
|| other_volume->mesh->getSettingBoolean("overhang_mesh")
|| other_volume->mesh->getSettingBoolean("support_mesh")
|| !other_volume->mesh->getAABB().hit(aabb)
|| other_volume == volume
)
+1 -1
Ver Arquivo
@@ -125,7 +125,7 @@ class SupportLayer
public:
Polygons supportAreas; //!< normal support areas
Polygons skin; //!< the support areas which are to be printed as denser roofs and/or bottoms. Note that the roof/bottom areas and support areas should be mutually exclusive.
Polygons overhang_mesh; //!< Areas from support meshes
Polygons support_mesh; //!< Areas from support meshes
Polygons anti_overhang; //!< Areas where no overhang should be detected.
};
+8 -8
Ver Arquivo
@@ -85,20 +85,20 @@ Polygons AreaSupport::join(Polygons& supportLayer_up, Polygons& supportLayer_thi
void AreaSupport::generateSupportAreas(SliceDataStorage& storage, unsigned int layer_count)
{
int max_layer_nr_overhang_mesh_filled;
for (max_layer_nr_overhang_mesh_filled = storage.support.supportLayers.size() - 1; max_layer_nr_overhang_mesh_filled >= 0; max_layer_nr_overhang_mesh_filled--)
int max_layer_nr_support_mesh_filled;
for (max_layer_nr_support_mesh_filled = storage.support.supportLayers.size() - 1; max_layer_nr_support_mesh_filled >= 0; max_layer_nr_support_mesh_filled--)
{
const SupportLayer& support_layer = storage.support.supportLayers[max_layer_nr_overhang_mesh_filled];
const SupportLayer& support_layer = storage.support.supportLayers[max_layer_nr_support_mesh_filled];
if (support_layer.supportAreas.size() > 0)
{
break;
}
}
storage.support.layer_nr_max_filled_layer = std::max(storage.support.layer_nr_max_filled_layer, (int)max_layer_nr_overhang_mesh_filled);
for (int layer_nr = 0; layer_nr < max_layer_nr_overhang_mesh_filled; layer_nr++)
storage.support.layer_nr_max_filled_layer = std::max(storage.support.layer_nr_max_filled_layer, (int)max_layer_nr_support_mesh_filled);
for (int layer_nr = 0; layer_nr < max_layer_nr_support_mesh_filled; layer_nr++)
{
SupportLayer& support_layer = storage.support.supportLayers[max_layer_nr_overhang_mesh_filled];
support_layer.overhang_mesh = support_layer.overhang_mesh.unionPolygons();
SupportLayer& support_layer = storage.support.supportLayers[max_layer_nr_support_mesh_filled];
support_layer.support_mesh = support_layer.support_mesh.unionPolygons();
}
// initialization of supportAreasPerLayer
@@ -286,7 +286,7 @@ void AreaSupport::generateSupportAreas(SliceDataStorage& storage, unsigned int m
supportLayer_this = AreaSupport::join(supportLayer_last, supportLayer_this, join_distance, smoothing_distance, max_smoothing_angle, conical_support, conical_support_offset, conical_smallest_breadth);
}
supportLayer_this = supportLayer_this.unionPolygons(storage.support.supportLayers[layer_idx].overhang_mesh);
supportLayer_this = supportLayer_this.unionPolygons(storage.support.supportLayers[layer_idx].support_mesh);
// move up from model
if (layerZdistanceBottom > 0 && layer_idx >= layerZdistanceBottom)