Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhathcock committed Jun 20, 2024
1 parent 63d3016 commit b6a191d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

using Speckle.Rhino7.Interfaces;
using Speckle.Rhino7.Interfaces;

namespace Speckle.Connectors.Rhino7.Operations.Receive;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ public class RhinoHostObjectBuilder : IHostObjectBuilder
public RhinoHostObjectBuilder(
IRootToHostConverter converter,
IConversionContextStack<IRhinoDoc, RhinoUnitSystem> contextStack,
GraphTraversal traverseFunction, IRhinoDocFactory rhinoDocFactory)
GraphTraversal traverseFunction,
IRhinoDocFactory rhinoDocFactory
)
{
_converter = converter;
_contextStack = contextStack;
Expand Down Expand Up @@ -53,7 +55,11 @@ CancellationToken cancellationToken
private HostObjectBuilderResult BakeObjects(IEnumerable<TraversalContext> objectsGraph, string baseLayerName)
{
var doc = _contextStack.Current.Document;
var rootLayerIndex = _contextStack.Current.Document.Layers.Find(Guid.Empty, baseLayerName, _rhinoDocFactory.UnsetIntIndex);
var rootLayerIndex = _contextStack.Current.Document.Layers.Find(
Guid.Empty,
baseLayerName,
_rhinoDocFactory.UnsetIntIndex
);

// POC: We could move this out into a separate service for testing and re-use.
// Cleans up any previously received objects
Expand Down Expand Up @@ -143,7 +149,7 @@ private IReadOnlyList<string> HandleConversionResult(object conversionResult, Ba
private IRhinoGroup BakeObjectsAsGroup(string groupName, IEnumerable<IRhinoGeometryBase> list, int layerIndex)
{
var doc = _contextStack.Current.Document;
var objectIds = list.Select(obj => doc.Objects.Add(obj,_rhinoDocFactory.CreateAttributes(layerIndex)));
var objectIds = list.Select(obj => doc.Objects.Add(obj, _rhinoDocFactory.CreateAttributes(layerIndex)));
var groupIndex = _contextStack.Current.Document.Groups.Add(groupName, objectIds);
var group = _contextStack.Current.Document.Groups.FindIndex(groupIndex);
return group;
Expand Down

0 comments on commit b6a191d

Please sign in to comment.