@itwin/core-backend 5.4.0-dev.2 → 5.4.0-dev.4
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/lib/cjs/Element.d.ts +29 -1
- package/lib/cjs/Element.d.ts.map +1 -1
- package/lib/cjs/Element.js +53 -1
- package/lib/cjs/Element.js.map +1 -1
- package/lib/cjs/ElementAspect.d.ts +24 -1
- package/lib/cjs/ElementAspect.d.ts.map +1 -1
- package/lib/cjs/ElementAspect.js +102 -1
- package/lib/cjs/ElementAspect.js.map +1 -1
- package/lib/cjs/IModelDb.d.ts +11 -0
- package/lib/cjs/IModelDb.d.ts.map +1 -1
- package/lib/cjs/IModelDb.js +18 -0
- package/lib/cjs/IModelDb.js.map +1 -1
- package/lib/cjs/NavigationRelationship.d.ts +15 -0
- package/lib/cjs/NavigationRelationship.d.ts.map +1 -1
- package/lib/cjs/NavigationRelationship.js +22 -1
- package/lib/cjs/NavigationRelationship.js.map +1 -1
- package/lib/cjs/annotations/LeaderGeometry.d.ts +13 -1
- package/lib/cjs/annotations/LeaderGeometry.d.ts.map +1 -1
- package/lib/cjs/annotations/LeaderGeometry.js +88 -10
- package/lib/cjs/annotations/LeaderGeometry.js.map +1 -1
- package/lib/cjs/annotations/TextAnnotationElement.d.ts +1 -1
- package/lib/cjs/annotations/TextAnnotationElement.d.ts.map +1 -1
- package/lib/cjs/annotations/TextAnnotationElement.js +7 -3
- package/lib/cjs/annotations/TextAnnotationElement.js.map +1 -1
- package/lib/esm/Element.d.ts +29 -1
- package/lib/esm/Element.d.ts.map +1 -1
- package/lib/esm/Element.js +53 -2
- package/lib/esm/Element.js.map +1 -1
- package/lib/esm/ElementAspect.d.ts +24 -1
- package/lib/esm/ElementAspect.d.ts.map +1 -1
- package/lib/esm/ElementAspect.js +101 -1
- package/lib/esm/ElementAspect.js.map +1 -1
- package/lib/esm/IModelDb.d.ts +11 -0
- package/lib/esm/IModelDb.d.ts.map +1 -1
- package/lib/esm/IModelDb.js +18 -0
- package/lib/esm/IModelDb.js.map +1 -1
- package/lib/esm/NavigationRelationship.d.ts +15 -0
- package/lib/esm/NavigationRelationship.d.ts.map +1 -1
- package/lib/esm/NavigationRelationship.js +19 -0
- package/lib/esm/NavigationRelationship.js.map +1 -1
- package/lib/esm/annotations/LeaderGeometry.d.ts +13 -1
- package/lib/esm/annotations/LeaderGeometry.d.ts.map +1 -1
- package/lib/esm/annotations/LeaderGeometry.js +89 -12
- package/lib/esm/annotations/LeaderGeometry.js.map +1 -1
- package/lib/esm/annotations/TextAnnotationElement.d.ts +1 -1
- package/lib/esm/annotations/TextAnnotationElement.d.ts.map +1 -1
- package/lib/esm/annotations/TextAnnotationElement.js +7 -3
- package/lib/esm/annotations/TextAnnotationElement.js.map +1 -1
- package/lib/esm/test/annotations/LeaderGeometry.test.js +47 -2
- package/lib/esm/test/annotations/LeaderGeometry.test.js.map +1 -1
- package/lib/esm/test/annotations/TextAnnotation.test.js +46 -5
- package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -1
- package/lib/esm/test/element/ProjectInformationRecord.test.d.ts +2 -0
- package/lib/esm/test/element/ProjectInformationRecord.test.d.ts.map +1 -0
- package/lib/esm/test/element/ProjectInformationRecord.test.js +80 -0
- package/lib/esm/test/element/ProjectInformationRecord.test.js.map +1 -0
- package/lib/esm/test/element/SheetInformationAspect.test.d.ts +2 -0
- package/lib/esm/test/element/SheetInformationAspect.test.d.ts.map +1 -0
- package/lib/esm/test/element/SheetInformationAspect.test.js +182 -0
- package/lib/esm/test/element/SheetInformationAspect.test.js.map +1 -0
- package/lib/esm/test/imodel/IModel.test.js +32 -2
- package/lib/esm/test/imodel/IModel.test.js.map +1 -1
- package/lib/esm/test/standalone/ChangesetReader.test.js +8 -11
- package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -1
- package/package.json +14 -14
|
@@ -182,4 +182,19 @@ export declare class SheetIndexReferenceRefersToSheetIndex extends RelatedElemen
|
|
|
182
182
|
static classFullName: string;
|
|
183
183
|
constructor(sheetIndexId: Id64String, relClassName?: string);
|
|
184
184
|
}
|
|
185
|
+
/** Relates a [[Subject]] to the [[ProjectInformationRecord]] that describes its project-level properties.
|
|
186
|
+
* @beta
|
|
187
|
+
*/
|
|
188
|
+
export declare class SubjectOwnsProjectInformationRecord extends ElementOwnsChildElements {
|
|
189
|
+
static classFullName: string;
|
|
190
|
+
constructor(parentId: Id64String, relClassName?: string);
|
|
191
|
+
}
|
|
192
|
+
/** Relates a [[Sheet]] to the [[SheetInformationAspect]] that hosts its basic [SheetInformation]($common).
|
|
193
|
+
* @see [[SheetInformationAspect.setSheetInformation]] to create an instance of this relationship.
|
|
194
|
+
* @beta
|
|
195
|
+
*/
|
|
196
|
+
export declare class SheetOwnsSheetInformationAspect extends ElementOwnsUniqueAspect {
|
|
197
|
+
static classFullName: string;
|
|
198
|
+
constructor(sheetId: Id64String, relClassName?: string);
|
|
199
|
+
}
|
|
185
200
|
//# sourceMappingURL=NavigationRelationship.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationRelationship.d.ts","sourceRoot":"","sources":["../../src/NavigationRelationship.ts"],"names":[],"mappings":"AAIA;;GAEG;AAKH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpE;;GAEG;AACH,qBAAa,wBAAyB,SAAQ,cAAc;IAC1D,OAAc,aAAa,SAAsC;gBAC9C,QAAQ,EAAE,UAAU,EAAE,YAAY,GAAE,MAA+C;CAGvG;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,wBAAwB;IAC/D,OAAuB,aAAa,SAAiC;gBAClD,QAAQ,EAAE,UAAU,EAAE,YAAY,GAAE,MAA0C;CAGlG;AAED;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,wBAAwB;IACxE,OAAuB,aAAa,SAA0C;gBAC3D,QAAQ,EAAE,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Q,cAAc;IAC7D,OAAc,aAAa,SAAyC;gBACjD,OAAO,EAAE,UAAU,EAAE,YAAY,GAAE,MAAkD;CAGzG;AAED;;GAEG;AACH,qBAAa,qCAAsC,SAAQ,cAAc;IACvE,OAAc,aAAa,SAAmD;gBAC3D,YAAY,EAAE,UAAU,EAAE,YAAY,GAAE,MAA4D;CAGxH;AAED;;GAEG;AACH,qBAAa,mCAAoC,SAAQ,wBAAwB;IAC/E,OAAuB,aAAa,SAAiD;gBAClE,QAAQ,EAAE,UAAU,EAAE,YAAY,SAAoD;CAG1G;AAED;;;GAGG;AACH,qBAAa,+BAAgC,SAAQ,uBAAuB;IAC1E,OAAuB,aAAa,SAA6C;gBAE9D,OAAO,EAAE,UAAU,EAAE,YAAY,SAAgD;CAGrG"}
|
|
@@ -235,4 +235,23 @@ export class SheetIndexReferenceRefersToSheetIndex extends RelatedElement {
|
|
|
235
235
|
super({ id: sheetIndexId, relClassName });
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
|
+
/** Relates a [[Subject]] to the [[ProjectInformationRecord]] that describes its project-level properties.
|
|
239
|
+
* @beta
|
|
240
|
+
*/
|
|
241
|
+
export class SubjectOwnsProjectInformationRecord extends ElementOwnsChildElements {
|
|
242
|
+
static classFullName = "BisCore:SubjectOwnsProjectInformationRecord";
|
|
243
|
+
constructor(parentId, relClassName = SubjectOwnsProjectInformationRecord.classFullName) {
|
|
244
|
+
super(parentId, relClassName);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
/** Relates a [[Sheet]] to the [[SheetInformationAspect]] that hosts its basic [SheetInformation]($common).
|
|
248
|
+
* @see [[SheetInformationAspect.setSheetInformation]] to create an instance of this relationship.
|
|
249
|
+
* @beta
|
|
250
|
+
*/
|
|
251
|
+
export class SheetOwnsSheetInformationAspect extends ElementOwnsUniqueAspect {
|
|
252
|
+
static classFullName = "BisCore:SheetOwnsSheetInformationAspect";
|
|
253
|
+
constructor(sheetId, relClassName = SheetOwnsSheetInformationAspect.classFullName) {
|
|
254
|
+
super(sheetId, relClassName);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
238
257
|
//# sourceMappingURL=NavigationRelationship.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationRelationship.js","sourceRoot":"","sources":["../../src/NavigationRelationship.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAMH,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpE;;GAEG;AACH,MAAM,OAAO,wBAAyB,SAAQ,cAAc;IACnD,MAAM,CAAC,aAAa,GAAG,kCAAkC,CAAC;IACjE,YAAmB,QAAoB,EAAE,eAAuB,wBAAwB,CAAC,aAAa;QACpG,KAAK,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC,CAAC;IACxC,CAAC;;AAGH;;GAEG;AACH,MAAM,OAAO,mBAAoB,SAAQ,wBAAwB;IACxD,MAAM,CAAU,aAAa,GAAG,6BAA6B,CAAC;IACrE,YAAmB,QAAoB,EAAE,eAAuB,mBAAmB,CAAC,aAAa;QAC/F,KAAK,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IAChC,CAAC;;AAGH;;GAEG;AACH,MAAM,OAAO,4BAA6B,SAAQ,wBAAwB;IACjE,MAAM,CAAU,aAAa,GAAG,sCAAsC,CAAC;IAC9E,YAAmB,QAAoB,EAAE,eAAuB,4BAA4B,CAAC,aAAa;QACxG,KAAK,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IAChC,CAAC;;AAGH;;GAEG;AACH,MAAM,OAAO,yBAA0B,SAAQ,wBAAwB;IAC9D,MAAM,CAAU,aAAa,GAAG,mCAAmC,CAAC;IAC3E,YAAmB,QAAoB,EAAE,eAAuB,yBAAyB,CAAC,aAAa;QACrG,KAAK,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IAChC,CAAC;;AAGH;;GAEG;AACH,MAAM,OAAO,iC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M,CAAC,aAAa,GAAG,sCAAsC,CAAC;IACrE,YAAmB,YAAwB,EAAE,eAAuB,4BAA4B,CAAC,aAAa;QAC5G,KAAK,CAAC,EAAE,EAAE,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC,CAAC;IAC5C,CAAC;;AAGH;;;GAGG;AACH,MAAM,OAAO,sCAAuC,SAAQ,cAAc;IACjE,MAAM,CAAC,aAAa,GAAG,gDAAgD,CAAC;IAC/E,YAAmB,gBAA4B,EAAE,eAAuB,sCAAsC,CAAC,aAAa;QAC1H,KAAK,CAAC,EAAE,EAAE,EAAE,gBAAgB,EAAE,YAAY,EAAE,CAAC,CAAC;IAChD,CAAC;;AAGH;;GAEG;AACH,MAAM,OAAO,2BAA4B,SAAQ,cAAc;IACtD,MAAM,CAAC,aAAa,GAAG,qCAAqC,CAAC;IACpE,YAAmB,OAAmB,EAAE,eAAuB,2BAA2B,CAAC,aAAa;QACtG,KAAK,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC;IACvC,CAAC;;AAGH;;GAEG;AACH,MAAM,OAAO,qCAAsC,SAAQ,cAAc;IAChE,MAAM,CAAC,aAAa,GAAG,+CAA+C,CAAC;IAC9E,YAAmB,YAAwB,EAAE,eAAuB,qCAAqC,CAAC,aAAa;QACrH,KAAK,CAAC,EAAE,EAAE,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC,CAAC;IAC5C,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Relationships\n */\n\n// NOTE: A NavigationRelationship is not an Entity, so is not registered in the ClassRegistry.\n// NOTE: It does, however, have a classFullName property for consistency with Entity subclasses.\n\nimport { Id64String } from \"@itwin/core-bentley\";\nimport { RelatedElement, TypeDefinition } from \"@itwin/core-common\";\n\n/** Relates a parent Element to child Elements which represent parts of the Entity modeled by the parent Element.\n * @public\n */\nexport class ElementOwnsChildElements extends RelatedElement {\n public static classFullName = \"BisCore:ElementOwnsChildElements\";\n public constructor(parentId: Id64String, relClassName: string = ElementOwnsChildElements.classFullName) {\n super({ id: parentId, relClassName });\n }\n}\n\n/** Relates a parent [[Subject]] to [[Subject]] child elements.\n * @public\n */\nexport class SubjectOwnsSubjects extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:SubjectOwnsSubjects\";\n public constructor(parentId: Id64String, relClassName: string = SubjectOwnsSubjects.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a parent [[Subject]] to [[InformationPartitionElement]] child elements.\n * @public\n */\nexport class SubjectOwnsPartitionElements extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:SubjectOwnsPartitionElements\";\n public constructor(parentId: Id64String, relClassName: string = SubjectOwnsPartitionElements.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a parent [[Category]] to [[SubCategory]] child elements.\n * @public\n */\nexport class CategoryOwnsSubCategories extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:CategoryOwnsSubCategories\";\n public constructor(parentId: Id64String, relClassName: string = CategoryOwnsSubCategories.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a parent [[RenderMaterial]] to [[RenderMaterial]] child elements.\n * @public\n */\nexport class RenderMaterialOwnsRenderMaterials extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:RenderMaterialOwnsRenderMaterials\";\n public constructor(parentId: Id64String, relClassName: string = RenderMaterialOwnsRenderMaterials.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a parent Element to child Elements which represent **hidden** parts of the Entity.\n * @public\n */\nexport class ElementEncapsulatesElements extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:ElementEncapsulatesElements\";\n public constructor(parentId: Id64String, relClassName: string = ElementEncapsulatesElements.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a parent [[PhysicalElement]] to [[PhysicalElement]] children that it assembles.\n * @public\n */\nexport class PhysicalElementAssemblesElements extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:PhysicalElementAssemblesElements\";\n public constructor(parentId: Id64String, relClassName: string = PhysicalElementAssemblesElements.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a parent [[ExternalSource]] to its [[ExternalSourceAttachment]] children.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\n * @beta\n */\nexport class ExternalSourceOwnsAttachments extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:ExternalSourceOwnsAttachments\";\n public constructor(parentId: Id64String, relClassName: string = ExternalSourceOwnsAttachments.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a parent [[FolderLink]] to its [[RepositoryLink]] children.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\n * @beta\n */\nexport class FolderContainsRepositories extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:FolderContainsRepositories\";\n public constructor(parentId: Id64String, relClassName: string = FolderContainsRepositories.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a [[SheetIndexFolder]] to the [[SheetIndexEntry]]'s that it contains.\n * @beta\n */\nexport class SheetIndexFolderOwnsEntries extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:SheetIndexFolderOwnsEntries\";\n public constructor(parentId: Id64String, relClassName: string = SheetIndexFolderOwnsEntries.classFullName) {\n super(parentId, relClassName );\n }\n}\n\n/** Relates a [[SheetIndex]] to the [SheetIndexEntry]]'s that it contains.\n * @beta\n */\nexport class SheetIndexOwnsEntries extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:SheetIndexOwnsEntries\";\n public constructor(parentId: Id64String, relClassName: string = SheetIndexOwnsEntries.classFullName) {\n super(parentId, relClassName );\n }\n}\n\n/** Relates a [[GeometricElement2d]] to its [[TypeDefinitionElement]]\n * @public\n */\nexport class GeometricElement2dHasTypeDefinition extends TypeDefinition {\n public static classFullName = \"BisCore:GeometricElement2dHasTypeDefinition\";\n public constructor(id: Id64String, relClassName: string = GeometricElement2dHasTypeDefinition.classFullName) {\n super({ id, relClassName });\n }\n}\n\n/** Relates a [[GraphicalElement2d]] to its [[GraphicalType2d]]\n * @public\n */\nexport class GraphicalElement2dIsOfType extends GeometricElement2dHasTypeDefinition {\n public static override classFullName = \"BisCore:GraphicalElement2dIsOfType\";\n public constructor(id: Id64String, relClassName: string = GraphicalElement2dIsOfType.classFullName) {\n super(id, relClassName);\n }\n}\n\n/** Relates a [[GeometricElement3d]] to its [[TypeDefinitionElement]]\n * @public\n */\nexport class GeometricElement3dHasTypeDefinition extends TypeDefinition {\n public static classFullName = \"BisCore:GeometricElement3dHasTypeDefinition\";\n public constructor(id: Id64String, relClassName: string = GeometricElement3dHasTypeDefinition.classFullName) {\n super({ id, relClassName });\n }\n}\n\n/** Relates a [[SpatialLocationElement]] to its [[SpatialLocationType]]\n * @public\n */\nexport class SpatialLocationIsOfType extends GeometricElement3dHasTypeDefinition {\n public static override classFullName = \"BisCore:SpatialLocationIsOfType\";\n public constructor(id: Id64String, relClassName: string = SpatialLocationIsOfType.classFullName) {\n super(id, relClassName);\n }\n}\n\n/** Relates a [[PhysicalElement]] to its [[PhysicalType]]\n * @public\n */\nexport class PhysicalElementIsOfType extends GeometricElement3dHasTypeDefinition {\n public static override classFullName = \"BisCore:PhysicalElementIsOfType\";\n public constructor(id: Id64String, relClassName: string = PhysicalElementIsOfType.classFullName) {\n super(id, relClassName);\n }\n}\n\n/** Relates a [[PhysicalElement]] to its [[PhysicalMaterial]]\n * @public\n */\nexport class PhysicalElementIsOfPhysicalMaterial extends RelatedElement {\n public static classFullName = \"BisCore:PhysicalElementIsOfPhysicalMaterial\";\n public constructor(id: Id64String) {\n super({ id });\n }\n}\n\n/** Relates a [[PhysicalType]] to its [[PhysicalMaterial]]\n * @public\n */\nexport class PhysicalTypeIsOfPhysicalMaterial extends RelatedElement {\n public static classFullName = \"BisCore:PhysicalTypeIsOfPhysicalMaterial\";\n public constructor(id: Id64String) {\n super({ id });\n }\n}\n\n/** Relates an [[Element]] and an [[ElementUniqueAspect]] that it owns.\n * @public\n */\nexport class ElementOwnsUniqueAspect extends RelatedElement {\n public static classFullName = \"BisCore:ElementOwnsUniqueAspect\";\n public constructor(elementId: Id64String, relClassName: string = ElementOwnsUniqueAspect.classFullName) {\n super({ id: elementId, relClassName });\n }\n}\n\n/** Relates an [[Element]] and an [[ElementMultiAspect]] that it owns.\n * @public\n */\nexport class ElementOwnsMultiAspects extends RelatedElement {\n public static classFullName = \"BisCore:ElementOwnsMultiAspects\";\n public constructor(elementId: Id64String, relClassName: string = ElementOwnsMultiAspects.classFullName) {\n super({ id: elementId, relClassName });\n }\n}\n\n/** Relates an [[Element]] and an [[ExternalSourceAspect]] that it owns.\n * @public\n */\nexport class ElementOwnsExternalSourceAspects extends ElementOwnsMultiAspects {\n public static override classFullName = \"BisCore:ElementOwnsExternalSourceAspects\";\n public constructor(elementId: Id64String, relClassName: string = ElementOwnsExternalSourceAspects.classFullName) {\n super(elementId, relClassName);\n }\n}\n\n/** Relates an [[ExternalSource]] to the [[RepositoryLink]] that it is persisted in.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\n * @beta\n */\nexport class ExternalSourceIsInRepository extends RelatedElement {\n public static classFullName = \"BisCore:ExternalSourceIsInRepository\";\n public constructor(repositoryId: Id64String, relClassName: string = ExternalSourceIsInRepository.classFullName) {\n super({ id: repositoryId, relClassName });\n }\n}\n\n/** Relates an [[ExternalSource]] to the [[RepositoryLink]] that it is persisted in.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\n * @beta\n */\nexport class ExternalSourceAttachmentAttachesSource extends RelatedElement {\n public static classFullName = \"BisCore:ExternalSourceAttachmentAttachesSource\";\n public constructor(externalSourceId: Id64String, relClassName: string = ExternalSourceAttachmentAttachesSource.classFullName) {\n super({ id: externalSourceId, relClassName });\n }\n}\n\n/** Relates a [[SheetReference]] and [[Sheet]] that it refers.\n * @beta\n */\nexport class SheetReferenceRefersToSheet extends RelatedElement {\n public static classFullName = \"BisCore:SheetReferenceRefersToSheet\";\n public constructor(sheetId: Id64String, relClassName: string = SheetReferenceRefersToSheet.classFullName) {\n super({ id: sheetId, relClassName });\n }\n}\n\n/** Relates a [[SheetIndexReference]] to a [[SheetIndex]] it refers.\n * @beta\n */\nexport class SheetIndexReferenceRefersToSheetIndex extends RelatedElement {\n public static classFullName = \"BisCore:SheetIndexReferenceRefersToSheetIndex\";\n public constructor(sheetIndexId: Id64String, relClassName: string = SheetIndexReferenceRefersToSheetIndex.classFullName) {\n super({ id: sheetIndexId, relClassName });\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"NavigationRelationship.js","sourceRoot":"","sources":["../../src/NavigationRelationship.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAMH,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpE;;GAEG;AACH,MAAM,OAAO,wBAAyB,SAAQ,cAAc;IACnD,MAAM,CAAC,aAAa,GAAG,kCAAkC,CAAC;IACjE,YAAmB,QAAoB,EAAE,eAAuB,wBAAwB,CAAC,aAAa;QACpG,KAAK,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC,CAAC;IACxC,CAAC;;AAGH;;GAEG;AACH,MAAM,OAAO,mBAAoB,SAAQ,wBAAwB;IACxD,MAAM,CAAU,aAAa,GAAG,6BAA6B,CAAC;IACrE,YAAmB,QAAoB,EAAE,eAAuB,mBAAmB,CAAC,aAAa;QAC/F,KAAK,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IAChC,CAAC;;AAGH;;GAEG;AACH,MAAM,OAAO,4BAA6B,SAAQ,wBAAwB;IACjE,MAAM,CAAU,aAAa,GAAG,sCAAsC,CAAC;IAC9E,YAAmB,QAAoB,EAAE,eAAuB,4BAA4B,CAAC,aAAa;QACxG,KAAK,CAAC,QAAQ,EAAE,YAAY,CAAC,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AU,aAAa,GAAG,6CAA6C,CAAC;IACrF,YAAmB,QAAoB,EAAE,YAAY,GAAG,mCAAmC,CAAC,aAAa;QACvG,KAAK,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IAChC,CAAC;;AAGH;;;GAGG;AACH,MAAM,OAAO,+BAAgC,SAAQ,uBAAuB;IACnE,MAAM,CAAU,aAAa,GAAG,yCAAyC,CAAC;IAEjF,YAAmB,OAAmB,EAAE,YAAY,GAAG,+BAA+B,CAAC,aAAa;QAClG,KAAK,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IAC/B,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Relationships\n */\n\n// NOTE: A NavigationRelationship is not an Entity, so is not registered in the ClassRegistry.\n// NOTE: It does, however, have a classFullName property for consistency with Entity subclasses.\n\nimport { Id64String } from \"@itwin/core-bentley\";\nimport { RelatedElement, TypeDefinition } from \"@itwin/core-common\";\n\n/** Relates a parent Element to child Elements which represent parts of the Entity modeled by the parent Element.\n * @public\n */\nexport class ElementOwnsChildElements extends RelatedElement {\n public static classFullName = \"BisCore:ElementOwnsChildElements\";\n public constructor(parentId: Id64String, relClassName: string = ElementOwnsChildElements.classFullName) {\n super({ id: parentId, relClassName });\n }\n}\n\n/** Relates a parent [[Subject]] to [[Subject]] child elements.\n * @public\n */\nexport class SubjectOwnsSubjects extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:SubjectOwnsSubjects\";\n public constructor(parentId: Id64String, relClassName: string = SubjectOwnsSubjects.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a parent [[Subject]] to [[InformationPartitionElement]] child elements.\n * @public\n */\nexport class SubjectOwnsPartitionElements extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:SubjectOwnsPartitionElements\";\n public constructor(parentId: Id64String, relClassName: string = SubjectOwnsPartitionElements.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a parent [[Category]] to [[SubCategory]] child elements.\n * @public\n */\nexport class CategoryOwnsSubCategories extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:CategoryOwnsSubCategories\";\n public constructor(parentId: Id64String, relClassName: string = CategoryOwnsSubCategories.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a parent [[RenderMaterial]] to [[RenderMaterial]] child elements.\n * @public\n */\nexport class RenderMaterialOwnsRenderMaterials extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:RenderMaterialOwnsRenderMaterials\";\n public constructor(parentId: Id64String, relClassName: string = RenderMaterialOwnsRenderMaterials.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a parent Element to child Elements which represent **hidden** parts of the Entity.\n * @public\n */\nexport class ElementEncapsulatesElements extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:ElementEncapsulatesElements\";\n public constructor(parentId: Id64String, relClassName: string = ElementEncapsulatesElements.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a parent [[PhysicalElement]] to [[PhysicalElement]] children that it assembles.\n * @public\n */\nexport class PhysicalElementAssemblesElements extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:PhysicalElementAssemblesElements\";\n public constructor(parentId: Id64String, relClassName: string = PhysicalElementAssemblesElements.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a parent [[ExternalSource]] to its [[ExternalSourceAttachment]] children.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\n * @beta\n */\nexport class ExternalSourceOwnsAttachments extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:ExternalSourceOwnsAttachments\";\n public constructor(parentId: Id64String, relClassName: string = ExternalSourceOwnsAttachments.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a parent [[FolderLink]] to its [[RepositoryLink]] children.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\n * @beta\n */\nexport class FolderContainsRepositories extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:FolderContainsRepositories\";\n public constructor(parentId: Id64String, relClassName: string = FolderContainsRepositories.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a [[SheetIndexFolder]] to the [[SheetIndexEntry]]'s that it contains.\n * @beta\n */\nexport class SheetIndexFolderOwnsEntries extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:SheetIndexFolderOwnsEntries\";\n public constructor(parentId: Id64String, relClassName: string = SheetIndexFolderOwnsEntries.classFullName) {\n super(parentId, relClassName );\n }\n}\n\n/** Relates a [[SheetIndex]] to the [SheetIndexEntry]]'s that it contains.\n * @beta\n */\nexport class SheetIndexOwnsEntries extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:SheetIndexOwnsEntries\";\n public constructor(parentId: Id64String, relClassName: string = SheetIndexOwnsEntries.classFullName) {\n super(parentId, relClassName );\n }\n}\n\n/** Relates a [[GeometricElement2d]] to its [[TypeDefinitionElement]]\n * @public\n */\nexport class GeometricElement2dHasTypeDefinition extends TypeDefinition {\n public static classFullName = \"BisCore:GeometricElement2dHasTypeDefinition\";\n public constructor(id: Id64String, relClassName: string = GeometricElement2dHasTypeDefinition.classFullName) {\n super({ id, relClassName });\n }\n}\n\n/** Relates a [[GraphicalElement2d]] to its [[GraphicalType2d]]\n * @public\n */\nexport class GraphicalElement2dIsOfType extends GeometricElement2dHasTypeDefinition {\n public static override classFullName = \"BisCore:GraphicalElement2dIsOfType\";\n public constructor(id: Id64String, relClassName: string = GraphicalElement2dIsOfType.classFullName) {\n super(id, relClassName);\n }\n}\n\n/** Relates a [[GeometricElement3d]] to its [[TypeDefinitionElement]]\n * @public\n */\nexport class GeometricElement3dHasTypeDefinition extends TypeDefinition {\n public static classFullName = \"BisCore:GeometricElement3dHasTypeDefinition\";\n public constructor(id: Id64String, relClassName: string = GeometricElement3dHasTypeDefinition.classFullName) {\n super({ id, relClassName });\n }\n}\n\n/** Relates a [[SpatialLocationElement]] to its [[SpatialLocationType]]\n * @public\n */\nexport class SpatialLocationIsOfType extends GeometricElement3dHasTypeDefinition {\n public static override classFullName = \"BisCore:SpatialLocationIsOfType\";\n public constructor(id: Id64String, relClassName: string = SpatialLocationIsOfType.classFullName) {\n super(id, relClassName);\n }\n}\n\n/** Relates a [[PhysicalElement]] to its [[PhysicalType]]\n * @public\n */\nexport class PhysicalElementIsOfType extends GeometricElement3dHasTypeDefinition {\n public static override classFullName = \"BisCore:PhysicalElementIsOfType\";\n public constructor(id: Id64String, relClassName: string = PhysicalElementIsOfType.classFullName) {\n super(id, relClassName);\n }\n}\n\n/** Relates a [[PhysicalElement]] to its [[PhysicalMaterial]]\n * @public\n */\nexport class PhysicalElementIsOfPhysicalMaterial extends RelatedElement {\n public static classFullName = \"BisCore:PhysicalElementIsOfPhysicalMaterial\";\n public constructor(id: Id64String) {\n super({ id });\n }\n}\n\n/** Relates a [[PhysicalType]] to its [[PhysicalMaterial]]\n * @public\n */\nexport class PhysicalTypeIsOfPhysicalMaterial extends RelatedElement {\n public static classFullName = \"BisCore:PhysicalTypeIsOfPhysicalMaterial\";\n public constructor(id: Id64String) {\n super({ id });\n }\n}\n\n/** Relates an [[Element]] and an [[ElementUniqueAspect]] that it owns.\n * @public\n */\nexport class ElementOwnsUniqueAspect extends RelatedElement {\n public static classFullName = \"BisCore:ElementOwnsUniqueAspect\";\n public constructor(elementId: Id64String, relClassName: string = ElementOwnsUniqueAspect.classFullName) {\n super({ id: elementId, relClassName });\n }\n}\n\n/** Relates an [[Element]] and an [[ElementMultiAspect]] that it owns.\n * @public\n */\nexport class ElementOwnsMultiAspects extends RelatedElement {\n public static classFullName = \"BisCore:ElementOwnsMultiAspects\";\n public constructor(elementId: Id64String, relClassName: string = ElementOwnsMultiAspects.classFullName) {\n super({ id: elementId, relClassName });\n }\n}\n\n/** Relates an [[Element]] and an [[ExternalSourceAspect]] that it owns.\n * @public\n */\nexport class ElementOwnsExternalSourceAspects extends ElementOwnsMultiAspects {\n public static override classFullName = \"BisCore:ElementOwnsExternalSourceAspects\";\n public constructor(elementId: Id64String, relClassName: string = ElementOwnsExternalSourceAspects.classFullName) {\n super(elementId, relClassName);\n }\n}\n\n/** Relates an [[ExternalSource]] to the [[RepositoryLink]] that it is persisted in.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\n * @beta\n */\nexport class ExternalSourceIsInRepository extends RelatedElement {\n public static classFullName = \"BisCore:ExternalSourceIsInRepository\";\n public constructor(repositoryId: Id64String, relClassName: string = ExternalSourceIsInRepository.classFullName) {\n super({ id: repositoryId, relClassName });\n }\n}\n\n/** Relates an [[ExternalSource]] to the [[RepositoryLink]] that it is persisted in.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\n * @beta\n */\nexport class ExternalSourceAttachmentAttachesSource extends RelatedElement {\n public static classFullName = \"BisCore:ExternalSourceAttachmentAttachesSource\";\n public constructor(externalSourceId: Id64String, relClassName: string = ExternalSourceAttachmentAttachesSource.classFullName) {\n super({ id: externalSourceId, relClassName });\n }\n}\n\n/** Relates a [[SheetReference]] and [[Sheet]] that it refers.\n * @beta\n */\nexport class SheetReferenceRefersToSheet extends RelatedElement {\n public static classFullName = \"BisCore:SheetReferenceRefersToSheet\";\n public constructor(sheetId: Id64String, relClassName: string = SheetReferenceRefersToSheet.classFullName) {\n super({ id: sheetId, relClassName });\n }\n}\n\n/** Relates a [[SheetIndexReference]] to a [[SheetIndex]] it refers.\n * @beta\n */\nexport class SheetIndexReferenceRefersToSheetIndex extends RelatedElement {\n public static classFullName = \"BisCore:SheetIndexReferenceRefersToSheetIndex\";\n public constructor(sheetIndexId: Id64String, relClassName: string = SheetIndexReferenceRefersToSheetIndex.classFullName) {\n super({ id: sheetIndexId, relClassName });\n }\n}\n\n/** Relates a [[Subject]] to the [[ProjectInformationRecord]] that describes its project-level properties.\n * @beta\n */\nexport class SubjectOwnsProjectInformationRecord extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:SubjectOwnsProjectInformationRecord\";\n public constructor(parentId: Id64String, relClassName = SubjectOwnsProjectInformationRecord.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a [[Sheet]] to the [[SheetInformationAspect]] that hosts its basic [SheetInformation]($common).\n * @see [[SheetInformationAspect.setSheetInformation]] to create an instance of this relationship.\n * @beta\n */\nexport class SheetOwnsSheetInformationAspect extends ElementOwnsUniqueAspect {\n public static override classFullName = \"BisCore:SheetOwnsSheetInformationAspect\";\n\n public constructor(sheetId: Id64String, relClassName = SheetOwnsSheetInformationAspect.classFullName) {\n super(sheetId, relClassName);\n }\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module ElementGeometry
|
|
3
3
|
*/
|
|
4
|
-
import { ElementGeometry, GeometryParams, TextAnnotationLeader } from "@itwin/core-common";
|
|
4
|
+
import { ElementGeometry, GeometryParams, TextAnnotationLeader, TextStyleSettings } from "@itwin/core-common";
|
|
5
5
|
import { Loop, Path, Point3d, Transform, Vector3d } from "@itwin/core-geometry";
|
|
6
6
|
import { TextBlockLayout, TextStyleResolver } from "./TextBlockLayout";
|
|
7
7
|
/**
|
|
@@ -23,6 +23,18 @@ import { TextBlockLayout, TextStyleResolver } from "./TextBlockLayout";
|
|
|
23
23
|
* @beta
|
|
24
24
|
*/
|
|
25
25
|
export declare function appendLeadersToBuilder(builder: ElementGeometry.Builder, leaders: TextAnnotationLeader[], layout: TextBlockLayout, transform: Transform, params: GeometryParams, textStyleResolver: TextStyleResolver, scaleFactor: number): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Creates the geometry for a terminator at the end of a leader line.
|
|
28
|
+
* @param builder The geometry builder to append the terminator geometry to.
|
|
29
|
+
* @param point The starting point of the leader line.
|
|
30
|
+
* @param dir The direction vector of the leader line.
|
|
31
|
+
* @param params The geometry parameters to use for the terminator.
|
|
32
|
+
* @param textStyleSettings The text style settings to use for the terminator.
|
|
33
|
+
* @param textHeight The height of the text block.
|
|
34
|
+
* @returns True if the geometry was successfully created, false otherwise.
|
|
35
|
+
* @beta
|
|
36
|
+
*/
|
|
37
|
+
export declare function createTerminatorGeometry(builder: ElementGeometry.Builder, point: Point3d, dir: Vector3d, params: GeometryParams, textStyleSettings: TextStyleSettings, textHeight: number): boolean;
|
|
26
38
|
/**
|
|
27
39
|
* Computes the direction vector for an "elbow" for leader based on the attachment point and a frame curve.
|
|
28
40
|
* The elbow direction is determined by whether the attachment point is closer to the left or right side of the frame.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LeaderGeometry.d.ts","sourceRoot":"","sources":["../../../src/annotations/LeaderGeometry.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAY,eAAe,
|
|
1
|
+
{"version":3,"file":"LeaderGeometry.d.ts","sourceRoot":"","sources":["../../../src/annotations/LeaderGeometry.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAY,eAAe,EAAe,cAAc,EAAE,oBAAoB,EAAuC,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC1K,OAAO,EAAyE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEvJ,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEvE;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAsEnP;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,eAAe,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAwEnM;AAGD;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,eAAe,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,GAAG,IAAI,EAAE,WAAW,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CA4BlI;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,oBAAoB,EAC5B,UAAU,EAAE,IAAI,GAAG,IAAI,EACvB,UAAU,EAAE,eAAe,EAC3B,SAAS,EAAE,SAAS,GACnB,OAAO,GAAG,SAAS,CAyCrB"}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
/** @packageDocumentation
|
|
6
6
|
* @module ElementGeometry
|
|
7
7
|
*/
|
|
8
|
-
import { ColorDef } from "@itwin/core-common";
|
|
9
|
-
import { CurveCurve, LineSegment3d, LineString3d, Point3d, Vector3d } from "@itwin/core-geometry";
|
|
8
|
+
import { ColorDef, FillDisplay } from "@itwin/core-common";
|
|
9
|
+
import { Angle, Arc3d, CurveCurve, LineSegment3d, LineString3d, Loop, Point3d, Vector3d } from "@itwin/core-geometry";
|
|
10
10
|
import { computeFrame } from "./FrameGeometry";
|
|
11
11
|
/**
|
|
12
12
|
* Constructs and appends leader lines and their terminators to the provided geometry builder for a text annotation.
|
|
@@ -66,21 +66,98 @@ export function appendLeadersToBuilder(builder, leaders, layout, transform, para
|
|
|
66
66
|
leaderLinePoints.push(attachmentPoint.plusScaled(elbowDirection, elbowLength));
|
|
67
67
|
}
|
|
68
68
|
leaderLinePoints.push(attachmentPoint);
|
|
69
|
-
result = result && builder.appendGeometryQuery(LineString3d.create(leaderLinePoints));
|
|
70
|
-
// Terminator geometry
|
|
71
69
|
const terminatorDirection = Vector3d.createStartEnd(leaderLinePoints[0], leaderLinePoints[1]).normalize();
|
|
72
|
-
const termY = terminatorDirection?.unitCrossProduct(Vector3d.unitZ());
|
|
73
|
-
if (!termY || !terminatorDirection)
|
|
74
|
-
continue; // Assuming leaders without terminators is a valid case.
|
|
75
|
-
const terminatorHeight = leaderStyle.leader.terminatorHeightFactor * scaledBlockTextHeight;
|
|
76
70
|
const terminatorWidth = leaderStyle.leader.terminatorWidthFactor * scaledBlockTextHeight;
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
71
|
+
// Truncate the first segment of the leader lines to account for the arrowhead size when closedArrow (hollow triangle) terminatorShape is used.
|
|
72
|
+
if (leaderStyle.leader.terminatorShape === "closedArrow") {
|
|
73
|
+
if (terminatorDirection)
|
|
74
|
+
leaderLinePoints[0] = leaderLinePoints[0].plusScaled(terminatorDirection, terminatorWidth);
|
|
75
|
+
}
|
|
76
|
+
result = result && builder.appendGeometryQuery(LineString3d.create(leaderLinePoints));
|
|
77
|
+
if (leaderStyle.leader.terminatorShape !== "none") {
|
|
78
|
+
// Terminator geometry
|
|
79
|
+
if (!terminatorDirection)
|
|
80
|
+
continue; // Assuming leaders without terminators is a valid case.
|
|
81
|
+
result = result && createTerminatorGeometry(builder, leader.startPoint, terminatorDirection, params, leaderStyle, scaledBlockTextHeight);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return result;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Creates the geometry for a terminator at the end of a leader line.
|
|
88
|
+
* @param builder The geometry builder to append the terminator geometry to.
|
|
89
|
+
* @param point The starting point of the leader line.
|
|
90
|
+
* @param dir The direction vector of the leader line.
|
|
91
|
+
* @param params The geometry parameters to use for the terminator.
|
|
92
|
+
* @param textStyleSettings The text style settings to use for the terminator.
|
|
93
|
+
* @param textHeight The height of the text block.
|
|
94
|
+
* @returns True if the geometry was successfully created, false otherwise.
|
|
95
|
+
* @beta
|
|
96
|
+
*/
|
|
97
|
+
export function createTerminatorGeometry(builder, point, dir, params, textStyleSettings, textHeight) {
|
|
98
|
+
let result = true;
|
|
99
|
+
const termY = dir.unitCrossProduct(Vector3d.unitZ());
|
|
100
|
+
if (!termY)
|
|
101
|
+
return false; // If dir is parallel to Z, we can't create a terminator
|
|
102
|
+
const terminatorHeight = textStyleSettings.leader.terminatorHeightFactor * textHeight;
|
|
103
|
+
const terminatorWidth = textStyleSettings.leader.terminatorWidthFactor * textHeight;
|
|
104
|
+
const terminatorHalfHeight = terminatorHeight / 2;
|
|
105
|
+
const basePoint = point.plusScaled(dir, terminatorWidth);
|
|
106
|
+
const point1 = basePoint.plusScaled(termY, terminatorHalfHeight);
|
|
107
|
+
const point2 = basePoint.plusScaled(termY.negate(), terminatorHalfHeight);
|
|
108
|
+
// Helper function to add fill parameters
|
|
109
|
+
const addFillParams = () => {
|
|
110
|
+
params.fillDisplay = FillDisplay.Always;
|
|
111
|
+
result = result && builder.appendGeometryParamsChange(params);
|
|
112
|
+
};
|
|
113
|
+
// Helper function to create geometry entry
|
|
114
|
+
const addGeometry = (content, useLoop = false) => {
|
|
115
|
+
const finalContent = useLoop ? Loop.create(content) : content;
|
|
116
|
+
result = result && builder.appendGeometryQuery(finalContent);
|
|
117
|
+
};
|
|
118
|
+
switch (textStyleSettings.leader.terminatorShape) {
|
|
119
|
+
case "openArrow": {
|
|
120
|
+
const lineString = LineString3d.create([point1, point, point2]);
|
|
121
|
+
addGeometry(lineString);
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
case "closedArrow": {
|
|
125
|
+
const lineString = LineString3d.create([point1, point, point2, point1]);
|
|
126
|
+
addGeometry(lineString);
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
case "closedArrowFilled": {
|
|
130
|
+
addFillParams();
|
|
131
|
+
const lineString = LineString3d.create([point1, point, point2, point1]);
|
|
132
|
+
addGeometry(lineString, true);
|
|
133
|
+
break;
|
|
134
|
+
}
|
|
135
|
+
case "circle": {
|
|
136
|
+
const circle = Arc3d.createXY(point, terminatorHalfHeight);
|
|
137
|
+
addGeometry(circle);
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
case "circleFilled": {
|
|
141
|
+
addFillParams();
|
|
142
|
+
const circle = Arc3d.createXY(point, terminatorHalfHeight);
|
|
143
|
+
addGeometry(circle, true);
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
case "slash": {
|
|
147
|
+
const normalizedVector = dir.normalize();
|
|
148
|
+
if (!normalizedVector)
|
|
149
|
+
throw new Error("Invalid reference vector for slash terminator.");
|
|
150
|
+
const rotatedVector = normalizedVector.rotateXY(Angle.createDegrees(45));
|
|
151
|
+
const startPoint = point.plusScaled(rotatedVector, -terminatorHalfHeight);
|
|
152
|
+
const endPoint = point.plusScaled(rotatedVector, terminatorHalfHeight);
|
|
153
|
+
const slashLine = LineSegment3d.create(startPoint, endPoint);
|
|
154
|
+
addGeometry(slashLine);
|
|
155
|
+
break;
|
|
156
|
+
}
|
|
81
157
|
}
|
|
82
158
|
return result;
|
|
83
159
|
}
|
|
160
|
+
;
|
|
84
161
|
/**
|
|
85
162
|
* Computes the direction vector for an "elbow" for leader based on the attachment point and a frame curve.
|
|
86
163
|
* The elbow direction is determined by whether the attachment point is closer to the left or right side of the frame.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LeaderGeometry.js","sourceRoot":"","sources":["../../../src/annotations/LeaderGeometry.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAA8F,MAAM,oBAAoB,CAAC;AAC1I,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,EAAc,OAAO,EAAa,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACzH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG/C;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAAgC,EAAE,OAA+B,EAAE,MAAuB,EAAE,SAAoB,EAAE,MAAsB,EAAE,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AAG,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAE1G,IAAI,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YACjD,qBAAqB,GAAG,qBAAqB,CAAC,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC;YAC7G,cAAc,GAAG,cAAc,CAAC,MAAM,EAAE,CAAC;QAC3C,CAAC;QACD,uFAAuF;QACvF,+EAA+E;QAC/E,MAAM,WAAW,GAAG,qBAAqB,CAAC,UAAU,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC,CAAC,8CAA8C;QACzH,MAAM,gBAAgB,GAAG,aAAa,CAAC,MAAM,CAAC,qBAAqB,EAAE,WAAW,CAAC,CAAC;QAClF,MAAM,kBAAkB,GAAG,UAAU,CAAC,oBAAoB,CAAC,gBAAgB,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QACvG,eAAe,GAAG,kBAAkB,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC;IACzD,CAAC;IACD,OAAO,eAAe,CAAC;AACzB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ElementGeometry\n */\n\nimport { ColorDef, ElementGeometry, GeometryParams, TextAnnotationLeader, TextFrameStyleProps, TextStyleColor } from \"@itwin/core-common\";\nimport { CurveCurve, LineSegment3d, LineString3d, Loop, Path, Point3d, Transform, Vector3d } from \"@itwin/core-geometry\";\nimport { computeFrame } from \"./FrameGeometry\";\nimport { TextBlockLayout, TextStyleResolver } from \"./TextBlockLayout\";\n\n/**\n * Constructs and appends leader lines and their terminators to the provided geometry builder for a text annotation.\n *\n * This function processes an array of `TextAnnotationLeader` objects, computes their attachment points\n * relative to a text frame (or a default rectangular frame if none is provided), and appends the leader\n * line and terminator geometry to the builder. It also applies color overrides if specified\n * in the leader's style overrides.\n *\n * @param builder - The geometry builder to which the leader geometries will be appended.\n * @param leaders - An array of leader properties.\n * @param layout - The layout information for the text block, including its range.\n * @param transform - The transform to apply to the frame and leader geometry.\n * @param params - The geometry parameters, such as color, to use for the leader lines.\n * @param textStyleResolver - Resolver for text styles, used to obtain leader styles.\n * @param scaleFactor - The scale factor to apply to leader dimensions, usually comes from the `scaleFactor` of a [[Drawing]] element.\n * @returns `true` if at least one leader with a terminator was successfully appended; otherwise, `false`.\n * @beta\n */\nexport function appendLeadersToBuilder(builder: ElementGeometry.Builder, leaders: TextAnnotationLeader[], layout: TextBlockLayout, transform: Transform, params: GeometryParams, textStyleResolver: TextStyleResolver, scaleFactor: number): boolean {\n let result = true;\n const scaledBlockTextHeight = textStyleResolver.blockSettings.textHeight * scaleFactor;\n let frame: TextFrameStyleProps | undefined = textStyleResolver.blockSettings.frame;\n\n // If there is no frame, use a rectangular frame to compute the attachmentPoints for leaders.\n if (frame === undefined || frame.shape === \"none\") {\n frame = { shape: \"rectangle\" }\n }\n if (frame.shape === undefined || frame.shape === \"none\") return false;\n const frameCurve = computeFrame({ frame: frame.shape, range: layout.range, transform });\n\n for (const leader of leaders) {\n const leaderStyle = textStyleResolver.resolveSettings(leader.styleOverrides ?? {}, true);\n\n let effectiveColor: TextStyleColor = \"subcategory\";\n\n if (leaderStyle.leader.color === \"inherit\") {\n effectiveColor = leaderStyle.color;\n } else if (leaderStyle.leader.color !== \"subcategory\") {\n effectiveColor = leaderStyle.leader.color;\n }\n\n if (effectiveColor !== \"subcategory\") {\n params.lineColor = ColorDef.fromJSON(effectiveColor);\n result = result && builder.appendGeometryParamsChange(params);\n }\n\n const attachmentPoint = computeLeaderAttachmentPoint(leader, frameCurve, layout, transform);\n if (!attachmentPoint) return false;\n\n // Leader line geometry\n const leaderLinePoints: Point3d[] = [];\n\n leaderLinePoints.push(leader.startPoint)\n\n leader.intermediatePoints?.forEach((point) => {\n leaderLinePoints.push(point);\n });\n\n if (leaderStyle.leader.wantElbow) {\n const elbowLength = leaderStyle.leader.elbowLength * scaledBlockTextHeight;\n const elbowDirection = computeElbowDirection(attachmentPoint, frameCurve, elbowLength);\n if (elbowDirection)\n leaderLinePoints.push(attachmentPoint.plusScaled(elbowDirection, elbowLength))\n }\n\n leaderLinePoints.push(attachmentPoint)\n\n result = result && builder.appendGeometryQuery(LineString3d.create(leaderLinePoints));\n\n // Terminator geometry\n const terminatorDirection = Vector3d.createStartEnd(\n leaderLinePoints[0], leaderLinePoints[1]\n ).normalize();\n\n const termY = terminatorDirection?.unitCrossProduct(Vector3d.unitZ());\n if (!termY || !terminatorDirection) continue; // Assuming leaders without terminators is a valid case.\n const terminatorHeight = leaderStyle.leader.terminatorHeightFactor * scaledBlockTextHeight;\n const terminatorWidth = leaderStyle.leader.terminatorWidthFactor * scaledBlockTextHeight;\n const basePoint = leader.startPoint.plusScaled(terminatorDirection, terminatorWidth);\n const termPointA = basePoint.plusScaled(termY, terminatorHeight);\n const termPointB = basePoint.plusScaled(termY.negate(), terminatorHeight);\n result = result && builder.appendGeometryQuery(LineString3d.create([termPointA, leader.startPoint, termPointB]));\n\n }\n return result;\n}\n\n\n/**\n * Computes the direction vector for an \"elbow\" for leader based on the attachment point and a frame curve.\n * The elbow direction is determined by whether the attachment point is closer to the left or right side of the frame.\n * If the computed elbow would be tangent to the frame at the intersection, no elbow direction is returned.\n *\n * @param attachmentPoint - The point where the leader attaches.\n * @param frameCurve - The frame curve (either a Loop or Path) to which the leader is attached.\n * @param elbowLength - The length of the elbow segment to be created.\n * @returns The direction vector for the elbow, or `undefined` if the elbow would be tangent to the frame.\n * @beta\n */\nexport function computeElbowDirection(attachmentPoint: Point3d, frameCurve: Loop | Path, elbowLength: number): Vector3d | undefined {\n\n let elbowDirection: Vector3d | undefined;\n // Determine the direction based on the closest point's position relative to the frame\n const isCloserToLeft = Math.abs(attachmentPoint.x - frameCurve.range().low.x) < Math.abs(attachmentPoint.x - frameCurve.range().high.x);\n\n // Decide the direction: left (-X) or right (+X)\n elbowDirection = isCloserToLeft ? Vector3d.unitX().negate() : Vector3d.unitX();\n\n // Verify if the elbow is a tangent to the frame, if yes, do not create an elbow\n const elbowPoint = attachmentPoint.plusScaled(elbowDirection, elbowLength);\n const elbowLine = LineSegment3d.create(attachmentPoint, elbowPoint);\n // Find intersection points between the elbow and the frame\n const intersections = CurveCurve.intersectionXYZPairs(elbowLine, false, frameCurve, false);\n // As the elbow will intersect the frame only at one point, we can safely use the first intersection\n const intersection = intersections[0];\n const curveFraction = intersection.detailB.fraction;\n const derivative = intersection.detailB.curve?.fractionToPointAndDerivative(curveFraction);\n const tangent = derivative?.direction.normalize();\n const lineDirection = Vector3d.createStartEnd(elbowLine.point0Ref, elbowLine.point1Ref).normalize();\n if (tangent && lineDirection) {\n const dot = tangent.dotProduct(lineDirection);\n // If the tangent and line direction are aligned (dot product close to 1 or -1), it's tangent\n if (Math.abs(dot) > 0.999) {\n elbowDirection = undefined;\n }\n }\n return elbowDirection;\n}\n\n/**\n * Computes the attachment point for a leader line on a text annotation frame.\n *\n * The attachment point is determined based on the leader's attachment mode:\n * - `\"Nearest\"`: Finds the closest point on the frame curve to the leader's start point.\n * - `\"KeyPoint\"`: Uses a specific curve segment and fraction along that segment to determine the point.\n * - `\"TextPoint\"`: Calculates a point on the text layout (top/bottom, left/right) and projects it onto the frame curve.\n *\n * @param leader - The leader props.\n * @param frameCurve - The curve (Loop or Path) representing the annotation frame.\n * @param textLayout - The layout information for the text block.\n * @param transform - The transform applied to the text layout.\n * @returns The computed attachment point as a `Point3d`, or `undefined` if it cannot be determined.\n * @beta\n */\nexport function computeLeaderAttachmentPoint(\n leader: TextAnnotationLeader,\n frameCurve: Loop | Path,\n textLayout: TextBlockLayout,\n transform: Transform\n): Point3d | undefined {\n let attachmentPoint: Point3d | undefined;\n\n if (leader.attachment.mode === \"Nearest\") {\n attachmentPoint = frameCurve.closestPoint(leader.startPoint)?.point;\n } else if (leader.attachment.mode === \"KeyPoint\") {\n const curves = frameCurve.collectCurvePrimitives(undefined, false, true);\n const curveIndex = leader.attachment.curveIndex;\n const fraction = leader.attachment.fraction;\n if (curveIndex >= curves.length) {\n // If the curveIndex is invalid, use the last curve\n // This is a fallback to avoid out-of-bounds access\n attachmentPoint = curves[curves.length - 1].fractionToPoint(fraction);\n } else {\n attachmentPoint = curves[curveIndex].fractionToPoint(fraction);\n }\n } else { // attachment.mode=\"TextPoint\"\n let scaleDirection = transform.matrix.getColumn(0).negate(); // direction to draw a scaled line from text attachment point to find intersection point on frame\n let lineIndex: number;\n if (leader.attachment.position.includes(\"Top\")) {\n lineIndex = 0\n } else {\n lineIndex = textLayout.lines.length - 1\n }\n const lineRange = textLayout.lines[lineIndex].range;\n const lineOffset = textLayout.lines[lineIndex].offsetFromDocument;\n const origin = transform.multiplyPoint3d(Point3d.fromJSON(lineOffset));\n let attachmentPointOnText = origin.plusScaled(transform.matrix.getColumn(1), ((lineRange.yLength()) / 2));\n\n if (leader.attachment.position.includes(\"Right\")) {\n attachmentPointOnText = attachmentPointOnText.plusScaled(transform.matrix.getColumn(0), lineRange.xLength());\n scaleDirection = scaleDirection.negate();\n }\n // Find the nearest intersection point on the frame to get the correct attachment point\n // Extend the direction vector to create a target point far along the direction\n const targetPoint = attachmentPointOnText.plusScaled(scaleDirection, 1e6); // Scale the direction vector to a large value\n const intersectionLine = LineSegment3d.create(attachmentPointOnText, targetPoint);\n const closestPointDetail = CurveCurve.intersectionXYZPairs(intersectionLine, false, frameCurve, false);\n attachmentPoint = closestPointDetail[0]?.detailA.point;\n }\n return attachmentPoint;\n}"]}
|
|
1
|
+
{"version":3,"file":"LeaderGeometry.js","source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,CAAC;YAC7G,cAAc,GAAG,cAAc,CAAC,MAAM,EAAE,CAAC;QAC3C,CAAC;QACD,uFAAuF;QACvF,+EAA+E;QAC/E,MAAM,WAAW,GAAG,qBAAqB,CAAC,UAAU,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC,CAAC,8CAA8C;QACzH,MAAM,gBAAgB,GAAG,aAAa,CAAC,MAAM,CAAC,qBAAqB,EAAE,WAAW,CAAC,CAAC;QAClF,MAAM,kBAAkB,GAAG,UAAU,CAAC,oBAAoB,CAAC,gBAAgB,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QACvG,eAAe,GAAG,kBAAkB,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC;IACzD,CAAC;IACD,OAAO,eAAe,CAAC;AACzB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ElementGeometry\n */\n\nimport { ColorDef, ElementGeometry, FillDisplay, GeometryParams, TextAnnotationLeader, TextFrameStyleProps, TextStyleColor, TextStyleSettings } from \"@itwin/core-common\";\nimport { Angle, Arc3d, CurveCurve, CurvePrimitive, LineSegment3d, LineString3d, Loop, Path, Point3d, Transform, Vector3d } from \"@itwin/core-geometry\";\nimport { computeFrame } from \"./FrameGeometry\";\nimport { TextBlockLayout, TextStyleResolver } from \"./TextBlockLayout\";\n\n/**\n * Constructs and appends leader lines and their terminators to the provided geometry builder for a text annotation.\n *\n * This function processes an array of `TextAnnotationLeader` objects, computes their attachment points\n * relative to a text frame (or a default rectangular frame if none is provided), and appends the leader\n * line and terminator geometry to the builder. It also applies color overrides if specified\n * in the leader's style overrides.\n *\n * @param builder - The geometry builder to which the leader geometries will be appended.\n * @param leaders - An array of leader properties.\n * @param layout - The layout information for the text block, including its range.\n * @param transform - The transform to apply to the frame and leader geometry.\n * @param params - The geometry parameters, such as color, to use for the leader lines.\n * @param textStyleResolver - Resolver for text styles, used to obtain leader styles.\n * @param scaleFactor - The scale factor to apply to leader dimensions, usually comes from the `scaleFactor` of a [[Drawing]] element.\n * @returns `true` if at least one leader with a terminator was successfully appended; otherwise, `false`.\n * @beta\n */\nexport function appendLeadersToBuilder(builder: ElementGeometry.Builder, leaders: TextAnnotationLeader[], layout: TextBlockLayout, transform: Transform, params: GeometryParams, textStyleResolver: TextStyleResolver, scaleFactor: number): boolean {\n let result = true;\n const scaledBlockTextHeight = textStyleResolver.blockSettings.textHeight * scaleFactor;\n let frame: TextFrameStyleProps | undefined = textStyleResolver.blockSettings.frame;\n\n // If there is no frame, use a rectangular frame to compute the attachmentPoints for leaders.\n if (frame === undefined || frame.shape === \"none\") {\n frame = { shape: \"rectangle\" }\n }\n if (frame.shape === undefined || frame.shape === \"none\") return false;\n const frameCurve = computeFrame({ frame: frame.shape, range: layout.range, transform });\n\n for (const leader of leaders) {\n const leaderStyle = textStyleResolver.resolveSettings(leader.styleOverrides ?? {}, true);\n\n let effectiveColor: TextStyleColor = \"subcategory\";\n\n if (leaderStyle.leader.color === \"inherit\") {\n effectiveColor = leaderStyle.color;\n } else if (leaderStyle.leader.color !== \"subcategory\") {\n effectiveColor = leaderStyle.leader.color;\n }\n\n if (effectiveColor !== \"subcategory\") {\n params.lineColor = ColorDef.fromJSON(effectiveColor);\n result = result && builder.appendGeometryParamsChange(params);\n }\n\n const attachmentPoint = computeLeaderAttachmentPoint(leader, frameCurve, layout, transform);\n if (!attachmentPoint) return false;\n\n // Leader line geometry\n const leaderLinePoints: Point3d[] = [];\n\n leaderLinePoints.push(leader.startPoint)\n\n leader.intermediatePoints?.forEach((point) => {\n leaderLinePoints.push(point);\n });\n\n if (leaderStyle.leader.wantElbow) {\n const elbowLength = leaderStyle.leader.elbowLength * scaledBlockTextHeight;\n const elbowDirection = computeElbowDirection(attachmentPoint, frameCurve, elbowLength);\n if (elbowDirection)\n leaderLinePoints.push(attachmentPoint.plusScaled(elbowDirection, elbowLength))\n }\n\n leaderLinePoints.push(attachmentPoint)\n\n const terminatorDirection = Vector3d.createStartEnd(\n leaderLinePoints[0], leaderLinePoints[1]\n ).normalize();\n const terminatorWidth = leaderStyle.leader.terminatorWidthFactor * scaledBlockTextHeight;\n // Truncate the first segment of the leader lines to account for the arrowhead size when closedArrow (hollow triangle) terminatorShape is used.\n if (leaderStyle.leader.terminatorShape === \"closedArrow\") {\n if (terminatorDirection)\n leaderLinePoints[0] = leaderLinePoints[0].plusScaled(terminatorDirection, terminatorWidth);\n }\n\n result = result && builder.appendGeometryQuery(LineString3d.create(leaderLinePoints));\n\n if (leaderStyle.leader.terminatorShape !== \"none\") {\n // Terminator geometry\n if (!terminatorDirection) continue; // Assuming leaders without terminators is a valid case.\n result = result && createTerminatorGeometry(builder, leader.startPoint, terminatorDirection, params, leaderStyle, scaledBlockTextHeight);\n\n }\n\n }\n return result;\n}\n\n/**\n * Creates the geometry for a terminator at the end of a leader line.\n * @param builder The geometry builder to append the terminator geometry to.\n * @param point The starting point of the leader line.\n * @param dir The direction vector of the leader line.\n * @param params The geometry parameters to use for the terminator.\n * @param textStyleSettings The text style settings to use for the terminator.\n * @param textHeight The height of the text block.\n * @returns True if the geometry was successfully created, false otherwise.\n * @beta\n */\nexport function createTerminatorGeometry(builder: ElementGeometry.Builder, point: Point3d, dir: Vector3d, params: GeometryParams, textStyleSettings: TextStyleSettings, textHeight: number): boolean {\n\n let result = true;\n const termY = dir.unitCrossProduct(Vector3d.unitZ());\n if (!termY) return false; // If dir is parallel to Z, we can't create a terminator\n const terminatorHeight = textStyleSettings.leader.terminatorHeightFactor * textHeight;\n const terminatorWidth = textStyleSettings.leader.terminatorWidthFactor * textHeight;\n const terminatorHalfHeight = terminatorHeight / 2;\n const basePoint = point.plusScaled(dir, terminatorWidth);\n const point1 = basePoint.plusScaled(termY, terminatorHalfHeight);\n const point2 = basePoint.plusScaled(termY.negate(), terminatorHalfHeight);\n\n // Helper function to add fill parameters\n const addFillParams = () => {\n params.fillDisplay = FillDisplay.Always;\n result = result && builder.appendGeometryParamsChange(params);\n };\n\n // Helper function to create geometry entry\n const addGeometry = (content: CurvePrimitive, useLoop = false) => {\n const finalContent = useLoop ? Loop.create(content) : content;\n result = result && builder.appendGeometryQuery(finalContent);\n };\n\n switch (textStyleSettings.leader.terminatorShape) {\n case \"openArrow\": {\n const lineString = LineString3d.create([point1, point, point2]);\n addGeometry(lineString);\n break;\n }\n\n case \"closedArrow\": {\n const lineString = LineString3d.create([point1, point, point2, point1]);\n addGeometry(lineString);\n break;\n }\n\n case \"closedArrowFilled\": {\n addFillParams();\n const lineString = LineString3d.create([point1, point, point2, point1]);\n addGeometry(lineString, true);\n break;\n }\n\n case \"circle\": {\n const circle = Arc3d.createXY(point, terminatorHalfHeight);\n addGeometry(circle);\n break;\n }\n\n case \"circleFilled\": {\n addFillParams();\n const circle = Arc3d.createXY(point, terminatorHalfHeight);\n addGeometry(circle, true);\n break;\n }\n\n case \"slash\": {\n const normalizedVector = dir.normalize();\n if (!normalizedVector) throw new Error(\"Invalid reference vector for slash terminator.\");\n\n const rotatedVector = normalizedVector.rotateXY(Angle.createDegrees(45));\n const startPoint = point.plusScaled(rotatedVector, -terminatorHalfHeight);\n const endPoint = point.plusScaled(rotatedVector, terminatorHalfHeight);\n\n const slashLine = LineSegment3d.create(startPoint, endPoint);\n addGeometry(slashLine);\n break;\n }\n }\n\n return result;\n};\n\n\n/**\n * Computes the direction vector for an \"elbow\" for leader based on the attachment point and a frame curve.\n * The elbow direction is determined by whether the attachment point is closer to the left or right side of the frame.\n * If the computed elbow would be tangent to the frame at the intersection, no elbow direction is returned.\n *\n * @param attachmentPoint - The point where the leader attaches.\n * @param frameCurve - The frame curve (either a Loop or Path) to which the leader is attached.\n * @param elbowLength - The length of the elbow segment to be created.\n * @returns The direction vector for the elbow, or `undefined` if the elbow would be tangent to the frame.\n * @beta\n */\nexport function computeElbowDirection(attachmentPoint: Point3d, frameCurve: Loop | Path, elbowLength: number): Vector3d | undefined {\n\n let elbowDirection: Vector3d | undefined;\n // Determine the direction based on the closest point's position relative to the frame\n const isCloserToLeft = Math.abs(attachmentPoint.x - frameCurve.range().low.x) < Math.abs(attachmentPoint.x - frameCurve.range().high.x);\n\n // Decide the direction: left (-X) or right (+X)\n elbowDirection = isCloserToLeft ? Vector3d.unitX().negate() : Vector3d.unitX();\n\n // Verify if the elbow is a tangent to the frame, if yes, do not create an elbow\n const elbowPoint = attachmentPoint.plusScaled(elbowDirection, elbowLength);\n const elbowLine = LineSegment3d.create(attachmentPoint, elbowPoint);\n // Find intersection points between the elbow and the frame\n const intersections = CurveCurve.intersectionXYZPairs(elbowLine, false, frameCurve, false);\n // As the elbow will intersect the frame only at one point, we can safely use the first intersection\n const intersection = intersections[0];\n const curveFraction = intersection.detailB.fraction;\n const derivative = intersection.detailB.curve?.fractionToPointAndDerivative(curveFraction);\n const tangent = derivative?.direction.normalize();\n const lineDirection = Vector3d.createStartEnd(elbowLine.point0Ref, elbowLine.point1Ref).normalize();\n if (tangent && lineDirection) {\n const dot = tangent.dotProduct(lineDirection);\n // If the tangent and line direction are aligned (dot product close to 1 or -1), it's tangent\n if (Math.abs(dot) > 0.999) {\n elbowDirection = undefined;\n }\n }\n return elbowDirection;\n}\n\n/**\n * Computes the attachment point for a leader line on a text annotation frame.\n *\n * The attachment point is determined based on the leader's attachment mode:\n * - `\"Nearest\"`: Finds the closest point on the frame curve to the leader's start point.\n * - `\"KeyPoint\"`: Uses a specific curve segment and fraction along that segment to determine the point.\n * - `\"TextPoint\"`: Calculates a point on the text layout (top/bottom, left/right) and projects it onto the frame curve.\n *\n * @param leader - The leader props.\n * @param frameCurve - The curve (Loop or Path) representing the annotation frame.\n * @param textLayout - The layout information for the text block.\n * @param transform - The transform applied to the text layout.\n * @returns The computed attachment point as a `Point3d`, or `undefined` if it cannot be determined.\n * @beta\n */\nexport function computeLeaderAttachmentPoint(\n leader: TextAnnotationLeader,\n frameCurve: Loop | Path,\n textLayout: TextBlockLayout,\n transform: Transform\n): Point3d | undefined {\n let attachmentPoint: Point3d | undefined;\n\n if (leader.attachment.mode === \"Nearest\") {\n attachmentPoint = frameCurve.closestPoint(leader.startPoint)?.point;\n } else if (leader.attachment.mode === \"KeyPoint\") {\n const curves = frameCurve.collectCurvePrimitives(undefined, false, true);\n const curveIndex = leader.attachment.curveIndex;\n const fraction = leader.attachment.fraction;\n if (curveIndex >= curves.length) {\n // If the curveIndex is invalid, use the last curve\n // This is a fallback to avoid out-of-bounds access\n attachmentPoint = curves[curves.length - 1].fractionToPoint(fraction);\n } else {\n attachmentPoint = curves[curveIndex].fractionToPoint(fraction);\n }\n } else { // attachment.mode=\"TextPoint\"\n let scaleDirection = transform.matrix.getColumn(0).negate(); // direction to draw a scaled line from text attachment point to find intersection point on frame\n let lineIndex: number;\n if (leader.attachment.position.includes(\"Top\")) {\n lineIndex = 0\n } else {\n lineIndex = textLayout.lines.length - 1\n }\n const lineRange = textLayout.lines[lineIndex].range;\n const lineOffset = textLayout.lines[lineIndex].offsetFromDocument;\n const origin = transform.multiplyPoint3d(Point3d.fromJSON(lineOffset));\n let attachmentPointOnText = origin.plusScaled(transform.matrix.getColumn(1), ((lineRange.yLength()) / 2));\n\n if (leader.attachment.position.includes(\"Right\")) {\n attachmentPointOnText = attachmentPointOnText.plusScaled(transform.matrix.getColumn(0), lineRange.xLength());\n scaleDirection = scaleDirection.negate();\n }\n // Find the nearest intersection point on the frame to get the correct attachment point\n // Extend the direction vector to create a target point far along the direction\n const targetPoint = attachmentPointOnText.plusScaled(scaleDirection, 1e6); // Scale the direction vector to a large value\n const intersectionLine = LineSegment3d.create(attachmentPointOnText, targetPoint);\n const closestPointDetail = CurveCurve.intersectionXYZPairs(intersectionLine, false, frameCurve, false);\n attachmentPoint = closestPointDetail[0]?.detailA.point;\n }\n return attachmentPoint;\n}"]}
|
|
@@ -231,7 +231,7 @@ export declare class TextAnnotation3d extends GraphicalElement3d {
|
|
|
231
231
|
* Uses the same semantics as [ECVersion]($ecschema-metadata).
|
|
232
232
|
* @internal
|
|
233
233
|
*/
|
|
234
|
-
export declare const TEXT_STYLE_SETTINGS_JSON_VERSION = "1.0.
|
|
234
|
+
export declare const TEXT_STYLE_SETTINGS_JSON_VERSION = "1.0.1";
|
|
235
235
|
/** Arguments supplied when creating an [[AnnotationTextStyle]].
|
|
236
236
|
* @beta
|
|
237
237
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextAnnotationElement.d.ts","sourceRoot":"","sources":["../../../src/annotations/TextAnnotationElement.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,wBAAwB,EAAe,IAAI,EAAE,SAAS,EAAE,cAAc,EAA4E,kBAAkB,EAAe,gBAAgB,EAAe,gBAAgB,EAAkB,cAAc,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,sBAAsB,EAA8B,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACjc,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAW,kBAAkB,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpI,OAAO,EAAgB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAG/D,OAAO,EAA+B,oCAAoC,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAClI,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAGnF;;;EAGE;AACF,eAAO,MAAM,4BAA4B,UAAU,CAAC;AA0CpD;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,aAAa,CAAC,mBAAmB,CAAC,GAAG,SAAS,CAIhH;AAgBD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B,CAAC,iBAAiB,EAAE,UAAU,EAAE,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,UAAU,CAAC;qBA+B5F,QAAQ,CAAC,OAAO,EAAE,yBAAyB,EAAE,QAAQ,EAAE,wBAAwB,EAAE,QAAQ,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC;CAkBpK"}
|
|
@@ -437,12 +437,16 @@ function updateTextBlocks(elem, textBlocks) {
|
|
|
437
437
|
* Uses the same semantics as [ECVersion]($ecschema-metadata).
|
|
438
438
|
* @internal
|
|
439
439
|
*/
|
|
440
|
-
|
|
440
|
+
// 1.0.1 - Added terminatorShapes for leaders
|
|
441
|
+
export const TEXT_STYLE_SETTINGS_JSON_VERSION = "1.0.1";
|
|
441
442
|
function migrateTextStyleSettings(oldData) {
|
|
442
443
|
if (oldData.version === TEXT_STYLE_SETTINGS_JSON_VERSION)
|
|
443
444
|
return oldData.data;
|
|
444
|
-
//
|
|
445
|
-
|
|
445
|
+
// Migrate from 1.0.0 to 1.0.1
|
|
446
|
+
if (oldData.data.leader && !oldData.data.leader.terminatorShape) {
|
|
447
|
+
oldData.data.leader.terminatorShape = TextStyleSettings.defaultProps.leader.terminatorShape;
|
|
448
|
+
}
|
|
449
|
+
return oldData.data;
|
|
446
450
|
}
|
|
447
451
|
/**
|
|
448
452
|
* The definition element that holds text style information.
|