-
-
Notifications
You must be signed in to change notification settings - Fork 155
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
The TextEntity objects have incorrect visual aspect when VerticalAlignment and HorizontalAlignment properties are set in the given way.
To Reproduce
Use the following code:
using ACadSharp;
using ACadSharp.Entities;
using ACadSharp.IO;
using CSMath;
var doc = new CadDocument();
var text = new TextEntity
{
Value = "My Text Content",
InsertPoint = new XYZ(0, 0, 0),
AlignmentPoint = new XYZ(0, 0, 0),
Height = 2,
VerticalAlignment = TextVerticalAlignmentType.Middle, //this line generates a problem with dwg files
HorizontalAlignment = TextHorizontalAlignment.Center //and this line also generates a problem dwg files
};
doc.ModelSpace.Entities.Add(text);
using (var dwgWriter = new DwgWriter(@"c:\dev\dwgFileIncorrectBehavior.dwg", doc))
{
dwgWriter.Write();
}
using (var dxfWriter = new DxfWriter(@"c:\dev\dxfFileAwesome.dxf", doc, false))
{
dxfWriter.Write();
}
Two files are going to be created. The dxf file works as expected. The dwg file has the visual issue.
Print of dxf file on BricsCad:
Print of dwg file on BricsCad:
Expected behavior
The TextEntity should have on dwg file the same visual aspect as in the dxf file (centralized).
Additional context
The dwg isn't all incorrect. If the TextEntity objects are moved, the expected behavior is shown (the TextEntity start to be visually is centralized):
Print after using the command MOVE on the TextEntity on the dwg file:
Release needed
- Yes, using the Nuget package.
- No, using the github repo.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working