Creating a Forming Tool operation is essentially a special 3D fragments insertion, where fragments represent frequently used stamped features.
The system is supplied with a set of such fragments - libraries <Sheet Metal Features> and <Sheet Metal Features Inch> (for working with inch units of length). This section describes the sequence of actions to create a custom element for these libraries.
The elements of the stamped features library are 3D models built according to certain rules. The 3D model of each element is based on a basic 3D profile. It is an "external parameter" of the stamped feature fragment, similar to the external geometric parameters of adaptive 3D fragments.
Stamped features are applied to a part using the Forming Tool command. At that time, a 3D profile is selected on the part, that defines the desired shape of the stamped feature. That profile is passed by the command into the 3D model of the stamped feature and is used to substitute its base profile. The 3D model of the stamped feature is recalculated according to the new shape of the profile and is inserted into the part's 3D model.
Let's review the creation of a new element using the example of the Emboss element included in the standard T-FLEX CAD distribution.
The diagram shows a draft of the elements being created. The inner and outer surfaces of the prospective element are marked by different colors. The dimensions indicate the parameters whose values can be defined by the user. Besides those, the user will be able to select the blending radius of the corners of the original profile. The new sheet metal feature element shall be created as a 3D fragment in the assembly context. Therefore, first you need to create an auxiliary file with the "workpiece" part, to which the forming feature will be applied. This is exactly the document, in which the 3D fragment-forming feature will be created in the assembly context.
An auxiliary file is required only for the process of creating a new stamped feature. You can delete it once the library element creation is complete.
Creating Auxiliary Document
Let's create an auxiliary document to create a stamped feature. Create a new 3D model.
In the created document, let's build the "workpiece" part for the stamped feature (by any familiar means). The workpiece should have a simple shape and as few edges and surfaces as possible. The stamped feature element file size will depend on how simple the workpiece is, and so will the time to open and recalculate the element. Best of all is to make it round and flat. Let's create the 3D profile on the top faces of the workpiece, that will be the base profile of the stamped feature. The profile should also be made as simple as possible. In this example, let's create a triangular profile.
Save the file under the name Part for emboss. Now we can proceed with creation of the forming feature element itself.
Creating the 3D Model of a Stamped Feature
1. Create a new 3D fragment by calling the command Create Fragment in Assembly and specify an arbitrary name for the prospective element, for example, "Emboss new". After clicking ОК, the assembly context mode activates automatically (the source body will become transparent).
Make sure that the associative snapping mode is On. To do this, click the right mouse button on an empty space in the 3D window and select the context menu item Snap Modes.
2. In the variable editor, create required variables that will define the element parameters: Depth, Angle, Radius_side, Radius_below, Radius_above. All variables must be external.
3. To correctly create the stamped feature, you need to know the thickness of the source workpiece. To have this thickness defined automatically, you can use the top and bottom faces of the workpiece. Call the command Measure, select the option Measure relation between two elements. Specify the top and bottom faces of the workpiece, and click .
In the list of relations, select the Distance, in the Variables tab, click Add Variable, enter the name of the Thickness variable and click . Now a variable Thickness has been created, the value of which is equal to the distance between the selected faces (the thickness of the workpiece).
4. Extrude the triangular profile lying on the top face of the source body. When creating the extrusion, the top face shall be selected for the direction; click the button in the parameters window to reverse the extrusion vector. The window of the extrusion parameters should look as shown in the figure.
The end blending shall be defined by the Radius_below, the side edges blending – by the Radius_side variable. When creating an ordinary model, it is possible to skip using Blend Parameters for the extrusion and instead use common blend operations. However, in the present case that is not an option, since the model must correctly recalculate with any admissible 3D profile. If, for example, we would change the number of joint points of the top 3D profile in the "Part for emboss" file, then the 3D model in the "Emboss new" file would still recalculate correctly. If using an ordinary blend, then this may not work if it fails to account for the increased number of profile edges.
The extrusion we have created ("Extrusion_1") will be used to obtain the inner surface of the forming feature.
5. To obtain the external surface, we will use the Offset Body operation. Call the command, select the Select Body option, and specify the extrusion created in the previous step.
Select the type - Outside, in the Offset field, enter the name of the variable "Thickness". The Keep Source Body checkbox should also be enabled.
The created body will be named "Offset Body_1".
6. By now we created the inner portion of the "Emboss new" prospective element – "Extrusion_1", its outer portion – "Offset Body_1" and the source workpiece – "Reference to Extrusion_1 (from assembly)". But "Offset Body_1" comes out above the source body. This outcoming portion needs to be deleted.
1. Offset Body_1
2. Extrusion_1
3. Reference to Extrusion_1 (from assembly)
To cut the extra portion, we will use the Cut operation. Select the top face of the source workpiece body as the cutting plane. The resulting body will be called "Cut operation_1".
7. It is now possible to add together "Cut operation_3" and the source workpiece (the latter being no longer needed) using the Boolean operation.
In the Boolean operation properties set the flags Blend New Edges and Chamfer. The Radius parameter value shall be defined by the following expression:
Radius_above-Thickness>=0? Radius_above-Thickness:0.
When creating the Boolean operation, chamfers will be created on new edges. The chamfer offsets shall be less than the "Radius_above" defined by the user, by the "Thickness" amount, and cannot be less than zero. This requirement conditions the above-written expression.
8. What is left now is to generate the inner surface of the "Emboss new" element. To do this, we shall use a Boolean operation again. Subtract the remaining body from the body obtained in the previous step. Just like in the previous step, the option of chamfer creation on new edges shall be enabled in the Boolean operation properties.
At this point, the new stamped feature model element can be assumed completed. Next, right-click on an empty space in the 3D window and select the context menu item Save Fragment and return. The "Emboss new" file, which contains the created 3D fragment, will become a new element in the stamped features library.
What to do with the obtained stamped feature will be described a bit later. For now, let's verify the function of the created feature. Upon finishing working in the assembly context, the "Part for emboss" file will open again. You do not have to save it – we shall not need it anymore. But, before the file is closed, change the number of segments in the source profile on the "workpiece" of the part – the stamped feature shall adjust accordingly.
Creating a Dialog for New Library Element
Besides the 3D model proper, a new library element requires creation of a dialog to input parameters of the given stamped feature (which is the external fragment element parameters). This dialog will be coming up in the command Forming Tool when inserting our stamped feature.
To create the dialog, open the file "Emboss new". Add a new 2D page to it to hold control elements (the Control command). On this page, position the elements of the Static Text type with the appropriate parameter names and the value input fields (Edit Box elements) for all external variables of the created fragment using the Create Control command. As a result, you will get a simple dialog that will serve to help the user defining parameters of the stamped feature being created. If desired, a more complex dialog can be created, by introducing in it a schematic image of the element as in standard sheet metal library element dialogs.
The stamped feature dialog is automatically scaled in the Forming Tool command property window so as to have the font size in it matching the Windows font size. Therefore, when creating a dialog, we recommend you not to change the font size set by default for the dialog page (it is set to be close to a standard Windows font). This will help avoid distortions when displaying the dialog.
Besides that, do not create too wide dialogs that do not fit within the standard parameters window. After creating the dialog, save the file again.
Defining Limitations on the Source 3D Profile Type
Limitations can be imposed on the type of a 3D profile that will be used for creating the new stamped feature in the Forming Tool command. To impose limitations, you need to create two external variables named contour_type and profile_type. The values assigned to those variables will define the 3D profile types allowed for the given stamped feature:
profile_type: defines the geometrical appearance of the 3D profile contour |
contour_type: defines the nesting of the 3D profile contour |
0 - any 1 - closed 2 - open 3 - line segment 4 - from polylines |
0 - any 1 – simple only (no nested contours and no multiple contours) 2 - no nested contours |
When these variables are created, then, upon an attempt to select a 3D profile of an inappropriate type in the Forming Tool command, the system will output an appropriate warning in the Diagnostics window. As a result, the profile will not get selected. On the other hand, if the variables were not created in the stamped feature fragment, then, when applying it, any 3D profile types will be allowed for selection. The fact that an incorrect profile was selected will then only be hinted by the errors occurring when recalculating such stamped feature.
In our example, the "profile_type" variable must be equal to 1, and the "contour_type" variable must be equal 0.
Adding a Created Fragment to the Stamped Features Library
To use a created element in the Forming Tool command, you need to copy the "Emboss new" file into the folder "T-FLEX Parametric CAD xx\Libraries\System\Sheet Metal Features". After that, select the Select option in the type drop-down list.
Then select a file from the list.
After that, our stamped feature will be displayed in the Type tab.
Item name and icon
In the Forming Tool command, our new stamped feature type will be indicated by its file name and with the standard T-FLEX CAD document icon. If desired, you can set a different, more understandable and complete name for it. To do this, you need to call the Document Properties command in the element file (in our example, this is "Emboss new") and fill in the Name field on the Summary tab.
The icon can be replaced using the Icon command.