# Ray-tracing "rules" file, default name rt_rules.txt
# ===================================================
#
# This file contains the rules which define how POV-Ray properties are assigned
# to parts in your model.   By default this file will be located in
#
# $OA_INSTALL/common_library/rt_rules.txt
#
# And the default file contains information about syntax but no actual rules.
# It is recommended that you make your own private copy, stored in your own
# disk area, and use this for experiment. You can make D3PLOT file this local
# copy by using the preference:
#
#  d3plot*povray_rules_file:  <filename>
#
# (Using the file filter in the Images, Ray-tracing panel to locate this file
#  and then using 'Save settings to oa_pref file" will do this automatically
#  for you.)
#
#
# Syntax:
# =======
#
# Lines starting '#', '%' or '$'  (no quotes) are comment lines and are ignored.
# Blank lines are ignored.
#
# Lines are parsed in the order in which they are encountered, so if two or more
# lines define the property of a given part the last processed line 'wins'.
#
# When a character string or property has embedded white space then it must be
# enclosed in ".." quotes.
#
# The purpose of this file is to assign a ray-tracing property to one or more
# parts in the model, which may be done as follows:
#
# Default attribute
# -----------------
#
# DEFAULT  =  <property>
#
# All parts get this attribute, although lines read later may modify this.
#
#
# Explicit definition of a part or material property by label
# -----------------------------------------------------------
#
# PART    <label> ( to <label>)   =   <property>
# MATL    <label> ( to <label>)   =   <property>
#
# For example
#
# MATL  1        = T_General_Glass
# PART 10 to 100 = "pigment { rgbt <0.7, 0.6, 0.5, 0.2> }"
#
# For MATL the property will be applied to all parts referring to that material
#
#
# Assignation of properties by part or material name
# --------------------------------------------------
#
# PART_NAME  <string to match> = <property>
# MATL_NAME  <string to match> = <property>
#
# For example 
#
# PART_NAME  steel   = T_Dark_Med_Steel
# MATL_NAME  rubber  = T_Black_Rubber
#
# The <string to match> may contain multiple words in "..", which will be matched verbatim,
# for example "mild steel" will only match part/material names which contain that string.
# (Matching is not case-sensitive).
#
# It may also use the logical operators:
#
#  &    for  AND
#  |    for  OR
#  !    for  NOT
#
# and use brackets to build logical expressions.  For example:
#
# "steel & !rigid"   would match anything with "steel", but not if it also had the word "rigid"
# "(steel | iron | aluminium) & !cast" would match those metals so long as they did not have the word "cast"
#
#
# Assignation of properties by LS-DYNA material type
# --------------------------------------------------
#
# MATL_TYPE      <ls-dyna material name>  =  <property>
#
# For example
#
# MATL_TYPE  *MAT_RIGID = T_Med_Med_steel         }  Material names may start "*MAT_",
# MATL_TYPE  MAT_RIGID  = T_Med_Med_steel         }  or "MAT_", or may omit the prefix
# MATL_TYPE  RIGID      = T_Med_Med_steel         }  altogether.
#
#
# Assignation of properties by material structural property
# ---------------------------------------------------------
#
# PROPERTY  DENSITY  <lo> <hi>  = <property>             (material density)
#           YM       <lo> <hi>  = <property>             (Young's modulus)
#           NU       <lo> <hi>  = <property>             (Poisson's ratio)
#           YIELD    <lo> <hi>  = <property>             (Yield stress)
#           FSTRN    <lo> <hi>  = <property>             (Failure strain)
#
# If the relevant value meets the expression <lo> <= value <= <hi> then it will be applied to all
# parts of that material.  For example:
#
#  PROPERTY DENSITY 7.5e3 8.5e3 = T_Light_Dull_Steel         (Steel in SI units)
#
#
#
# NOTE!! For D3PLOT to "know about" material names and properties it needs to have read a .ZTF file.
#        If you don't have a such a file it is easily generated from the keyword input deck by PRIMER,
#        using [Model], [Utilities], [Write ZTF file].
#
#
# POV-Ray "properties"
# ====================
#
# These bear (considerable) study and can be extremely sophisticated.  However in this context
# we deal with just three:
#
#  Pigment     defines colour            eg "pigment { color rgb <r.r, g.g, b.b> }"
#              or with transparency      eg "pigment { colour rgbt <r.r, g.g, b.b, t.t> }"
#              default pre-defined naming convention is P_xxx
#
#  Finish      surface properties        eg "finish { ambient 0.1 diffuse 0.1 roughness 1/20 reflection 0.0 }"
#              default pre-defined naming convention is F_xxx
#
#
#  Texture     complete definition       eg "texture { pigment { P_Light_Steel } finish { F_MetalA  } }
#              default pre-defined naming convention is T_xxx
#
# D3PLOT will assemble the part's texture as follows:
#
#   If the word "texture" is present, or the property starts "T_" it presumes that this is a complete external
#   definition and uses it verbatim, ignoring its internal properties completely.
#
#   Otherwise...
#
#   If "pigment" or "P_" are present it uses that pigment as the part colour, adding transparency if the part
#   is transparent in D3PLOT, otherwise it uses the part's current colour.
#
#   If "finish" or "F_" are present it uses that finish, otherwise it uses its default "medium plastic" finish.
#
#   If neither is present, or the part does not have a property defined, it uses its current colour (with any
#   transparency) and the default "medium plastic" finish.
#
