Interactive profile editor
ProfileEditor();
This function is an interactive and graphical profile editor for turned workpieces. The user may draw the exterior and interior profiles of the workpiece. The profiles are described using Bezier curves. The position of the knots is given interactively by the mouse.
The user usually starts by defining the external profile of the workpiece, then he can create the interior profile by the same way or ask for automatic generation of the interior profile assuming a constant wall thickness (this generated profile can be kept as is or used as a guide line for interactive edition of the internal one).
Profiles can be saved for later modification, or as an initialization of the RingEditor tool.
A view of the editor with an exterior profile (red) defined by the Bezier's knots (blue), the interior profile by default (black) and the user defined interior profile (blue).
The profile design should be done from bottom to top of the workpiece. When one click the left button on a point higher than the pevious one, a Bezier knot is added shown as a blue cross and the current state of the profile is drawn in red (if there are 3 or more knots).
If one click a point between two knots an intermediate knot is added, this can be used to refine the profile curve.
At any time the user may move a knot pressing the left button on it and dragging it to the desired position, the profile is dynamically updated during the move action.
It is possible to undo the previous actions using the CTRL-z key.
A click with the middle button over a knot removes it.
The mouse position is shown (in mm) in the information bar at the bottom of the figure.
The ProfileEditor function provides two main menus with submenus:
This submenu must be called up at the very beginning of the profile design process. It allows to specify the height and diameter of the part as well as the default wall thickness (this last data is necessary for the automatic generation of the interior profile).
It is also possible to call this submenu during the design.
This submenu allows to hide, for a better lisibility, the Bezier knots used for the design of the or show them again for refinements.
This submenu allows you to switch between editing of the outer profile or that of the inner profile.
This submenu generates and draws automatically the interior profile generated assuming constant the wall thickness given with the submenu "Room dimensions".
This submenu allow to reload a design previously saved. The default extension for the files containing profile design is ".pf". The short-cut CTRL-O can be used instead of the menu.
This submenu allows to save a profile design in the file where it as been previously saved using the "SaveAs" menu. It can be used to keep in memory a step of design or for further use in the RingEditor tool.
This submenu can be used to save the current design in a user-defined file.
This submenu closes the Profile editor. If the current design has been modified and not saved previously a warning message is issued.