Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(rhino): adds names to all objects on bake #327

Merged
merged 4 commits into from
Oct 25, 2024

Conversation

clairekuang
Copy link
Member

@clairekuang clairekuang commented Oct 25, 2024

Looks for a name property on incoming atomic objects, and bakes rhino objects with a name if one exists.
Motivation: while the name is nice to preserve for multiplayer flows, this property helps a lot when receiving fallback geometry from other apps (esp civil and revit) that would help identify what the original object was.

Also adds name property to all rhino objects on send.

Copy link

linear bot commented Oct 25, 2024

@@ -253,7 +256,7 @@ private void PreReceiveDeepClean(string baseLayerName)
_groupBaker.PurgeGroups(baseLayerName);
}

private Guid BakeObject(GeometryBase obj, Base originalObject, int layerIndex)
private Guid BakeObject(GeometryBase obj, Base originalObject, int layerIndex, string? name = null)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we already have originalObject in relevant functions, I wouldn't pollute function arguments. You need to do it only in BakeObjects function and thats it

Copy link
Member Author

@clairekuang clairekuang Oct 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't do it there, since originalObject could be a Base in a display value of an element that used fallback conversion for example. We need to do it in both the group converter and the bake then.

Copy link

codecov bot commented Oct 25, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 8.40%. Comparing base (900427a) to head (4996751).
Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
.../TopLevel/RhinoObjectToSpeckleTopLevelConverter.cs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             dev    #327      +/-   ##
========================================
- Coverage   8.40%   8.40%   -0.01%     
========================================
  Files        240     240              
  Lines       4830    4832       +2     
  Branches     560     561       +1     
========================================
  Hits         406     406              
- Misses      4407    4409       +2     
  Partials      17      17              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@clairekuang clairekuang enabled auto-merge (squash) October 25, 2024 11:35
@clairekuang clairekuang merged commit a14b0a6 into dev Oct 25, 2024
5 checks passed
@clairekuang clairekuang deleted the claire/cnx-688-rhino-add-name-of-objects-on-receive branch October 25, 2024 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants