diff --git a/src/Product.targets b/src/Product.targets
index f09ce8018..aab5c5144 100644
--- a/src/Product.targets
+++ b/src/Product.targets
@@ -18,10 +18,8 @@ If `ReleaseVersion` contains "wip" the product expires.
1
23
-
+ 0
+ 0
diff --git a/src/RhinoInside.Revit.GH/Components/Element/Ceiling/ByOutline.cs b/src/RhinoInside.Revit.GH/Components/Element/Ceiling/ByOutline.cs
index f264b6380..1a6b33f55 100755
--- a/src/RhinoInside.Revit.GH/Components/Element/Ceiling/ByOutline.cs
+++ b/src/RhinoInside.Revit.GH/Components/Element/Ceiling/ByOutline.cs
@@ -85,7 +85,7 @@ void ReconstructCeilingByOutline
)
ThrowArgumentException(nameof(boundary), "Boundary loop curves should be a set of valid horizontal, coplanar and closed curves.");
- boundary[index] = loop.Simplify(CurveSimplifyOptions.All, tol.VertexTolerance, tol.AngleTolerance) ?? loop;
+ boundary[index] = loop.Simplify(CurveSimplifyOptions.All & ~CurveSimplifyOptions.Merge, tol.VertexTolerance, tol.AngleTolerance) ?? loop;
using (var properties = AreaMassProperties.Compute(loop, tol.VertexTolerance))
{
diff --git a/src/RhinoInside.Revit.GH/Components/Element/Floor/AddFloor.cs b/src/RhinoInside.Revit.GH/Components/Element/Floor/AddFloor.cs
index 8cdc4f37c..9969bce85 100644
--- a/src/RhinoInside.Revit.GH/Components/Element/Floor/AddFloor.cs
+++ b/src/RhinoInside.Revit.GH/Components/Element/Floor/AddFloor.cs
@@ -136,7 +136,7 @@ protected override void TrySolveInstance(IGH_DataAccess DA)
)
throw new RuntimeArgumentException(nameof(boundary), "Boundary loop curves should be a set of valid horizontal, coplanar and closed curves.", boundary);
- boundary[index] = loop.Simplify(CurveSimplifyOptions.All, tol.VertexTolerance, tol.AngleTolerance) ?? loop;
+ boundary[index] = loop.Simplify(CurveSimplifyOptions.All & ~CurveSimplifyOptions.Merge, tol.VertexTolerance, tol.AngleTolerance) ?? loop;
using (var properties = AreaMassProperties.Compute(loop, tol.VertexTolerance))
{
diff --git a/src/RhinoInside.Revit.GH/Components/Element/Railing/ByCurve.cs b/src/RhinoInside.Revit.GH/Components/Element/Railing/ByCurve.cs
index 262c38a97..5ff4681fc 100644
--- a/src/RhinoInside.Revit.GH/Components/Element/Railing/ByCurve.cs
+++ b/src/RhinoInside.Revit.GH/Components/Element/Railing/ByCurve.cs
@@ -51,7 +51,7 @@ [Optional] bool flipped
Vector3d.ZAxis
);
curve = Curve.ProjectToPlane(curve, levelPlane);
- curve = curve.Simplify(CurveSimplifyOptions.All, tol.VertexTolerance, tol.AngleTolerance) ?? curve;
+ curve = curve.Simplify(CurveSimplifyOptions.All & ~CurveSimplifyOptions.Merge, tol.VertexTolerance, tol.AngleTolerance) ?? curve;
// Type
ChangeElementTypeId(ref railing, type.Value.Id);
diff --git a/src/RhinoInside.Revit.GH/Components/Element/Roof/ByOutline.cs b/src/RhinoInside.Revit.GH/Components/Element/Roof/ByOutline.cs
index 3f9f9132d..70365cc24 100644
--- a/src/RhinoInside.Revit.GH/Components/Element/Roof/ByOutline.cs
+++ b/src/RhinoInside.Revit.GH/Components/Element/Roof/ByOutline.cs
@@ -83,7 +83,7 @@ boundary is null ||
SolveOptionalLevel(document, boundary, ref level, out var bbox);
- boundary = boundary.Simplify(CurveSimplifyOptions.All, tol.VertexTolerance, tol.AngleTolerance) ?? boundary;
+ boundary = boundary.Simplify(CurveSimplifyOptions.All & ~CurveSimplifyOptions.Merge, tol.VertexTolerance, tol.AngleTolerance) ?? boundary;
var orientation = boundary.ClosedCurveOrientation(Plane.WorldXY);
if (orientation == CurveOrientation.CounterClockwise)
diff --git a/src/RhinoInside.Revit.GH/Components/Element/Wall/ByProfile.cs b/src/RhinoInside.Revit.GH/Components/Element/Wall/ByProfile.cs
index 2e50c7378..bf6a59a28 100755
--- a/src/RhinoInside.Revit.GH/Components/Element/Wall/ByProfile.cs
+++ b/src/RhinoInside.Revit.GH/Components/Element/Wall/ByProfile.cs
@@ -199,7 +199,7 @@ loop is null ||
ThrowArgumentException(nameof(profile), "Profile should be a list of planar vertical surfaces.", loop);
#endif
- loops[index] = loop.Simplify(CurveSimplifyOptions.All, tol.VertexTolerance, tol.AngleTolerance) ?? loop;
+ loops[index] = loop.Simplify(CurveSimplifyOptions.All & ~CurveSimplifyOptions.Merge, tol.VertexTolerance, tol.AngleTolerance) ?? loop;
using (var properties = AreaMassProperties.Compute(loop, tol.VertexTolerance))
{
diff --git a/src/RhinoInside.Revit.GH/Components/Site/AddToposolid.cs b/src/RhinoInside.Revit.GH/Components/Site/AddToposolid.cs
index 372859a1a..39b2087fb 100644
--- a/src/RhinoInside.Revit.GH/Components/Site/AddToposolid.cs
+++ b/src/RhinoInside.Revit.GH/Components/Site/AddToposolid.cs
@@ -131,7 +131,7 @@ protected override void TrySolveInstance(IGH_DataAccess DA)
throw new RuntimeArgumentException(nameof(boundary), "Boundary loop curves should be a set of valid horizontal, coplanar and closed curves.", boundary);
boundaryElevation = Interval.FromUnion(boundaryElevation, new Interval(plane.OriginZ, plane.OriginZ));
- boundary[index] = loop.Simplify(CurveSimplifyOptions.All, tol.VertexTolerance, tol.AngleTolerance) ?? loop;
+ boundary[index] = loop.Simplify(CurveSimplifyOptions.All & ~CurveSimplifyOptions.Merge, tol.VertexTolerance, tol.AngleTolerance) ?? loop;
using (var properties = AreaMassProperties.Compute(loop, tol.VertexTolerance))
{
diff --git a/src/RhinoInside.Revit.GH/Components/Site/AddToposolidSubDivision.cs b/src/RhinoInside.Revit.GH/Components/Site/AddToposolidSubDivision.cs
index c27bb45e1..fb8eadbca 100644
--- a/src/RhinoInside.Revit.GH/Components/Site/AddToposolidSubDivision.cs
+++ b/src/RhinoInside.Revit.GH/Components/Site/AddToposolidSubDivision.cs
@@ -105,7 +105,7 @@ protected override void TrySolveInstance(IGH_DataAccess DA)
throw new RuntimeArgumentException(nameof(boundary), "Boundary loop curves should be a set of valid horizontal, coplanar and closed curves.", boundary);
boundaryElevation = Interval.FromUnion(boundaryElevation, new Interval(plane.OriginZ, plane.OriginZ));
- boundary[index] = loop.Simplify(CurveSimplifyOptions.All, tol.VertexTolerance, tol.AngleTolerance) ?? loop;
+ boundary[index] = loop.Simplify(CurveSimplifyOptions.All & ~CurveSimplifyOptions.Merge, tol.VertexTolerance, tol.AngleTolerance) ?? loop;
using (var properties = AreaMassProperties.Compute(loop, tol.VertexTolerance))
{
diff --git a/src/RhinoInside.Revit.GH/Components/Structure/AddFoundation-Slab.cs b/src/RhinoInside.Revit.GH/Components/Structure/AddFoundation-Slab.cs
index 90966ccdf..cc2ec77df 100644
--- a/src/RhinoInside.Revit.GH/Components/Structure/AddFoundation-Slab.cs
+++ b/src/RhinoInside.Revit.GH/Components/Structure/AddFoundation-Slab.cs
@@ -137,7 +137,7 @@ protected override void TrySolveInstance(IGH_DataAccess DA)
)
throw new RuntimeArgumentException(nameof(boundary), "Boundary loop curves should be a set of valid horizontal, coplanar and closed curves.", boundary);
- boundary[index] = loop.Simplify(CurveSimplifyOptions.All, tol.VertexTolerance, tol.AngleTolerance) ?? loop;
+ boundary[index] = loop.Simplify(CurveSimplifyOptions.All & ~CurveSimplifyOptions.Merge, tol.VertexTolerance, tol.AngleTolerance) ?? loop;
using (var properties = AreaMassProperties.Compute(loop, tol.VertexTolerance))
{
diff --git a/src/RhinoInside.Revit.GH/Types/Reference.cs b/src/RhinoInside.Revit.GH/Types/Reference.cs
index 1c565a556..03aba6c48 100755
--- a/src/RhinoInside.Revit.GH/Types/Reference.cs
+++ b/src/RhinoInside.Revit.GH/Types/Reference.cs
@@ -266,7 +266,7 @@ protected internal T GetElement(T element) where T : Element
if (IsLinked && Document.IsEquivalent(element.Document))
return (T) Element.FromLinkElement(ReferenceDocument.GetElement(ReferenceId) as ARDB.RevitLinkInstance, element);
- if (!ReferenceDocument.IsEquivalent(element.Document))
+ if (element.Document is object && !ReferenceDocument.IsEquivalent(element.Document))
throw new Exceptions.RuntimeArgumentException(nameof(element), $"Invalid Document");
return element;