summaryrefslogtreecommitdiff
path: root/src/SomhairlesDream.Modeling/Definitions.fs
blob: 646fcfec28bf31174e1c501edd5afe42ef7f0ace (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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
55
56
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
99
100
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
namespace SomhairlesDream.Modeling

open SomhairlesDream.Shared

[<CLIMutable>]
type DesignStep =
    { StepId: string
      Index: int
      ObjectIds: string array
      Changes: ArtifactChange array }

module Design =
    let steps : DesignStep array =
        [| { StepId = "01-foundation"; Index = 0
             ObjectIds = [| "heritage.foundation"; "heritage.deck" |]
             Changes =
                 [| { ObjectId = "heritage.foundation"; Kind = "add"; Summary = "Add foundation slab" }
                    { ObjectId = "heritage.deck"; Kind = "add"; Summary = "Add raised deck" } |] }
           { StepId = "02-frame"; Index = 1
             ObjectIds =
                 [| "heritage.foundation"; "heritage.deck"; "heritage.frame.left"; "heritage.frame.right"; "heritage.spine" |]
             Changes =
                 [| { ObjectId = "heritage.frame.left"; Kind = "add"; Summary = "Add primary left frame" }
                    { ObjectId = "heritage.frame.right"; Kind = "add"; Summary = "Add primary right frame" }
                    { ObjectId = "heritage.spine"; Kind = "add"; Summary = "Add central spine" } |] }
           { StepId = "03-cabin"; Index = 2
             ObjectIds =
                 [| "heritage.foundation"; "heritage.deck"; "heritage.frame.left"; "heritage.frame.right"; "heritage.spine"; "heritage.cabin"; "heritage.crossbeam" |]
             Changes =
                 [| { ObjectId = "heritage.cabin"; Kind = "add"; Summary = "Add cabin volume" }
                    { ObjectId = "heritage.crossbeam"; Kind = "add"; Summary = "Add cabin crossbeam" } |] } |]

    // YJ-01 Voyager-class current-tech probe (source: interstellar-dual-track/current-tech-probe
    // scripts/build_probe.py, line ranges cited per step). Object ids map the legacy
    // UPPER_SNAKE names onto lowercase dotted ids via documented rule
    // (probe.bus.bay.panel.00 <- BUS_BAY_PANEL_00, probe.rtg.01.fin.00 <- RTG_01_FIN_0).
    // Display plinth, information card and MODEL_LABEL are intentionally excluded.
    let probeSteps : DesignStep array =
        let bus =
            [| "probe.bus.electronics.decagon"; "probe.bus.ring.front"; "probe.bus.ring.rear"
               "probe.bus.bay.panel.00"; "probe.bus.bay.panel.01"; "probe.bus.bay.panel.02"
               "probe.bus.bay.panel.03"; "probe.bus.bay.panel.04"; "probe.bus.bay.panel.05"
               "probe.bus.bay.panel.06"; "probe.bus.bay.panel.07"; "probe.bus.bay.panel.08"
               "probe.bus.bay.panel.09"
               "probe.bus.mli.top"; "probe.bus.mli.bottom"
               "probe.bus.radiator.port"; "probe.bus.radiator.starboard"
               "probe.aacs"
               "probe.thruster.01"; "probe.thruster.02"; "probe.thruster.03"; "probe.thruster.04" |]
        let booms =
            [| "probe.rtg.boom"
               "probe.mag.boom"; "probe.mag.head"; "probe.mag.sensor.a"; "probe.mag.sensor.b"
               "probe.pws.antenna.left"; "probe.pws.antenna.right"
               "probe.pws.tip.left"; "probe.pws.tip.right" |]
        let rtgs =
            [| "probe.rtg.01"; "probe.rtg.01.fin.00"; "probe.rtg.01.fin.01"; "probe.rtg.01.fin.02"
               "probe.rtg.02"; "probe.rtg.02.fin.00"; "probe.rtg.02.fin.01"; "probe.rtg.02.fin.02"
               "probe.rtg.03"; "probe.rtg.03.fin.00"; "probe.rtg.03.fin.01"; "probe.rtg.03.fin.02" |]
        let hga =
            [| "probe.hga.reflector"; "probe.hga.feed"
               "probe.hga.strut.00"; "probe.hga.strut.01"; "probe.hga.strut.02"; "probe.hga.strut.03" |]
        let instruments =
            [| "probe.scan.pivot"; "probe.scan.platform"
               "probe.crs"; "probe.plasma"; "probe.optical"; "probe.optical.aperture" |]
        let mast = [| "probe.science.boom" |]
        let prior (prefix: string array) (current: string array) =
            Array.append prefix current

        let busChanges = bus |> Array.map (fun id -> { ObjectId = id; Kind = "add"; Summary = "Add ten-sided bus with bay panels, MLI and radiators" })
        let boomChanges = booms |> Array.map (fun id -> { ObjectId = id; Kind = "add"; Summary = "Add fields-and-particles and RTG support booms" })
        let rtgChanges = rtgs |> Array.map (fun id -> { ObjectId = id; Kind = "add"; Summary = "Add three RTGs with heat-rejection fins" })
        let hgaChanges = hga |> Array.map (fun id -> { ObjectId = id; Kind = "add"; Summary = "Add high-gain antenna, feed and struts" })
        let instrumentChanges = instruments |> Array.map (fun id -> { ObjectId = id; Kind = "add"; Summary = "Add articulated scan platform with science instruments" })
        let mastChanges = mast |> Array.map (fun id -> { ObjectId = id; Kind = "add"; Summary = "Add deployable science mast" })
        let liveryChanges =
            [| { ObjectId = "probe.hga.reflector"; Kind = "update"; Summary = "Livery pass: reflector white finish" }
               { ObjectId = "probe.bus.mli.top"; Kind = "update"; Summary = "Livery pass: MLI gold foil finish" }
               { ObjectId = "probe.bus.bay.panel.01"; Kind = "update"; Summary = "Livery pass: restrained red accents on bay panels" }
               { ObjectId = "probe.pws.tip.left"; Kind = "update"; Summary = "Livery pass: red antenna tip markers" }
               { ObjectId = "probe.bus.electronics.decagon"; Kind = "update"; Summary = "Livery pass: body blue basecoat" }
               { ObjectId = "probe.rtg.01"; Kind = "update"; Summary = "Livery pass: graphite RTG housings" } |]

        [| { StepId = "probe-01-bus"; Index = 0; ObjectIds = bus; Changes = busChanges }
           { StepId = "probe-02-boom"; Index = 1; ObjectIds = prior bus booms; Changes = boomChanges }
           { StepId = "probe-03-rtg"; Index = 2; ObjectIds = prior (prior bus booms) rtgs; Changes = rtgChanges }
           { StepId = "probe-04-hga"; Index = 3; ObjectIds = prior (prior (prior bus booms) rtgs) hga; Changes = hgaChanges }
           { StepId = "probe-05-instruments"; Index = 4
             ObjectIds = prior (prior (prior (prior bus booms) rtgs) hga) instruments; Changes = instrumentChanges }
           { StepId = "probe-06-mast"; Index = 5
             ObjectIds = prior (prior (prior (prior (prior bus booms) rtgs) hga) instruments) mast
             Changes = mastChanges }
           { StepId = "probe-07-livery"; Index = 6
             ObjectIds = prior (prior (prior (prior (prior (prior bus booms) rtgs) hga) instruments) mast) [||]
             Changes = liveryChanges } |]

    // HNX-02 "Copernicus-class" crewed interplanetary transfer vehicle:
    // nuclear-thermal propulsion stage, spin-gravity centrifuge ring,
    // water-wall radiation shielding, Whipple MMOD shielding, and an
    // Orion-class shuttle docked as the scale reference. Built from
    // procedural engineering structures (trusses, pressure vessels, bell
    // nozzles), not stacked primitives. Display-scale visual research;
    // no mass/thrust/shielding closure is claimed.
    let shipSteps : DesignStep array =
        let keel =
            [| "hnx02.hull.core"; "hnx02.spine.truss"; "hnx02.node.forward" |]
        let hab =
            [| "hnx02.hab.a"; "hnx02.hab.b"; "hnx02.hab.whipple" |]
        let radiation =
            [| "hnx02.rad.waterwall"; "hnx02.centrifuge.ring" |]
        let reactor =
            [| "hnx02.prop.tank"; "hnx02.reactor.core"; "hnx02.thrust.cone"
               "hnx02.nozzle.cluster" |]
        let power =
            [| "hnx02.power.solar"; "hnx02.power.radiator" |]
        let cabin =
            [| "hnx02.cabin.airlock"; "hnx02.shuttle.orion" |]
        let livery =
            [| "hnx02.detail.greeble"; "hnx02.detail.antenna"
               "hnx02.detail.glow"; "hnx02.detail.glass"
               "hnx02.livery.stripes"; "hnx02.livery.insignia" |]
        let prior (prefix: string array) (current: string array) =
            Array.append prefix current

        let keelChanges =
            [| { ObjectId = "hnx02.hull.core"; Kind = "add"; Summary = "Add continuous 16 m pressure hull with viewport bands and ring frames" }
               { ObjectId = "hnx02.spine.truss"; Kind = "add"; Summary = "Add outrigger trusses with utility conduits and equipment rows" }
               { ObjectId = "hnx02.node.forward"; Kind = "add"; Summary = "Add five-port forward docking node" } |]
        let habChanges =
            [| { ObjectId = "hnx02.hab.a"; Kind = "add"; Summary = "Add forward habitat module with viewport rows" }
               { ObjectId = "hnx02.hab.b"; Kind = "add"; Summary = "Add aft habitat module" }
               { ObjectId = "hnx02.hab.whipple"; Kind = "add"; Summary = "Add Whipple MMOD shield panels" } |]
        let radiationChanges =
            [| { ObjectId = "hnx02.rad.waterwall"; Kind = "add"; Summary = "Add water-wall radiation shield tanks" }
               { ObjectId = "hnx02.centrifuge.ring"; Kind = "add"; Summary = "Add spin-gravity centrifuge ring with crew cars" } |]
        let reactorChanges =
            [| { ObjectId = "hnx02.prop.tank"; Kind = "add"; Summary = "Add cryogenic propellant tanks with MLI blankets" }
               { ObjectId = "hnx02.reactor.core"; Kind = "add"; Summary = "Add reactor core with control drums" }
               { ObjectId = "hnx02.thrust.cone"; Kind = "add"; Summary = "Add thrust structure and shadow shield" }
               { ObjectId = "hnx02.nozzle.cluster"; Kind = "add"; Summary = "Add nuclear-thermal engine cluster" } |]
        let powerChanges =
            [| { ObjectId = "hnx02.power.solar"; Kind = "add"; Summary = "Add deployable solar arrays" }
               { ObjectId = "hnx02.power.radiator"; Kind = "add"; Summary = "Add finned heat-rejection radiators" } |]
        let cabinChanges =
            [| { ObjectId = "hnx02.cabin.airlock"; Kind = "add"; Summary = "Add EVA airlock with external hatch" }
               { ObjectId = "hnx02.shuttle.orion"; Kind = "add"; Summary = "Add docked Orion-class crew shuttle" } |]
        let liveryChanges =
            [| { ObjectId = "hnx02.detail.greeble"; Kind = "add"; Summary = "Add equipment rows, cable looms and navigation lights" }
               { ObjectId = "hnx02.detail.antenna"; Kind = "add"; Summary = "Add high-gain communication antennas" }
               { ObjectId = "hnx02.detail.glow"; Kind = "add"; Summary = "Add engine bell heat glow" }
               { ObjectId = "hnx02.detail.glass"; Kind = "add"; Summary = "Add lit habitat viewports" }
               { ObjectId = "hnx02.livery.stripes"; Kind = "add"; Summary = "Add twin gold flank stripes (PLA Space Force livery)" }
               { ObjectId = "hnx02.livery.insignia"; Kind = "add"; Summary = "Add red star insignia" } |]

        [| { StepId = "ship-01-keel"; Index = 0; ObjectIds = keel; Changes = keelChanges }
           { StepId = "ship-02-hab"; Index = 1; ObjectIds = prior keel hab; Changes = habChanges }
           { StepId = "ship-03-radiation"; Index = 2; ObjectIds = prior (prior keel hab) radiation; Changes = radiationChanges }
           { StepId = "ship-04-reactor"; Index = 3; ObjectIds = prior (prior (prior keel hab) radiation) reactor; Changes = reactorChanges }
           { StepId = "ship-05-power"; Index = 4; ObjectIds = prior (prior (prior (prior keel hab) radiation) reactor) power; Changes = powerChanges }
           { StepId = "ship-06-cabin"; Index = 5; ObjectIds = prior (prior (prior (prior (prior keel hab) radiation) reactor) power) cabin; Changes = cabinChanges }
           { StepId = "ship-07-livery"; Index = 6; ObjectIds = prior (prior (prior (prior (prior (prior keel hab) radiation) reactor) power) cabin) livery; Changes = liveryChanges } |]

    let forProject (projectId: string) : DesignStep array =
        if projectId.StartsWith("probe-") then probeSteps
        elif projectId.StartsWith("ship-") then shipSteps
        else steps