pyroll-core 3.0.0.post4__tar.gz → 3.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/LICENSE +1 -1
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/PKG-INFO +40 -6
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/README.md +36 -4
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/hatch.toml +5 -1
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyproject.toml +0 -1
- pyroll_core-3.0.2/pyroll/core/__init__.py +136 -0
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/config.py +31 -20
- pyroll_core-3.0.2/pyroll/core/disk_elements/__init__.py +5 -0
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/disk_elements/disk_element_unit.py +7 -12
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/grooves/__init__.py +31 -3
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/grooves/base.py +20 -18
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/grooves/boxes/__init__.py +7 -0
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/grooves/boxes/box.py +21 -17
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/grooves/boxes/constricted_box.py +23 -18
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/grooves/boxes/upset_box.py +2 -0
- pyroll_core-3.0.2/pyroll/core/grooves/diamonds/__init__.py +9 -0
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/grooves/diamonds/diamond.py +12 -8
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/grooves/diamonds/gothic.py +11 -12
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/grooves/diamonds/square.py +9 -7
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/grooves/equivalent_ripped_groove.py +33 -24
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/grooves/flat.py +7 -13
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/grooves/generic_elongation.py +58 -18
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/grooves/generic_elongation_solvers.py +140 -95
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/grooves/hexagonal.py +21 -17
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/grooves/ovals/__init__.py +11 -0
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/grooves/ovals/circular_oval.py +16 -10
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/grooves/ovals/constricted_circular_oval.py +25 -15
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/grooves/ovals/constricted_swedish_oval.py +23 -19
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/grooves/ovals/flat_oval.py +25 -15
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/grooves/ovals/oval_3radii.py +12 -12
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/grooves/ovals/oval_3radii_flanked.py +23 -16
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/grooves/ovals/swedish_oval.py +21 -17
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/grooves/ovals/upset_oval.py +12 -12
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/grooves/rounds/__init__.py +5 -0
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/grooves/rounds/false_round.py +27 -19
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/grooves/rounds/round.py +19 -11
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/grooves/spline.py +6 -0
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/hooks.py +29 -22
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/log.py +2 -0
- pyroll_core-3.0.2/pyroll/core/profile/__init__.py +11 -0
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/profile/hookimpls.py +22 -9
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/profile/profile.py +78 -196
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/repr.py +31 -15
- pyroll_core-3.0.2/pyroll/core/roll/__init__.py +5 -0
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/roll/hookimpls.py +28 -13
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/roll/roll.py +23 -15
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/roll_pass/__init__.py +9 -1
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/roll_pass/base.py +93 -79
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/roll_pass/deformation_unit.py +2 -0
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/roll_pass/hookimpls/base_roll_pass.py +5 -5
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/roll_pass/hookimpls/deformation_unit.py +4 -4
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/roll_pass/hookimpls/helpers.py +0 -1
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/roll_pass/hookimpls/profile.py +10 -7
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/roll_pass/hookimpls/roll.py +10 -2
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/roll_pass/hookimpls/symmetric_roll_pass.py +1 -1
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/roll_pass/hookimpls/three_roll_pass.py +5 -13
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/roll_pass/hookimpls/two_roll_pass.py +1 -2
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/roll_pass/symmetric_roll_pass.py +8 -11
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/roll_pass/three_roll_pass.py +8 -11
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/roll_pass/two_roll_pass.py +9 -12
- pyroll_core-3.0.2/pyroll/core/rotator/__init__.py +5 -0
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/rotator/rotator.py +3 -1
- pyroll_core-3.0.2/pyroll/core/sequence/__init__.py +5 -0
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/sequence/sequence.py +19 -8
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/shapes.py +62 -38
- pyroll_core-3.0.2/pyroll/core/transport/__init__.py +6 -0
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/transport/cooling_pipe.py +7 -5
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/transport/hookimpls/cooling_pipe.py +1 -1
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/transport/hookimpls/transport.py +3 -2
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/transport/transport.py +7 -5
- pyroll_core-3.0.2/pyroll/core/unit/__init__.py +5 -0
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/unit/unit.py +19 -26
- pyroll_core-3.0.0.post4/pyroll/core/__init__.py +0 -39
- pyroll_core-3.0.0.post4/pyroll/core/disk_elements/__init__.py +0 -2
- pyroll_core-3.0.0.post4/pyroll/core/grooves/diamonds/__init__.py +0 -3
- pyroll_core-3.0.0.post4/pyroll/core/profile/__init__.py +0 -3
- pyroll_core-3.0.0.post4/pyroll/core/roll/__init__.py +0 -3
- pyroll_core-3.0.0.post4/pyroll/core/rotator/__init__.py +0 -3
- pyroll_core-3.0.0.post4/pyroll/core/sequence/__init__.py +0 -3
- pyroll_core-3.0.0.post4/pyroll/core/transport/__init__.py +0 -4
- pyroll_core-3.0.0.post4/pyroll/core/unit/__init__.py +0 -3
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/.gitignore +0 -0
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/disk_elements/hookimpls.py +0 -0
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/roll_pass/hookimpls/__init__.py +0 -0
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/roll_pass/hookimpls/disk_element.py +0 -0
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/rotator/hookimpls.py +0 -0
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/sequence/hookimpls.py +0 -0
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/transport/hookimpls/__init__.py +0 -0
- {pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/unit/hookimpls.py +0 -0
|
@@ -8,4 +8,4 @@ Redistribution and use in source and binary forms, with or without modification,
|
|
|
8
8
|
|
|
9
9
|
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
10
10
|
|
|
11
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
11
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: pyroll-core
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.2
|
|
4
4
|
Summary: PyRoll rolling simulation framework - core library.
|
|
5
5
|
Project-URL: Homepage, https://pyroll-project.github.io
|
|
6
6
|
Project-URL: Repository, https://github.com/pyroll-project/pyroll-core
|
|
7
7
|
Project-URL: Documentation, https://pyroll.readthedocs.io/en/latest
|
|
8
8
|
Author-email: Max Weiner <max.weiner@imf.tu-freiberg.de>, Christoph Renzing <christoph.renzing@imf.tu-freiberg.de>, Matthias Schmidtchen <matthias.schmidtchen@imf.tu-freiberg.de>, Max Stirl <max.stirl@imf.tu-freiberg.de>
|
|
9
|
+
License-Expression: BSD-3-Clause
|
|
10
|
+
License-File: LICENSE
|
|
9
11
|
Classifier: Development Status :: 5 - Production/Stable
|
|
10
12
|
Classifier: Framework :: Hatch
|
|
11
13
|
Classifier: Framework :: IPython
|
|
@@ -75,10 +77,42 @@ The documentation of version 1.0 can be found [here](https://pyroll.readthedocs.
|
|
|
75
77
|
|
|
76
78
|
## Versions
|
|
77
79
|
|
|
78
|
-
The main branch of this repository contains the code of the version
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
The main branch of this repository contains the code of the version 3.x of PyRolL.
|
|
81
|
+
Backport branches exist for older versions:
|
|
82
|
+
|
|
83
|
+
- [v2.1.x](https://github.com/pyroll-project/pyroll-core/tree/v2.1_backport)
|
|
84
|
+
- [v1.0](https://github.com/pyroll-project/pyroll-core/tree/v1.0_backport) (out of support)
|
|
85
|
+
|
|
86
|
+
Versioning follows semantic versioning with the following rules:
|
|
87
|
+
|
|
88
|
+
- breaking changes of core API only in major versions
|
|
89
|
+
- feature releases with minor versions
|
|
90
|
+
- bugfixes with micro versions
|
|
91
|
+
- plugin versioning shall follow the core in major versions (so plugin v2.x works with core v2.x)
|
|
92
|
+
|
|
93
|
+
As breaking changes are considered:
|
|
94
|
+
|
|
95
|
+
- removal of public API functions / classes
|
|
96
|
+
- non backwards compatible signature changes of public API functions / classes
|
|
97
|
+
- removal of hooks
|
|
98
|
+
- removal of hook implementations in the core
|
|
99
|
+
- changes in hook implementations that would likely break plugin implementations
|
|
100
|
+
|
|
101
|
+
As features are considered:
|
|
102
|
+
|
|
103
|
+
- new public API functions / classes
|
|
104
|
+
- backwards compatible signature changes of public API functions / classes
|
|
105
|
+
- new hooks on existing units / profiles
|
|
106
|
+
- new hook implementations in the core
|
|
107
|
+
|
|
108
|
+
All other changes not considered as breaking change or feature are considered as bugfixes.
|
|
109
|
+
|
|
110
|
+
It is recommended to develop new plugins and extensions only for the latest major version.
|
|
111
|
+
|
|
112
|
+
### Principal Changes of Version 3.0 Respective to 2.0
|
|
113
|
+
|
|
114
|
+
- Refactoring of the roll pass class inheritance hierarchy to enable for support of asymmetric passes.
|
|
115
|
+
- Introduction of pre- and post-processors to simplify implementation of some models.
|
|
82
116
|
|
|
83
117
|
### Principal Changes of Version 2.0 Respective to 1.0
|
|
84
118
|
|
|
@@ -36,10 +36,42 @@ The documentation of version 1.0 can be found [here](https://pyroll.readthedocs.
|
|
|
36
36
|
|
|
37
37
|
## Versions
|
|
38
38
|
|
|
39
|
-
The main branch of this repository contains the code of the version
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
The main branch of this repository contains the code of the version 3.x of PyRolL.
|
|
40
|
+
Backport branches exist for older versions:
|
|
41
|
+
|
|
42
|
+
- [v2.1.x](https://github.com/pyroll-project/pyroll-core/tree/v2.1_backport)
|
|
43
|
+
- [v1.0](https://github.com/pyroll-project/pyroll-core/tree/v1.0_backport) (out of support)
|
|
44
|
+
|
|
45
|
+
Versioning follows semantic versioning with the following rules:
|
|
46
|
+
|
|
47
|
+
- breaking changes of core API only in major versions
|
|
48
|
+
- feature releases with minor versions
|
|
49
|
+
- bugfixes with micro versions
|
|
50
|
+
- plugin versioning shall follow the core in major versions (so plugin v2.x works with core v2.x)
|
|
51
|
+
|
|
52
|
+
As breaking changes are considered:
|
|
53
|
+
|
|
54
|
+
- removal of public API functions / classes
|
|
55
|
+
- non backwards compatible signature changes of public API functions / classes
|
|
56
|
+
- removal of hooks
|
|
57
|
+
- removal of hook implementations in the core
|
|
58
|
+
- changes in hook implementations that would likely break plugin implementations
|
|
59
|
+
|
|
60
|
+
As features are considered:
|
|
61
|
+
|
|
62
|
+
- new public API functions / classes
|
|
63
|
+
- backwards compatible signature changes of public API functions / classes
|
|
64
|
+
- new hooks on existing units / profiles
|
|
65
|
+
- new hook implementations in the core
|
|
66
|
+
|
|
67
|
+
All other changes not considered as breaking change or feature are considered as bugfixes.
|
|
68
|
+
|
|
69
|
+
It is recommended to develop new plugins and extensions only for the latest major version.
|
|
70
|
+
|
|
71
|
+
### Principal Changes of Version 3.0 Respective to 2.0
|
|
72
|
+
|
|
73
|
+
- Refactoring of the roll pass class inheritance hierarchy to enable for support of asymmetric passes.
|
|
74
|
+
- Introduction of pre- and post-processors to simplify implementation of some models.
|
|
43
75
|
|
|
44
76
|
### Principal Changes of Version 2.0 Respective to 1.0
|
|
45
77
|
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
from . import shapes # noqa: F401
|
|
2
|
+
|
|
3
|
+
from .grooves import (
|
|
4
|
+
GrooveBase,
|
|
5
|
+
SplineGroove,
|
|
6
|
+
GenericElongationGroove,
|
|
7
|
+
BoxGroove,
|
|
8
|
+
ConstrictedBoxGroove,
|
|
9
|
+
UpsetBoxGroove,
|
|
10
|
+
ConstrictedUpsetBoxGroove,
|
|
11
|
+
DiamondGroove,
|
|
12
|
+
SquareGroove,
|
|
13
|
+
GothicGroove,
|
|
14
|
+
CircularOvalGroove,
|
|
15
|
+
FlatOvalGroove,
|
|
16
|
+
SwedishOvalGroove,
|
|
17
|
+
ConstrictedSwedishOvalGroove,
|
|
18
|
+
Oval3RadiiGroove,
|
|
19
|
+
Oval3RadiiFlankedGroove,
|
|
20
|
+
UpsetOvalGroove,
|
|
21
|
+
ConstrictedCircularOvalGroove,
|
|
22
|
+
RoundGroove,
|
|
23
|
+
FalseRoundGroove,
|
|
24
|
+
FlatGroove,
|
|
25
|
+
HexagonalGroove,
|
|
26
|
+
EquivalentRibbedGroove,
|
|
27
|
+
create_groove_by_type_name,
|
|
28
|
+
)
|
|
29
|
+
from .transport import Transport, CoolingPipe
|
|
30
|
+
from .roll_pass import BaseRollPass, DeformationUnit, ThreeRollPass, SymmetricRollPass, TwoRollPass
|
|
31
|
+
from .roll_pass import TwoRollPass as RollPass
|
|
32
|
+
from .unit import Unit
|
|
33
|
+
from .roll import Roll
|
|
34
|
+
from .profile import (
|
|
35
|
+
Profile,
|
|
36
|
+
RoundProfile,
|
|
37
|
+
DiamondProfile,
|
|
38
|
+
BoxProfile,
|
|
39
|
+
SquareProfile,
|
|
40
|
+
)
|
|
41
|
+
from .rotator import Rotator
|
|
42
|
+
from .sequence import PassSequence
|
|
43
|
+
from .hooks import Hook, HookHost, HookFunction, root_hooks
|
|
44
|
+
from .disk_elements import DiskElementUnit
|
|
45
|
+
from .config import Config, config, PlottingBackend, ConfigValue, ConfigMeta
|
|
46
|
+
|
|
47
|
+
VERSION = "3.0.2"
|
|
48
|
+
|
|
49
|
+
__all__ = [
|
|
50
|
+
# grooves
|
|
51
|
+
"GrooveBase",
|
|
52
|
+
"SplineGroove",
|
|
53
|
+
"GenericElongationGroove",
|
|
54
|
+
"BoxGroove",
|
|
55
|
+
"ConstrictedBoxGroove",
|
|
56
|
+
"UpsetBoxGroove",
|
|
57
|
+
"ConstrictedUpsetBoxGroove",
|
|
58
|
+
"DiamondGroove",
|
|
59
|
+
"SquareGroove",
|
|
60
|
+
"GothicGroove",
|
|
61
|
+
"CircularOvalGroove",
|
|
62
|
+
"FlatOvalGroove",
|
|
63
|
+
"SwedishOvalGroove",
|
|
64
|
+
"ConstrictedSwedishOvalGroove",
|
|
65
|
+
"Oval3RadiiGroove",
|
|
66
|
+
"Oval3RadiiFlankedGroove",
|
|
67
|
+
"UpsetOvalGroove",
|
|
68
|
+
"ConstrictedCircularOvalGroove",
|
|
69
|
+
"RoundGroove",
|
|
70
|
+
"FalseRoundGroove",
|
|
71
|
+
"FlatGroove",
|
|
72
|
+
"HexagonalGroove",
|
|
73
|
+
"EquivalentRibbedGroove",
|
|
74
|
+
"create_groove_by_type_name",
|
|
75
|
+
# profile
|
|
76
|
+
"Profile",
|
|
77
|
+
"RoundProfile",
|
|
78
|
+
"DiamondProfile",
|
|
79
|
+
"BoxProfile",
|
|
80
|
+
"SquareProfile",
|
|
81
|
+
# unit
|
|
82
|
+
"Unit",
|
|
83
|
+
# transport
|
|
84
|
+
"Transport",
|
|
85
|
+
"CoolingPipe",
|
|
86
|
+
# roll_pass
|
|
87
|
+
"RollPass",
|
|
88
|
+
"BaseRollPass",
|
|
89
|
+
"TwoRollPass",
|
|
90
|
+
"ThreeRollPass",
|
|
91
|
+
"DeformationUnit",
|
|
92
|
+
"SymmetricRollPass",
|
|
93
|
+
# roll
|
|
94
|
+
"Roll",
|
|
95
|
+
# sequence
|
|
96
|
+
"PassSequence",
|
|
97
|
+
# rotator
|
|
98
|
+
"Rotator",
|
|
99
|
+
# disk_elements
|
|
100
|
+
"DiskElementUnit",
|
|
101
|
+
# hooks
|
|
102
|
+
"HookFunction",
|
|
103
|
+
"HookHost",
|
|
104
|
+
"Hook",
|
|
105
|
+
"root_hooks",
|
|
106
|
+
# config
|
|
107
|
+
"Config",
|
|
108
|
+
"ConfigValue",
|
|
109
|
+
"config",
|
|
110
|
+
"ConfigMeta",
|
|
111
|
+
"PlottingBackend",
|
|
112
|
+
]
|
|
113
|
+
|
|
114
|
+
root_hooks.extend(
|
|
115
|
+
[
|
|
116
|
+
BaseRollPass.roll_force,
|
|
117
|
+
BaseRollPass.Roll.roll_torque,
|
|
118
|
+
BaseRollPass.elongation_efficiency,
|
|
119
|
+
Unit.power,
|
|
120
|
+
Unit.OutProfile.cross_section,
|
|
121
|
+
Unit.OutProfile.classifiers,
|
|
122
|
+
Unit.OutProfile.strain,
|
|
123
|
+
Unit.OutProfile.length,
|
|
124
|
+
Unit.OutProfile.t,
|
|
125
|
+
BaseRollPass.strain_rate,
|
|
126
|
+
BaseRollPass.OutProfile.filling_ratio,
|
|
127
|
+
BaseRollPass.OutProfile.cross_section_filling_ratio,
|
|
128
|
+
BaseRollPass.OutProfile.filling_error,
|
|
129
|
+
BaseRollPass.OutProfile.cross_section_error,
|
|
130
|
+
BaseRollPass.OutProfile.velocity,
|
|
131
|
+
BaseRollPass.InProfile.velocity,
|
|
132
|
+
PassSequence.log_elongation,
|
|
133
|
+
BaseRollPass.OutProfile.technologically_orientated_cross_section,
|
|
134
|
+
BaseRollPass.technologically_orientated_contour_lines,
|
|
135
|
+
]
|
|
136
|
+
)
|
|
@@ -1,19 +1,23 @@
|
|
|
1
|
+
import enum
|
|
1
2
|
import os
|
|
3
|
+
from enum import Enum
|
|
2
4
|
from pathlib import Path
|
|
3
5
|
from typing import Optional, Iterable, Mapping, Any, Callable
|
|
4
6
|
|
|
7
|
+
__all__ = ["Config", "ConfigValue", "config", "ConfigMeta"]
|
|
8
|
+
|
|
5
9
|
|
|
6
10
|
class ConfigValue:
|
|
7
11
|
"""Helper descriptor for storing configuration values, able to determine the value from explictly set values,
|
|
8
|
-
|
|
12
|
+
environment variables and default values."""
|
|
9
13
|
|
|
10
14
|
def __init__(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
self,
|
|
16
|
+
default,
|
|
17
|
+
*,
|
|
18
|
+
env_var: Optional[str] = None,
|
|
19
|
+
env_var_prefix: Optional[str] = None,
|
|
20
|
+
parser: Optional[Callable[[str], Any]] = None,
|
|
17
21
|
):
|
|
18
22
|
self.default = default
|
|
19
23
|
self.type = type(default)
|
|
@@ -26,7 +30,7 @@ class ConfigValue:
|
|
|
26
30
|
self.owner = owner
|
|
27
31
|
self.name = name
|
|
28
32
|
if not self._env_var_prefix:
|
|
29
|
-
self._env_var_prefix = self.owner.__module__.upper().replace(
|
|
33
|
+
self._env_var_prefix = self.owner.__module__.upper().replace(".", "_")
|
|
30
34
|
|
|
31
35
|
@property
|
|
32
36
|
def env_var(self):
|
|
@@ -48,7 +52,7 @@ class ConfigValue:
|
|
|
48
52
|
value = os.getenv(self.env_var, None)
|
|
49
53
|
|
|
50
54
|
if value is not None:
|
|
51
|
-
return self.
|
|
55
|
+
return self.parse(value)
|
|
52
56
|
|
|
53
57
|
return self.default
|
|
54
58
|
|
|
@@ -58,7 +62,7 @@ class ConfigValue:
|
|
|
58
62
|
def __delete__(self, instance):
|
|
59
63
|
delattr(instance, "_" + self.name)
|
|
60
64
|
|
|
61
|
-
def
|
|
65
|
+
def parse(self, s: str):
|
|
62
66
|
"""Parse value from string."""
|
|
63
67
|
if self.parser:
|
|
64
68
|
return self.parser(s)
|
|
@@ -72,6 +76,11 @@ class ConfigValue:
|
|
|
72
76
|
return Path(s)
|
|
73
77
|
if self.type is str:
|
|
74
78
|
return s
|
|
79
|
+
if issubclass(self.type, enum.Enum):
|
|
80
|
+
try:
|
|
81
|
+
return self.type(int(s))
|
|
82
|
+
except ValueError:
|
|
83
|
+
return self.type[s.upper()]
|
|
75
84
|
if issubclass(self.type, Mapping):
|
|
76
85
|
return self.type((p2.strip() for p2 in p.strip().split("=")) for p in s.split(","))
|
|
77
86
|
if issubclass(self.type, Iterable):
|
|
@@ -83,11 +92,7 @@ class ConfigValue:
|
|
|
83
92
|
class ConfigMeta(type):
|
|
84
93
|
def to_dict(cls):
|
|
85
94
|
"""Return the config values of this class as dict."""
|
|
86
|
-
return {
|
|
87
|
-
n: v
|
|
88
|
-
for n, v in type(cls).__dict__.items()
|
|
89
|
-
if isinstance(v, ConfigValue)
|
|
90
|
-
}
|
|
95
|
+
return {n: v for n, v in type(cls).__dict__.items() if isinstance(v, ConfigValue)}
|
|
91
96
|
|
|
92
97
|
def update(cls, d: dict[str, Any]):
|
|
93
98
|
"""
|
|
@@ -138,10 +143,7 @@ def config(env_var_prefix):
|
|
|
138
143
|
else:
|
|
139
144
|
# noinspection PyProtectedMember
|
|
140
145
|
meta_dict[n] = ConfigValue(
|
|
141
|
-
default=v.default,
|
|
142
|
-
env_var_prefix=env_var_prefix,
|
|
143
|
-
env_var=v._env_var,
|
|
144
|
-
parser=v.parser
|
|
146
|
+
default=v.default, env_var_prefix=env_var_prefix, env_var=v._env_var, parser=v.parser
|
|
145
147
|
)
|
|
146
148
|
|
|
147
149
|
meta = type(cls.__name__ + "Meta", (ConfigMeta,), meta_dict)
|
|
@@ -151,9 +153,15 @@ def config(env_var_prefix):
|
|
|
151
153
|
return dec
|
|
152
154
|
|
|
153
155
|
|
|
156
|
+
class PlottingBackend(Enum):
|
|
157
|
+
PLOTLY = 1
|
|
158
|
+
MATPLOTLIB = 2
|
|
159
|
+
|
|
160
|
+
|
|
154
161
|
@config("PYROLL_CORE")
|
|
155
162
|
class Config:
|
|
156
163
|
"""Configuration class for ``pyroll.core``."""
|
|
164
|
+
|
|
157
165
|
ROLL_PASS_AUTO_ROTATION = True
|
|
158
166
|
"""Whether to enable automatic rotation of incoming profiles in roll passes by default."""
|
|
159
167
|
|
|
@@ -185,7 +193,7 @@ class Config:
|
|
|
185
193
|
"""Standard acceleration of gravity g0."""
|
|
186
194
|
|
|
187
195
|
PROFILE_CONTOUR_REFINEMENT = 0
|
|
188
|
-
"""Refine the line string of profile contours with more intermediate points.
|
|
196
|
+
"""Refine the line string of profile contours with more intermediate points.
|
|
189
197
|
Higher integers mean finer. Values < 1 disable this feature."""
|
|
190
198
|
|
|
191
199
|
GROOVE_RADIUS_POINT_COUNT = 20
|
|
@@ -199,3 +207,6 @@ class Config:
|
|
|
199
207
|
|
|
200
208
|
PLOT_RESOLUTION = 100
|
|
201
209
|
"""Resolution of plots in dots per inches (dpi)."""
|
|
210
|
+
|
|
211
|
+
PREFERRED_PLOTTING_BACKEND = PlottingBackend.PLOTLY
|
|
212
|
+
"""Sets the preferred plotting backend to use when both matplotlib and plotly are installed."""
|
{pyroll_core-3.0.0.post4 → pyroll_core-3.0.2}/pyroll/core/disk_elements/disk_element_unit.py
RENAMED
|
@@ -4,6 +4,8 @@ from ..unit import Unit
|
|
|
4
4
|
from ..hooks import Hook
|
|
5
5
|
from ..profile import Profile as BaseProfile
|
|
6
6
|
|
|
7
|
+
__all__ = ["DiskElementUnit"]
|
|
8
|
+
|
|
7
9
|
|
|
8
10
|
class DiskElementUnit(Unit):
|
|
9
11
|
"""Base class for units that can be divided in disk elements."""
|
|
@@ -27,12 +29,7 @@ class DiskElementUnit(Unit):
|
|
|
27
29
|
Use the specialized disk elements of the respective parent unit instead.
|
|
28
30
|
"""
|
|
29
31
|
|
|
30
|
-
def __init__(
|
|
31
|
-
self,
|
|
32
|
-
parent: 'Unit',
|
|
33
|
-
index: int,
|
|
34
|
-
**kwargs
|
|
35
|
-
):
|
|
32
|
+
def __init__(self, parent: "Unit", index: int, **kwargs):
|
|
36
33
|
"""
|
|
37
34
|
:param label: label for human identification
|
|
38
35
|
:param kwargs: additional hook values as keyword arguments to set explicitly
|
|
@@ -44,7 +41,7 @@ class DiskElementUnit(Unit):
|
|
|
44
41
|
"""Represents a profile in context of a disk element unit."""
|
|
45
42
|
|
|
46
43
|
@property
|
|
47
|
-
def disk_element(self) ->
|
|
44
|
+
def disk_element(self) -> "DiskElementUnit.DiskElement":
|
|
48
45
|
"""Reference to the disk element. Alias for ``self.unit``"""
|
|
49
46
|
return cast(DiskElementUnit.DiskElement, self.unit)
|
|
50
47
|
|
|
@@ -55,19 +52,17 @@ class DiskElementUnit(Unit):
|
|
|
55
52
|
"""Represents an outgoing profile of a disk element unit."""
|
|
56
53
|
|
|
57
54
|
@property
|
|
58
|
-
def disk_elements(self) -> List[
|
|
55
|
+
def disk_elements(self) -> List["DiskElement"]:
|
|
59
56
|
"""A list of disk elements used to subdivide this unit."""
|
|
60
57
|
return self._subunits
|
|
61
58
|
|
|
62
59
|
@property
|
|
63
60
|
def __attrs__(self):
|
|
64
|
-
return super().__attrs__ | {
|
|
65
|
-
"disk_elements": self.disk_elements
|
|
66
|
-
}
|
|
61
|
+
return super().__attrs__ | {"disk_elements": self.disk_elements}
|
|
67
62
|
|
|
68
63
|
def init_solve(self, in_profile: BaseProfile):
|
|
69
64
|
super().init_solve(in_profile)
|
|
70
65
|
if not self._subunits:
|
|
71
66
|
self._subunits = self._SubUnitsList(
|
|
72
67
|
self, [self.DiskElement(self, i) for i in range(self.disk_element_count)]
|
|
73
|
-
|
|
68
|
+
)
|
|
@@ -15,7 +15,7 @@ from .ovals import (
|
|
|
15
15
|
Oval3RadiiGroove,
|
|
16
16
|
Oval3RadiiFlankedGroove,
|
|
17
17
|
UpsetOvalGroove,
|
|
18
|
-
ConstrictedCircularOvalGroove
|
|
18
|
+
ConstrictedCircularOvalGroove,
|
|
19
19
|
)
|
|
20
20
|
|
|
21
21
|
from .rounds import RoundGroove, FalseRoundGroove
|
|
@@ -26,6 +26,34 @@ from .hexagonal import HexagonalGroove
|
|
|
26
26
|
|
|
27
27
|
from .equivalent_ripped_groove import EquivalentRibbedGroove
|
|
28
28
|
|
|
29
|
+
__all__ = [
|
|
30
|
+
"GrooveBase",
|
|
31
|
+
"SplineGroove",
|
|
32
|
+
"GenericElongationGroove",
|
|
33
|
+
"BoxGroove",
|
|
34
|
+
"ConstrictedBoxGroove",
|
|
35
|
+
"UpsetBoxGroove",
|
|
36
|
+
"ConstrictedUpsetBoxGroove",
|
|
37
|
+
"DiamondGroove",
|
|
38
|
+
"SquareGroove",
|
|
39
|
+
"GothicGroove",
|
|
40
|
+
"CircularOvalGroove",
|
|
41
|
+
"FlatOvalGroove",
|
|
42
|
+
"SwedishOvalGroove",
|
|
43
|
+
"ConstrictedSwedishOvalGroove",
|
|
44
|
+
"Oval3RadiiGroove",
|
|
45
|
+
"Oval3RadiiFlankedGroove",
|
|
46
|
+
"UpsetOvalGroove",
|
|
47
|
+
"ConstrictedCircularOvalGroove",
|
|
48
|
+
"RoundGroove",
|
|
49
|
+
"FalseRoundGroove",
|
|
50
|
+
"FlatGroove",
|
|
51
|
+
"HexagonalGroove",
|
|
52
|
+
"EquivalentRibbedGroove",
|
|
53
|
+
"create_groove_by_type_name",
|
|
54
|
+
]
|
|
55
|
+
|
|
56
|
+
|
|
29
57
|
def create_groove_by_type_name(type_name: str, **kwargs) -> GrooveBase:
|
|
30
58
|
"""
|
|
31
59
|
Helper function to create a groove instance by giving a type name and respective keyword arguments.
|
|
@@ -38,12 +66,13 @@ def create_groove_by_type_name(type_name: str, **kwargs) -> GrooveBase:
|
|
|
38
66
|
allowed arguments depend on the actual groove-type
|
|
39
67
|
"""
|
|
40
68
|
import re
|
|
69
|
+
|
|
41
70
|
type_name = re.sub(r"[\s\-_.]+(\w)", lambda m: m.group(1).capitalize(), type_name.title())
|
|
42
71
|
type_name = type_name if type_name.endswith("Groove") else type_name + "Groove"
|
|
43
72
|
|
|
44
73
|
import sys
|
|
45
74
|
|
|
46
|
-
groove_cls = getattr(sys.modules[__name__], type_name, None)
|
|
75
|
+
groove_cls = getattr(sys.modules[__name__], type_name, None) # try to get classes of grooves package first
|
|
47
76
|
|
|
48
77
|
# otherwise scan over all loaded modules
|
|
49
78
|
if not groove_cls:
|
|
@@ -57,4 +86,3 @@ def create_groove_by_type_name(type_name: str, **kwargs) -> GrooveBase:
|
|
|
57
86
|
raise ValueError(f"No groove class named {type_name} found in loaded modules.")
|
|
58
87
|
|
|
59
88
|
return groove_cls(**kwargs)
|
|
60
|
-
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
from abc import
|
|
2
|
-
from typing import Union
|
|
1
|
+
from abc import abstractmethod
|
|
2
|
+
from typing import Union
|
|
3
3
|
|
|
4
4
|
import numpy as np
|
|
5
5
|
from shapely.geometry import Polygon, LineString
|
|
6
6
|
|
|
7
7
|
from ..repr import ReprMixin
|
|
8
8
|
|
|
9
|
+
__all__ = ["GrooveBase"]
|
|
10
|
+
|
|
9
11
|
|
|
10
12
|
class GrooveBase(ReprMixin):
|
|
11
13
|
"""Abstract base class for all grooves."""
|
|
@@ -14,55 +16,58 @@ class GrooveBase(ReprMixin):
|
|
|
14
16
|
@abstractmethod
|
|
15
17
|
def classifiers(self) -> set[str]:
|
|
16
18
|
"""A tuple of keywords to specify the type classifiers of this groove."""
|
|
17
|
-
raise
|
|
19
|
+
raise NotImplementedError
|
|
18
20
|
|
|
19
21
|
@property
|
|
20
22
|
@abstractmethod
|
|
21
23
|
def cross_section(self) -> Polygon:
|
|
22
24
|
"""A polygon representing the cross-section of this groove limited by the contour line and y=0."""
|
|
23
|
-
raise
|
|
25
|
+
raise NotImplementedError
|
|
24
26
|
|
|
25
27
|
@property
|
|
26
28
|
@abstractmethod
|
|
27
29
|
def usable_width(self) -> float:
|
|
28
30
|
"""The usable width of the groove, meaning the width of ideal filling."""
|
|
29
|
-
raise
|
|
31
|
+
raise NotImplementedError
|
|
30
32
|
|
|
31
33
|
@property
|
|
32
34
|
@abstractmethod
|
|
33
35
|
def width(self) -> float:
|
|
34
36
|
"""The maximum width of the groove representing the definition region in z-direction."""
|
|
35
|
-
raise
|
|
37
|
+
raise NotImplementedError
|
|
36
38
|
|
|
37
39
|
@property
|
|
38
40
|
@abstractmethod
|
|
39
41
|
def depth(self) -> float:
|
|
40
42
|
"""The maximum depth of the groove."""
|
|
41
|
-
raise
|
|
43
|
+
raise NotImplementedError
|
|
42
44
|
|
|
43
45
|
@property
|
|
44
46
|
@abstractmethod
|
|
45
47
|
def contour_line(self) -> LineString:
|
|
46
48
|
"""A line representing the geometry of the groove contour."""
|
|
47
|
-
raise
|
|
49
|
+
raise NotImplementedError
|
|
50
|
+
|
|
51
|
+
@property
|
|
52
|
+
@abstractmethod
|
|
53
|
+
def groove_factor(self) -> LineString:
|
|
54
|
+
"""The groove factor marks the y - position of the working radius ."""
|
|
55
|
+
raise NotImplementedError
|
|
48
56
|
|
|
49
57
|
@property
|
|
50
58
|
@abstractmethod
|
|
51
59
|
def contour_points(self) -> np.ndarray:
|
|
52
60
|
"""An array of the contour line's points of shape (n, 2)."""
|
|
53
|
-
raise
|
|
61
|
+
raise NotImplementedError
|
|
54
62
|
|
|
55
63
|
@abstractmethod
|
|
56
64
|
def local_depth(self, z: Union[float, np.ndarray]) -> Union[float, np.ndarray]:
|
|
57
65
|
"""Function of the local groove depth in dependence on the z-coordinate."""
|
|
58
|
-
raise
|
|
66
|
+
raise NotImplementedError
|
|
59
67
|
|
|
60
68
|
@property
|
|
61
69
|
def __attrs__(self):
|
|
62
|
-
return {
|
|
63
|
-
n: v for n in ["depth", "usable_width", "classifiers", "contour_line"]
|
|
64
|
-
if (v := getattr(self, n))
|
|
65
|
-
}
|
|
70
|
+
return {n: v for n in ["depth", "usable_width", "classifiers", "contour_line"] if (v := getattr(self, n))}
|
|
66
71
|
|
|
67
72
|
def _plot_matplotlib_(self):
|
|
68
73
|
import matplotlib.pyplot as plt
|
|
@@ -90,9 +95,6 @@ class GrooveBase(ReprMixin):
|
|
|
90
95
|
|
|
91
96
|
fig.update_traces(line_color="black")
|
|
92
97
|
|
|
93
|
-
fig.update_yaxes(
|
|
94
|
-
scaleanchor="x",
|
|
95
|
-
scaleratio=1
|
|
96
|
-
)
|
|
98
|
+
fig.update_yaxes(scaleanchor="x", scaleratio=1)
|
|
97
99
|
|
|
98
100
|
return fig
|