Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/CURA-9879_a_tree_by_xmas' into…
Browse files Browse the repository at this point in the history
… tree_support_2_refactored

# Conflicts:
#	src/TreeModelVolumes.cpp
#	src/TreeSupport.cpp
  • Loading branch information
ThomasRahm committed Jan 3, 2023
2 parents 4d65ae7 + 3c41803 commit 6649125
Show file tree
Hide file tree
Showing 36 changed files with 3,101 additions and 3,249 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/conan-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }}
recipe_id_latest: ${{ needs.conan-recipe-version.outputs.recipe_id_latest }}
runs_on: 'ubuntu-20.04'
python_version: '3.10.x'
python_version: '3.11.x'
conan_logging_level: 'info'
secrets: inherit

Expand All @@ -78,11 +78,11 @@ jobs:

uses: ultimaker/cura/.github/workflows/conan-package-create.yml@main
with:
project_name: curaengine
build_id: 3
project_name: ${{ needs.conan-recipe-version.outputs.project_name }}
recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }}
build_id: 3
runs_on: 'macos-11'
python_version: '3.10.x'
python_version: '3.11.x'
conan_logging_level: 'info'
secrets: inherit

Expand All @@ -92,11 +92,11 @@ jobs:

uses: ultimaker/cura/.github/workflows/conan-package-create.yml@main
with:
project_name: curaengine
build_id: 4
project_name: ${{ needs.conan-recipe-version.outputs.project_name }}
recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }}
build_id: 4
runs_on: 'windows-2022'
python_version: '3.10.x'
python_version: '3.11.x'
conan_config_branch: ''
conan_logging_level: 'info'
secrets: inherit
Expand All @@ -107,11 +107,11 @@ jobs:

uses: ultimaker/cura/.github/workflows/conan-package-create.yml@main
with:
project_name: curaengine
build_id: 2
project_name: ${{ needs.conan-recipe-version.outputs.project_name }}
recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }}
build_id: 1
runs_on: 'ubuntu-20.04'
python_version: '3.10.x'
python_version: '3.11.x'
conan_logging_level: 'info'
secrets: inherit

Expand All @@ -121,11 +121,11 @@ jobs:

uses: ultimaker/cura/.github/workflows/conan-package-create.yml@main
with:
project_name: curaengine
build_id: 1
project_name: ${{ needs.conan-recipe-version.outputs.project_name }}
recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }}
build_id: 2
runs_on: 'ubuntu-22.04'
python_version: '3.10.x'
python_version: '3.11.x'
conan_logging_level: 'info'
secrets: inherit

Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ jobs:
- name: Install Python requirements and Create default Conan profile
run: |
pip install -r requirements-conan-package.txt
conan profile new default --detect
working-directory: .github/workflows/

- name: Use Conan download cache (Bash)
Expand All @@ -93,10 +92,21 @@ jobs:

