//TODO: host railings, where possible private RevitRailing RailingToSpeckle(Railing revitRailing) { var railingType = Doc.GetElement(revitRailing.GetTypeId()) as RailingType; var speckleRailing = new RevitRailing(); //speckleRailing.family = railingType.FamilyName; speckleRailing.type = railingType.Name; speckleRailing.level = ConvertAndCacheLevel(revitRailing, BuiltInParameter.STAIRS_RAILING_BASE_LEVEL_PARAM); speckleRailing.path = CurveListToSpeckle(revitRailing.GetPath()); GetAllRevitParamsAndIds(speckleRailing, revitRailing, new List <string> { "STAIRS_RAILING_BASE_LEVEL_PARAM" }); var mesh = new Geometry.Mesh(); (mesh.faces, mesh.vertices) = GetFaceVertexArrayFromElement(revitRailing, new Options() { DetailLevel = ViewDetailLevel.Fine, ComputeReferences = false }); speckleRailing["@displayMesh"] = mesh; return(speckleRailing); }
//TODO: host railings, where possible private RevitRailing RailingToSpeckle(Railing revitRailing) { var railingType = Doc.GetElement(revitRailing.GetTypeId()) as RailingType; var speckleRailing = new RevitRailing(); //speckleRailing.family = railingType.FamilyName; speckleRailing.type = railingType.Name; speckleRailing.level = ConvertAndCacheLevel(revitRailing, BuiltInParameter.STAIRS_RAILING_BASE_LEVEL_PARAM); speckleRailing.path = CurveListToSpeckle(revitRailing.GetPath()); GetAllRevitParamsAndIds(speckleRailing, revitRailing, new List <string> { "STAIRS_RAILING_BASE_LEVEL_PARAM" }); speckleRailing.displayMesh = GetElementDisplayMesh(revitRailing, new Options() { DetailLevel = ViewDetailLevel.Fine, ComputeReferences = false }); //Report.Log($"Converted Railing {revitRailing.Id}"); return(speckleRailing); }