Skip to content

Update namespace for some engine methods #380

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Robot_Adapter/CRUD/Create/Elements/Bars.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
using RobotOM;
using BH.oM.Adapters.Robot;
using BH.Engine.Structure;
using BH.Engine.Robot;
using BH.oM.Geometry;
using BH.Engine.Geometry;

Expand Down
1 change: 0 additions & 1 deletion Robot_Adapter/CRUD/Create/Elements/Panels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
using BHEG = BH.Engine.Geometry;
using BH.Engine.Structure;
using BH.oM.Structure.Constraints;
using BH.Engine.Robot;
using BH.Engine.Spatial;
using BH.Engine.Geometry;
using System;
Expand Down
1 change: 0 additions & 1 deletion Robot_Adapter/CRUD/Create/Groups and Lists/Groups.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
using BH.oM.Base;
using RobotOM;

using BH.Engine.Robot;

namespace BH.Adapter.Robot
{
Expand Down
2 changes: 1 addition & 1 deletion Robot_Adapter/CRUD/Create/Properties/LinearReleases.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* along with this code. If not, see <https://www.gnu.org/licenses/lgpl-3.0.html>.
*/

using BH.Engine.Robot;

using BH.oM.Structure.Constraints;
using RobotOM;
using System.Collections.Generic;
Expand Down
2 changes: 1 addition & 1 deletion Robot_Adapter/CRUD/Create/Properties/Supports.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
using BH.oM.Structure.Constraints;
using BH.Engine.Structure;
using RobotOM;
using BH.Engine.Robot;


namespace BH.Adapter.Robot
{
Expand Down
2 changes: 1 addition & 1 deletion Robot_Adapter/CRUD/Read/Elements/Bars.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
using BH.oM.Adapters.Robot;
using BHE = BH.Engine.Adapters.Robot;
using BH.Engine.Base.Objects;
using BH.Engine.Robot;
using BH.Engine.Adapters.Robot;

namespace BH.Adapter.Robot
{
Expand Down
3 changes: 1 addition & 2 deletions Robot_Adapter/CRUD/Read/Loads/ControurLoads.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
using BH.oM.Geometry;
using BH.oM.Base;
using BH.oM.Structure.Loads;
using BH.oM.Adapters.Robot;
using BH.Engine.Robot;



namespace BH.Adapter.Robot
Expand Down
2 changes: 1 addition & 1 deletion Robot_Adapter/CRUD/Read/Loads/GeometricalLineLoads.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
using BH.oM.Base;
using BH.oM.Structure.Loads;
using BH.oM.Adapters.Robot;
using BH.Engine.Robot;



namespace BH.Adapter.Robot
Expand Down
2 changes: 1 addition & 1 deletion Robot_Adapter/CRUD/Read/Loads/Loads.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
using BH.oM.Base;
using BH.oM.Structure.Loads;
using BH.oM.Adapters.Robot;
using BH.Engine.Robot;
using BH.Engine.Adapters.Robot;


namespace BH.Adapter.Robot
Expand Down
1 change: 0 additions & 1 deletion Robot_Adapter/CRUD/Read/Read.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
using BH.oM.Data.Requests;
using System.Linq;
using BH.oM.Adapter;
using BH.oM.Structure.MaterialFragments;

namespace BH.Adapter.Robot
{
Expand Down
1 change: 0 additions & 1 deletion Robot_Adapter/CRUD/Read/Results/MeshResults.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
using BH.oM.Structure.Results;
using RobotOM;
using System.Collections;
using BH.Engine.Robot;
using BH.oM.Geometry.CoordinateSystem;
using System.Linq;
using BH.oM.Data.Requests;
Expand Down
2 changes: 1 addition & 1 deletion Robot_Adapter/CRUD/Update/Properties/Materials.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* along with this code. If not, see <https://www.gnu.org/licenses/lgpl-3.0.html>.
*/

using BH.Engine.Robot;

using BH.oM.Structure.MaterialFragments;
using RobotOM;
using System.Collections.Generic;
Expand Down
6 changes: 2 additions & 4 deletions Robot_Adapter/CRUD/Update/Properties/SurfaceProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@
* along with this code. If not, see <https://www.gnu.org/licenses/lgpl-3.0.html>.
*/

using BH.Engine.Robot;
using BH.oM.Structure.MaterialFragments;


using BH.oM.Structure.SurfaceProperties;
using RobotOM;
using System.Collections.Generic;
using System.Linq;

namespace BH.Adapter.Robot
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
using BH.oM.Geometry;
using BH.oM.Structure.Loads;
using System.Collections.Generic;
using BH.Engine.External.Robot;
using BH.Engine.Adapters.Robot;
using BH.oM.Base;
using BH.oM.Structure.Elements;
using System;
Expand Down
10 changes: 5 additions & 5 deletions Robot_Adapter/Convert/FromRobot/Properties/Material.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,21 @@ public static IMaterialFragment FromRobot(this IRobotLabel robotLabel, IRobotMat
switch (robotLabelData.Type)
{
case IRobotMaterialType.I_MT_STEEL:
material = Engine.Structure.Create.Steel(name, robotLabelData.E, robotLabelData.NU, robotLabelData.LX, robotLabelData.RO / Engine.Robot.Query.RobotGravityConstant, robotLabelData.DumpCoef, robotLabelData.RE, robotLabelData.RT);
material = Engine.Structure.Create.Steel(name, robotLabelData.E, robotLabelData.NU, robotLabelData.LX, robotLabelData.RO / Engine.Adapters.Robot.Query.RobotGravityConstant, robotLabelData.DumpCoef, robotLabelData.RE, robotLabelData.RT);
break;
case IRobotMaterialType.I_MT_CONCRETE:
material = Engine.Structure.Create.Concrete(name, robotLabelData.E, robotLabelData.NU, robotLabelData.LX, robotLabelData.RO / Engine.Robot.Query.RobotGravityConstant, robotLabelData.DumpCoef, 0, 0);
material = Engine.Structure.Create.Concrete(name, robotLabelData.E, robotLabelData.NU, robotLabelData.LX, robotLabelData.RO / Engine.Adapters.Robot.Query.RobotGravityConstant, robotLabelData.DumpCoef, 0, 0);
break;
case IRobotMaterialType.I_MT_ALUMINIUM:
material = Engine.Structure.Create.Aluminium(name, robotLabelData.E, robotLabelData.NU, robotLabelData.LX, robotLabelData.RO / Engine.Robot.Query.RobotGravityConstant, robotLabelData.DumpCoef);
material = Engine.Structure.Create.Aluminium(name, robotLabelData.E, robotLabelData.NU, robotLabelData.LX, robotLabelData.RO / Engine.Adapters.Robot.Query.RobotGravityConstant, robotLabelData.DumpCoef);
break;
case IRobotMaterialType.I_MT_TIMBER:
material = Engine.Structure.Create.Timber(name, Create.Vector(robotLabelData.E, robotLabelData.E_Trans, robotLabelData.E_Trans), Create.Vector(robotLabelData.NU, robotLabelData.NU, robotLabelData.NU), Create.Vector(robotLabelData.GMean, robotLabelData.GMean, robotLabelData.GMean), Create.Vector(robotLabelData.LX, robotLabelData.LX, robotLabelData.LX), robotLabelData.RO / Engine.Robot.Query.RobotGravityConstant, robotLabelData.DumpCoef);
material = Engine.Structure.Create.Timber(name, Create.Vector(robotLabelData.E, robotLabelData.E_Trans, robotLabelData.E_Trans), Create.Vector(robotLabelData.NU, robotLabelData.NU, robotLabelData.NU), Create.Vector(robotLabelData.GMean, robotLabelData.GMean, robotLabelData.GMean), Create.Vector(robotLabelData.LX, robotLabelData.LX, robotLabelData.LX), robotLabelData.RO / Engine.Adapters.Robot.Query.RobotGravityConstant, robotLabelData.DumpCoef);
break;
case IRobotMaterialType.I_MT_OTHER:
case IRobotMaterialType.I_MT_ALL:
default:
material = new GenericIsotropicMaterial { Density = robotLabelData.RO / Engine.Robot.Query.RobotGravityConstant, DampingRatio = robotLabelData.DumpCoef, PoissonsRatio = robotLabelData.NU, ThermalExpansionCoeff = robotLabelData.LX, YoungsModulus = robotLabelData.E, EmbodiedCarbon = 0 };
material = new GenericIsotropicMaterial { Density = robotLabelData.RO / Engine.Adapters.Robot.Query.RobotGravityConstant, DampingRatio = robotLabelData.DumpCoef, PoissonsRatio = robotLabelData.NU, ThermalExpansionCoeff = robotLabelData.LX, YoungsModulus = robotLabelData.E, EmbodiedCarbon = 0 };
break;
}
return material;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

using BH.Engine.Geometry;
using BH.oM.Structure.Loads;
using BH.Engine.External.Robot;
using BH.Engine.Adapters.Robot;
using RobotOM;

namespace BH.Adapter.Robot
Expand Down
6 changes: 3 additions & 3 deletions Robot_Adapter/Convert/ToRobot/Properties/Material.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static void ToRobot(IRobotMaterialData materialData, IMaterialFragment ma
IIsotropic isotropic = material as IIsotropic;
materialData.E = isotropic.YoungsModulus;
materialData.NU = isotropic.PoissonsRatio;
materialData.RO = isotropic.Density * Engine.Robot.Query.RobotGravityConstant;
materialData.RO = isotropic.Density * Engine.Adapters.Robot.Query.RobotGravityConstant;
materialData.LX = isotropic.ThermalExpansionCoeff;
materialData.Kirchoff = isotropic.ShearModulus();
materialData.DumpCoef = isotropic.DampingRatio;
Expand All @@ -62,7 +62,7 @@ public static void ToRobot(IRobotMaterialData materialData, IMaterialFragment ma
materialData.E_Trans = Math.Abs((timber.YoungsModulus.Y + timber.YoungsModulus.Z) / 2);
Engine.Reflection.Compute.RecordWarning("Due to limitations in the Material model for orthotripic Timber materials in Robot, Young's modulus has been taken as an average bwtween the y and z-component of the vector in the BHoM material.");
}
materialData.RO = timber.Density * Engine.Robot.Query.RobotGravityConstant;
materialData.RO = timber.Density * Engine.Adapters.Robot.Query.RobotGravityConstant;
materialData.GMean = Math.Abs((timber.ShearModulus.X+ timber.ShearModulus.Y+ timber.ShearModulus.Z)/3);//Since shear modulus is expressed as shear stress over shear strain, longitudinal value is used as it is likely used for cross section analysis.
materialData.LX = timber.ThermalExpansionCoeff.X;//Value in X axis. Longitudinal expansion for bar element is likely of interets.
materialData.DumpCoef = timber.DampingRatio;
Expand All @@ -78,7 +78,7 @@ public static void ToRobot(IRobotMaterialData materialData, IMaterialFragment ma
IOrthotropic orthotropic = material as IOrthotropic;
materialData.E = orthotropic.YoungsModulus.X;
materialData.NU = orthotropic.PoissonsRatio.X;//Poisson ratio in X axis. Longitudinal defomation under axial loading is likely of interests.
materialData.RO = orthotropic.Density * Engine.Robot.Query.RobotGravityConstant;
materialData.RO = orthotropic.Density * Engine.Adapters.Robot.Query.RobotGravityConstant;
materialData.LX = orthotropic.ThermalExpansionCoeff.X;//Value in X axis. Longitudinal expansion for bar element is likely of interets.
materialData.Kirchoff = orthotropic.ShearModulus.X;//Since shear modulus is expressed as shear stress over shear strain, longitudinal value is used as it is likely used for cross section analysis.
materialData.DumpCoef = orthotropic.DampingRatio;
Expand Down
3 changes: 2 additions & 1 deletion Robot_Engine/Compute/GroupBarsByLength.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@
using BH.oM.Structure.Elements;
using BH.Engine.Structure;

namespace BH.Engine.External.Robot
namespace BH.Engine.Adapters.Robot
{
public static partial class Compute
{
/***************************************************/
/**** Public Methods ****/
/***************************************************/

[PreviousVersion("3.2", "BH.Engine.External.Robot.Compute.GroupBarsByLength(System.Collections.Generic.IEnumerable<BH.oM.Structure.Elements.Bar>, System.Double)")]
[Description("Groups bars by length, within a tolerance.")]
[Input("bars", "The bars to group.")]
[Input("tolerance", "Acceptable difference in length for each group")]
Expand Down
2 changes: 1 addition & 1 deletion Robot_Engine/Objects/Comparers/LoadingPanelProperty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
using System;
using BH.oM.Structure.SurfaceProperties;

namespace BH.Engine.Robot
namespace BH.Engine.Adapters.Robot
{
public class LoadingPanelPropertyComparer : IEqualityComparer<LoadingPanelProperty>
{
Expand Down
2 changes: 1 addition & 1 deletion Robot_Engine/Query/RobotGravityConstant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
using System.Text;
using System.Threading.Tasks;

namespace BH.Engine.Robot
namespace BH.Engine.Adapters.Robot
{
public static partial class Query
{
Expand Down
4 changes: 3 additions & 1 deletion Robot_Engine/Query/ToDictionaryDistinctCheck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,17 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BH.oM.Reflection.Attributes;

namespace BH.Engine.Robot
namespace BH.Engine.Adapters.Robot
{
public static partial class Query
{
/***************************************************/
/**** Public Methods ****/
/***************************************************/

[PreviousVersion("3.2", "BH.Engine.Robot.Query.ToDictionaryDistinctCheck(System.Collections.Generic.IEnumerable<BH.Engine.Robot.T>, System.Func<BH.Engine.Robot.T, System.String>)")]
public static Dictionary<string, T> ToDictionaryDistinctCheck<T>(this IEnumerable<T> list, Func<T, string> selector)
{
var group = list.GroupBy(selector);
Expand Down
6 changes: 3 additions & 3 deletions Robot_Engine/Robot_Engine.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
Expand All @@ -7,7 +7,7 @@
<ProjectGuid>{45D542CD-79B5-485A-BA39-0163230431F0}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BH.Engine.Robot</RootNamespace>
<RootNamespace>BH.Engine.Adapters.Robot</RootNamespace>
<AssemblyName>Robot_Engine</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
Expand Down Expand Up @@ -140,4 +140,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
6 changes: 3 additions & 3 deletions Robot_oM/Robot_oM.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
Expand All @@ -7,7 +7,7 @@
<ProjectGuid>{0DD05698-6A33-4092-BFAD-FF702685FEAF}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BH.oM.Structural.Adapters.Robot</RootNamespace>
<RootNamespace>BH.oM.Adapters.Robot</RootNamespace>
<AssemblyName>Robot_oM</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
Expand Down Expand Up @@ -86,4 +86,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>