a1f392a33b
* wip * feat: data extraction from db * Fallback conversions * Fix line segments * Fix: do not skip empty values * Remove claude generated receive boilerplates and civil related extractor * Fix compile errors and custom assembly resolver * Guids for bundle * Nuget * Use TagValue as object name * add plant3d to slnx (#1347) * add plant3d to slnx * format * and the local (#1348) * Resolve comments * final comments * lockfiles * don't swallow image exception --------- Co-authored-by: oguzhankoral <oguzhankoral@gmail.com> Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com> Co-authored-by: Jedd Morgan <45512892+JR-Morgan@users.noreply.github.com>
51 lines
1.5 KiB
C#
51 lines
1.5 KiB
C#
using Autodesk.AutoCAD.DatabaseServices;
|
|
using Microsoft.Extensions.Logging;
|
|
using Speckle.Connectors.Autocad.HostApp;
|
|
using Speckle.Connectors.Autocad.Operations.Send;
|
|
using Speckle.Connectors.Common.Caching;
|
|
using Speckle.Converters.Autocad;
|
|
using Speckle.Converters.Common;
|
|
using Speckle.Sdk.Logging;
|
|
using Speckle.Sdk.Models.Collections;
|
|
|
|
namespace Speckle.Connectors.Plant3dShared.Operations.Send;
|
|
|
|
public sealed class Plant3dRootObjectBuilder : AutocadRootObjectBaseBuilder
|
|
{
|
|
private readonly AutocadLayerUnpacker _layerUnpacker;
|
|
|
|
public Plant3dRootObjectBuilder(
|
|
AutocadLayerUnpacker layerUnpacker,
|
|
IRootToSpeckleConverter converter,
|
|
IConverterSettingsStore<AutocadConversionSettings> converterSettings,
|
|
ISendConversionCache sendConversionCache,
|
|
AutocadInstanceUnpacker instanceObjectManager,
|
|
AutocadMaterialUnpacker materialUnpacker,
|
|
AutocadColorUnpacker colorUnpacker,
|
|
AutocadGroupUnpacker groupUnpacker,
|
|
ILogger<AutocadRootObjectBuilder> logger,
|
|
ISdkActivityFactory activityFactory
|
|
)
|
|
: base(
|
|
converter,
|
|
converterSettings,
|
|
sendConversionCache,
|
|
instanceObjectManager,
|
|
materialUnpacker,
|
|
colorUnpacker,
|
|
groupUnpacker,
|
|
logger,
|
|
activityFactory
|
|
)
|
|
{
|
|
_layerUnpacker = layerUnpacker;
|
|
}
|
|
|
|
public override (Collection, LayerTableRecord?) CreateObjectCollection(Entity entity, Transaction tr)
|
|
{
|
|
Layer layer = _layerUnpacker.GetOrCreateSpeckleLayer(entity, tr, out LayerTableRecord? autocadLayer);
|
|
|
|
return (layer, autocadLayer);
|
|
}
|
|
}
|