diff --git a/Install/Program Files to Install/Autodesk.SteelConnections.ASIFC.dll b/Install/Program Files to Install/Autodesk.SteelConnections.ASIFC.dll
index 2208cd4e..5d1825ae 100644
Binary files a/Install/Program Files to Install/Autodesk.SteelConnections.ASIFC.dll and b/Install/Program Files to Install/Autodesk.SteelConnections.ASIFC.dll differ
diff --git a/Install/Program Files to Install/bundle/Contents/Resources/ADSKIFCExporterHelp.htm b/Install/Program Files to Install/bundle/Contents/Resources/ADSKIFCExporterHelp.htm
index 4068aac2..4e267742 100644
--- a/Install/Program Files to Install/bundle/Contents/Resources/ADSKIFCExporterHelp.htm
+++ b/Install/Program Files to Install/bundle/Contents/Resources/ADSKIFCExporterHelp.htm
@@ -236,6 +236,43 @@
Support Information
or if you have an inquiry specific to this add-in, send us an e-mail to: Revit.apps@autodesk.com
Version History
+24.2.0.49
+
+ General:
+
+ - This is the major update of IFC Exporter for Revit 2024.
+
- It contains a various improvements and bug fixes for the basic Revit 2024.
+
+
+
+
+ Improvements:
+
+ - Added export of the floor slab edge level.
+
- Added Width as an exported quantity to IFC for some assembly-based walls.
+
- Implemented IfcMaterialLayerSetUsage assigning to a single occurence.
+
- Improved export of sloped slabs.
+
- Improved stability when exporting projects to IFC with non-standard Author information in Project Standards.
+
- Updated French and German localization resources
+
+
+
+
+ Bug Fixes:
+
+ - Fixed an unexpected error during file export.
+
- Fixed bug with inverted geometry after export of parts as ceilings.
+
- Fixed bug with swapped Height and Width values of opening in Base Quantities in exported IFC.
+
- Fixed export of NetSideArea, GrossSideArea, Height and Width to IFC4 QTO for curtain walls.
+
- Fixed geometry transformation for some cases.
+
- Fixed missing material associations for solid model bodies.
+
- Fixed openings local placement export.
+
+
+
+
+
+
24.1.1.6
General:
@@ -246,7 +283,7 @@
Version History
- Bug Fixes:
+ Improvements:
- The default import processor has been changed to Hybrid
diff --git a/Install/Program Files to Install/bundle/PackageContents.xml b/Install/Program Files to Install/bundle/PackageContents.xml
index 6b607fd1..3ec722c5 100644
--- a/Install/Program Files to Install/bundle/PackageContents.xml
+++ b/Install/Program Files to Install/bundle/PackageContents.xml
@@ -4,7 +4,7 @@
-
-
+
+
\ No newline at end of file
diff --git a/Install/RevitIFCSetupWix/Product.wxs b/Install/RevitIFCSetupWix/Product.wxs
index 2271a0b6..32dd1740 100644
--- a/Install/RevitIFCSetupWix/Product.wxs
+++ b/Install/RevitIFCSetupWix/Product.wxs
@@ -2,7 +2,7 @@
-
+
diff --git a/Install/RevitIFCSetupWix/RevitIFCSetupWix.wixproj b/Install/RevitIFCSetupWix/RevitIFCSetupWix.wixproj
index 888bc8fe..4556867e 100644
--- a/Install/RevitIFCSetupWix/RevitIFCSetupWix.wixproj
+++ b/Install/RevitIFCSetupWix/RevitIFCSetupWix.wixproj
@@ -6,7 +6,7 @@
3.8
7dfbd495-c588-4c7b-b8f6-5b793adb06f2
2.0
- IFC for Revit 2024.1.1.6
+ IFC for Revit 2024.2.0.49
Package
$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets
$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets
diff --git a/Install/RevitIFCSetupWix/buildInstaller.bat b/Install/RevitIFCSetupWix/buildInstaller.bat
index e394f267..4f114331 100644
--- a/Install/RevitIFCSetupWix/buildInstaller.bat
+++ b/Install/RevitIFCSetupWix/buildInstaller.bat
@@ -11,9 +11,9 @@ rem It is necessary to add the Wix bin directory to the system path temporarily
SET PATH=%PATH%;%WixRoot%
candle.exe -dProjectDir=%2 -ext WixUtilExtension %2Product.wxs
-light.exe -ext WixUtilExtension -out RevitIFC2024.1.1.msi product.wixobj -ext WixUIExtension
+light.exe -ext WixUtilExtension -out RevitIFC2024.2.0.msi product.wixobj -ext WixUIExtension
-copy RevitIFC2024.1.1.msi %1..\Releasex64
-del RevitIFC2024.1.1.msi
+copy RevitIFC2024.2.0.msi %1..\Releasex64
+del RevitIFC2024.2.0.msi
-echo %1..\Releasex64\RevitIFC2024.1.1.msi
+echo %1..\Releasex64\RevitIFC2024.2.0.msi
diff --git a/Source/IFCExporterUIOverride/Properties/AssemblyInfo.cs b/Source/IFCExporterUIOverride/Properties/AssemblyInfo.cs
index fd15a6db..f18cf7be 100644
--- a/Source/IFCExporterUIOverride/Properties/AssemblyInfo.cs
+++ b/Source/IFCExporterUIOverride/Properties/AssemblyInfo.cs
@@ -66,6 +66,6 @@
// The following information is used in the Open Source version as the release version number.
// The number will show up in the Title bar of the export dialog as well as at the IFC header file
// This number must be manually updated prior to releasing the new version
-[assembly: AssemblyVersion("24.1.1.6")]
-[assembly: AssemblyFileVersion("24.1.1.6")]
+[assembly: AssemblyVersion("24.2.0.49")]
+[assembly: AssemblyFileVersion("24.2.0.49")]
#endif
\ No newline at end of file
diff --git a/Source/IFCExporterUIOverride/Properties/Resources.de.resx b/Source/IFCExporterUIOverride/Properties/Resources.de.resx
index 585fa91f..0b21d338 100644
--- a/Source/IFCExporterUIOverride/Properties/Resources.de.resx
+++ b/Source/IFCExporterUIOverride/Properties/Resources.de.resx
@@ -571,7 +571,7 @@
Neue Export Einstellungen
- Löschen
+ Ausgewählte Einstellung löschen.
Weiter…
@@ -640,7 +640,7 @@
IFC4 Reference View
- Wie gebe ich eine Export Einstellungen an
+ Wie gebe ich eine Export Einstellungen an?
Nur Bauteillisten mit IFC, Pset oder Allgemein im Titel exportieren
@@ -730,7 +730,7 @@
Anforderung für Austausch
- Aktuelle Einstellungen speichern
+ Aktuelle Einstellungen speichern ...
Interne Koordinaten
@@ -795,4 +795,85 @@
Structural
+
+ Geografische Referenz
+
+
+ Wie kann ich die IFC-Klasse und den vordefinierten Typ zuordnen?
+
+
+ Alle ausklappen
+
+
+ Zu exportierende IFC-Klassen ...
+
+
+ Höhe
+
+
+ Rechtswert
+
+
+ Hochwert
+
+
+ Winkel vom geografischen Norden
+
+
+ Alle zusammenklappen
+
+
+ Alte Konfiguration löschen
+
+
+ Geodätisches Datum
+
+
+ Wie wirken sich die Auswahl der zu exportierenden IFC-Klassen auf den Export?
+
+
+ IFC Schema Version
+
+
+ Interne Koordinaten an den geografischen Norden orientiert
+
+
+ Mehrfache Zuweisung wurde bei den ausgewählten Objekten gefunden !
+
+
+ IFC-Klasse besitzt keinen vordefinierten Typ
+
+
+ Überschreiben
+
+
+ Auswahl des vordefinierten Typs
+
+
+ Beschreibung
+
+
+ Projektbasispunkt an den geografischen Norden orientiert
+
+
+ Vermessungspunkt
+
+
+ Den Typnamen nur für IFC-Typnamen verwenden
+
+
+ Sichtbaren Namen in Revit als IFC-Entitätsname verwenden
+
+
+ Suchen
+
+
+ Änderungen in die IFC-Exporteinrichtung speichern
+
+
+ Änderungen speichern
+
+
+ Zurücksetzen
+
\ No newline at end of file
diff --git a/Source/IFCExporterUIOverride/Properties/Resources.fr.resx b/Source/IFCExporterUIOverride/Properties/Resources.fr.resx
index f2ff99ad..ff346027 100644
--- a/Source/IFCExporterUIOverride/Properties/Resources.fr.resx
+++ b/Source/IFCExporterUIOverride/Properties/Resources.fr.resx
@@ -799,4 +799,85 @@
Structural
+
+ Angle depuis le nord géographique
+
+
+ Tout refermer
+
+
+ Supprimer l'ancienne configuration
+
+
+ Coordonnées Est
+
+
+ Façade
+
+
+ Entités à exporter...
+
+
+ Tout déployer
+
+
+ Données géodésiques
+
+
+ Référence géographique
+
+
+ Comment attribuer une entité IFC et un type prédéfini ?
+
+
+ Comment les sélections d’entités IFC affectent-elles l’export ?
+
+
+ Version du schéma IFC
+
+
+ Origine interne orientée vers le nord géographique
+
+
+ Affectations multiples trouvées dans les objets sélectionnés.
+
+
+ L'entité n'a pas de type prédéfini
+
+
+ Coordonnées Nord
+
+
+ Ecraser
+
+
+ Sélection du type prédéfini
+
+
+ Description
+
+
+ Point de base du projet orienté vers le nord géographique
+
+
+ Site du projet
+
+
+ Réinitialiser
+
+
+ Sauvegarder les modifications
+
+
+ Enregistrer les modifications apportées à la configuration de l'export IFC
+
+
+ Recherche
+
+
+ Utiliser le nom du type uniquement pour le nom du type IFC
+
+
+ Utiliser le nom Revit visible comme nom de l'IFCEntity
+
\ No newline at end of file
diff --git a/Source/Revit.IFC.Common/Properties/AssemblyInfo.cs b/Source/Revit.IFC.Common/Properties/AssemblyInfo.cs
index 457f87b5..3b7c3cfb 100644
--- a/Source/Revit.IFC.Common/Properties/AssemblyInfo.cs
+++ b/Source/Revit.IFC.Common/Properties/AssemblyInfo.cs
@@ -13,8 +13,8 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-[assembly: AssemblyVersion("24.1.1.6")]
-[assembly: AssemblyFileVersion("24.1.1.6")]
+[assembly: AssemblyVersion("24.2.0.49")]
+[assembly: AssemblyFileVersion("24.2.0.49")]
#endif
diff --git a/Source/Revit.IFC.Export/Exporter/BodyData.cs b/Source/Revit.IFC.Export/Exporter/BodyData.cs
index 9aed912b..59ddbabe 100644
--- a/Source/Revit.IFC.Export/Exporter/BodyData.cs
+++ b/Source/Revit.IFC.Export/Exporter/BodyData.cs
@@ -138,6 +138,7 @@ public BodyData(BodyData bodyData)
ShapeRepresentationType = bodyData.ShapeRepresentationType;
OffsetTransform = bodyData.OffsetTransform;
MaterialIds = bodyData.MaterialIds;
+ RepresentationItemInfo = bodyData.RepresentationItemInfo;
}
///
@@ -185,14 +186,16 @@ public MaterialAndProfile materialAndProfile
}
///
- /// Static function to create a new copy of BodyData but resetting the MaterialIds
+ /// Static function to create a new copy of BodyData
///
/// the input BodyData
- /// the new copy of BodyData with cleared MaterialIds
- public static BodyData Create(BodyData bodyDataIn)
+ /// indicates whether we want to clear the MaterialIds
+ /// the new copy of BodyData
+ public static BodyData Create(BodyData bodyDataIn, bool resetMaterials)
{
BodyData retBodyData = new BodyData(bodyDataIn); // create a new copy of bodyDataIn
- retBodyData.MaterialIds.Clear(); // Clear the MaterialIdsList
+ if (resetMaterials)
+ retBodyData.MaterialIds.Clear();
return retBodyData;
}
}
diff --git a/Source/Revit.IFC.Export/Exporter/BodyExporter.cs b/Source/Revit.IFC.Export/Exporter/BodyExporter.cs
index 34b0ff06..3dba025d 100644
--- a/Source/Revit.IFC.Export/Exporter/BodyExporter.cs
+++ b/Source/Revit.IFC.Export/Exporter/BodyExporter.cs
@@ -22,8 +22,6 @@
using System.Linq;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.IFC;
-using Autodesk.Revit.DB.Mechanical;
-using Autodesk.Revit.DB.Plumbing;
using Revit.IFC.Export.Properties;
using Revit.IFC.Export.Toolkit;
using Revit.IFC.Export.Utility;
@@ -675,7 +673,7 @@ public static bool CanCreateClosedShell(ICollection faceSet)
// This is a simplified routine for solids that are composed of planar faces with polygonal edges. This
// allows us to use the edges as the boundaries of the faces.
private static bool ExportPlanarBodyIfPossible(ExporterIFC exporterIFC, Solid solid,
- IList> currentFaceHashSetList)
+ IList> currentFaceHashSetList, Transform lcs)
{
IFCFile file = exporterIFC.GetFile();
@@ -717,7 +715,7 @@ private static bool ExportPlanarBodyIfPossible(ExporterIFC exporterIFC, Solid so
{
if (!vertexCache.TryGetValue(curvePoints[idx], out IFCAnyHandle pointHandle))
{
- XYZ pointScaled = ExporterIFCUtils.TransformAndScalePoint(exporterIFC, curvePoints[idx]);
+ XYZ pointScaled = TransformAndScalePoint(exporterIFC, curvePoints[idx], lcs);
pointHandle = ExporterUtil.CreateCartesianPoint(file, pointScaled);
vertexCache[curvePoints[idx]] = pointHandle;
}
@@ -2553,7 +2551,7 @@ private static bool AreTessellationControlsEqual(SolidOrShellTessellationControl
}
private static bool ExportBodyAsSolid(ExporterIFC exporterIFC, Element element, BodyExporterOptions options,
- IList> currentFaceHashSetList, GeometryObject geomObject)
+ IList> currentFaceHashSetList, GeometryObject geomObject, Transform lcs)
{
IFCFile file = exporterIFC.GetFile();
Document document = element.Document;
@@ -2561,7 +2559,7 @@ private static bool ExportBodyAsSolid(ExporterIFC exporterIFC, Element element,
return false;
Solid solid = geomObject as Solid;
- if (ExportPlanarBodyIfPossible(exporterIFC, solid, currentFaceHashSetList))
+ if (ExportPlanarBodyIfPossible(exporterIFC, solid, currentFaceHashSetList, lcs))
return true;
SolidOrShellTessellationControls tessellationControlsOriginal = options.TessellationControls;
@@ -2643,7 +2641,7 @@ private static bool ExportBodyAsSolid(ExporterIFC exporterIFC, Element element,
for (int ii = 0; ii < numberOfVertices; ii++)
{
XYZ vertex = component.GetVertex(ii);
- XYZ vertexScaled = ExporterIFCUtils.TransformAndScalePoint(exporterIFC, vertex);
+ XYZ vertexScaled = TransformAndScalePoint(exporterIFC, vertex, lcs);
coordList.Add(new List(3) { vertexScaled.X, vertexScaled.Y, vertexScaled.Z });
}
}
@@ -2653,7 +2651,7 @@ private static bool ExportBodyAsSolid(ExporterIFC exporterIFC, Element element,
for (int ii = 0; ii < numberOfVertices; ii++)
{
XYZ vertex = component.GetVertex(ii);
- XYZ vertexScaled = ExporterIFCUtils.TransformAndScalePoint(exporterIFC, vertex);
+ XYZ vertexScaled = TransformAndScalePoint(exporterIFC, vertex, lcs);
IFCAnyHandle vertexHandle = ExporterUtil.CreateCartesianPoint(file, vertexScaled);
vertexHandles.Add(vertexHandle);
}
@@ -2677,6 +2675,11 @@ private static bool ExportBodyAsSolid(ExporterIFC exporterIFC, Element element,
}
}
currentFaceHashSetList.Add(currentFaceSet);
+
+ // Call GC.KeepAlive(solidFacetation) at this point to maintain a reference to solidFacetation
+ // and prevent the object deletion by the garbage collector after try-catch block.
+ GC.KeepAlive(solidFacetation);
+
return true;
}
@@ -2692,16 +2695,15 @@ private static BodyData ExportBodyAsBRep(ExporterIFC exporterIFC, IList> currentFaceHashSetList = new List>();
IList startIndexForObject = new List();
- BodyData bodyData = BodyData.Create(bodyDataIn);
+ BodyData bodyData = BodyData.Create(bodyDataIn, resetMaterials);
IList materialIds = new List();
- bodyData.MaterialIds = materialIds;
bool isCoarse = (options.TessellationLevel == BodyExporterOptions.BodyTessellationLevel.Coarse);
@@ -2718,7 +2720,7 @@ private static BodyData ExportBodyAsBRep(ExporterIFC exporterIFC, IList triangulatedBodyItems = ExportBodyAsTessellatedFaceSet(exporterIFC, element, options, geomObject, trfToUse);
if (triangulatedBodyItems != null && triangulatedBodyItems.Count > 0)
{
@@ -2808,7 +2811,7 @@ private static BodyData ExportBodyAsBRep(ExporterIFC exporterIFC, IList
+ /// A calculation class to calculate gross side area.
+ ///
+ class GrossSideAreaCalculator : PropertyCalculator
+ {
+ ///
+ /// A double variable to keep the calculated value.
+ ///
+ private double m_Area = 0;
+
+ ///
+ /// A static instance of this class.
+ ///
+ static GrossSideAreaCalculator s_Instance = new GrossSideAreaCalculator();
+
+ ///
+ /// The GrossSideAreaCalculator instance.
+ ///
+ public static GrossSideAreaCalculator Instance
+ {
+ get { return s_Instance; }
+ }
+
+ ///
+ /// Calculates cross side area.
+ ///
+ ///
+ /// The ExporterIFC object.
+ ///
+ ///
+ /// The IFCExportBodyParams.
+ ///
+ ///
+ /// The element to calculate the value.
+ ///
+ ///
+ /// The element type.
+ ///
+ ///
+ /// True if the operation succeed, false otherwise.
+ ///
+ public override bool Calculate(ExporterIFC exporterIFC, IFCExportBodyParams extrusionCreationData, Element element, ElementType elementType, EntryMap entryMap)
+ {
+ ParameterUtil.GetDoubleValueFromElementOrSymbol(element, entryMap.RevitParameterName, out m_Area, entryMap.CompatibleRevitParameterName, "IfcQtyGrossSideArea");
+ m_Area = UnitUtil.ScaleArea(m_Area);
+ if (m_Area > MathUtil.Eps() * MathUtil.Eps())
+ return true;
+
+ IFCAnyHandle hnd = ExporterCacheManager.ElementToHandleCache.Find(element.Id);
+ if (IFCAnyHandleUtil.IsSubTypeOf(hnd, IFCEntityType.IfcCurtainWall)
+ && ParameterUtil.GetDoubleValueFromElementOrSymbol(element, BuiltInParameter.HOST_AREA_COMPUTED, out m_Area) != null)
+ {
+ m_Area = UnitUtil.ScaleArea(m_Area);
+ if (m_Area > MathUtil.Eps() * MathUtil.Eps())
+ return true;
+ }
+
+ if (extrusionCreationData == null)
+ return false;
+
+ m_Area = extrusionCreationData.ScaledArea;
+
+ if (m_Area > MathUtil.Eps() * MathUtil.Eps())
+ return true;
+
+ return false;
+ }
+
+ ///
+ /// Gets the calculated double value.
+ ///
+ ///
+ /// The double value.
+ ///
+ public override double GetDoubleValue()
+ {
+ return m_Area;
+ }
+ }
+}
diff --git a/Source/Revit.IFC.Export/Exporter/PropertySet/Calculators/HeightCalculator.cs b/Source/Revit.IFC.Export/Exporter/PropertySet/Calculators/HeightCalculator.cs
index 770102be..c9b685db 100644
--- a/Source/Revit.IFC.Export/Exporter/PropertySet/Calculators/HeightCalculator.cs
+++ b/Source/Revit.IFC.Export/Exporter/PropertySet/Calculators/HeightCalculator.cs
@@ -110,6 +110,12 @@ public override bool Calculate(ExporterIFC exporterIFC,
{
ParameterUtil.GetDoubleValueFromElementOrSymbol(element, BuiltInParameter.WINDOW_HEIGHT, out m_Height);
}
+ else if (IFCAnyHandleUtil.IsSubTypeOf(hnd, IFCEntityType.IfcCurtainWall))
+ {
+ BoundingBoxXYZ boundingBox = (element as Wall).get_BoundingBox(null);
+ if (boundingBox != null)
+ m_Height = boundingBox.Max.Z - boundingBox.Min.Z;
+ }
if (m_Height > eps)
{
diff --git a/Source/Revit.IFC.Export/Exporter/PropertySet/Calculators/NetSideAreaCalculator.cs b/Source/Revit.IFC.Export/Exporter/PropertySet/Calculators/NetSideAreaCalculator.cs
new file mode 100644
index 00000000..742ee192
--- /dev/null
+++ b/Source/Revit.IFC.Export/Exporter/PropertySet/Calculators/NetSideAreaCalculator.cs
@@ -0,0 +1,103 @@
+//
+// BIM IFC library: this library works with Autodesk(R) Revit(R) to export IFC files containing model geometry.
+// Copyright (C) 2012 Autodesk, Inc.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Autodesk.Revit.DB;
+using Autodesk.Revit.DB.IFC;
+using Revit.IFC.Export.Utility;
+using Revit.IFC.Common.Utility;
+using Revit.IFC.Common.Enums;
+
+namespace Revit.IFC.Export.Exporter.PropertySet.Calculators
+{
+ ///
+ /// A calculation class to calculate net side area.
+ ///
+ class NetSideAreaCalculator : PropertyCalculator
+ {
+ ///
+ /// A double variable to keep the calculated value.
+ ///
+ private double m_Area = 0;
+
+ ///
+ /// A static instance of this class.
+ ///
+ static NetSideAreaCalculator s_Instance = new NetSideAreaCalculator();
+
+ ///
+ /// The NetSideAreaCalculator instance.
+ ///
+ public static NetSideAreaCalculator Instance
+ {
+ get { return s_Instance; }
+ }
+
+ ///
+ /// Calculates net side area.
+ ///
+ ///
+ /// The ExporterIFC object.
+ ///
+ ///
+ /// The IFCExportBodyParams.
+ ///
+ ///
+ /// The element to calculate the value.
+ ///
+ ///
+ /// The element type.
+ ///
+ ///
+ /// True if the operation succeed, false otherwise.
+ ///
+ public override bool Calculate(ExporterIFC exporterIFC, IFCExportBodyParams extrusionCreationData, Element element, ElementType elementType, EntryMap entryMap)
+ {
+ ParameterUtil.GetDoubleValueFromElementOrSymbol(element, entryMap.RevitParameterName, out m_Area, entryMap.CompatibleRevitParameterName, "IfcQtyNetSideArea");
+ m_Area = UnitUtil.ScaleArea(m_Area);
+ if (m_Area > MathUtil.Eps() * MathUtil.Eps())
+ return true;
+
+ IFCAnyHandle hnd = ExporterCacheManager.ElementToHandleCache.Find(element.Id);
+ if (IFCAnyHandleUtil.IsSubTypeOf(hnd, IFCEntityType.IfcCurtainWall))
+ {
+ ParameterUtil.GetDoubleValueFromElementOrSymbol(element, BuiltInParameter.HOST_AREA_COMPUTED, out m_Area);
+ m_Area = UnitUtil.ScaleArea(m_Area);
+ if (m_Area > MathUtil.Eps() * MathUtil.Eps())
+ return true;
+ }
+
+ return false;
+ }
+
+ ///
+ /// Gets the calculated double value.
+ ///
+ ///
+ /// The double value.
+ ///
+ public override double GetDoubleValue()
+ {
+ return m_Area;
+ }
+ }
+}
diff --git a/Source/Revit.IFC.Export/Exporter/PropertySet/Calculators/WidthCalculator.cs b/Source/Revit.IFC.Export/Exporter/PropertySet/Calculators/WidthCalculator.cs
index c9143a94..48e63f35 100644
--- a/Source/Revit.IFC.Export/Exporter/PropertySet/Calculators/WidthCalculator.cs
+++ b/Source/Revit.IFC.Export/Exporter/PropertySet/Calculators/WidthCalculator.cs
@@ -112,6 +112,10 @@ public override bool Calculate(ExporterIFC exporterIFC, IFCExportBodyParams extr
{
ParameterUtil.GetDoubleValueFromElementOrSymbol(element, BuiltInParameter.STAIRS_ATTR_TREAD_WIDTH, out m_Width);
}
+ else if (IFCAnyHandleUtil.IsSubTypeOf(hnd, IFCEntityType.IfcCurtainWall))
+ {
+ m_Width = (element as Wall)?.Width ?? 0.0;
+ }
m_Width = UnitUtil.ScaleLength(m_Width);
if (m_Width > MathUtil.Eps())
diff --git a/Source/Revit.IFC.Export/Exporter/PropertySet/PropertyUtil.cs b/Source/Revit.IFC.Export/Exporter/PropertySet/PropertyUtil.cs
index 6aa855b1..1bb85224 100644
--- a/Source/Revit.IFC.Export/Exporter/PropertySet/PropertyUtil.cs
+++ b/Source/Revit.IFC.Export/Exporter/PropertySet/PropertyUtil.cs
@@ -4918,7 +4918,7 @@ public static void CreateWallBaseQuantities(ExporterIFC exporterIFC, Wall wallEl
scaledWidth = UnitUtil.ScaleLength(wallElement.Width);
if (!MathUtil.IsAlmostZero(scaledWidth))
{
- if (widthAsComplexQty == null)
+ if ((widthAsComplexQty?.Count ?? 0) == 0)
{
IFCAnyHandle quantityHnd = IFCInstanceExporter.CreateQuantityLength(file, "Width", null, null, scaledWidth);
quantityHnds.Add(quantityHnd);
diff --git a/Source/Revit.IFC.Export/Properties/AssemblyInfo.cs b/Source/Revit.IFC.Export/Properties/AssemblyInfo.cs
index 5fe57fc0..3c41c267 100644
--- a/Source/Revit.IFC.Export/Properties/AssemblyInfo.cs
+++ b/Source/Revit.IFC.Export/Properties/AssemblyInfo.cs
@@ -14,8 +14,8 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-[assembly: AssemblyVersion("24.1.1.6")]
-[assembly: AssemblyFileVersion("24.1.1.6")]
+[assembly: AssemblyVersion("24.2.0.49")]
+[assembly: AssemblyFileVersion("24.2.0.49")]
#endif
diff --git a/Source/Revit.IFC.Export/Revit.IFC.Export.csproj b/Source/Revit.IFC.Export/Revit.IFC.Export.csproj
index 89df701e..251b1a8e 100644
--- a/Source/Revit.IFC.Export/Revit.IFC.Export.csproj
+++ b/Source/Revit.IFC.Export/Revit.IFC.Export.csproj
@@ -105,6 +105,7 @@
+
@@ -114,6 +115,7 @@
+
diff --git a/Source/Revit.IFC.Export/Utility/CategoryUtil.cs b/Source/Revit.IFC.Export/Utility/CategoryUtil.cs
index eb3dcd6a..d69e3108 100644
--- a/Source/Revit.IFC.Export/Utility/CategoryUtil.cs
+++ b/Source/Revit.IFC.Export/Utility/CategoryUtil.cs
@@ -157,17 +157,8 @@ public static IFCAnyHandle CreateMaterialList(IFCFile file, IList
public static IFCAnyHandle CreateMaterialLayerSetUsage(IFCFile file, IFCAnyHandle materialLayerSet, IFCLayerSetDirection direction,
IFCDirectionSense directionSense, double offset)
{
- string materialLayerSetName = IFCAnyHandleUtil.GetStringAttribute(materialLayerSet, "LayerSetName");
- string hash = materialLayerSetName + ":" + direction.ToString() + ":" +
- directionSense.ToString() + ":" + offset.ToString();
- IFCAnyHandle matSetUsage = ExporterCacheManager.MaterialSetUsageCache.GetHandle(hash);
- if (matSetUsage == null)
- {
- matSetUsage = IFCInstanceExporter.CreateMaterialLayerSetUsage(file, materialLayerSet,
- direction, directionSense, offset);
- ExporterCacheManager.MaterialSetUsageCache.AddHash(matSetUsage, hash);
- }
- return matSetUsage;
+ return IFCInstanceExporter.CreateMaterialLayerSetUsage(file, materialLayerSet,
+ direction, directionSense, offset);
}
public static IFCAnyHandle CreateMaterialProfileSetUsage(IFCFile file,
diff --git a/Source/Revit.IFC.Export/Utility/DoorWindowUtil.cs b/Source/Revit.IFC.Export/Utility/DoorWindowUtil.cs
index 92501437..b96cc775 100644
--- a/Source/Revit.IFC.Export/Utility/DoorWindowUtil.cs
+++ b/Source/Revit.IFC.Export/Utility/DoorWindowUtil.cs
@@ -1057,7 +1057,8 @@ static public DoorWindowOpeningInfo CreateOpeningForDoorWindow(ExporterIFC expor
using (IFCExportBodyParams extraParams = new IFCExportBodyParams())
{
double height = 0.0, width = 0.0;
- if (GeometryUtil.ComputeHeightWidthOfCurveLoop(tmpCutLoop, lcs, out height, out width))
+ OpeningUtil.GetOpeningDirections(wallElement, out _, out XYZ wallAxis);
+ if (GeometryUtil.ComputeHeightWidthOfCurveLoop(tmpCutLoop, wallAxis, out height, out width))
{
extraParams.ScaledHeight = UnitUtil.ScaleLength(height);
extraParams.ScaledWidth = UnitUtil.ScaleLength(width);
diff --git a/Source/Revit.IFC.Export/Utility/LevelInfoCache.cs b/Source/Revit.IFC.Export/Utility/LevelInfoCache.cs
index 526bb1fb..ef1f04e4 100644
--- a/Source/Revit.IFC.Export/Utility/LevelInfoCache.cs
+++ b/Source/Revit.IFC.Export/Utility/LevelInfoCache.cs
@@ -17,10 +17,8 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
//
-using System;
using System.Collections.Generic;
using System.Linq;
-using System.Text;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.IFC;
@@ -75,6 +73,11 @@ public int Compare(double key1, double key2)
///
private HashSet m_OrphanedSpaces;
+ ///
+ /// The dictionary mapping from a SlabEdge.Id to a Floor.LevelId.
+ ///
+ private IDictionary FloorSlabEdgeLevels = null;
+
///
/// Finds the height of the level from the dictionary.
///
@@ -267,5 +270,57 @@ public ElementId GetLevelIdOfObject(Element element)
}
return levelId;
}
+
+ ///
+ /// Get the appropriate level id for a slab edge.
+ ///
+ /// The slab edge element id.
+ /// The level id.
+ public ElementId GetSlabEdgeLevelId(ElementId slabEdgeId)
+ {
+ if (FloorSlabEdgeLevels == null)
+ {
+ InitFloorSlabEdgeLevels(ExporterCacheManager.Document);
+ }
+
+ if (FloorSlabEdgeLevels.TryGetValue(slabEdgeId, out ElementId levelId))
+ {
+ return levelId;
+ }
+
+ return ElementId.InvalidElementId;
+ }
+
+ private void InitFloorSlabEdgeLevels(Document document)
+ {
+ FloorSlabEdgeLevels = new Dictionary();
+
+ ElementFilter floorFilter = new ElementClassFilter(typeof(Floor));
+ FilteredElementCollector floorCollector = new FilteredElementCollector(document);
+ floorCollector.WherePasses(floorFilter);
+ IList floorElements = floorCollector.ToElements();
+ if (floorElements?.Count > 0)
+ {
+ foreach (Element floor in floorElements)
+ {
+ IList dependentElementIds = floor.GetDependentElements(null);
+ if (dependentElementIds?.Count > 0)
+ {
+ var levelId = floor.LevelId;
+ foreach(ElementId dependentElementId in dependentElementIds)
+ {
+ if (dependentElementId == ElementId.InvalidElementId)
+ continue;
+ var dependentElement = document.GetElement(dependentElementId);
+ if (dependentElement is SlabEdge)
+ {
+ FloorSlabEdgeLevels[dependentElementId] = levelId;
+ }
+ }
+ }
+ }
+ }
+ }
}
+
}
\ No newline at end of file
diff --git a/Source/Revit.IFC.Export/Utility/LevelUtil.cs b/Source/Revit.IFC.Export/Utility/LevelUtil.cs
index 6071d4a1..b2359035 100644
--- a/Source/Revit.IFC.Export/Utility/LevelUtil.cs
+++ b/Source/Revit.IFC.Export/Utility/LevelUtil.cs
@@ -310,6 +310,13 @@ public static ElementId GetBaseLevelIdForElement(Element elem)
return level.Id;
}
+ if (elem is SlabEdge)
+ {
+ ElementId levelId = ExporterCacheManager.LevelInfoCache.GetSlabEdgeLevelId(elem.Id);
+ if (levelId != ElementId.InvalidElementId)
+ return levelId;
+ }
+
return elem.LevelId;
}
diff --git a/Source/Revit.IFC.Export/Utility/NamingUtil.cs b/Source/Revit.IFC.Export/Utility/NamingUtil.cs
index 762d59e7..9a421780 100644
--- a/Source/Revit.IFC.Export/Utility/NamingUtil.cs
+++ b/Source/Revit.IFC.Export/Utility/NamingUtil.cs
@@ -789,7 +789,7 @@ public static void ParseName(string name, out string lastName, out string firstN
if (comma < space)
{
foundComma = true;
- index = -1; // start inserting at the beginning again.
+ index = 0; // start inserting at the beginning again.
space = comma;
}
diff --git a/Source/Revit.IFC.Export/Utility/OpeningUtil.cs b/Source/Revit.IFC.Export/Utility/OpeningUtil.cs
index 9de9d659..9be4c61e 100644
--- a/Source/Revit.IFC.Export/Utility/OpeningUtil.cs
+++ b/Source/Revit.IFC.Export/Utility/OpeningUtil.cs
@@ -485,11 +485,12 @@ static public IFCAnyHandle CreateOpening(ExporterIFC exporterIFC, IFCAnyHandle h
lcs = GeometryUtil.CreateTransformFromPlane(curveLoops[0].GetPlane());
}
+ Transform transformToUse = lcs;
if (extrusionData.ScaledExtrusionLength < MathUtil.Eps())
{
double extrusionLength = 0.0;
if (hostElement is Floor || hostElement is RoofBase || hostElement is Ceiling)
- extrusionLength = CalculateOpeningExtrusionInFloorRoofOrCeiling(hostElement, extrusionData);
+ extrusionLength = CalculateOpeningExtrusionInFloorRoofOrCeiling(hostElement, extrusionData, transformToUse);
if (extrusionLength < MathUtil.Eps())
return null;
@@ -500,7 +501,7 @@ static public IFCAnyHandle CreateOpening(ExporterIFC exporterIFC, IFCAnyHandle h
ElementId catId = CategoryUtil.GetSafeCategoryId(insertElement);
IFCAnyHandle openingHnd = null;
IFCAnyHandle openingProdRepHnd = RepresentationUtil.CreateExtrudedProductDefShape(exporterIFC, insertElement, catId,
- curveLoops, lcs, extrusionData.ExtrusionDirection, extrusionData.ScaledExtrusionLength);
+ curveLoops, transformToUse, extrusionData.ExtrusionDirection, extrusionData.ScaledExtrusionLength);
if (!IFCAnyHandleUtil.IsNullOrHasNoValue(openingProdRepHnd))
{
@@ -572,7 +573,7 @@ public static bool IsDoorOrWindowOpening(Element openingElem,
return insertHostId == hostElement.Id;
}
- static bool GetOpeningDirections(Element hostElem, out XYZ perpToWall, out XYZ wallAxis)
+ public static bool GetOpeningDirections(Element hostElem, out XYZ perpToWall, out XYZ wallAxis)
{
bool isLinearWall = false;
perpToWall = new XYZ(0, 0, 0);
@@ -598,8 +599,9 @@ static bool GetOpeningDirections(Element hostElem, out XYZ perpToWall, out XYZ w
///
/// The host element.
/// The opening extrusion data
+ /// The local coordinate system of the base of the extrusion for updating if the extrusion length based on bounding box.
/// The extrusion length
- private static double CalculateOpeningExtrusionInFloorRoofOrCeiling(Element hostElement, IFCExtrusionData extrusionData)
+ private static double CalculateOpeningExtrusionInFloorRoofOrCeiling(Element hostElement, IFCExtrusionData extrusionData, Transform lcs)
{
double extrusionLength = 0.0;
//Use the element thickness for not sloped elements, if the host element is sloped, the extrusions of the resulting opening will not intersect the host element.
@@ -625,6 +627,11 @@ private static double CalculateOpeningExtrusionInFloorRoofOrCeiling(Element host
//If slope is positive value the host it will be above.
//
extrusionData.ExtrusionDirection = (slopeValue > 0) ? XYZ.BasisZ : -XYZ.BasisZ;
+
+ // Need to change extrusion plane Z coordinate to bounding box Z if the element is sloped
+ // because opening should cut bounding box completely.
+ double extrusionOriginZ = (slopeValue > 0) ? hostElementBoundingBox.Min.Z : hostElementBoundingBox.Max.Z;
+ lcs.Origin = new XYZ(lcs.Origin.X, lcs.Origin.Y, extrusionOriginZ);
}
return extrusionLength;
diff --git a/Source/Revit.IFC.Import.Core/Properties/AssemblyInfo.cs b/Source/Revit.IFC.Import.Core/Properties/AssemblyInfo.cs
index 53e712b7..3fea00a5 100644
--- a/Source/Revit.IFC.Import.Core/Properties/AssemblyInfo.cs
+++ b/Source/Revit.IFC.Import.Core/Properties/AssemblyInfo.cs
@@ -13,8 +13,8 @@
[assembly: AssemblyDescription("Revit.IFC.Import.Core")]
[assembly: AssemblyCompany("Autodesk")]
[assembly: AssemblyCopyright("@2012-2023 Autodesk, Inc. All rights reserved.")]
-[assembly: AssemblyVersion("24.1.1.6")]
-[assembly: AssemblyFileVersion("24.1.1.6")]
+[assembly: AssemblyVersion("24.2.0.49")]
+[assembly: AssemblyFileVersion("24.2.0.49")]
// Version information can now be found in Source\Foundation\RevitENU\Version.cs
//
diff --git a/Source/Revit.IFC.Import/Properties/AssemblyInfo.cs b/Source/Revit.IFC.Import/Properties/AssemblyInfo.cs
index 813b0c7d..5bbc2056 100644
--- a/Source/Revit.IFC.Import/Properties/AssemblyInfo.cs
+++ b/Source/Revit.IFC.Import/Properties/AssemblyInfo.cs
@@ -12,8 +12,8 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-[assembly: AssemblyVersion("24.1.1.6")]
-[assembly: AssemblyFileVersion("24.1.1.6")]
+[assembly: AssemblyVersion("24.2.0.49")]
+[assembly: AssemblyFileVersion("24.2.0.49")]
#endif
#region Using directives