feat (rhino): receive revit solids as breps#1273
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #1273 +/- ##
==========================================
- Coverage 41.32% 33.05% -8.28%
==========================================
Files 117 118 +1
Lines 3228 3180 -48
Branches 315 325 +10
==========================================
- Hits 1334 1051 -283
- Misses 1851 2090 +239
+ Partials 43 39 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| public const string SETTING_ID = "convertMeshesToBreps"; | ||
|
|
||
| public string? Id { get; set; } = SETTING_ID; | ||
| public string? Title { get; set; } = "Convert solid meshes to Breps"; |
There was a problem hiding this comment.
Convert meshes to polysurfaces
|
|
||
| public class ConvertMeshesToBrepsSetting(bool value = false) : ICardSetting | ||
| { | ||
| public const string SETTING_ID = "convertMeshesToBreps"; |
There was a problem hiding this comment.
convertMeshesToPolysurfaces
| SOG.ExtrusionX extrusion => _extrusionConverter.Convert(extrusion), | ||
| SOG.Line line => new() { _lineConverter.Convert(line) }, | ||
| SOG.Mesh mesh => new() { _meshConverter.Convert(mesh) }, | ||
| SOG.Mesh mesh => new() { _meshConversionHelper.ConvertMesh(mesh) }, |
There was a problem hiding this comment.
i don't believe we need another wrapper/helper class for this operation. Just use utility in the converter class.
| var solidDisplayMeshes = _meshByMaterialConverter.Convert((solidMeshesByMaterial, element.Id, makeTransparent)); | ||
| foreach (var solidMesh in solidDisplayMeshes) | ||
| { | ||
| solidMesh["fromSolid"] = true; |
There was a problem hiding this comment.
Why we would need this flag at all? Why not to just try to convert all upcoming meshes in rhino. theoratically we should not touch anything on revit side.
|
Comments addressed and revit side is cleaned @oguzhankoral |

Rhino Side
On the Rhino side we added a receive setting that converts tagged geometries to Breps using Rhino API function
Brep.CreateFromMesh``. After creating the mesh we also callMergeCoplanarFaces` to combine triangulated faces to make them easy to work.The setting is disabled by default since it adds a performance overhead while merging all the faces in the same plane.