Skip to content

Conversation

pi-squared-studio
Copy link
Contributor

@pi-squared-studio pi-squared-studio commented Aug 3, 2025

Description

Several aesthetic improvements for the top and bottom surfaces. Generally, they are designed for center-based Archimedes Chords and Octagram Spiral patterns. For other patterns, the action needs to be checked or resolved in algorithms.

Anisotropic surfaces

Sometimes it turns out that the direction of infill changes the aesthetic appearance of the surface. This is clearly noticeable if you use multicolor or silk plastics. This option disables drawing surfaces in different directions, so they look noticeably better. At the same time, the printing speed is loosing.
image
Some notes to ensure the cleanliness of the top surface:

  • Set the filling density for the top and bottom surfaces to 75-90% to obtain a uniform layer without overflow on adjacent lines. Also, keep the patchwork_infill_flow_ratio value less than number one so that the tracks don't overlap when printing.
  • Set more hotend temperature to add shine. Try, for example, set the 240°C Instead of 220°C recommended by the manufacturer for PLA plastic. Make sure that the model is printed without problems and unnecessary smudges.
  • Use the brand new and quality nozzles.
  • Set a low surface printing speed. Usually 20-30 mm/s. Choose according to the best result.
  • Adjust the Pressure Advance
  • Apply Z-hop at least to the top surface.
  • Reduce the retracts. Too frequent pressure drops make melted filament mass less uniform.
  • Don't use classic wipe method. That's may dirty top surface. If the extends of pathlines out the pattern beyond the contour of the model, then you can specify a negative value to wipe_distance parameter so that all the stretching snot threads freeze outside the model.
  • Use dry plastic. Do not allow it to leak out of the nozzle when traveling.
  • Increase the speed of movement and acceleration of the hotend during travel to the maximum possible. This will reduce the amount of snotty plastic. Make sure that the kinematics of the printer can handle such loads.
  • Ensure that the top surface for PLA plastic is cooled as much as possible.

Center of surface patterns

image

You can choose one of the 3 options for centering the axial pattern:

  • for each surface (classic mode)
  • for each model
  • for each assembly

If the model has one body but several surfaces, then you can set both separate centering for each surface and set a global center for the whole model. The same parameter is available for assembly if the composition consists of several unrelated models.

image image

Precision surfaces

image

This mod sets the precision overlay of patterns on the top and bottom surfaces, and partially fills the pores when using Fuzzy Skin. Both works with Classic wall generator mode and also with Arachne.

image image image image

Patchwork surfaces

image

What are the options in this add-on:

  • Patchwork surfaces: determines on which external surfaces the patchwork drawing will be applied
image
  • Patchwork direction and Alternate Tiles Direction:
    The angle of inclination of the masonry itself and the metalanguage element for setting the absolute/relative value of the tilt of the tiles. A value of '+0' or '360' causes a random tilt.
image image image image
  • height and width of the tile - and so everything is clear

  • Vertical and horizontal joints:

image negative values define an unfilled seam image
  • Patchwork centering and Subway tiling:
image image image
  • Center of surface patterns: (for polar patterns)
    When the Patchwork surfaces option is enabled, this parameter will work like this:
image image image

Examples:

image

Also solved problems

  • an add-on that can extend the wipe path beyond the contour when entering a negative value in wipe_distance. It is very useful for the purity of the upper surface pattern.

  • remove some bugs

  • add fractional numbering in the infill rotation templates (that always decrypted in wiki)

image
  • grouping and sorting of surface infill elements in menu by it's dominant
image

@pi-squared-studio
Copy link
Contributor Author

I checked the code, and rolled back a bit in some of the fixed features. As it turned out, the infill polylines are optimized several times in Orca, so that the actions of the primary optimization functions simply turn out to be unnecessary, and even harmful in terms of execution speed. Now the code is working as intended, but I can't provide the tests yet due to other difficulties related to retracts and snotty plastic from the nozzle...

@pi-squared-studio
Copy link
Contributor Author

Here are the first tests. Do not pay attention to the snot that inevitably appears with this method, but you can deal with them with the print settings. There's not much time right now to take a lot of beautiful photos. I am only describing how this method works.

image

I took a tricolor silk PLA. All photos were taken from the top surface. The first one (upper left) is made without aesthetic surfaces. As you can see, the interlaced structure of the corners of the pattern is visible, where the printhead changes the printing direction.
The second photo is the first implementation of this algorithm. Here, the printing direction is aligned, but the print segments are optimized.
The lower test is an attempt to work with retracts. I replaced the printing nozzle. The temperature of the plastic is 220°C (against 240 in the first tests, which gives a more glossy appearance). The fill density is 80%, which makes it appear more granular. The printing direction is from the center to the edges, and strictly translational. As you can see, there are much fewer visual artifacts.

@pi-squared-studio
Copy link
Contributor Author

Another test of the modified algorithm. I used a 3-color (crimson-brick-turquoise) silk PLA.
image

The bottom surface (Archimedes) turns out to be perfect. On the top (Octogram), surface defects are visible, They are obtained due to snots from the nozzle during large travel, and wet PLA which I used. (I haven't got a filament dryer at the moment).

@pi-squared-studio
Copy link
Contributor Author

What is the difference in the effect that this algorithm does:
image
image

@SoftFever
Copy link
Owner

@pi-squared-studio
This is interesting work! Thank you.
I will take a close look soon.

@SoftFever SoftFever added the 2.3.1 label Aug 9, 2025
@SoftFever SoftFever added this to the 2.3.1 milestone Aug 9, 2025
@@ -998,6 +998,13 @@ std::vector<std::pair<size_t, bool>> chain_segments_greedy2(SegmentEndPointFunc
return chain_segments_greedy_constrained_reversals2_<PointType, SegmentEndPointFunc, false, decltype(could_reverse_func)>(end_point_func, could_reverse_func, num_segments, start_near);
}

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems this function is not used anywhere. If that is the case, can we delete it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi!
Whatever you deem necessary to do is within your rights!
At the moment, I'm still working on this project, and I wanted to look at the code again at the end and do the final cleaning of all kinds of garbage. Also make sure that some algorithms work correctly... But if You decide to fix the job at this stage, I can transfer it to Draft. And already make new functions in the new PR.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see.
Yes, it would be helpful to mark it as a draft or add [NOT READY] in the PR title if it isn't ready for review, so I can hold on the review.

@@ -26,8 +26,9 @@ std::vector<std::pair<size_t, bool>> chain_extrusion_paths(std::vector<Extrusion
void reorder_extrusion_paths(std::vector<ExtrusionPath> &extrusion_paths, std::vector<std::pair<size_t, bool>> &chain);
void chain_and_reorder_extrusion_paths(std::vector<ExtrusionPath> &extrusion_paths, const Point *start_near = nullptr);

Polylines chain_polylines(Polylines &&src, const Point *start_near = nullptr);
Polylines chain_polylines(Polylines&& src, const Point* start_near = nullptr);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you undo these format changes to keep the git history lean?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's what I wanted to do at the end of the project.
It's just that the development environment (VS) where I work in likes to edit third-party code. ))

@@ -525,7 +536,7 @@ void PrintConfigDef::init_common_params()
def->label = L("Elephant foot compensation");
def->category = L("Quality");
def->tooltip = L("Shrinks the initial layer on build plate to compensate for elephant foot effect.");
def->sidetext = "mm"; // milimeters, don't need translation
def->sidetext = L("mm"); // unlike signs, units are translated into some languages
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we keep the PR focused on the relevant changes only? These unrelated changes make the code review extremely difficult.

Copy link
Contributor Author

@pi-squared-studio pi-squared-studio Aug 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can cancel it completely. Or I'll do it at the finish line. I noticed that recently these parameters were possible for translation, but then they were canceled. But for some languages, it would make sense.

@@ -2805,6 +2816,42 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionInts{ -1 });

def = this->add("aesthetic_surfaces", coBool);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we rename it to "anisotropic" and update the tooltip to mention that it turns off the reorder so that all lines are drawn in an anisotropic way?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course you can! But, I think that the addition to this function will be much more than the line drawing order.
Then I thought that when choosing this option, it would be possible to change others so that the effect would be the most advantageous. For example, the surface density... But, again, the final decision is yours.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please elaborate on it? In the current implementation, enabling this option will optimize line directions so that they are anisotropic. Did I miss anything?
Another issue is that calling it "Aesthetic Surfaces" is very ambiguous; users won't have any idea what specific changes and impacts occur when the option is turned on or off.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an eternal struggle between the technical approach and the humanitarian one... I realized that this project is more technical )) Let them be anisotropic. As for me, everything is the same, when this feature works.

def->enum_values.push_back("each_surface");
def->enum_values.push_back("each_model");
def->enum_values.push_back("each_assembly");
//def->enum_values.push_back("printable_area");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove these comments if we don't plan to implement them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. In fact, these principles, if implemented, will turn out to be very complex and will require a lot of machine time.

def->mode = comAdvanced;
def->set_default_value(new ConfigOptionEnum<AlignCenterOfPatterns>(AlignCenterOfPatterns::Each_Surface));

def = this->add("precision_surfaces", coBool);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate on what exactly the precision surface does?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that when I make a fuzzy skin and 1 wall for the surface, the fill is worked out according to the old contour. Therefore, there are surges and dips. This algorithm simply recalculates the new fill space. Among other things, it turned out that it also fills in the pores (or voids) that have appeared between the usual inner walls and the outer with fuzzy skin.
Technologically, I took the inner filling from the outer boundaries of the layer, and subtracted the silhouettes of the walls from it. All that remains is the inner fill, which is then filled in.
But, as it seems, he did not take into account the nuances, and the fact that the walls may change slightly after applying this algorithm, for example, bridges and overhangs are drawn.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Yes, it makes sense.
I would suggest creating a separate PR for this improvement.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initially, I thought they would be linked into one pack... I will do the following projects.
Give me 1-2 days to complete this PR. I just got really involved in another project, I didn't want to interrupt it.

def->mode = comAdvanced;
def->set_default_value(new ConfigOptionBool(false));

def = this->add("align_center_of_patterns", coEnum);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we name this "center_of_infill_pattern"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. It was initially difficult for me to give a name for this function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just don't "infill" but "surface", if we don't deviate from the accepted terminology.
image

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Internally, they are all infill patterns.
For the display string (the label), feel free to call it surface.

Copy link
Owner

@SoftFever SoftFever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some quick thoughts:
I like the "aesthetic_surfaces" and "align_center_of_patterns" ideas; I think they are useful.
I have questions about the other changes; please review my code comments.

I would like to suggest:

  1. Include changes for these two features only in this PR.
  2. Display these two options in the same place as other infill options in the UI.
  3. Enable or display these options only for center-based Archimedes Chords and Octagram Spiral patterns.

@pi-squared-studio
Copy link
Contributor Author

pi-squared-studio commented Aug 10, 2025

I would like to suggest:

OK, then I'll fix everything possible here, and transfer the new idea to the new PR.
I will give a small announcement - by the way, it will be called "Patchwork surfaces" )))
It's going to be a really cool thing... But now I'm faced with the problem that I can't properly separate the surfaces using a Clipper API. Then I'll postpone this project for a week...

