Skip to content

Commit

Permalink
0.1.3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathias-Fuchs committed Dec 24, 2021
1 parent ab8ecbf commit 4354fb6
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 24 deletions.
36 changes: 19 additions & 17 deletions MinSurfaceGH/MinSurfaceComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,12 @@ public class MinSurfaceComponent : GH_Component

public MinSurfaceComponent()
: base("MiniTwo", "minitwo",
"Computes an approximate minimal surface (soap film) inside two given closed curves.",
"Mathias", "Geometry")
{
}

public override Guid ComponentGuid
{
get
{
return new Guid("6679fe76-1914-4cf2-a2da-a3b12cef0ff3");
}
}
"Computes an approximate minimal surface (soap film) inside one or two closed curves.",
"MinSurface", "Geometry")
{ }

public override Guid ComponentGuid => new Guid("6679fe76-1914-4cf2-a2da-a3b12cef0ff3");

protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
{
pManager.AddCurveParameter("Input curve (required)", "inputCurve", "The first closed" +
Expand Down Expand Up @@ -101,8 +94,11 @@ protected override void SolveInstance(IGH_DataAccess DA)
System.Diagnostics.FileVersionInfo fvi = System.Diagnostics.FileVersionInfo.GetVersionInfo(assembly.Location);
string version = fvi.FileVersion;
Rhino.RhinoApp.WriteLine("Minimal surface component, version " + version);
Rhino.RhinoApp.WriteLine("GPL licensed, source: https://github.com/Mathias-Fuchs/MinimalSurface");
Rhino.RhinoApp.WriteLine("C Mathias Fuchs, https://mathiasfuchs.com");


// the input curve
// the input curve
Curve tc = null;
Curve tc2 = null;
int vertical = 0;
Expand Down Expand Up @@ -171,7 +167,7 @@ protected override void SolveInstance(IGH_DataAccess DA)

var MM = UncappedCylinder(around, vertical);

// bottleneck ... so here, parallelization is worth it

var mvl = MM.Vertices.Select(pp =>
{
var x = pp.X;
Expand All @@ -184,16 +180,22 @@ protected override void SolveInstance(IGH_DataAccess DA)

var MMM = new Mesh();
MMM.Vertices.Capacity = MM.Vertices.Count;

// bottleneck ... so here, parallelization would be nice but the .AddVertices method can not deal with a parallel queryable, so it is not clear how to parallelize this.
MMM.Vertices.AddVertices(mvl);

// bottleneck
// also bottleneck
MMM.Faces.Capacity = MM.Faces.Count;
MMM.Faces.AddFaces(MM.Faces);

if (MMM.Faces.GetClashingFacePairs(1).Any())
this.AddRuntimeMessage(
GH_RuntimeMessageLevel.Warning,
"The resulting mesh has self-intersections. Modifying the rotation angle and flip switch input parameters can solve this.");

DA.SetData(0, MMM);

}
protected override System.Drawing.Bitmap Icon
=> Properties.Resources.icon04_tUT_icon.ToBitmap();
=> Properties.Resources.icon04_tUT_icon.ToBitmap();
}
}
4 changes: 2 additions & 2 deletions MinSurfaceGH/MinSurfacev7GH.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\..\..\AppData\Roaming\McNeel\Rhinoceros\packages\7.0\MinSurface\0.1.3.4\</OutputPath>
<OutputPath>..\..\..\..\AppData\Roaming\McNeel\Rhinoceros\packages\7.0\MinSurface\0.1.3.5\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\..\..\AppData\Roaming\McNeel\Rhinoceros\packages\7.0\MinSurface\0.1.3.4\</OutputPath>
<OutputPath>..\..\..\..\AppData\Roaming\McNeel\Rhinoceros\packages\7.0\MinSurface\0.1.3.5\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand Down
2 changes: 1 addition & 1 deletion MinSurfaceGH/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
// Revision
//

[assembly: AssemblyVersion("0.1.3.4")]
[assembly: AssemblyVersion("0.1.3.5")]
[assembly: NeutralResourcesLanguage("en")]
Binary file removed RR.ps1.swp
Binary file not shown.
Binary file modified publishedversion.txt
Binary file not shown.
2 changes: 1 addition & 1 deletion push.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ Yak.exe push $publishee

New-Item -Path ..\..\..\AppData\Roaming\McNeel\Rhinoceros\packages\7.0\MinSurface -Name $args[1] -ItemType "directory";

Yak.exe search MinSurface | sed 's/.*(//g' | sed 's/).*//g'
Yak.exe search MinSurface | sed 's/.*(//g' | sed 's/).*//g' | Write
# check with .\printOccuringVersions.ps1 if renaming worked
4 changes: 1 addition & 3 deletions rename.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ $files =
"MinSurfaceGH\Properties\AssemblyInfo.cs";

ForEach($file in $files) {
if (!(Test-Path $file)) {
throw "File " + $file + " not found!";
}
if (!(Test-Path $file)) {throw "File " + $file + " not found!";}
Write-Host $file -ForegroundColor Green;
(Get-Content $file).Replace($args[0], $args[1]) | Set-Content $file
}
Expand Down

0 comments on commit 4354fb6

Please sign in to comment.