bruce-models 0.8.6 → 0.8.8

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.
@@ -2372,6 +2372,74 @@ var Cartes;
2372
2372
  return true;
2373
2373
  }
2374
2374
  Cartes.IsEqualCartes3 = IsEqualCartes3;
2375
+ /**
2376
+ * Returns true if the given ring is closed.
2377
+ * A ring is closed if the first and last point are equal.
2378
+ * A ring with less than 2 points is not closed.
2379
+ * @param points
2380
+ * @returns
2381
+ */
2382
+ function IsRing2Closed(points) {
2383
+ if (points.length < 2) {
2384
+ return false;
2385
+ }
2386
+ else if (!IsEqualCartes2(points[0], points[points.length - 1])) {
2387
+ return false;
2388
+ }
2389
+ return true;
2390
+ }
2391
+ Cartes.IsRing2Closed = IsRing2Closed;
2392
+ /**
2393
+ * Returns true if the given ring is closed.
2394
+ * A ring is closed if the first and last point are equal.
2395
+ * A ring with less than 2 points is not closed.
2396
+ * @param points
2397
+ * @returns
2398
+ */
2399
+ function IsRing3Closed(points) {
2400
+ if (points.length < 2) {
2401
+ return false;
2402
+ }
2403
+ else if (!IsEqualCartes3(points[0], points[points.length - 1])) {
2404
+ return false;
2405
+ }
2406
+ return true;
2407
+ }
2408
+ Cartes.IsRing3Closed = IsRing3Closed;
2409
+ /**
2410
+ * Closes given ring by adding the first point to the end of the array.
2411
+ * This will mutate the given array.
2412
+ * Will not do anything if the ring is already closed.
2413
+ * @param points
2414
+ * @returns
2415
+ */
2416
+ function CloseRing2(points) {
2417
+ if (points.length < 2) {
2418
+ return;
2419
+ }
2420
+ else if (IsRing2Closed(points)) {
2421
+ return;
2422
+ }
2423
+ points.push(points[0]);
2424
+ }
2425
+ Cartes.CloseRing2 = CloseRing2;
2426
+ /**
2427
+ * Closes given ring by adding the first point to the end of the array.
2428
+ * This will mutate the given array.
2429
+ * Will not do anything if the ring is already closed.
2430
+ * @param points
2431
+ * @returns
2432
+ */
2433
+ function CloseRing3(points) {
2434
+ if (points.length < 2) {
2435
+ return;
2436
+ }
2437
+ else if (IsRing3Closed(points)) {
2438
+ return;
2439
+ }
2440
+ points.push(points[0]);
2441
+ }
2442
+ Cartes.CloseRing3 = CloseRing3;
2375
2443
  })(Cartes || (Cartes = {}));
2376
2444
 
2377
2445
  /**
@@ -7139,147 +7207,175 @@ var ImportedFile;
7139
7207
  */
7140
7208
  var Markup;
