From d64a4a774cec477ec21c6b70b6ec8ca1f1c11d67 Mon Sep 17 00:00:00 2001 From: kike-garbo Date: Fri, 6 Sep 2024 18:47:50 +0200 Subject: [PATCH] Fix on 'Host Shape' when input points overlap corners. --- src/RhinoInside.Revit.GH/Types/HostObjects/HostObject.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/RhinoInside.Revit.GH/Types/HostObjects/HostObject.cs b/src/RhinoInside.Revit.GH/Types/HostObjects/HostObject.cs index 0d66a4d7b..3b2d4e055 100644 --- a/src/RhinoInside.Revit.GH/Types/HostObjects/HostObject.cs +++ b/src/RhinoInside.Revit.GH/Types/HostObjects/HostObject.cs @@ -91,13 +91,13 @@ internal bool SetSlabShape(IList points, IList creases, out IList using (shape as IDisposable) // ARDB.SlabShapeEditor is IDisposable since Revit 2023 { shape.ResetSlabShape(); + shape.Enable(); host.Document.Regenerate(); var bbox = BoundingBox; var elevation = GeometryEncoder.ToInternalLength(bbox.Max.Z); - shape.Enable(); - var vertices = new Dictionary(); + var vertices = new Dictionary(shape.SlabShapeVertices.Size + points.Count); ARDB.SlabShapeVertex AddVertex(Point3d point) { var x = GeometryEncoder.ToInternalLength(point.X);