The Concept of Profiles¶
Think of a Profile
object as of a state of the workpiece anywhere in the pass sequence. Every sequence unit
has an incoming and an outgoing profile. Also, you must provide a profile as definition for the initial workpiece being
processed in the pass sequence.
Profiles Each profile has a certain shape, defined by the upper_contour_line
and lower_contour_line
and its main
dimensions height
and width
.
For creating an initial profile, several class methods exist in the Profile
class. One can either derive the
profile shape from an existing groove object by use of the Profile.from_groove()
method, or created some
standard shapes use of the other class methods of Profile
, like Profile.round()
. More values can be
given as keyword arguments and are saved automatically as attributes in the instance. Which you may or must provide
depends on the loaded plugins.
- class Profile(**kwargs)¶
- Parameters
hook_args – keyword arguments to pass to hook calls
- classmethod box(height: float, width: float, corner_radius: float = 0, **kwargs) Profile ¶
Creates a box shaped profile (a real rectangular shape with rounded corners, without imperfections of box grooves). A box is oriented to stand on its side, use
square()
to create a corner standing square.- Parameters
height – the height of the box profile, must be > 0
width – the width of the box profile, must be > 0
corner_radius – the radius of the square’s corners, must be >= 0, <= height / 2 and <= width / 2
kwargs – additional keyword arguments to be passed to the Profile constructor
- Raises
ValueError – if arguments are out of range
- classmethod diamond(height: float, width: float, corner_radius: float = 0, **kwargs) Profile ¶
Creates a diamond shaped profile (a real diamond shape with rounded corners, without imperfections of diamond grooves). A diamond is oriented to stand on its corner.
- Parameters
height – the height of the diamond profile, must be > 0
width – the width of the diamond profile, must be > 0
corner_radius – the radius of the diamonds’s corners, must be >= 0, <= height / 2 and <= width / 2
kwargs – additional keyword arguments to be passed to the Profile constructor
- Raises
ValueError – if arguments are out of range
- classmethod from_groove(groove: GrooveBase, width: Optional[float] = None, filling: Optional[float] = None, height: Optional[float] = None, gap: Optional[float] = None, **kwargs) Profile ¶
Create a profile instance based on a given groove. The dimensioning of the profile is determined by the parameters
width
,filling
,height
andgap
. Give exactly one ofwidth
andfilling
. Give exactly one ofheight
andgap
.- Parameters
groove – the groove the profile should be created from
width – the width of the resulting profile, must be > 0
filling – the filling ratio of the groove, must be > 0
height – the height of the profile, must be > 0
gap – the gap between the groove contours (roll gap), must be >= 0
kwargs – additional keyword arguments to be passed to the Profile constructor
- Raises
TypeError – on invalid argument combinations
ValueError – if arguments are out of range
- hook_result_attributes: Set[str]¶
Set remembering all hooks that were called on this class, used by
delete_hook_result_attributes()
.
- classmethod round(radius: Optional[float] = None, diameter: Optional[float] = None, **kwargs) Profile ¶
Creates a round shaped profile (a real circle round, without imperfections of round grooves). Give exactly one of
radius
anddiameter
.- Parameters
radius – the radius of the round profile, must be > 0
diameter – the diameter of the round profile, must be > 0
kwargs – additional keyword arguments to be passed to the Profile constructor
- Raises
TypeError – on invalid argument combinations
ValueError – if arguments are out of range
- classmethod square(side: Optional[float] = None, diagonal: Optional[float] = None, corner_radius: float = 0, **kwargs) Profile ¶
Creates a square shaped profile (a real square with rounded corners, without imperfections of square grooves). A square is oriented to stand on its corner, use
box()
to create a side standing one. Give exactly one ofside
anddiagonal
.- Parameters
side – the side length of the square profile, must be > 0
diagonal – the diagonal’s length of the square profile, must be > 0. Note, that the diagonal is measured at the tips, as if the corner radii were not present for consistency with
box()
.corner_radius – the radius of the square’s corners, must be >= 0 and <= side / 2
kwargs – additional keyword arguments to be passed to the Profile constructor
- Raises
TypeError – on invalid argument combinations
ValueError – if arguments are out of range
Hooks¶
To read about the basics of hooks and plugins, see here.
The following hooks are defined on plain profiles per default:
- equivalent_rectangle(profile: Profile) Polygon ¶
Get the dimensions of the equivalent rectangle of the profile.
Derived classes¶
For the units types RollPass
and Transport
, specialized versions of
the Profile
class are defined as nested classes within the respective unit class. They all maintain their own hooks,
so it is possible to specify hooks on profiles only for those places, were they are applicable.
All hooks on those classes receive additionally to the profile instance also the instance of the roll pass or transport they are belonging to.