Skip to content

Commit

Permalink
Merge branch 'hotfix/v0.13.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
philipbelesky committed Feb 18, 2022
2 parents 738f3af + e0f6a63 commit 34cfa7f
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [0.13.5] - 2022-02-18
### Fixed
- Issue where unclosed geometries could cause some Buildings not to output

## [0.13.4] - 2022-01-28
### Fixed
- Yak distribution for Rhino 8
Expand Down
8 changes: 4 additions & 4 deletions Caribou/Caribou.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net45</TargetFramework>
<VersionPrefix>0.13.3</VersionPrefix>
<VersionPrefix>0.13.5</VersionPrefix>
<VersionSuffix>beta</VersionSuffix>
<Title>Caribou</Title>
<Description>Description of Caribou</Description>
Expand All @@ -13,9 +13,9 @@
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
<PackageProjectUrl>https://philipbelesky.com</PackageProjectUrl>
<RepositoryUrl>https://github.com/philipbelesky/Caribou</RepositoryUrl>
<AssemblyVersion>0.13.3.0</AssemblyVersion>
<FileVersion>0.13.3.0</FileVersion>
<Version>0.13.3-beta</Version>
<AssemblyVersion>0.13.5.0</AssemblyVersion>
<FileVersion>0.13.5.0</FileVersion>
<Version>0.13.5-beta</Version>
</PropertyGroup>

<!--NUGET-->
Expand Down
15 changes: 15 additions & 0 deletions Caribou/Processing/TranslateToXYManually.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

public static class TranslateToXYManually
{
// The largest 'gap' size that will attempted to be automatically closed to try and make closed curves for buildings
static double ALLOWABLE_CLOSURE = 1.0 * RhinoMath.UnitScale(UnitSystem.Meters, RhinoDoc.ActiveDoc.ModelUnitSystem);

public static Dictionary<OSMTag, List<Point3d>> NodePointsFromCoords(RequestHandler result)
{
var geometryResult = new Dictionary<OSMTag, List<Point3d>>();
Expand Down Expand Up @@ -71,6 +74,18 @@ public static Dictionary<OSMTag, List<Brep>> BuildingBrepsFromCoords(ref Request
outlinePoints.Add(GetPointFromLatLong(coord, lengthPerDegree, result.MinBounds));

var outline = new PolylineCurve(outlinePoints); // Creating a polylinecurve from scratch makes invalid geometry
if (!outline.IsClosed)
{
if (outline.IsClosable(ALLOWABLE_CLOSURE)) // Force-close the curve
{
outline.MakeClosed(ALLOWABLE_CLOSURE);
}
else // Skip this curve as no valid Brep can be made
{
entry.Value.RemoveAt(i);
continue;
}
}

var height = GetBuildingHeights.ParseHeight(entry.Value[i].Tags, unitScale);
if (outputHeighted && height > 0.0) // Output heighted buildings
Expand Down
2 changes: 1 addition & 1 deletion Caribou/bin/Release/net45/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Caribou
version: 0.13.4
version: 0.13.5
authors:
- Philip Belesky
keywords:
Expand Down

0 comments on commit 34cfa7f

Please sign in to comment.