Skip to content

Commit

Permalink
starting BIM folder and refactor Door namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonie-kramer committed Nov 16, 2023
1 parent a5febf9 commit 209214b
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 34 deletions.
11 changes: 6 additions & 5 deletions Elements.Serialization.IFC/src/IFCElementExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Elements.Geometry.Interfaces;
using Elements.Geometry.Solids;
using Elements.Interfaces;
using Elements.BIM;
using IFC;

namespace Elements.Serialization.IFC
Expand Down Expand Up @@ -192,17 +193,17 @@ private static List<IfcRepresentationItem> AddSolidOperationToDocument(Document
var ifcRepresentations = new List<IfcRepresentationItem>();
if (op is Sweep sweep)
{
// Neither of these entities, which are part of the
// IFC4 specification, and which would allow a sweep
// along a curve, are supported by many applications
// Neither of these entities, which are part of the
// IFC4 specification, and which would allow a sweep
// along a curve, are supported by many applications
// which are supposedly IFC4 compliant (Revit). For
// Those applications where these entities appear,
// the rotation of the profile is often wrong or
// the rotation of the profile is often wrong or
// inconsistent.
// geom = sweep.ToIfcSurfaceCurveSweptAreaSolid(doc);
// geom = sweep.ToIfcFixedReferenceSweptAreaSolid(geoElement.Transform, doc);

// Instead, we'll divide the curve and create a set of
// Instead, we'll divide the curve and create a set of
// linear extrusions instead.
Polyline pline;
if (sweep.Curve is Line)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Elements.Geometry;
using Elements.Serialization.IFC.IFCToHypar.RepresentationsExtraction;
using Elements.BIM;
using IFC;
using System;
using System.Collections.Generic;
Expand Down
3 changes: 2 additions & 1 deletion Elements.Serialization.IFC/src/IFCToHypar/IFCExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Elements.Geometry;
using Elements.Geometry.Interfaces;
using Elements.Geometry.Solids;
using Elements.BIM;
using IFC;

namespace Elements.Serialization.IFC.IFCToHypar
Expand Down Expand Up @@ -131,7 +132,7 @@ internal static ICurve ToCurve(this IfcParameterizedProfileDef profile)
}
else if (profile is IfcCircleProfileDef ifcCircle)
{
var circle = new Circle((IfcLengthMeasure) ifcCircle.Radius);
var circle = new Circle((IfcLengthMeasure)ifcCircle.Radius);
return circle.Transformed(transform);
}
else
Expand Down
24 changes: 1 addition & 23 deletions Elements/src/Door.cs → Elements/src/BIM/Door/Door.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Newtonsoft.Json;
using Elements.Geometry.Solids;

namespace Elements
namespace Elements.BIM
{
/// <summary>Definition of a door</summary>
public class Door : GeometricElement
Expand Down Expand Up @@ -376,26 +376,4 @@ private List<Vector3> CollectSchematicVisualizationLines(Door door, bool leftSid
return points;
}
}

public enum DoorOpeningSide
{
[System.Runtime.Serialization.EnumMember(Value = @"Undefined")]
Undefined,
[System.Runtime.Serialization.EnumMember(Value = @"Left Hand")]
LeftHand,
[System.Runtime.Serialization.EnumMember(Value = @"Right Hand")]
RightHand,
[System.Runtime.Serialization.EnumMember(Value = @"Double Door")]
DoubleDoor
}

public enum DoorOpeningType
{
[System.Runtime.Serialization.EnumMember(Value = @"Undefined")]
Undefined,
[System.Runtime.Serialization.EnumMember(Value = @"Single Swing")]
SingleSwing,
[System.Runtime.Serialization.EnumMember(Value = @"Double Swing")]
DoubleSwing
}
}
14 changes: 14 additions & 0 deletions Elements/src/BIM/Door/DoorOpeningSide.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace Elements.BIM
{
public enum DoorOpeningSide

Check warning on line 3 in Elements/src/BIM/Door/DoorOpeningSide.cs

View workflow job for this annotation

GitHub Actions / build-and-test

Missing XML comment for publicly visible type or member 'DoorOpeningSide'
{
[System.Runtime.Serialization.EnumMember(Value = @"Undefined")]
Undefined,

Check warning on line 6 in Elements/src/BIM/Door/DoorOpeningSide.cs

View workflow job for this annotation

GitHub Actions / build-and-test

Missing XML comment for publicly visible type or member 'DoorOpeningSide.Undefined'
[System.Runtime.Serialization.EnumMember(Value = @"Left Hand")]
LeftHand,

Check warning on line 8 in Elements/src/BIM/Door/DoorOpeningSide.cs

View workflow job for this annotation

GitHub Actions / build-and-test

Missing XML comment for publicly visible type or member 'DoorOpeningSide.LeftHand'
[System.Runtime.Serialization.EnumMember(Value = @"Right Hand")]
RightHand,

Check warning on line 10 in Elements/src/BIM/Door/DoorOpeningSide.cs

View workflow job for this annotation

GitHub Actions / build-and-test

Missing XML comment for publicly visible type or member 'DoorOpeningSide.RightHand'
[System.Runtime.Serialization.EnumMember(Value = @"Double Door")]
DoubleDoor

Check warning on line 12 in Elements/src/BIM/Door/DoorOpeningSide.cs

View workflow job for this annotation

GitHub Actions / build-and-test

Missing XML comment for publicly visible type or member 'DoorOpeningSide.DoubleDoor'
}
}
12 changes: 12 additions & 0 deletions Elements/src/BIM/Door/DoorOpeningType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace Elements.BIM
{
public enum DoorOpeningType

Check warning on line 3 in Elements/src/BIM/Door/DoorOpeningType.cs

View workflow job for this annotation

GitHub Actions / build-and-test

Missing XML comment for publicly visible type or member 'DoorOpeningType'
{
[System.Runtime.Serialization.EnumMember(Value = @"Undefined")]
Undefined,

Check warning on line 6 in Elements/src/BIM/Door/DoorOpeningType.cs

View workflow job for this annotation

GitHub Actions / build-and-test

Missing XML comment for publicly visible type or member 'DoorOpeningType.Undefined'
[System.Runtime.Serialization.EnumMember(Value = @"Single Swing")]
SingleSwing,

Check warning on line 8 in Elements/src/BIM/Door/DoorOpeningType.cs

View workflow job for this annotation

GitHub Actions / build-and-test

Missing XML comment for publicly visible type or member 'DoorOpeningType.SingleSwing'
[System.Runtime.Serialization.EnumMember(Value = @"Double Swing")]
DoubleSwing

Check warning on line 10 in Elements/src/BIM/Door/DoorOpeningType.cs

View workflow job for this annotation

GitHub Actions / build-and-test

Missing XML comment for publicly visible type or member 'DoorOpeningType.DoubleSwing'
}
}
1 change: 1 addition & 0 deletions Elements/src/StandardWall.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using Elements.Geometry;
using Elements.Geometry.Solids;
using Elements.BIM;

namespace Elements
{
Expand Down
6 changes: 1 addition & 5 deletions Elements/test/DoorTest.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
using Elements.Geometry;
using Elements.Tests;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Elements.BIM;
using Xunit;

namespace Elements
Expand Down

0 comments on commit 209214b

Please sign in to comment.