Skip to content

Commit 04a8efc

Browse files
author
Vadim Semenov
committed
Create structural entities classes in Core.
Add Revit project.
1 parent 21f6c6a commit 04a8efc

29 files changed

+476
-1
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -362,3 +362,5 @@ MigrationBackup/
362362
# Fody - auto-generated XML schema
363363
FodyWeavers.xsd
364364
/src/ObjDir/2019/RedButton.Common.TeklaStructures/.NETFramework,Version=v4.8.AssemblyAttributes.cs
365+
/src/ObjDir/2019/RedButton.Common.TeklaStructures/TempPE
366+
/src/ObjDir/2019/RedButton.Common.TeklaStructures

src/Common/RedButton.Common.Core/RedButton.Common.Core.csproj

+24-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,26 @@
4646
<Compile Include="Geometry\Extensions\VectorExtension.cs" />
4747
<Compile Include="Geometry\Interfaces\ILineSegment.cs" />
4848
<Compile Include="Geometry\Interfaces\IPoint.cs" />
49+
<Compile Include="Structure\Beam.cs" />
50+
<Compile Include="Structure\Coloumn.cs" />
51+
<Compile Include="Structure\Grid.cs" />
52+
<Compile Include="Structure\Interfaces\Enum\ProfileType.cs" />
53+
<Compile Include="Structure\Interfaces\Foundation\IPadFoundation.cs" />
54+
<Compile Include="Structure\Interfaces\Foundation\IPile.cs" />
55+
<Compile Include="Structure\Interfaces\Foundation\ISlabFoundation.cs" />
56+
<Compile Include="Structure\Interfaces\Foundation\IStripFoundation.cs" />
57+
<Compile Include="Structure\Interfaces\Structural\IBeam.cs" />
58+
<Compile Include="Structure\Interfaces\Structural\IColumn.cs" />
59+
<Compile Include="Structure\Interfaces\IGrid.cs" />
60+
<Compile Include="Structure\Interfaces\Structural\IPlate.cs" />
61+
<Compile Include="Structure\Interfaces\Structural\ISlab.cs" />
62+
<Compile Include="Structure\Interfaces\IStructureElement.cs" />
63+
<Compile Include="Structure\Interfaces\Structural\IWall.cs" />
64+
<Compile Include="Structure\Interfaces\Enum\Material.cs" />
65+
<Compile Include="Structure\PadFoundation.cs" />
66+
<Compile Include="Structure\Pile.cs" />
67+
<Compile Include="Structure\Plate.cs" />
68+
<Compile Include="Structure\Slab.cs" />
4969
<Compile Include="Geometry\Interfaces\IVector.cs" />
5070
<Compile Include="Geometry\Interfaces\IGeometryObject.cs" />
5171
<Compile Include="Geometry\Enums\SphereAccuracy.cs" />
@@ -58,9 +78,12 @@
5878
<Compile Include="Maths\Common.cs" />
5979
<Compile Include="Maths\Matrix.cs" />
6080
<Compile Include="Properties\AssemblyInfo.cs" />
81+
<Compile Include="Structure\SlabFoundation.cs" />
82+
<Compile Include="Structure\StripFoundation.cs" />
83+
<Compile Include="Structure\Wall.cs" />
6184
</ItemGroup>
6285
<ItemGroup>
63-
<Folder Include="Common" />
86+
<Folder Include="Common\" />
6487
</ItemGroup>
6588
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
6689
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
namespace RedButton.Common.Core.Geometry.Interfaces
2+
{
3+
public class Beam : IBeam
4+
{
5+
public Material Material { get; set; }
6+
public IPoint StartPoint { get; set; }
7+
public IPoint EndPoint { get; set; }
8+
public string Profile { get; set; }
9+
public ProfileType ProfileType { get; set; }
10+
11+
public Beam(Material material, IPoint startPoint, IPoint endPoint, string profile, ProfileType profileType)
12+
{
13+
Material = material;
14+
StartPoint = startPoint;
15+
EndPoint = endPoint;
16+
Profile = profile;
17+
ProfileType = profileType;
18+
}
19+
}
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
namespace RedButton.Common.Core.Geometry.Interfaces
2+
{
3+
public class Coloumn : IColumn
4+
{
5+
public Material Material { get; set; }
6+
public IPoint StartPoint { get; set; }
7+
public IPoint EndPoint { get; set; }
8+
public string Profile { get; set; }
9+
public ProfileType ProfileType { get; set; }
10+
11+
public Coloumn(Material material, IPoint startPoint, IPoint endPoint, string profile, ProfileType profileType)
12+
{
13+
Material = material;
14+
StartPoint = startPoint;
15+
EndPoint = endPoint;
16+
Profile = profile;
17+
ProfileType = profileType;
18+
}
19+
}
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
using System.Collections.Generic;
2+
3+
namespace RedButton.Common.Core.Geometry.Interfaces
4+
{
5+
public class Grid : IGrid
6+
{
7+
public IPoint AxisStartPoint { get; set; }
8+
public List<string> AxisX { get; set; }
9+
public List<string> AxisY { get; set; }
10+
public List<string> AxisZ { get; set; }
11+
public List<double> AxisesDistanceX { get; set; }
12+
public List<double> AxisesDistanceY { get; set; }
13+
public List<double> AxisesDistanceZ { get; set; }
14+
15+
public Grid(IPoint axisStartPoint, List<string> axisX, List<string> axisY, List<string> axisZ, List<double> axisesDistanceX, List<double> axisesDistanceY, List<double> axisesDistanceZ)
16+
{
17+
AxisStartPoint = axisStartPoint;
18+
AxisX = axisX;
19+
AxisY = axisY;
20+
AxisZ = axisZ;
21+
AxisesDistanceX = axisesDistanceX;
22+
AxisesDistanceY = axisesDistanceY;
23+
AxisesDistanceZ = axisesDistanceZ;
24+
}
25+
}
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace RedButton.Common.Core.Geometry.Interfaces
2+
{
3+
public enum Material
4+
{
5+
Steel = 0,
6+
Concrete = 1,
7+
Wood = 2,
8+
Composite = 3
9+
}
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace RedButton.Common.Core.Geometry.Interfaces
2+
{
3+
public enum ProfileType
4+
{
5+
Square = 0,
6+
Round = 1,
7+
Rectangular = 2,
8+
Custom = 3
9+
}
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace RedButton.Common.Core.Geometry.Interfaces.Foundation
2+
{
3+
public interface IPadFoundation : IStructureElement, ISlab
4+
{
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
using System.Collections.Specialized;
2+
3+
namespace RedButton.Common.Core.Geometry.Interfaces.Foundation
4+
{
5+
public interface IPile : IStructureElement
6+
{
7+
IPoint DownPoint { get; set; }
8+
IPoint UpPoint { get; set; }
9+
ProfileType ProfileType { get; set; }
10+
}
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace RedButton.Common.Core.Geometry.Interfaces.Foundation
2+
{
3+
public interface ISlabFoundation : ISlab
4+
{
5+
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
using System.Collections.Generic;
2+
3+
namespace RedButton.Common.Core.Geometry.Interfaces.Foundation
4+
{
5+
public interface IStripFoundation : IStructureElement
6+
{
7+
List<IPoint> StripFoundationPath { get; set; }
8+
string Profile { get; set; }
9+
ProfileType ProfileType { get; set; }
10+
}
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using System.Collections.Generic;
2+
3+
namespace RedButton.Common.Core.Geometry.Interfaces
4+
{
5+
public interface IGrid
6+
{
7+
IPoint AxisStartPoint { get; set; }
8+
List<string> AxisX { get; set; }
9+
List<string> AxisY { get; set; }
10+
List<string> AxisZ { get; set; }
11+
12+
List<double> AxisesDistanceX { get; set; }
13+
List<double> AxisesDistanceY { get; set; }
14+
List<double> AxisesDistanceZ { get; set; }
15+
}
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace RedButton.Common.Core.Geometry.Interfaces
2+
{
3+
public interface IStructureElement
4+
{
5+
Material Material { get; set; }
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace RedButton.Common.Core.Geometry.Interfaces
2+
{
3+
public interface IBeam : IStructureElement
4+
{
5+
IPoint StartPoint { get; set; }
6+
IPoint EndPoint { get; set; }
7+
string Profile { get; set; }
8+
ProfileType ProfileType { get; set; }
9+
}
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace RedButton.Common.Core.Geometry.Interfaces
2+
{
3+
public interface IColumn : IStructureElement
4+
{
5+
IPoint StartPoint { get; set; }
6+
IPoint EndPoint { get; set; }
7+
string Profile { get; set; }
8+
ProfileType ProfileType { get; set; }
9+
}
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System.Collections.Generic;
2+
3+
namespace RedButton.Common.Core.Geometry.Interfaces
4+
{
5+
public interface IPlate: IStructureElement
6+
{
7+
List<IPoint> ContourPoints { get; set; }
8+
double Width { get; set; }
9+
}
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using System.Collections.Generic;
2+
using System.Security.Cryptography.X509Certificates;
3+
4+
namespace RedButton.Common.Core.Geometry.Interfaces
5+
{
6+
public interface ISlab : IStructureElement
7+
{
8+
List<IPoint> ContourPoints { get; set; }
9+
double Width { get; set; }
10+
11+
double Area { get; set; }
12+
}
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
namespace RedButton.Common.Core.Geometry.Interfaces
2+
{
3+
public interface IWall : IStructureElement
4+
{
5+
IPoint StartPoint { get; set; }
6+
IPoint EndPoint { get; set; }
7+
double StartHeight { get; set; }
8+
double EndHeight { get; set; }
9+
double Width { get; set; }
10+
}
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System.Collections.Generic;
2+
using RedButton.Common.Core.Geometry.Interfaces.Foundation;
3+
4+
namespace RedButton.Common.Core.Geometry.Interfaces
5+
{
6+
public class PadFoundation:IPadFoundation
7+
{
8+
public Material Material { get; set; }
9+
public List<IPoint> ContourPoints { get; set; }
10+
public double Width { get; set; }
11+
public double Area { get; set; }
12+
13+
public PadFoundation(Material material, List<IPoint> contourPoints, double width, double area)
14+
{
15+
Material = material;
16+
ContourPoints = contourPoints;
17+
Width = width;
18+
Area = area;
19+
}
20+
}
21+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using RedButton.Common.Core.Geometry.Interfaces.Foundation;
2+
3+
namespace RedButton.Common.Core.Geometry.Interfaces
4+
{
5+
public class Pile :IPile
6+
{
7+
public Material Material { get; set; }
8+
public IPoint DownPoint { get; set; }
9+
public IPoint UpPoint { get; set; }
10+
public ProfileType ProfileType { get; set; }
11+
12+
public Pile(Material material, IPoint downPoint, IPoint upPoint, ProfileType profileType)
13+
{
14+
Material = material;
15+
DownPoint = downPoint;
16+
UpPoint = upPoint;
17+
ProfileType = profileType;
18+
}
19+
}
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System.Collections.Generic;
2+
3+
namespace RedButton.Common.Core.Geometry.Interfaces
4+
{
5+
public class Plate : IPlate
6+
{
7+
public Material Material { get; set; }
8+
public List<IPoint> ContourPoints { get; set; }
9+
public double Width { get; set; }
10+
11+
public Plate(Material material, List<IPoint> contourPoints, double width)
12+
{
13+
Material = material;
14+
ContourPoints = contourPoints;
15+
Width = width;
16+
}
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System.Collections.Generic;
2+
3+
namespace RedButton.Common.Core.Geometry.Interfaces
4+
{
5+
public class Slab : ISlab
6+
{
7+
public List<IPoint> ContourPoints { get; set; }
8+
public Material Material { get; set; }
9+
public double Width { get; set; }
10+
public double Area { get; set; }
11+
12+
public Slab(List<IPoint> contourPoints, double width)
13+
{
14+
ContourPoints = contourPoints;
15+
Width = width;
16+
}
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System.Collections.Generic;
2+
using RedButton.Common.Core.Geometry.Interfaces.Foundation;
3+
4+
namespace RedButton.Common.Core.Geometry.Interfaces
5+
{
6+
public class SlabFoundation : ISlabFoundation
7+
{
8+
public Material Material { get; set; }
9+
public List<IPoint> ContourPoints { get; set; }
10+
public double Width { get; set; }
11+
public double Area { get; set; }
12+
13+
public SlabFoundation(Material material, List<IPoint> contourPoints, double width, double area)
14+
{
15+
Material = material;
16+
ContourPoints = contourPoints;
17+
Width = width;
18+
Area = area;
19+
}
20+
}
21+
}

0 commit comments

Comments
 (0)