Chrysalis - Project Composer
Loading...
Searching...
No Matches
Project1Composer.h
Go to the documentation of this file.
1#ifndef CHRYSALIS_PROJECT1_H
2#define CHRYSALIS_PROJECT1_H
3
5
6namespace Chrysalis {
8 struct PointName {
9 static constexpr auto S = "S";
10 static constexpr auto S1 = "S1";
11 static constexpr auto S2 = "S2";
12
13 static constexpr auto N = "N";
14 static constexpr auto N1 = "N1";
15 static constexpr auto N2 = "N2";
16 static constexpr auto N3 = "N3";
17 static constexpr auto N4 = "N4";
18
19 static constexpr auto AH = "AH";
20 static constexpr auto AH1 = "AH1";
21 static constexpr auto AH2 = "AH2";
22 static constexpr auto AH3 = "AH3";
23 static constexpr auto AH4 = "AH4";
24 static constexpr auto AH1_1 = "AH1_1";
25 static constexpr auto AH1_2 = "AH1_2";
26 static constexpr auto AH1_3 = "AH1_3";
27 static constexpr auto AH1_4 = "AH1_4";
28
29 static constexpr auto UB = "UB";
30 static constexpr auto UB1 = "UB1";
31 static constexpr auto UB1_1 = "UB1_1";
32 static constexpr auto UB1_2 = "UB1_2";
33
34 static constexpr auto W = "W";
35 static constexpr auto W1 = "W1";
36 static constexpr auto W2 = "W2";
37 static constexpr auto W3 = "W3";
38 static constexpr auto W4 = "W4";
39
40 static constexpr auto T = "T";
41
42 static constexpr auto H = "H";
43 static constexpr auto H1 = "H1";
44
45 static constexpr auto B = "B";
46 static constexpr auto D = "D";
47
48 static constexpr auto D1 = "D1";
49 static constexpr auto D1_1 = "D1_1";
50 static constexpr auto D2 = "D2";
51 static constexpr auto DA = "DA";
52
53 static constexpr auto DW1 = "DW1";
54 static constexpr auto DW2 = "DW2";
55 static constexpr auto DW11 = "DW11";
56 static constexpr auto DW12 = "DW12";
57 static constexpr auto DW1A = "DW1A";
58 static constexpr auto DW1T = "DW1T";
59 static constexpr auto DW21 = "DW21";
60 static constexpr auto DW22 = "DW22";
61 static constexpr auto DW2A = "DW2A";
62 static constexpr auto DW2T = "DW2T";
63 };
64 struct ParameterName {
65 static constexpr auto HIP_DEPTH = "Hip Depth";
66 static constexpr auto BUST_SPAN = "Bust Span";
67 static constexpr auto BACK_WIDTH = "Back Width";
68 static constexpr auto BUST_HEIGHT = "Bust Height";
69 static constexpr auto SHOULDER_LENGTH = "Shoulder Length";
70 static constexpr auto APEX_TO_SHOULDER = "Apex to shoulder";
71 static constexpr auto HIP_CIRCUMFERENCE = "Hip Circumference";
72 static constexpr auto BACK_WAIST_LENGTH = "Back Waist Length";
73 static constexpr auto BUST_CIRCUMFERENCE = "Bust Circumference";
74 static constexpr auto NECK_CIRCUMFERENCE = "Neck Circumference";
75 static constexpr auto WAIST_CIRCUMFERENCE = "Waist Circumference";
76 static constexpr auto APEX_TO_CENTER_FRONT = "Apex to center-front";
77 };
78 struct Options {
79 static constexpr auto HAS_CENTER_BACK_DART = "Has center back dart";
80 static constexpr auto HAS_ADDITIONAL_FRONT_DARTS = "Has additional front darts";
81 };
82 struct Expressions {
83 static constexpr auto INTAKE = "Intake";
84 static constexpr auto MAX_INTAKE = "Max intake";
85 static constexpr auto COEFFICIENT = "Coefficient";
86 };
87 struct OutlineName {
88 static constexpr auto MAIN = "main";
89 };
90 public:
91 struct PatternName {
92 static constexpr auto BACK = "Back";
93 static constexpr auto FRONT = "Front";
94 };
95 explicit Project1Composer(Project* project);
96
97 static std::unique_ptr<Project> createProject();
98
99 [[nodiscard]] PatternSpace* getBack() const;
100 [[nodiscard]] PatternSpace* getFront() const;
101
102 void fillOptions() override;
103 void fillPatterns() override;
104 void fillParameters() override;
105 void fillInstructions() override;
106 private:
107 Pattern* back_;
108 Pattern* front_;
109 public:
110 inline static const std::unordered_map<std::string, std::pair<double, double>> expectedBack = {
111 {PointName::S, {0.0, 0.0}},
112 {PointName::S1, {23.0, 0.0}},
113 {PointName::S2, {16.2344, -4.5419}},
114 {PointName::W, {0.0, -42.0}},
115 {PointName::W1, {23.5, -42.0}},
116 {PointName::W2, {23.0, -42.0}},
117 {PointName::W3, {2, -42}},
118 {PointName::W4, {19, -42}},
119 {PointName::H, {0.0, -63.5}},
120 {PointName::H1, {23.5, -63.5}},
121 {PointName::AH, {0.0, -21.0}},
122 {PointName::AH1, {15.5, -21.0}},
123 {PointName::AH2, {16.5606, -19.9393}},
124 {PointName::AH3, {23.0, -21.0}},
125 {PointName::AH4, {22.0, -21.0}},
126 {PointName::UB, {0.0, -14.0}},
127 {PointName::UB1, {15.5, -14.0}},
128 {PointName::T, {0.0, -52.75}},
129 {PointName::N, {6.3333, 0.0}},
130 {PointName::N1, {6.3333, -2.375}},
131 {PointName::N2, {0.0, -2.375}},
132 {PointName::N3, {3.1666, -2.375}},
133 {PointName::D, {11.5641, -1.6995}},
134 {PointName::DA, {9.401, -8.357}},
135 {PointName::D1, {10.613, -1.3906}},
136 {PointName::D2, {12.5152, -2.0086}},
137 {PointName::DW1, {7.6667, -42}},
138 {PointName::DW2, {13.3333, -42}},
139 {PointName::DW21, {14, -42}},
140 {PointName::DW2T, {13.3333, -23}},
141 {PointName::DW2A, {13.3333, -51}},
142 {PointName::DW22, {12.6667, -42}},
143 {PointName::DW1T, {7.6667, -21}},
144 {PointName::DW11, {8.6667, -42}},
145 {PointName::DW1A, {7.6667, -53}},
146 {PointName::DW12, {6.6667, -42}}
147 };
148 inline static const std::unordered_map<std::string, std::pair<double, double>> expectedFront = {
149 {PointName::S, {0.0, 0.0}},
150 {PointName::S1, {-25.0, 0.0}},
151 {PointName::S2, {-27.0242, -8.3569}},
152 {PointName::W, {0.0, -42.0}},
153 {PointName::W1, {-25.5, -42.0}},
154 {PointName::W2, {-25.0, -42.0}},
155 {PointName::W3, {-21, -42}},
156 {PointName::H, {0.0, -63.5}},
157 {PointName::H1, {-25.5, -63.5}},
158 {PointName::AH, {0.0, -21.0}},
159 {PointName::AH1, {-18.975, -21.0}},
160 {PointName::AH2, {-21.6203, -19.2322}},
161 {PointName::AH3, {-28.475, -21.0}},
162 {PointName::AH4, {-27.475, -21.0}},
163 {PointName::AH1_1, {-9.336, -21.0}},
164 {PointName::AH1_2, {-12.811, -21.0}},
165 {PointName::AH1_3, {-9.5472, -19.2322}},
166 {PointName::AH1_4, {-13.8998, -19.2322}},
167 {PointName::UB, {0.0, -14.0}},
168 {PointName::UB1, {-22.4499, -14.0}},
169 {PointName::UB1_1, {-10.1722, -14.0}},
170 {PointName::UB1_2, {-17.1221, -14.0}},
171 {PointName::T, {0.0, -52.75}},
172 {PointName::N, {-6.3333, 0.0}},
173 {PointName::N1, {-6.3333, -5.345}},
174 {PointName::N2, {0.0, -5.3449}},
175 {PointName::N3, {-6.3333, -1.7817}},
176 {PointName::N4, {-2.1111, -5.345}},
177 {PointName::B, {0.0, -28.0}},
178 {PointName::DA, {-8.5, -28.0}},
179 {PointName::D1, {-11.7013, -1.198}},
180 {PointName::D1_1, {-22.6548, -5.0165}},
181 {PointName::DW1, {-8.5, -42}},
182 {PointName::DW2, {-14.75, -42}},
183 {PointName::DW1A, {-8.5, -51}},
184 {PointName::DW1T, {-8.5, -28}},
185 {PointName::DW11, {-7, -42}},
186 {PointName::DW12, {-10, -42}},
187 {PointName::DW2A, {-14.75, -49}},
188 {PointName::DW2T, {-14.75, -30}},
189 {PointName::DW21, {-13.75, -42}},
190 {PointName::DW22, {-15.75, -42}},
191 };
192 };
193}
194
195#endif //CHRYSALIS_PROJECT1_H
BaseProjectComposer(Project *project)
Definition BaseProjectComposer.cpp:5
void fillParameters() override
Definition Project1Composer.cpp:54
PatternSpace * getBack() const
Definition Project1Composer.cpp:32
void fillInstructions() override
Definition Project1Composer.cpp:94
static const std::unordered_map< std::string, std::pair< double, double > > expectedFront
Definition Project1Composer.h:148
void fillOptions() override
Definition Project1Composer.cpp:40
static std::unique_ptr< Project > createProject()
Definition Project1Composer.cpp:28
Project1Composer(Project *project)
Definition Project1Composer.cpp:26
static const std::unordered_map< std::string, std::pair< double, double > > expectedBack
Definition Project1Composer.h:110
void fillPatterns() override
Definition Project1Composer.cpp:46
PatternSpace * getFront() const
Definition Project1Composer.cpp:36
Definition composer.h:40
Definition Project1Composer.h:91
static constexpr auto FRONT
Definition Project1Composer.h:93
static constexpr auto BACK
Definition Project1Composer.h:92