This commit is contained in:
Jon Mirtschin 2022-10-28 22:37:51 +11:00
Родитель e164c2c7e5
Коммит 359ae62b53
9 изменённых файлов: 23 добавлений и 15 удалений

Просмотреть файл

@ -59,12 +59,15 @@ namespace GeometryGym.Ifc
#endif
protected BaseClassIfc(DatabaseIfc db, BaseClassIfc e) : base()
{
mGlobalId = e.mGlobalId;
if (db != null)
{
if (e.mDatabase != null && string.Compare(db.id, e.mDatabase.id, false) != 0)
mGlobalId = e.mGlobalId;
db.appendObject(this);
db.Factory.mDuplicateMapping.AddObject(e, mStepId);
}
else
mGlobalId = e.mGlobalId;
}
protected BaseClassIfc(DatabaseIfc db) : base()
{

Просмотреть файл

@ -143,8 +143,8 @@ namespace GeometryGym.Ifc
{
if (existing is IfcRoot existingRoot)
{
BaseClassIfc obj = null;
mDictionary.TryRemove(existingRoot.GlobalId, out obj);
if(!string.IsNullOrEmpty(existingRoot.mGlobalId))
mDictionary.TryRemove(existingRoot.GlobalId, out BaseClassIfc obj);
}
else if (existing is IfcClassificationReference existingClassificationReference)
mClassificationReferences.Remove(existingClassificationReference);
@ -153,7 +153,10 @@ namespace GeometryGym.Ifc
}
if (value is IfcRoot root)
{
mDictionary[root.GlobalId] = value;
if (!string.IsNullOrEmpty(root.mGlobalId))
{
mDictionary[root.GlobalId] = value;
}
}
else if (value is IfcClassificationReference classificationReference)
mClassificationReferences.Add(classificationReference);
@ -371,7 +374,7 @@ namespace GeometryGym.Ifc
return true;
}
#if (NET || !NOIFCJSON)
else if (ExtensionHelper.ExtensionEquals(filePath, ".json"))
else if (ExtensionHelper.ExtensionEquals(filePath, ".json") || ExtensionHelper.ExtensionEquals(filePath, ".ifcjson"))
{
ToJSON(path);
return true;

Просмотреть файл

@ -1052,7 +1052,7 @@ namespace GeometryGym.Ifc
return mOrganization;
try
{
#if (!NETSTANDARD2_0)
#if (!NETSTANDARD2_0 && !NETSTANDARD2_1)
string name = ((string)Microsoft.Win32.Registry.GetValue(@"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion", "RegisteredOrganization", "")).Replace("'", "");
if (!string.IsNullOrEmpty(name) && string.Compare(name, "Microsoft", true) != 0 && string.Compare(name, "HP Inc.",true) != 0)
return name;

Просмотреть файл

@ -2782,7 +2782,8 @@ namespace GeometryGym.Ifc
{
if (mDatabase != null)
{
mDatabase.mDictionary.TryRemove(mGlobalId, out BaseClassIfc obj);
if(!string.IsNullOrEmpty(mGlobalId))
mDatabase.mDictionary.TryRemove(mGlobalId, out BaseClassIfc obj);
mDatabase.mDictionary[value] = this;
}
setGlobalId(value);

Просмотреть файл

@ -1906,13 +1906,14 @@ additional types some additional representation types are given:
[Serializable]
public partial class IfcStructuralLoadTemperature : IfcStructuralLoadStatic
{
internal double mDeltaT_Constant, mDeltaT_Y, mDeltaT_Z;// : OPTIONAL IfcThermodynamicTemperatureMeasure;
internal double mDeltaT_Constant = double.NaN, mDeltaT_Y = double.NaN, mDeltaT_Z = double.NaN;// : OPTIONAL IfcThermodynamicTemperatureMeasure;
public double DeltaT_Constant { get { return mDeltaT_Constant; } set { mDeltaT_Constant = value; } }
public double DeltaT_Y { get { return mDeltaT_Y; } set { mDeltaT_Y = value; } }
public double DeltaT_Z { get { return mDeltaT_Z; } set { mDeltaT_Z = value; } }
internal IfcStructuralLoadTemperature() : base() { }
internal IfcStructuralLoadTemperature(DatabaseIfc db, IfcStructuralLoadTemperature t) : base(db,t) { mDeltaT_Constant = t.mDeltaT_Constant; mDeltaT_Y = t.mDeltaT_Y; mDeltaT_Z = t.mDeltaT_Z; }
public IfcStructuralLoadTemperature(DatabaseIfc db) : base(db) { }
public IfcStructuralLoadTemperature(DatabaseIfc db, double T, double TY, double TZ) : base(db) { mDeltaT_Constant = T; mDeltaT_Y = TY; mDeltaT_Z = TZ; }
}
[Serializable]

Просмотреть файл

@ -292,7 +292,7 @@ namespace GeometryGym.Ifc
{
var jsonObject = o.getJson(host, options);
if(jsonObject != null)
array.Append(jsonObject);
array.Add(jsonObject);
}
obj[name] = array;
}

Просмотреть файл

@ -420,7 +420,7 @@ namespace GeometryGym.Ifc
protected override string BuildStringSTEP(ReleaseVersion release)
{
return base.BuildStringSTEP(release) + (release < ReleaseVersion.IFC4 ? "" : (string.IsNullOrEmpty(mDescription) ? ",$," : ",'" + ParserIfc.Encode(mDescription) + "',") +
(mReferencedDocument == null ? ",$" : ",#" + mReferencedDocument.StepId)); }
(mReferencedDocument == null ? "$" : "#" + mReferencedDocument.StepId)); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
{
base.parse(str, ref pos, release, len, dictionary);

Просмотреть файл

@ -20,8 +20,8 @@ using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyVersion("0.2.05.0")]
[assembly: AssemblyFileVersion("0.2.05.0")]
[assembly: AssemblyVersion("0.2.06.0")]
[assembly: AssemblyFileVersion("0.2.06.0")]
[assembly: AssemblyTitle("GeometryGymIFC")]
[assembly: AssemblyDescription("C# classes to generate and parse buildingSMART IFC (Industry Foundation Class) files")]

Просмотреть файл

@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageId>GeometryGymIFC_Core</PackageId>
<Version>0.2.05</Version>
<Version>0.2.06</Version>
<Authors>Geometry Gym</Authors>
<Product>GeometryGymIFC_Core</Product>
<Description>.Net Standard 2.0 C# classes to generate and parse buildingSMART IFC (Industry Foundation Class) files
@ -14,8 +14,8 @@ License https://github.com/GeometryGym/GeometryGymIFC/blob/master/LICENSE</Descr
<PackageProjectUrl></PackageProjectUrl>
<RepositoryUrl>https://github.com/GeometryGym/GeometryGymIFC</RepositoryUrl>
<PackageTags>BIM, IFC, openBIM</PackageTags>
<AssemblyVersion>0.2.05.0</AssemblyVersion>
<FileVersion>0.2.05.0</FileVersion>
<AssemblyVersion>0.2.06.0</AssemblyVersion>
<FileVersion>0.2.06.0</FileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">