Skip to content

Commit

Permalink
Update surface conversion for changes in element2d class
Browse files Browse the repository at this point in the history
  • Loading branch information
jenessaman committed Feb 9, 2022
1 parent 60bb23f commit 3928b51
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ private Element2D AnalyticalSurfaceToSpeckle(AnalyticalModelSurface revitSurface
}
voidNodes.Add(loopNodes);
}
//speckleElement2D.voids = voidNodes;
speckleElement2D.voids = voidNodes;

//var mesh = new Geometry.Mesh();
//var solidGeom = GetElementSolids(structuralElement);
Expand All @@ -149,21 +149,21 @@ private Element2D AnalyticalSurfaceToSpeckle(AnalyticalModelSurface revitSurface
// Material
DB.Material structMaterial = null;
double thickness = 0;
var memberType = MemberType2D.Generic2D;
var memberType = MemberType.Generic2D;

if (structuralElement is DB.Floor)
{
var floor = structuralElement as DB.Floor;
structMaterial = Doc.GetElement(floor.FloorType.StructuralMaterialId) as DB.Material;
thickness = GetParamValue<double>(structuralElement, BuiltInParameter.STRUCTURAL_FLOOR_CORE_THICKNESS);
memberType = MemberType2D.Slab;
memberType = MemberType.Slab;
}
else if (structuralElement is DB.Wall)
{
var wall = structuralElement as DB.Wall;
structMaterial = Doc.GetElement(wall.WallType.get_Parameter(BuiltInParameter.STRUCTURAL_MATERIAL_PARAM).AsElementId()) as DB.Material;
thickness = ScaleToSpeckle(wall.WallType.Width);
memberType = MemberType2D.Wall;
memberType = MemberType.Wall;
}

var materialAsset = ((PropertySetElement)Doc.GetElement(structMaterial.StructuralAssetId)).GetStructuralAsset();
Expand Down Expand Up @@ -253,7 +253,7 @@ private Element2D AnalyticalSurfaceToSpeckle(AnalyticalModelSurface revitSurface
prop.type = Structural.PropertyType2D.Shell;
prop.thickness = thickness;

speckleElement2D["memberType"] = memberType;
speckleElement2D.memberType = memberType;
speckleElement2D.property = prop;

GetAllRevitParamsAndIds(speckleElement2D, revitSurface);
Expand Down

0 comments on commit 3928b51

Please sign in to comment.