Skip to content

Commit

Permalink
GSAGH-513 - Broken link is generated by automated doc generator (#686)
Browse files Browse the repository at this point in the history
  • Loading branch information
SandeepArup authored Jul 24, 2024
2 parents eec1eb3 + 05d015a commit d64c941
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 16 deletions.
5 changes: 3 additions & 2 deletions DocsGeneration/Data/Parameter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ private string GetClassSummary(Type paramType) {
XmlNode xmlDocuOfMethod = GsaGhDll.GsaGhXml.SelectSingleNode(
"//member[@name='" + path + "']");
string text = xmlDocuOfMethod.InnerXml
.Replace("<summary>", string.Empty).Replace("</summary>", string.Empty);
.Replace("<summary>", string.Empty).Replace("</summary>", string.Empty);
string cleanStr = Regex.Replace(text, @"\s+", " ");
return cleanStr.Trim();
}
Expand Down Expand Up @@ -156,7 +156,8 @@ public static List<Parameter> GetParameters(Type[] typelist, List<Component> com
parameters.Add(param);
Console.WriteLine($"Added {param.Name} parameter");
}
} catch (Exception) {
}
catch (Exception) {
continue;
}
}
Expand Down
3 changes: 3 additions & 0 deletions DocsGeneration/MarkDowns/Helpers/FileHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ public static string CreateIconLink(Parameter parameter) {
string name = parameter.ParameterType.Replace(" (List)", string.Empty);
name = name.Replace(" (Tree)", string.Empty);
name = name.Replace(" ", string.Empty);
if (name.Contains("LoadValue") && name.Contains("kN,kN/m,kN/m²")) {
name = "Load";
}
name = $"{name}Param";
iconNames.Add(name);
// ![Material](./images/gsagh/MaterialParam.png)
Expand Down
1 change: 1 addition & 0 deletions DocsGeneration/MarkDowns/Helpers/StringHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public static string ComponentDescription(string str, List<string> parameterName
private static string ConvertSummaryToMarkup(string str) {
str = str.Replace("</para>", "\n\n").Replace("<para>", string.Empty);
str = str.Replace("IGsaLoad", "GsaLoad");
str = str.Replace("IGsaResult", "GsaResult");
str = str.Replace("IGsaGridLoad", "GsaGridLoad");
str = str.Replace("IGsaStandardMaterial", "GsaStandardMaterial");
str = str.Replace("IGsaAnnotation", "GsaAnnotation");
Expand Down
2 changes: 1 addition & 1 deletion GsaGH/Parameters/2_Geometry/GsaAssembly.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace GsaGH.Parameters {
/// <summary>
/// Assemblies are a way to define an entity that is formed from a collection of elements or members and can be thought of as a super-element. This is not an analysis entity but just a convenience for post-processing such as cut section forces. Typical uses of assemblies include cores, where the core is modelled with 2D finite elements, or trusses where the truss is modelled with top and bottom chords and bracing. In both these cases the assembly is identified by a list of included elements.
/// Unlike the analysis elements, an assembly does not have a clearly define orientation and location of reference point so these must be defined explicitly.
/// <para>Refer to <see href="https://docs.oasys-software.com/structural/gsa/references/hidr-data-assembly/index.html">Assemblies</see> to read more.</para>
/// <para>Refer to <see href="https://docs.oasys-software.com/structural/gsa/references/hidr-data-assembly.html">Assemblies</see> to read more.</para>
/// </summary>
public class GsaAssembly {
public Guid Guid { get; set; } = Guid.NewGuid();
Expand Down
2 changes: 1 addition & 1 deletion GsaGH/Parameters/3_Loads/GsaGridPlaneSurface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace GsaGH.Parameters {
/// <summary>
/// <para>A Grid Plane Surface is used by <see href="https://docs.oasys-software.com/structural/gsa/explanations/grid-loads.html">Grid Loads</see>.</para>
/// <para>A Grid Plane Surface is used by <see href="https://docs.oasys-software.com/structural/gsa/references-theory/grid-loads.html">Grid Loads</see>.</para>
/// <para>A grid plane defines the geometry of a surface, and the load behaviour of the grid plane is defined by a grid surface.</para>
/// <para>In Grasshopper, a Grid Plane Surface contains both the information of what in GSA is known as a <see href="https://docs.oasys-software.com/structural/gsa/references/hidr-data-grid-plane.html">Grid Plane</see> and a <see href="https://docs.oasys-software.com/structural/gsa/references/hidr-data-grid-surface.html">Grid Surface</see></para>
/// <para>The Grasshopper plugin will automatically create a fitting Grid Plane Surface when using the <see cref="Components.CreateGridPointLoad"/>, <see cref="Components.CreateGridLineLoad"/> or <see cref="Components.CreateGridAreaLoad"/> components. </para>
Expand Down
13 changes: 1 addition & 12 deletions GsaGH/Parameters/5_Results/2_Results/GsaResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,7 @@
using GsaGH.Helpers;

namespace GsaGH.Parameters.Results {
/// <summary>
/// <para>A Result is used to select Cases from an analysed <see cref="GsaModel"/> and extract the values for post-processing or visualisation.</para>
/// <para>The following result types can be extracted if they are present in the model:
/// <list type="bullet">
/// <item><description><see href="https://docs.oasys-software.com/structural/gsa/references/dotnet-api/result-classes.html#noderesult">Node Results</see>: `Displacement` and `Reaction`.</description></item>
/// <item><description><see href="https://docs.oasys-software.com/structural/gsa/references/dotnet-api/result-classes.html#element1dresult">1D Element Results</see>: `Displacement`, `Force` and `StrainEnergyDensity`.</description></item>
/// <item><description><see href="https://docs.oasys-software.com/structural/gsa/references/dotnet-api/result-classes.html#element2dresult">2D Element Results</see>: `Displacement`, `Force`, `Moment`, `Shear` and `Stress`.</description></item>
/// <item><description><see href="https://docs.oasys-software.com/structural/gsa/references/dotnet-api/result-classes.html#element3dresult">3D Element Results</see>: `Displacement` and `Stress`.</description></item>
/// <item><description><see href="https://docs.oasys-software.com/structural/gsa/references/dotnet-api/result-classes.html#globalresult">Global Results</see>: `Frequency`, `LoadFactor`, `ModalGeometricStiffness`, `ModalMass`, `ModalStiffness`, `TotalLoad`, `TotalReaction`, `Mode`, `EffectiveInertia`, `EffectiveMass` and `Eigenvalue`.</description></item>
/// </list></para>
/// <para>All result values from the <see href="https://docs.oasys-software.com/structural/gsa/references/dotnet-api/introduction.html">.NET API</see> have been wrapped in <see href="https://docs.oasys-software.com/structural/gsa/references/gsagh/gsagh-unitnumber-parameter.html">Unit Number</see> and can be converted into different measures on the fly. The Result parameter caches the result values.</para>
/// </summary>

public class GsaResult : IGsaResult {
public int CaseId { get; set; }
public int Permutations { get; set; } = 0;
Expand Down
12 changes: 12 additions & 0 deletions GsaGH/Parameters/5_Results/2_Results/IGsaResult.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
using System.Collections.Generic;

namespace GsaGH.Parameters.Results {
/// <summary>
/// <para>A Result is used to select Cases from an analysed <see cref="GsaModel"/> and extract the values for post-processing or visualisation.</para>
/// <para>The following result types can be extracted if they are present in the model:
/// <list type="bullet">
/// <item><description><see href="https://docs.oasys-software.com/structural/gsa/references/dotnet-api/result-classes.html#noderesult">Node Results</see>: `Displacement` and `Reaction`.</description></item>
/// <item><description><see href="https://docs.oasys-software.com/structural/gsa/references/dotnet-api/result-classes.html#element1dresult">1D Element Results</see>: `Displacement`, `Force` and `StrainEnergyDensity`.</description></item>
/// <item><description><see href="https://docs.oasys-software.com/structural/gsa/references/dotnet-api/result-classes.html#element2dresult">2D Element Results</see>: `Displacement`, `Force`, `Moment`, `Shear` and `Stress`.</description></item>
/// <item><description><see href="https://docs.oasys-software.com/structural/gsa/references/dotnet-api/result-classes.html#element3dresult">3D Element Results</see>: `Displacement` and `Stress`.</description></item>
/// <item><description><see href="https://docs.oasys-software.com/structural/gsa/references/dotnet-api/result-classes.html#globalresult">Global Results</see>: `Frequency`, `LoadFactor`, `ModalGeometricStiffness`, `ModalMass`, `ModalStiffness`, `TotalLoad`, `TotalReaction`, `Mode`, `EffectiveInertia`, `EffectiveMass` and `Eigenvalue`.</description></item>
/// </list></para>
/// <para>All result values from the <see href="https://docs.oasys-software.com/structural/gsa/references/dotnet-api/introduction.html">.NET API</see> have been wrapped in <see href="https://docs.oasys-software.com/structural/gsa/references/gsagh/gsagh-unitnumber-parameter.html">Unit Number</see> and can be converted into different measures on the fly. The Result parameter caches the result values.</para>
/// </summary>
public interface IGsaResult {
public int CaseId { get; }
public string CaseName { get; }
Expand Down

0 comments on commit d64c941

Please sign in to comment.