Variables and constants (rules)

The following variables and constants can be used in rules. This means that they are recognized by the rule parser and will be handled by the system. Not all variables are relevant in all situations.

Variables

The rule system recognizes variables defined in the logistical layout of the project. If the rule needs two parts as input, the variables should have postfixes _1 (first part) or _2 (second part). For example, material_1 will hold the material of the 1st part, and material_2 will hold the material of the 2nd part.

Weld rules must indicate whether they are for a part that the weld belongs to, or a counterpart that is connected to the part that has the weld. The construction part that the weld belongs to is always considered the first part, and the counterpart is considered the second part.

In addition to the logistical fields, the following variables are available, with postfixes:

  • angle – Angle between the two involved parts

  • blockgroup – Name of the block group that the part is in. This variable can be used in weld and beveling rules to enable different weld and beveling settings for parts located in different block groups. See Handling block groups in beveling rules for examples of usage.

  • c_abbr – A custom abbreviated representation of the construction type as defined in System Management > Logistics > Prefixes And Part Codes.

  • c_bent – Property indicating whether a profile or face plate is bent or not.

  • c_code – Construction code, specifies the type of part. For possible values, see Constants beginning with c_code.

  • c_composite – Property indicating whether a profile or face plate is a composite one or not.

  • c_fpc – Property indicating the position of the calculation plane of a face plate.

  • c_maxx, c_maxy, c_maxz – The x/y/z coordinate of the bounding box with the largest length, width and height of the part. The value is in mm.

  • c_maxx_pl, c_maxy_pl, c_maxz_pl – The x/y/z coordinate of the bounding box with the largest length, width and height of the plate the part is an attribute of. If the part is not an attribute of a plate, it is the x/y/z coordinate of the bounding box of the part itself. The value is in mm.

  • c_midx, c_midy, c_midz – The x/y/z coordinate of the midpoint of the part. The value is in mm.

  • c_midx_pl, c_midy_pl, c_midz_pl – The x/y/z coordinate of the midpoint of the plate the part is an attribute of. If the part is not an attribute of a plate, it is the x/y/z coordinate of the midpoint of the part itself. The value is in mm.

  • c_minx, c_miny, c_minz – The x/y/z coordinate of the bounding box with smallest length, width and height of the part. The value is in mm.

  • c_minx_pl, c_miny_pl, c_minz_pl – The x/y/z coordinate of the bounding box with smallest length, width and height of the plate the part is an attribute of. If the part is not an attribute of a plate, it is the x/y/z coordinate of the bounding box of the part itself. The value is in mm.

  • c_msp – Property indicating the molded side position of a profile or face plate.

  • c_ori_i3 – The orientation of the part. Integer value.

  • c_ori_i4 – The orientation of the part. Integer value.

  • c_ori_pl_i3 – The orientation of the plate the part is an attribute of. If the part is not an attribute of a plate, it is the orientation of the part itself. Integer value.

  • c_ori_pl_i4 – The orientation of the plate the part is an attribute of. If the part is not an attribute of a plate, it is the orientation of the part itself. Integer value.

  • c_ori_s3 – The orientation of the part. String value.

  • c_ori_s4 – The orientation of the part. String value.

  • c_ori_pl_s3 – The orientation of the plate the part is an attribute of. If the part is not an attribute of a plate, it is the orientation of the part itself. String value.

  • c_ori_pl_s4 – The orientation of the plate the part is an attribute of. If the part is not an attribute of a plate, it is the orientation of the part itself. String value.

  • c_type – The (sub) type of the part. Integer value. Only defined for brackets and lugs (values 700..799), and all types of profiles ( values 400..450).

  • connection – Type of the connection (plan view, cross section, hull). See Plate beveling rules.

  • dth – Thickness difference between the first and the second part. See Variables specific to plate beveling.

  • edge_type – Bevel edge type for plate-to-profile connections and plate connections to plates in cross section. See Bevel edge types on connections to profiles, and Bevel edge types on connections to plates in cross section.

  • orientation – Orientation of the plate edge to be beveled. For possible values see Plate beveling rules.

  • th_1 – Thickness of the first part. See Variables specific to plate beveling.
  • th_2 – Thickness of the second part (must be used for connections to shell). See Variables specific to plate beveling.

For information on variables specific to profile end types, see Variables for Profile End Type Rules.

Constants

The following constants can be used as values for the variables in the rule system. Not all constants are relevant for all variables.

Constants beginning with bvl

These constants are used as values for the connection and orientation variables in plate beveling rules.

See Plate beveling rules and Plate beveling rules for the descriptions of these variables.

Constants beginning with c_code

Construction code, specifies the type of part.

Other constants

  • edge_angle – Bevel edge type for plate-to-profile connections to parts in cross-section, plate not in line with the part's edge.

  • edge_plan – Bevel edge type for plate-to-profile connections to parts in plan view.

  • edge_stop – Bevel edge type for plate-to-profile connections to parts in cross-section, plate is in line with the part's edge.

  • fpc_center – Calculation plane at the center of the base plate of the face plate

  • fpc_default – Calculation plane at the default position (base line)

  • msp_basewidth – Molded side at base width position

  • msp_center – Molded side at center

  • msp_default – Molded side at default position