//NOTE: BuildingPad cannot be created from the API AFAIK private BuildingPad BuildingPadToSpeckle(DB.BuildingPad revitPad) { var profiles = GetProfiles(revitPad); var specklePad = new BuildingPad(); specklePad.type = Doc.GetElement(revitPad.GetTypeId()).Name; specklePad.outline = profiles[0]; if (profiles.Count > 1) { specklePad.voids = profiles.Skip(1).ToList(); } specklePad.level = ConvertAndCacheLevel(revitPad, BuiltInParameter.LEVEL_PARAM); GetAllRevitParamsAndIds(specklePad, revitPad, new List <string> { "LEVEL_PARAM" }); var mesh = new Geometry.Mesh(); (mesh.faces, mesh.vertices) = GetFaceVertexArrayFromElement(revitPad, new Options() { DetailLevel = ViewDetailLevel.Fine, ComputeReferences = false }); specklePad["@displayMesh"] = mesh; return(specklePad); }
//NOTE: BuildingPad cannot be created from the API AFAIK private BuildingPad BuildingPadToSpeckle(DB.BuildingPad revitPad) { var profiles = GetProfiles(revitPad); var specklePad = new BuildingPad(); specklePad.type = Doc.GetElement(revitPad.GetTypeId()).Name; specklePad.outline = profiles[0]; if (profiles.Count > 1) { specklePad.voids = profiles.Skip(1).ToList(); } specklePad.level = ConvertAndCacheLevel(revitPad, BuiltInParameter.LEVEL_PARAM); GetAllRevitParamsAndIds(specklePad, revitPad, new List <string> { "LEVEL_PARAM" }); specklePad.displayMesh = GetElementDisplayMesh(revitPad, new Options() { DetailLevel = ViewDetailLevel.Fine, ComputeReferences = false }); //Report.Log($"Converted BuildingPad {revitPad.Id}"); return(specklePad); }