Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/ACadSharp/Entities/Mechanical/AcmBalloon.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using CSMath;

namespace ACadSharp.Entities.Mechanical;

public class AcmBalloon : ProxyDataEntity
{
public override ObjectType ObjectType { get { return ObjectType.UNLISTED; } }

public override void ApplyTransform(Transform transform)
{
throw new System.NotImplementedException();
}

public override BoundingBox GetBoundingBox()
{
throw new System.NotImplementedException();
}
}
18 changes: 18 additions & 0 deletions src/ACadSharp/Entities/Mechanical/AcmPartList.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using CSMath;

namespace ACadSharp.Entities.Mechanical;

public class AcmPartList : ProxyDataEntity
{
public override ObjectType ObjectType { get { return ObjectType.UNLISTED; } }

public override void ApplyTransform(Transform transform)
{
throw new System.NotImplementedException();
}

public override BoundingBox GetBoundingBox()
{
throw new System.NotImplementedException();
}
}
22 changes: 22 additions & 0 deletions src/ACadSharp/Entities/Mechanical/AcmPartRef.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using CSMath;

namespace ACadSharp.Entities.Mechanical;

public class AcmPartRef : ProxyDataEntity
{
public override ObjectType ObjectType { get { return ObjectType.UNLISTED; } }

public XYZ Position { get; internal set; }

public double Radius { get; internal set; }

public override void ApplyTransform(Transform transform)
{
throw new System.NotImplementedException();
}

public override BoundingBox GetBoundingBox()
{
throw new System.NotImplementedException();
}
}
8 changes: 8 additions & 0 deletions src/ACadSharp/Entities/Mechanical/ProxyDataEntity.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using ACadSharp.Entities.ProxyGraphics;

namespace ACadSharp.Entities.Mechanical;

public abstract class ProxyDataEntity : Entity
{
public IProxyGraphic[] ProxyGraphics { get; set; }
}
1 change: 1 addition & 0 deletions src/ACadSharp/Entities/ProxyEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public class ProxyEntity : Entity, IProxy
//An object ID(multiple entries can appear) (optional)

//94 0 (indicates end of object ID section)

/// <inheritdoc/>
public ACadVersion Version { get; set; }

Expand Down
41 changes: 41 additions & 0 deletions src/ACadSharp/Entities/ProxyGraphics/GraphicsType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
namespace ACadSharp.Entities.ProxyGraphics;

public enum GraphicsType
{
Unknown = 0,
Extents = 1,
Circle = 2,
CirclePt3 = 3,
CircularArc = 4,
CircularArc3Pt = 5,
Polyline = 6,
Polygon = 7,
Mesh = 8,
Shell = 9,
Text = 10,
Text2 = 11,
XLine = 12,
Ray = 13,
SubentColor = 14,
SubentLayer = 16,
SubentLineType = 18,
SubentMarker = 19,
SubentFillon = 20,
SubentTrueColor = 22,
SubentLineWeight = 23,
SubentLineTypeScale = 24,
SubentThickness = 25,
SubentPlotStyleName = 26,
PushClip = 27,
PopClip = 28,
PushModelTransform = 29,
PushModelTransform2 = 30,
PophModelTransform = 31,
PolylineWithNormal = 32,
LwPolyine = 33,
SubEntityMaterial = 34,
SubEntityMapper = 35,
UnicodeText = 36,
Unknown37 = 37,
UnicodeText2 = 38,//No code specified
}
5 changes: 5 additions & 0 deletions src/ACadSharp/Entities/ProxyGraphics/IProxyGraphic.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace ACadSharp.Entities.ProxyGraphics;

public interface IProxyGraphic;

public class ProxyEntityUnsupported : IProxyGraphic;
10 changes: 10 additions & 0 deletions src/ACadSharp/Entities/ProxyGraphics/ProxyCircle.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using CSMath;

namespace ACadSharp.Entities.ProxyGraphics;

public class ProxyCircle : IProxyGraphic
{
public XYZ Center { get; set; }
public double Radius { get; set; }
public XYZ Normal { get; set; }
}
8 changes: 8 additions & 0 deletions src/ACadSharp/Entities/ProxyGraphics/ProxyPolyline.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using CSMath;

namespace ACadSharp.Entities.ProxyGraphics;

public class ProxyPolyline : IProxyGraphic
{
public XYZ[] Points { get; set; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using CSMath;

namespace ACadSharp.Entities.ProxyGraphics;

public class ProxyPushModelTransform : IProxyGraphic
{
public Matrix4 TransformationMatrix { get; set; }
}
46 changes: 46 additions & 0 deletions src/ACadSharp/Entities/ProxyGraphics/ProxyText.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
using CSMath;

namespace ACadSharp.Entities.ProxyGraphics;

public class ProxyText : IProxyGraphic
{
public XYZ StartPoint { get; set; }
public XYZ Normal { get; set; }
public XYZ TextDirection { get; set; }
public string Text { get; set; }

/// <summary>
/// The length of the text in characters, or -1 if the text is zero terminated
/// </summary>
public int TextLength { get; set; } // The text length is often != -1 even if the string is zero terminated?

/// <summary>
/// If <see langword="true"/>, special patterns e.g. %% are not supposed to be interpreted
/// </summary>
public bool IsRaw { get; set; }
public double Height { get; set; }
public double WidthFactor { get; set; }
public double ObliqueAngle { get; set; }
public double TrackingPercentage { get; set; }

public bool IsBackwards { get; set; }
public bool IsUpsideDown { get; set; }
public bool IsVertical { get; set; }
public bool IsUnderlined { get; set; }
public bool IsOverlined { get; set; }

public TrueTypeFontDescriptor FontDescriptor { get; set; }

public string BigFontFilename { get; set; }
}

public class TrueTypeFontDescriptor
{
public bool IsBold { get; set; }
public bool IsItalic { get; set; }
public byte Charset { get; set; }
public byte PitchAndFamily { get; set; }

public string Typeface { get; set; }
public string FontFilename { get; set; }
}
9 changes: 9 additions & 0 deletions src/ACadSharp/IO/DWG/DwgStreamReaders/DwgMergedReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,15 @@ public string ReadVariableText()
return this._textReader.ReadVariableText();
}

public string ReadPaddedUnicodeString()
{
//Handle the text section if is empty
if (this._textReader.IsEmpty)
return string.Empty;

return this._textReader.ReadVariableText();
}

public ushort ResetShift()
{
return this._mainReader.ResetShift();
Expand Down
Loading
Loading