- name: Install Linux system requirements
if: ${{ runner.os == 'Linux' }}
run: sudo apt install build-essential checkinstall zlib1g-dev libssl-dev ninja-build autoconf libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev libxkbcommon-x11-dev -y
run: |
sudo apt update
sudo apt upgrade
sudo apt install build-essential checkinstall libegl-dev zlib1g-dev libssl-dev ninja-build autoconf libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev libxkbcommon-x11-dev pkg-config -y
- name: Use GCC-10 on ubuntu as default
if: ${{ runner.os == 'Linux' }}
run: |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10
- name: Get Conan configuration
run: conan config install https://github.com/Ultimaker/conan-config.git
run: |
conan profile new default --detect
conan config install https://github.com/Ultimaker/conan-config.git
- name: Install dependencies
run: conan install . ${{ needs.conan-recipe-version.outputs.recipe_id_full }} -o enable_testing=True -s build_type=Release --build=missing --update -g GitHubActionsRunEnv -g GitHubActionsBuildEnv
Expand Down
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ endif ()
target_link_libraries(_CuraEngine
PUBLIC
spdlog::spdlog
PRIVATE
range-v3::range-v3
fmt::fmt
clipper::clipper
Expand Down
107 changes: 35 additions & 72 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,84 +1,47 @@

<br>

<div align = center>

[![Badge Issues]][Issues]   
[![Badge PullRequests]][PullRequests]   
[![Badge Closed]][Closed]

[![Badge Size]][#]   
[![Badge License]][License]   
[![Badge Contributors]][Contributors]

[![Badge Test]][Test]   
[![Badge Conan]][Conan]   

<br>
<br>

<img
src = 'CuraEngine.ico'
width = 200
/>

# CuraEngine

<p align="center">
<a href="https://github.com/Ultimaker/CuraEngine/actions/workflows/unit-test.yml" alt="Unit Tests">
<img src="https://github.com/Ultimaker/CuraEngine/actions/workflows/unit-test.yml/badge.svg" /></a>
<a href="https://github.com/Ultimaker/CuraEngine/actions/workflows/conan-package.yml" alt="Unit Tests">
<img src="https://github.com/Ultimaker/CuraEngine/actions/workflows/conan-package.yml/badge.svg" /></a>
<a href="https://github.com/Ultimaker/CuraEngine/issues" alt="Open Issues">
<img src="https://img.shields.io/github/issues/Ultimaker/CuraEngine" /></a>
<a href="https://github.com/Ultimaker/CuraEngine/issues?q=is%3Aissue+is%3Aclosed" alt="Closed Issues">
<img src="https://img.shields.io/github/issues-closed/ultimaker/CuraEngine?color=g" /></a>
<a href="https://github.com/Ultimaker/CuraEngine/pulls" alt="Pull Requests">
<img src="https://img.shields.io/github/issues-pr/Ultimaker/CuraEngine" /></a>
<a href="https://github.com/Ultimaker/CuraEngine/graphs/contributors" alt="Contributors">
<img src="https://img.shields.io/github/contributors/Ultimaker/CuraEngine" /></a>
<a href="https://github.com/Ultimaker/CuraEngine" alt="Repo Size">
<img src="https://img.shields.io/github/repo-size/Ultimaker/CuraEngine?style=flat" /></a>
<a href="https://github.com/Ultimaker/CuraEngine/blob/master/LICENSE" alt="License">
<img src="https://img.shields.io/github/license/Ultimaker/CuraEngine?style=flat" /></a>
</p>

*C++ console application for 3D printing GCode generation.*

<br>
<br>

[![Button Install]][Install]   
[![Button Dependencies]][Dependencies]   
[![Button Internals]][Internals]

<br>
<br>


Designed as a better and faster alternative to the old <br>
**Skeinforge Engine** and is an integral part of **[Cura]**.

You can use CuraEngine separately, in other <br>
applications and integrate it into your own app.

<br>


<!----------------------------------------------------------------------------->
CuraEngine is a C++ console application for 3D printing GCode generation. It has been made as a better and faster
alternative to the old Skeinforge engine and is an integral part of [Cura](https://github.com/ultimaker/Cura). You can
use CuraEngine separately or in other applications. Feel free to add it to your application. But please take
note of the [License](LICENSE)

[Contributors]: https://github.com/Ultimaker/CuraEngine/graphs/contributors
[Dependencies]: https://github.com/Ultimaker/CuraEngine/wiki/Dependencies
[PullRequests]: https://github.com/Ultimaker/CuraEngine/pulls
[Internals]: https://github.com/Ultimaker/CuraEngine/wiki/Internals
[Install]: https://github.com/Ultimaker/CuraEngine/wiki/Building-CuraEngine-From-Source
[Closed]: https://github.com/Ultimaker/CuraEngine/issues?q=is%3Aissue+is%3Aclosed
[Issues]: https://github.com/Ultimaker/CuraEngine/issues
[Conan]: https://github.com/Ultimaker/CuraEngine/actions/workflows/conan-package.yml
[Test]: https://github.com/Ultimaker/CuraEngine/actions/workflows/unit-test.yml
[Cura]: https://github.com/Ultimaker/Cura
## License

[License]: LICENSE
[#]: #
![License](https://img.shields.io/github/license/ultimaker/curaengine?style=flat)
CuraEngine is released under terms of the AGPLv3 License. Terms of the license can be found in the LICENSE file. Or at
http://www.gnu.org/licenses/agpl.html

> But in general it boils down to:
> **You need to share the source of any CuraEngine modifications if you make an application with the CuraEngine. (Even if
> you make a web-based slicer, you still need to share the source!)**
<!---------------------------------[ Badges ]---------------------------------->
## How to Install & Run

[Badge Contributors]: https://img.shields.io/github/contributors/ultimaker/CuraEngine?style=for-the-badge&logoColor=white&labelColor=db5e8a&color=ab4a6c&logo=GitHub
[Badge PullRequests]: https://img.shields.io/github/issues-pr/ultimaker/CuraEngine?style=for-the-badge&logoColor=white&labelColor=bb9f3e&color=937d31&logo=GitExtensions
[Badge License]: https://img.shields.io/badge/License-AGPL3-336887.svg?style=for-the-badge&labelColor=458cb5&logoColor=white&logo=GNU
[Badge Closed]: https://img.shields.io/github/issues-closed/ultimaker/CuraEngine?style=for-the-badge&logoColor=white&labelColor=629944&color=446a30&logo=AddThis
[Badge Issues]: https://img.shields.io/github/issues/ultimaker/CuraEngine?style=for-the-badge&logoColor=white&labelColor=c34360&color=933349&logo=AdBlock
[Badge Conan]: https://img.shields.io/github/workflow/status/Ultimaker/CuraEngine/conan-package?style=for-the-badge&logoColor=white&labelColor=6185aa&color=4c6987&logo=Conan&label=Conan%20Package
[Badge Test]: https://img.shields.io/github/workflow/status/Ultimaker/CuraEngine/unit-test?style=for-the-badge&logoColor=white&labelColor=4a999d&color=346c6e&logo=Codacy&label=Unit%20Test
[Badge Size]: https://img.shields.io/github/repo-size/ultimaker/CuraEngine?style=for-the-badge&logoColor=white&labelColor=715a97&color=584674&logo=GoogleAnalytics
Please check our [Wiki page](https://github.com/Ultimaker/CuraEngine/wiki/Building-CuraEngine-From-Source) for details on how to install CuraEngine.

## Dependencies

<!---------------------------------[ Buttons ]--------------------------------->
Please check our [Wiki page](https://github.com/Ultimaker/CuraEngine/wiki/Dependencies) for details on CuraEngines dependencies.

[Button Dependencies]: https://img.shields.io/badge/Dependencies-26aae2?style=for-the-badge&logoColor=white&logo=BookStack
[Button Internals]: https://img.shields.io/badge/Internals-00979D?style=for-the-badge&logoColor=white&logo=CodeReview
[Button Install]: https://img.shields.io/badge/Installation-e23345?style=for-the-badge&logoColor=white&logo=DocuSign
## Internals

Please check our [Wiki page](https://github.com/Ultimaker/CuraEngine/wiki/Internals) for details on CuraEngines internals.
18 changes: 18 additions & 0 deletions conandata.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# TODO: Remove before merging to main
"5.3.0-alpha":
requirements:
- "clipper/6.4.2"
- "boost/1.79.0"
- "rapidjson/1.1.0"
- "stb/20200203"
- "spdlog/1.10.0"
- "fmt/9.0.0"
- "range-v3/0.12.0"
requirements_arcus:
- "protobuf/3.21.4"
- "arcus/(latest)@ultimaker/testing"
- "zlib/1.2.12"
build_requirements_arcus:
- "protobuf/3.21.4"
build_requirements_testing:
- "gtest/1.12.1"
"5.2.1":
requirements:
- "clipper/6.4.2"
Expand Down
24 changes: 20 additions & 4 deletions include/LayerPlan.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ class ExtruderPlan
std::optional<double> prev_extruder_standby_temp; //!< The temperature to which to set the previous extruder. Not used if the previous extruder plan was the same extruder.

TimeMaterialEstimates estimates; //!< Accumulated time and material estimates for all planned paths within this extruder plan.
double slowest_path_speed;

public:
size_t extruder_nr; //!< The extruder used for this paths in the current plan.
Expand Down Expand Up @@ -129,6 +128,22 @@ class ExtruderPlan
*/
void processFanSpeedAndMinimalLayerTime(bool force_minimal_layer_time, Point starting_position);

/*!
* Set the extrude speed factor. This is used for printing slower than normal.
*
* Leaves the extrusion speed as is for values of 1.0
*
* \param speedFactor The factor by which to alter the extrusion move speed
*/
void setExtrudeSpeedFactor(const Ratio speed_factor);

/*!
* Get the extrude speed factor. This is used for printing slower than normal.
*
* \return The factor by which to alter the extrusion move speed
*/
double getExtrudeSpeedFactor();

/*!
* Get the fan speed computed for this extruder plan
*
Expand Down Expand Up @@ -160,7 +175,10 @@ class ExtruderPlan

const RetractionConfig& retraction_config; //!< The retraction settings for the extruder of this plan

Ratio extrudeSpeedFactor; //!< The factor by which to alter the extrusion move speed

double extraTime; //!< Extra waiting time at the and of this extruder plan, so that the filament can cool
double totalPrintTime; //!< The total naive time estimate for this extruder plan

double fan_speed; //!< The fan speed to be used during this extruder plan

Expand Down Expand Up @@ -600,10 +618,8 @@ class LayerPlan : public NoCopy
* \param flow_ratio The ratio with which to multiply the extrusion amount
* \param near_start_location Optional: Location near where to add the first line. If not provided the last position is used.
* \param fan_speed optional fan speed override for this path
* \param reverse_print_direction Whether to reverse the optimized order and their printing direction.
* \param order_requirements Pairs where first needs to be printed before second. Pointers are pointing to elements of \p polygons
*/
void addLinesByOptimizer(const Polygons& polygons, const GCodePathConfig& config, const SpaceFillType space_fill_type, const bool enable_travel_optimization = false, const coord_t wipe_dist = 0, const Ratio flow_ratio = 1.0, const std::optional<Point> near_start_location = std::optional<Point>(), const double fan_speed = GCodePathConfig::FAN_SPEED_DEFAULT, const bool reverse_print_direction = false, const std::unordered_set<std::pair<ConstPolygonPointer, ConstPolygonPointer>>& order_requirements = PathOrderOptimizer<ConstPolygonPointer>::no_order_requirements);
void addLinesByOptimizer(const Polygons& polygons, const GCodePathConfig& config, const SpaceFillType space_fill_type, const bool enable_travel_optimization = false, const coord_t wipe_dist = 0, const Ratio flow_ratio = 1.0, const std::optional<Point> near_start_location = std::optional<Point>(), const double fan_speed = GCodePathConfig::FAN_SPEED_DEFAULT, const bool reverse_print_direction = false);

/*!
* Add polygons to the g-code with monotonic order.
Expand Down
Loading

0 comments on commit 6649125

Please sign in to comment.