@pi-squared-studio pi-squared-studio changed the title Aesthetic Surfaces Aesthetic pack [UNDER DESIGN] Aug 10, 2025
@pi-squared-studio
Copy link
Contributor Author

@SoftFever
After all, I decided to leave one PR for now. Since all the procedures are tied to each other and it is not possible to divide this branch into several different ones. After optimizing and completing the project, it may be easier to do this.

Here's a little teaser of what I'm doing at the moment: ))
image

@ianalexis when I finish, will it be possible to contact you to correct the possible Wiki and some UI before adding all this to the code?

@ianalexis
Copy link
Contributor

@ianalexis when I finish, will it be possible to contact you to correct the possible Wiki and some UI before adding all this to the code?

sure!
Im at discord, telegram, whatsapp, linkedin or comment in this new pr #10369

@ianalexis ianalexis mentioned this pull request Aug 10, 2025
44 tasks
@pi-squared-studio
Copy link
Contributor Author

First test of patchwork! (not anisotropic yet)
image
image

@pi-squared-studio
Copy link
Contributor Author

I'll post the code soon. For now, for testing and improvements.

image image image image

There are still some problems with correctly displaying patterns from different angles.
The problem of displaying non-polar patterns when selecting the centering option for the assembly has not yet been solved. We need to find a procedure to trim (Thick)Polylines with other ThickPolylines.

@pi-squared-studio
Copy link
Contributor Author

pi-squared-studio commented Aug 13, 2025

@ianalexis I will try to roll back such changes in this file, but it seems to me that they are generally worthy of translation.
image

@ianalexis
Copy link
Contributor

@ianalexis в этом файле я постараюсь откатить такие изменения, но мне кажется, что они вообще достойны перевода.

Why should we leave the option to translate mm, which is the “universal symbol” for millimeters?

@pi-squared-studio
Copy link
Contributor Author

Why should we leave the option to translate mm, which is the “universal symbol” for millimeters?

So I opened up... I forgot to translate that post into English.)))
It's just that in my language, these values have been translated for 200 years as.
mm - мм
cm - см
m/s - м/с
this is not critical for me personally, I use the original language version of the Orca, but if it would be more convenient for the end user, it would be nice.

@ianalexis
Copy link
Contributor

So I opened up... I forgot to translate that post into English.)))

No te preocupes camarada! XD

m/s - м/с

This surprised me, so I did some research and realized that you have the Russian designation/русское обозначение.
Even so, I think we should keep the international/международное (Интернационал ?), although if you think that in the territory where Cyrillic (Кириллица) is used, the vast majority use the русское обозначение, we should make that change and perhaps have two versions of Русский, one with each version.

@pi-squared-studio
Copy link
Contributor Author

we should make that change and perhaps have two versions

It's up to the creators of Orca to decide. In theory, this will not affect the user in Russia in any way, because for advanced users there are no problems with which version of the program to work with, and even any user will have no doubts about this issue if they read it in English. Here the question concerns the ideality of the product. )))

