37 lines
813 B
C#
37 lines
813 B
C#
using System;
|
|
using System.Linq;
|
|
|
|
using Autodesk.AutoCAD.DatabaseServices;
|
|
using Autodesk.AutoCAD.Geometry;
|
|
namespace Szmedi.CADkits;
|
|
|
|
public readonly struct TextWithPosition
|
|
{
|
|
public ObjectId ObjectId { get; }
|
|
|
|
public Point3d Position { get; }
|
|
|
|
public string TextContent { get; }
|
|
|
|
public TextWithPosition(ObjectId id, Point3d pos, string content)
|
|
{
|
|
ObjectId = id;
|
|
Position = pos;
|
|
TextContent = content;
|
|
}
|
|
}
|
|
|
|
// 用于通用存储 地形点(块或点实体)的信息
|
|
public readonly struct TerrainEntityInfo
|
|
{
|
|
public ObjectId ObjectId { get; }
|
|
public Point3d Position { get; }
|
|
public string Handle { get; }
|
|
|
|
public TerrainEntityInfo(ObjectId id, Point3d pos)
|
|
{
|
|
ObjectId = id;
|
|
Position = pos;
|
|
Handle = id.Handle.Value.ToString();
|
|
}
|
|
} |