Smartpart: Text aren't correctly mirrorred (with scale2 command))

Balises:

Hi everybody,

In the Allplan 2012.1-4, we found something strange mirrorring text using SCALE2 command. The text mirrorred aren't symmetrical. I do two test:

- Test-1: The anchor value is 8 (middle low, insert point)
- Test-2: the anchor value is 5 (center, insert point)

In the two test I draw one square with a diagonal line, to show that the geometrical elements are correctly mirrorred. But the mirrorred text aren't correct: the anchors of the mirrorred texts mismatched with the anchors of the original text.

This is the script of the Test-2:

!------ Call Layout
GOSUB "lines_test"
GOSUB "text"

TRANS2 REF_X , 0
SCALE2 -1 , 0
GOSUB "lines_test"
GOSUB "text"
RESTORE 2
END
!------ Subscript
"lines_test":
rect2 0,0,0.1,0.1
line2 0,0,0.1,0.1
return
"text":
DEFINE STYLE "text_50" arial , 2 , 5 , 1
STYLE text_50
TEXT2 0.2 , 0 , text_parameter
RETURN

Thanks a lot!
Xavi

Xavier Coll • Architect, Project Manager I+D, BIM Manager, BIM Auditor
EiPM • http://www.eipm.es/en/

Pièces-jointes (2)

Type: image/jpeg
Téléchargé 426 fois
Size: 168,37 KiB
Type: application/octet-stream
Téléchargé 1307 fois
Size: 5,22 KiB

Hi everybody,

After trying several tests about this "issue", those are the conclusions: There aren't problems in Smartparts (not directly problems). In SmartParts, the order to do 2D symmetry is SCALE2, and it do perfect symmetry with geometric elements, but instead, with texts the SCALE2 don't do symmetry: the SCALE2 rotates the text 180 degrees. And Allplan gives incorrect results when rotates 180 degrees the texts with only one line.

Well, the problem of Allplan when rotates 180 degrees single-line text, is the relative position of the text respect the anchor points of the text: for example, if you insert a single-line text, using the center point as a point of insertion, it can demonstrate that the insertion point is not centered respect the upper anchor points and lower anchors points. Then, If we rotate this text 180 degrees from the center insertion point, the text will be displaced, as happens with the command SCALE2 in the SmartPart.

Obviusly in Allplan, when we want to do a symmetry of a text, we use the symmetry order, that it does perfectly. But in Smartparts, if anybody want to do a symmetry with the command SCALE2 isn't possible to do it correctly. Well, really is possible to do it using SCALE2, but is adding more script complexity, by an Allplan incorrection. Or perhaps will be possible to do it easily, adding in smartparts a REAL symmetry command for texts, like the Allplan symmetry command.

Regards,
Xavi

Xavier Coll • Architect, Project Manager I+D, BIM Manager, BIM Auditor
EiPM • http://www.eipm.es/en/

Hi Xavi,

...it isn't correct, that mirror of text rotates it !
In Allplan the mirroring of text do following:
1. mirror the bounding-box of the text
2. the insertation point is set to the corresponding point of mirrored bounding box.
(for instance the "lower left" stays "lower left" at mirrord text!)

Thats may be not completely correct. I would expect, that the insertation point is also mirrored relative to bounding box. For horizontal mirroring is means, that "lower left" is changed to "lower right".

In SmartParts only the insertation point position is mirrored! (without adapting the insertation point!)

It could be fixed, but in general mirroring of text isn't a good idea ...

Regards.

Jörg

First of all, thanks for your answer, Jörg :-)

I think that the mirrorring system of Allplan is correct. Perhaps will be interesting to add the possibility to config how the Allplan mirror the texts.

About the text mirrorring in Smartparts, is really strange, because all the final results to mirror a text inside smartpart using SCALE2 are like rotate a text in Allplan. And the problem to mirrorring in Smartpart is that all the points of the bounding box or the insert point of the "mirrorred" text aren't aligned with original text, very strange.

I send the NDW file, and one captured image to compare smartpart mirrorring text, agains text rotated in Allplan. The final results are the same..

But the most important question, the final goal, is how to mirror a text in smartpart with the text mirrorred aligned with the original text :-)

Thanks a lot!
regards,
Xavi

Xavier Coll • Architect, Project Manager I+D, BIM Manager, BIM Auditor
EiPM • http://www.eipm.es/en/

Pièces-jointes (2)

Type: image/jpeg
Téléchargé 363 fois
Size: 262,97 KiB
Type: application/octet-stream
Téléchargé 1243 fois
Size: 480,08 KiB

Hi Xavi,

the text in Allplan is not a really geometry object!
For example: Scaling don't increase or reduce the text height/length, because the
height is a property of the style! There is a special function for doing this!
Also a mirror about the y-axis has not the result, that the chars are reversed :-)

Because of all this special logic we have not tried to implement the scaling inside the SmartParts.
Only the rotation with ROT2 x,y works, but at doing that, the text remain readable from bottom!

So If you want place text, it is a good idea to calc the insert point ,text height and the anchor
inside the script seperatly, and create always straight aligned text.

BTW, the SmartParts are not designed to create tons of text! (We currently don't support multiline text)
The focus is at geometrical objects...

Regards.

Jörg

Hi Jörg,

The texts is one of the battles in Allplan. Accepting those text limitations in Allplan and Smartparts, I think that one way to solve the mirrorring problem directly in Smartparts is to correct the distance relationships between the bounding box of a single-line text and his insert point.

For example of the image that I add with this post, the insert point of the text is centered correctly between the horizontal bounding box Anchors (X1=X2) , but is not correctly centered between the vertical bounding box anchors (Y1?Y2).

When this issue will be solved, (if really is a issue) then will no exist any problem to mirrorring text correctly and directly with SCALE2 command in Smartparts, at least with the text inserted by the center point. :-)

Regards,
Xavi

Xavier Coll • Architect, Project Manager I+D, BIM Manager, BIM Auditor
EiPM • http://www.eipm.es/en/

Pièces-jointes (1)

Type: image/jpeg
Téléchargé 413 fois
Size: 135,01 KiB

https://campus.allplan.com/ utilise des cookies  -  Plus d'informations

Accepter