@pi-squared-studio
Copy link
Contributor Author

Patchwork + Anisotropic

image image image

It looks like gems. ))

@pi-squared-studio
Copy link
Contributor Author

pi-squared-studio commented Aug 28, 2025

@SoftFever @ianalexis
Hi! I finish this code.
Look, I've tested it many times, and it works quite well for me. The main problem was that it included many parameters that influenced each other. I marked all critical comments //PPS: - in the final version, you can do whatever you want with the code, these comments can be deleted altogether if they are clear to understand, or contain incomprehensible interpretations. It is possible that this code was integrated into the wrong places of the code, so you can convert it to the desired criteria.
I touched on the some fundamental elements of the code a little, but this happened as an improvement in conditions when new functions were added and errors became noticeable. If you have any questions, ask me, I will answer for them in detail.

There are some minor unresolved issues.

  • enabling the Precision Surfaces option does not always work when the G-code is generated. You need to switch any other option for this function to work.
  • When I do an extreme Fuzzy Skin with Precision Surfaces, instead of one surface, several are formed, mainly the pores between the loops. And they are not always defined as Internal. There is no other way to do it, since the existing principle of forming walls and pouring. First, the infill areas are determined, then only the perimeters are formed, which are modified by Fuzzy Skin. And accordingly, the filling area also changes... Therefore, I had to write illogical code to sort such planes into internal and external based on preliminary data.
  • Different infill overlay into perimeters on the upper layers and topmost one. I also noticed that the functions of the Perimeter Generator for the classic mode and Arachne are almost functionally similar, but there are minor differences that do not always work correctly. It would be nice to combine them into one, since it takes many times longer to check the work of each one.
  • The direction of rotation of the patchwork in small planes sometimes does not match the set one. Because there is an incorrect definition of this area coming from outside this code. It should be Top, but Solid comes in, and the angle of rotation of this area solid_infill_direction is applied.

So far, this is just code with an inaccurate description in the UI for those functions. I am not a native English speaker, and I may have given them incorrectly. Need to give them a more accurate description.

Also ask me for the basis for the wiki. It would be better if you were given to me a template with theses that need to be filled with the material.

Please, read the first post of the topic #10314
There I gathered as much information about the changes as possible.

Comment on lines 2469 to 2477
optgroup->append_single_option_line("fuzzy_skin", "others_settings_special_mode#fuzzy-skin");
optgroup->append_single_option_line("fuzzy_skin_mode", "others_settings_special_mode#fuzzy-skin-generator-mode");
optgroup->append_single_option_line("fuzzy_skin_noise_type", "others_settings_special_mode#fuzzy-skin-mode");
optgroup->append_single_option_line("fuzzy_skin_point_distance", "others_settings_special_mode#point-distance");
optgroup->append_single_option_line("fuzzy_skin_thickness", "others_settings_special_mode#skin-thickness");
optgroup->append_single_option_line("fuzzy_skin_scale", "others_settings_special_mode#skin-feature-size");
optgroup->append_single_option_line("fuzzy_skin_octaves", "others_settings_special_mode#skin-noise-octaves");
optgroup->append_single_option_line("fuzzy_skin_persistence", "others_settings_special_mode#skin-noise-persistence");
optgroup->append_single_option_line("fuzzy_skin_first_layer", "others_settings_special_mode#apply-fuzzy-skin-to-first-layer");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to revert this changes, it's fine as it is now.
I think you still have the change from some other old modification.

@ianalexis
Copy link
Contributor

About the error that "Validate Documentation" is giving to you.
They are becouse you didint add the fragment in the documentation.
You can do 1 of theese 3 options:

  1. Remove the linkin (the second string) like
optgroup->append_single_option_line("patchwork_tiles_alternate_direction");
  1. Remove the fragment like
optgroup->append_single_option_line("patchwork_tiles_alternate_direction", "strength_settings_top_bottom_shells");
  1. Create the fragment in the doc and write something basic or WIP...

@pi-squared-studio pi-squared-studio changed the title Aesthetic pack [UNDER DESIGN] Aesthetic pack Aug 30, 2025
@pi-squared-studio
Copy link
Contributor Author

You can do 1 of theese 3 options:

Ok, I just deleted the links to the documentation. The fact is that I am not sure about the correctness of the names in English of the labels, as well as their descriptions. I think we need to define them first, and then build a wiki based on these changes.

image image image image

+ step settings into patchwork parameters
+ check determination for top_infill in precision surfaces
+ correct determination patchwork surface
`α%` - that is coorect description
`α:β`, `ℍ:ℕ` - new instructions and its description
@pi-squared-studio pi-squared-studio marked this pull request as draft September 5, 2025 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants