dragonfly-schema 1.1301.4 → 1.1400.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +506 -329
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +82 -48
- package/dist/index.d.ts +82 -48
- package/dist/index.js +504 -329
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -356,7 +356,7 @@ var require_Reflect = __commonJS({
|
|
|
356
356
|
}
|
|
357
357
|
return provider.OrdinaryOwnMetadataKeys(O, P);
|
|
358
358
|
}
|
|
359
|
-
function
|
|
359
|
+
function Type29(x) {
|
|
360
360
|
if (x === null)
|
|
361
361
|
return 1;
|
|
362
362
|
switch (typeof x) {
|
|
@@ -389,7 +389,7 @@ var require_Reflect = __commonJS({
|
|
|
389
389
|
return typeof x === "object" ? x !== null : typeof x === "function";
|
|
390
390
|
}
|
|
391
391
|
function ToPrimitive(input, PreferredType) {
|
|
392
|
-
switch (
|
|
392
|
+
switch (Type29(input)) {
|
|
393
393
|
case 0:
|
|
394
394
|
return input;
|
|
395
395
|
case 1:
|
|
@@ -469,7 +469,7 @@ var require_Reflect = __commonJS({
|
|
|
469
469
|
return typeof argument === "function";
|
|
470
470
|
}
|
|
471
471
|
function IsPropertyKey(argument) {
|
|
472
|
-
switch (
|
|
472
|
+
switch (Type29(argument)) {
|
|
473
473
|
case 3:
|
|
474
474
|
return true;
|
|
475
475
|
case 4:
|
|
@@ -1267,6 +1267,7 @@ __export(index_exports, {
|
|
|
1267
1267
|
LouversByCount: () => LouversByCount,
|
|
1268
1268
|
LouversByDistance: () => LouversByDistance,
|
|
1269
1269
|
Model: () => Model,
|
|
1270
|
+
ModelComparisonProperties: () => ModelComparisonProperties,
|
|
1270
1271
|
ModelEnergyProperties: () => ModelEnergyProperties,
|
|
1271
1272
|
ModelProperties: () => ModelProperties,
|
|
1272
1273
|
ModelRadianceProperties: () => ModelRadianceProperties,
|
|
@@ -1275,6 +1276,7 @@ __export(index_exports, {
|
|
|
1275
1276
|
RepeatingWindowRatio: () => RepeatingWindowRatio,
|
|
1276
1277
|
RoofSpecification: () => RoofSpecification,
|
|
1277
1278
|
Room2D: () => Room2D,
|
|
1279
|
+
Room2DComparisonProperties: () => Room2DComparisonProperties,
|
|
1278
1280
|
Room2DEnergyPropertiesAbridged: () => Room2DEnergyPropertiesAbridged,
|
|
1279
1281
|
Room2DPropertiesAbridged: () => Room2DPropertiesAbridged,
|
|
1280
1282
|
Room2DRadiancePropertiesAbridged: () => Room2DRadiancePropertiesAbridged,
|
|
@@ -4720,6 +4722,322 @@ __decorateClass([
|
|
|
4720
4722
|
], _RepeatingWindowRatio.prototype, "vertical_separation", 2);
|
|
4721
4723
|
var RepeatingWindowRatio = _RepeatingWindowRatio;
|
|
4722
4724
|
|
|
4725
|
+
// src/models/SimpleWindowArea.ts
|
|
4726
|
+
var _SimpleWindowArea = class _SimpleWindowArea extends _WindowParameterBase {
|
|
4727
|
+
constructor() {
|
|
4728
|
+
super();
|
|
4729
|
+
/** A number for the window area in current model units. If this area is larger than the area of the Wall that it is appliedto, the window will fill the parent Wall at a 99 percent ratio. */
|
|
4730
|
+
__publicField(this, "window_area");
|
|
4731
|
+
/** Type */
|
|
4732
|
+
__publicField(this, "type");
|
|
4733
|
+
/** Boolean to note whether rectangular portions of base Face should be extracted before scaling them to create apertures. For pentagonal gabled geometries, this results in one rectangle and one triangle, which can often look more realistic and is a better input for engines like EnergyPlus that cannot model windows with more than 4 vertices. However, if a single pentagonal window is desired for such a gabled shape, this input can be set to False to produce such a result. */
|
|
4734
|
+
__publicField(this, "rect_split");
|
|
4735
|
+
this.type = "SimpleWindowArea";
|
|
4736
|
+
this.rect_split = true;
|
|
4737
|
+
}
|
|
4738
|
+
init(_data) {
|
|
4739
|
+
super.init(_data);
|
|
4740
|
+
if (_data) {
|
|
4741
|
+
const obj = plainToClass(_SimpleWindowArea, _data, { enableImplicitConversion: true });
|
|
4742
|
+
this.window_area = obj.window_area;
|
|
4743
|
+
this.type = obj.type;
|
|
4744
|
+
this.rect_split = obj.rect_split;
|
|
4745
|
+
}
|
|
4746
|
+
}
|
|
4747
|
+
static fromJS(data) {
|
|
4748
|
+
data = typeof data === "object" ? data : {};
|
|
4749
|
+
if (Array.isArray(data)) {
|
|
4750
|
+
const obj = {};
|
|
4751
|
+
for (var property in data) {
|
|
4752
|
+
obj[property] = data[property];
|
|
4753
|
+
}
|
|
4754
|
+
data = obj;
|
|
4755
|
+
}
|
|
4756
|
+
let result = new _SimpleWindowArea();
|
|
4757
|
+
result.init(data);
|
|
4758
|
+
return result;
|
|
4759
|
+
}
|
|
4760
|
+
toJSON(data) {
|
|
4761
|
+
data = typeof data === "object" ? data : {};
|
|
4762
|
+
data["window_area"] = this.window_area;
|
|
4763
|
+
data["type"] = this.type;
|
|
4764
|
+
data["rect_split"] = this.rect_split;
|
|
4765
|
+
data = super.toJSON(data);
|
|
4766
|
+
return instanceToPlain(data);
|
|
4767
|
+
}
|
|
4768
|
+
validate() {
|
|
4769
|
+
return __async(this, null, function* () {
|
|
4770
|
+
const errors = yield validate(this);
|
|
4771
|
+
if (errors.length > 0) {
|
|
4772
|
+
const errorMessages = errors.map((error) => Object.values(error.constraints || [error]).join(", ")).join("; ");
|
|
4773
|
+
throw new Error(`Validation failed: ${errorMessages}`);
|
|
4774
|
+
}
|
|
4775
|
+
return true;
|
|
4776
|
+
});
|
|
4777
|
+
}
|
|
4778
|
+
};
|
|
4779
|
+
__decorateClass([
|
|
4780
|
+
IsNumber(),
|
|
4781
|
+
IsDefined()
|
|
4782
|
+
], _SimpleWindowArea.prototype, "window_area", 2);
|
|
4783
|
+
__decorateClass([
|
|
4784
|
+
IsString(),
|
|
4785
|
+
IsOptional(),
|
|
4786
|
+
Matches(/^SimpleWindowArea$/)
|
|
4787
|
+
], _SimpleWindowArea.prototype, "type", 2);
|
|
4788
|
+
__decorateClass([
|
|
4789
|
+
IsBoolean(),
|
|
4790
|
+
IsOptional()
|
|
4791
|
+
], _SimpleWindowArea.prototype, "rect_split", 2);
|
|
4792
|
+
var SimpleWindowArea = _SimpleWindowArea;
|
|
4793
|
+
|
|
4794
|
+
// src/models/SimpleWindowRatio.ts
|
|
4795
|
+
var _SimpleWindowRatio = class _SimpleWindowRatio extends _WindowParameterBase {
|
|
4796
|
+
constructor() {
|
|
4797
|
+
super();
|
|
4798
|
+
/** A number between 0 and 1 for the ratio between the window area and the parent wall surface area. */
|
|
4799
|
+
__publicField(this, "window_ratio");
|
|
4800
|
+
/** Type */
|
|
4801
|
+
__publicField(this, "type");
|
|
4802
|
+
/** Boolean to note whether rectangular portions of base Face should be extracted before scaling them to create apertures. For pentagonal gabled geometries, this results in one rectangle and one triangle, which can often look more realistic and is a better input for engines like EnergyPlus that cannot model windows with more than 4 vertices. However, if a single pentagonal window is desired for such a gabled shape, this input can be set to False to produce such a result. */
|
|
4803
|
+
__publicField(this, "rect_split");
|
|
4804
|
+
this.type = "SimpleWindowRatio";
|
|
4805
|
+
this.rect_split = true;
|
|
4806
|
+
}
|
|
4807
|
+
init(_data) {
|
|
4808
|
+
super.init(_data);
|
|
4809
|
+
if (_data) {
|
|
4810
|
+
const obj = plainToClass(_SimpleWindowRatio, _data, { enableImplicitConversion: true });
|
|
4811
|
+
this.window_ratio = obj.window_ratio;
|
|
4812
|
+
this.type = obj.type;
|
|
4813
|
+
this.rect_split = obj.rect_split;
|
|
4814
|
+
}
|
|
4815
|
+
}
|
|
4816
|
+
static fromJS(data) {
|
|
4817
|
+
data = typeof data === "object" ? data : {};
|
|
4818
|
+
if (Array.isArray(data)) {
|
|
4819
|
+
const obj = {};
|
|
4820
|
+
for (var property in data) {
|
|
4821
|
+
obj[property] = data[property];
|
|
4822
|
+
}
|
|
4823
|
+
data = obj;
|
|
4824
|
+
}
|
|
4825
|
+
let result = new _SimpleWindowRatio();
|
|
4826
|
+
result.init(data);
|
|
4827
|
+
return result;
|
|
4828
|
+
}
|
|
4829
|
+
toJSON(data) {
|
|
4830
|
+
data = typeof data === "object" ? data : {};
|
|
4831
|
+
data["window_ratio"] = this.window_ratio;
|
|
4832
|
+
data["type"] = this.type;
|
|
4833
|
+
data["rect_split"] = this.rect_split;
|
|
4834
|
+
data = super.toJSON(data);
|
|
4835
|
+
return instanceToPlain(data);
|
|
4836
|
+
}
|
|
4837
|
+
validate() {
|
|
4838
|
+
return __async(this, null, function* () {
|
|
4839
|
+
const errors = yield validate(this);
|
|
4840
|
+
if (errors.length > 0) {
|
|
4841
|
+
const errorMessages = errors.map((error) => Object.values(error.constraints || [error]).join(", ")).join("; ");
|
|
4842
|
+
throw new Error(`Validation failed: ${errorMessages}`);
|
|
4843
|
+
}
|
|
4844
|
+
return true;
|
|
4845
|
+
});
|
|
4846
|
+
}
|
|
4847
|
+
};
|
|
4848
|
+
__decorateClass([
|
|
4849
|
+
IsNumber(),
|
|
4850
|
+
IsDefined()
|
|
4851
|
+
], _SimpleWindowRatio.prototype, "window_ratio", 2);
|
|
4852
|
+
__decorateClass([
|
|
4853
|
+
IsString(),
|
|
4854
|
+
IsOptional(),
|
|
4855
|
+
Matches(/^SimpleWindowRatio$/)
|
|
4856
|
+
], _SimpleWindowRatio.prototype, "type", 2);
|
|
4857
|
+
__decorateClass([
|
|
4858
|
+
IsBoolean(),
|
|
4859
|
+
IsOptional()
|
|
4860
|
+
], _SimpleWindowRatio.prototype, "rect_split", 2);
|
|
4861
|
+
var SimpleWindowRatio = _SimpleWindowRatio;
|
|
4862
|
+
|
|
4863
|
+
// src/models/SingleWindow.ts
|
|
4864
|
+
var _SingleWindow = class _SingleWindow extends _WindowParameterBase {
|
|
4865
|
+
constructor() {
|
|
4866
|
+
super();
|
|
4867
|
+
/** A number for the window width. Note that, if this width is applied to a wall that is too narrow for this width, the generated window will automatically be shortened when it is applied to the wall. In this way, setting the width to be `float(""inf"")` will create parameters that always generate a ribbon window. */
|
|
4868
|
+
__publicField(this, "width");
|
|
4869
|
+
/** A number for the window height. Note that, if this height is applied to a wall that is too short for this height, the generated window will automatically be shortened when it is applied to the wall. */
|
|
4870
|
+
__publicField(this, "height");
|
|
4871
|
+
/** Type */
|
|
4872
|
+
__publicField(this, "type");
|
|
4873
|
+
/** A number for the window sill height. */
|
|
4874
|
+
__publicField(this, "sill_height");
|
|
4875
|
+
this.type = "SingleWindow";
|
|
4876
|
+
this.sill_height = 1;
|
|
4877
|
+
}
|
|
4878
|
+
init(_data) {
|
|
4879
|
+
super.init(_data);
|
|
4880
|
+
if (_data) {
|
|
4881
|
+
const obj = plainToClass(_SingleWindow, _data, { enableImplicitConversion: true });
|
|
4882
|
+
this.width = obj.width;
|
|
4883
|
+
this.height = obj.height;
|
|
4884
|
+
this.type = obj.type;
|
|
4885
|
+
this.sill_height = obj.sill_height;
|
|
4886
|
+
}
|
|
4887
|
+
}
|
|
4888
|
+
static fromJS(data) {
|
|
4889
|
+
data = typeof data === "object" ? data : {};
|
|
4890
|
+
if (Array.isArray(data)) {
|
|
4891
|
+
const obj = {};
|
|
4892
|
+
for (var property in data) {
|
|
4893
|
+
obj[property] = data[property];
|
|
4894
|
+
}
|
|
4895
|
+
data = obj;
|
|
4896
|
+
}
|
|
4897
|
+
let result = new _SingleWindow();
|
|
4898
|
+
result.init(data);
|
|
4899
|
+
return result;
|
|
4900
|
+
}
|
|
4901
|
+
toJSON(data) {
|
|
4902
|
+
data = typeof data === "object" ? data : {};
|
|
4903
|
+
data["width"] = this.width;
|
|
4904
|
+
data["height"] = this.height;
|
|
4905
|
+
data["type"] = this.type;
|
|
4906
|
+
data["sill_height"] = this.sill_height;
|
|
4907
|
+
data = super.toJSON(data);
|
|
4908
|
+
return instanceToPlain(data);
|
|
4909
|
+
}
|
|
4910
|
+
validate() {
|
|
4911
|
+
return __async(this, null, function* () {
|
|
4912
|
+
const errors = yield validate(this);
|
|
4913
|
+
if (errors.length > 0) {
|
|
4914
|
+
const errorMessages = errors.map((error) => Object.values(error.constraints || [error]).join(", ")).join("; ");
|
|
4915
|
+
throw new Error(`Validation failed: ${errorMessages}`);
|
|
4916
|
+
}
|
|
4917
|
+
return true;
|
|
4918
|
+
});
|
|
4919
|
+
}
|
|
4920
|
+
};
|
|
4921
|
+
__decorateClass([
|
|
4922
|
+
IsNumber(),
|
|
4923
|
+
IsDefined()
|
|
4924
|
+
], _SingleWindow.prototype, "width", 2);
|
|
4925
|
+
__decorateClass([
|
|
4926
|
+
IsNumber(),
|
|
4927
|
+
IsDefined()
|
|
4928
|
+
], _SingleWindow.prototype, "height", 2);
|
|
4929
|
+
__decorateClass([
|
|
4930
|
+
IsString(),
|
|
4931
|
+
IsOptional(),
|
|
4932
|
+
Matches(/^SingleWindow$/)
|
|
4933
|
+
], _SingleWindow.prototype, "type", 2);
|
|
4934
|
+
__decorateClass([
|
|
4935
|
+
IsNumber(),
|
|
4936
|
+
IsOptional()
|
|
4937
|
+
], _SingleWindow.prototype, "sill_height", 2);
|
|
4938
|
+
var SingleWindow = _SingleWindow;
|
|
4939
|
+
|
|
4940
|
+
// src/models/Room2DComparisonProperties.ts
|
|
4941
|
+
var _Room2DComparisonProperties = class _Room2DComparisonProperties extends _OpenAPIGenBaseModel {
|
|
4942
|
+
constructor() {
|
|
4943
|
+
super();
|
|
4944
|
+
/** Type */
|
|
4945
|
+
__publicField(this, "type");
|
|
4946
|
+
/** A list of 2D points representing the outer boundary vertices of the Room2D to which the host Room2D is being compared. The list should include at least 3 points and each point should be a list of 2 (x, y) values. */
|
|
4947
|
+
__publicField(this, "floor_boundary");
|
|
4948
|
+
/** Optional list of lists with one list for each hole in the floor plate of the Room2D to which the host Room2D is being compared. Each hole should be a list of at least 2 points and each point a list of 2 (x, y) values. If None, it will be assumed that there are no holes in the floor plate. */
|
|
4949
|
+
__publicField(this, "floor_holes");
|
|
4950
|
+
/** A list of WindowParameter objects that dictate the window geometries of the Room2D to which the host Room2D is being compared. */
|
|
4951
|
+
__publicField(this, "comparison_windows");
|
|
4952
|
+
/** A SkylightParameter object for the Room2D to which the host Room2D is being compared. */
|
|
4953
|
+
__publicField(this, "comparison_skylight");
|
|
4954
|
+
this.type = "Room2DComparisonProperties";
|
|
4955
|
+
}
|
|
4956
|
+
init(_data) {
|
|
4957
|
+
super.init(_data);
|
|
4958
|
+
if (_data) {
|
|
4959
|
+
const obj = plainToClass(_Room2DComparisonProperties, _data, { enableImplicitConversion: true });
|
|
4960
|
+
this.type = obj.type;
|
|
4961
|
+
this.floor_boundary = obj.floor_boundary;
|
|
4962
|
+
this.floor_holes = obj.floor_holes;
|
|
4963
|
+
this.comparison_windows = obj.comparison_windows;
|
|
4964
|
+
this.comparison_skylight = obj.comparison_skylight;
|
|
4965
|
+
}
|
|
4966
|
+
}
|
|
4967
|
+
static fromJS(data) {
|
|
4968
|
+
data = typeof data === "object" ? data : {};
|
|
4969
|
+
if (Array.isArray(data)) {
|
|
4970
|
+
const obj = {};
|
|
4971
|
+
for (var property in data) {
|
|
4972
|
+
obj[property] = data[property];
|
|
4973
|
+
}
|
|
4974
|
+
data = obj;
|
|
4975
|
+
}
|
|
4976
|
+
let result = new _Room2DComparisonProperties();
|
|
4977
|
+
result.init(data);
|
|
4978
|
+
return result;
|
|
4979
|
+
}
|
|
4980
|
+
toJSON(data) {
|
|
4981
|
+
data = typeof data === "object" ? data : {};
|
|
4982
|
+
data["type"] = this.type;
|
|
4983
|
+
data["floor_boundary"] = this.floor_boundary;
|
|
4984
|
+
data["floor_holes"] = this.floor_holes;
|
|
4985
|
+
data["comparison_windows"] = this.comparison_windows;
|
|
4986
|
+
data["comparison_skylight"] = this.comparison_skylight;
|
|
4987
|
+
data = super.toJSON(data);
|
|
4988
|
+
return instanceToPlain(data);
|
|
4989
|
+
}
|
|
4990
|
+
validate() {
|
|
4991
|
+
return __async(this, null, function* () {
|
|
4992
|
+
const errors = yield validate(this);
|
|
4993
|
+
if (errors.length > 0) {
|
|
4994
|
+
const errorMessages = errors.map((error) => Object.values(error.constraints || [error]).join(", ")).join("; ");
|
|
4995
|
+
throw new Error(`Validation failed: ${errorMessages}`);
|
|
4996
|
+
}
|
|
4997
|
+
return true;
|
|
4998
|
+
});
|
|
4999
|
+
}
|
|
5000
|
+
};
|
|
5001
|
+
__decorateClass([
|
|
5002
|
+
IsString(),
|
|
5003
|
+
IsOptional(),
|
|
5004
|
+
Matches(/^Room2DComparisonProperties$/)
|
|
5005
|
+
], _Room2DComparisonProperties.prototype, "type", 2);
|
|
5006
|
+
__decorateClass([
|
|
5007
|
+
IsArray(),
|
|
5008
|
+
IsNestedNumberArray(),
|
|
5009
|
+
IsOptional()
|
|
5010
|
+
], _Room2DComparisonProperties.prototype, "floor_boundary", 2);
|
|
5011
|
+
__decorateClass([
|
|
5012
|
+
IsArray(),
|
|
5013
|
+
IsNestedNumberArray(),
|
|
5014
|
+
IsOptional()
|
|
5015
|
+
], _Room2DComparisonProperties.prototype, "floor_holes", 2);
|
|
5016
|
+
__decorateClass([
|
|
5017
|
+
IsArray(),
|
|
5018
|
+
IsOptional(),
|
|
5019
|
+
Transform(({ value }) => value.map((item) => {
|
|
5020
|
+
if ((item == null ? void 0 : item.type) === "SingleWindow") return SingleWindow.fromJS(item);
|
|
5021
|
+
else if ((item == null ? void 0 : item.type) === "SimpleWindowArea") return SimpleWindowArea.fromJS(item);
|
|
5022
|
+
else if ((item == null ? void 0 : item.type) === "SimpleWindowRatio") return SimpleWindowRatio.fromJS(item);
|
|
5023
|
+
else if ((item == null ? void 0 : item.type) === "RepeatingWindowRatio") return RepeatingWindowRatio.fromJS(item);
|
|
5024
|
+
else if ((item == null ? void 0 : item.type) === "RectangularWindows") return RectangularWindows.fromJS(item);
|
|
5025
|
+
else if ((item == null ? void 0 : item.type) === "DetailedWindows") return DetailedWindows.fromJS(item);
|
|
5026
|
+
else return item;
|
|
5027
|
+
}))
|
|
5028
|
+
], _Room2DComparisonProperties.prototype, "comparison_windows", 2);
|
|
5029
|
+
__decorateClass([
|
|
5030
|
+
IsOptional(),
|
|
5031
|
+
Transform(({ value }) => {
|
|
5032
|
+
const item = value;
|
|
5033
|
+
if ((item == null ? void 0 : item.type) === "GriddedSkylightArea") return GriddedSkylightArea.fromJS(item);
|
|
5034
|
+
else if ((item == null ? void 0 : item.type) === "GriddedSkylightRatio") return GriddedSkylightRatio.fromJS(item);
|
|
5035
|
+
else if ((item == null ? void 0 : item.type) === "DetailedSkylights") return DetailedSkylights.fromJS(item);
|
|
5036
|
+
else return item;
|
|
5037
|
+
})
|
|
5038
|
+
], _Room2DComparisonProperties.prototype, "comparison_skylight", 2);
|
|
5039
|
+
var Room2DComparisonProperties = _Room2DComparisonProperties;
|
|
5040
|
+
|
|
4723
5041
|
// src/models/Room2DEnergyPropertiesAbridged.ts
|
|
4724
5042
|
var import_honeybee_schema4 = require("honeybee-schema");
|
|
4725
5043
|
var import_honeybee_schema5 = require("honeybee-schema");
|
|
@@ -5018,245 +5336,23 @@ var ExteriorFaceGridParameter = _ExteriorFaceGridParameter;
|
|
|
5018
5336
|
var _RoomGridParameter = class _RoomGridParameter extends _GridParameterBase {
|
|
5019
5337
|
constructor() {
|
|
5020
5338
|
super();
|
|
5021
|
-
/** Type */
|
|
5022
|
-
__publicField(this, "type");
|
|
5023
|
-
/** A number for how far to offset the grid from the Room2D floors. (Default: 1.0, suitable for Models in Meters). */
|
|
5024
|
-
__publicField(this, "offset");
|
|
5025
|
-
/** A number for the distance at which sensors close to walls should be removed. Note that this option has no effect unless the value is more than half of the dimension. */
|
|
5026
|
-
__publicField(this, "wall_offset");
|
|
5027
|
-
this.type = "RoomGridParameter";
|
|
5028
|
-
this.offset = 1;
|
|
5029
|
-
this.wall_offset = 0;
|
|
5030
|
-
}
|
|
5031
|
-
init(_data) {
|
|
5032
|
-
super.init(_data);
|
|
5033
|
-
if (_data) {
|
|
5034
|
-
const obj = plainToClass(_RoomGridParameter, _data, { enableImplicitConversion: true });
|
|
5035
|
-
this.type = obj.type;
|
|
5036
|
-
this.offset = obj.offset;
|
|
5037
|
-
this.wall_offset = obj.wall_offset;
|
|
5038
|
-
}
|
|
5039
|
-
}
|
|
5040
|
-
static fromJS(data) {
|
|
5041
|
-
data = typeof data === "object" ? data : {};
|
|
5042
|
-
if (Array.isArray(data)) {
|
|
5043
|
-
const obj = {};
|
|
5044
|
-
for (var property in data) {
|
|
5045
|
-
obj[property] = data[property];
|
|
5046
|
-
}
|
|
5047
|
-
data = obj;
|
|
5048
|
-
}
|
|
5049
|
-
let result = new _RoomGridParameter();
|
|
5050
|
-
result.init(data);
|
|
5051
|
-
return result;
|
|
5052
|
-
}
|
|
5053
|
-
toJSON(data) {
|
|
5054
|
-
data = typeof data === "object" ? data : {};
|
|
5055
|
-
data["type"] = this.type;
|
|
5056
|
-
data["offset"] = this.offset;
|
|
5057
|
-
data["wall_offset"] = this.wall_offset;
|
|
5058
|
-
data = super.toJSON(data);
|
|
5059
|
-
return instanceToPlain(data);
|
|
5060
|
-
}
|
|
5061
|
-
validate() {
|
|
5062
|
-
return __async(this, null, function* () {
|
|
5063
|
-
const errors = yield validate(this);
|
|
5064
|
-
if (errors.length > 0) {
|
|
5065
|
-
const errorMessages = errors.map((error) => Object.values(error.constraints || [error]).join(", ")).join("; ");
|
|
5066
|
-
throw new Error(`Validation failed: ${errorMessages}`);
|
|
5067
|
-
}
|
|
5068
|
-
return true;
|
|
5069
|
-
});
|
|
5070
|
-
}
|
|
5071
|
-
};
|
|
5072
|
-
__decorateClass([
|
|
5073
|
-
IsString(),
|
|
5074
|
-
IsOptional(),
|
|
5075
|
-
Matches(/^RoomGridParameter$/)
|
|
5076
|
-
], _RoomGridParameter.prototype, "type", 2);
|
|
5077
|
-
__decorateClass([
|
|
5078
|
-
IsNumber(),
|
|
5079
|
-
IsOptional()
|
|
5080
|
-
], _RoomGridParameter.prototype, "offset", 2);
|
|
5081
|
-
__decorateClass([
|
|
5082
|
-
IsNumber(),
|
|
5083
|
-
IsOptional()
|
|
5084
|
-
], _RoomGridParameter.prototype, "wall_offset", 2);
|
|
5085
|
-
var RoomGridParameter = _RoomGridParameter;
|
|
5086
|
-
|
|
5087
|
-
// src/models/RoomRadialGridParameter.ts
|
|
5088
|
-
var import_honeybee_schema7 = require("honeybee-schema");
|
|
5089
|
-
var _RoomRadialGridParameter = class _RoomRadialGridParameter extends RoomGridParameter {
|
|
5090
|
-
constructor() {
|
|
5091
|
-
super();
|
|
5092
|
-
/** A positive integer for the number of radial directions to be generated around each position. */
|
|
5093
|
-
__publicField(this, "dir_count");
|
|
5094
|
-
/** A vector as 3 (x, y, z) values to set the start direction of the generated directions. This can be used to orient the resulting sensors to specific parts of the scene. It can also change the elevation of the resulting directions since this start vector will always be rotated in the XY plane to generate the resulting directions. */
|
|
5095
|
-
__publicField(this, "start_vector");
|
|
5096
|
-
/** An optional number to override the radius of the meshes generated around each sensor. If Autocalculate, it will be equal to 45 percent of the grid dimension. */
|
|
5097
|
-
__publicField(this, "mesh_radius");
|
|
5098
|
-
/** Type */
|
|
5099
|
-
__publicField(this, "type");
|
|
5100
|
-
this.dir_count = 8;
|
|
5101
|
-
this.mesh_radius = new import_honeybee_schema7.Autocalculate();
|
|
5102
|
-
this.type = "RoomRadialGridParameter";
|
|
5103
|
-
}
|
|
5104
|
-
init(_data) {
|
|
5105
|
-
super.init(_data);
|
|
5106
|
-
if (_data) {
|
|
5107
|
-
const obj = plainToClass(_RoomRadialGridParameter, _data, { enableImplicitConversion: true });
|
|
5108
|
-
this.dir_count = obj.dir_count;
|
|
5109
|
-
this.start_vector = obj.start_vector;
|
|
5110
|
-
this.mesh_radius = obj.mesh_radius;
|
|
5111
|
-
this.type = obj.type;
|
|
5112
|
-
}
|
|
5113
|
-
}
|
|
5114
|
-
static fromJS(data) {
|
|
5115
|
-
data = typeof data === "object" ? data : {};
|
|
5116
|
-
if (Array.isArray(data)) {
|
|
5117
|
-
const obj = {};
|
|
5118
|
-
for (var property in data) {
|
|
5119
|
-
obj[property] = data[property];
|
|
5120
|
-
}
|
|
5121
|
-
data = obj;
|
|
5122
|
-
}
|
|
5123
|
-
let result = new _RoomRadialGridParameter();
|
|
5124
|
-
result.init(data);
|
|
5125
|
-
return result;
|
|
5126
|
-
}
|
|
5127
|
-
toJSON(data) {
|
|
5128
|
-
data = typeof data === "object" ? data : {};
|
|
5129
|
-
data["dir_count"] = this.dir_count;
|
|
5130
|
-
data["start_vector"] = this.start_vector;
|
|
5131
|
-
data["mesh_radius"] = this.mesh_radius;
|
|
5132
|
-
data["type"] = this.type;
|
|
5133
|
-
data = super.toJSON(data);
|
|
5134
|
-
return instanceToPlain(data);
|
|
5135
|
-
}
|
|
5136
|
-
validate() {
|
|
5137
|
-
return __async(this, null, function* () {
|
|
5138
|
-
const errors = yield validate(this);
|
|
5139
|
-
if (errors.length > 0) {
|
|
5140
|
-
const errorMessages = errors.map((error) => Object.values(error.constraints || [error]).join(", ")).join("; ");
|
|
5141
|
-
throw new Error(`Validation failed: ${errorMessages}`);
|
|
5142
|
-
}
|
|
5143
|
-
return true;
|
|
5144
|
-
});
|
|
5145
|
-
}
|
|
5146
|
-
};
|
|
5147
|
-
__decorateClass([
|
|
5148
|
-
IsInt(),
|
|
5149
|
-
IsOptional()
|
|
5150
|
-
], _RoomRadialGridParameter.prototype, "dir_count", 2);
|
|
5151
|
-
__decorateClass([
|
|
5152
|
-
IsArray(),
|
|
5153
|
-
IsNumber({}, { each: true }),
|
|
5154
|
-
IsOptional()
|
|
5155
|
-
], _RoomRadialGridParameter.prototype, "start_vector", 2);
|
|
5156
|
-
__decorateClass([
|
|
5157
|
-
IsOptional()
|
|
5158
|
-
], _RoomRadialGridParameter.prototype, "mesh_radius", 2);
|
|
5159
|
-
__decorateClass([
|
|
5160
|
-
IsString(),
|
|
5161
|
-
IsOptional(),
|
|
5162
|
-
Matches(/^RoomRadialGridParameter$/)
|
|
5163
|
-
], _RoomRadialGridParameter.prototype, "type", 2);
|
|
5164
|
-
var RoomRadialGridParameter = _RoomRadialGridParameter;
|
|
5165
|
-
|
|
5166
|
-
// src/models/Room2DRadiancePropertiesAbridged.ts
|
|
5167
|
-
var _Room2DRadiancePropertiesAbridged = class _Room2DRadiancePropertiesAbridged extends _OpenAPIGenBaseModel {
|
|
5168
|
-
constructor() {
|
|
5169
|
-
super();
|
|
5170
|
-
/** Type */
|
|
5171
|
-
__publicField(this, "type");
|
|
5172
|
-
/** Identifier of a ModifierSet to specify all modifiers for the Room2D. If None, the Room2D will use the Story or Building modifier_set or the Model global_modifier_set. Any ModifierSet assigned here will override those assigned to the parent objects. */
|
|
5173
|
-
__publicField(this, "modifier_set");
|
|
5174
|
-
/** An optional list of GridParameter objects to describe how sensor grids should be generated for the Room2D. */
|
|
5175
|
-
__publicField(this, "grid_parameters");
|
|
5176
|
-
this.type = "Room2DRadiancePropertiesAbridged";
|
|
5177
|
-
}
|
|
5178
|
-
init(_data) {
|
|
5179
|
-
super.init(_data);
|
|
5180
|
-
if (_data) {
|
|
5181
|
-
const obj = plainToClass(_Room2DRadiancePropertiesAbridged, _data, { enableImplicitConversion: true });
|
|
5182
|
-
this.type = obj.type;
|
|
5183
|
-
this.modifier_set = obj.modifier_set;
|
|
5184
|
-
this.grid_parameters = obj.grid_parameters;
|
|
5185
|
-
}
|
|
5186
|
-
}
|
|
5187
|
-
static fromJS(data) {
|
|
5188
|
-
data = typeof data === "object" ? data : {};
|
|
5189
|
-
if (Array.isArray(data)) {
|
|
5190
|
-
const obj = {};
|
|
5191
|
-
for (var property in data) {
|
|
5192
|
-
obj[property] = data[property];
|
|
5193
|
-
}
|
|
5194
|
-
data = obj;
|
|
5195
|
-
}
|
|
5196
|
-
let result = new _Room2DRadiancePropertiesAbridged();
|
|
5197
|
-
result.init(data);
|
|
5198
|
-
return result;
|
|
5199
|
-
}
|
|
5200
|
-
toJSON(data) {
|
|
5201
|
-
data = typeof data === "object" ? data : {};
|
|
5202
|
-
data["type"] = this.type;
|
|
5203
|
-
data["modifier_set"] = this.modifier_set;
|
|
5204
|
-
data["grid_parameters"] = this.grid_parameters;
|
|
5205
|
-
data = super.toJSON(data);
|
|
5206
|
-
return instanceToPlain(data);
|
|
5207
|
-
}
|
|
5208
|
-
validate() {
|
|
5209
|
-
return __async(this, null, function* () {
|
|
5210
|
-
const errors = yield validate(this);
|
|
5211
|
-
if (errors.length > 0) {
|
|
5212
|
-
const errorMessages = errors.map((error) => Object.values(error.constraints || [error]).join(", ")).join("; ");
|
|
5213
|
-
throw new Error(`Validation failed: ${errorMessages}`);
|
|
5214
|
-
}
|
|
5215
|
-
return true;
|
|
5216
|
-
});
|
|
5217
|
-
}
|
|
5218
|
-
};
|
|
5219
|
-
__decorateClass([
|
|
5220
|
-
IsString(),
|
|
5221
|
-
IsOptional(),
|
|
5222
|
-
Matches(/^Room2DRadiancePropertiesAbridged$/)
|
|
5223
|
-
], _Room2DRadiancePropertiesAbridged.prototype, "type", 2);
|
|
5224
|
-
__decorateClass([
|
|
5225
|
-
IsString(),
|
|
5226
|
-
IsOptional()
|
|
5227
|
-
], _Room2DRadiancePropertiesAbridged.prototype, "modifier_set", 2);
|
|
5228
|
-
__decorateClass([
|
|
5229
|
-
IsArray(),
|
|
5230
|
-
IsOptional(),
|
|
5231
|
-
Transform(({ value }) => value.map((item) => {
|
|
5232
|
-
if ((item == null ? void 0 : item.type) === "RoomGridParameter") return RoomGridParameter.fromJS(item);
|
|
5233
|
-
else if ((item == null ? void 0 : item.type) === "RoomRadialGridParameter") return RoomRadialGridParameter.fromJS(item);
|
|
5234
|
-
else if ((item == null ? void 0 : item.type) === "ExteriorFaceGridParameter") return ExteriorFaceGridParameter.fromJS(item);
|
|
5235
|
-
else if ((item == null ? void 0 : item.type) === "ExteriorApertureGridParameter") return ExteriorApertureGridParameter.fromJS(item);
|
|
5236
|
-
else return item;
|
|
5237
|
-
}))
|
|
5238
|
-
], _Room2DRadiancePropertiesAbridged.prototype, "grid_parameters", 2);
|
|
5239
|
-
var Room2DRadiancePropertiesAbridged = _Room2DRadiancePropertiesAbridged;
|
|
5240
|
-
|
|
5241
|
-
// src/models/Room2DPropertiesAbridged.ts
|
|
5242
|
-
var _Room2DPropertiesAbridged = class _Room2DPropertiesAbridged extends _OpenAPIGenBaseModel {
|
|
5243
|
-
constructor() {
|
|
5244
|
-
super();
|
|
5245
|
-
/** Type */
|
|
5246
|
-
__publicField(this, "type");
|
|
5247
|
-
/** Energy */
|
|
5248
|
-
__publicField(this, "energy");
|
|
5249
|
-
/** Radiance */
|
|
5250
|
-
__publicField(this, "radiance");
|
|
5251
|
-
this.type = "Room2DPropertiesAbridged";
|
|
5339
|
+
/** Type */
|
|
5340
|
+
__publicField(this, "type");
|
|
5341
|
+
/** A number for how far to offset the grid from the Room2D floors. (Default: 1.0, suitable for Models in Meters). */
|
|
5342
|
+
__publicField(this, "offset");
|
|
5343
|
+
/** A number for the distance at which sensors close to walls should be removed. Note that this option has no effect unless the value is more than half of the dimension. */
|
|
5344
|
+
__publicField(this, "wall_offset");
|
|
5345
|
+
this.type = "RoomGridParameter";
|
|
5346
|
+
this.offset = 1;
|
|
5347
|
+
this.wall_offset = 0;
|
|
5252
5348
|
}
|
|
5253
5349
|
init(_data) {
|
|
5254
5350
|
super.init(_data);
|
|
5255
5351
|
if (_data) {
|
|
5256
|
-
const obj = plainToClass(
|
|
5352
|
+
const obj = plainToClass(_RoomGridParameter, _data, { enableImplicitConversion: true });
|
|
5257
5353
|
this.type = obj.type;
|
|
5258
|
-
this.
|
|
5259
|
-
this.
|
|
5354
|
+
this.offset = obj.offset;
|
|
5355
|
+
this.wall_offset = obj.wall_offset;
|
|
5260
5356
|
}
|
|
5261
5357
|
}
|
|
5262
5358
|
static fromJS(data) {
|
|
@@ -5268,15 +5364,15 @@ var _Room2DPropertiesAbridged = class _Room2DPropertiesAbridged extends _OpenAPI
|
|
|
5268
5364
|
}
|
|
5269
5365
|
data = obj;
|
|
5270
5366
|
}
|
|
5271
|
-
let result = new
|
|
5367
|
+
let result = new _RoomGridParameter();
|
|
5272
5368
|
result.init(data);
|
|
5273
5369
|
return result;
|
|
5274
5370
|
}
|
|
5275
5371
|
toJSON(data) {
|
|
5276
5372
|
data = typeof data === "object" ? data : {};
|
|
5277
5373
|
data["type"] = this.type;
|
|
5278
|
-
data["
|
|
5279
|
-
data["
|
|
5374
|
+
data["offset"] = this.offset;
|
|
5375
|
+
data["wall_offset"] = this.wall_offset;
|
|
5280
5376
|
data = super.toJSON(data);
|
|
5281
5377
|
return instanceToPlain(data);
|
|
5282
5378
|
}
|
|
@@ -5294,42 +5390,43 @@ var _Room2DPropertiesAbridged = class _Room2DPropertiesAbridged extends _OpenAPI
|
|
|
5294
5390
|
__decorateClass([
|
|
5295
5391
|
IsString(),
|
|
5296
5392
|
IsOptional(),
|
|
5297
|
-
Matches(/^
|
|
5298
|
-
],
|
|
5393
|
+
Matches(/^RoomGridParameter$/)
|
|
5394
|
+
], _RoomGridParameter.prototype, "type", 2);
|
|
5299
5395
|
__decorateClass([
|
|
5300
|
-
|
|
5301
|
-
Type(() => Room2DEnergyPropertiesAbridged),
|
|
5302
|
-
ValidateNested(),
|
|
5396
|
+
IsNumber(),
|
|
5303
5397
|
IsOptional()
|
|
5304
|
-
],
|
|
5398
|
+
], _RoomGridParameter.prototype, "offset", 2);
|
|
5305
5399
|
__decorateClass([
|
|
5306
|
-
|
|
5307
|
-
Type(() => Room2DRadiancePropertiesAbridged),
|
|
5308
|
-
ValidateNested(),
|
|
5400
|
+
IsNumber(),
|
|
5309
5401
|
IsOptional()
|
|
5310
|
-
],
|
|
5311
|
-
var
|
|
5402
|
+
], _RoomGridParameter.prototype, "wall_offset", 2);
|
|
5403
|
+
var RoomGridParameter = _RoomGridParameter;
|
|
5312
5404
|
|
|
5313
|
-
// src/models/
|
|
5314
|
-
var
|
|
5405
|
+
// src/models/RoomRadialGridParameter.ts
|
|
5406
|
+
var import_honeybee_schema7 = require("honeybee-schema");
|
|
5407
|
+
var _RoomRadialGridParameter = class _RoomRadialGridParameter extends RoomGridParameter {
|
|
5315
5408
|
constructor() {
|
|
5316
5409
|
super();
|
|
5317
|
-
/** A
|
|
5318
|
-
__publicField(this, "
|
|
5410
|
+
/** A positive integer for the number of radial directions to be generated around each position. */
|
|
5411
|
+
__publicField(this, "dir_count");
|
|
5412
|
+
/** A vector as 3 (x, y, z) values to set the start direction of the generated directions. This can be used to orient the resulting sensors to specific parts of the scene. It can also change the elevation of the resulting directions since this start vector will always be rotated in the XY plane to generate the resulting directions. */
|
|
5413
|
+
__publicField(this, "start_vector");
|
|
5414
|
+
/** An optional number to override the radius of the meshes generated around each sensor. If Autocalculate, it will be equal to 45 percent of the grid dimension. */
|
|
5415
|
+
__publicField(this, "mesh_radius");
|
|
5319
5416
|
/** Type */
|
|
5320
5417
|
__publicField(this, "type");
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
this.type = "
|
|
5324
|
-
this.rect_split = true;
|
|
5418
|
+
this.dir_count = 8;
|
|
5419
|
+
this.mesh_radius = new import_honeybee_schema7.Autocalculate();
|
|
5420
|
+
this.type = "RoomRadialGridParameter";
|
|
5325
5421
|
}
|
|
5326
5422
|
init(_data) {
|
|
5327
5423
|
super.init(_data);
|
|
5328
5424
|
if (_data) {
|
|
5329
|
-
const obj = plainToClass(
|
|
5330
|
-
this.
|
|
5425
|
+
const obj = plainToClass(_RoomRadialGridParameter, _data, { enableImplicitConversion: true });
|
|
5426
|
+
this.dir_count = obj.dir_count;
|
|
5427
|
+
this.start_vector = obj.start_vector;
|
|
5428
|
+
this.mesh_radius = obj.mesh_radius;
|
|
5331
5429
|
this.type = obj.type;
|
|
5332
|
-
this.rect_split = obj.rect_split;
|
|
5333
5430
|
}
|
|
5334
5431
|
}
|
|
5335
5432
|
static fromJS(data) {
|
|
@@ -5341,15 +5438,16 @@ var _SimpleWindowArea = class _SimpleWindowArea extends _WindowParameterBase {
|
|
|
5341
5438
|
}
|
|
5342
5439
|
data = obj;
|
|
5343
5440
|
}
|
|
5344
|
-
let result = new
|
|
5441
|
+
let result = new _RoomRadialGridParameter();
|
|
5345
5442
|
result.init(data);
|
|
5346
5443
|
return result;
|
|
5347
5444
|
}
|
|
5348
5445
|
toJSON(data) {
|
|
5349
5446
|
data = typeof data === "object" ? data : {};
|
|
5350
|
-
data["
|
|
5447
|
+
data["dir_count"] = this.dir_count;
|
|
5448
|
+
data["start_vector"] = this.start_vector;
|
|
5449
|
+
data["mesh_radius"] = this.mesh_radius;
|
|
5351
5450
|
data["type"] = this.type;
|
|
5352
|
-
data["rect_split"] = this.rect_split;
|
|
5353
5451
|
data = super.toJSON(data);
|
|
5354
5452
|
return instanceToPlain(data);
|
|
5355
5453
|
}
|
|
@@ -5365,40 +5463,43 @@ var _SimpleWindowArea = class _SimpleWindowArea extends _WindowParameterBase {
|
|
|
5365
5463
|
}
|
|
5366
5464
|
};
|
|
5367
5465
|
__decorateClass([
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
],
|
|
5466
|
+
IsInt(),
|
|
5467
|
+
IsOptional()
|
|
5468
|
+
], _RoomRadialGridParameter.prototype, "dir_count", 2);
|
|
5371
5469
|
__decorateClass([
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
],
|
|
5470
|
+
IsArray(),
|
|
5471
|
+
IsNumber({}, { each: true }),
|
|
5472
|
+
IsOptional()
|
|
5473
|
+
], _RoomRadialGridParameter.prototype, "start_vector", 2);
|
|
5376
5474
|
__decorateClass([
|
|
5377
|
-
IsBoolean(),
|
|
5378
5475
|
IsOptional()
|
|
5379
|
-
],
|
|
5380
|
-
|
|
5476
|
+
], _RoomRadialGridParameter.prototype, "mesh_radius", 2);
|
|
5477
|
+
__decorateClass([
|
|
5478
|
+
IsString(),
|
|
5479
|
+
IsOptional(),
|
|
5480
|
+
Matches(/^RoomRadialGridParameter$/)
|
|
5481
|
+
], _RoomRadialGridParameter.prototype, "type", 2);
|
|
5482
|
+
var RoomRadialGridParameter = _RoomRadialGridParameter;
|
|
5381
5483
|
|
|
5382
|
-
// src/models/
|
|
5383
|
-
var
|
|
5484
|
+
// src/models/Room2DRadiancePropertiesAbridged.ts
|
|
5485
|
+
var _Room2DRadiancePropertiesAbridged = class _Room2DRadiancePropertiesAbridged extends _OpenAPIGenBaseModel {
|
|
5384
5486
|
constructor() {
|
|
5385
5487
|
super();
|
|
5386
|
-
/** A number between 0 and 1 for the ratio between the window area and the parent wall surface area. */
|
|
5387
|
-
__publicField(this, "window_ratio");
|
|
5388
5488
|
/** Type */
|
|
5389
5489
|
__publicField(this, "type");
|
|
5390
|
-
/**
|
|
5391
|
-
__publicField(this, "
|
|
5392
|
-
|
|
5393
|
-
this
|
|
5490
|
+
/** Identifier of a ModifierSet to specify all modifiers for the Room2D. If None, the Room2D will use the Story or Building modifier_set or the Model global_modifier_set. Any ModifierSet assigned here will override those assigned to the parent objects. */
|
|
5491
|
+
__publicField(this, "modifier_set");
|
|
5492
|
+
/** An optional list of GridParameter objects to describe how sensor grids should be generated for the Room2D. */
|
|
5493
|
+
__publicField(this, "grid_parameters");
|
|
5494
|
+
this.type = "Room2DRadiancePropertiesAbridged";
|
|
5394
5495
|
}
|
|
5395
5496
|
init(_data) {
|
|
5396
5497
|
super.init(_data);
|
|
5397
5498
|
if (_data) {
|
|
5398
|
-
const obj = plainToClass(
|
|
5399
|
-
this.window_ratio = obj.window_ratio;
|
|
5499
|
+
const obj = plainToClass(_Room2DRadiancePropertiesAbridged, _data, { enableImplicitConversion: true });
|
|
5400
5500
|
this.type = obj.type;
|
|
5401
|
-
this.
|
|
5501
|
+
this.modifier_set = obj.modifier_set;
|
|
5502
|
+
this.grid_parameters = obj.grid_parameters;
|
|
5402
5503
|
}
|
|
5403
5504
|
}
|
|
5404
5505
|
static fromJS(data) {
|
|
@@ -5410,15 +5511,15 @@ var _SimpleWindowRatio = class _SimpleWindowRatio extends _WindowParameterBase {
|
|
|
5410
5511
|
}
|
|
5411
5512
|
data = obj;
|
|
5412
5513
|
}
|
|
5413
|
-
let result = new
|
|
5514
|
+
let result = new _Room2DRadiancePropertiesAbridged();
|
|
5414
5515
|
result.init(data);
|
|
5415
5516
|
return result;
|
|
5416
5517
|
}
|
|
5417
5518
|
toJSON(data) {
|
|
5418
5519
|
data = typeof data === "object" ? data : {};
|
|
5419
|
-
data["window_ratio"] = this.window_ratio;
|
|
5420
5520
|
data["type"] = this.type;
|
|
5421
|
-
data["
|
|
5521
|
+
data["modifier_set"] = this.modifier_set;
|
|
5522
|
+
data["grid_parameters"] = this.grid_parameters;
|
|
5422
5523
|
data = super.toJSON(data);
|
|
5423
5524
|
return instanceToPlain(data);
|
|
5424
5525
|
}
|
|
@@ -5433,44 +5534,50 @@ var _SimpleWindowRatio = class _SimpleWindowRatio extends _WindowParameterBase {
|
|
|
5433
5534
|
});
|
|
5434
5535
|
}
|
|
5435
5536
|
};
|
|
5436
|
-
__decorateClass([
|
|
5437
|
-
IsNumber(),
|
|
5438
|
-
IsDefined()
|
|
5439
|
-
], _SimpleWindowRatio.prototype, "window_ratio", 2);
|
|
5440
5537
|
__decorateClass([
|
|
5441
5538
|
IsString(),
|
|
5442
5539
|
IsOptional(),
|
|
5443
|
-
Matches(/^
|
|
5444
|
-
],
|
|
5540
|
+
Matches(/^Room2DRadiancePropertiesAbridged$/)
|
|
5541
|
+
], _Room2DRadiancePropertiesAbridged.prototype, "type", 2);
|
|
5445
5542
|
__decorateClass([
|
|
5446
|
-
|
|
5543
|
+
IsString(),
|
|
5447
5544
|
IsOptional()
|
|
5448
|
-
],
|
|
5449
|
-
|
|
5545
|
+
], _Room2DRadiancePropertiesAbridged.prototype, "modifier_set", 2);
|
|
5546
|
+
__decorateClass([
|
|
5547
|
+
IsArray(),
|
|
5548
|
+
IsOptional(),
|
|
5549
|
+
Transform(({ value }) => value.map((item) => {
|
|
5550
|
+
if ((item == null ? void 0 : item.type) === "RoomGridParameter") return RoomGridParameter.fromJS(item);
|
|
5551
|
+
else if ((item == null ? void 0 : item.type) === "RoomRadialGridParameter") return RoomRadialGridParameter.fromJS(item);
|
|
5552
|
+
else if ((item == null ? void 0 : item.type) === "ExteriorFaceGridParameter") return ExteriorFaceGridParameter.fromJS(item);
|
|
5553
|
+
else if ((item == null ? void 0 : item.type) === "ExteriorApertureGridParameter") return ExteriorApertureGridParameter.fromJS(item);
|
|
5554
|
+
else return item;
|
|
5555
|
+
}))
|
|
5556
|
+
], _Room2DRadiancePropertiesAbridged.prototype, "grid_parameters", 2);
|
|
5557
|
+
var Room2DRadiancePropertiesAbridged = _Room2DRadiancePropertiesAbridged;
|
|
5450
5558
|
|
|
5451
|
-
// src/models/
|
|
5452
|
-
var
|
|
5559
|
+
// src/models/Room2DPropertiesAbridged.ts
|
|
5560
|
+
var _Room2DPropertiesAbridged = class _Room2DPropertiesAbridged extends _OpenAPIGenBaseModel {
|
|
5453
5561
|
constructor() {
|
|
5454
5562
|
super();
|
|
5455
|
-
/** A number for the window width. Note that, if this width is applied to a wall that is too narrow for this width, the generated window will automatically be shortened when it is applied to the wall. In this way, setting the width to be `float(""inf"")` will create parameters that always generate a ribbon window. */
|
|
5456
|
-
__publicField(this, "width");
|
|
5457
|
-
/** A number for the window height. Note that, if this height is applied to a wall that is too short for this height, the generated window will automatically be shortened when it is applied to the wall. */
|
|
5458
|
-
__publicField(this, "height");
|
|
5459
5563
|
/** Type */
|
|
5460
5564
|
__publicField(this, "type");
|
|
5461
|
-
/**
|
|
5462
|
-
__publicField(this, "
|
|
5463
|
-
|
|
5464
|
-
this
|
|
5565
|
+
/** Energy */
|
|
5566
|
+
__publicField(this, "energy");
|
|
5567
|
+
/** Radiance */
|
|
5568
|
+
__publicField(this, "radiance");
|
|
5569
|
+
/** Comparison */
|
|
5570
|
+
__publicField(this, "comparison");
|
|
5571
|
+
this.type = "Room2DPropertiesAbridged";
|
|
5465
5572
|
}
|
|
5466
5573
|
init(_data) {
|
|
5467
5574
|
super.init(_data);
|
|
5468
5575
|
if (_data) {
|
|
5469
|
-
const obj = plainToClass(
|
|
5470
|
-
this.width = obj.width;
|
|
5471
|
-
this.height = obj.height;
|
|
5576
|
+
const obj = plainToClass(_Room2DPropertiesAbridged, _data, { enableImplicitConversion: true });
|
|
5472
5577
|
this.type = obj.type;
|
|
5473
|
-
this.
|
|
5578
|
+
this.energy = obj.energy;
|
|
5579
|
+
this.radiance = obj.radiance;
|
|
5580
|
+
this.comparison = obj.comparison;
|
|
5474
5581
|
}
|
|
5475
5582
|
}
|
|
5476
5583
|
static fromJS(data) {
|
|
@@ -5482,16 +5589,16 @@ var _SingleWindow = class _SingleWindow extends _WindowParameterBase {
|
|
|
5482
5589
|
}
|
|
5483
5590
|
data = obj;
|
|
5484
5591
|
}
|
|
5485
|
-
let result = new
|
|
5592
|
+
let result = new _Room2DPropertiesAbridged();
|
|
5486
5593
|
result.init(data);
|
|
5487
5594
|
return result;
|
|
5488
5595
|
}
|
|
5489
5596
|
toJSON(data) {
|
|
5490
5597
|
data = typeof data === "object" ? data : {};
|
|
5491
|
-
data["width"] = this.width;
|
|
5492
|
-
data["height"] = this.height;
|
|
5493
5598
|
data["type"] = this.type;
|
|
5494
|
-
data["
|
|
5599
|
+
data["energy"] = this.energy;
|
|
5600
|
+
data["radiance"] = this.radiance;
|
|
5601
|
+
data["comparison"] = this.comparison;
|
|
5495
5602
|
data = super.toJSON(data);
|
|
5496
5603
|
return instanceToPlain(data);
|
|
5497
5604
|
}
|
|
@@ -5506,24 +5613,30 @@ var _SingleWindow = class _SingleWindow extends _WindowParameterBase {
|
|
|
5506
5613
|
});
|
|
5507
5614
|
}
|
|
5508
5615
|
};
|
|
5509
|
-
__decorateClass([
|
|
5510
|
-
IsNumber(),
|
|
5511
|
-
IsDefined()
|
|
5512
|
-
], _SingleWindow.prototype, "width", 2);
|
|
5513
|
-
__decorateClass([
|
|
5514
|
-
IsNumber(),
|
|
5515
|
-
IsDefined()
|
|
5516
|
-
], _SingleWindow.prototype, "height", 2);
|
|
5517
5616
|
__decorateClass([
|
|
5518
5617
|
IsString(),
|
|
5519
5618
|
IsOptional(),
|
|
5520
|
-
Matches(/^
|
|
5521
|
-
],
|
|
5619
|
+
Matches(/^Room2DPropertiesAbridged$/)
|
|
5620
|
+
], _Room2DPropertiesAbridged.prototype, "type", 2);
|
|
5522
5621
|
__decorateClass([
|
|
5523
|
-
|
|
5622
|
+
IsInstance(Room2DEnergyPropertiesAbridged),
|
|
5623
|
+
Type(() => Room2DEnergyPropertiesAbridged),
|
|
5624
|
+
ValidateNested(),
|
|
5524
5625
|
IsOptional()
|
|
5525
|
-
],
|
|
5526
|
-
|
|
5626
|
+
], _Room2DPropertiesAbridged.prototype, "energy", 2);
|
|
5627
|
+
__decorateClass([
|
|
5628
|
+
IsInstance(Room2DRadiancePropertiesAbridged),
|
|
5629
|
+
Type(() => Room2DRadiancePropertiesAbridged),
|
|
5630
|
+
ValidateNested(),
|
|
5631
|
+
IsOptional()
|
|
5632
|
+
], _Room2DPropertiesAbridged.prototype, "radiance", 2);
|
|
5633
|
+
__decorateClass([
|
|
5634
|
+
IsInstance(Room2DComparisonProperties),
|
|
5635
|
+
Type(() => Room2DComparisonProperties),
|
|
5636
|
+
ValidateNested(),
|
|
5637
|
+
IsOptional()
|
|
5638
|
+
], _Room2DPropertiesAbridged.prototype, "comparison", 2);
|
|
5639
|
+
var Room2DPropertiesAbridged = _Room2DPropertiesAbridged;
|
|
5527
5640
|
|
|
5528
5641
|
// src/models/Room2D.ts
|
|
5529
5642
|
var import_honeybee_schema13 = require("honeybee-schema");
|
|
@@ -6458,6 +6571,58 @@ var ContextShade = _ContextShade;
|
|
|
6458
6571
|
// src/models/Model.ts
|
|
6459
6572
|
var import_honeybee_schema82 = require("honeybee-schema");
|
|
6460
6573
|
|
|
6574
|
+
// src/models/ModelComparisonProperties.ts
|
|
6575
|
+
var _ModelComparisonProperties = class _ModelComparisonProperties extends _OpenAPIGenBaseModel {
|
|
6576
|
+
constructor() {
|
|
6577
|
+
super();
|
|
6578
|
+
/** Type */
|
|
6579
|
+
__publicField(this, "type");
|
|
6580
|
+
this.type = "ModelComparisonProperties";
|
|
6581
|
+
}
|
|
6582
|
+
init(_data) {
|
|
6583
|
+
super.init(_data);
|
|
6584
|
+
if (_data) {
|
|
6585
|
+
const obj = plainToClass(_ModelComparisonProperties, _data, { enableImplicitConversion: true });
|
|
6586
|
+
this.type = obj.type;
|
|
6587
|
+
}
|
|
6588
|
+
}
|
|
6589
|
+
static fromJS(data) {
|
|
6590
|
+
data = typeof data === "object" ? data : {};
|
|
6591
|
+
if (Array.isArray(data)) {
|
|
6592
|
+
const obj = {};
|
|
6593
|
+
for (var property in data) {
|
|
6594
|
+
obj[property] = data[property];
|
|
6595
|
+
}
|
|
6596
|
+
data = obj;
|
|
6597
|
+
}
|
|
6598
|
+
let result = new _ModelComparisonProperties();
|
|
6599
|
+
result.init(data);
|
|
6600
|
+
return result;
|
|
6601
|
+
}
|
|
6602
|
+
toJSON(data) {
|
|
6603
|
+
data = typeof data === "object" ? data : {};
|
|
6604
|
+
data["type"] = this.type;
|
|
6605
|
+
data = super.toJSON(data);
|
|
6606
|
+
return instanceToPlain(data);
|
|
6607
|
+
}
|
|
6608
|
+
validate() {
|
|
6609
|
+
return __async(this, null, function* () {
|
|
6610
|
+
const errors = yield validate(this);
|
|
6611
|
+
if (errors.length > 0) {
|
|
6612
|
+
const errorMessages = errors.map((error) => Object.values(error.constraints || [error]).join(", ")).join("; ");
|
|
6613
|
+
throw new Error(`Validation failed: ${errorMessages}`);
|
|
6614
|
+
}
|
|
6615
|
+
return true;
|
|
6616
|
+
});
|
|
6617
|
+
}
|
|
6618
|
+
};
|
|
6619
|
+
__decorateClass([
|
|
6620
|
+
IsString(),
|
|
6621
|
+
IsOptional(),
|
|
6622
|
+
Matches(/^ModelComparisonProperties$/)
|
|
6623
|
+
], _ModelComparisonProperties.prototype, "type", 2);
|
|
6624
|
+
var ModelComparisonProperties = _ModelComparisonProperties;
|
|
6625
|
+
|
|
6461
6626
|
// src/models/ModelEnergyProperties.ts
|
|
6462
6627
|
var import_honeybee_schema21 = require("honeybee-schema");
|
|
6463
6628
|
var import_honeybee_schema22 = require("honeybee-schema");
|
|
@@ -7412,6 +7577,8 @@ var _ModelProperties = class _ModelProperties extends _OpenAPIGenBaseModel {
|
|
|
7412
7577
|
__publicField(this, "energy");
|
|
7413
7578
|
/** Radiance */
|
|
7414
7579
|
__publicField(this, "radiance");
|
|
7580
|
+
/** Comparison */
|
|
7581
|
+
__publicField(this, "comparison");
|
|
7415
7582
|
this.type = "ModelProperties";
|
|
7416
7583
|
}
|
|
7417
7584
|
init(_data) {
|
|
@@ -7421,6 +7588,7 @@ var _ModelProperties = class _ModelProperties extends _OpenAPIGenBaseModel {
|
|
|
7421
7588
|
this.type = obj.type;
|
|
7422
7589
|
this.energy = obj.energy;
|
|
7423
7590
|
this.radiance = obj.radiance;
|
|
7591
|
+
this.comparison = obj.comparison;
|
|
7424
7592
|
}
|
|
7425
7593
|
}
|
|
7426
7594
|
static fromJS(data) {
|
|
@@ -7441,6 +7609,7 @@ var _ModelProperties = class _ModelProperties extends _OpenAPIGenBaseModel {
|
|
|
7441
7609
|
data["type"] = this.type;
|
|
7442
7610
|
data["energy"] = this.energy;
|
|
7443
7611
|
data["radiance"] = this.radiance;
|
|
7612
|
+
data["comparison"] = this.comparison;
|
|
7444
7613
|
data = super.toJSON(data);
|
|
7445
7614
|
return instanceToPlain(data);
|
|
7446
7615
|
}
|
|
@@ -7472,6 +7641,12 @@ __decorateClass([
|
|
|
7472
7641
|
ValidateNested(),
|
|
7473
7642
|
IsOptional()
|
|
7474
7643
|
], _ModelProperties.prototype, "radiance", 2);
|
|
7644
|
+
__decorateClass([
|
|
7645
|
+
IsInstance(ModelComparisonProperties),
|
|
7646
|
+
Type(() => ModelComparisonProperties),
|
|
7647
|
+
ValidateNested(),
|
|
7648
|
+
IsOptional()
|
|
7649
|
+
], _ModelProperties.prototype, "comparison", 2);
|
|
7475
7650
|
var ModelProperties = _ModelProperties;
|
|
7476
7651
|
|
|
7477
7652
|
// src/models/Model.ts
|
|
@@ -7623,6 +7798,7 @@ var Model = _Model;
|
|
|
7623
7798
|
LouversByCount,
|
|
7624
7799
|
LouversByDistance,
|
|
7625
7800
|
Model,
|
|
7801
|
+
ModelComparisonProperties,
|
|
7626
7802
|
ModelEnergyProperties,
|
|
7627
7803
|
ModelProperties,
|
|
7628
7804
|
ModelRadianceProperties,
|
|
@@ -7631,6 +7807,7 @@ var Model = _Model;
|
|
|
7631
7807
|
RepeatingWindowRatio,
|
|
7632
7808
|
RoofSpecification,
|
|
7633
7809
|
Room2D,
|
|
7810
|
+
Room2DComparisonProperties,
|
|
7634
7811
|
Room2DEnergyPropertiesAbridged,
|
|
7635
7812
|
Room2DPropertiesAbridged,
|
|
7636
7813
|
Room2DRadiancePropertiesAbridged,
|