Skip to content

Commit 34cfa7f

Browse files
committed
Merge branch 'hotfix/v0.13.5'
2 parents 738f3af + e0f6a63 commit 34cfa7f

File tree

4 files changed

+25
-5
lines changed

4 files changed

+25
-5
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
9+
## [0.13.5] - 2022-02-18
10+
### Fixed
11+
- Issue where unclosed geometries could cause some Buildings not to output
12+
813
## [0.13.4] - 2022-01-28
914
### Fixed
1015
- Yak distribution for Rhino 8

Caribou/Caribou.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>net45</TargetFramework>
5-
<VersionPrefix>0.13.3</VersionPrefix>
5+
<VersionPrefix>0.13.5</VersionPrefix>
66
<VersionSuffix>beta</VersionSuffix>
77
<Title>Caribou</Title>
88
<Description>Description of Caribou</Description>
@@ -13,9 +13,9 @@
1313
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
1414
<PackageProjectUrl>https://philipbelesky.com</PackageProjectUrl>
1515
<RepositoryUrl>https://github.com/philipbelesky/Caribou</RepositoryUrl>
16-
<AssemblyVersion>0.13.3.0</AssemblyVersion>
17-
<FileVersion>0.13.3.0</FileVersion>
18-
<Version>0.13.3-beta</Version>
16+
<AssemblyVersion>0.13.5.0</AssemblyVersion>
17+
<FileVersion>0.13.5.0</FileVersion>
18+
<Version>0.13.5-beta</Version>
1919
</PropertyGroup>
2020

2121
<!--NUGET-->

Caribou/Processing/TranslateToXYManually.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
public static class TranslateToXYManually
1010
{
11+
// The largest 'gap' size that will attempted to be automatically closed to try and make closed curves for buildings
12+
static double ALLOWABLE_CLOSURE = 1.0 * RhinoMath.UnitScale(UnitSystem.Meters, RhinoDoc.ActiveDoc.ModelUnitSystem);
13+
1114
public static Dictionary<OSMTag, List<Point3d>> NodePointsFromCoords(RequestHandler result)
1215
{
1316
var geometryResult = new Dictionary<OSMTag, List<Point3d>>();
@@ -71,6 +74,18 @@ public static Dictionary<OSMTag, List<Brep>> BuildingBrepsFromCoords(ref Request
7174
outlinePoints.Add(GetPointFromLatLong(coord, lengthPerDegree, result.MinBounds));
7275

7376
var outline = new PolylineCurve(outlinePoints); // Creating a polylinecurve from scratch makes invalid geometry
77+
if (!outline.IsClosed)
78+
{
79+
if (outline.IsClosable(ALLOWABLE_CLOSURE)) // Force-close the curve
80+
{
81+
outline.MakeClosed(ALLOWABLE_CLOSURE);
82+
}
83+
else // Skip this curve as no valid Brep can be made
84+
{
85+
entry.Value.RemoveAt(i);
86+
continue;
87+
}
88+
}
7489

7590
var height = GetBuildingHeights.ParseHeight(entry.Value[i].Tags, unitScale);
7691
if (outputHeighted && height > 0.0) // Output heighted buildings

Caribou/bin/Release/net45/manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Caribou
2-
version: 0.13.4
2+
version: 0.13.5
33
authors:
44
- Philip Belesky
55
keywords:

0 commit comments

Comments
 (0)