Skip to content

Commit

Permalink
Revert pluralisation changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Fraser Greenroyd authored and Fraser Greenroyd committed Dec 9, 2019
1 parent b9f51b3 commit f2b8b47
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Etabs_Adapter/Etabs_Adapter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BH.Adapter.ETABS</RootNamespace>
<AssemblyName>ETABS_Adapter</AssemblyName>
<AssemblyName>ETABS17_Adapter</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
Expand Down
12 changes: 7 additions & 5 deletions Etabs_Adapter/Read/Bar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ public partial class ETABS2016Adapter : BHoMAdapter
{
/***************************************************/

private List<Bar> ReadBars(List<string> ids = null)
private List<Bar> ReadBar(List<string> ids = null)
{
List<Bar> barList = new List<Bar>();
Dictionary<string, Node> bhomNodes = ReadNodes().ToDictionary(x => x.CustomData[AdapterId].ToString());
Dictionary<string, ISectionProperty> bhomSections = ReadSectionProperties().ToDictionary(x => x.CustomData[AdapterId].ToString());
Dictionary<string, Node> bhomNodes = ReadNode().ToDictionary(x => x.CustomData[AdapterId].ToString());
Dictionary<string, ISectionProperty> bhomSections = ReadSectionProperty().ToDictionary(x => x.CustomData[AdapterId].ToString());

int nameCount = 0;
string[] names = { };
Expand Down Expand Up @@ -121,7 +121,7 @@ private List<Bar> ReadBars(List<string> ids = null)

/***************************************************/

private List<ISectionProperty> ReadSectionProperties(List<string> ids = null)
private List<ISectionProperty> ReadSectionProperty(List<string> ids = null)
{
List<ISectionProperty> propList = new List<ISectionProperty>();
Dictionary<String, IMaterialFragment> bhomMaterials = ReadMaterial().ToDictionary(x => x.Name);
Expand Down Expand Up @@ -290,8 +290,10 @@ private List<ISectionProperty> ReadSectionProperties(List<string> ids = null)
break;
}
if (dimensions == null)
{
Engine.Reflection.Compute.RecordNote(propertyType.ToString() + " properties are not implemented in ETABS adapter. An empty section has been returned.");
constructSelector = "explicit";
constructSelector = "explicit";
}
#endregion


Expand Down
4 changes: 2 additions & 2 deletions Etabs_Adapter/Read/Link.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ private List<RigidLink> ReadRigidLink(List<string> ids = null)
string endId = "";
m_model.LinkObj.GetPoints(kvp.Key, ref startId, ref endId);

List<Node> endNodes = ReadNodes(new List<string> { startId, endId });
List<Node> endNodes = ReadNode(new List<string> { startId, endId });
bhLink.MasterNode = endNodes[0];
bhLink.SlaveNodes = new List<Node>() { endNodes[1] };
}
Expand All @@ -117,7 +117,7 @@ private List<RigidLink> ReadRigidLink(List<string> ids = null)
nodeIdsToRead.Add(endId);
}

List<Node> endNodes = ReadNodes(nodeIdsToRead);
List<Node> endNodes = ReadNode(nodeIdsToRead);
bhLink.MasterNode = endNodes[0];
endNodes.RemoveAt(0);
bhLink.SlaveNodes = endNodes;
Expand Down
4 changes: 2 additions & 2 deletions Etabs_Adapter/Read/Load.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ private List<ILoad> ReadPointLoad(List<Loadcase> loadcases)
{
List<ILoad> bhLoads = new List<ILoad>();

Dictionary<string, Node> bhomNodes = ReadNodes().ToDictionary(x => x.CustomData[AdapterId].ToString());
Dictionary<string, Node> bhomNodes = ReadNode().ToDictionary(x => x.CustomData[AdapterId].ToString());

string[] names = null;
string[] loadcase = null;
Expand Down Expand Up @@ -201,7 +201,7 @@ private List<ILoad> ReadBarLoad(List<Loadcase> loadcases)
{
List<ILoad> bhLoads = new List<ILoad>();

Dictionary<string, Bar> bhomBars = ReadBars().ToDictionary(x => x.CustomData[AdapterId].ToString());
Dictionary<string, Bar> bhomBars = ReadBar().ToDictionary(x => x.CustomData[AdapterId].ToString());

string[] names = null;
string[] loadcase = null;
Expand Down
4 changes: 2 additions & 2 deletions Etabs_Adapter/Read/Node.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
using BH.oM.Geometry;
using BH.Engine.Geometry;
using BH.Engine.Reflection;
using BH.oM.Architecture.Elements;
using BH.oM.Geometry.SettingOut;
using BH.oM.Adapters.ETABS.Elements;

namespace BH.Adapter.ETABS
Expand All @@ -55,7 +55,7 @@ public partial class ETABS2016Adapter : BHoMAdapter
{
/***************************************************/

private List<Node> ReadNodes(List<string> ids = null)
private List<Node> ReadNode(List<string> ids = null)
{
List<Node> nodeList = new List<Node>();

Expand Down
9 changes: 5 additions & 4 deletions Etabs_Adapter/Read/_Read.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
using BH.oM.Geometry;
using BH.Engine.Geometry;
using BH.Engine.Reflection;
using BH.oM.Geometry.SettingOut;
using BH.oM.Architecture.Elements;
using BH.oM.Adapters.ETABS.Elements;

Expand All @@ -60,11 +61,11 @@ public partial class ETABS2016Adapter : BHoMAdapter
protected override IEnumerable<IBHoMObject> Read(Type type, IList ids)
{
if (type == typeof(Node))
return ReadNodes(ids as dynamic);
return ReadNode(ids as dynamic);
else if (type == typeof(Bar))
return ReadBars(ids as dynamic);
return ReadBar(ids as dynamic);
else if (type == typeof(ISectionProperty) || type.GetInterfaces().Contains(typeof(ISectionProperty)))
return ReadSectionProperties(ids as dynamic);
return ReadSectionProperty(ids as dynamic);
else if (type == typeof(IMaterialFragment))
return ReadMaterial(ids as dynamic);
else if (type == typeof(Panel))
Expand All @@ -81,7 +82,7 @@ protected override IEnumerable<IBHoMObject> Read(Type type, IList ids)
return ReadRigidLink(ids as dynamic);
else if (type == typeof(LinkConstraint))
return ReadLinkConstraints(ids as dynamic);
else if (type == typeof(Level))
else if (type == typeof(oM.Geometry.SettingOut.Level) || type == typeof(oM.Architecture.Elements.Level))
return ReadLevel(ids as dynamic);
else if (type == typeof(FEMesh))
return ReadMesh(ids as dynamic);
Expand Down

0 comments on commit f2b8b47

Please sign in to comment.