Skip to content

Commit

Permalink
moves pointcloud converter to top level (#349)
Browse files Browse the repository at this point in the history
  • Loading branch information
clairekuang authored Nov 5, 2024
1 parent 9290261 commit 558a16d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@
<Compile Include="$(MSBuildThisFileDirectory)ToSpeckle\Raw\Geometry\MeshListConversionToSpeckle.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToSpeckle\Raw\Geometry\NurbsSplineToSpeckleConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToSpeckle\Raw\Geometry\PlaneToSpeckleConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToSpeckle\Raw\Geometry\PointCloudToSpeckleConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToSpeckle\Raw\Geometry\PointConversionToSpeckle.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToSpeckle\Raw\Geometry\PolylineToSpeckleConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToSpeckle\Raw\Geometry\VectorToSpeckleConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToSpeckle\Raw\Geometry\XyzConversionToPoint.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToSpeckle\Raw\MaterialAsSpeckleMaterialConversionToSpeckle.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToSpeckle\Raw\MaterialQuantitiesToSpeckle.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToSpeckle\TopLevel\PointcloudTopLevelConverterToSpeckle.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToSpeckle\TopLevel\GridTopLevelConverterToSpeckle.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToSpeckle\TopLevel\LevelTopLevelConverterToSpeckle.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToSpeckle\Raw\LocationConversionToSpeckle.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@

namespace Speckle.Converters.RevitShared.ToSpeckle;

public class PointCloudToSpeckleConverter : ITypedConverter<DB.PointCloudInstance, SOG.Pointcloud>
[NameAndRankValue(nameof(DB.PointCloudInstance), NameAndRankValueAttribute.SPECKLE_DEFAULT_RANK)]
public sealed class PointcloudTopLevelConverterToSpeckle
: BaseTopLevelConverterToSpeckle<DB.PointCloudInstance, SOG.Pointcloud>
{
private readonly IConverterSettingsStore<RevitConversionSettings> _converterSettings;
private readonly ITypedConverter<DB.XYZ, SOG.Point> _xyzToPointConverter;
private readonly ITypedConverter<DB.BoundingBoxXYZ, SOG.Box> _boundingBoxConverter;

public PointCloudToSpeckleConverter(
public PointcloudTopLevelConverterToSpeckle(
IConverterSettingsStore<RevitConversionSettings> converterSettings,
ITypedConverter<DB.XYZ, SOG.Point> xyzToPointConverter,
ITypedConverter<DB.BoundingBoxXYZ, SOG.Box> boundingBoxConverter
Expand All @@ -21,7 +23,7 @@ public PointCloudToSpeckleConverter(
_boundingBoxConverter = boundingBoxConverter;
}

public SOG.Pointcloud Convert(DB.PointCloudInstance target)
public override SOG.Pointcloud Convert(DB.PointCloudInstance target)
{
var boundingBox = target.get_BoundingBox(null!);
using DB.Transform transform = target.GetTransform();
Expand Down

0 comments on commit 558a16d

Please sign in to comment.