Skip to content
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

Door-representation-improvements-ak #1057

Merged
merged 43 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
fa81fc2
Added summaries and improved Door constructors
srudenkoamc Oct 26, 2023
5bddae2
Removed OriginalPosition property
srudenkoamc Oct 27, 2023
419f7c0
Removed redundant constructor
srudenkoamc Oct 27, 2023
7196aa2
Fixed Door deserialization issue
srudenkoamc Oct 31, 2023
8dc16fb
Move Door related staff to separate folder
srudenkoamc Oct 31, 2023
438932f
Moved solid representation creation logic to a separate class
srudenkoamc Oct 31, 2023
1295d25
Moved curve representation to DoorRepresentationFactory
srudenkoamc Oct 31, 2023
b1f3bd2
Merge branch 'hypar-io:master' into door-representation-improvements
srudenkoamc Oct 31, 2023
6d90fea
Merge branch 'door-representation-improvements' of https://github.com…
srudenkoamc Oct 31, 2023
ebd35b5
Use DoorRepresentationProvider instead of static DoorRepresentationFa…
srudenkoamc Nov 6, 2023
7a3999a
Merge branch 'master' into door-representation-improvements
srudenkoamc Nov 6, 2023
20c134f
Moved Door related classes back to Elements
srudenkoamc Nov 8, 2023
b2955d3
Merge branch 'door-representation-improvements' of https://github.com…
srudenkoamc Nov 8, 2023
43a9602
Added dictionary that stores created representations
srudenkoamc Nov 8, 2023
9f71429
Merge branch 'master' into door-representation-improvements
srudenkoamc Nov 8, 2023
2ca2fb4
Reverted adding of RepresentationProvider class
srudenkoamc Nov 8, 2023
c3640b7
Merge commit '6d1006514e46fa15e5214b0a4d5c96a10f1c26e2' into HEAD
anthonie-kramer Nov 8, 2023
93d5af2
updates for frame and opening
anthonie-kramer Nov 9, 2023
8009b04
Merge remote-tracking branch 'upstream/master' into door-representati…
srudenkoamc Nov 9, 2023
5b8de09
Update IFCTests.cs
srudenkoamc Nov 9, 2023
438b5e1
Merge branch 'master' into door-representation-improvements
srudenkoamc Nov 10, 2023
92ad64f
Merge branch 'master' into door-representation-improvements
srudenkoamc Nov 14, 2023
d7a673f
Move Door schematic visualization to a separate class
srudenkoamc Nov 14, 2023
671e4e4
Split frame representation from solid representation
srudenkoamc Nov 14, 2023
c2a2610
Added Thickness property to Door class
srudenkoamc Nov 15, 2023
599889e
Fixed an issue with Opening
srudenkoamc Nov 15, 2023
9e004b5
Update DoorTest.cs
srudenkoamc Nov 15, 2023
6410b9d
Fixed door ifc test
srudenkoamc Nov 15, 2023
5fa8f81
Fixed IFCTests
srudenkoamc Nov 15, 2023
f3ebe0a
Added AddDoorOpening method to StandardWall class
srudenkoamc Nov 15, 2023
534ebcf
refactoring during merge
anthonie-kramer Nov 15, 2023
282075f
removals
anthonie-kramer Nov 15, 2023
cef84bb
door refactor
anthonie-kramer Nov 15, 2023
a5febf9
format comments
anthonie-kramer Nov 16, 2023
209214b
starting BIM folder and refactor Door namespace
anthonie-kramer Nov 16, 2023
45e7095
storage
anthonie-kramer Nov 17, 2023
92a342f
no bim
anthonie-kramer Nov 17, 2023
43cf11d
Merge commit '7db39fc49371157a3118840f8e22063d24fe3992' into door-rep…
anthonie-kramer Nov 17, 2023
af64a8c
revert BIM namespace
anthonie-kramer Nov 17, 2023
f3e9129
handles n stuff
anthonie-kramer Nov 17, 2023
349d095
rename
anthonie-kramer Nov 20, 2023
4640a78
Merge master into door-representation-improvements-ak
anthonie-kramer Nov 20, 2023
f4e1965
test update
anthonie-kramer Nov 20, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,18 @@ public GeometricElement ConvertToElement(IfcProduct ifcProduct, RepresentationDa

// TODO: Implement during the connections establishment.
//var wall = GetWallFromDoor(ifcDoor, allWalls);
var doorWidth = (IfcLengthMeasure) ifcDoor.OverallWidth;
var doorHeight = (IfcLengthMeasure) ifcDoor.OverallHeight;
var doorWidth = (IfcLengthMeasure)ifcDoor.OverallWidth;
var doorHeight = (IfcLengthMeasure)ifcDoor.OverallHeight;

var result = new Door(doorWidth,
doorHeight,
Door.DOOR_THICKNESS,
openingSide,
openingType,
repData.Transform,
repData.Material,
new Representation(repData.SolidOperations),
false,
IfcGuid.FromIfcGUID(ifcDoor.GlobalId),
ifcDoor.Name
);
Expand Down
16 changes: 10 additions & 6 deletions Elements.Serialization.IFC/test/IFCTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System.Collections.Generic;
using Elements.Geometry.Profiles;
using System.Linq;
using System.Xml.Linq;

namespace Elements.IFC.Tests
{
Expand All @@ -28,7 +29,7 @@
// [InlineData("rac_sample", "../../../models/IFC4/rac_advanced_sample_project.ifc")]
// [InlineData("rme_sample", "../../../models/IFC4/rme_advanced_sample_project.ifc")]
// [InlineData("rst_sample", "../../../models/IFC4/rst_advanced_sample_project.ifc")]
[InlineData("AC-20-Smiley-West-10-Bldg", "../../../models/IFC4/AC-20-Smiley-West-10-Bldg.ifc", 1972, 120, 539, 270, 9, 140, 10, 2)]
[InlineData("AC-20-Smiley-West-10-Bldg", "../../../models/IFC4/AC-20-Smiley-West-10-Bldg.ifc", 1963, 120, 530, 270, 9, 140, 10, 2)]
// TODO: Some walls are extracted incorrectly and intersecting the roof. It happens because
// IfcBooleanClippingResultParser doesn't handle the boolean clipping operation.
// In order to fix it surface support is required.
Expand All @@ -38,7 +39,7 @@
// TODO: The entrance door has an incorrect representation. It happens because during
// the UpdateRepresentation the default representation of a door is created instead of
// the extracted one.
[InlineData("AC20-Institute-Var-2", "../../../models/IFC4/AC20-Institute-Var-2.ifc", 1517, 5, 577, 121, 7, 82, 0, 21)]
[InlineData("AC20-Institute-Var-2", "../../../models/IFC4/AC20-Institute-Var-2.ifc", 1506, 5, 570, 121, 7, 82, 0, 21)]
// [InlineData("20160125WestRiverSide Hospital - IFC4-Autodesk_Hospital_Sprinkle", "../../../models/IFC4/20160125WestRiverSide Hospital - IFC4-Autodesk_Hospital_Sprinkle.ifc")]
public void FromIFC4(string name,
string ifcPath,
Expand Down Expand Up @@ -137,15 +138,18 @@
var wall1 = new StandardWall(wallLine1, 0.2, 3, name: "Wall1");
var wall2 = new StandardWall(wallLine2, 0.2, 2, name: "Wall2");

model.AddElement(wall1);
model.AddElement(wall2);
var door1 = new Door(wallLine1, 0.5, 1.5, 2.0, Door.DOOR_DEFAULT_THICKNESS, DoorOpeningSide.LeftHand, DoorOpeningType.DoubleSwing);

Check failure on line 141 in Elements.Serialization.IFC/test/IFCTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test

'Door' does not contain a definition for 'DOOR_DEFAULT_THICKNESS'

Check failure on line 141 in Elements.Serialization.IFC/test/IFCTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test

Argument 1: cannot convert from 'Elements.Geometry.Line' to 'double'

Check failure on line 141 in Elements.Serialization.IFC/test/IFCTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test

Argument 4: cannot convert from 'double' to 'Elements.DoorOpeningSide'

Check failure on line 141 in Elements.Serialization.IFC/test/IFCTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test

Argument 6: cannot convert from 'Elements.DoorOpeningSide' to 'Elements.Geometry.Transform'

Check failure on line 141 in Elements.Serialization.IFC/test/IFCTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test

Argument 7: cannot convert from 'Elements.DoorOpeningType' to 'Elements.Material'
var door2 = new Door(wallLine2, 0.5, 1.5, 1.8, Door.DOOR_DEFAULT_THICKNESS, DoorOpeningSide.LeftHand, DoorOpeningType.DoubleSwing);

Check failure on line 142 in Elements.Serialization.IFC/test/IFCTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test

'Door' does not contain a definition for 'DOOR_DEFAULT_THICKNESS'

Check failure on line 142 in Elements.Serialization.IFC/test/IFCTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test

Argument 1: cannot convert from 'Elements.Geometry.Line' to 'double'

Check failure on line 142 in Elements.Serialization.IFC/test/IFCTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test

Argument 4: cannot convert from 'double' to 'Elements.DoorOpeningSide'

Check failure on line 142 in Elements.Serialization.IFC/test/IFCTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test

Argument 6: cannot convert from 'Elements.DoorOpeningSide' to 'Elements.Geometry.Transform'

Check failure on line 142 in Elements.Serialization.IFC/test/IFCTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test

Argument 7: cannot convert from 'Elements.DoorOpeningType' to 'Elements.Material'

var door1 = new Door(wall1, wallLine1, 0.5, 1.5, 2.0, DoorOpeningSide.LeftHand, DoorOpeningType.DoubleSwing);
var door2 = new Door(wall2, wallLine2, 0.5, 1.5, 1.8, DoorOpeningSide.LeftHand, DoorOpeningType.DoubleSwing);
wall1.AddDoorOpening(door1);
wall2.AddDoorOpening(door2);

model.AddElement(wall1);
model.AddElement(wall2);
model.AddElement(door1);
model.AddElement(door2);

model.ToJson(ConstructJsonPath("IfcDoor"));
model.ToIFC(ConstructIfcPath("IfcDoor"));
}

Expand Down
31 changes: 31 additions & 0 deletions Elements/Elements.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.002.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elements", "src\Elements.csproj", "{29FD57A4-88A8-4600-900E-839FDDDC2A28}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elements.Tests", "test\Elements.Tests.csproj", "{ECCEFB6A-DF33-429B-950D-8082EA731320}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{29FD57A4-88A8-4600-900E-839FDDDC2A28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{29FD57A4-88A8-4600-900E-839FDDDC2A28}.Debug|Any CPU.Build.0 = Debug|Any CPU
{29FD57A4-88A8-4600-900E-839FDDDC2A28}.Release|Any CPU.ActiveCfg = Release|Any CPU
{29FD57A4-88A8-4600-900E-839FDDDC2A28}.Release|Any CPU.Build.0 = Release|Any CPU
{ECCEFB6A-DF33-429B-950D-8082EA731320}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ECCEFB6A-DF33-429B-950D-8082EA731320}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ECCEFB6A-DF33-429B-950D-8082EA731320}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ECCEFB6A-DF33-429B-950D-8082EA731320}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5B1BA77B-C0FC-4EBD-B7B9-61E5C244207E}
EndGlobalSection
EndGlobal
Loading
Loading