v0.2.12
This commit is contained in:
Родитель
2a3082e760
Коммит
f0ce43b2db
|
@ -836,7 +836,7 @@ namespace GeometryGym.Ifc
|
|||
private BaseClassIfc duplicateWorker(BaseClassIfc entity, DuplicateOptions options)
|
||||
{
|
||||
BaseClassIfc result = null;
|
||||
if (mDatabase.Release != entity.mDatabase.Release)
|
||||
if (entity.mDatabase == null || mDatabase.Release != entity.mDatabase.Release)
|
||||
{
|
||||
if (mDatabase.Release < ReleaseVersion.IFC4X3_RC1)
|
||||
{
|
||||
|
|
|
@ -23,10 +23,17 @@ namespace GeometryGym.Ifc
|
|||
{
|
||||
public enum ShapeRepresentationType
|
||||
{
|
||||
Curve2D, Annotation2D, GeometricSet, GeometricCurveSet, SurfaceModel, SolidModel, SweptSolid, CSG, Clipping, AdvancedSweptSolid, Brep, BoundingBox, SectionedSpine, MappedRepresentation,
|
||||
[VersionAdded(ReleaseVersion.IFC4)] Point, [VersionAdded(ReleaseVersion.IFC4)] PointCloud, [VersionAdded(ReleaseVersion.IFC4)] Curve, [VersionAdded(ReleaseVersion.IFC4)] Curve3D,
|
||||
[VersionAdded(ReleaseVersion.IFC4)] Surface, [VersionAdded(ReleaseVersion.IFC4)] Surface2D, [VersionAdded(ReleaseVersion.IFC4)] Surface3D, [VersionAdded(ReleaseVersion.IFC4)] FillArea,
|
||||
[VersionAdded(ReleaseVersion.IFC4)] Text, [VersionAdded(ReleaseVersion.IFC4)] Tessellation, [VersionAdded(ReleaseVersion.IFC4)] AdvancedBrep, [VersionAdded(ReleaseVersion.IFC4)] LightSource
|
||||
Curve2D, Annotation2D, GeometricSet, GeometricCurveSet, SurfaceModel, SolidModel, SweptSolid, CSG, Clipping,
|
||||
AdvancedSweptSolid, Brep, BoundingBox, SectionedSpine, MappedRepresentation,
|
||||
[VersionAdded(ReleaseVersion.IFC4)] Point, [VersionAdded(ReleaseVersion.IFC4)] PointCloud,
|
||||
[VersionAdded(ReleaseVersion.IFC4)] Curve, [VersionAdded(ReleaseVersion.IFC4)] Curve3D,
|
||||
[VersionAdded(ReleaseVersion.IFC4)] Surface, [VersionAdded(ReleaseVersion.IFC4)] Surface2D,
|
||||
[VersionAdded(ReleaseVersion.IFC4)] Surface3D, [VersionAdded(ReleaseVersion.IFC4)] FillArea,
|
||||
[VersionAdded(ReleaseVersion.IFC4)] Text, [VersionAdded(ReleaseVersion.IFC4)] Tessellation,
|
||||
[VersionAdded(ReleaseVersion.IFC4)] AdvancedBrep, [VersionAdded(ReleaseVersion.IFC4)] AdvancedSurface,
|
||||
[VersionAdded(ReleaseVersion.IFC4)] LightSource, [VersionAdded(ReleaseVersion.IFC4)] SurfaceOrSolidModel ,
|
||||
[VersionAdded(ReleaseVersion.IFC4X3)] SectionedSurface, [VersionAdded(ReleaseVersion.IFC4X3)] Segment
|
||||
|
||||
};
|
||||
|
||||
[VersionAdded(ReleaseVersion.IFC4)]
|
||||
|
|
|
@ -1077,7 +1077,7 @@ namespace GeometryGym.Ifc
|
|||
throw new NotImplementedException("XX Not Implemented horizontal segment " + PredefinedType.ToString());
|
||||
IfcCurveSegment curveSegment = new IfcCurveSegment(IfcTransitionCode.CONTSAMEGRADIENTSAMECURVATURE, placement, start, length, parentCurve);
|
||||
if (mDesignerOf != null)
|
||||
mDesignerOf.Representation = new IfcProductDefinitionShape(new IfcShapeRepresentation(mDatabase.Factory.SubContext(IfcGeometricRepresentationSubContext.SubContextIdentifier.Axis), curveSegment, ShapeRepresentationType.Curve2D));
|
||||
mDesignerOf.Representation = new IfcProductDefinitionShape(new IfcShapeRepresentation(mDatabase.Factory.SubContext(IfcGeometricRepresentationSubContext.SubContextIdentifier.Axis), curveSegment, ShapeRepresentationType.Segment));
|
||||
|
||||
return curveSegment;
|
||||
}
|
||||
|
@ -1302,7 +1302,7 @@ namespace GeometryGym.Ifc
|
|||
throw new NotImplementedException("XX Not Implemented vertical segment " + PredefinedType.ToString());
|
||||
|
||||
if (mDesignerOf != null)
|
||||
mDesignerOf.Representation = new IfcProductDefinitionShape(new IfcShapeRepresentation(mDatabase.Factory.SubContext(IfcGeometricRepresentationSubContext.SubContextIdentifier.Axis), curveSegment, ShapeRepresentationType.Curve2D));
|
||||
mDesignerOf.Representation = new IfcProductDefinitionShape(new IfcShapeRepresentation(mDatabase.Factory.SubContext(IfcGeometricRepresentationSubContext.SubContextIdentifier.Axis), curveSegment, ShapeRepresentationType.Segment));
|
||||
return curveSegment;
|
||||
}
|
||||
|
||||
|
|
|
@ -532,26 +532,6 @@ namespace GeometryGym.Ifc
|
|||
[Serializable]
|
||||
public partial class IfcShapeRepresentation : IfcShapeModel
|
||||
{
|
||||
/*Curve2D 2 dimensional curve
|
||||
Curve3D 3 dimensional curve
|
||||
Surface2D 2 dimensional surface (a region on ground view)
|
||||
Surface3D 3 dimensional surface
|
||||
GeometricSet points, curves, surfaces (2 or 3 dimensional)
|
||||
GeometricCurveSet points, curves (2 or 3 dimensional)
|
||||
Annotation2D points, curves (2 or 3 dimensional), hatches and text (2 dimensional)
|
||||
SurfaceModel face based and shell based surface model
|
||||
SolidModel including swept solid, Boolean results and Brep bodies
|
||||
more specific types are:
|
||||
SweptSolid swept area solids, by extrusion and revolution, excluding tapered sweeps
|
||||
AdvancedSweptSolid swept area solids created by sweeping a profile aint a directrix, and tapered sweeps
|
||||
Brep faceted Brep's with and without voids
|
||||
AdvancedBrep Brep's based on advanced faces, with b-spline surface geometry, with and without voids
|
||||
CSG Boolean results of operations between solid models, half spaces and Boolean results
|
||||
Clipping Boolean differences between swept area solids, half spaces and Boolean results
|
||||
additional types some additional representation types are given:
|
||||
BoundingBox simplistic 3D representation by a bounding box
|
||||
SectionedSpine cross section based representation of a spine curve and planar cross sections. It can represent a surface or a solid and the interpolations of the between the cross sections is not defined
|
||||
MappedRepresentation*/
|
||||
internal IfcShapeRepresentation() : base() { }
|
||||
internal IfcShapeRepresentation(DatabaseIfc db, IfcShapeRepresentation r, DuplicateOptions options) : base(db, r, options) { }
|
||||
public IfcShapeRepresentation(IfcGeometricRepresentationItem representation, ShapeRepresentationType representationType) : base(representation.mDatabase.Factory.SubContext(IfcGeometricRepresentationSubContext.SubContextIdentifier.Body), representation) { RepresentationType = representationType.ToString(); }
|
||||
|
@ -587,9 +567,10 @@ additional types some additional representation types are given:
|
|||
{
|
||||
IfcProfileDef pd = spine.CrossSections[0];
|
||||
if (pd.mProfileType == IfcProfileTypeEnum.CURVE)
|
||||
RepresentationType = "Surface3D";
|
||||
RepresentationType = ShapeRepresentationType.Surface3D.ToString();
|
||||
}
|
||||
}
|
||||
public IfcShapeRepresentation(IfcSectionedSurface surface) : base(surface) { RepresentationType = ShapeRepresentationType.SectionedSurface.ToString(); }
|
||||
public IfcShapeRepresentation(IfcShellBasedSurfaceModel surface) : base(surface) { RepresentationType = ShapeRepresentationType.SurfaceModel.ToString(); }
|
||||
public IfcShapeRepresentation(IfcSurface surface) : base(surface) { RepresentationType = ShapeRepresentationType.Surface3D.ToString(); }
|
||||
public IfcShapeRepresentation(IfcExtrudedAreaSolid extrudedAreaSolid) : base(extrudedAreaSolid) { RepresentationType = ShapeRepresentationType.SweptSolid.ToString(); }
|
||||
|
|
|
@ -324,7 +324,7 @@ namespace GeometryGym.Ifc
|
|||
public class IfcCompoundPlaneAngleMeasure //: IfcDerivedMeasureValue
|
||||
{
|
||||
internal int mDegrees = 0, mMinutes = 0, mSeconds = 0, mMicroSeconds = 0;
|
||||
public IfcCompoundPlaneAngleMeasure(double angleDegrees) //: base(angleDegrees)
|
||||
public IfcCompoundPlaneAngleMeasure(double angleDegrees)
|
||||
{
|
||||
double ang = Math.Abs(angleDegrees);
|
||||
int sign = angleDegrees < 0 ? -1 : 1;
|
||||
|
|
|
@ -371,7 +371,6 @@ namespace GeometryGym.Ifc
|
|||
|
||||
public static partial class JsonIFCExtensions
|
||||
{
|
||||
|
||||
#if (NEWTONSOFT)
|
||||
public static T GetValue<T>(this JToken node)
|
||||
{
|
||||
|
|
|
@ -207,7 +207,7 @@ namespace GeometryGym.Ifc
|
|||
protected override string BuildStringSTEP(ReleaseVersion release)
|
||||
{
|
||||
return "(" + string.Join(",", mCoordList.Select(x => "(" + formatLength(x.Item1) + "," + formatLength(x.Item2) + ")")) + ")" +
|
||||
(release < ReleaseVersion.IFC4X1 ? "" : (mTagList == null || mTagList.Count == 0 ? ",$" : ",(" + string.Join(",", mTagList.Select(x=> (string.IsNullOrEmpty(x) ? "$" : "'" + ParserSTEP.Encode(x) + "'"))) + ")" ));
|
||||
(release < ReleaseVersion.IFC4X1 ? "" : (mTagList == null || mTagList.Count == 0 ? ",$" : ",(" + string.Join(",", mTagList.Select(x=> (string.IsNullOrEmpty(x) ? "''" : "'" + ParserSTEP.Encode(x) + "'"))) + ")" ));
|
||||
}
|
||||
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary)
|
||||
{
|
||||
|
@ -260,7 +260,7 @@ namespace GeometryGym.Ifc
|
|||
textWriter.Write("))");
|
||||
|
||||
if(release >= ReleaseVersion.IFC4X1)
|
||||
textWriter.Write(mTagList == null || mTagList.Count == 0 ? ",$" : ",(" + string.Join(",", mTagList.Select(x => (string.IsNullOrEmpty(x) ? "$" : "'" + ParserSTEP.Encode(x) + "'"))) + ")");
|
||||
textWriter.Write(mTagList == null || mTagList.Count == 0 ? ",$" : ",(" + string.Join(",", mTagList.Select(x => (string.IsNullOrEmpty(x) ? "''" : "'" + ParserSTEP.Encode(x) + "'"))) + ")");
|
||||
|
||||
WriteStepLineWorkerSuffix(textWriter);
|
||||
}
|
||||
|
@ -286,7 +286,7 @@ namespace GeometryGym.Ifc
|
|||
}
|
||||
stringBuilder.Append("))");
|
||||
return stringBuilder.ToString() +
|
||||
(release < ReleaseVersion.IFC4X1 ? "" : (mTagList == null || mTagList.Count == 0 ? ",$" : ",(" + string.Join(",", mTagList.Select(x => (string.IsNullOrEmpty(x) ? "$" : "'" + ParserSTEP.Encode(x) + "'"))) + ")"));
|
||||
(release < ReleaseVersion.IFC4X1 ? "" : (mTagList == null || mTagList.Count == 0 ? ",$" : ",(" + string.Join(",", mTagList.Select(x => (string.IsNullOrEmpty(x) ? "''" : "'" + ParserSTEP.Encode(x) + "'"))) + ")"));
|
||||
}
|
||||
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary)
|
||||
{
|
||||
|
|
|
@ -80,8 +80,8 @@ namespace GeometryGym.Ifc
|
|||
if (release < ReleaseVersion.IFC4X3_ADD1)
|
||||
return "";
|
||||
return base.BuildStringSTEP(release) +
|
||||
(string.IsNullOrEmpty(mPrimeMeridian) ? "$," : "'" + ParserSTEP.Encode(mPrimeMeridian) + "',") +
|
||||
(mAngleUnit == null ? "$" : "#" + mAngleUnit.StepId) + (mHeightUnit == null ? "$" : "#" + mHeightUnit.StepId);
|
||||
(string.IsNullOrEmpty(mPrimeMeridian) ? ",$," : ",'" + ParserSTEP.Encode(mPrimeMeridian) + "',") +
|
||||
(mAngleUnit == null ? "$" : "#" + mAngleUnit.StepId) + (mHeightUnit == null ? ",$" : ",#" + mHeightUnit.StepId);
|
||||
}
|
||||
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary)
|
||||
{
|
||||
|
|
|
@ -146,7 +146,7 @@ namespace GeometryGym.Ifc
|
|||
result += ",(" + string.Join(",", mCrossSectionPositionMeasures_OBSOLETE.ConvertAll(x => "#" + x.ToString()));
|
||||
else
|
||||
result += ",(" + string.Join(",", CrossSectionPositions.Select(x => "#" + x.StepId));
|
||||
return result + (release < ReleaseVersion.IFC4X3 ? (mFixedAxisVertical ? "),.T." : "),.F.") : "");
|
||||
return result + (release < ReleaseVersion.IFC4X3 ? (mFixedAxisVertical ? "),.T." : "),.F.") : ")");
|
||||
}
|
||||
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary)
|
||||
{
|
||||
|
|
|
@ -1018,7 +1018,13 @@ namespace GeometryGym.Ifc
|
|||
}
|
||||
public partial class IfcRigidOperation
|
||||
{
|
||||
|
||||
internal override void SetXML(XmlElement xml, BaseClassIfc host, Dictionary<string, XmlElement> processed)
|
||||
{
|
||||
base.SetXML(xml, host, processed);
|
||||
xml.AppendChild(convert(xml.OwnerDocument, FirstCoordinate as IfcValue, "FirstCoordinate", mDatabase.mXmlNamespace));
|
||||
xml.AppendChild(convert(xml.OwnerDocument, SecondCoordinate as IfcValue, "SecondCoordinate", mDatabase.mXmlNamespace));
|
||||
xml.SetAttribute("Height", mHeight.ToString());
|
||||
}
|
||||
}
|
||||
public partial class IfcRoot
|
||||
{
|
||||
|
|
|
@ -20,8 +20,8 @@ using System.Reflection;
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[assembly: AssemblyVersion("0.2.09.0")]
|
||||
[assembly: AssemblyFileVersion("0.2.09.0")]
|
||||
[assembly: AssemblyVersion("0.2.12.0")]
|
||||
[assembly: AssemblyFileVersion("0.2.12.0")]
|
||||
|
||||
[assembly: AssemblyTitle("GeometryGymIFC")]
|
||||
[assembly: AssemblyDescription("C# classes to generate and parse buildingSMART IFC (Industry Foundation Class) files")]
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;NEWTONSOFT</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;NEWTONSOFT OPEN_SOURCE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
|
@ -44,7 +44,7 @@
|
|||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NEWTONSOFT</DefineConstants>
|
||||
<DefineConstants>TRACE;NEWTONSOFT OPEN_SOURCE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
|
|
|
@ -20,8 +20,8 @@ using System.Reflection;
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[assembly: AssemblyVersion("0.2.09.0")]
|
||||
[assembly: AssemblyFileVersion("0.2.09.0")]
|
||||
[assembly: AssemblyVersion("0.2.12.0")]
|
||||
[assembly: AssemblyFileVersion("0.2.12.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.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<PackageId>GeometryGymIFC_Core</PackageId>
|
||||
<Version>0.2.09</Version>
|
||||
<Version>0.2.12</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.09.0</AssemblyVersion>
|
||||
<FileVersion>0.2.09.0</FileVersion>
|
||||
<AssemblyVersion>0.2.12.0</AssemblyVersion>
|
||||
<FileVersion>0.2.12.0</FileVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
|
|
Загрузка…
Ссылка в новой задаче