Skip to content

Commit

Permalink
Merge pull request #1136 from mcneel/1.22
Browse files Browse the repository at this point in the history
1.22
  • Loading branch information
kike-garbo authored Jul 3, 2024
2 parents dece6aa + 6eaf3c6 commit 1311cda
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 13 deletions.
6 changes: 2 additions & 4 deletions src/Product.targets
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ If `ReleaseVersion` contains "wip" the product expires.
<ProductMetaVersion></ProductMetaVersion>
<ProductMajorVersion>1</ProductMajorVersion>
<ProductMinorVersion>23</ProductMinorVersion>
<!--
<ProductBuildVersion></ProductBuildVersion>
<ProductRevisionVersion></ProductRevisionVersion>
-->
<ProductBuildVersion Condition="$(Configuration.Contains('Debug'))">0</ProductBuildVersion>
<ProductRevisionVersion Condition="$(Configuration.Contains('Debug'))">0</ProductRevisionVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down
2 changes: 1 addition & 1 deletion src/RhinoInside.Revit.GH/Components/Site/AddToposolid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down
2 changes: 1 addition & 1 deletion src/RhinoInside.Revit.GH/Types/Reference.cs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ protected internal T GetElement<T>(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;
Expand Down

0 comments on commit 1311cda

Please sign in to comment.