Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text Leaders #7830

Open
Josh-Schifter opened this issue Mar 12, 2025 · 4 comments
Open

Text Leaders #7830

Josh-Schifter opened this issue Mar 12, 2025 · 4 comments

Comments

@Josh-Schifter
Copy link
Contributor

Related to Issue: TextBox

Summary:

Propose to add leaders as an optional feature of TextAnnotation2d/3d elements. This proposal aims to avoid the problems we had with MicroStation 'Notes' which were made of multiple related elements.

Image

Detailed proposal:

  • Add a new property to TextAnnotation2d/3d 'Leaders' to store properties related to array of leaders.
  • Each member of the array would store information describing a leader (see below)
  • Store leader styling information in Text Style.
  • TextAnnotation2d/3d geometry stream should include the leader geometry

For each leader, need to store:

  • Attachment point stored as a string (ex. "MiddleRight"). This will be related to the shape of the Text Frame.
  • Target point stored as Point3d.
  • Overrides for styling properties such as color, terminator shape and size, curve type (ex. line, curve, etc.)
  • ElementDrivesElement relationship to the target element.

The Drawing Production team would like to do the implementation.

@pmconne, @jffmarker, @claudiaareneee , @SheetalNair , @Alfonso-Martello

@Josh-Schifter
Copy link
Contributor Author

Josh-Schifter commented Mar 12, 2025

How I see the pros and cons of this proposal vs. the alternative.

Option 1 (this proposal): A single element combining text, frame, and leaders:

Pro Con
  • Geometry generation is centralized
  • Easier to implement manipulation dynamics
  • Only need relationship to ‘driving’ elements, not between leader and text
  • Clear relationship between leader and Text Style
  • One text element ‘driven’ by N other elements
  • Text element has to store more information [leader attachment point, association info, additional data for multisegment leaders]
  • All code changes for leaders have to be done in core packages.

Option 2 (alternative to this proposal): A new element for just a single leader:

Pro Con
  • Each leader only has two relationships (no more)
  • Decoupled
  • Heavier reliance on relationships
  • When user deletes text we must delete all leaders
  • Need to prevent move, rotate tool for leader element

@pmconne
Copy link
Member

pmconne commented Mar 17, 2025

Attachment point stored as a string (ex. "MiddleRight"). This will be related to the shape of the Text Frame.

So users can't choose any point on the frame shape / bounding box - they are restricted to a small set of options?
How does it work for non-rectangular frames (clouds, ovals, pentagons, triangles)? e.g., what do "top-left" and "top-right" mean for a triangular frame like 🔺 ?

Could something like specifying the attachment point as the fraction along the curve representing the frame better support arbitrary attachment points and various frame shapes?

@pmconne
Copy link
Member

pmconne commented Mar 17, 2025

I lean toward Option 1. It can make sense for a text annotation to be a BIS object. It doesn't make much sense for a leader to be a BIS object.

@Josh-Schifter
Copy link
Contributor Author

I think the available options for attachment point might vary per frame. I'm not sure of the details. Compared to MicroStation, I'd like to consider adding one new attachment point called "nearest".

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants