-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add small perimeter length in user interface #4593
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to see a short test for this feature that implements the following:
- Given: A cylinder with diameter 10mm, and a config that sets 1 perimeter, no infill, external speed = 100mm/s and small perimeter speed = 15mm/s
- When slicing a the model with small_perimeter_length = 6.5
- Then: the speed chosen for the second layer's perimeter is 6000mm/minute in gcode (F6000).
- When slicing a the model with small_perimeter_length = 10.1
- Then: the speed chosen for the second layer's perimeter is 900mm/minute in gcode (F900).
xs/src/libslic3r/PrintConfig.cpp
Outdated
def->sidetext = "mm"; | ||
def->cli = "small-perimeter-length=f"; | ||
def->min = 0; | ||
def->default_value = new ConfigOptionFloat(6.5*2*PI); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Go ahead and leave this a 6.5 and change the usage in xs/src/libslic3r/GCode.cpp to
scale_(this->config.get_abs_value("small_perimeter_length")) * 2 * PI
To add the test: Create a new file in https://github.com/slic3r/Slic3r/tree/master/src/test/libslic3r called test_gcode.cpp Put the following contents in there to start:
|
Then add |
Hello @lordofhyphens , I do not figure out how to get the speed of the perimeter while doing the test you described above. |
F in gcode is the speed. |
@gennartan generally, Slic3r puts any speed changes on its own line. |
Closed last pull request at #4581 because I did not succeed to remove all the useless space I removed.
Here is a new pull request taking into account the comments made on previous pull request.