Skip to content

Commit

Permalink
fix(building): if terrain shift pixel by 1
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonelloDN committed Dec 26, 2023
1 parent 927da60 commit c3baf12
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions project/Morpho/Morpho25/Geometry/Building.cs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ private static void ShiftBuildings(Grid grid, List<Pixel> pixels,
var pixel = new Pixel(0, 0, 0);
var query = terrainPixels
.Where(_ => _.I == pixels[i].I && _.J == pixels[i].J);
if (query.Any()) offset = query.Select(_ => _.K).Max();
if (query.Any()) offset = query.Select(_ => _.K).Max() + 1;
var x = pixels[i].I;
var y = pixels[i].J;
var z = pixels[i].K + offset;
Expand All @@ -299,7 +299,7 @@ private static void ShiftBuildings(Grid grid, List<Pixel> pixels,
var pixel = new Pixel(0, 0, 0);
var x = pixels[i].I;
var y = pixels[i].J;
var z = pixels[i].K + offset;
var z = pixels[i].K + offset + 1; // Offset 1

pixel.I = x;
pixel.J = y;
Expand Down
2 changes: 1 addition & 1 deletion project/Morpho/Morpho25/Morpho25.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<AssemblyName>Morpho25</AssemblyName>
<Authors>AntonelloDN</Authors>
<Company>ENVI-met GmbH</Company>
<Version>2.0.3</Version>
<Version>2.0.4</Version>
<Title>Envimet morpho 25 library</Title>
<Description>Envimet morpho 25 library</Description>
<Configurations>Debug;Release;ReleaseLoc</Configurations>
Expand Down
2 changes: 1 addition & 1 deletion project/Morpho/MorphoGeometry/MorphoGeometry.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<AssemblyName>MorphoGeometry</AssemblyName>
<Authors>AntonelloDN</Authors>
<Company>ENVI-met GmbH</Company>
<Version>2.0.3</Version>
<Version>2.0.4</Version>
<Title>Envimet geometry library</Title>
<Description>Envimet geometry library</Description>
<Configurations>Debug;Release;ReleaseLoc</Configurations>
Expand Down
2 changes: 1 addition & 1 deletion project/Morpho/MorphoReader/MorphoReader.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<Company>ENVI-met GmbH</Company>
<PackageId>Morpho.Envimet</PackageId>
<Product>Morpho.Envimet</Product>
<Version>2.0.3</Version>
<Version>2.0.4</Version>
<Title>Envimet libraries</Title>
<PackageLicenseExpression>AGPL-3.0-or-later</PackageLicenseExpression>
<Copyright>Copyright © 2022 Antonello Di Nunzio</Copyright>
Expand Down
4 changes: 2 additions & 2 deletions project/Morpho/MorphoRhino/MorphoRhino.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<AssemblyName>MorphoRhino</AssemblyName>
<Authors>AntonelloDN</Authors>
<Company>ENVI-met GmbH</Company>
<Version>2.0.3</Version>
<Version>2.0.4</Version>
<Title>Envimet rhino library</Title>
<Description>Envimet rhino library</Description>

Expand Down Expand Up @@ -52,7 +52,7 @@
</ItemGroup>

<PropertyGroup Condition="$(Configuration) == 'Debug' AND $([MSBuild]::IsOSPlatform(Windows))">
<StartProgram>C:\Program Files\Rhino 6\System\Rhino.exe</StartProgram>
<StartProgram>C:\Program Files\Rhino 7\System\Rhino.exe</StartProgram>
<StartArguments>/nosplash</StartArguments>
<StartAction>Program</StartAction>
</PropertyGroup>
Expand Down

0 comments on commit c3baf12

Please sign in to comment.