Profile End Type Rules
The profile end type rules determine which end types are automatically applied to profile ends in different situations. A rule defines a situation using a number of conditions, expressed as variables and their values (constants), followed by an answer which defines the end type to be applied in that situation. That is, when the conditions are met, the end type specified as the answer is applied to the specified profile.
The conditions can consist of checks for the following:
-
Construction type (profile, shell frame, etc.)
-
Profile type (bulb, flat bar, etc.)
-
Comparison between height and relation height (larger, smaller, equal)
-
Maximum distance to the relation
-
Connection with relation (body, flange, side, top, bottom)
-
One logistical value of the profile
-
One logistical value of the relation
If none of the conditions in the rule are met, the default answer at the end of the rule defines which end type is applied. A rule must always have a default answer.
Configuration Files for Automatic End Type Assignment
The rules for the automatic end type assignment are defined in autoendtypes configuration files in the project norms folder %ncgnorms%. There should be at least one such configuration file, autoendtypes0000.cfg.
Rule nesting is supported to provide for clearer rules. This means that the end type rules can be split into several configuration files. For example, you could have a configuration file for each construction type and/or profile type (autoendtypes0001.cfg, autoendtypes0002.cfg etc.), and call those from autoendtypes0000.cfg.
Note: After working with rule based end cuts is introduced and the configuration file autoendtypes0000.cfg exists, it is required to signal the end type functions of this change. This is done by starting the Tools > Modify Icons > 3D-Contek function in the System Management application. If it is set to show Profiles 1+2 or Profiles 3+4 then clicking OK is sufficient. This same action needs to be performed when rule based end cuts are not used anymore and the autoendtypes0000.cfg file is removed. After removing the file, start the Tools > Modify Icons > 3D-Contek function and click OK.
Variables for Profile End Type Rules
In addition to the usual Variables and constants (rules) of the CADMATIC Hull rule system, the following variables can be used in the profile end type rules:
-
c_height_1 – Height of the profile
-
c_height_2 – Height of the relation
-
c_conn – Type of connection to relation
Show&hide possible values
-
EC_CONN_UNKNOWN – Unknown connection (there is no use case for using this in the rule)
-
EC_CONN_BODY – Connection to the molded side of another part
-
EC_CONN_FLANGE – Connection to the thickness side of another part
-
EC_CONN_SIDE – Connection to another profile end
-
EC_CONN_TOP – Connection to the top of another profile
-
EC_CONN_BOTTOM – Connection to the bottom of another profile (pillar)
-
EC_CONN_NONE – No connection information available. No information on the other part is available in the rule. All variables with the _2 postfix will be empty or zero.
-
-
c_dist – Distance to the relation
-
body_ec – Resulting end type for the body (1st/2nd endshape)
-
body_R1 .. body_R8 – Resulting R variables for the body
-
flange_ec – Resulting end type for the flange (3rd/4th endshape)
-
flange_R1 .. flange_R8 – Resulting R variables for the flange
End Type Assignment (Answer)
The answer following the condition must contain assignments for the body and flange end types (body_ec and flange_ec variables, respectively). Without these assignments an error will occur, regardless of the profile type or whether or not the missing end type is set to automatic.
Optionally, assignment for the R variables for the body and flange can be included (body_R1 .. body_R8 and flange_R1 .. flange_R8 variables, respectively).
When assigning several variables, the variables must be separated by space characters (see the example below).
The answer can also be a reference to another automatic end type rule.
Example
Following is an example of an autoendtypes0000.cfg file.
Automatic end cut rules
c_code_1==C_CODE_PROFILE and c_code_2==C_CODE_PROFILE and c_type_2==401 and c_height_1==c_height_2 and c_dist<=1 and c_conn==EC_CONN_FLANGE $ body_ec=16 flange_ec=0 body_R2=0 body_R3=0
c_code_1==C_CODE_PROFILE and c_type_1==403 and c_code_2==C_CODE_PROFILE and c_type_2==403 and c_height_1>c_height_2 and c_dist<=1 and c_conn==EC_CONN_FLANGE $ body_ec=17 flange_ec=0
c_code_1==C_CODE_PROFILE and c_type_1==403 and c_code_2==C_CODE_PROFILE and c_type_2==403 and c_height_1==c_height_2 and c_dist<=1 and c_conn==EC_CONN_FLANGE $ body_ec=17 flange_ec=0
c_code_1==C_CODE_PROFILE and c_type_1==403 and c_code_2==C_CODE_PROFILE and c_type_2==403 and c_height_1<c_height_2 and c_dist<=1 and c_conn==EC_CONN_BODY $ body_ec=5 flange_ec=0 body_R2=0 body_R3=0
c_code_1==C_CODE_PROFILE and c_type_1==403 and c_code_2==C_CODE_PROFILE and c_type_2==403 and c_height_1==c_height_2 and c_dist<=1 and c_conn==EC_CONN_BODY $ body_ec=5 flange_ec=0 body_R2=0 body_R3=0
c_code_1==C_CODE_PROFILE and c_type_1==403 and c_code_2==C_CODE_PROFILE and c_type_2==403 and c_height_1>c_height_2 and c_dist<=1 and c_conn==EC_CONN_BODY $ body_ec=12 flange_ec=0 body_R2=0 body_R3=0
c_code_1==C_CODE_PROFILE and c_type_2==403 and c_dist<=1 $ body_ec=3 flange_ec=0
c_code_1==C_CODE_PROFILE and c_dist<=1 $ body_ec=6 flange_ec=0 body_R2=0
c_code_1==C_CODE_SHELLFRAME and c_dist<=1 $ body_ec=5 flange_ec=0 body_R2=0 body_R3=0
c_code_1==C_CODE_PROFILE and c_type_1==403 $ body_ec=3 flange_ec=0
c_code_1==C_CODE_SHELLFRAME and c_type_1==403 $ body_ec=3 flange_ec=0
c_code_1==C_CODE_PROFILE $ body_ec=2 flange_ec=0 body_R2=0 body_R3=0
body_ec=0 flange_ec=0
Explanation of the first line:
-
c_code is the construction code which specifies the type of the part. C_CODE_PROFILE specifies that the part is a profile. Postfixes _1 and _2 indicate the first part and second part. The part that the weld belongs to is the first part, and the counterpart is the second part.
-
c_type specifies the profile type. In this case the second part is specified to be profile type 401 (bulb).
-
c_height_1==c_height_2 specifies that the profile height equals the relation height.
-
c_dist specifies the distance of the profile to the relation. In this case it should be less than or equal to 1 mm.
-
c_conn specifies the type of the connection to the relation. EC_CONN_FLANGE specifies that the profile should be connected to the thickness side of the related part.
-
$ – The condition ends at the dollar sign, and the answer follows. The answer specifies the resulting end type when the condition is met.
-
body_ec specifies the end type for the body (1st/2nd endshape). In this case it is type 16.
-
flange_ec specifies the end type for the flange (3rd/4th endshape). In this case it is type 0.
-
body_R2 and body_R3 specify the R2 and R3 values for the profile body.
The last line is the default answer. Here it defines that end type 0 is to be applied to both body and flange if none of the preceding conditions are met.