7141
7209
  (function (Markup) {
7142
- var Element;
7143
- (function (Element) {
7144
- var Div;
7145
- (function (Div) {
7146
- // Types of div that can be created.
7210
+ var Div;
7211
+ (function (Div) {
7212
+ // Types of div that can be created.
7213
+ var EType;
7214
+ (function (EType) {
7215
+ // Default, no special handling.
7216
+ EType["Default"] = "default";
7217
+ // Callout, assumes it will be positioned in 3d space.
7218
+ // Assumes existence of line that is used to anchor it.
7219
+ EType["Callout"] = "callout";
7220
+ })(EType = Div.EType || (Div.EType = {}));
7221
+ // Describes expected content of a row cell.
7222
+ var EItemType;
7223
+ (function (EItemType) {
7224
+ // Default, no special handling.
7225
+ EItemType["Default"] = "DEFAULT";
7226
+ // Embed, assume content is html.
7227
+ // Make it take over the whole cell instead of padding it and such.
7228
+ EItemType["Embed"] = "EMBED";
7229
+ })(EItemType = Div.EItemType || (Div.EItemType = {}));
7230
+ var ItemAction;
7231
+ (function (ItemAction) {
7232
+ // Types of actions that can be performed when a cell is clicked.
7233
+ // Null = "NONE".
7147
7234
  var EType;
7148
7235
  (function (EType) {
7149
- // Default, no special handling.
7150
- EType["Default"] = "default";
7151
- // Callout, assumes it will be positioned in 3d space.
7152
- // Assumes existence of line that is used to anchor it.
7153
- EType["Callout"] = "callout";
7154
- })(EType = Div.EType || (Div.EType = {}));
7155
- // Describes expected content of a row cell.
7156
- var EItemType;
7157
- (function (EItemType) {
7158
- // Default, no special handling.
7159
- EItemType["Default"] = "DEFAULT";
7160
- // Embed, assume content is html.
7161
- // Make it take over the whole cell instead of padding it and such.
7162
- EItemType["Embed"] = "EMBED";
7163
- })(EItemType = Div.EItemType || (Div.EItemType = {}));
7164
- var ItemAction;
7165
- (function (ItemAction) {
7166
- // Types of actions that can be performed when a cell is clicked.
7167
- // Null = "NONE".
7168
- var EType;
7169
- (function (EType) {
7170
- EType["None"] = "NONE";
7171
- // Open a link specified in params.
7172
- EType["OpenLink"] = "LINK";
7173
- // Open the markup's entity's details panel.
7174
- EType["OpenInfoView"] = "INFOVIEW";
7175
- // Open the markup's entity's gallery popup.
7176
- EType["OpenEntityGallery"] = "GALLERY";
7177
- // Toggle visibility of the markup's entity's relationships.
7178
- EType["ToggleRelationships"] = "RELATIONSHIPS";
7179
- // Dictates this cell can be used to drag the div around.
7180
- EType["Draggable"] = "DRAGABBLE";
7181
- // Closes the markup.
7182
- EType["Close"] = "CLOSE";
7183
- // Opens a bookmark specified in params.
7184
- EType["OpenBookmark"] = "BOOKMARK";
7185
- })(EType = ItemAction.EType || (ItemAction.EType = {}));
7186
- })(ItemAction = Div.ItemAction || (Div.ItemAction = {}));
7187
- })(Div = Element.Div || (Element.Div = {}));
7188
- var Drawing;
7189
- (function (Drawing) {
7190
- var Line;
7191
- (function (Line) {
7192
- // Dictates where on a DIV an anchor should snap to.
7193
- var EAnchorDivSide;
7194
- (function (EAnchorDivSide) {
7195
- EAnchorDivSide[EAnchorDivSide["TopLeft"] = 0] = "TopLeft";
7196
- EAnchorDivSide[EAnchorDivSide["TopRight"] = 1] = "TopRight";
7197
- EAnchorDivSide[EAnchorDivSide["BottomLeft"] = 2] = "BottomLeft";
7198
- EAnchorDivSide[EAnchorDivSide["BottomRight"] = 3] = "BottomRight";
7199
- EAnchorDivSide[EAnchorDivSide["Center"] = 4] = "Center";
7200
- EAnchorDivSide[EAnchorDivSide["CenterLeft"] = 5] = "CenterLeft";
7201
- EAnchorDivSide[EAnchorDivSide["CenterRight"] = 6] = "CenterRight";
7202
- EAnchorDivSide[EAnchorDivSide["CenterTop"] = 7] = "CenterTop";
7203
- EAnchorDivSide[EAnchorDivSide["CenterBottom"] = 8] = "CenterBottom";
7204
- })(EAnchorDivSide = Line.EAnchorDivSide || (Line.EAnchorDivSide = {}));
7205
- // Dictates what end of the line an anchor should render on.
7206
- var EAnchorLineSide;
7207
- (function (EAnchorLineSide) {
7208
- EAnchorLineSide[EAnchorLineSide["Start"] = 0] = "Start";
7209
- EAnchorLineSide[EAnchorLineSide["End"] = 1] = "End";
7210
- })(EAnchorLineSide = Line.EAnchorLineSide || (Line.EAnchorLineSide = {}));
7211
- // Types of anchor heads when anchor is used in context of a line.
7212
- // None means the anchor is transparent.
7213
- var EAnchorHeadStyle;
7214
- (function (EAnchorHeadStyle) {
7215
- EAnchorHeadStyle["None"] = "NONE";
7216
- EAnchorHeadStyle["Circle"] = "CIRCLE";
7217
- EAnchorHeadStyle["Arrow"] = "ARROW";
7218
- })(EAnchorHeadStyle = Line.EAnchorHeadStyle || (Line.EAnchorHeadStyle = {}));
7219
- Line.DEFAULT = {
7220
- brushColor: "rgba(255, 255, 255, 1)",
7221
- brushSize: 4,
7222
- path: null,
7223
- pathType: "LINE",
7224
- transform: null,
7225
- snaps: null
7226
- };
7227
- })(Line = Drawing.Line || (Drawing.Line = {}));
7228
- var FreePaint;
7229
- (function (FreePaint) {
7230
- FreePaint.DEFAULT = {
7231
- brushColor: "rgba(255, 255, 255, 1)",
7232
- brushSize: 4,
7233
- path: null,
7234
- pathType: "PLAIN",
7235
- transform: null
7236
- };
7237
- })(FreePaint = Drawing.FreePaint || (Drawing.FreePaint = {}));
7238
- })(Drawing = Element.Drawing || (Element.Drawing = {}));
7239
- var Entity3d;
7240
- (function (Entity3d) {
7241
- var Polygon;
7242
- (function (Polygon) {
7243
- // Determines if terrain and 3d models should be overlapped or not.
7244
- var EClassificationType;
7245
- (function (EClassificationType) {
7246
- // 3d models and terrain are overlapped.
7247
- EClassificationType["Both"] = "BOTH";
7248
- // Only terrain is overlapped.
7249
- EClassificationType["Terrain"] = "TERRAIN";
7250
- })(EClassificationType = Polygon.EClassificationType || (Polygon.EClassificationType = {}));
7251
- Polygon.DEFAULT = {
7252
- id: null,
7253
- positions: null,
7254
- color: "rgba(254, 234, 57, 0.54)",
7255
- outlineColor: "rgba(215, 215, 215, 0)",
7256
- outlineWidth: 2,
7257
- extrudedHeight: 0,
7258
- classificationType: EClassificationType.Both,
7259
- smoothen: 0
7260
- };
7261
- })(Polygon = Entity3d.Polygon || (Entity3d.Polygon = {}));
7262
- var Polyline;
7263
- (function (Polyline) {
7264
- Polyline.DEFAULT = {
7265
- id: null,
7266
- positions: null,
7267
- color: "rgba(254, 234, 57, 0.54)",
7268
- outlineWidth: 4,
7269
- smoothen: 0
7270
- };
7271
- })(Polyline = Entity3d.Polyline || (Entity3d.Polyline = {}));
7272
- var Circle;
7273
- (function (Circle) {
7274
- Circle.DEFAULT = {
7275
- id: null,
7276
- position: null,
7277
- radius: 50,
7278
- color: "rgba(254, 234, 57, 0.54)"
7279
- };
7280
- })(Circle = Entity3d.Circle || (Entity3d.Circle = {}));
7281
- })(Entity3d = Element.Entity3d || (Element.Entity3d = {}));
7282
- })(Element = Markup.Element || (Markup.Element = {}));
7236
+ EType["None"] = "NONE";
7237
+ // Open a link specified in params.
7238
+ EType["OpenLink"] = "LINK";
7239
+ // Open the markup's entity's details panel.
7240
+ EType["OpenInfoView"] = "INFOVIEW";
7241
+ // Open the markup's entity's gallery popup.
7242
+ EType["OpenEntityGallery"] = "GALLERY";
7243
+ // Toggle visibility of the markup's entity's relationships.
7244
+ EType["ToggleRelationships"] = "RELATIONSHIPS";
7245
+ // Dictates this cell can be used to drag the div around.
7246
+ EType["Draggable"] = "DRAGABBLE";
7247
+ // Closes the markup.
7248
+ EType["Close"] = "CLOSE";
7249
+ // Opens a bookmark specified in params.
7250
+ EType["OpenBookmark"] = "BOOKMARK";
7251
+ })(EType = ItemAction.EType || (ItemAction.EType = {}));
7252
+ })(ItemAction = Div.ItemAction || (Div.ItemAction = {}));
7253
+ Div.DEFAULT = {
7254
+ contentRows: [
7255
+ {
7256
+ height: 100,
7257
+ items: [
7258
+ {
7259
+ contentType: EItemType.Default,
7260
+ text: "Type here...",
7261
+ width: 100,
7262
+ backgroundColor: "white",
7263
+ fontColor: "black",
7264
+ textAlign: "center",
7265
+ verticalAlign: "center",
7266
+ fontSize: 15
7267
+ }
7268
+ ]
7269
+ }
7270
+ ],
7271
+ height: null,
7272
+ width: null,
7273
+ id: null,
7274
+ x: null,
7275
+ y: null,
7276
+ borderColor: "black",
7277
+ borderWidth: 1,
7278
+ borderUsingPercent: false,
7279
+ borderRadius: 8,
7280
+ type: EType.Default
7281
+ };
7282
+ })(Div = Markup.Div || (Markup.Div = {}));
7283
+ var Drawing;
7284
+ (function (Drawing) {
7285
+ // Describes a line end's head.
7286
+ var EHeadStyle;
7287
+ (function (EHeadStyle) {
7288
+ EHeadStyle["None"] = "NONE";
7289
+ EHeadStyle["Circle"] = "CIRCLE";
7290
+ EHeadStyle["Arrow"] = "ARROW";
7291
+ })(EHeadStyle = Drawing.EHeadStyle || (Drawing.EHeadStyle = {}));
7292
+ var Line;
7293
+ (function (Line) {
7294
+ // Dictates where on a DIV an anchor should snap to.
7295
+ var EAnchorDivSide;
7296
+ (function (EAnchorDivSide) {
7297
+ EAnchorDivSide[EAnchorDivSide["TopLeft"] = 0] = "TopLeft";
7298
+ EAnchorDivSide[EAnchorDivSide["TopRight"] = 1] = "TopRight";
7299
+ EAnchorDivSide[EAnchorDivSide["BottomLeft"] = 2] = "BottomLeft";
7300
+ EAnchorDivSide[EAnchorDivSide["BottomRight"] = 3] = "BottomRight";
7301
+ EAnchorDivSide[EAnchorDivSide["Center"] = 4] = "Center";
7302
+ EAnchorDivSide[EAnchorDivSide["CenterLeft"] = 5] = "CenterLeft";
7303
+ EAnchorDivSide[EAnchorDivSide["CenterRight"] = 6] = "CenterRight";
7304
+ EAnchorDivSide[EAnchorDivSide["CenterTop"] = 7] = "CenterTop";
7305
+ EAnchorDivSide[EAnchorDivSide["CenterBottom"] = 8] = "CenterBottom";
7306
+ })(EAnchorDivSide = Line.EAnchorDivSide || (Line.EAnchorDivSide = {}));
7307
+ // Dictates what end of the line an anchor should render on.
7308
+ var EAnchorLineSide;
7309
+ (function (EAnchorLineSide) {
7310
+ EAnchorLineSide[EAnchorLineSide["Start"] = 0] = "Start";
7311
+ EAnchorLineSide[EAnchorLineSide["End"] = 1] = "End";
7312
+ })(EAnchorLineSide = Line.EAnchorLineSide || (Line.EAnchorLineSide = {}));
7313
+ Line.DEFAULT = {
7314
+ brushColor: "rgba(255, 255, 255, 1)",
7315
+ brushSize: 4,
7316
+ path: null,
7317
+ pathType: "LINE",
7318
+ transform: null,
7319
+ snaps: null
7320
+ };
7321
+ })(Line = Drawing.Line || (Drawing.Line = {}));
7322
+ var FreePaint;
7323
+ (function (FreePaint) {
7324
+ FreePaint.DEFAULT = {
7325
+ brushColor: "rgba(255, 255, 255, 1)",
7326
+ brushSize: 4,
7327
+ path: null,
7328
+ pathType: "PLAIN",
7329
+ transform: null
7330
+ };
7331
+ })(FreePaint = Drawing.FreePaint || (Drawing.FreePaint = {}));
7332
+ })(Drawing = Markup.Drawing || (Markup.Drawing = {}));
7333
+ var Entity3d;
7334
+ (function (Entity3d) {
7335
+ var Polygon;
7336
+ (function (Polygon) {
7337
+ // Determines if terrain and 3d models should be overlapped or not.
7338
+ var EClassificationType;
7339
+ (function (EClassificationType) {
7340
+ // 3d models and terrain are overlapped.
7341
+ EClassificationType["Both"] = "BOTH";
7342
+ // Only terrain is overlapped.
7343
+ EClassificationType["Terrain"] = "TERRAIN";
7344
+ })(EClassificationType = Polygon.EClassificationType || (Polygon.EClassificationType = {}));
7345
+ Polygon.DEFAULT = {
7346
+ type: "POLYGON",
7347
+ id: null,
7348
+ positions: null,
7349
+ color: "rgba(254, 234, 57, 0.54)",
7350
+ outlineColor: "rgba(215, 215, 215, 0)",
7351
+ outlineWidth: 2,
7352
+ extrudedHeight: 0,
7353
+ classificationType: EClassificationType.Both,
7354
+ smoothen: 0
7355
+ };
7356
+ })(Polygon = Entity3d.Polygon || (Entity3d.Polygon = {}));
7357
+ var Polyline;
7358
+ (function (Polyline) {
7359
+ Polyline.DEFAULT = {
7360
+ type: "POLYLINE",
7361
+ id: null,
7362
+ positions: null,
7363
+ color: "rgba(254, 234, 57, 0.54)",
7364
+ outlineWidth: 4,
7365
+ smoothen: 0
7366
+ };
7367
+ })(Polyline = Entity3d.Polyline || (Entity3d.Polyline = {}));
7368
+ var Circle;
7369
+ (function (Circle) {
7370
+ Circle.DEFAULT = {
7371
+ type: "CIRCLE",
7372
+ id: null,
7373
+ position: null,
7374
+ radius: 50,
7375
+ color: "rgba(254, 234, 57, 0.54)"
7376
+ };
7377
+ })(Circle = Entity3d.Circle || (Entity3d.Circle = {}));
7378
+ })(Entity3d = Markup.Entity3d || (Markup.Entity3d = {}));
7283
7379
  })(Markup || (Markup = {}));
7284
7380
 
7285
7381
  export { AnnDocument, CustomForm, CustomFormContent, AbstractApi, Api, BruceApi, CamApi, IdmApi, GlobalApi, Calculator, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityType, Entity, EntityGlobe, EntityFilterGetter, BatchedDataGetter, EntityCoords, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, PendingAction, MessageBroker, Style, TilesetEntitiesMapTiles, TilesetExtMapTiles, Tileset, Permission, Session, UserGroup, User, Account, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, ImportCad, ImportCsv, ImportJson, ImportKml, ImportedFile, Markup };