region_parser
converter.converter.fluka.helper_parsers.region_parser
BoolOperation
Bases: Enum
Enum representing boolean operations used in Fluka zones.
Source code in yaptide/converter/converter/fluka/helper_parsers/region_parser.py
13 14 15 16 17 |
|
INTERSECTION
class-attribute
instance-attribute
INTERSECTION = 1
SUBTRACTION
class-attribute
instance-attribute
SUBTRACTION = 2
FlukaRegion
dataclass
Dataclass mapping for Fluka regions.
Source code in yaptide/converter/converter/fluka/helper_parsers/region_parser.py
20 21 22 23 24 25 26 27 |
|
figures_operators
class-attribute
instance-attribute
figures_operators = field(default_factory=lambda: [])
name
class-attribute
instance-attribute
name = ''
__init__
__init__(name='', figures_operators=lambda: []())
parse_csg_operations
parse_csg_operations(operations, figures)
Parse dict of csg operations to a list of lists of tuples. Each tuple consists of a figure name and intersection or subtraction operation. Each list of tuples represents a Fluka zone. The list of lists represents a Fluka region, which consists of union of all zones.
Source code in yaptide/converter/converter/fluka/helper_parsers/region_parser.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
|
parse_regions
parse_regions(zones_json, figures)
Parse zones from JSON to Fluka regions. Returns list of regions and list of additional figures generated by parsing world zone.
Source code in yaptide/converter/converter/fluka/helper_parsers/region_parser.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
|
parse_world_zone
parse_world_zone(zones_json, figures)
Parse the world zone. Returns tuple consisting of world region, boundary region and the two figures of which they consist.
Source code in yaptide/converter/converter/fluka/helper_parsers/region_parser.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
|