CascadeStudio_3D_Manual

Форк
0
232 строки · 7.7 Кб
1
{
2
  "settings": {
3
    "hasHeaders": true,
4
    "constrainDragToContainer": true,
5
    "reorderEnabled": true,
6
    "selectionEnabled": false,
7
    "popoutWholeStack": false,
8
    "blockedPopoutsThrowError": true,
9
    "closePopoutsOnUnload": true,
10
    "showPopoutIcon": false,
11
    "showMaximiseIcon": false,
12
    "showCloseIcon": false,
13
    "responsiveMode": "onload",
14
    "tabOverlapAllowance": 0,
15
    "reorderOnTabMenuClick": true,
16
    "tabControlOffset": 10
17
  },
18
  "dimensions": {
19
    "borderWidth": 5,
20
    "borderGrabWidth": 15,
21
    "minItemHeight": 10,
22
    "minItemWidth": 10,
23
    "headerHeight": 20,
24
    "dragProxyWidth": 300,
25
    "dragProxyHeight": 200
26
  },
27
  "labels": {
28
    "close": "close",
29
    "maximise": "maximise",
30
    "minimise": "minimise",
31
    "popout": "open in new window",
32
    "popin": "pop in",
33
    "tabDropdown": "additional tabs"
34
  },
35
  "content": [
36
    {
37
      "type": "row",
38
      "isClosable": true,
39
      "reorderEnabled": true,
40
      "title": "",
41
      "content": [
42
        {
43
          "type": "stack",
44
          "width": 50,
45
          "isClosable": true,
46
          "reorderEnabled": true,
47
          "title": "",
48
          "activeItemIndex": 0,
49
          "content": [
50
            {
51
              "type": "component",
52
              "componentName": "codeEditor",
53
              "title": "* newsketch.json",
54
              "componentState": {
55
                "code": [
56
                  "function Dxy(currentPoint,dx,dy)",
57
                  "{ ",
58
                  "    let newPoint = []; ",
59
                  "    newPoint[0]  = currentPoint[0] + dx;",
60
                  "    newPoint[1]  = currentPoint[1] + dy; ",
61
                  "    return newPoint",
62
                  "}",
63
                  "",
64
                  "function Dx(currentPoint,dx)",
65
                  "{ ",
66
                  "    let newPoint = []; ",
67
                  "    newPoint[0]  = currentPoint[0] + dx;",
68
                  "    newPoint[1]  = currentPoint[1] ; ",
69
                  "    return newPoint",
70
                  "}",
71
                  "",
72
                  "function Dy(currentPoint,dy)",
73
                  "{ ",
74
                  "    let newPoint = []; ",
75
                  "    newPoint[0]  = currentPoint[0];",
76
                  "    newPoint[1]  = currentPoint[1] + dy; ",
77
                  "    return newPoint",
78
                  "}",
79
                  "",
80
                  "function Polar(currentPoint,distance,angleDegToX)",
81
                  "{ ",
82
                  "    let newPoint = []; ",
83
                  "    angleRad = angleDegToX * Math.PI/180;",
84
                  "    newPoint[0]  = currentPoint[0] + distance * Math.cos(angleRad);",
85
                  "    newPoint[1]  = currentPoint[1] + distance * Math.sin(angleRad); ",
86
                  "    return newPoint",
87
                  "}",
88
                  "",
89
                  "function RadiusArc(currentPoint,endPoint,radius, clockwise)",
90
                  "{",
91
                  "    let midPoint = [];",
92
                  "    let dx = endPoint[0] - currentPoint[0];",
93
                  "    let dy = endPoint[1] - currentPoint[1];",
94
                  "    let dist = Math.sqrt(Math.pow(dx,2)+Math.pow(dy,2));",
95
                  "    let alpha = Math.asin(dy/dist);",
96
                  "    let beta  = Math.asin((dist/2)/radius);",
97
                  "    let sag = radius - (Math.cos(beta) * radius)",
98
                  "    if (clockwise == true)",
99
                  "    {",
100
                  "    midPoint[0] = currentPoint[0] + dx/2 - Math.sin(alpha)*sag;",
101
                  "    midPoint[1] = currentPoint[1] + dy/2 + Math.cos(alpha)*sag; ",
102
                  "    }",
103
                  "    else",
104
                  "    {",
105
                  "    midPoint[0] = currentPoint[0] + dx/2 + Math.sin(alpha)*sag;",
106
                  "    midPoint[1] = currentPoint[1] + dy/2 - Math.cos(alpha)*sag;",
107
                  "    }",
108
                  "    return midPoint",
109
                  "}",
110
                  "",
111
                  "",
112
                  "function SagArc(currentPoint,endPoint,sag,clockwise)",
113
                  "{",
114
                  "    let midPoint = [];",
115
                  "    let dx = endPoint[0] - currentPoint[0];",
116
                  "    let dy = endPoint[1] - currentPoint[1];",
117
                  "    let dist = Math.sqrt(Math.pow(dx,2)+Math.pow(dy,2));",
118
                  "    let alpha = Math.asin(dy/dist);",
119
                  "    if (clockwise == true)",
120
                  "    {",
121
                  "    midPoint[0] = currentPoint[0] + dx/2 - Math.sin(alpha)*sag;",
122
                  "    midPoint[1] = currentPoint[1] + dy/2 + Math.cos(alpha)*sag; ",
123
                  "    }",
124
                  "    else",
125
                  "    {",
126
                  "    midPoint[0] = currentPoint[0] + dx/2 + Math.sin(alpha)*sag;",
127
                  "    midPoint[1] = currentPoint[1] + dy/2 - Math.cos(alpha)*sag;",
128
                  "    }",
129
                  "    return midPoint",
130
                  "}",
131
                  "",
132
                  "",
133
                  "",
134
                  "",
135
                  "",
136
                  "p0 = [0,0]",
137
                  "p1 = Dx(p0, 10); ",
138
                  "p2 = SagArc(p1,p3,4,true)",
139
                  "p3 = Dy(p1, 10); ",
140
                  "p4 = Polar(p3,10,135)",
141
                  "p5 = Dx(p4,-10);",
142
                  "p7 = Dy(p5,-10)",
143
                  "p6 = RadiusArc(p5,p7,7,false)",
144
                  "",
145
                  "test = new Sketch(p0)",
146
                  ".LineTo(p1)",
147
                  ".ArcTo(p2,p3)",
148
                  ".LineTo(p4)",
149
                  ".LineTo(p5)",
150
                  ".ArcTo(p6,p7)",
151
                  ".End(true).Face()",
152
                  "Extrude(test,[0,0,20])",
153
                  "",
154
                  "",
155
                  "",
156
                  ""
157
                ]
158
              },
159
              "width": 50,
160
              "isClosable": false,
161
              "reorderEnabled": true
162
            }
163
          ]
164
        },
165
        {
166
          "type": "column",
167
          "isClosable": true,
168
          "reorderEnabled": true,
169
          "title": "",
170
          "width": 50,
171
          "content": [
172
            {
173
              "type": "stack",
174
              "height": 80,
175
              "isClosable": true,
176
              "reorderEnabled": true,
177
              "title": "",
178
              "activeItemIndex": 0,
179
              "content": [
180
                {
181
                  "type": "component",
182
                  "componentName": "cascadeView",
183
                  "title": "CAD View",
184
                  "componentState": {
185
                    "componentName": "cascadeView",
186
                    "MeshRes": 0.06,
187
                    "MeshResRange": [
188
                      0.01,
189
                      2
190
                    ],
191
                    "Cache?": false,
192
                    "Radius": 30,
193
                    "RadiusRange": [
194
                      20,
195
                      40
196
                    ]
197
                  },
198
                  "isClosable": false,
199
                  "reorderEnabled": true
200
                }
201
              ]
202
            },
203
            {
204
              "type": "stack",
205
              "height": 20,
206
              "isClosable": true,
207
              "reorderEnabled": true,
208
              "title": "",
209
              "activeItemIndex": 0,
210
              "content": [
211
                {
212
                  "type": "component",
213
                  "componentName": "console",
214
                  "title": "Console",
215
                  "componentState": {},
216
                  "height": 20,
217
                  "isClosable": false,
218
                  "reorderEnabled": true
219
                }
220
              ]
221
            }
222
          ]
223
        }
224
      ]
225
    }
226
  ],
227
  "isClosable": true,
228
  "reorderEnabled": true,
229
  "title": "",
230
  "openPopouts": [],
231
  "maximisedItemId": null
232
}

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.