Skip to content

Commit

Permalink
v0.2.05
Browse files Browse the repository at this point in the history
  • Loading branch information
jmirtsch committed Sep 28, 2022
1 parent 688480e commit 0589fe7
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Core/IFC/IFC I.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public partial class IfcIndexedPolyCurve : IfcBoundedCurve
{
private IfcCartesianPointList mPoints; // IfcCartesianPointList
internal LIST<IfcSegmentIndexSelect> mSegments = new LIST<IfcSegmentIndexSelect>();// OPTIONAL LIST [1:?] OF IfcSegmentIndexSelect;
internal IfcLogicalEnum mSelfIntersect = IfcLogicalEnum.UNKNOWN;// Optional IfcLogical
internal IfcLogicalEnum mSelfIntersect = IfcLogicalEnum.UNKNOWN;// IfcLogical

public IfcCartesianPointList Points { get { return mPoints; } set { mPoints = value; } }
public LIST<IfcSegmentIndexSelect> Segments { get { return mSegments; } }
Expand Down
25 changes: 18 additions & 7 deletions Core/IFC/ParserIFC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -485,13 +485,23 @@ internal static IfcSimpleValue parseSimpleValue(string str)
return new IfcText((str[9] == '$' || s == null ? "" : ParserIfc.Decode(s)));
}
if (str.StartsWith("IFCURIREFERENCE("))
{
return new IfcURIReference(str[16] == '$' ? "" : ParserIfc.Decode(str.Substring(17, str.Length - 19)));
if(str.StartsWith("IFCDATE("))
{
string valueString = str.Substring(9, str.Length - 11);
if (DateTime.TryParse(valueString, out DateTime dateTime))
return new IfcDate(dateTime);
return new IfcLabel(valueString);
}
if(str.StartsWith("IFCDURATION("))
if(str.StartsWith("IFCDATETIME("))
{
return IfcDuration.Convert(str.Substring(13, str.Length - 15));
string valueString = str.Substring(13, str.Length - 15);
if (DateTime.TryParse(valueString, out DateTime dateTime))
return new IfcDateTime(dateTime);
return new IfcLabel(valueString);
}
if(str.StartsWith("IFCDURATION("))
return IfcDuration.Convert(str.Substring(13, str.Length - 15));
int i = 0;
if (int.TryParse(str, out i))
return new IfcInteger(i);
Expand Down Expand Up @@ -547,14 +557,15 @@ internal static IfcSimpleValue extractSimpleValue(Type type, string value)
}
internal static IfcValue parseValue(string str)
{
if (string.Compare(str, "$", true) == 0)
if (string.IsNullOrEmpty(str) || string.Compare(str, "$", true) == 0)
return null;
IfcSimpleValue sv = parseSimpleValue(str);
if (sv != null)
return sv;
IfcMeasureValue mv = parseMeasureValue(str);
if (mv != null)
return mv;
IfcSimpleValue sv = parseSimpleValue(str);
if (sv != null)
return sv;

return parseDerivedMeasureValue(str);
}
internal static IfcValue extractValue(string keyword, string value)
Expand Down
3 changes: 1 addition & 2 deletions Core/IFC/STEP/IFC I STEP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ public partial class IfcIndexedPolyCurve
{
protected override string BuildStringSTEP(ReleaseVersion release)
{
return "#" + mPoints.StepId + (mSegments.Count == 0 ? ",$," : ",(" + string.Join(",", mSegments) + "),") +
(mSelfIntersect == IfcLogicalEnum.UNKNOWN ? "$" : (mSelfIntersect == IfcLogicalEnum.TRUE ? ".T." : ".F."));
return "#" + mPoints.StepId + (mSegments.Count == 0 ? ",$," : ",(" + string.Join(",", mSegments) + "),") + ParserIfc.LogicalToString(mSelfIntersect);
}
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
{
Expand Down
4 changes: 2 additions & 2 deletions DLL Projects/GeometryGymIFC/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

[assembly: AssemblyVersion("0.2.04.0")]
[assembly: AssemblyFileVersion("0.2.04.0")]
[assembly: AssemblyVersion("0.2.05.0")]
[assembly: AssemblyFileVersion("0.2.05.0")]

[assembly: AssemblyTitle("GeometryGymIFC")]
[assembly: AssemblyDescription("C# classes to generate and parse buildingSMART IFC (Industry Foundation Class) files")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

[assembly: AssemblyVersion("0.2.04.0")]
[assembly: AssemblyFileVersion("0.2.04.0")]
[assembly: AssemblyVersion("0.2.05.0")]
[assembly: AssemblyFileVersion("0.2.05.0")]
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
Expand Down
6 changes: 3 additions & 3 deletions DLL Projects/GeometryGymIFCcore/GeometryGymIFCcore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageId>GeometryGymIFC_Core</PackageId>
<Version>0.2.03</Version>
<Version>0.2.05</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
Expand All @@ -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.03.0</AssemblyVersion>
<FileVersion>0.2.03.0</FileVersion>
<AssemblyVersion>0.2.05.0</AssemblyVersion>
<FileVersion>0.2.05.0</FileVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down

0 comments on commit 0589fe7

Please sign in to comment.