Skip to content

Commit

Permalink
use less nullables and revit root properly
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhathcock committed Jun 27, 2024
1 parent 433aacf commit 1d9a36d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Autodesk.Revit.DB;
using Speckle.Autofac.DependencyInjection;
using Speckle.Converters.Common;
using Speckle.Converters.Common.DependencyInjection;
using Speckle.Converters.RevitShared;
using Speckle.Converters.RevitShared.Helpers;
Expand All @@ -13,7 +12,7 @@ public class RevitConverterModule : ISpeckleModule
{
public void Load(SpeckleContainerBuilder builder)
{
builder.AddConverterCommon<RootToSpeckleConverter, RevitToSpeckleUnitConverter, ForgeTypeId>();
builder.AddConverterCommon<RevitRootToHostConverter, RevitToSpeckleUnitConverter, ForgeTypeId>();
builder.AddSingleton(new RevitContext());

// POC: do we need ToSpeckleScalingService as is, do we need to interface it out?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ public SOG.Brep Convert(RG.Brep target)
speckleParent,
edge.EdgeCurveIndex,
edge.TrimIndices(),
edge.StartVertex?.VertexIndex ?? -1,
edge.EndVertex?.VertexIndex ?? -1,
edge.StartVertex.VertexIndex,
edge.EndVertex.VertexIndex,
edge.ProxyCurveIsReversed,
_intervalConverter.Convert(edge.Domain)
)
Expand All @@ -142,7 +142,7 @@ public SOG.Brep Convert(RG.Brep target)
{
var t = new SOG.BrepTrim(
speckleParent,
trim.Edge?.EdgeIndex ?? -1,
trim.Edge.EdgeIndex,
trim.Face.FaceIndex,
trim.Loop.LoopIndex,
trim.TrimCurveIndex,
Expand Down

0 comments on commit 1d9a36d

Please sign in to comment.