Skip to content

Commit

Permalink
Fix(Revit) : mesh gathering performance (#2819)
Browse files Browse the repository at this point in the history
  • Loading branch information
teocomi authored Aug 1, 2023
2 parents 3c6d854 + 2bc5baa commit dde8430
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,7 @@ private Base BeamToSpeckle(DB.FamilyInstance revitBeam, out List<string> notes)
speckleBeam.baseLine = baseLine;
speckleBeam.level = ConvertAndCacheLevel(revitBeam, BuiltInParameter.INSTANCE_REFERENCE_LEVEL_PARAM);

// structural connection modifiers alter family instance geometry, but the modifiers are view specific
// so we need to pass in the view we want in order to get the correct geometry
// TODO: we need to make sure we are passing in the correct view
var connectionHandlerFilter = new ElementClassFilter(typeof(DB.Structure.StructuralConnectionHandler));
var options = revitBeam.GetSubelements().Where(o => (BuiltInCategory)o.Category.Id.IntegerValue == DB.BuiltInCategory.OST_StructConnectionModifiers).Any() || revitBeam.GetDependentElements(connectionHandlerFilter).Any() ?
new Options() { View = Doc.ActiveView, ComputeReferences = true } : SolidDisplayValueOptions;
speckleBeam.displayValue = GetElementDisplayValue(revitBeam, options);
speckleBeam.displayValue = GetElementDisplayValue(revitBeam, SolidDisplayValueOptions);

GetAllRevitParamsAndIds(speckleBeam, revitBeam);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,13 +247,7 @@ public Base ColumnToSpeckle(DB.FamilyInstance revitColumn, out List<string> note
if (revitColumn.Location is LocationPoint)
speckleColumn.rotation = ((LocationPoint)revitColumn.Location).Rotation;

// structural connection modifiers alter family instance geometry, but the modifiers are view specific
// so we need to pass in the view we want in order to get the correct geometry
// TODO: we need to make sure we are passing in the correct view
var connectionHandlerFilter = new ElementClassFilter(typeof(DB.Structure.StructuralConnectionHandler));
var options = revitColumn.GetSubelements().Where(o => (BuiltInCategory)o.Category.Id.IntegerValue == DB.BuiltInCategory.OST_StructConnectionModifiers).Any() || revitColumn.GetDependentElements(connectionHandlerFilter).Any() ?
new Options() { View = Doc.ActiveView, ComputeReferences = true } : SolidDisplayValueOptions;
speckleColumn.displayValue = GetElementDisplayValue(revitColumn, options);
speckleColumn.displayValue = GetElementDisplayValue(revitColumn, SolidDisplayValueOptions);

return speckleColumn;
}
Expand Down

0 comments on commit dde8430

Please sign in to comment.