gs-cae-design 1.1.56 → 1.1.57
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/README.md +6 -0
- package/docs/classes/CommandInterfaceManager.md +125 -0
- package/docs/classes/Viewer.md +1 -3
- package/lib/.gz +0 -0
- package/lib/CAEDesign.common-report.html +2 -2
- package/lib/CAEDesign.common.js +387 -68
- package/lib/CAEDesign.umd-report.html +2 -2
- package/lib/CAEDesign.umd.js +387 -68
- package/lib/CAEDesign.umd.min-report.html +2 -2
- package/lib/CAEDesign.umd.min.js +387 -68
- package/package.json +1 -1
- package/src/caeCardEditor/caeCardObjects/sacinp/cardCENTER.ts +12 -1
- package/src/caeCardEditor/caeCardObjects/sacinp/cardSURFDR.ts +138 -0
- package/src/caeCardEditor/caeCardObjects/sacinp/cardSURFID.ts +1 -1
- package/src/caeCardEditor/caeCardObjects/sacinp/cardWGTMEMCONC.ts +11 -2
- package/src/caeCardEditor/caeCardObjects/sacinp/cardWGTMEMUNIF.ts +30 -0
- package/src/caeCardEditor/caeCardObjects/seainp/cardLCOMB.ts +22 -0
- package/src/caeCardEditor/caeCardObjects/seainp/cardLDOPT.ts +0 -8
- package/src/gsDevFx/managers/datReaderManager.ts +206 -106
- package/src/gsDevFx/managers/datWriterManager.ts +101 -16
- package/src/gsDevFx/managers/interfaceManagers/commandInterfaceManager.ts +129 -4
- package/src/gsDevFx/managers/persistenceManager.ts +16 -2
- package/src/gsDevFx/objects/caeObjects/optionObjects/{modelCenter.ts → modelSurfDR.ts} +56 -56
- package/src/gsDevFx/objects/caeObjects/pretreatment/boundaryJointsObject.ts +206 -0
- package/src/gsDevFx/objects/caeObjects/pretreatment/centerRenderObject.ts +88 -0
- package/src/gsDevFx/objects/caeObjects/pretreatment/surfaceDefinitionObject.ts +128 -0
- package/src/gsDevFx/objects/caeObjects/pretreatment/surfaceWeightObject.ts +143 -0
- package/src/gsDevFx/objects/loadCombinationObjects/loadCombinationGroupObject.ts +100 -0
- package/src/gsDevFx/objects/loadCombinationObjects/loadCombinationObject.ts +134 -0
- package/src/gsDevFx/objects/weightObjects/instanceMemberWeightConcentratedObject.ts +82 -0
- package/src/gsDevFx/objects/weightObjects/instanceMemberWeightDistributedObject.ts +147 -0
- package/src/gsDevFx/objects/weightObjects/jointWeightObject.ts +6 -8
- package/src/gsDevFx/objects/weightObjects/memberWeightBaseObject.ts +108 -0
- package/src/gsDevFx/objects/weightObjects/memberWeightConcentratedObject.ts +138 -0
- package/src/gsDevFx/objects/weightObjects/memberWeightDistributedObject.ts +156 -0
- package/src/gsDevFx/objects/weightObjects/weightBaseObject.ts +87 -0
- package/src/gsDevFx/objects/weightObjects/weightGroupObject.ts +14 -2
- package/src/gsDevFx/objects/weightObjects/weightIdObject.ts +3 -4
- package/src/gsDevFx/viewer.ts +27 -14
- package/src/index.ts +1 -1
- package/src/viewerWrapper/commands/aftertreatment/addLoadCombination/addLoadCombinationConfig.ts +77 -0
- package/src/viewerWrapper/commands/aftertreatment/addLoadCombination/commandAddLoadCombination.ts +200 -0
- package/src/viewerWrapper/commands/aftertreatment/editLoadCombination/commandEditLoadCombination.ts +248 -0
- package/src/viewerWrapper/commands/aftertreatment/editLoadCombination/editLoadCombinationConfig.ts +104 -0
- package/src/viewerWrapper/commands/aftertreatment/setAndShowSeastateLoadOptions/commandSetAndShowSeastateLoadOptions.ts +201 -0
- package/src/viewerWrapper/commands/aftertreatment/setAndShowSeastateLoadOptions/setAndShowSeastateLoadOptionsConfig.ts +253 -0
- package/src/viewerWrapper/commands/createSection/commandCreateSection.ts +24 -14
- package/src/viewerWrapper/commands/editSection/commandEditSection.ts +8 -0
- package/src/viewerWrapper/commands/pretreatment/addJointWeight/commandAddJointWeight.ts +9 -9
- package/src/viewerWrapper/commands/pretreatment/addMemberWeight/addMemberWeightConfig.ts +111 -0
- package/src/viewerWrapper/commands/pretreatment/addMemberWeight/commandAddMemberWeight.ts +405 -0
- package/src/viewerWrapper/commands/pretreatment/centerOfRoll/centerOfRollConfig.ts +54 -0
- package/src/viewerWrapper/commands/pretreatment/centerOfRoll/commandCenterOfRoll.ts +110 -0
- package/src/viewerWrapper/commands/pretreatment/editJointWeight/commandEditJointWeight.ts +9 -0
- package/src/viewerWrapper/commands/pretreatment/editMemberWeight/commandEditMemberWeight.ts +497 -0
- package/src/viewerWrapper/commands/pretreatment/editMemberWeight/editMemberWeightConfig.ts +107 -0
- package/src/viewerWrapper/commands/pretreatment/surfaceDefinition/commandSurfaceDefinition.ts +278 -0
- package/src/viewerWrapper/commands/pretreatment/surfaceDefinition/surfaceDefinitionConfig.ts +57 -0
- package/src/viewerWrapper/commands/pretreatment/surfaceDefinitionEdit/commandSurfaceDefinitionEdit.ts +280 -0
- package/src/viewerWrapper/commands/pretreatment/surfaceDefinitionEdit/surfaceDefinitionEditConfig.ts +49 -0
- package/src/viewerWrapper/commands/pretreatment/surfaceWeightAdd/commandSurfaceWeightAdd.ts +250 -0
- package/src/viewerWrapper/commands/pretreatment/surfaceWeightAdd/surfaceWeightAddConfig.ts +53 -0
- package/src/viewerWrapper/commands/pretreatment/viewWeightProperty/commandViewWeightProperty.ts +257 -44
- package/src/viewerWrapper/commands/splitMember/commandSplitMember.ts +1 -1
- package/types/caeDesign/src/caeCardEditor/caeCardObjects/sacinp/cardCENTER.d.ts +2 -0
- package/types/caeDesign/src/caeCardEditor/caeCardObjects/sacinp/cardCENTER.d.ts.map +1 -1
- package/types/caeDesign/src/caeCardEditor/caeCardObjects/sacinp/cardSURFDR.d.ts +133 -0
- package/types/caeDesign/src/caeCardEditor/caeCardObjects/sacinp/cardSURFDR.d.ts.map +1 -0
- package/types/caeDesign/src/caeCardEditor/caeCardObjects/sacinp/cardWGTMEMCONC.d.ts +2 -1
- package/types/caeDesign/src/caeCardEditor/caeCardObjects/sacinp/cardWGTMEMCONC.d.ts.map +1 -1
- package/types/caeDesign/src/caeCardEditor/caeCardObjects/sacinp/cardWGTMEMUNIF.d.ts +2 -0
- package/types/caeDesign/src/caeCardEditor/caeCardObjects/sacinp/cardWGTMEMUNIF.d.ts.map +1 -1
- package/types/caeDesign/src/caeCardEditor/caeCardObjects/seainp/cardLCOMB.d.ts +2 -0
- package/types/caeDesign/src/caeCardEditor/caeCardObjects/seainp/cardLCOMB.d.ts.map +1 -1
- package/types/caeDesign/src/caeCardEditor/caeCardObjects/seainp/cardLDOPT.d.ts +0 -8
- package/types/caeDesign/src/caeCardEditor/caeCardObjects/seainp/cardLDOPT.d.ts.map +1 -1
- package/types/caeDesign/src/gsDevFx/managers/datReaderManager.d.ts +4 -1
- package/types/caeDesign/src/gsDevFx/managers/datReaderManager.d.ts.map +1 -1
- package/types/caeDesign/src/gsDevFx/managers/datWriterManager.d.ts.map +1 -1
- package/types/caeDesign/src/gsDevFx/managers/interfaceManagers/commandInterfaceManager.d.ts +18 -0
- package/types/caeDesign/src/gsDevFx/managers/interfaceManagers/commandInterfaceManager.d.ts.map +1 -1
- package/types/caeDesign/src/gsDevFx/managers/persistenceManager.d.ts.map +1 -1
- package/types/caeDesign/src/gsDevFx/objects/caeObjects/optionObjects/modelSurfDR.d.ts +15 -0
- package/types/caeDesign/src/gsDevFx/objects/caeObjects/optionObjects/modelSurfDR.d.ts.map +1 -0
- package/types/caeDesign/src/gsDevFx/objects/caeObjects/pretreatment/boundaryJointsObject.d.ts +30 -0
- package/types/caeDesign/src/gsDevFx/objects/caeObjects/pretreatment/boundaryJointsObject.d.ts.map +1 -0
- package/types/caeDesign/src/gsDevFx/objects/caeObjects/pretreatment/centerRenderObject.d.ts +20 -0
- package/types/caeDesign/src/gsDevFx/objects/caeObjects/pretreatment/centerRenderObject.d.ts.map +1 -0
- package/types/caeDesign/src/gsDevFx/objects/caeObjects/pretreatment/surfaceDefinitionObject.d.ts +25 -0
- package/types/caeDesign/src/gsDevFx/objects/caeObjects/pretreatment/surfaceDefinitionObject.d.ts.map +1 -0
- package/types/caeDesign/src/gsDevFx/objects/caeObjects/pretreatment/surfaceWeightObject.d.ts +28 -0
- package/types/caeDesign/src/gsDevFx/objects/caeObjects/pretreatment/surfaceWeightObject.d.ts.map +1 -0
- package/types/caeDesign/src/gsDevFx/objects/loadCombinationObjects/loadCombinationGroupObject.d.ts +13 -0
- package/types/caeDesign/src/gsDevFx/objects/loadCombinationObjects/loadCombinationGroupObject.d.ts.map +1 -0
- package/types/caeDesign/src/gsDevFx/objects/loadCombinationObjects/loadCombinationObject.d.ts +23 -0
- package/types/caeDesign/src/gsDevFx/objects/loadCombinationObjects/loadCombinationObject.d.ts.map +1 -0
- package/types/caeDesign/src/gsDevFx/objects/weightObjects/instanceMemberWeightConcentratedObject.d.ts +10 -0
- package/types/caeDesign/src/gsDevFx/objects/weightObjects/instanceMemberWeightConcentratedObject.d.ts.map +1 -0
- package/types/caeDesign/src/gsDevFx/objects/weightObjects/instanceMemberWeightDistributedObject.d.ts +10 -0
- package/types/caeDesign/src/gsDevFx/objects/weightObjects/instanceMemberWeightDistributedObject.d.ts.map +1 -0
- package/types/caeDesign/src/gsDevFx/objects/weightObjects/jointWeightObject.d.ts +2 -4
- package/types/caeDesign/src/gsDevFx/objects/weightObjects/jointWeightObject.d.ts.map +1 -1
- package/types/caeDesign/src/gsDevFx/objects/weightObjects/memberWeightBaseObject.d.ts +20 -0
- package/types/caeDesign/src/gsDevFx/objects/weightObjects/memberWeightBaseObject.d.ts.map +1 -0
- package/types/caeDesign/src/gsDevFx/objects/weightObjects/memberWeightConcentratedObject.d.ts +20 -0
- package/types/caeDesign/src/gsDevFx/objects/weightObjects/memberWeightConcentratedObject.d.ts.map +1 -0
- package/types/caeDesign/src/gsDevFx/objects/weightObjects/memberWeightDistributedObject.d.ts +22 -0
- package/types/caeDesign/src/gsDevFx/objects/weightObjects/memberWeightDistributedObject.d.ts.map +1 -0
- package/types/caeDesign/src/gsDevFx/objects/weightObjects/weightBaseObject.d.ts +21 -0
- package/types/caeDesign/src/gsDevFx/objects/weightObjects/weightBaseObject.d.ts.map +1 -0
- package/types/caeDesign/src/gsDevFx/objects/weightObjects/weightGroupObject.d.ts.map +1 -1
- package/types/caeDesign/src/gsDevFx/objects/weightObjects/weightIdObject.d.ts.map +1 -1
- package/types/caeDesign/src/gsDevFx/operators/cAEObjectPreSelector.d.ts.map +1 -1
- package/types/caeDesign/src/gsDevFx/viewer.d.ts +1 -0
- package/types/caeDesign/src/gsDevFx/viewer.d.ts.map +1 -1
- package/types/caeDesign/src/viewerWrapper/commands/aftertreatment/addLoadCombination/addLoadCombinationConfig.d.ts +7 -0
- package/types/caeDesign/src/viewerWrapper/commands/aftertreatment/addLoadCombination/addLoadCombinationConfig.d.ts.map +1 -0
- package/types/caeDesign/src/viewerWrapper/commands/aftertreatment/addLoadCombination/commandAddLoadCombination.d.ts +19 -0
- package/types/caeDesign/src/viewerWrapper/commands/aftertreatment/addLoadCombination/commandAddLoadCombination.d.ts.map +1 -0
- package/types/caeDesign/src/viewerWrapper/commands/aftertreatment/editLoadCombination/commandEditLoadCombination.d.ts +23 -0
- package/types/caeDesign/src/viewerWrapper/commands/aftertreatment/editLoadCombination/commandEditLoadCombination.d.ts.map +1 -0
- package/types/caeDesign/src/viewerWrapper/commands/aftertreatment/editLoadCombination/editLoadCombinationConfig.d.ts +9 -0
- package/types/caeDesign/src/viewerWrapper/commands/aftertreatment/editLoadCombination/editLoadCombinationConfig.d.ts.map +1 -0
- package/types/caeDesign/src/viewerWrapper/commands/aftertreatment/setAndShowSeastateLoadOptions/commandSetAndShowSeastateLoadOptions.d.ts +22 -0
- package/types/caeDesign/src/viewerWrapper/commands/aftertreatment/setAndShowSeastateLoadOptions/commandSetAndShowSeastateLoadOptions.d.ts.map +1 -0
- package/types/caeDesign/src/viewerWrapper/commands/aftertreatment/setAndShowSeastateLoadOptions/setAndShowSeastateLoadOptionsConfig.d.ts +6 -0
- package/types/caeDesign/src/viewerWrapper/commands/aftertreatment/setAndShowSeastateLoadOptions/setAndShowSeastateLoadOptionsConfig.d.ts.map +1 -0
- package/types/caeDesign/src/viewerWrapper/commands/createSection/commandCreateSection.d.ts.map +1 -1
- package/types/caeDesign/src/viewerWrapper/commands/editSection/commandEditSection.d.ts.map +1 -1
- package/types/caeDesign/src/viewerWrapper/commands/pretreatment/addMemberWeight/addMemberWeightConfig.d.ts +6 -0
- package/types/caeDesign/src/viewerWrapper/commands/pretreatment/addMemberWeight/addMemberWeightConfig.d.ts.map +1 -0
- package/types/caeDesign/src/viewerWrapper/commands/pretreatment/addMemberWeight/commandAddMemberWeight.d.ts +31 -0
- package/types/caeDesign/src/viewerWrapper/commands/pretreatment/addMemberWeight/commandAddMemberWeight.d.ts.map +1 -0
- package/types/caeDesign/src/viewerWrapper/commands/pretreatment/centerOfRoll/centerOfRollConfig.d.ts +8 -0
- package/types/caeDesign/src/viewerWrapper/commands/pretreatment/centerOfRoll/centerOfRollConfig.d.ts.map +1 -0
- package/types/caeDesign/src/viewerWrapper/commands/pretreatment/centerOfRoll/commandCenterOfRoll.d.ts +11 -0
- package/types/caeDesign/src/viewerWrapper/commands/pretreatment/centerOfRoll/commandCenterOfRoll.d.ts.map +1 -0
- package/types/caeDesign/src/viewerWrapper/commands/pretreatment/editJointWeight/commandEditJointWeight.d.ts.map +1 -1
- package/types/caeDesign/src/viewerWrapper/commands/pretreatment/editMemberWeight/commandEditMemberWeight.d.ts +37 -0
- package/types/caeDesign/src/viewerWrapper/commands/pretreatment/editMemberWeight/commandEditMemberWeight.d.ts.map +1 -0
- package/types/caeDesign/src/viewerWrapper/commands/pretreatment/editMemberWeight/editMemberWeightConfig.d.ts +5 -0
- package/types/caeDesign/src/viewerWrapper/commands/pretreatment/editMemberWeight/editMemberWeightConfig.d.ts.map +1 -0
- package/types/caeDesign/src/viewerWrapper/commands/pretreatment/surfaceDefinition/commandSurfaceDefinition.d.ts +33 -0
- package/types/caeDesign/src/viewerWrapper/commands/pretreatment/surfaceDefinition/commandSurfaceDefinition.d.ts.map +1 -0
- package/types/caeDesign/src/viewerWrapper/commands/pretreatment/surfaceDefinition/surfaceDefinitionConfig.d.ts +5 -0
- package/types/caeDesign/src/viewerWrapper/commands/pretreatment/surfaceDefinition/surfaceDefinitionConfig.d.ts.map +1 -0
- package/types/caeDesign/src/viewerWrapper/commands/pretreatment/surfaceDefinitionEdit/commandSurfaceDefinitionEdit.d.ts +32 -0
- package/types/caeDesign/src/viewerWrapper/commands/pretreatment/surfaceDefinitionEdit/commandSurfaceDefinitionEdit.d.ts.map +1 -0
- package/types/caeDesign/src/viewerWrapper/commands/pretreatment/surfaceDefinitionEdit/surfaceDefinitionEditConfig.d.ts +12 -0
- package/types/caeDesign/src/viewerWrapper/commands/pretreatment/surfaceDefinitionEdit/surfaceDefinitionEditConfig.d.ts.map +1 -0
- package/types/caeDesign/src/viewerWrapper/commands/pretreatment/surfaceWeightAdd/commandSurfaceWeightAdd.d.ts +20 -0
- package/types/caeDesign/src/viewerWrapper/commands/pretreatment/surfaceWeightAdd/commandSurfaceWeightAdd.d.ts.map +1 -0
- package/types/caeDesign/src/viewerWrapper/commands/pretreatment/surfaceWeightAdd/surfaceWeightAddConfig.d.ts +10 -0
- package/types/caeDesign/src/viewerWrapper/commands/pretreatment/surfaceWeightAdd/surfaceWeightAddConfig.d.ts.map +1 -0
- package/types/caeDesign/src/viewerWrapper/commands/pretreatment/viewWeightProperty/commandViewWeightProperty.d.ts +4 -1
- package/types/caeDesign/src/viewerWrapper/commands/pretreatment/viewWeightProperty/commandViewWeightProperty.d.ts.map +1 -1
- package/types/ceecDesign/src/gsDevFx/objects/designBaseObject/instanceDesignBaseObject.d.ts +15 -0
- package/types/ceecDesign/src/gsDevFx/objects/designBaseObject/instanceDesignBaseObject.d.ts.map +1 -0
- package/types/ceecDesign/src/gsDevFx/objects/designBaseObject.d.ts +0 -53
- package/types/ceecDesign/src/gsDevFx/objects/designBaseObject.d.ts.map +0 -1
- package/types/ceecDesign/src/gsDevFx/objects/designLightObject/designLightObject.d.ts +18 -0
- package/types/ceecDesign/src/gsDevFx/objects/designLightObject/designLightObject.d.ts.map +1 -0
- package/types/ceecDesign/src/gsDevFx/objects/interfaces.d.ts +8 -0
- package/types/ceecDesign/src/gsDevFx/objects/interfaces.d.ts.map +1 -0
- package/types/ceecDesign/src/gsDevFx/viewer.d.ts.map +0 -1
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { Longan } from "gs-bim-air";
|
|
2
|
+
import { Viewer } from "../../viewer";
|
|
3
|
+
import { SvgDraw } from "gs-ceec-design";
|
|
4
|
+
import { InstanceWeightBaseObject } from "./instanceWeightBaseObject";
|
|
5
|
+
import { MemberWeightDistributedObject } from "./memberWeightDistributedObject";
|
|
6
|
+
|
|
7
|
+
export class InstanceMemberWeightDistributedObject extends InstanceWeightBaseObject {
|
|
8
|
+
protected _viewer: Viewer;
|
|
9
|
+
|
|
10
|
+
public get viewer() {
|
|
11
|
+
return this._viewer;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
constructor(viewer: Viewer, renderObject: Longan.RenderObject) {
|
|
15
|
+
super(viewer, renderObject);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
drawSvg() {
|
|
19
|
+
if (this._group) {
|
|
20
|
+
this._group.remove();
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
let draw = SvgDraw.getInstance(this.viewer.container.id).draw;
|
|
24
|
+
this._group = draw.group();
|
|
25
|
+
|
|
26
|
+
let memberWeightDistributedObject = this
|
|
27
|
+
.renderObject as MemberWeightDistributedObject;
|
|
28
|
+
let member = memberWeightDistributedObject.member;
|
|
29
|
+
if (member) {
|
|
30
|
+
let unitLengtha = this.viewer.unitLength / 10;
|
|
31
|
+
|
|
32
|
+
let startPosition = new Float32Array(member.getStartPosition());
|
|
33
|
+
let vector = member.getVector();
|
|
34
|
+
let weightStartPosition = Longan.Point.add(
|
|
35
|
+
startPosition,
|
|
36
|
+
Longan.Vector.multiply(
|
|
37
|
+
vector,
|
|
38
|
+
memberWeightDistributedObject.distance
|
|
39
|
+
)
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
let weightFinalPosition = Longan.Point.add(
|
|
43
|
+
weightStartPosition,
|
|
44
|
+
Longan.Vector.multiply(vector, memberWeightDistributedObject.weightActiveLength)
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
// 在weightStartPosition和weightFinalPosition处画对应的箭头.
|
|
48
|
+
let startForceValue = memberWeightDistributedObject.weightValue;
|
|
49
|
+
let finalForceValue = memberWeightDistributedObject.finalDistanceWeightValue;
|
|
50
|
+
let dir = [0, 0, -1];
|
|
51
|
+
|
|
52
|
+
let arrowStartPosition1 = Longan.Point.add(
|
|
53
|
+
weightStartPosition,
|
|
54
|
+
Longan.Vector.multiply(new Float32Array(dir), -startForceValue)
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
let te1 = startForceValue < 0 ? 1 : -1;
|
|
58
|
+
let arrowEndPosition1 = Longan.Point.add(
|
|
59
|
+
weightStartPosition,
|
|
60
|
+
Longan.Vector.multiply(new Float32Array(dir), te1 * unitLengtha)
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
let arrowStartPosition2 = Longan.Point.add(
|
|
64
|
+
weightFinalPosition,
|
|
65
|
+
Longan.Vector.multiply(new Float32Array(dir), -finalForceValue)
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
let te2 = finalForceValue < 0 ? 1 : -1;
|
|
69
|
+
let arrowEndPosition2 = Longan.Point.add(
|
|
70
|
+
weightFinalPosition,
|
|
71
|
+
Longan.Vector.multiply(new Float32Array(dir), te2 * unitLengtha)
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
let pixelPositions = this.viewer.worldPointToPixelPoint([
|
|
75
|
+
[arrowEndPosition1[0], arrowEndPosition1[1], arrowEndPosition1[2]],
|
|
76
|
+
[arrowEndPosition2[0], arrowEndPosition2[1], arrowEndPosition2[2]],
|
|
77
|
+
[
|
|
78
|
+
arrowStartPosition1[0],
|
|
79
|
+
arrowStartPosition1[1],
|
|
80
|
+
arrowStartPosition1[2],
|
|
81
|
+
],
|
|
82
|
+
[
|
|
83
|
+
arrowStartPosition2[0],
|
|
84
|
+
arrowStartPosition2[1],
|
|
85
|
+
arrowStartPosition2[2],
|
|
86
|
+
],
|
|
87
|
+
]);
|
|
88
|
+
|
|
89
|
+
let x = Longan.GeometryOperators.distance(
|
|
90
|
+
new Float32Array([pixelPositions[2][0], pixelPositions[2][1], 0]),
|
|
91
|
+
new Float32Array([pixelPositions[0][0], pixelPositions[0][1], 0])
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
let y = Longan.GeometryOperators.distance(
|
|
95
|
+
new Float32Array([pixelPositions[3][0], pixelPositions[3][1], 0]),
|
|
96
|
+
new Float32Array([pixelPositions[1][0], pixelPositions[1][1], 0])
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
let max = Math.max(x, y);
|
|
100
|
+
|
|
101
|
+
// let scale = 20 / max;
|
|
102
|
+
let scale = 0.04;
|
|
103
|
+
|
|
104
|
+
let line = draw
|
|
105
|
+
.line([
|
|
106
|
+
(pixelPositions[2][0] - pixelPositions[0][0]) * scale +
|
|
107
|
+
pixelPositions[0][0],
|
|
108
|
+
(pixelPositions[2][1] - pixelPositions[0][1]) * scale +
|
|
109
|
+
pixelPositions[0][1],
|
|
110
|
+
(pixelPositions[3][0] - pixelPositions[1][0]) * scale +
|
|
111
|
+
pixelPositions[1][0],
|
|
112
|
+
(pixelPositions[3][1] - pixelPositions[1][1]) * scale +
|
|
113
|
+
pixelPositions[1][1],
|
|
114
|
+
])
|
|
115
|
+
.stroke({
|
|
116
|
+
color: this._weightLabelColor,
|
|
117
|
+
width: 3,
|
|
118
|
+
linecap: "arrow",
|
|
119
|
+
});
|
|
120
|
+
this._group.add(line);
|
|
121
|
+
|
|
122
|
+
this.drawArrow(
|
|
123
|
+
[
|
|
124
|
+
(pixelPositions[2][0] - pixelPositions[0][0]) * scale +
|
|
125
|
+
pixelPositions[0][0],
|
|
126
|
+
(pixelPositions[2][1] - pixelPositions[0][1]) * scale +
|
|
127
|
+
pixelPositions[0][1],
|
|
128
|
+
pixelPositions[0][0],
|
|
129
|
+
pixelPositions[0][1],
|
|
130
|
+
],
|
|
131
|
+
this._weightLabelColor
|
|
132
|
+
);
|
|
133
|
+
|
|
134
|
+
this.drawArrow(
|
|
135
|
+
[
|
|
136
|
+
(pixelPositions[3][0] - pixelPositions[1][0]) * scale +
|
|
137
|
+
pixelPositions[1][0],
|
|
138
|
+
(pixelPositions[3][1] - pixelPositions[1][1]) * scale +
|
|
139
|
+
pixelPositions[1][1],
|
|
140
|
+
pixelPositions[1][0],
|
|
141
|
+
pixelPositions[1][1],
|
|
142
|
+
],
|
|
143
|
+
this._weightLabelColor
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { WeightBaseObject } from "./weightBaseObject";
|
|
2
2
|
import { Longan } from "gs-bim-air";
|
|
3
3
|
import { InstanceJointWeightObject } from "./instanceJointWeightObject";
|
|
4
4
|
import { CardWGTJT } from "../../../caeCardEditor/caeCardObjects/sacinp/cardWGTJT";
|
|
@@ -7,12 +7,11 @@ import { CaeNumber } from "../../../utility/utility";
|
|
|
7
7
|
/**
|
|
8
8
|
* 空间点上的点质量
|
|
9
9
|
*/
|
|
10
|
-
export class JointWeightObject extends
|
|
10
|
+
export class JointWeightObject extends WeightBaseObject {
|
|
11
11
|
typeName = "JointWeightObject";
|
|
12
12
|
|
|
13
13
|
jointName: string;
|
|
14
|
-
|
|
15
|
-
weightID: string = "";
|
|
14
|
+
|
|
16
15
|
weight: number = 0;
|
|
17
16
|
density: number = 0;
|
|
18
17
|
comments: string = "";
|
|
@@ -27,12 +26,11 @@ export class JointWeightObject extends DesignBaseObject {
|
|
|
27
26
|
/**
|
|
28
27
|
* 考虑附加重量的在水中的浮力和波浪对其施加的负载
|
|
29
28
|
*/
|
|
30
|
-
isInclude =
|
|
29
|
+
isInclude = false;
|
|
31
30
|
|
|
32
31
|
public constructor(weightGroupID: string, weightID: string) {
|
|
33
|
-
super();
|
|
34
|
-
this.
|
|
35
|
-
this.weightID = weightID;
|
|
32
|
+
super(weightGroupID, weightID);
|
|
33
|
+
this.weightType = "JOIN";
|
|
36
34
|
|
|
37
35
|
this.instanceTypes.add("main", InstanceJointWeightObject.prototype);
|
|
38
36
|
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { PersistenceManager } from "../../managers/persistenceManager";
|
|
2
|
+
import { MemberObject } from "../caeObjects/memberObject";
|
|
3
|
+
import { InstanceRenderObject } from "../instancesObjects/instanceRenderObject";
|
|
4
|
+
import { IReferencedObject } from "../interfaces";
|
|
5
|
+
import { WeightBaseObject } from "./weightBaseObject";
|
|
6
|
+
|
|
7
|
+
export class MemberWeightBaseObject
|
|
8
|
+
extends WeightBaseObject
|
|
9
|
+
implements IReferencedObject
|
|
10
|
+
{
|
|
11
|
+
public typeName = "MemberWeightBaseObject";
|
|
12
|
+
|
|
13
|
+
private _member: MemberObject;
|
|
14
|
+
private _cooSystemOption: string = "GLOB";
|
|
15
|
+
|
|
16
|
+
public get member() {
|
|
17
|
+
return this._member;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
public set member(value: MemberObject) {
|
|
21
|
+
this._member = value;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
get cooSystemOption() {
|
|
25
|
+
return this._cooSystemOption;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
set cooSystemOption(value) {
|
|
29
|
+
this._cooSystemOption = value;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
public constructor(
|
|
33
|
+
weightGroupID: string,
|
|
34
|
+
weightID: string,
|
|
35
|
+
member: MemberObject
|
|
36
|
+
) {
|
|
37
|
+
super(weightGroupID, weightID);
|
|
38
|
+
this._member = member;
|
|
39
|
+
|
|
40
|
+
this.instanceTypes.add("main", InstanceRenderObject.prototype);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
serialize() {
|
|
44
|
+
let obj = super.serialize();
|
|
45
|
+
|
|
46
|
+
if (this.member) {
|
|
47
|
+
obj.member = this.member.id;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// if (this._firstJointName) {
|
|
51
|
+
// obj.firstJointName = this._firstJointName;
|
|
52
|
+
// }
|
|
53
|
+
|
|
54
|
+
// if (this._secondJointName) {
|
|
55
|
+
// obj.secondJointName = this._secondJointName;
|
|
56
|
+
// }
|
|
57
|
+
|
|
58
|
+
if (this._cooSystemOption) {
|
|
59
|
+
obj.cooSystemOption = this._cooSystemOption;
|
|
60
|
+
}
|
|
61
|
+
return obj;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
deserialize(obj: any, pm?: PersistenceManager): void {
|
|
65
|
+
super.deserialize(obj, pm);
|
|
66
|
+
|
|
67
|
+
if (obj.member) {
|
|
68
|
+
let member = pm.referenceList.get(obj.member);
|
|
69
|
+
if (member) {
|
|
70
|
+
this.member = member as MemberObject;
|
|
71
|
+
} else {
|
|
72
|
+
this.member = obj.start;
|
|
73
|
+
pm.needReferenceList.add(this);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// if (obj.firstJointName) {
|
|
78
|
+
// this._firstJointName = obj.firstJointName;
|
|
79
|
+
// }
|
|
80
|
+
|
|
81
|
+
// if (obj.secondJointName) {
|
|
82
|
+
// this._secondJointName = obj.secondJointName;
|
|
83
|
+
// }
|
|
84
|
+
|
|
85
|
+
if (obj.cooSystemOption) {
|
|
86
|
+
this._cooSystemOption = obj.cooSystemOption;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
public setReference(pm: PersistenceManager) {
|
|
91
|
+
if (typeof this.member === "string") {
|
|
92
|
+
let member = pm.referenceList.get(this.member as string);
|
|
93
|
+
if (member) {
|
|
94
|
+
this.member = member as MemberObject;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
this.setNeedUpdate();
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
active() {
|
|
102
|
+
//
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
inactive() {
|
|
106
|
+
//
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { InstanceMemberWeightConcentratedObject } from "./instanceMemberWeightConcentratedObject";
|
|
2
|
+
import { CardWGTMEMCONC } from "../../../caeCardEditor/caeCardObjects/sacinp/cardWGTMEMCONC";
|
|
3
|
+
import { CaeNumber } from "../../../utility/utility";
|
|
4
|
+
import { MemberObject } from "../caeObjects/memberObject";
|
|
5
|
+
import { PersistenceManager } from "../../managers/persistenceManager";
|
|
6
|
+
import { MemberWeightBaseObject } from './memberWeightBaseObject'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 杆件上的点质量
|
|
10
|
+
*/
|
|
11
|
+
export class MemberWeightConcentratedObject extends MemberWeightBaseObject {
|
|
12
|
+
typeName = "MemberWeightConcentratedObject";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 杆件始点:11-14
|
|
16
|
+
*/
|
|
17
|
+
memberJointA: string = "";
|
|
18
|
+
/**
|
|
19
|
+
* 杆件终点: 15-18
|
|
20
|
+
*/
|
|
21
|
+
memberJointB: string = "";
|
|
22
|
+
/**
|
|
23
|
+
* 始点距离: 19-25
|
|
24
|
+
*/
|
|
25
|
+
distance: number = 0;
|
|
26
|
+
/**
|
|
27
|
+
* 点质量值:26-32
|
|
28
|
+
*/
|
|
29
|
+
weightValue: number = 0;
|
|
30
|
+
/**
|
|
31
|
+
* X质量系数: 47-50
|
|
32
|
+
*/
|
|
33
|
+
xFactor: number = 0;
|
|
34
|
+
/**
|
|
35
|
+
* Y质量系数: 51-54
|
|
36
|
+
*/
|
|
37
|
+
yFactor: number = 0;
|
|
38
|
+
/**
|
|
39
|
+
* Z质量系数: 55-58
|
|
40
|
+
*/
|
|
41
|
+
zFactor: number = 0;
|
|
42
|
+
/**
|
|
43
|
+
* 质量密度: 67-72
|
|
44
|
+
*/
|
|
45
|
+
density: number = 2.7;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* 考虑附加重量的在水中的浮力和波浪对其施加的负载
|
|
49
|
+
*/
|
|
50
|
+
isInclude = false;
|
|
51
|
+
|
|
52
|
+
public constructor(weightGroupID: string, weightID: string, member: MemberObject) {
|
|
53
|
+
super(weightGroupID, weightID, member);
|
|
54
|
+
this.weightType = "CONC";
|
|
55
|
+
|
|
56
|
+
this.instanceTypes.add("main", InstanceMemberWeightConcentratedObject.prototype);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
serialize(): void {
|
|
60
|
+
let obj = super.serialize();
|
|
61
|
+
|
|
62
|
+
if (this.memberJointA) {
|
|
63
|
+
obj.memberJointA = this.memberJointA;
|
|
64
|
+
}
|
|
65
|
+
if (this.memberJointB) {
|
|
66
|
+
obj.memberJointB = this.memberJointB;
|
|
67
|
+
}
|
|
68
|
+
if (this.weightGroupID) {
|
|
69
|
+
obj.weightGroupID = this.weightGroupID;
|
|
70
|
+
}
|
|
71
|
+
if (this.notNullAndNotUndefined(this.weightValue)) {
|
|
72
|
+
obj.weightValue = this.weightValue;
|
|
73
|
+
}
|
|
74
|
+
if (this.weightID) {
|
|
75
|
+
obj.weightID = this.weightID;
|
|
76
|
+
}
|
|
77
|
+
if (this.notNullAndNotUndefined(this.density)) {
|
|
78
|
+
obj.density = this.density;
|
|
79
|
+
}
|
|
80
|
+
if (this.notNullAndNotUndefined(this.xFactor)) {
|
|
81
|
+
obj.xFactor = this.xFactor;
|
|
82
|
+
}
|
|
83
|
+
if (this.notNullAndNotUndefined(this.yFactor)) {
|
|
84
|
+
obj.yFactor = this.yFactor;
|
|
85
|
+
}
|
|
86
|
+
if (this.notNullAndNotUndefined(this.zFactor)) {
|
|
87
|
+
obj.zFactor = this.zFactor;
|
|
88
|
+
}
|
|
89
|
+
obj.isInclude = this.isInclude;
|
|
90
|
+
|
|
91
|
+
return obj;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
deserialize(obj: any, pm?: PersistenceManager): void {
|
|
95
|
+
super.deserialize(obj, pm);
|
|
96
|
+
|
|
97
|
+
if (obj.memberJointA) {
|
|
98
|
+
this.memberJointA = obj.memberJointA;
|
|
99
|
+
}
|
|
100
|
+
if (obj.memberJointB) {
|
|
101
|
+
this.memberJointB = obj.memberJointB;
|
|
102
|
+
}
|
|
103
|
+
if (obj.weightGroupID) {
|
|
104
|
+
this.weightGroupID = obj.weightGroupID;
|
|
105
|
+
}
|
|
106
|
+
if (obj.weightID) {
|
|
107
|
+
this.weightID = obj.weightID;
|
|
108
|
+
}
|
|
109
|
+
this.weightValue = CaeNumber(obj.weightValue);
|
|
110
|
+
this.density = CaeNumber(obj.density);
|
|
111
|
+
this.xFactor = CaeNumber(obj.xFactor);
|
|
112
|
+
this.yFactor = CaeNumber(obj.yFactor);
|
|
113
|
+
this.zFactor = CaeNumber(obj.zFactor);
|
|
114
|
+
this.isInclude = obj.isInclude;
|
|
115
|
+
|
|
116
|
+
this.name = this.memberJointA +
|
|
117
|
+
"-" + this.memberJointB
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
serializeToCard() {
|
|
121
|
+
if(this.member && this.member.checkBusinessStateIsActive()) {
|
|
122
|
+
let cardWGTMEMCONC = new CardWGTMEMCONC();
|
|
123
|
+
cardWGTMEMCONC.lineLabel.value = "WGTMEM";
|
|
124
|
+
cardWGTMEMCONC.jointA.value = this.member.start.name;
|
|
125
|
+
cardWGTMEMCONC.jointB.value = this.member.end.name;
|
|
126
|
+
cardWGTMEMCONC.weightGroupID.value = this.weightGroupID;
|
|
127
|
+
cardWGTMEMCONC.weightValue.value = this.weightValue ? this.weightValue.toString() : "";
|
|
128
|
+
cardWGTMEMCONC.weightID.value = this.weightID;
|
|
129
|
+
cardWGTMEMCONC.density.value = this.density ? this.density.toString() : "";
|
|
130
|
+
cardWGTMEMCONC.xFactor.value = this.xFactor ? this.xFactor.toString() : "";
|
|
131
|
+
cardWGTMEMCONC.yFactor.value = this.yFactor ? this.yFactor.toString() : "";
|
|
132
|
+
cardWGTMEMCONC.zFactor.value = this.zFactor ? this.zFactor.toString() : "";
|
|
133
|
+
|
|
134
|
+
return cardWGTMEMCONC.getLine();
|
|
135
|
+
}
|
|
136
|
+
return null
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { InstanceMemberWeightDistributedObject } from "./instanceMemberWeightDistributedObject";
|
|
2
|
+
import { CardWGTMEMUNIF } from "../../../caeCardEditor/caeCardObjects/sacinp/cardWGTMEMUNIF";
|
|
3
|
+
import { CaeNumber } from "../../../utility/utility";
|
|
4
|
+
import { MemberObject } from "../caeObjects/memberObject";
|
|
5
|
+
import { PersistenceManager } from "../../managers/persistenceManager";
|
|
6
|
+
import { MemberWeightBaseObject } from './memberWeightBaseObject'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 杆件上的分布质量
|
|
10
|
+
*/
|
|
11
|
+
export class MemberWeightDistributedObject extends MemberWeightBaseObject {
|
|
12
|
+
typeName = "MemberWeightDistributedObject";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 杆件始点:11-14
|
|
16
|
+
*/
|
|
17
|
+
memberJointA: string = "";
|
|
18
|
+
/**
|
|
19
|
+
* 杆件终点: 15-18
|
|
20
|
+
*/
|
|
21
|
+
memberJointB: string = "";
|
|
22
|
+
/**
|
|
23
|
+
* 始点距离: 19-25
|
|
24
|
+
*/
|
|
25
|
+
distance: number = 0;
|
|
26
|
+
/**
|
|
27
|
+
* 点质量值:26-32
|
|
28
|
+
*/
|
|
29
|
+
weightValue: number = 0;
|
|
30
|
+
/**
|
|
31
|
+
* 质量分布长度:33-39
|
|
32
|
+
*/
|
|
33
|
+
weightActiveLength: number = 0;
|
|
34
|
+
/**
|
|
35
|
+
* 最终质量值:41-46
|
|
36
|
+
*/
|
|
37
|
+
finalDistanceWeightValue: number = 0;
|
|
38
|
+
/**
|
|
39
|
+
* X质量系数: 47-50
|
|
40
|
+
*/
|
|
41
|
+
xFactor: number = 0;
|
|
42
|
+
/**
|
|
43
|
+
* Y质量系数: 51-54
|
|
44
|
+
*/
|
|
45
|
+
yFactor: number = 0;
|
|
46
|
+
/**
|
|
47
|
+
* Z质量系数: 55-58
|
|
48
|
+
*/
|
|
49
|
+
zFactor: number = 0;
|
|
50
|
+
/**
|
|
51
|
+
* 质量密度: 67-72
|
|
52
|
+
*/
|
|
53
|
+
density: number = 2.7;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* 考虑附加重量的在水中的浮力和波浪对其施加的负载
|
|
57
|
+
*/
|
|
58
|
+
isInclude = false;
|
|
59
|
+
|
|
60
|
+
public constructor(weightGroupID: string, weightID: string, member: MemberObject) {
|
|
61
|
+
super(weightGroupID, weightID, member);
|
|
62
|
+
this.weightType = "UNIF";
|
|
63
|
+
|
|
64
|
+
this.instanceTypes.add("main", InstanceMemberWeightDistributedObject.prototype);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
serialize(): void {
|
|
68
|
+
let obj = super.serialize();
|
|
69
|
+
|
|
70
|
+
if (this.memberJointA) {
|
|
71
|
+
obj.memberJointA = this.memberJointA;
|
|
72
|
+
}
|
|
73
|
+
if (this.memberJointB) {
|
|
74
|
+
obj.memberJointB = this.memberJointB;
|
|
75
|
+
}
|
|
76
|
+
if (this.weightGroupID) {
|
|
77
|
+
obj.weightGroupID = this.weightGroupID;
|
|
78
|
+
}
|
|
79
|
+
if (this.notNullAndNotUndefined(this.weightValue)) {
|
|
80
|
+
obj.weightValue = this.weightValue;
|
|
81
|
+
}
|
|
82
|
+
if (this.notNullAndNotUndefined(this.weightActiveLength)) {
|
|
83
|
+
obj.weightActiveLength = this.weightActiveLength;
|
|
84
|
+
}
|
|
85
|
+
if (this.notNullAndNotUndefined(this.finalDistanceWeightValue)) {
|
|
86
|
+
obj.finalDistanceWeightValue = this.finalDistanceWeightValue;
|
|
87
|
+
}
|
|
88
|
+
if (this.weightID) {
|
|
89
|
+
obj.weightID = this.weightID;
|
|
90
|
+
}
|
|
91
|
+
if (this.notNullAndNotUndefined(this.density)) {
|
|
92
|
+
obj.density = this.density;
|
|
93
|
+
}
|
|
94
|
+
if (this.notNullAndNotUndefined(this.xFactor)) {
|
|
95
|
+
obj.xFactor = this.xFactor;
|
|
96
|
+
}
|
|
97
|
+
if (this.notNullAndNotUndefined(this.yFactor)) {
|
|
98
|
+
obj.yFactor = this.yFactor;
|
|
99
|
+
}
|
|
100
|
+
if (this.notNullAndNotUndefined(this.zFactor)) {
|
|
101
|
+
obj.zFactor = this.zFactor;
|
|
102
|
+
}
|
|
103
|
+
obj.isInclude = this.isInclude;
|
|
104
|
+
|
|
105
|
+
return obj;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
deserialize(obj: any, pm?: PersistenceManager): void {
|
|
109
|
+
super.deserialize(obj, pm);
|
|
110
|
+
|
|
111
|
+
if (obj.memberJointA) {
|
|
112
|
+
this.memberJointA = obj.memberJointA;
|
|
113
|
+
}
|
|
114
|
+
if (obj.memberJointB) {
|
|
115
|
+
this.memberJointB = obj.memberJointB;
|
|
116
|
+
}
|
|
117
|
+
if (obj.weightGroupID) {
|
|
118
|
+
this.weightGroupID = obj.weightGroupID;
|
|
119
|
+
}
|
|
120
|
+
if (obj.weightID) {
|
|
121
|
+
this.weightID = obj.weightID;
|
|
122
|
+
}
|
|
123
|
+
this.weightValue = CaeNumber(obj.weightValue);
|
|
124
|
+
this.weightActiveLength = CaeNumber(obj.weightActiveLength);
|
|
125
|
+
this.finalDistanceWeightValue = CaeNumber(obj.finalDistanceWeightValue);
|
|
126
|
+
this.density = CaeNumber(obj.density);
|
|
127
|
+
this.xFactor = CaeNumber(obj.xFactor);
|
|
128
|
+
this.yFactor = CaeNumber(obj.yFactor);
|
|
129
|
+
this.zFactor = CaeNumber(obj.zFactor);
|
|
130
|
+
this.isInclude = obj.isInclude;
|
|
131
|
+
|
|
132
|
+
this.name = this.memberJointA +
|
|
133
|
+
"-" + this.memberJointB
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
serializeToCard() {
|
|
137
|
+
if(this.member && this.member.checkBusinessStateIsActive()) {
|
|
138
|
+
let cardWGTMEMUNIF = new CardWGTMEMUNIF();
|
|
139
|
+
cardWGTMEMUNIF.lineLabel.value = "WGTMEM";
|
|
140
|
+
cardWGTMEMUNIF.jointA.value = this.member.start.name;
|
|
141
|
+
cardWGTMEMUNIF.jointB.value = this.member.end.name;
|
|
142
|
+
cardWGTMEMUNIF.weightGroupID.value = this.weightGroupID;
|
|
143
|
+
cardWGTMEMUNIF.weightValue.value = this.weightValue ? this.weightValue.toString() : "";
|
|
144
|
+
cardWGTMEMUNIF.weightActiveLength.value = this.weightActiveLength ? this.weightActiveLength.toString() : "";
|
|
145
|
+
cardWGTMEMUNIF.finalDistanceWeightValue.value = this.finalDistanceWeightValue ? this.finalDistanceWeightValue.toString() : "";
|
|
146
|
+
cardWGTMEMUNIF.weightID.value = this.weightID;
|
|
147
|
+
cardWGTMEMUNIF.density.value = this.density ? this.density.toString() : "";
|
|
148
|
+
cardWGTMEMUNIF.xFactor.value = this.xFactor ? this.xFactor.toString() : "";
|
|
149
|
+
cardWGTMEMUNIF.yFactor.value = this.yFactor ? this.yFactor.toString() : "";
|
|
150
|
+
cardWGTMEMUNIF.zFactor.value = this.zFactor ? this.zFactor.toString() : "";
|
|
151
|
+
|
|
152
|
+
return cardWGTMEMUNIF.getLine();
|
|
153
|
+
}
|
|
154
|
+
return null
|
|
155
|
+
}
|
|
156
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { DesignBaseObject } from "gs-ceec-design";
|
|
2
|
+
import { Longan } from "gs-bim-air";
|
|
3
|
+
import { InstanceRenderObject } from "../instancesObjects/instanceRenderObject";
|
|
4
|
+
|
|
5
|
+
export class WeightBaseObject extends DesignBaseObject {
|
|
6
|
+
public typeName = "WeightBaseObject";
|
|
7
|
+
|
|
8
|
+
private _weightGroupID: string;
|
|
9
|
+
private _weightID: string;
|
|
10
|
+
private _weightType: string;
|
|
11
|
+
|
|
12
|
+
get weightGroupID() {
|
|
13
|
+
return this._weightGroupID;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
set weightGroupID(value) {
|
|
17
|
+
this._weightGroupID = value;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
get weightID() {
|
|
21
|
+
return this._weightID;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
set weightID(value) {
|
|
25
|
+
this._weightID = value;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
get weightType() {
|
|
29
|
+
return this._weightType;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
set weightType(value) {
|
|
33
|
+
this._weightType = value;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
public constructor(weightGroupID: string, weightID: string) {
|
|
37
|
+
super();
|
|
38
|
+
this._weightGroupID = weightGroupID;
|
|
39
|
+
this._weightID = weightID;
|
|
40
|
+
|
|
41
|
+
this.instanceTypes.add("main", InstanceRenderObject.prototype);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
serialize() {
|
|
45
|
+
let obj = super.serialize();
|
|
46
|
+
|
|
47
|
+
if (this.weightGroupID) {
|
|
48
|
+
obj.weightGroupID = this.weightGroupID;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (this.weightID) {
|
|
52
|
+
obj.weightID = this.weightID;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (this._weightType) {
|
|
56
|
+
obj.weightType = this._weightType;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return obj;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
deserialize(obj: any, pm?: Longan.PersistenceManager): void {
|
|
63
|
+
super.deserialize(obj, pm);
|
|
64
|
+
|
|
65
|
+
if (obj.weightGroupID) {
|
|
66
|
+
this._weightGroupID = obj.weightGroupID;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (obj.weightID) {
|
|
70
|
+
this._weightID = obj.weightID;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (obj.weightType) {
|
|
74
|
+
this._weightType = obj.weightType;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
active() {
|
|
79
|
+
//
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
inactive() {
|
|
83
|
+
//
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
serializeToCard() {}
|
|
87
|
+
}
|
|
@@ -2,8 +2,10 @@ import { DesignBaseObject } from "gs-ceec-design";
|
|
|
2
2
|
import { Longan } from "gs-bim-air";
|
|
3
3
|
import { InstanceRenderObject } from "../instancesObjects/instanceRenderObject";
|
|
4
4
|
import { WeightIdObject } from "./weightIdObject";
|
|
5
|
-
|
|
5
|
+
import { WeightBaseObject } from "./weightBaseObject";
|
|
6
6
|
import { JointWeightObject } from "./jointWeightObject";
|
|
7
|
+
import { MemberWeightDistributedObject } from "./memberWeightDistributedObject";
|
|
8
|
+
import { MemberWeightConcentratedObject } from "./memberWeightConcentratedObject";
|
|
7
9
|
|
|
8
10
|
export class WeightGroupObject extends DesignBaseObject {
|
|
9
11
|
public typeName = "WeightGroupObject";
|
|
@@ -79,7 +81,17 @@ export class WeightGroupObject extends DesignBaseObject {
|
|
|
79
81
|
for (let j = 0; j < child.childObjects.length; j++) {
|
|
80
82
|
let grandChild = child.childObjects[j];
|
|
81
83
|
if (grandChild instanceof JointWeightObject) {
|
|
82
|
-
let result = (grandChild as
|
|
84
|
+
let result = (grandChild as WeightBaseObject).serializeToCard();
|
|
85
|
+
if(result !== null) {
|
|
86
|
+
text += result + "\n";
|
|
87
|
+
}
|
|
88
|
+
}else if (grandChild instanceof MemberWeightDistributedObject) {
|
|
89
|
+
let result = (grandChild as WeightBaseObject).serializeToCard();
|
|
90
|
+
if(result !== null) {
|
|
91
|
+
text += result + "\n";
|
|
92
|
+
}
|
|
93
|
+
}else if (grandChild instanceof MemberWeightConcentratedObject) {
|
|
94
|
+
let result = (grandChild as WeightBaseObject).serializeToCard();
|
|
83
95
|
if(result !== null) {
|
|
84
96
|
text += result + "\n";
|
|
85
97
|
}
|