Story: How I got lost in graphical interface when dealing with labels - HiStructClient/femcad-doc GitHub Wiki

How I got lost in graphical interface when dealing with labels

I was about to create labels and dimension lines of a particular frame structure. It was quite easy to define nice labels of columns and rafters with all the necessary information. But why the hell are they not displayed in FemCad? I was asking this question myself repeatedly. Unfortunately, I wasn't able to solve this issue by myself, I realized afterwards. So, here is the explanation and a few more tips to avoid your confusion is similar situation.

The basic graphical interface of FemCad does not show any texts - we rather call them labels since numbers of dimension lines are nothing else than labels again. Therefore you can see any structure, line or whatever, but without numbers or letters: Once you press right-mouse-button and switch to API, it does the trick and all labels are displayed immediatelly: You can switch back to OpenGL by the same mouse click, if needed. Here you can see all labels, check their positions, styles, font sizes etc. But please keep in mind that the resulting view - in web browser - is third, another API for rendering graphics - WebGL. Therefore the result you see online is not identical to what you arrange in FemCad.

The main difference is that labels in FemCad are automatically rotated so that they can be read (API simply knows the direction of readers eyes and can change the coordinate system so that the text is readable). This means that even fine arrangement in FemCad can show wrong labels in WebGL. This feature of FemCad, once meant to help the user, might be an obstacle sometimes. One have to keep in mind this and carefully define local coordinate system of labels.

Coordinate system of label should be defined with respect to the following:

  • text is written in XY plane
  • X axis defines the line of text, reading is possible in direction of +X
  • Y axis defines the direction "up", next row of text is heading in -Y direction
  • we watch the text counter-direction of +Z axis, Z axis is heading towards our eyes