Skip to content

Commit

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

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

Expand All @@ -36,7 +36,7 @@ protected override void RegisterInputParams(GH_Component.GH_InputParamManager pM
pManager.AddIntegerParameter("nrVerticesAround (optional)", "nrVerticesAround", "number of vertices around the cylinder.", GH_ParamAccess.item, 18);
pManager.AddIntegerParameter("Degree (optional)", "degree", "degree of the surface.", GH_ParamAccess.item, 0);

pManager.AddAngleParameter("Rotation angle of one of the curves around itself (optional)", "roationAngle", "rotation angle of the curves around itself", GH_ParamAccess.item, 0);
pManager.AddAngleParameter("Rotation angle of one of the curves around itself (optional)", "rotationAngle", "rotation angle of the curves around itself", GH_ParamAccess.item, 0);

pManager.AddBooleanParameter("Flip one curve (optional)", "flip", "flip one curve? try this to prevent self-intersection.", GH_ParamAccess.item, false);

Expand Down Expand Up @@ -94,8 +94,8 @@ 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");
Rhino.RhinoApp.WriteLine("GPLv3 licensed, source: https://github.com/Mathias-Fuchs/MinimalSurface");
Rhino.RhinoApp.WriteLine("Copyright Mathias Fuchs 2020 - 2021, https://mathiasfuchs.com");


// the input curve
Expand Down
30 changes: 18 additions & 12 deletions MinSurfaceGH/MinSurfaceComponentOneBoundaryComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,10 @@ public class MinSurfaceComponentOneBoundaryComponent : GH_Component
{
public MinSurfaceComponentOneBoundaryComponent()
: base("MiniOne", "miniOne",
"Computes an approximate minimal surface (soap film) inside one given closed curves.",
"Mathias", "Geometry")
{
}
"Computes an approximate minimal surface (soap film) inside a closed curve.",
"MinSurface", "Geometry") {}

public override Guid ComponentGuid
{
get
{
return new Guid("A857FF66-CD2E-4AEA-850A-555CBFE5D762");
}
}
public override Guid ComponentGuid => new Guid("A857FF66-CD2E-4AEA-850A-555CBFE5D762");

protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
{
Expand All @@ -35,7 +27,7 @@ protected override void RegisterInputParams(GH_Component.GH_InputParamManager pM

pManager.AddIntegerParameter("nrVerticesBoundary", "nrVerticesBoundary", "number of vertices along the boundary.", GH_ParamAccess.item, 300);
pManager.AddIntegerParameter("Degree (optional)", "degree", "degree of the surface.", GH_ParamAccess.item, 0);
pManager.AddAngleParameter("Rotation angle of one of the curves around itself (optional)", "roationAngle", "rotation angle of the curves around itself", GH_ParamAccess.item, 0);
pManager.AddAngleParameter("Rotation angle of the curve (optional)", "rotationAngle", "rotation angle of the curve", GH_ParamAccess.item, 0);

}

Expand All @@ -46,6 +38,13 @@ protected override void RegisterOutputParams(GH_Component.GH_OutputParamManager

protected override void SolveInstance(IGH_DataAccess DA)
{
System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
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("GPLv3 licensed, source: https://github.com/Mathias-Fuchs/MinimalSurface");
Rhino.RhinoApp.WriteLine("Copyright Mathias Fuchs 2020 - 2021, https://mathiasfuchs.com");

Curve tc = null;
int nrBoundaryVertices = 0;
int degree = 0;
Expand Down Expand Up @@ -100,8 +99,15 @@ protected override void SolveInstance(IGH_DataAccess DA)
);

// bottleneck
MMM.Vertices.Capacity = MM.Vertices.Count;
MMM.Vertices.AddVertices(mvl);
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 input parameter can solve this.");
DA.SetData(0, MMM);
}

Expand Down
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.5\</OutputPath>
<OutputPath>..\..\..\..\AppData\Roaming\McNeel\Rhinoceros\packages\7.0\MinSurface\0.1.3.6\</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.5\</OutputPath>
<OutputPath>..\..\..\..\AppData\Roaming\McNeel\Rhinoceros\packages\7.0\MinSurface\0.1.3.6\</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.5")]
[assembly: AssemblyVersion("0.1.3.6")]
[assembly: NeutralResourcesLanguage("en")]
5 changes: 4 additions & 1 deletion printOccuringVersions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ ForEach($file in $files) {
Write-Host $file -ForegroundColor Green;
(Get-Content $file) | Select-String -Pattern "0.1" | Write;
}


Write-Host "Gha assembly:" -ForegroundColor Green;

(Get-Item yakpackage\*.gha).VersionInfo | Write-Output;
Binary file modified publishedversion.txt
Binary file not shown.

0 comments on commit b102b66

Please sign in to comment.