Comparar commits
6 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| d7a26ab715 | |||
| 65dc9fe64b | |||
| db6c9a05e0 | |||
| 93e2cda988 | |||
| d49257d30c | |||
| e53408dc52 |
@@ -53,6 +53,9 @@ else
|
||||
LDFLAGS += --static -flto
|
||||
endif
|
||||
endif
|
||||
ifeq ($(UNAME), OpenBSD)
|
||||
LDFLAGS += -lm -lpthread
|
||||
endif
|
||||
ifeq ($(UNAME), Darwin)
|
||||
OPEN_HTML=open
|
||||
#For MacOS force to build
|
||||
|
||||
+18
-8
@@ -163,7 +163,10 @@ void GCodeExport::writeComment(const char* comment, ...)
|
||||
va_start(args, comment);
|
||||
fprintf(f, ";");
|
||||
vfprintf(f, comment, args);
|
||||
fprintf(f, "\n");
|
||||
if (flavor == GCODE_FLAVOR_BFB)
|
||||
fprintf(f, "\r\n");
|
||||
else
|
||||
fprintf(f, "\n");
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
@@ -172,7 +175,10 @@ void GCodeExport::writeLine(const char* line, ...)
|
||||
va_list args;
|
||||
va_start(args, line);
|
||||
vfprintf(f, line, args);
|
||||
fprintf(f, "\n");
|
||||
if (flavor == GCODE_FLAVOR_BFB)
|
||||
fprintf(f, "\r\n");
|
||||
else
|
||||
fprintf(f, "\n");
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
@@ -212,10 +218,10 @@ void GCodeExport::writeMove(Point p, int speed, int lineWidth)
|
||||
if (currentSpeed != int(rpm * 10))
|
||||
{
|
||||
//fprintf(f, "; %f e-per-mm %d mm-width %d mm/s\n", extrusionPerMM, lineWidth, speed);
|
||||
fprintf(f, "M108 S%0.1f\n", rpm);
|
||||
fprintf(f, "M108 S%0.1f\r\n", rpm);
|
||||
currentSpeed = int(rpm * 10);
|
||||
}
|
||||
fprintf(f, "M%d01\n", extruderNr);
|
||||
fprintf(f, "M%d01\r\n", extruderNr + 1);
|
||||
isRetracted = false;
|
||||
}
|
||||
//Fix the speed by the actual RPM we are asking, because of rounding errors we cannot get all RPM values, but we have a lot more resolution in the feedrate value.
|
||||
@@ -229,11 +235,11 @@ void GCodeExport::writeMove(Point p, int speed, int lineWidth)
|
||||
//If we are not extruding, check if we still need to disable the extruder. This causes a retraction due to auto-retraction.
|
||||
if (!isRetracted)
|
||||
{
|
||||
fprintf(f, "M103\n");
|
||||
fprintf(f, "M103\r\n");
|
||||
isRetracted = true;
|
||||
}
|
||||
}
|
||||
fprintf(f, "G1 X%0.3f Y%0.3f Z%0.3f F%0.1f\n", INT2MM(p.X - extruderOffset[extruderNr].X), INT2MM(p.Y - extruderOffset[extruderNr].Y), INT2MM(zPos), fspeed);
|
||||
fprintf(f, "G1 X%0.3f Y%0.3f Z%0.3f F%0.1f\r\n", INT2MM(p.X - extruderOffset[extruderNr].X), INT2MM(p.Y - extruderOffset[extruderNr].Y), INT2MM(zPos), fspeed);
|
||||
}else{
|
||||
|
||||
//Normal E handling.
|
||||
@@ -310,7 +316,7 @@ void GCodeExport::switchExtruder(int newExtruder)
|
||||
if (flavor == GCODE_FLAVOR_BFB)
|
||||
{
|
||||
if (!isRetracted)
|
||||
fprintf(f, "M103\n");
|
||||
fprintf(f, "M103\r\n");
|
||||
isRetracted = true;
|
||||
return;
|
||||
}
|
||||
@@ -339,7 +345,11 @@ void GCodeExport::switchExtruder(int newExtruder)
|
||||
|
||||
void GCodeExport::writeCode(const char* str)
|
||||
{
|
||||
fprintf(f, "%s\n", str);
|
||||
fprintf(f, "%s", str);
|
||||
if (flavor == GCODE_FLAVOR_BFB)
|
||||
fprintf(f, "\r\n");
|
||||
else
|
||||
fprintf(f, "\n");
|
||||
}
|
||||
|
||||
void GCodeExport::writeFanCommand(int speed)
|
||||
|
||||
+6
-1
@@ -11,6 +11,7 @@ void generateSkirt(SliceDataStorage& storage, int distance, int extrusionWidth,
|
||||
{
|
||||
int offsetDistance = distance + extrusionWidth * skirtNr + extrusionWidth / 2;
|
||||
|
||||
SupportPolyGenerator supportGenerator(storage.support, initialLayerHeight);
|
||||
Polygons skirtPolygons(storage.wipeTower.offset(offsetDistance));
|
||||
for(unsigned int volumeIdx = 0; volumeIdx < storage.volumes.size(); volumeIdx++)
|
||||
{
|
||||
@@ -26,10 +27,14 @@ void generateSkirt(SliceDataStorage& storage, int distance, int extrusionWidth,
|
||||
}
|
||||
else
|
||||
skirtPolygons = skirtPolygons.unionPolygons(layer->parts[i].outline.offset(offsetDistance));
|
||||
|
||||
supportGenerator.polygons = supportGenerator.polygons.difference(layer->parts[i].outline);
|
||||
}
|
||||
}
|
||||
|
||||
SupportPolyGenerator supportGenerator(storage.support, initialLayerHeight);
|
||||
//Contract and expand the suppory polygons so small sections are removed and the final polygon is smoothed a bit.
|
||||
supportGenerator.polygons = supportGenerator.polygons.offset(-extrusionWidth * 3);
|
||||
supportGenerator.polygons = supportGenerator.polygons.offset(extrusionWidth * 3);
|
||||
skirtPolygons = skirtPolygons.unionPolygons(supportGenerator.polygons.offset(offsetDistance));
|
||||
|
||||
//Remove small inner skirt holes. Holes have a negative area, remove anything smaller then 100x extrusion "area"
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário