This commit is contained in:
Jon Mirtschin 2022-07-05 13:39:27 +10:00
Родитель 9bec92821d
Коммит 27b0c3b962
43 изменённых файлов: 1162 добавлений и 969 удалений

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

@ -365,6 +365,8 @@ namespace GeometryGym.Ifc
className = "IfcPointByDistanceExpression"; className = "IfcPointByDistanceExpression";
if (string.Compare(className, "IfcProductRepresentation", true) == 0) if (string.Compare(className, "IfcProductRepresentation", true) == 0)
className = "IfcProductDefinitionShape"; className = "IfcProductDefinitionShape";
if (string.Compare(className, "IfcFacilityPart", true) == 0)
className = "IfcFacilityPartCommon";
if (!mConstructors.TryGetValue(className, out constructor)) if (!mConstructors.TryGetValue(className, out constructor))
{ {
@ -474,6 +476,7 @@ namespace GeometryGym.Ifc
return result; return result;
} }
internal virtual bool isDuplicate(BaseClassIfc e) { return isDuplicate(e, mDatabase == null ? 1e-5 : mDatabase.Tolerance); }
// This method has only partial implementation within opensource project and // This method has only partial implementation within opensource project and
// any use of it should be carefully checked. // any use of it should be carefully checked.
internal virtual bool isDuplicate(BaseClassIfc e, double tol) { return true; } internal virtual bool isDuplicate(BaseClassIfc e, double tol) { return true; }

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

@ -92,6 +92,7 @@ namespace GeometryGym.Ifc
internal ReleaseVersion mRelease = ReleaseVersion.IFC2x3; internal ReleaseVersion mRelease = ReleaseVersion.IFC2x3;
public FormatIfcSerialization Format { get; set; } public FormatIfcSerialization Format { get; set; }
public string SourceFilePath { get; set; } = ""; public string SourceFilePath { get; set; } = "";
public string Authorization { get; set; } = "None";
private FactoryIfc mFactory = null; private FactoryIfc mFactory = null;
public FactoryIfc Factory { get { return mFactory; } } public FactoryIfc Factory { get { return mFactory; } }
@ -174,7 +175,7 @@ namespace GeometryGym.Ifc
if (modelView == ModelView.Ifc4X2NotAssigned) if (modelView == ModelView.Ifc4X2NotAssigned)
return ReleaseVersion.IFC4X2; return ReleaseVersion.IFC4X2;
if (modelView == ModelView.Ifc4X3NotAssigned) if (modelView == ModelView.Ifc4X3NotAssigned)
return ReleaseVersion.IFC4X3_RC4; return ReleaseVersion.IFC4X3;
return ReleaseVersion.IFC4A2; return ReleaseVersion.IFC4A2;
} }
public double Tolerance public double Tolerance
@ -311,6 +312,23 @@ namespace GeometryGym.Ifc
} }
return result; return result;
} }
#if(!NOIFCZIP)
public bool WriteSTEPZipFile(string filePath, SetProgressBarCallback setProgressBarCallback)
{
string path = setFileInformation(filePath);
ZipArchive za = null;
if (File.Exists(path))
File.Delete(path);
za = ZipFile.Open(path, System.IO.Compression.ZipArchiveMode.Create);
ZipArchiveEntry zae = za.CreateEntry(Path.GetFileNameWithoutExtension(path) + ".ifc");
StreamWriter sw = new StreamWriter(zae.Open());
bool result = new SerializationIfcSTEP(this).WriteSTEP(sw, path, setProgressBarCallback);
sw.Close();
za.Dispose();
return true;
}
#endif
public bool WriteFile(string filePath) public bool WriteFile(string filePath)
{ {
StreamWriter sw = null; StreamWriter sw = null;
@ -501,7 +519,7 @@ namespace GeometryGym.Ifc
type = typeof(IfcBuildingElementProxy); type = typeof(IfcBuildingElementProxy);
else if (release < ReleaseVersion.IFC4X2) else if (release < ReleaseVersion.IFC4X2)
{ {
if(typeof(IfcFacility).IsAssignableFrom(type)) if(typeof(IfcFacility).IsAssignableFrom(type) && !typeof(IfcBuilding).IsAssignableFrom(type))
type = typeof(IfcSite); type = typeof(IfcSite);
if (typeof(IfcFacilityPart).IsAssignableFrom(type)) if (typeof(IfcFacilityPart).IsAssignableFrom(type))
type = typeof(IfcSpace); type = typeof(IfcSpace);
@ -520,6 +538,11 @@ namespace GeometryGym.Ifc
} }
} }
} }
else if (release > ReleaseVersion.IFC4X1)
{
if (typeof(IfcFacilityPart) == type)
type = typeof(IfcFacilityPartCommon);
}
IfcProduct product = construct(type, host, placement, representation, system); IfcProduct product = construct(type, host, placement, representation, system);
if (product == null) if (product == null)
throw new Exception("XXX Unrecognized Ifc Constructor for " + className); throw new Exception("XXX Unrecognized Ifc Constructor for " + className);
@ -619,7 +642,10 @@ namespace GeometryGym.Ifc
internal DuplicateMapping mDuplicateMapping = new DuplicateMapping(); internal DuplicateMapping mDuplicateMapping = new DuplicateMapping();
internal Dictionary<string, IfcProperty> mProperties = new Dictionary<string, IfcProperty>(); internal Dictionary<string, IfcProperty> mProperties = new Dictionary<string, IfcProperty>();
internal Dictionary<string, IfcPropertySet> mPropertySets = new Dictionary<string, IfcPropertySet>(); internal Dictionary<string, IfcPropertySet> mPropertySets = new Dictionary<string, IfcPropertySet>();
public BaseClassIfc Duplicate(IBaseClassIfc entity) { return Duplicate(entity as BaseClassIfc, new DuplicateOptions(mDatabase.Tolerance) { DuplicateDownstream = true }); } public T Duplicate<T>(T entity) where T : class, IBaseClassIfc
{
return Duplicate<T>(entity, new DuplicateOptions(mDatabase.Tolerance) { DuplicateDownstream = true });
}
public void NominateDuplicate(IBaseClassIfc entity, IBaseClassIfc existingDuplicate) { mDuplicateMapping.AddObject(entity as BaseClassIfc, existingDuplicate.Index); } public void NominateDuplicate(IBaseClassIfc entity, IBaseClassIfc existingDuplicate) { mDuplicateMapping.AddObject(entity as BaseClassIfc, existingDuplicate.Index); }
public IfcAxis2Placement3D DuplicateAxis(IfcAxis2Placement3D placement, DuplicateOptions options) public IfcAxis2Placement3D DuplicateAxis(IfcAxis2Placement3D placement, DuplicateOptions options)
{ {
@ -630,45 +656,47 @@ namespace GeometryGym.Ifc
return mDatabase[index] as IfcAxis2Placement3D; return mDatabase[index] as IfcAxis2Placement3D;
if (placement.IsXYPlane(mDatabase.Tolerance)) if (placement.IsXYPlane(mDatabase.Tolerance))
return XYPlanePlacement; return XYPlanePlacement;
return Duplicate(placement, options) as IfcAxis2Placement3D; return Duplicate<IfcAxis2Placement3D>(placement, options);
} }
public BaseClassIfc Duplicate(BaseClassIfc entity, DuplicateOptions options) public T Duplicate<T>(T entity, DuplicateOptions options) where T : class, IBaseClassIfc
{ {
if (entity == null) if (entity == null)
return null; return null;
if (entity.mDatabase != null && entity.mDatabase.id == mDatabase.id) BaseClassIfc obj = entity as BaseClassIfc;
if (obj.Database != null && obj.Database.id == mDatabase.id)
return entity; return entity;
BaseClassIfc result = null; T result = null;
IfcClassification classification = entity as IfcClassification; IfcClassification classification = entity as IfcClassification;
if(classification != null) if(classification != null)
result = findExisting<IfcClassification>(classification); result = findExisting<IfcClassification>(classification) as T;
else else
{ {
IfcClassificationReference classificationReference = entity as IfcClassificationReference; IfcClassificationReference classificationReference = entity as IfcClassificationReference;
if (classificationReference != null) if (classificationReference != null)
result = findExisting<IfcClassificationReference>(classificationReference); result = findExisting<IfcClassificationReference>(classificationReference) as T;
} }
if (result != null) if (result != null)
return result; return result;
int index = mDuplicateMapping.FindExisting(entity); int index = mDuplicateMapping.FindExisting(obj);
if (index > 0) if (index > 0)
{ {
result = mDatabase[index]; result = mDatabase[index] as T;
if (result != null) if (result != null)
return result; return result;
} }
if (!string.IsNullOrEmpty(entity.mGlobalId)) if (!string.IsNullOrEmpty(obj.mGlobalId))
{ {
if (mDatabase.mDictionary.TryGetValue(entity.mGlobalId, out result)) if (mDatabase.mDictionary.TryGetValue(obj.mGlobalId, out BaseClassIfc existing))
{ {
result = existing as T;
if (result != null) if (result != null)
{ {
mDuplicateMapping.AddObject(entity, result.mIndex); mDuplicateMapping.AddObject(obj, result.StepId);
return result; return result;
} }
} }
} }
result = duplicateWorker(entity, options); result = duplicateWorker(obj, options) as T;
if (result == null) if (result == null)
return null; return null;
@ -1343,7 +1371,7 @@ namespace GeometryGym.Ifc
} }
} }
} }
private IfcPersonAndOrganization mPersonOrganization = null; internal IfcPersonAndOrganization mPersonOrganization = null;
internal IfcPersonAndOrganization PersonOrganization internal IfcPersonAndOrganization PersonOrganization
{ {
get get
@ -1356,7 +1384,7 @@ namespace GeometryGym.Ifc
} }
internal string PersonName() { return System.Environment.UserName; } internal string PersonName() { return System.Environment.UserName; }
internal IfcPerson mPerson = null; internal IfcPerson mPerson = null;
internal IfcPerson Person public IfcPerson Person
{ {
get get
{ {
@ -1383,7 +1411,7 @@ namespace GeometryGym.Ifc
set { mPerson = value; } set { mPerson = value; }
} }
internal IfcOrganization mOrganization = null; internal IfcOrganization mOrganization = null;
internal IfcOrganization Organization public IfcOrganization Organization
{ {
get get
{ {
@ -1430,7 +1458,7 @@ namespace GeometryGym.Ifc
} }
mOwnerHistories.Add(ownerHistory); mOwnerHistories.Add(ownerHistory);
} }
private IfcOwnerHistory mOwnerHistoryAdded = null; internal IfcOwnerHistory mOwnerHistoryAdded = null;
public IfcOwnerHistory OwnerHistoryAdded public IfcOwnerHistory OwnerHistoryAdded
{ {
get get
@ -2511,6 +2539,30 @@ namespace GeometryGym.Ifc
sw.Close(); sw.Close();
return true; return true;
} }
public bool WriteSTEP(TextWriter textWriter, string filename, SetProgressBarCallback progressBarCallback)
{
mDatabase.FileName = filename;
mCachedCulture = Thread.CurrentThread.CurrentCulture;
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
textWriter.Write(getHeaderString(filename) + "\r\n");
ReleaseVersion release = mDatabase.Release;
int count = mDatabase.Count(), counter = 0, progress = 0;
progressBarCallback(0);
foreach (BaseClassIfc e in mDatabase)
{
if (e != null)
e.WriteStepLine(textWriter, release);
int calculatedProgress = 100 * counter / count;
if (calculatedProgress > progress)
{
progressBarCallback(++progress);
}
}
textWriter.Write(getFooterString());
Thread.CurrentThread.CurrentUICulture = mCachedCulture;
progressBarCallback(100);
return true;
}
public bool WriteSTEP(TextWriter textWriter, string filename) public bool WriteSTEP(TextWriter textWriter, string filename)
{ {
mDatabase.FileName = filename; mDatabase.FileName = filename;
@ -2576,30 +2628,18 @@ namespace GeometryGym.Ifc
string authorName = person == null ? mDatabase.Factory.PersonName() : person.Name; string authorName = person == null ? mDatabase.Factory.PersonName() : person.Name;
lines.Add("/* author */ ('" + ParserIfc.Encode(authorName) + "'),"); lines.Add("/* author */ ('" + ParserIfc.Encode(authorName) + "'),");
string organizationName = IfcOrganization.Organization; string organizationName = IfcOrganization.Organization;
IfcOrganization organization = null; IfcOrganization organization = mDatabase.Factory.Organization;
if (organization != null) if (organization != null)
organizationName = organization.Name; organizationName = organization.Name;
lines.Add("/* organization */ ('" + ParserIfc.Encode(organizationName) + "'),"); lines.Add("/* organization */ ('" + ParserIfc.Encode(organizationName) + "'),");
lines.Add("/* preprocessor_version */ '" + ParserIfc.Encode(mDatabase.Factory.ToolkitName) + "',"); lines.Add("/* preprocessor_version */ '" + ParserIfc.Encode(mDatabase.Factory.ToolkitName) + "',");
lines.Add("/* originating_system */ '" + ParserIfc.Encode(mDatabase.Factory.ApplicationFullName) + "',"); lines.Add("/* originating_system */ '" + ParserIfc.Encode(mDatabase.Factory.ApplicationFullName) + "',");
lines.Add("/* authorization */ 'None');"); lines.Add("/* authorization */ '" + (string.IsNullOrEmpty(mDatabase.Authorization) ? "None" : ParserIfc.Encode(mDatabase.Authorization)) + "');");
lines.Add(""); lines.Add("");
string version = "IFC4";
ReleaseVersion release = mDatabase.Release; ReleaseVersion release = mDatabase.Release;
if (release == ReleaseVersion.IFC2x3) string version = release.ToString().ToUpper();
version = "IFC2X3"; if (release == ReleaseVersion.IFC4A1 || release == ReleaseVersion.IFC4A2)
else if (release == ReleaseVersion.IFC4X1) version = "IFC4";
version = "IFC4X1";
else if (release == ReleaseVersion.IFC4X2)
version = "IFC4X2";
else if (release == ReleaseVersion.IFC4X3_RC1)
version = "IFC4X3_RC1";
else if (release == ReleaseVersion.IFC4X3_RC2)
version = "IFC4X3_RC2";
else if (release == ReleaseVersion.IFC4X3_RC3)
version = "IFC4X3_RC3";
else if (release == ReleaseVersion.IFC4X3_RC4)
version = "IFC4X3_RC4";
lines.Add("FILE_SCHEMA (('" + version + "'));"); lines.Add("FILE_SCHEMA (('" + version + "'));");
lines.Add("ENDSEC;"); lines.Add("ENDSEC;");
lines.Add(""); lines.Add("");

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

@ -54,15 +54,15 @@ namespace GeometryGym.Ifc
public partial class IfcActorRole : BaseClassIfc, IfcResourceObjectSelect public partial class IfcActorRole : BaseClassIfc, IfcResourceObjectSelect
{ {
internal IfcRoleEnum mRole = IfcRoleEnum.NOTDEFINED;// : OPTIONAL IfcRoleEnum internal IfcRoleEnum mRole = IfcRoleEnum.NOTDEFINED;// : OPTIONAL IfcRoleEnum
internal string mUserDefinedRole = "$";// : OPTIONAL IfcLabel internal string mUserDefinedRole = "";// : OPTIONAL IfcLabel
internal string mDescription = "$";// : OPTIONAL IfcText; internal string mDescription = "";// : OPTIONAL IfcText;
//INVERSE //INVERSE
private SET<IfcExternalReferenceRelationship> mHasExternalReference = new SET<IfcExternalReferenceRelationship>(); //IFC4 SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects; private SET<IfcExternalReferenceRelationship> mHasExternalReference = new SET<IfcExternalReferenceRelationship>(); //IFC4 SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects;
internal LIST<IfcResourceConstraintRelationship> mHasConstraintRelationships = new LIST<IfcResourceConstraintRelationship>(); //gg internal LIST<IfcResourceConstraintRelationship> mHasConstraintRelationships = new LIST<IfcResourceConstraintRelationship>(); //gg
public IfcRoleEnum Role { get { return mRole; } set { mRole = value; } } public IfcRoleEnum Role { get { return mRole; } set { mRole = value; } }
public string UserDefinedRole { get { return (mUserDefinedRole == "$" ? "" : ParserIfc.Decode(mUserDefinedRole)); } set { mUserDefinedRole = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string UserDefinedRole { get { return mUserDefinedRole; } set { mUserDefinedRole = value; } }
public string Description { get { return (mDescription == "$" ? "" : ParserIfc.Decode(mDescription)); } set { mDescription = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Description { get { return mDescription; } set { mDescription = value; } }
public SET<IfcExternalReferenceRelationship> HasExternalReference { get { return mHasExternalReference; } } public SET<IfcExternalReferenceRelationship> HasExternalReference { get { return mHasExternalReference; } }
public LIST<IfcResourceConstraintRelationship> HasConstraintRelationships { get { return mHasConstraintRelationships; } } public LIST<IfcResourceConstraintRelationship> HasConstraintRelationships { get { return mHasConstraintRelationships; } }
@ -122,12 +122,12 @@ namespace GeometryGym.Ifc
public abstract partial class IfcAddress : BaseClassIfc, IfcObjectReferenceSelect //ABSTRACT SUPERTYPE OF(ONEOF(IfcPostalAddress, IfcTelecomAddress)); public abstract partial class IfcAddress : BaseClassIfc, IfcObjectReferenceSelect //ABSTRACT SUPERTYPE OF(ONEOF(IfcPostalAddress, IfcTelecomAddress));
{ {
internal IfcAddressTypeEnum mPurpose = IfcAddressTypeEnum.NOTDEFINED;// : OPTIONAL IfcAddressTypeEnum internal IfcAddressTypeEnum mPurpose = IfcAddressTypeEnum.NOTDEFINED;// : OPTIONAL IfcAddressTypeEnum
internal string mDescription = "$";// : OPTIONAL IfcText; internal string mDescription = "";// : OPTIONAL IfcText;
internal string mUserDefinedPurpose = "$";// : OPTIONAL IfcLabel internal string mUserDefinedPurpose = "";// : OPTIONAL IfcLabel
public IfcAddressTypeEnum Purpose { get { return mPurpose; } set { mPurpose = value; } } public IfcAddressTypeEnum Purpose { get { return mPurpose; } set { mPurpose = value; } }
public string Description { get { return mDescription == "$" ? "" : ParserIfc.Decode(mDescription); } set { mDescription = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Description { get { return mDescription ; } set { mDescription = value; } }
public string UserDefinedPurpose { get { return mUserDefinedPurpose == "$" ? "" : ParserIfc.Decode(mUserDefinedPurpose); } set { mUserDefinedPurpose = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string UserDefinedPurpose { get { return mUserDefinedPurpose; } set { mUserDefinedPurpose = value; } }
protected IfcAddress() : base() { } protected IfcAddress() : base() { }
protected IfcAddress(DatabaseIfc db) : base(db) { } protected IfcAddress(DatabaseIfc db) : base(db) { }
@ -283,14 +283,14 @@ namespace GeometryGym.Ifc
public IfcAlignment(IfcSite host, IfcObjectPlacement placement, IfcAlignmentHorizontal horizontal, IfcAlignmentVertical vertical, IfcAlignmentCant cant, IfcCurve axis) public IfcAlignment(IfcSite host, IfcObjectPlacement placement, IfcAlignmentHorizontal horizontal, IfcAlignmentVertical vertical, IfcAlignmentCant cant, IfcCurve axis)
: this(placement, horizontal, vertical, cant, host, axis) { } : this(placement, horizontal, vertical, cant, host, axis) { }
internal override bool isDuplicate(BaseClassIfc e, double tol) internal override bool isDuplicate(BaseClassIfc e, bool includeAggregated, double tol)
{ {
IfcAlignment alignment = e as IfcAlignment; IfcAlignment alignment = e as IfcAlignment;
if (alignment == null) if (alignment == null)
return false; return false;
if (PredefinedType != alignment.PredefinedType) if (PredefinedType != alignment.PredefinedType)
return false; return false;
return base.isDuplicate(e, tol); return base.isDuplicate(e, includeAggregated, tol);
} }
} }
[Obsolete("DEPRECATED IFC4X3", false)] [Obsolete("DEPRECATED IFC4X3", false)]
@ -521,12 +521,12 @@ namespace GeometryGym.Ifc
public abstract partial class IfcAlignment2DSegment : IfcGeometricRepresentationItem //IFC4.1 ABSTRACT SUPERTYPE OF(ONEOF(IfcAlignment2DHorizontalSegment, IfcAlignment2DVerticalSegment)) public abstract partial class IfcAlignment2DSegment : IfcGeometricRepresentationItem //IFC4.1 ABSTRACT SUPERTYPE OF(ONEOF(IfcAlignment2DHorizontalSegment, IfcAlignment2DVerticalSegment))
{ {
internal IfcLogicalEnum mTangentialContinuity = IfcLogicalEnum.UNKNOWN;// : OPTIONAL IfcBoolean; internal IfcLogicalEnum mTangentialContinuity = IfcLogicalEnum.UNKNOWN;// : OPTIONAL IfcBoolean;
private string mStartTag = "$";// : OPTIONAL IfcLabel; private string mStartTag = "";// : OPTIONAL IfcLabel;
private string mEndTag = "$";// : OPTIONAL IfcLabel; private string mEndTag = "";// : OPTIONAL IfcLabel;
public bool TangentialContinuity { get { return mTangentialContinuity == IfcLogicalEnum.TRUE; } set { mTangentialContinuity = (value ? IfcLogicalEnum.TRUE : IfcLogicalEnum.FALSE); } } public bool TangentialContinuity { get { return mTangentialContinuity == IfcLogicalEnum.TRUE; } set { mTangentialContinuity = (value ? IfcLogicalEnum.TRUE : IfcLogicalEnum.FALSE); } }
public string StartTag { get { return (mStartTag == "$" ? "" : ParserIfc.Decode(mStartTag)); } set { mStartTag = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value.Replace("'", ""))); } } public string StartTag { get { return mStartTag; } set { mStartTag = value; } }
public string EndTag { get { return (mEndTag == "$" ? "" : ParserIfc.Decode(mEndTag)); } set { mEndTag = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value.Replace("'", ""))); } } public string EndTag { get { return mEndTag; } set { mEndTag = value; } }
protected IfcAlignment2DSegment() : base() { } protected IfcAlignment2DSegment() : base() { }
protected IfcAlignment2DSegment(DatabaseIfc db) : base(db) { } protected IfcAlignment2DSegment(DatabaseIfc db) : base(db) { }
@ -793,11 +793,11 @@ namespace GeometryGym.Ifc
{ {
internal IfcAlignment2DHorizontal mHorizontal = null;// : OPTIONAL IfcAlignment2DHorizontal; internal IfcAlignment2DHorizontal mHorizontal = null;// : OPTIONAL IfcAlignment2DHorizontal;
private IfcAlignment2DVertical mVertical = null;// : OPTIONAL IfcAlignment2DVertical; private IfcAlignment2DVertical mVertical = null;// : OPTIONAL IfcAlignment2DVertical;
internal string mTag = "$";// : OPTIONAL IfcLabel; internal string mTag = "";// : OPTIONAL IfcLabel;
public IfcAlignment2DHorizontal Horizontal { get { return mHorizontal; } set { mHorizontal = value; } } public IfcAlignment2DHorizontal Horizontal { get { return mHorizontal; } set { mHorizontal = value; } }
public IfcAlignment2DVertical Vertical { get { return mVertical; } set { if (mVertical != null) mVertical.ToAlignmentCurve = null; mVertical = value; if (value != null) value.ToAlignmentCurve = this; } } public IfcAlignment2DVertical Vertical { get { return mVertical; } set { if (mVertical != null) mVertical.ToAlignmentCurve = null; mVertical = value; if (value != null) value.ToAlignmentCurve = this; } }
public string Tag { get { return (mTag == "$" ? "" : ParserIfc.Decode(mTag)); } set { mTag = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Tag { get { return mTag; } set { mTag = value; } }
internal IfcAlignmentCurve() : base() { } internal IfcAlignmentCurve() : base() { }
internal IfcAlignmentCurve(DatabaseIfc db, IfcAlignmentCurve c, DuplicateOptions options) : base(db, c, options) internal IfcAlignmentCurve(DatabaseIfc db, IfcAlignmentCurve c, DuplicateOptions options) : base(db, c, options)
@ -875,7 +875,7 @@ namespace GeometryGym.Ifc
{ {
return isDuplicate(horizontal, tol); return isDuplicate(horizontal, tol);
} }
internal override bool isDuplicate(BaseClassIfc e, double tol) internal override bool isDuplicate(BaseClassIfc e, bool includeAggregated, double tol)
{ {
IfcAlignmentHorizontal horizontal = e as IfcAlignmentHorizontal; IfcAlignmentHorizontal horizontal = e as IfcAlignmentHorizontal;
if (horizontal == null) if (horizontal == null)
@ -901,7 +901,7 @@ namespace GeometryGym.Ifc
return false; return false;
} }
return base.isDuplicate(e, tol); return base.isDuplicate(e, includeAggregated, tol);
} }
} }
[Serializable] [Serializable]
@ -1173,14 +1173,14 @@ namespace GeometryGym.Ifc
DesignParameters = design; DesignParameters = design;
} }
internal override bool isDuplicate(BaseClassIfc e, double tol) internal override bool isDuplicate(BaseClassIfc e, bool includeAggregated, double tol)
{ {
IfcAlignmentSegment segment = e as IfcAlignmentSegment; IfcAlignmentSegment segment = e as IfcAlignmentSegment;
if (segment == null) if (segment == null)
return false; return false;
if (!mDesignParameters.isDuplicate(segment.mDesignParameters, tol)) if (!mDesignParameters.isDuplicate(segment.mDesignParameters, tol))
return false; return false;
return base.isDuplicate(e, tol); return base.isDuplicate(e, includeAggregated, tol);
} }
} }
[Serializable] [Serializable]
@ -1516,16 +1516,16 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public partial class IfcAppliedValue : BaseClassIfc, IfcMetricValueSelect, IfcObjectReferenceSelect, IfcResourceObjectSelect, NamedObjectIfc public partial class IfcAppliedValue : BaseClassIfc, IfcMetricValueSelect, IfcObjectReferenceSelect, IfcResourceObjectSelect, NamedObjectIfc
{ // SUPERTYPE OF(IfcCostValue); { // SUPERTYPE OF(IfcCostValue);
internal string mName = "$";// : OPTIONAL IfcLabel; internal string mName = "";// : OPTIONAL IfcLabel;
internal string mDescription = "$";// : OPTIONAL IfcText; internal string mDescription = "";// : OPTIONAL IfcText;
internal IfcAppliedValueSelect mAppliedValue = null;// : OPTIONAL IfcAppliedValueSelect; internal IfcAppliedValueSelect mAppliedValue = null;// : OPTIONAL IfcAppliedValueSelect;
internal int mUnitBasis;// : OPTIONAL IfcMeasureWithUnit; internal int mUnitBasis;// : OPTIONAL IfcMeasureWithUnit;
internal DateTime mApplicableDate = DateTime.MinValue;// : OPTIONAL IfcDateTimeSelect; 4 IfcDate internal DateTime mApplicableDate = DateTime.MinValue;// : OPTIONAL IfcDateTimeSelect; 4 IfcDate
internal DateTime mFixedUntilDate = DateTime.MinValue;// : OPTIONAL IfcDateTimeSelect; 4 IfcDate internal DateTime mFixedUntilDate = DateTime.MinValue;// : OPTIONAL IfcDateTimeSelect; 4 IfcDate
private IfcDateTimeSelect mSSApplicableDate = null; private IfcDateTimeSelect mSSApplicableDate = null;
private IfcDateTimeSelect mSSFixedUntilDate = null; private IfcDateTimeSelect mSSFixedUntilDate = null;
internal string mCategory = "$";// : OPTIONAL IfcLabel; IFC4 internal string mCategory = "";// : OPTIONAL IfcLabel; IFC4
internal string mCondition = "$";// : OPTIONAL IfcLabel; IFC4 internal string mCondition = "";// : OPTIONAL IfcLabel; IFC4
internal IfcArithmeticOperatorEnum mArithmeticOperator = IfcArithmeticOperatorEnum.NONE;// : OPTIONAL IfcArithmeticOperatorEnum; IFC4 internal IfcArithmeticOperatorEnum mArithmeticOperator = IfcArithmeticOperatorEnum.NONE;// : OPTIONAL IfcArithmeticOperatorEnum; IFC4
internal LIST<IfcAppliedValue> mComponents = new LIST<IfcAppliedValue>();// : OPTIONAL LIST [1:?] OF IfcAppliedValue; IFC4 internal LIST<IfcAppliedValue> mComponents = new LIST<IfcAppliedValue>();// : OPTIONAL LIST [1:?] OF IfcAppliedValue; IFC4
//INVERSE //INVERSE
@ -1533,14 +1533,14 @@ namespace GeometryGym.Ifc
internal SET<IfcResourceConstraintRelationship> mHasConstraintRelationships = new SET<IfcResourceConstraintRelationship>(); //gg internal SET<IfcResourceConstraintRelationship> mHasConstraintRelationships = new SET<IfcResourceConstraintRelationship>(); //gg
internal SET<IfcAppliedValue> mComponentFor = new SET<IfcAppliedValue>(); //gg internal SET<IfcAppliedValue> mComponentFor = new SET<IfcAppliedValue>(); //gg
public string Name { get { return (mName == "$" ? "" : ParserIfc.Decode(mName)); } set { mName = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Name { get { return mName; } set { mName = value; } }
public string Description { get { return (mDescription == "$" ? "" : ParserIfc.Decode(mDescription)); } set { mDescription = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Description { get { return mDescription; } set { mDescription = value; } }
public IfcAppliedValueSelect AppliedValue { get { return mAppliedValue; } set { mAppliedValue = value; } } public IfcAppliedValueSelect AppliedValue { get { return mAppliedValue; } set { mAppliedValue = value; } }
public IfcMeasureWithUnit UnitBasis { get { return mDatabase[mUnitBasis] as IfcMeasureWithUnit; } set { mUnitBasis = (value == null ? 0 : value.mIndex); } } public IfcMeasureWithUnit UnitBasis { get { return mDatabase[mUnitBasis] as IfcMeasureWithUnit; } set { mUnitBasis = (value == null ? 0 : value.mIndex); } }
public DateTime ApplicableDate { get { return mApplicableDate; } set { mApplicableDate = value; } } public DateTime ApplicableDate { get { return mApplicableDate; } set { mApplicableDate = value; } }
public DateTime FixedUntilDate { get { return mFixedUntilDate; } set { mFixedUntilDate = value; } } public DateTime FixedUntilDate { get { return mFixedUntilDate; } set { mFixedUntilDate = value; } }
public string Category { get { return (mCategory == "$" ? "" : ParserIfc.Decode(mCategory)); } set { mCategory = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Category { get { return mCategory; } set { mCategory = value; } }
public string Condition { get { return (mCondition == "$" ? "" : ParserIfc.Decode(mCondition)); } set { mCondition = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Condition { get { return mCondition; } set { mCondition = value; } }
public IfcArithmeticOperatorEnum ArithmeticOperator { get { return mArithmeticOperator; } set { mArithmeticOperator = value; } } public IfcArithmeticOperatorEnum ArithmeticOperator { get { return mArithmeticOperator; } set { mArithmeticOperator = value; } }
public LIST<IfcAppliedValue> Components { get { return mComponents; } } public LIST<IfcAppliedValue> Components { get { return mComponents; } }
public SET<IfcExternalReferenceRelationship> HasExternalReference { get { return mHasExternalReference; } } public SET<IfcExternalReferenceRelationship> HasExternalReference { get { return mHasExternalReference; } }
@ -1557,18 +1557,26 @@ namespace GeometryGym.Ifc
if (value != null) if (value != null)
mAppliedValue = value; mAppliedValue = value;
else else
AppliedValue = db.Factory.Duplicate(v.mAppliedValue) as IfcAppliedValueSelect; AppliedValue = db.Factory.Duplicate(v.mAppliedValue);
} }
UnitBasis = db.Factory.Duplicate(v.UnitBasis) as IfcMeasureWithUnit; UnitBasis = db.Factory.Duplicate(v.UnitBasis);
mApplicableDate = v.mApplicableDate; mFixedUntilDate = v.mFixedUntilDate; mCategory = v.mCategory; mCondition = v.mCondition; mArithmeticOperator = v.mArithmeticOperator; mApplicableDate = v.mApplicableDate;
v.Components.ToList().ForEach(x => addComponent(db.Factory.Duplicate(x) as IfcAppliedValue)); mFixedUntilDate = v.mFixedUntilDate;
mCategory = v.mCategory;
mCondition = v.mCondition;
mArithmeticOperator = v.mArithmeticOperator;
Components.AddRange(v.Components.Select(x => db.Factory.Duplicate(x)));
} }
public IfcAppliedValue(DatabaseIfc db) : base(db) { } public IfcAppliedValue(DatabaseIfc db) : base(db) { }
public IfcAppliedValue(IfcAppliedValueSelect appliedValue) : base(appliedValue.Database) { AppliedValue = appliedValue; } public IfcAppliedValue(IfcAppliedValueSelect appliedValue) : base(appliedValue.Database) { AppliedValue = appliedValue; }
public IfcAppliedValue(DatabaseIfc db, IfcValue value) : base(db) { AppliedValue = value; } public IfcAppliedValue(DatabaseIfc db, IfcValue value) : base(db) { AppliedValue = value; }
public IfcAppliedValue(IfcAppliedValue component1, IfcArithmeticOperatorEnum op,IfcAppliedValue component2) : base(component1.mDatabase) { addComponent(component1); addComponent(component2); mArithmeticOperator = op; } public IfcAppliedValue(IfcAppliedValue component1, IfcArithmeticOperatorEnum op,IfcAppliedValue component2)
: base(component1.mDatabase)
{
Components.Add(component1);
Components.Add(component2);
mArithmeticOperator = op;
}
protected override void initialize() protected override void initialize()
{ {
base.initialize(); base.initialize();
@ -1621,7 +1629,6 @@ namespace GeometryGym.Ifc
} }
public void AddConstraintRelationShip(IfcResourceConstraintRelationship constraintRelationship) { mHasConstraintRelationships.Add(constraintRelationship); } public void AddConstraintRelationShip(IfcResourceConstraintRelationship constraintRelationship) { mHasConstraintRelationships.Add(constraintRelationship); }
internal void addComponent(IfcAppliedValue value) { mComponents.Add(value); value.mComponentFor.Add(this); }
} }
[Obsolete("DEPRECATED IFC4", false)] [Obsolete("DEPRECATED IFC4", false)]
[Serializable] [Serializable]
@ -1653,19 +1660,30 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public partial class IfcApproval : BaseClassIfc, IfcResourceObjectSelect, NamedObjectIfc public partial class IfcApproval : BaseClassIfc, IfcResourceObjectSelect, NamedObjectIfc
{ {
internal string mDescription = "$";// : OPTIONAL IfcText; internal string mIdentifier = "";// : OPTIONAL IfcIdentifier;
internal int mApprovalDateTime;// : IfcDateTimeSelect; internal string mName = "";// :OPTIONAL IfcLabel;
internal string mApprovalStatus = "$";// : OPTIONAL IfcLabel; internal string mDescription = "";// : OPTIONAL IfcText;
internal string mApprovalLevel = "$";// : OPTIONAL IfcLabel; internal DateTime mTimeOfApproval;// : IfcDateTime
internal string mApprovalQualifier = "$";// : OPTIONAL IfcText; internal IfcDateTimeSelect mApprovalDateTime;// : IfcDateTimeSelect;
internal string mName = "$";// :OPTIONAL IfcLabel; internal string mStatus = "";// : OPTIONAL IfcLabel;
internal string mIdentifier = "$";// : OPTIONAL IfcIdentifier; internal string mLevel = "";// : OPTIONAL IfcLabel;
//INVERSE internal string mQualifier = "";// : OPTIONAL IfcText;
internal IfcActorSelect mRequestingApproval = null;// : OPTIONAL IfcActorSelect;
internal IfcActorSelect mGivingApproval = null;// : OPTIONAL IfcActorSelect;
//INVERSE
private SET<IfcExternalReferenceRelationship> mHasExternalReference = new SET<IfcExternalReferenceRelationship>(); //IFC4 SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects; private SET<IfcExternalReferenceRelationship> mHasExternalReference = new SET<IfcExternalReferenceRelationship>(); //IFC4 SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects;
private SET<IfcRelAssociatesApproval> mApprovedObjects = new SET<IfcRelAssociatesApproval>(); private SET<IfcRelAssociatesApproval> mApprovedObjects = new SET<IfcRelAssociatesApproval>();
internal SET<IfcResourceConstraintRelationship> mHasConstraintRelationships = new SET<IfcResourceConstraintRelationship>(); //gg internal SET<IfcResourceConstraintRelationship> mHasConstraintRelationships = new SET<IfcResourceConstraintRelationship>(); //gg
public string Name { get { return (mName == "$" ? "" : ParserIfc.Decode(mName)); } set { mName = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Identifier { get { return mIdentifier; } set { mIdentifier = value; } }
public string Name { get { return mName; } set { mName = value; } }
public string Description { get { return mDescription; } set { mDescription = value; } }
public DateTime TimeOfApproval { get { return mTimeOfApproval; } set { mTimeOfApproval = value; } }
public string Status { get { return mStatus; } set { mStatus = value; } }
public string Level { get { return mLevel; } set { mLevel = value; } }
public string Qualifier { get { return mQualifier; } set { mQualifier = value; } }
public IfcActorSelect RequestingApproval { get { return mRequestingApproval; } set { mRequestingApproval = value; } }
public IfcActorSelect GivingApproval { get { return mGivingApproval; } set { mGivingApproval = value; } }
public SET<IfcExternalReferenceRelationship> HasExternalReference { get { return mHasExternalReference; } } public SET<IfcExternalReferenceRelationship> HasExternalReference { get { return mHasExternalReference; } }
public SET<IfcRelAssociatesApproval> ApprovedObjects { get { return mApprovedObjects; } } public SET<IfcRelAssociatesApproval> ApprovedObjects { get { return mApprovedObjects; } }
public SET<IfcResourceConstraintRelationship> HasConstraintRelationships { get { return mHasConstraintRelationships; } } public SET<IfcResourceConstraintRelationship> HasConstraintRelationships { get { return mHasConstraintRelationships; } }

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

@ -203,8 +203,8 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public abstract partial class IfcBoundaryCondition : BaseClassIfc, NamedObjectIfc //ABSTRACT SUPERTYPE OF (ONEOF (IfcBoundaryEdgeCondition ,IfcBoundaryFaceCondition ,IfcBoundaryNodeCondition)); public abstract partial class IfcBoundaryCondition : BaseClassIfc, NamedObjectIfc //ABSTRACT SUPERTYPE OF (ONEOF (IfcBoundaryEdgeCondition ,IfcBoundaryFaceCondition ,IfcBoundaryNodeCondition));
{ {
internal string mName = "$";// : OPTIONAL IfcLabel; internal string mName = "";// : OPTIONAL IfcLabel;
public string Name { get { return (mName == "$" ? "" : ParserIfc.Decode(mName)); } set { mName = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Name { get { return mName; } set { mName = value; } }
protected IfcBoundaryCondition() : base() { } protected IfcBoundaryCondition() : base() { }
protected IfcBoundaryCondition(DatabaseIfc db, IfcBoundaryCondition b) : base(db,b) { mName = b.mName; } protected IfcBoundaryCondition(DatabaseIfc db, IfcBoundaryCondition b) : base(db,b) { mName = b.mName; }
protected IfcBoundaryCondition(DatabaseIfc db) : base(db) { } protected IfcBoundaryCondition(DatabaseIfc db) : base(db) { }
@ -649,7 +649,7 @@ namespace GeometryGym.Ifc
{ {
if (type != IfcBuildingElementProxyTypeEnum.USERDEFINED && type != IfcBuildingElementProxyTypeEnum.NOTDEFINED) if (type != IfcBuildingElementProxyTypeEnum.USERDEFINED && type != IfcBuildingElementProxyTypeEnum.NOTDEFINED)
{ {
if (ElementType == "$") if (string.IsNullOrEmpty(ElementType))
ElementType = type.ToString(); ElementType = type.ToString();
mPredefinedType = IfcBuildingElementProxyTypeEnum.USERDEFINED; mPredefinedType = IfcBuildingElementProxyTypeEnum.USERDEFINED;
} }

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

@ -490,20 +490,20 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public partial class IfcClassification : IfcExternalInformation, IfcClassificationReferenceSelect, IfcClassificationSelect, NamedObjectIfc // SUBTYPE OF IfcExternalInformation; public partial class IfcClassification : IfcExternalInformation, IfcClassificationReferenceSelect, IfcClassificationSelect, NamedObjectIfc // SUBTYPE OF IfcExternalInformation;
{ {
internal string mSource = "$"; // : OPTIONAL IfcLabel; internal string mSource = ""; // : OPTIONAL IfcLabel;
internal string mEdition = "$"; // : OPTIONAL IfcLabel; internal string mEdition = ""; // : OPTIONAL IfcLabel;
internal DateTime mEditionDate = DateTime.MinValue; // : OPTIONAL IfcDate IFC4 change internal DateTime mEditionDate = DateTime.MinValue; // : OPTIONAL IfcDate IFC4 change
private int mEditionDateSS = 0; // : OPTIONAL IfcCalendarDate; private int mEditionDateSS = 0; // : OPTIONAL IfcCalendarDate;
internal string mName;// : IfcLabel; internal string mName;// : IfcLabel;
internal string mDescription = "$";// : OPTIONAL IfcText; IFC4 Addition internal string mDescription = "";// : OPTIONAL IfcText; IFC4 Addition
internal string mSpecification = "$";// : OPTIONAL IfcURIReference; IFC4 Addition internal string mSpecification = "";// : OPTIONAL IfcURIReference; IFC4 Addition
internal List<string> mReferenceTokens = new List<string>();// : OPTIONAL LIST [1:?] OF IfcIdentifier; IFC4 Addition internal List<string> mReferenceTokens = new List<string>();// : OPTIONAL LIST [1:?] OF IfcIdentifier; IFC4 Addition
//INVERSE //INVERSE
internal SET<IfcRelAssociatesClassification> mClassificationForObjects = new SET<IfcRelAssociatesClassification>();// : SET OF IfcRelAssociatesclassification FOR Relatingclassification; internal SET<IfcRelAssociatesClassification> mClassificationForObjects = new SET<IfcRelAssociatesClassification>();// : SET OF IfcRelAssociatesclassification FOR Relatingclassification;
internal SET<IfcClassificationReference> mHasReferences = new SET<IfcClassificationReference>();// : SET OF IfcClassificationReference FOR ReferencedSource; internal SET<IfcClassificationReference> mHasReferences = new SET<IfcClassificationReference>();// : SET OF IfcClassificationReference FOR ReferencedSource;
public string Source { get { return (mSource == "$" ? "" : ParserIfc.Decode(mSource)); } set { mSource = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Source { get { return mSource; } set { mSource = value; } }
public string Edition { get { return (mEdition == "$" ? "" : ParserIfc.Decode(mEdition)); } set { mEdition = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Edition { get { return mEdition; } set { mEdition = value; } }
public DateTime EditionDate public DateTime EditionDate
{ {
get { return (mEditionDateSS > 0 ? (mDatabase[mEditionDateSS] as IfcCalendarDate).DateTime : mEditionDate); } get { return (mEditionDateSS > 0 ? (mDatabase[mEditionDateSS] as IfcCalendarDate).DateTime : mEditionDate); }
@ -518,9 +518,9 @@ namespace GeometryGym.Ifc
mEditionDate = value; mEditionDate = value;
} }
} }
public string Name { get { return (mName == "$" ? "" : ParserIfc.Decode(mName)); } set { if (!string.IsNullOrEmpty(value)) mName = ParserIfc.Encode(value); } } public string Name { get { return mName; } set { mName = (string.IsNullOrEmpty(value) ? "Unknown" : value); } }
public string Description { get { return (mDescription == "$" ? "" : ParserIfc.Decode(mDescription)); } set { mDescription = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Description { get { return mDescription; } set { mDescription = value; } }
public string Specification { get { return (mSpecification == "$" ? "" : ParserIfc.Decode(mSpecification)); } set { mSpecification = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Specification { get { return mSpecification; } set { mSpecification = value; } }
public List<string> ReferenceTokens { get { return mReferenceTokens.ConvertAll(x => ParserIfc.Decode(x)); } } public List<string> ReferenceTokens { get { return mReferenceTokens.ConvertAll(x => ParserIfc.Decode(x)); } }
public SET<IfcRelAssociatesClassification> ClassificationForObjects { get { return mClassificationForObjects; } } public SET<IfcRelAssociatesClassification> ClassificationForObjects { get { return mClassificationForObjects; } }
public SET<IfcClassificationReference> HasReferences { get { return mHasReferences; } } public SET<IfcClassificationReference> HasReferences { get { return mHasReferences; } }
@ -643,8 +643,8 @@ namespace GeometryGym.Ifc
public partial class IfcClassificationReference : IfcExternalReference, IfcClassificationReferenceSelect, IfcClassificationSelect, IfcClassificationNotationSelect public partial class IfcClassificationReference : IfcExternalReference, IfcClassificationReferenceSelect, IfcClassificationSelect, IfcClassificationNotationSelect
{ {
internal IfcClassificationReferenceSelect mReferencedSource = null;// : OPTIONAL IfcClassificationReferenceSelect; //IFC2x3 : OPTIONAL IfcClassification; internal IfcClassificationReferenceSelect mReferencedSource = null;// : OPTIONAL IfcClassificationReferenceSelect; //IFC2x3 : OPTIONAL IfcClassification;
internal string mDescription = "$";// : OPTIONAL IfcText; IFC4 internal string mDescription = "";// : OPTIONAL IfcText; IFC4
internal string mSort = "$";// : OPTIONAL IfcIdentifier; internal string mSort = "";// : OPTIONAL IfcIdentifier;
//INVERSE //INVERSE
internal SET<IfcRelAssociatesClassification> mClassificationRefForObjects = new SET<IfcRelAssociatesClassification>();// : SET [0:?] OF IfcRelAssociatesclassification FOR Relatingclassification; internal SET<IfcRelAssociatesClassification> mClassificationRefForObjects = new SET<IfcRelAssociatesClassification>();// : SET [0:?] OF IfcRelAssociatesclassification FOR Relatingclassification;
internal SET<IfcClassificationReference> mHasReferences = new SET<IfcClassificationReference>();// : SET [0:?] OF IfcClassificationReference FOR ReferencedSource; internal SET<IfcClassificationReference> mHasReferences = new SET<IfcClassificationReference>();// : SET [0:?] OF IfcClassificationReference FOR ReferencedSource;
@ -667,17 +667,8 @@ namespace GeometryGym.Ifc
mReferencedSource.HasReferences.Add(this); mReferencedSource.HasReferences.Add(this);
} }
} }
public string Description public string Description { get { return mDescription; } set { mDescription = value; } }
{ public string Sort { get { return mSort; } set { mSort = value; } }
get { return (mDescription == "$" ? "" : ParserIfc.Decode(mDescription)); }
set
{
mDescription = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value));
if (mDatabase != null && mDatabase.Release < ReleaseVersion.IFC4 && string.IsNullOrEmpty(Name))
Name = value;
}
}
public string Sort { get { return (mSort == "$" ? "" : ParserIfc.Decode(mSort)); } set { mSort = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } }
public SET<IfcRelAssociatesClassification> ClassificationRefForObjects { get { return mClassificationRefForObjects; } } public SET<IfcRelAssociatesClassification> ClassificationRefForObjects { get { return mClassificationRefForObjects; } }
public SET<IfcClassificationReference> HasReferences { get { return mHasReferences; } } public SET<IfcClassificationReference> HasReferences { get { return mHasReferences; } }
@ -845,8 +836,8 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public abstract partial class IfcColourSpecification : IfcPresentationItem, IfcColour, NamedObjectIfc // ABSTRACT SUPERTYPE OF(IfcColourRgb) public abstract partial class IfcColourSpecification : IfcPresentationItem, IfcColour, NamedObjectIfc // ABSTRACT SUPERTYPE OF(IfcColourRgb)
{ {
private string mName = "$";// : OPTIONAL IfcLabel private string mName = "";// : OPTIONAL IfcLabel
public string Name { get { return (mName == "$" ? "" : ParserIfc.Decode(mName)); } set { if (!string.IsNullOrEmpty(value)) mName = ParserIfc.Encode(value); } } public string Name { get { return mName; } set { mName = value; } }
protected IfcColourSpecification() : base() { } protected IfcColourSpecification() : base() { }
protected IfcColourSpecification(DatabaseIfc db, IfcColourSpecification s) : base(db, s) { mName = s.mName; } protected IfcColourSpecification(DatabaseIfc db, IfcColourSpecification s) : base(db, s) { mName = s.mName; }
@ -1035,10 +1026,10 @@ namespace GeometryGym.Ifc
public partial class IfcCompositeProfileDef : IfcProfileDef public partial class IfcCompositeProfileDef : IfcProfileDef
{ {
private SET<IfcProfileDef> mProfiles = new SET<IfcProfileDef>();// : SET [2:?] OF IfcProfileDef; private SET<IfcProfileDef> mProfiles = new SET<IfcProfileDef>();// : SET [2:?] OF IfcProfileDef;
private string mLabel = "$";// : OPTIONAL IfcLabel; private string mLabel = "";// : OPTIONAL IfcLabel;
public SET<IfcProfileDef> Profiles { get { return mProfiles; } } public SET<IfcProfileDef> Profiles { get { return mProfiles; } }
public string Label { get { return (mLabel == "$" ? "" : ParserIfc.Decode(mLabel)); } set { mLabel = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Label { get { return mLabel; } set { mLabel = value; } }
internal IfcCompositeProfileDef() : base() { } internal IfcCompositeProfileDef() : base() { }
internal IfcCompositeProfileDef(DatabaseIfc db, IfcCompositeProfileDef p, DuplicateOptions options) : base(db, p, options) internal IfcCompositeProfileDef(DatabaseIfc db, IfcCompositeProfileDef p, DuplicateOptions options) : base(db, p, options)
@ -1231,21 +1222,21 @@ namespace GeometryGym.Ifc
public abstract partial class IfcConstraint : BaseClassIfc, IfcResourceObjectSelect, NamedObjectIfc //IFC4Change ABSTRACT SUPERTYPE OF(ONEOF(IfcMetric, IfcObjective)); public abstract partial class IfcConstraint : BaseClassIfc, IfcResourceObjectSelect, NamedObjectIfc //IFC4Change ABSTRACT SUPERTYPE OF(ONEOF(IfcMetric, IfcObjective));
{ {
internal string mName = "NOTDEFINED";// : IfcLabel; internal string mName = "NOTDEFINED";// : IfcLabel;
internal string mDescription = "$";// : OPTIONAL IfcText; internal string mDescription = "";// : OPTIONAL IfcText;
internal IfcConstraintEnum mConstraintGrade;// : IfcConstraintEnum internal IfcConstraintEnum mConstraintGrade;// : IfcConstraintEnum
internal string mConstraintSource = "$";// : OPTIONAL IfcLabel; internal string mConstraintSource = "";// : OPTIONAL IfcLabel;
internal int mCreatingActor;// : OPTIONAL IfcActorSelect; internal IfcActorSelect mCreatingActor;// : OPTIONAL IfcActorSelect;
internal string mCreationTime = "$";// : OPTIONAL IfcDateTimeSelect; IFC4 IfcDateTime internal DateTime mCreationTime = DateTime.MinValue; // : OPTIONAL IfcDateTimeSelect; IFC4 IfcDateTime
internal int mSSCreationTime;// : OPTIONAL IfcDateTimeSelect; IFC4 IfcDateTime internal IfcDateTimeSelect mSSCreationTime;// : OPTIONAL IfcDateTimeSelect; IFC4 IfcDateTime
internal string mUserDefinedGrade = "$";// : OPTIONAL IfcLabel internal string mUserDefinedGrade = "";// : OPTIONAL IfcLabel
public string Name { get { return ParserIfc.Decode(mName); } set { mName = (string.IsNullOrEmpty(value) ? "NOTDEFINED" : ParserIfc.Encode(value)); } } public string Name { get { return mName; } set { mName = (string.IsNullOrEmpty(value) ? "NOTDEFINED" : value); } }
public string Description { get { return (mDescription == "$" ? "" : ParserIfc.Decode(mDescription)); } set { mDescription = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Description { get { return mDescription; } set { mDescription = value; } }
public IfcConstraintEnum ConstraintGrade { get { return mConstraintGrade; } set { mConstraintGrade = value; } } public IfcConstraintEnum ConstraintGrade { get { return mConstraintGrade; } set { mConstraintGrade = value; } }
public string ConstraintSource { get { return (mConstraintSource == "$" ? "" : ParserIfc.Decode(mConstraintSource)); } set { mConstraintSource = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string ConstraintSource { get { return mConstraintSource; } set { mConstraintSource = value; } }
public IfcActorSelect CreatingActor { get { return mDatabase[mCreatingActor] as IfcActorSelect; } set { mCreatingActor = (value == null ? 0 : value.Index); } } public IfcActorSelect CreatingActor { get { return mCreatingActor; } set { mCreatingActor = value; } }
//creationtime //creationtime
public string UserDefinedGrade { get { return (mUserDefinedGrade == "$" ? "" : ParserIfc.Decode(mUserDefinedGrade)); } set { mUserDefinedGrade = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string UserDefinedGrade { get { return mUserDefinedGrade; } set { mUserDefinedGrade = value; } }
// INVERSE // INVERSE
private SET<IfcExternalReferenceRelationship> mHasExternalReference = new SET<IfcExternalReferenceRelationship>(); //IFC4 SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects; private SET<IfcExternalReferenceRelationship> mHasExternalReference = new SET<IfcExternalReferenceRelationship>(); //IFC4 SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects;
@ -1262,11 +1253,11 @@ namespace GeometryGym.Ifc
mDescription = c.mDescription; mDescription = c.mDescription;
mConstraintGrade = c.mConstraintGrade; mConstraintGrade = c.mConstraintGrade;
mConstraintSource = c.mConstraintSource; mConstraintSource = c.mConstraintSource;
if(mCreatingActor > 0) if(mCreatingActor != null)
CreatingActor = db.Factory.Duplicate(c.mDatabase[c.mCreatingActor]) as IfcActorSelect; CreatingActor = db.Factory.Duplicate(c.mCreatingActor) as IfcActorSelect;
mCreationTime = c.mCreationTime; mCreationTime = c.mCreationTime;
if(mSSCreationTime > 0) if (mSSCreationTime != null)
mSSCreationTime = db.Factory.Duplicate(c.mDatabase[ c.mSSCreationTime]).mIndex; mSSCreationTime = db.Factory.Duplicate(c.mSSCreationTime) as IfcDateTimeSelect;
mUserDefinedGrade = c.mUserDefinedGrade; mUserDefinedGrade = c.mUserDefinedGrade;
} }
protected IfcConstraint(DatabaseIfc db, string name, IfcConstraintEnum constraint) : base(db) { Name = name; mConstraintGrade = constraint; } protected IfcConstraint(DatabaseIfc db, string name, IfcConstraintEnum constraint) : base(db) { Name = name; mConstraintGrade = constraint; }
@ -1429,18 +1420,18 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public abstract partial class IfcContext : IfcObjectDefinition//(IfcProject, IfcProjectLibrary) public abstract partial class IfcContext : IfcObjectDefinition//(IfcProject, IfcProjectLibrary)
{ {
internal string mObjectType = "$";// : OPTIONAL IfcLabel; internal string mObjectType = "";// : OPTIONAL IfcLabel;
private string mLongName = "$";// : OPTIONAL IfcLabel; private string mLongName = "";// : OPTIONAL IfcLabel;
private string mPhase = "$";// : OPTIONAL IfcLabel; private string mPhase = "";// : OPTIONAL IfcLabel;
internal SET<IfcRepresentationContext> mRepresentationContexts = new SET<IfcRepresentationContext>();// : OPTIONAL SET [1:?] OF IfcRepresentationContext; internal SET<IfcRepresentationContext> mRepresentationContexts = new SET<IfcRepresentationContext>();// : OPTIONAL SET [1:?] OF IfcRepresentationContext;
private int mUnitsInContext;// : OPTIONAL IfcUnitAssignment; IFC2x3 not Optional private int mUnitsInContext;// : OPTIONAL IfcUnitAssignment; IFC2x3 not Optional
//INVERSE //INVERSE
internal List<IfcRelDefinesByProperties> mIsDefinedBy = new List<IfcRelDefinesByProperties>(); internal List<IfcRelDefinesByProperties> mIsDefinedBy = new List<IfcRelDefinesByProperties>();
internal List<IfcRelDeclares> mDeclares = new List<IfcRelDeclares>(); internal List<IfcRelDeclares> mDeclares = new List<IfcRelDeclares>();
public string ObjectType { get { return mObjectType == "$" ? "" : ParserIfc.Decode(mObjectType); } set { mObjectType = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string ObjectType { get { return mObjectType; } set { mObjectType = value; } }
public string LongName { get { return (mLongName == "$" ? "" : ParserIfc.Decode(mLongName)); } set { mLongName = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string LongName { get { return mLongName; } set { mLongName = value; } }
public string Phase { get { return (mPhase == "$" ? "" : ParserIfc.Decode(mPhase)); } set { mPhase = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Phase { get { return mPhase; } set { mPhase = value; } }
public SET<IfcRepresentationContext> RepresentationContexts { get { return mRepresentationContexts; } } public SET<IfcRepresentationContext> RepresentationContexts { get { return mRepresentationContexts; } }
public IfcUnitAssignment UnitsInContext public IfcUnitAssignment UnitsInContext
{ {
@ -1616,11 +1607,11 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public abstract partial class IfcControl : IfcObject //ABSTRACT SUPERTYPE OF (ONEOF (IfcActionRequest ,IfcConditionCriterion ,IfcCostItem ,IfcCostSchedule,IfcEquipmentStandard ,IfcFurnitureStandard public abstract partial class IfcControl : IfcObject //ABSTRACT SUPERTYPE OF (ONEOF (IfcActionRequest ,IfcConditionCriterion ,IfcCostItem ,IfcCostSchedule,IfcEquipmentStandard ,IfcFurnitureStandard
{ // ,IfcPerformanceHistory ,IfcPermit ,IfcProjectOrder ,IfcProjectOrderRecord ,IfcScheduleTimeControl ,IfcServiceLife ,IfcSpaceProgram ,IfcTimeSeriesSchedule,IfcWorkControl)) { // ,IfcPerformanceHistory ,IfcPermit ,IfcProjectOrder ,IfcProjectOrderRecord ,IfcScheduleTimeControl ,IfcServiceLife ,IfcSpaceProgram ,IfcTimeSeriesSchedule,IfcWorkControl))
internal string mIdentification = "$"; // : OPTIONAL IfcIdentifier; IFC4 internal string mIdentification = ""; // : OPTIONAL IfcIdentifier; IFC4
//INVERSE //INVERSE
internal SET<IfcRelAssignsToControl> mControls = new SET<IfcRelAssignsToControl>();/// : SET OF IfcRelAssignsToControl FOR RelatingControl; internal SET<IfcRelAssignsToControl> mControls = new SET<IfcRelAssignsToControl>();/// : SET OF IfcRelAssignsToControl FOR RelatingControl;
public string Identification { get { return mIdentification == "$" ? "" : ParserIfc.Decode(mIdentification); } set { mIdentification = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Identification { get { return mIdentification; } set { mIdentification = value; } }
public SET<IfcRelAssignsToControl> Controls { get { return mControls; } } public SET<IfcRelAssignsToControl> Controls { get { return mControls; } }
protected IfcControl() : base() { } protected IfcControl() : base() { }
protected IfcControl(DatabaseIfc db, IfcControl c, DuplicateOptions options) : base(db, c, options) protected IfcControl(DatabaseIfc db, IfcControl c, DuplicateOptions options) : base(db, c, options)
@ -1823,9 +1814,9 @@ namespace GeometryGym.Ifc
private IfcCoordinateOperation mHasCoordinateOperation = null; private IfcCoordinateOperation mHasCoordinateOperation = null;
public string Name { get { return mName; } set { mName = string.IsNullOrEmpty(value) ? "Unknown" : value; } } public string Name { get { return mName; } set { mName = string.IsNullOrEmpty(value) ? "Unknown" : value; } }
public string Description { get { return (mDescription == "$" ? "" : ParserIfc.Decode(mDescription)); } set { mDescription = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Description { get { return mDescription; } set { mDescription = value; } }
public string GeodeticDatum { get { return ParserIfc.Decode(mGeodeticDatum); } set { mGeodeticDatum = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string GeodeticDatum { get { return mGeodeticDatum; } set { mGeodeticDatum = value; } }
public string VerticalDatum { get { return (mVerticalDatum == "$" ? "" : ParserIfc.Decode(mVerticalDatum)); } set { mVerticalDatum = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string VerticalDatum { get { return mVerticalDatum; } set { mVerticalDatum = value; } }
public IfcCoordinateOperation HasCoordinateOperation { get { return mHasCoordinateOperation; } set { mHasCoordinateOperation = value; value.SourceCRS = this; } } public IfcCoordinateOperation HasCoordinateOperation { get { return mHasCoordinateOperation; } set { mHasCoordinateOperation = value; value.SourceCRS = this; } }
protected IfcCoordinateReferenceSystem() : base() { } protected IfcCoordinateReferenceSystem() : base() { }
@ -1871,35 +1862,35 @@ namespace GeometryGym.Ifc
public partial class IfcCostSchedule : IfcControl public partial class IfcCostSchedule : IfcControl
{ {
internal IfcCostScheduleTypeEnum mPredefinedType = IfcCostScheduleTypeEnum.NOTDEFINED;// : OPTIONAL IfcCostScheduleTypeEnum; internal IfcCostScheduleTypeEnum mPredefinedType = IfcCostScheduleTypeEnum.NOTDEFINED;// : OPTIONAL IfcCostScheduleTypeEnum;
internal string mStatus = "$";// : OPTIONAL IfcLabel; internal string mStatus = "";// : OPTIONAL IfcLabel;
private DateTime mSubmittedOn = DateTime.Now;// : IfcDateTime private DateTime mSubmittedOn = DateTime.Now;// : IfcDateTime
private int mSubmittedOnSS = 0; // : OPTIONAL IfcDateTimeSelect; private IfcDateTimeSelect mSubmittedOnSS = null; // : OPTIONAL IfcDateTimeSelect;
private DateTime mUpdateDate = DateTime.Now;// : IfcDateTime private DateTime mUpdateDate = DateTime.Now;// : IfcDateTime
private int mUpdateDateSS = 0; // : OPTIONAL IfcDateTimeSelect; private IfcDateTimeSelect mUpdateDateSS = null; // : OPTIONAL IfcDateTimeSelect;
private int mSubmittedBy;// : OPTIONAL IfcActorSelect; IFC4 DELETED private IfcActorSelect mSubmittedBy;// : OPTIONAL IfcActorSelect; IFC4 DELETED
private int mPreparedBy;// : OPTIONAL IfcActorSelect; IFC4 DELETED private IfcActorSelect mPreparedBy;// : OPTIONAL IfcActorSelect; IFC4 DELETED
private List< int> mTargetUsers = new List<int>();// : OPTIONAL SET [1:?] OF IfcActorSelect; //IFC4 DELETED private SET<IfcActorSelect> mTargetUsers = new SET<IfcActorSelect>();// : OPTIONAL SET [1:?] OF IfcActorSelect; //IFC4 DELETED
//internal string mID;// : IfcIdentifier; IFC4 relocated //internal string mID;// : IfcIdentifier; IFC4 relocated
public IfcCostScheduleTypeEnum PredefinedType { get { return mPredefinedType; } set { mPredefinedType = value; } } public IfcCostScheduleTypeEnum PredefinedType { get { return mPredefinedType; } set { mPredefinedType = value; } }
public string Staus { get { return (mStatus == "$" ? "" : ParserIfc.Decode( mStatus)); } set { mStatus = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode( value.Replace("'",""))); } } public string Staus { get { return mStatus; } set { mStatus = value; } }
internal DateTime SubmittedOn internal DateTime SubmittedOn
{ {
get { return (mSubmittedOnSS > 0 ? (mDatabase[mSubmittedOnSS] as IfcDateTimeSelect).DateTime : mSubmittedOn); } get { return (mSubmittedOnSS != null ? mSubmittedOnSS.DateTime : mSubmittedOn); }
set set
{ {
if (mDatabase.Release <= ReleaseVersion.IFC2x3) if (mDatabase.Release <= ReleaseVersion.IFC2x3)
mSubmittedOnSS = new IfcCalendarDate(mDatabase, value.Day, value.Month, value.Year).mIndex; mSubmittedOnSS = new IfcCalendarDate(mDatabase, value.Day, value.Month, value.Year);
else else
mSubmittedOn = value; mSubmittedOn = value;
} }
} }
internal DateTime UpdateDate internal DateTime UpdateDate
{ {
get { return (mUpdateDateSS > 0 ? (mDatabase[mUpdateDateSS] as IfcDateTimeSelect).DateTime : mUpdateDate); } get { return (mUpdateDateSS != null ? mUpdateDateSS.DateTime : mUpdateDate); }
set set
{ {
if (mDatabase.Release <= ReleaseVersion.IFC2x3) if (mDatabase.Release <= ReleaseVersion.IFC2x3)
mUpdateDateSS = new IfcCalendarDate(mDatabase, value.Day, value.Month, value.Year).mIndex; mUpdateDateSS = new IfcCalendarDate(mDatabase, value.Day, value.Month, value.Year);
else else
mUpdateDate = value; mUpdateDate = value;
} }
@ -1911,9 +1902,14 @@ namespace GeometryGym.Ifc
mPreparedBy = s.mPreparedBy; mPreparedBy = s.mPreparedBy;
mSubmittedBy = s.mSubmittedBy; mSubmittedBy = s.mSubmittedBy;
mStatus = s.mStatus; mStatus = s.mStatus;
//mTargetUsers = new List<int>( s.mTargetUsers.ToArray());
mUpdateDate = s.mUpdateDate; mUpdateDate = s.mUpdateDate;
mPredefinedType = s.mPredefinedType; mPredefinedType = s.mPredefinedType;
if (s.mSubmittedBy != null)
mSubmittedBy = db.Factory.Duplicate(s.mSubmittedBy, options) as IfcActorSelect;
if (s.mPreparedBy != null)
mPreparedBy = db.Factory.Duplicate(s.mPreparedBy, options) as IfcActorSelect;
if (s.mTargetUsers.Count > 0)
mTargetUsers.AddRange(s.mTargetUsers.Select(x => db.Factory.Duplicate(x, options) as IfcActorSelect));
} }
internal IfcCostSchedule(DatabaseIfc db, IfcCostScheduleTypeEnum t, string status, DateTime submitted, IfcProject prj) internal IfcCostSchedule(DatabaseIfc db, IfcCostScheduleTypeEnum t, string status, DateTime submitted, IfcProject prj)
: base(db) : base(db)
@ -1930,7 +1926,7 @@ namespace GeometryGym.Ifc
public partial class IfcCostValue : IfcAppliedValue public partial class IfcCostValue : IfcAppliedValue
{ {
//internal string mCostType;// : IfcLabel; IFC4 renamed to category //internal string mCostType;// : IfcLabel; IFC4 renamed to category
//internal string mCondition = "$";// : OPTIONAL IfcText; IFC4 moved to condition //internal string mCondition = "";// : OPTIONAL IfcText; IFC4 moved to condition
internal IfcCostValue() : base() { } internal IfcCostValue() : base() { }
internal IfcCostValue(DatabaseIfc db, IfcCostValue v) : base(db,v) { } internal IfcCostValue(DatabaseIfc db, IfcCostValue v) : base(db,v) { }
public IfcCostValue(DatabaseIfc db) : base(db) { } public IfcCostValue(DatabaseIfc db) : base(db) { }
@ -2280,10 +2276,10 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public partial class IfcCurveStyleFont : IfcPresentationItem, IfcCurveStyleFontSelect, NamedObjectIfc public partial class IfcCurveStyleFont : IfcPresentationItem, IfcCurveStyleFontSelect, NamedObjectIfc
{ {
internal string mName = "$";// : OPTIONAL IfcLabel; internal string mName = "";// : OPTIONAL IfcLabel;
internal LIST<IfcCurveStyleFontPattern> mPatternList = new LIST<IfcCurveStyleFontPattern>();// : LIST [1:?] OF IfcCurveStyleFontPattern; internal LIST<IfcCurveStyleFontPattern> mPatternList = new LIST<IfcCurveStyleFontPattern>();// : LIST [1:?] OF IfcCurveStyleFontPattern;
public string Name { get { return (mName == "$" ? "" : ParserIfc.Decode(mName)); } set { if (!string.IsNullOrEmpty(value)) mName = ParserIfc.Encode(value); } } public string Name { get { return mName; } set { mName = value; } }
internal IfcCurveStyleFont() : base() { } internal IfcCurveStyleFont() : base() { }
internal IfcCurveStyleFont(DatabaseIfc db, IfcCurveStyleFont f) : base(db, f) internal IfcCurveStyleFont(DatabaseIfc db, IfcCurveStyleFont f) : base(db, f)

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

@ -112,11 +112,11 @@ namespace GeometryGym.Ifc
{ {
private IfcProfileDef mParentProfile;// : IfcProfileDef; private IfcProfileDef mParentProfile;// : IfcProfileDef;
private IfcCartesianTransformationOperator2D mOperator;// : IfcCartesianTransformationOperator2D; private IfcCartesianTransformationOperator2D mOperator;// : IfcCartesianTransformationOperator2D;
internal string mLabel = "$";// : OPTIONAL IfcLabel; internal string mLabel = "";// : OPTIONAL IfcLabel;
public IfcProfileDef ParentProfile { get { return mParentProfile; } set { mParentProfile = value; } } public IfcProfileDef ParentProfile { get { return mParentProfile; } set { mParentProfile = value; } }
public IfcCartesianTransformationOperator2D Operator { get { return mOperator; } set { mOperator = value; } } public IfcCartesianTransformationOperator2D Operator { get { return mOperator; } set { mOperator = value; } }
public string Label { get { return (mLabel == "$" ? "" : ParserIfc.Decode(mLabel)); } set { mLabel = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Label { get { return mLabel; } set { mLabel = value; } }
internal IfcDerivedProfileDef() : base() { } internal IfcDerivedProfileDef() : base() { }
internal IfcDerivedProfileDef(DatabaseIfc db, IfcDerivedProfileDef p, DuplicateOptions options) : base(db, p, options) internal IfcDerivedProfileDef(DatabaseIfc db, IfcDerivedProfileDef p, DuplicateOptions options) : base(db, p, options)
@ -401,8 +401,9 @@ namespace GeometryGym.Ifc
{ // IfcFlowInstrument, IfcProtectiveDeviceTrippingUnit, IfcSensor, IfcUnitaryControlElement)) //"IFCDISTRIBUTIONCONTROLELEMENT" { // IfcFlowInstrument, IfcProtectiveDeviceTrippingUnit, IfcSensor, IfcUnitaryControlElement)) //"IFCDISTRIBUTIONCONTROLELEMENT"
public override string StepClassName { get { return mDatabase.mRelease < ReleaseVersion.IFC4 ? "IfcDistributionControlElement" : base.StepClassName; } } public override string StepClassName { get { return mDatabase.mRelease < ReleaseVersion.IFC4 ? "IfcDistributionControlElement" : base.StepClassName; } }
internal string mControlElementId = "$";// : OPTIONAL IfcIdentifier; private string mControlElementId = "";// : OPTIONAL IfcIdentifier;
public string ControlElementId { get { return (mControlElementId == "$" ? "" : ParserIfc.Decode(mControlElementId)); } set { mControlElementId = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } [Obsolete("DEPRECATED IFC4", false)]
public string ControlElementId { get { return mControlElementId; } set { mControlElementId = value; } }
internal IfcDistributionControlElement() : base() { } internal IfcDistributionControlElement() : base() { }
internal IfcDistributionControlElement(DatabaseIfc db, IfcDistributionControlElement e, DuplicateOptions options) : base(db, e, options) { } internal IfcDistributionControlElement(DatabaseIfc db, IfcDistributionControlElement e, DuplicateOptions options) : base(db, e, options) { }
@ -479,10 +480,10 @@ namespace GeometryGym.Ifc
public partial class IfcDistributionSystem : IfcSystem //SUPERTYPE OF(IfcDistributionCircuit) IFC4 public partial class IfcDistributionSystem : IfcSystem //SUPERTYPE OF(IfcDistributionCircuit) IFC4
{ {
public override string StepClassName { get { return (mDatabase != null && mDatabase.Release <= ReleaseVersion.IFC2x3 ? "IfcSystem" : base.StepClassName); } } public override string StepClassName { get { return (mDatabase != null && mDatabase.Release <= ReleaseVersion.IFC2x3 ? "IfcSystem" : base.StepClassName); } }
internal string mLongName = "$"; // OPTIONAL IfcLabel internal string mLongName = ""; // OPTIONAL IfcLabel
internal IfcDistributionSystemEnum mPredefinedType = IfcDistributionSystemEnum.NOTDEFINED;// : OPTIONAL IfcDistributionSystemEnum internal IfcDistributionSystemEnum mPredefinedType = IfcDistributionSystemEnum.NOTDEFINED;// : OPTIONAL IfcDistributionSystemEnum
public string LongName { get { return (mLongName == "$" ? "" : ParserIfc.Decode(mLongName)); } set { mLongName = (string.IsNullOrEmpty(value) ? "" : ParserIfc.Encode(value)); } } public string LongName { get { return mLongName; } set { mLongName = value; } }
public IfcDistributionSystemEnum PredefinedType { get { return mPredefinedType; } set { mPredefinedType = value; } } public IfcDistributionSystemEnum PredefinedType { get { return mPredefinedType; } set { mPredefinedType = value; } }
internal IfcDistributionSystem() : base() { } internal IfcDistributionSystem() : base() { }
@ -493,11 +494,21 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public partial class IfcDocumentElectronicFormat : BaseClassIfc // DEPRECATED IFC4 public partial class IfcDocumentElectronicFormat : BaseClassIfc // DEPRECATED IFC4
{ {
internal string mFileExtension = "$";// OPTIONAL IfcLabel; internal string mFileExtension = "";// OPTIONAL IfcLabel;
internal string mMimeContentType = "$";// OPTIONAL IfcLabel; internal string mMimeContentType = "";// OPTIONAL IfcLabel;
internal string mMimeSubtype = "$";// OPTIONAL IfcLabel; internal string mMimeSubtype = "";// OPTIONAL IfcLabel;
public string FileExtension { get { return mFileExtension; } set { mFileExtension = value; } }
public string MimeContentType { get { return mMimeContentType; } set { mMimeContentType = value; } }
public string MimeSubtype { get { return mMimeSubtype; } set { mMimeSubtype = value; } }
internal IfcDocumentElectronicFormat() : base() { } internal IfcDocumentElectronicFormat() : base() { }
//internal IfcDocumentElectronicFormat(IfcDocumentElectronicFormat i) : base() { mFileExtension = i.mFileExtension; mMimeContentType = i.mMimeContentType; mMimeSubtype = i.mMimeSubtype; } public IfcDocumentElectronicFormat(DatabaseIfc db) : base(db) { }
public IfcDocumentElectronicFormat(DatabaseIfc db, IfcDocumentElectronicFormat f, DuplicateOptions options)
:base(db, f)
{
FileExtension = f.FileExtension;
MimeContentType = f.MimeContentType;
MimeSubtype = f.MimeSubtype;
}
} }
[Serializable] [Serializable]
public partial class IfcDocumentInformation : IfcExternalInformation, IfcDocumentSelect, NamedObjectIfc public partial class IfcDocumentInformation : IfcExternalInformation, IfcDocumentSelect, NamedObjectIfc
@ -524,21 +535,21 @@ namespace GeometryGym.Ifc
internal SET<IfcDocumentInformationRelationship> mIsPointedTo = new SET<IfcDocumentInformationRelationship>();// : SET OF IfcDocumentInformationRelationship FOR RelatedDocuments; internal SET<IfcDocumentInformationRelationship> mIsPointedTo = new SET<IfcDocumentInformationRelationship>();// : SET OF IfcDocumentInformationRelationship FOR RelatedDocuments;
internal SET<IfcDocumentInformationRelationship> mIsPointer = new SET<IfcDocumentInformationRelationship>();// : SET [0:1] OF IfcDocumentInformationRelationship FOR RelatingDocument; internal SET<IfcDocumentInformationRelationship> mIsPointer = new SET<IfcDocumentInformationRelationship>();// : SET [0:1] OF IfcDocumentInformationRelationship FOR RelatingDocument;
public string Identification { get { return mIdentification == "$" ? "" : ParserIfc.Decode(mIdentification); } set { mIdentification = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Identification { get { return mIdentification; } set { mIdentification = value; } }
public string Name { get { return ParserIfc.Decode(mName); } set { mName = ParserIfc.Encode(value); } } public string Name { get { return mName; } set { mName = value; } }
public string Description { get { return mDescription == "$" ? "" : ParserIfc.Decode(mDescription); } set { mDescription = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Description { get { return mDescription; } set { mDescription = value; } }
[Obsolete("DEPRECATED IFC4", false)] [Obsolete("DEPRECATED IFC4", false)]
public SET<IfcDocumentReference> DocumentReferences { get { return mDocumentReferences; } } public SET<IfcDocumentReference> DocumentReferences { get { return mDocumentReferences; } }
public string Location { get { return mLocation == "$" ? "" : ParserIfc.Decode(mLocation); } set { mLocation = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Location { get { return mLocation; } set { mLocation = value; } }
public string Purpose { get { return mPurpose == "$" ? "" : ParserIfc.Decode(mPurpose); } set { mPurpose = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Purpose { get { return mPurpose; } set { mPurpose = value; } }
public string IntendedUse { get { return mIntendedUse == "$" ? "" : ParserIfc.Decode(mIntendedUse); } set { mIntendedUse = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string IntendedUse { get { return mIntendedUse; } set { mIntendedUse = value; } }
public string Scope { get { return mScope == "$" ? "" : ParserIfc.Decode(mScope); } set { mScope = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Scope { get { return mScope; } set { mScope = value; } }
public string Revision { get { return mRevision == "$" ? "" : ParserIfc.Decode(mRevision); } set { mRevision = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Revision { get { return mRevision; } set { mRevision = value; } }
public IfcActorSelect DocumentOwner { get { return mDatabase[mDocumentOwner] as IfcActorSelect; } set { mDocumentOwner = (value == null ? 0 : value.Index); } } public IfcActorSelect DocumentOwner { get { return mDatabase[mDocumentOwner] as IfcActorSelect; } set { mDocumentOwner = (value == null ? 0 : value.Index); } }
public SET<IfcActorSelect> Editors { get { return mEditors; } } public SET<IfcActorSelect> Editors { get { return mEditors; } }
public DateTime CreationTime { get { return mCreationTime; } set { mCreationTime = value; } } public DateTime CreationTime { get { return mCreationTime; } set { mCreationTime = value; } }
public DateTime LastRevisionTime { get { return mLastRevisionTime; } set { mLastRevisionTime = value; } } public DateTime LastRevisionTime { get { return mLastRevisionTime; } set { mLastRevisionTime = value; } }
public string ElectronicFormat { get { return mElectronicFormat == "$" ? "" : ParserIfc.Decode(mElectronicFormat); } set { mElectronicFormat = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string ElectronicFormat { get { return mElectronicFormat; } set { mElectronicFormat = value; } }
public DateTime ValidFrom { get { return mValidFrom; } set { mValidFrom = value; } } public DateTime ValidFrom { get { return mValidFrom; } set { mValidFrom = value; } }
public DateTime ValidUntil { get { return mValidUntil; } set { mValidUntil = value; } } public DateTime ValidUntil { get { return mValidUntil; } set { mValidUntil = value; } }
public IfcDocumentConfidentialityEnum Confidentiality { get { return mConfidentiality; } set { mConfidentiality = value; } } public IfcDocumentConfidentialityEnum Confidentiality { get { return mConfidentiality; } set { mConfidentiality = value; } }
@ -586,28 +597,35 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public partial class IfcDocumentInformationRelationship : IfcResourceLevelRelationship public partial class IfcDocumentInformationRelationship : IfcResourceLevelRelationship
{ {
internal int mRelatingDocument; //: IfcDocumentInformation private IfcDocumentInformation mRelatingDocument; //: IfcDocumentInformation
internal List<int> mRelatedDocuments = new List<int>();// : SET [1:?] OF IfcDocumentInformation; private SET<IfcDocumentInformation> mRelatedDocuments = new SET<IfcDocumentInformation>();// : SET [1:?] OF IfcDocumentInformation;
internal string mRelationshipType = "$";// : OPTIONAL IfcLabel; private string mRelationshipType = "";// : OPTIONAL IfcLabel;
public IfcDocumentInformation RelatingDocument { get { return mRelatingDocument; } set { mRelatingDocument = value; } }
public SET<IfcDocumentInformation> RelatedDocuments { get { return mRelatedDocuments; } }
public string RelationshipType { get { return mRelationshipType; } set { mRelationshipType = value; } }
internal IfcDocumentInformationRelationship() : base() { } internal IfcDocumentInformationRelationship() : base() { }
// internal IfcDocumentInformationRelationship(IfcDocumentInformationRelationship v) : base() { mRelatingDocument = v.mRelatingDocument; mRelatedDocuments = new List<int>(v.mRelatedDocuments.ToArray()); mRelationshipType = v.mRelationshipType; }
} }
[Serializable] [Serializable]
public partial class IfcDocumentReference : IfcExternalReference, IfcDocumentSelect public partial class IfcDocumentReference : IfcExternalReference, IfcDocumentSelect
{ {
internal string mDescription = "$";// IFC4 : OPTIONAL IfcText; internal string mDescription = "";// IFC4 : OPTIONAL IfcText;
internal int mReferencedDocument = 0;// IFC : OPTIONAL IfcDocumentInformation; internal IfcDocumentInformation mReferencedDocument = null;// IFC : OPTIONAL IfcDocumentInformation;
//INVERSE //INVERSE
internal SET<IfcRelAssociatesDocument> mDocumentRefForObjects = new SET<IfcRelAssociatesDocument>();// : SET OF IfcRelAssociatesDocument FOR RelatingDocument; internal SET<IfcRelAssociatesDocument> mDocumentRefForObjects = new SET<IfcRelAssociatesDocument>();// : SET OF IfcRelAssociatesDocument FOR RelatingDocument;
public string Description { get { return (mDescription == "$" ? "" : ParserIfc.Decode(mDescription)); } set { mDescription = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Description { get { return mDescription; } set { mDescription = value; } }
public IfcDocumentInformation ReferencedDocument { get { return mDatabase[mReferencedDocument] as IfcDocumentInformation; } set { mReferencedDocument = (value == null ? 0 : value.mIndex); } } public IfcDocumentInformation ReferencedDocument { get { return mReferencedDocument; } set { mReferencedDocument = value; } }
public SET<IfcRelAssociatesDocument> DocumentRefForObjects { get { return mDocumentRefForObjects; } } public SET<IfcRelAssociatesDocument> DocumentRefForObjects { get { return mDocumentRefForObjects; } }
public SET<IfcRelAssociatesDocument> DocumentForObjects { get { return mDocumentRefForObjects; } } public SET<IfcRelAssociatesDocument> DocumentForObjects { get { return mDocumentRefForObjects; } }
internal IfcDocumentReference() : base() { } internal IfcDocumentReference() : base() { }
internal IfcDocumentReference(DatabaseIfc db, IfcDocumentReference r) : base(db,r) { mDescription = r.mDescription; if(r.mReferencedDocument > 0) ReferencedDocument = db.Factory.Duplicate(r.ReferencedDocument) as IfcDocumentInformation; } internal IfcDocumentReference(DatabaseIfc db, IfcDocumentReference r) : base(db,r)
{
mDescription = r.mDescription;
if(r.mReferencedDocument != null)
ReferencedDocument = db.Factory.Duplicate(r.ReferencedDocument) as IfcDocumentInformation;
}
public IfcDocumentReference(DatabaseIfc db) : base(db) { } public IfcDocumentReference(DatabaseIfc db) : base(db) { }
internal void associate(IfcDefinitionSelect d) { if (mDocumentRefForObjects.Count == 0) { new IfcRelAssociatesDocument(this); } mDocumentRefForObjects.First().RelatedObjects.Add(d); } internal void associate(IfcDefinitionSelect d) { if (mDocumentRefForObjects.Count == 0) { new IfcRelAssociatesDocument(this); } mDocumentRefForObjects.First().RelatedObjects.Add(d); }
@ -623,13 +641,13 @@ namespace GeometryGym.Ifc
internal double mOverallWidth = double.NaN;// : OPTIONAL IfcPositiveLengthMeasure; internal double mOverallWidth = double.NaN;// : OPTIONAL IfcPositiveLengthMeasure;
internal IfcDoorTypeEnum mPredefinedType = IfcDoorTypeEnum.NOTDEFINED;//: OPTIONAL IfcDoorTypeEnum; //IFC4 internal IfcDoorTypeEnum mPredefinedType = IfcDoorTypeEnum.NOTDEFINED;//: OPTIONAL IfcDoorTypeEnum; //IFC4
internal IfcDoorTypeOperationEnum mOperationType = IfcDoorTypeOperationEnum.NOTDEFINED;// : OPTIONAL IfcDoorTypeOperationEnum; //IFC4 internal IfcDoorTypeOperationEnum mOperationType = IfcDoorTypeOperationEnum.NOTDEFINED;// : OPTIONAL IfcDoorTypeOperationEnum; //IFC4
internal string mUserDefinedOperationType = "$";// : OPTIONAL IfcLabel; internal string mUserDefinedOperationType = "";// : OPTIONAL IfcLabel;
public double OverallHeight { get { return mOverallHeight; } set { mOverallHeight = (value > 0 ? value : double.NaN); } } public double OverallHeight { get { return mOverallHeight; } set { mOverallHeight = (value > 0 ? value : double.NaN); } }
public double OverallWidth { get { return mOverallWidth; } set { mOverallWidth = (value > 0 ? value : double.NaN); } } public double OverallWidth { get { return mOverallWidth; } set { mOverallWidth = (value > 0 ? value : double.NaN); } }
public IfcDoorTypeEnum PredefinedType { get { return mPredefinedType; } set { mPredefinedType = value; } } public IfcDoorTypeEnum PredefinedType { get { return mPredefinedType; } set { mPredefinedType = value; } }
public IfcDoorTypeOperationEnum OperationType { get { return mOperationType; } set { mOperationType = value; } } public IfcDoorTypeOperationEnum OperationType { get { return mOperationType; } set { mOperationType = value; } }
public string UserDefinedOperationType { get { return (mUserDefinedOperationType == "$" ? "" : ParserIfc.Decode(mUserDefinedOperationType)); } set { mUserDefinedOperationType = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string UserDefinedOperationType { get { return mUserDefinedOperationType; } set { mUserDefinedOperationType = value; } }
internal IfcDoor() : base() { } internal IfcDoor() : base() { }
internal IfcDoor(DatabaseIfc db, IfcDoor d, DuplicateOptions options) : base(db, d, options) { mOverallHeight = d.mOverallHeight; mOverallWidth = d.mOverallWidth; mPredefinedType = d.mPredefinedType; mOperationType = d.mOperationType; mUserDefinedOperationType = d.mUserDefinedOperationType; } internal IfcDoor(DatabaseIfc db, IfcDoor d, DuplicateOptions options) : base(db, d, options) { mOverallHeight = d.mOverallHeight; mOverallWidth = d.mOverallWidth; mPredefinedType = d.mPredefinedType; mOperationType = d.mOperationType; mUserDefinedOperationType = d.mUserDefinedOperationType; }
@ -738,10 +756,10 @@ namespace GeometryGym.Ifc
internal IfcDoorTypeEnum mPredefinedType = IfcDoorTypeEnum.NOTDEFINED; internal IfcDoorTypeEnum mPredefinedType = IfcDoorTypeEnum.NOTDEFINED;
internal IfcDoorTypeOperationEnum mOperationType;// : IfcDoorStyleOperationEnum; internal IfcDoorTypeOperationEnum mOperationType;// : IfcDoorStyleOperationEnum;
internal bool mParameterTakesPrecedence = false;// : BOOLEAN; internal bool mParameterTakesPrecedence = false;// : BOOLEAN;
internal string mUserDefinedOperationType = "$";// : OPTIONAL IfcLabel; internal string mUserDefinedOperationType = "";// : OPTIONAL IfcLabel;
public IfcDoorTypeEnum PredefinedType { get { return mPredefinedType; } set { mPredefinedType = value; } } public IfcDoorTypeEnum PredefinedType { get { return mPredefinedType; } set { mPredefinedType = value; } }
public string UserDefinedOperationType { get { return (mUserDefinedOperationType == "$" ? "" : ParserIfc.Decode(mUserDefinedOperationType)); } set { mUserDefinedOperationType = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string UserDefinedOperationType { get { return mUserDefinedOperationType; } set { mUserDefinedOperationType = value; } }
internal IfcDoorType() : base() { } internal IfcDoorType() : base() { }
internal IfcDoorType(DatabaseIfc db, IfcDoorType t, DuplicateOptions options) : base(db, t, options) { mPredefinedType = t.mPredefinedType; mOperationType = t.mOperationType; mParameterTakesPrecedence = t.mParameterTakesPrecedence; mUserDefinedOperationType = t.mUserDefinedOperationType; } internal IfcDoorType(DatabaseIfc db, IfcDoorType t, DuplicateOptions options) : base(db, t, options) { mPredefinedType = t.mPredefinedType; mOperationType = t.mOperationType; mParameterTakesPrecedence = t.mParameterTakesPrecedence; mUserDefinedOperationType = t.mUserDefinedOperationType; }
@ -779,8 +797,8 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public partial class IfcDraughtingCalloutRelationship : BaseClassIfc // DEPRECATED IFC4 public partial class IfcDraughtingCalloutRelationship : BaseClassIfc // DEPRECATED IFC4
{ {
internal string mName = "$";// : OPTIONAL IfcLabel; internal string mName = "";// : OPTIONAL IfcLabel;
internal string mDescription = "$";// : OPTIONAL IfcText; internal string mDescription = "";// : OPTIONAL IfcText;
internal int mRelatingDraughtingCallout;// : IfcDraughtingCallout; internal int mRelatingDraughtingCallout;// : IfcDraughtingCallout;
internal int mRelatedDraughtingCallout;// : IfcDraughtingCallout; internal int mRelatedDraughtingCallout;// : IfcDraughtingCallout;
internal IfcDraughtingCalloutRelationship() : base() { } internal IfcDraughtingCalloutRelationship() : base() { }

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

@ -215,10 +215,10 @@ namespace GeometryGym.Ifc
public partial class IfcElectricDistributionPoint : IfcFlowController // DEPRECATED IFC4 public partial class IfcElectricDistributionPoint : IfcFlowController // DEPRECATED IFC4
{ {
internal IfcElectricDistributionPointFunctionEnum mDistributionPointFunction;// : IfcElectricDistributionPointFunctionEnum; internal IfcElectricDistributionPointFunctionEnum mDistributionPointFunction;// : IfcElectricDistributionPointFunctionEnum;
internal string mUserDefinedFunction = "$";// : OPTIONAL IfcLabel; internal string mUserDefinedFunction = "";// : OPTIONAL IfcLabel;
public IfcElectricDistributionPointFunctionEnum DistributionPointFunction { get { return mDistributionPointFunction; } set { mDistributionPointFunction = value; } } public IfcElectricDistributionPointFunctionEnum DistributionPointFunction { get { return mDistributionPointFunction; } set { mDistributionPointFunction = value; } }
public string UserDefinedFunction { get { return mUserDefinedFunction == "$" ? "" : ParserIfc.Decode(mUserDefinedFunction); } set { mUserDefinedFunction = string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value); } } public string UserDefinedFunction { get { return mUserDefinedFunction; } set { mUserDefinedFunction = value; } }
internal IfcElectricDistributionPoint() : base() { } internal IfcElectricDistributionPoint() : base() { }
internal IfcElectricDistributionPoint(DatabaseIfc db, IfcElectricDistributionPoint p, DuplicateOptions options) : base(db, p, options) { mDistributionPointFunction = p.mDistributionPointFunction; mUserDefinedFunction = p.mUserDefinedFunction; } internal IfcElectricDistributionPoint(DatabaseIfc db, IfcElectricDistributionPoint p, DuplicateOptions options) : base(db, p, options) { mDistributionPointFunction = p.mDistributionPointFunction; mUserDefinedFunction = p.mUserDefinedFunction; }
@ -351,7 +351,7 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public abstract partial class IfcElement : IfcProduct, IfcInterferenceSelect, IfcStructuralActivityAssignmentSelect //ABSTRACT SUPERTYPE OF (ONEOF(IfcBuildingElement, IfcCivilElement public abstract partial class IfcElement : IfcProduct, IfcInterferenceSelect, IfcStructuralActivityAssignmentSelect //ABSTRACT SUPERTYPE OF (ONEOF(IfcBuildingElement, IfcCivilElement
{ //,IfcDistributionElement,IfcElementAssembly,IfcElementComponent,IfcFeatureElement,IfcFurnishingElement,IfcGeographicElement,IfcTransportElement ,IfcVirtualElement,IfcElectricalElement SS,IfcEquipmentElement SS)) { //,IfcDistributionElement,IfcElementAssembly,IfcElementComponent,IfcFeatureElement,IfcFurnishingElement,IfcGeographicElement,IfcTransportElement ,IfcVirtualElement,IfcElectricalElement SS,IfcEquipmentElement SS))
private string mTag = "$";// : OPTIONAL IfcIdentifier; private string mTag = "";// : OPTIONAL IfcIdentifier;
//INVERSE //INVERSE
internal SET<IfcRelFillsElement> mFillsVoids = new SET<IfcRelFillsElement>();// : SET [0:1] OF IfcRelFillsElement FOR RelatedBuildingElement; internal SET<IfcRelFillsElement> mFillsVoids = new SET<IfcRelFillsElement>();// : SET [0:1] OF IfcRelFillsElement FOR RelatedBuildingElement;
@ -372,7 +372,7 @@ namespace GeometryGym.Ifc
// //
internal SET<IfcRelConnectsStructuralElement> mHasStructuralMember = new SET<IfcRelConnectsStructuralElement>();// DEL IFC4 : SET OF IfcRelConnectsStructuralElement FOR RelatingElement; internal SET<IfcRelConnectsStructuralElement> mHasStructuralMember = new SET<IfcRelConnectsStructuralElement>();// DEL IFC4 : SET OF IfcRelConnectsStructuralElement FOR RelatingElement;
public string Tag { get { return mTag == "$" ? "" : ParserIfc.Decode(mTag); } set { mTag = string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value); } } public string Tag { get { return mTag; } set { mTag = value; } }
public SET<IfcRelFillsElement> FillsVoids { get { return mFillsVoids; } } public SET<IfcRelFillsElement> FillsVoids { get { return mFillsVoids; } }
public SET<IfcRelConnectsElements> ConnectedTo { get { return mConnectedTo; } } public SET<IfcRelConnectsElements> ConnectedTo { get { return mConnectedTo; } }
public SET<IfcRelInterferesElements> IsInterferedByElements { get { return mIsInterferedByElements; } } public SET<IfcRelInterferesElements> IsInterferedByElements { get { return mIsInterferedByElements; } }
@ -664,10 +664,10 @@ namespace GeometryGym.Ifc
public partial class IfcElementQuantity : IfcQuantitySet public partial class IfcElementQuantity : IfcQuantitySet
{ {
public override string StepClassName { get { return "IfcElementQuantity"; } } public override string StepClassName { get { return "IfcElementQuantity"; } }
internal string mMethodOfMeasurement = "$";// : OPTIONAL IfcLabel; internal string mMethodOfMeasurement = "";// : OPTIONAL IfcLabel;
private Dictionary<string, IfcPhysicalQuantity> mQuantities = new Dictionary<string, IfcPhysicalQuantity>();// : SET [1:?] OF IfcPhysicalQuantity; private Dictionary<string, IfcPhysicalQuantity> mQuantities = new Dictionary<string, IfcPhysicalQuantity>();// : SET [1:?] OF IfcPhysicalQuantity;
public string MethodOfMeasurement { get { return (mMethodOfMeasurement == "$" ? "" : ParserIfc.Decode(mMethodOfMeasurement)); } set { mMethodOfMeasurement = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string MethodOfMeasurement { get { return mMethodOfMeasurement; } set { mMethodOfMeasurement = value; } }
public Dictionary<string, IfcPhysicalQuantity> Quantities { get { return mQuantities; } } public Dictionary<string, IfcPhysicalQuantity> Quantities { get { return mQuantities; } }
internal IfcElementQuantity() : base() { } internal IfcElementQuantity() : base() { }
@ -783,8 +783,8 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public abstract partial class IfcElementType : IfcTypeProduct //ABSTRACT SUPERTYPE OF(ONEOF(IfcBuildingElementType, IfcDistributionElementType, IfcElementAssemblyType, IfcElementComponentType, IfcFurnishingElementType, IfcGeographicElementType, IfcTransportElementType)) public abstract partial class IfcElementType : IfcTypeProduct //ABSTRACT SUPERTYPE OF(ONEOF(IfcBuildingElementType, IfcDistributionElementType, IfcElementAssemblyType, IfcElementComponentType, IfcFurnishingElementType, IfcGeographicElementType, IfcTransportElementType))
{ {
private string mElementType = "$";// : OPTIONAL IfcLabel private string mElementType = "";// : OPTIONAL IfcLabel
public string ElementType { get { return mElementType == "$" ? "" : ParserIfc.Decode( mElementType); } set { mElementType = string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode( value); } } public string ElementType { get { return mElementType; } set { mElementType = value; } }
protected IfcElementType() : base() { } protected IfcElementType() : base() { }
protected IfcElementType(IfcElementType basis) : base(basis) { mElementType = basis.mElementType; } protected IfcElementType(IfcElementType basis) : base(basis) { mElementType = basis.mElementType; }
@ -882,7 +882,7 @@ namespace GeometryGym.Ifc
{ {
internal string mImpactType;// : IfcLabel; internal string mImpactType;// : IfcLabel;
internal IfcEnvironmentalImpactCategoryEnum mEnvCategory = IfcEnvironmentalImpactCategoryEnum.NOTDEFINED;// IfcEnvironmentalImpactCategoryEnum internal IfcEnvironmentalImpactCategoryEnum mEnvCategory = IfcEnvironmentalImpactCategoryEnum.NOTDEFINED;// IfcEnvironmentalImpactCategoryEnum
internal string mUserDefinedCategory = "$";// : OPTIONAL IfcLabel; internal string mUserDefinedCategory = "";// : OPTIONAL IfcLabel;
internal IfcEnvironmentalImpactValue() : base() { } internal IfcEnvironmentalImpactValue() : base() { }
internal IfcEnvironmentalImpactValue(DatabaseIfc db, IfcEnvironmentalImpactValue v) : base(db,v) { mImpactType = v.mImpactType; mEnvCategory = v.mEnvCategory; mUserDefinedCategory = v.mUserDefinedCategory; } internal IfcEnvironmentalImpactValue(DatabaseIfc db, IfcEnvironmentalImpactValue v) : base(db,v) { mImpactType = v.mImpactType; mEnvCategory = v.mEnvCategory; mUserDefinedCategory = v.mUserDefinedCategory; }
} }
@ -945,12 +945,12 @@ namespace GeometryGym.Ifc
{ {
internal IfcEventTypeEnum mPredefinedType = IfcEventTypeEnum.NOTDEFINED;// : IfcEventTypeEnum; internal IfcEventTypeEnum mPredefinedType = IfcEventTypeEnum.NOTDEFINED;// : IfcEventTypeEnum;
internal IfcEventTriggerTypeEnum mEventTriggerType = IfcEventTriggerTypeEnum.NOTDEFINED;// : IfcEventTypeEnum; internal IfcEventTriggerTypeEnum mEventTriggerType = IfcEventTriggerTypeEnum.NOTDEFINED;// : IfcEventTypeEnum;
internal string mUserDefinedEventTriggerType = "$";// : OPTIONAL IfcLabel; internal string mUserDefinedEventTriggerType = "";// : OPTIONAL IfcLabel;
internal int mEventOccurrenceTime;// : OPTIONAL IfcEventTime; internal IfcEventTime mEventOccurrenceTime;// : OPTIONAL IfcEventTime;
public IfcEventTypeEnum PredefinedType { get { return mPredefinedType; } set { mPredefinedType = value; } } public IfcEventTypeEnum PredefinedType { get { return mPredefinedType; } set { mPredefinedType = value; } }
public IfcEventTriggerTypeEnum EventTriggerType { get { return mEventTriggerType; } set { mEventTriggerType = value; } } public IfcEventTriggerTypeEnum EventTriggerType { get { return mEventTriggerType; } set { mEventTriggerType = value; } }
public string UserDefinedEventTriggerType { get { return ParserIfc.Decode(mUserDefinedEventTriggerType); } set { mUserDefinedEventTriggerType = ParserIfc.Encode(value); } } public string UserDefinedEventTriggerType { get { return mUserDefinedEventTriggerType; } set { mUserDefinedEventTriggerType = value; } }
internal IfcEvent() : base() { } internal IfcEvent() : base() { }
internal IfcEvent(DatabaseIfc db, IfcEvent e, DuplicateOptions options) : base(db, e, options) { mPredefinedType = e.mPredefinedType; mEventTriggerType = e.mEventTriggerType; mUserDefinedEventTriggerType = e.mUserDefinedEventTriggerType; } internal IfcEvent(DatabaseIfc db, IfcEvent e, DuplicateOptions options) : base(db, e, options) { mPredefinedType = e.mPredefinedType; mEventTriggerType = e.mEventTriggerType; mUserDefinedEventTriggerType = e.mUserDefinedEventTriggerType; }
@ -976,11 +976,11 @@ namespace GeometryGym.Ifc
{ {
internal IfcEventTypeEnum mPredefinedType = IfcEventTypeEnum.NOTDEFINED;// : IfcEventTypeEnum; internal IfcEventTypeEnum mPredefinedType = IfcEventTypeEnum.NOTDEFINED;// : IfcEventTypeEnum;
internal IfcEventTriggerTypeEnum mEventTriggerType = IfcEventTriggerTypeEnum.NOTDEFINED;// : IfcEventTypeEnum; internal IfcEventTriggerTypeEnum mEventTriggerType = IfcEventTriggerTypeEnum.NOTDEFINED;// : IfcEventTypeEnum;
internal string mUserDefinedEventTriggerType = "$";// : OPTIONAL IfcLabel; internal string mUserDefinedEventTriggerType = "";// : OPTIONAL IfcLabel;
public IfcEventTypeEnum PredefinedType { get { return mPredefinedType; } set { mPredefinedType = value; } } public IfcEventTypeEnum PredefinedType { get { return mPredefinedType; } set { mPredefinedType = value; } }
public IfcEventTriggerTypeEnum EventTriggerType { get { return mEventTriggerType; } set { mEventTriggerType = value; } } public IfcEventTriggerTypeEnum EventTriggerType { get { return mEventTriggerType; } set { mEventTriggerType = value; } }
public string UserDefinedEventTriggerType { get { return (mUserDefinedEventTriggerType == "$" ? "" : ParserIfc.Decode(mUserDefinedEventTriggerType)); } set { mUserDefinedEventTriggerType = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string UserDefinedEventTriggerType { get { return mUserDefinedEventTriggerType; } set { mUserDefinedEventTriggerType = value; } }
internal IfcEventType() : base() { } internal IfcEventType() : base() { }
internal IfcEventType(DatabaseIfc db, IfcEventType t, DuplicateOptions options) : base(db, t, options) { mPredefinedType = t.mPredefinedType; mEventTriggerType = t.mEventTriggerType; mUserDefinedEventTriggerType = t.mUserDefinedEventTriggerType; } internal IfcEventType(DatabaseIfc db, IfcEventType t, DuplicateOptions options) : base(db, t, options) { mPredefinedType = t.mPredefinedType; mEventTriggerType = t.mEventTriggerType; mUserDefinedEventTriggerType = t.mUserDefinedEventTriggerType; }
@ -1113,16 +1113,16 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public abstract partial class IfcExternalReference : BaseClassIfc, IfcLightDistributionDataSourceSelect, IfcObjectReferenceSelect, IfcResourceObjectSelect, NamedObjectIfc public abstract partial class IfcExternalReference : BaseClassIfc, IfcLightDistributionDataSourceSelect, IfcObjectReferenceSelect, IfcResourceObjectSelect, NamedObjectIfc
{ //ABSTRACT SUPERTYPE OF (ONEOF (IfcClassificationReference ,IfcDocumentReference ,IfcExternallyDefinedHatchStyle ,IfcExternallyDefinedSurfaceStyle ,IfcExternallyDefinedSymbol ,IfcExternallyDefinedTextFont ,IfcLibraryReference)); { //ABSTRACT SUPERTYPE OF (ONEOF (IfcClassificationReference ,IfcDocumentReference ,IfcExternallyDefinedHatchStyle ,IfcExternallyDefinedSurfaceStyle ,IfcExternallyDefinedSymbol ,IfcExternallyDefinedTextFont ,IfcLibraryReference));
private string mLocation = "$";// : OPTIONAL IfcURIReference; ifc2x3 ifclabel private string mLocation = "";// : OPTIONAL IfcURIReference; ifc2x3 ifclabel
private string mIdentification = "$";// : OPTIONAL IfcIdentifier; ifc2x3 ItemReference private string mIdentification = "";// : OPTIONAL IfcIdentifier; ifc2x3 ItemReference
private string mName = "";// : OPTIONAL IfcLabel; private string mName = "";// : OPTIONAL IfcLabel;
//INVERSE //INVERSE
private SET<IfcExternalReferenceRelationship> mHasExternalReference = new SET<IfcExternalReferenceRelationship>(); //IFC4 SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects; public override string Name { get { return (mName == "$" ? "" : mName); } set { if (!string.IsNullOrEmpty(value)) mName = value; } } private SET<IfcExternalReferenceRelationship> mHasExternalReference = new SET<IfcExternalReferenceRelationship>(); //IFC4 SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects;
internal SET<IfcResourceConstraintRelationship> mHasConstraintRelationships = new SET<IfcResourceConstraintRelationship>(); //gg internal SET<IfcResourceConstraintRelationship> mHasConstraintRelationships = new SET<IfcResourceConstraintRelationship>(); //gg
internal SET<IfcExternalReferenceRelationship> mExternalReferenceForResources = new SET<IfcExternalReferenceRelationship>();// : SET [0:?] OF IfcExternalReferenceRelationship FOR RelatingReference; internal SET<IfcExternalReferenceRelationship> mExternalReferenceForResources = new SET<IfcExternalReferenceRelationship>();// : SET [0:?] OF IfcExternalReferenceRelationship FOR RelatingReference;
public string Location { get { return (mLocation == "$" ? "" : ParserIfc.Decode(mLocation)); } set { mLocation = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Location { get { return mLocation; } set { mLocation = value; } }
public string Identification { get { return (mIdentification == "$" ? "" : ParserIfc.Decode(mIdentification)); } set { mIdentification = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Identification { get { return mIdentification; } set { mIdentification = value; } }
public string Name { get { return mName; } set { mName = value; } } public string Name { get { return mName; } set { mName = value; } }
public SET<IfcExternalReferenceRelationship> HasExternalReference { get { return mHasExternalReference; } } public SET<IfcExternalReferenceRelationship> HasExternalReference { get { return mHasExternalReference; } }
public SET<IfcResourceConstraintRelationship> HasConstraintRelationships { get { return mHasConstraintRelationships; } } public SET<IfcResourceConstraintRelationship> HasConstraintRelationships { get { return mHasConstraintRelationships; } }

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

@ -581,7 +581,7 @@ namespace GeometryGym.Ifc
internal int mFlowConditionTimeSeries, mVelocityTimeSeries, mFlowrateTimeSeries;// : OPTIONAL IfcTimeSeries; internal int mFlowConditionTimeSeries, mVelocityTimeSeries, mFlowrateTimeSeries;// : OPTIONAL IfcTimeSeries;
internal int mFluid;// : IfcMaterial; internal int mFluid;// : IfcMaterial;
internal int mPressureTimeSeries;// : OPTIONAL IfcTimeSeries; internal int mPressureTimeSeries;// : OPTIONAL IfcTimeSeries;
internal string mUserDefinedPropertySource = "$";// : OPTIONAL IfcLabel; internal string mUserDefinedPropertySource = "";// : OPTIONAL IfcLabel;
internal double mTemperatureSingleValue = double.NaN, mWetBulbTemperatureSingleValue = double.NaN;// : OPTIONAL IfcThermodynamicTemperatureMeasure; internal double mTemperatureSingleValue = double.NaN, mWetBulbTemperatureSingleValue = double.NaN;// : OPTIONAL IfcThermodynamicTemperatureMeasure;
internal int mWetBulbTemperatureTimeSeries, mTemperatureTimeSeries;// : OPTIONAL IfcTimeSeries; internal int mWetBulbTemperatureTimeSeries, mTemperatureTimeSeries;// : OPTIONAL IfcTimeSeries;
internal double mFlowrateSingleValue = double.NaN;// : OPTIONAL IfcDerivedMeasureValue; internal double mFlowrateSingleValue = double.NaN;// : OPTIONAL IfcDerivedMeasureValue;

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

@ -201,12 +201,12 @@ namespace GeometryGym.Ifc
internal IfcGeometricRepresentationContext mParentContext;// : IfcGeometricRepresentationContext; internal IfcGeometricRepresentationContext mParentContext;// : IfcGeometricRepresentationContext;
internal double mTargetScale = double.NaN;// : OPTIONAL IfcPositiveRatioMeasure; internal double mTargetScale = double.NaN;// : OPTIONAL IfcPositiveRatioMeasure;
private IfcGeometricProjectionEnum mTargetView;// : IfcGeometricProjectionEnum; private IfcGeometricProjectionEnum mTargetView;// : IfcGeometricProjectionEnum;
internal string mUserDefinedTargetView = "$";// : OPTIONAL IfcLabel; internal string mUserDefinedTargetView = "";// : OPTIONAL IfcLabel;
public IfcGeometricRepresentationContext ParentContext { get { return mParentContext; } set { mParentContext = value; if(value != null) value.mHasSubContexts.Add(this); } } public IfcGeometricRepresentationContext ParentContext { get { return mParentContext; } set { mParentContext = value; if(value != null) value.mHasSubContexts.Add(this); } }
public double TargetScale { get { return mTargetScale; } set { mTargetScale = value; } } public double TargetScale { get { return mTargetScale; } set { mTargetScale = value; } }
public IfcGeometricProjectionEnum TargetView { get { return mTargetView; } set { mTargetView = value; } } public IfcGeometricProjectionEnum TargetView { get { return mTargetView; } set { mTargetView = value; } }
public string UserDefinedTargetView { get { return (mUserDefinedTargetView == "$" ? "" : ParserIfc.Decode(mUserDefinedTargetView)); } set { mUserDefinedTargetView = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string UserDefinedTargetView { get { return mUserDefinedTargetView; } set { mUserDefinedTargetView = value; } }
internal IfcGeometricRepresentationSubContext() : base() { } internal IfcGeometricRepresentationSubContext() : base() { }
internal IfcGeometricRepresentationSubContext(DatabaseIfc db, IfcGeometricRepresentationSubContext s, DuplicateOptions options) : base(db, s, options) internal IfcGeometricRepresentationSubContext(DatabaseIfc db, IfcGeometricRepresentationSubContext s, DuplicateOptions options) : base(db, s, options)
@ -539,7 +539,7 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public partial class IfcGridAxis : BaseClassIfc, NamedObjectIfc public partial class IfcGridAxis : BaseClassIfc, NamedObjectIfc
{ {
private string mAxisTag = "$";// : OPTIONAL IfcLabel; private string mAxisTag = "";// : OPTIONAL IfcLabel;
internal bool mSameSense;// : IfcBoolean; internal bool mSameSense;// : IfcBoolean;
//INVERSE //INVERSE
@ -549,7 +549,7 @@ namespace GeometryGym.Ifc
internal List<IfcVirtualGridIntersection> mHasIntersections = new List<IfcVirtualGridIntersection>();//: SET OF IfcVirtualGridIntersection FOR IntersectingAxes; internal List<IfcVirtualGridIntersection> mHasIntersections = new List<IfcVirtualGridIntersection>();//: SET OF IfcVirtualGridIntersection FOR IntersectingAxes;
public string Name { get { return AxisTag; } set { AxisTag = value; } } public string Name { get { return AxisTag; } set { AxisTag = value; } }
public string AxisTag { get { return mAxisTag == "$" ? "" : ParserIfc.Decode(mAxisTag); } set { mAxisTag = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string AxisTag { get { return mAxisTag; } set { mAxisTag = value; } }
public IfcCurve AxisCurve { get; set; } public IfcCurve AxisCurve { get; set; }
public bool SameSense { get { return mSameSense; } set { mSameSense = value; } } public bool SameSense { get { return mSameSense; } set { mSameSense = value; } }

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

@ -96,24 +96,24 @@ namespace GeometryGym.Ifc
public partial class IfcLibraryInformation : IfcExternalInformation, NamedObjectIfc, IfcLibrarySelect public partial class IfcLibraryInformation : IfcExternalInformation, NamedObjectIfc, IfcLibrarySelect
{ {
internal string mName;// : IfcLabel; internal string mName;// : IfcLabel;
internal string mVersion = "$";//: OPTIONAL IfcLabel; internal string mVersion = "";//: OPTIONAL IfcLabel;
internal int mPublisher;// : OPTIONAL IfcActorSelect; internal int mPublisher;// : OPTIONAL IfcActorSelect;
internal DateTime mVersionDate = DateTime.MinValue; // : OPTIONAL IfcDateTime; internal DateTime mVersionDate = DateTime.MinValue; // : OPTIONAL IfcDateTime;
internal int mVersionDateSS = 0; // internal int mVersionDateSS = 0; //
internal string mLocation = "$";// : OPTIONAL IfcURIReference; //IFC4 Added internal string mLocation = "";// : OPTIONAL IfcURIReference; //IFC4 Added
internal string mDescription = "$";// : OPTIONAL IfcText; //IFC4 Added internal string mDescription = "";// : OPTIONAL IfcText; //IFC4 Added
[Obsolete("DEPRECATED IFC4", false)] [Obsolete("DEPRECATED IFC4", false)]
private SET<IfcLibraryReference> mLibraryReference = new SET<IfcLibraryReference>();// IFC2x3 : OPTIONAL SET[1:?] OF IfcLibraryReference; private SET<IfcLibraryReference> mLibraryReference = new SET<IfcLibraryReference>();// IFC2x3 : OPTIONAL SET[1:?] OF IfcLibraryReference;
//INVERSE //INVERSE
internal SET<IfcRelAssociatesLibrary> mLibraryRefForObjects = new SET<IfcRelAssociatesLibrary>();//IFC4 : SET [0:?] OF IfcRelAssociatesLibrary FOR RelatingLibrary; internal SET<IfcRelAssociatesLibrary> mLibraryRefForObjects = new SET<IfcRelAssociatesLibrary>();//IFC4 : SET [0:?] OF IfcRelAssociatesLibrary FOR RelatingLibrary;
internal SET<IfcLibraryReference> mHasLibraryReferences = new SET<IfcLibraryReference>();// : SET OF IfcLibraryReference FOR ReferencedLibrary; internal SET<IfcLibraryReference> mHasLibraryReferences = new SET<IfcLibraryReference>();// : SET OF IfcLibraryReference FOR ReferencedLibrary;
public string Name { get { return ParserIfc.Decode(mName); } set { mName = (string.IsNullOrEmpty(value) ? "UNKNOWN" : ParserIfc.Encode(value)); } } public string Name { get { return mName; } set { mName = (string.IsNullOrEmpty(value) ? "UNKNOWN" : value); } }
public string Version { get { return (mVersion == "$" ? "" : ParserIfc.Decode(mVersion)); } set { mVersion = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Version { get { return mVersion; } set { mVersion = value; } }
public IfcActorSelect Publisher { get { return mDatabase[mPublisher] as IfcActorSelect; } set { mPublisher = (value == null ? 0 : value.Index); } } public IfcActorSelect Publisher { get { return mDatabase[mPublisher] as IfcActorSelect; } set { mPublisher = (value == null ? 0 : value.Index); } }
public DateTime VersionDate { get { return mVersionDate; } set { mVersionDate = value; } } public DateTime VersionDate { get { return mVersionDate; } set { mVersionDate = value; } }
public string Location { get { return (mLocation == "$" ? "" : ParserIfc.Decode(mLocation)); } set { mLocation = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Location { get { return mLocation; } set { mLocation = value; } }
public string Description { get { return (mDescription == "$" ? "" : ParserIfc.Decode(mDescription)); } set { mDescription = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Description { get { return mDescription; } set { mDescription = value; } }
public SET<IfcRelAssociatesLibrary> LibraryRefForObjects { get { return mLibraryRefForObjects; } } public SET<IfcRelAssociatesLibrary> LibraryRefForObjects { get { return mLibraryRefForObjects; } }
public SET<IfcLibraryReference> HasLibraryReferences { get { return mHasLibraryReferences; } } public SET<IfcLibraryReference> HasLibraryReferences { get { return mHasLibraryReferences; } }
@ -151,13 +151,13 @@ namespace GeometryGym.Ifc
public partial class IfcLibraryReference : IfcExternalReference, IfcLibrarySelect public partial class IfcLibraryReference : IfcExternalReference, IfcLibrarySelect
{ {
internal string mDescription = ""; //IFC4 : OPTIONAL IfcText; internal string mDescription = ""; //IFC4 : OPTIONAL IfcText;
internal string mLanguage = "$"; //IFC4 : OPTIONAL IfcLanguageId; internal string mLanguage = ""; //IFC4 : OPTIONAL IfcLanguageId;
internal IfcLibraryInformation mReferencedLibrary; // : OPTIONAL IfcLibraryInformation; ifc2x3 INVERSE ReferenceIntoLibrary internal IfcLibraryInformation mReferencedLibrary; // : OPTIONAL IfcLibraryInformation; ifc2x3 INVERSE ReferenceIntoLibrary
//INVERSE //INVERSE
internal SET<IfcRelAssociatesLibrary> mLibraryRefForObjects = new SET<IfcRelAssociatesLibrary>();//IFC4 : SET [0:?] OF IfcRelAssociatesLibrary FOR RelatingLibrary; internal SET<IfcRelAssociatesLibrary> mLibraryRefForObjects = new SET<IfcRelAssociatesLibrary>();//IFC4 : SET [0:?] OF IfcRelAssociatesLibrary FOR RelatingLibrary;
public string Description { get { return mDescription; } set { mDescription = value; } } public string Description { get { return mDescription; } set { mDescription = value; } }
public string Language { get { return (mLanguage == "$" ? "" : ParserIfc.Decode(mLanguage)); } set { mLanguage = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Language { get { return mLanguage; } set { mLanguage = value; } }
public IfcLibraryInformation ReferencedLibrary { get { return mReferencedLibrary; } set { mReferencedLibrary = value; if (value != null) value.mHasLibraryReferences.Add(this); } } public IfcLibraryInformation ReferencedLibrary { get { return mReferencedLibrary; } set { mReferencedLibrary = value; if (value != null) value.mHasLibraryReferences.Add(this); } }
public SET<IfcRelAssociatesLibrary> LibraryRefForObjects { get { return mLibraryRefForObjects; } } public SET<IfcRelAssociatesLibrary> LibraryRefForObjects { get { return mLibraryRefForObjects; } }
@ -232,7 +232,7 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public abstract partial class IfcLightSource : IfcGeometricRepresentationItem //ABSTRACT SUPERTYPE OF (ONEOF (IfcLightSourceAmbient ,IfcLightSourceDirectional ,IfcLightSourceGoniometric ,IfcLightSourcePositional)) public abstract partial class IfcLightSource : IfcGeometricRepresentationItem //ABSTRACT SUPERTYPE OF (ONEOF (IfcLightSourceAmbient ,IfcLightSourceDirectional ,IfcLightSourceGoniometric ,IfcLightSourcePositional))
{ {
internal string mName = "$";// : OPTIONAL IfcLabel; internal string mName = "";// : OPTIONAL IfcLabel;
internal int mLightColour;// : IfcColourRgb; internal int mLightColour;// : IfcColourRgb;
internal double mAmbientIntensity;// : OPTIONAL IfcNormalisedRatioMeasure; internal double mAmbientIntensity;// : OPTIONAL IfcNormalisedRatioMeasure;
internal double mIntensity;// : OPTIONAL IfcNormalisedRatioMeasure; internal double mIntensity;// : OPTIONAL IfcNormalisedRatioMeasure;
@ -423,7 +423,7 @@ namespace GeometryGym.Ifc
Axis = db.Factory.Duplicate(e.Axis) as IfcCurve; Axis = db.Factory.Duplicate(e.Axis) as IfcCurve;
} }
internal override bool isDuplicate(BaseClassIfc e, double tol) internal override bool isDuplicate(BaseClassIfc e, bool includeAggregated, double tol)
{ {
IfcLinearPositioningElement linearPositioningElement = e as IfcLinearPositioningElement; IfcLinearPositioningElement linearPositioningElement = e as IfcLinearPositioningElement;
if (linearPositioningElement == null) if (linearPositioningElement == null)
@ -436,7 +436,7 @@ namespace GeometryGym.Ifc
} }
else if (linearPositioningElement.mAxis != null) else if (linearPositioningElement.mAxis != null)
return false; return false;
return base.isDuplicate(e, tol); return base.isDuplicate(e, includeAggregated, tol);
} }
} }
[Serializable] [Serializable]

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

@ -112,8 +112,8 @@ namespace GeometryGym.Ifc
public partial class IfcMaterial : IfcMaterialDefinition, NamedObjectIfc public partial class IfcMaterial : IfcMaterialDefinition, NamedObjectIfc
{ {
private string mName = "";// : IfcLabel; private string mName = "";// : IfcLabel;
private string mDescription = "$";// : IFC4 OPTIONAL IfcText; private string mDescription = "";// : IFC4 OPTIONAL IfcText;
private string mCategory = "$";// : IFC4 OPTIONAL IfcLabel; private string mCategory = "";// : IFC4 OPTIONAL IfcLabel;
//INVERSE //INVERSE
internal IfcMaterialDefinitionRepresentation mHasRepresentation = null;// : SET [0:1] OF IfcMaterialDefinitionRepresentation FOR RepresentedMaterial; internal IfcMaterialDefinitionRepresentation mHasRepresentation = null;// : SET [0:1] OF IfcMaterialDefinitionRepresentation FOR RepresentedMaterial;
@ -121,9 +121,9 @@ namespace GeometryGym.Ifc
internal List<IfcMaterialRelationship> mIsRelatedWith = new List<IfcMaterialRelationship>();// : SET OF IfcMaterialRelationship FOR RelatedMaterials; internal List<IfcMaterialRelationship> mIsRelatedWith = new List<IfcMaterialRelationship>();// : SET OF IfcMaterialRelationship FOR RelatedMaterials;
internal IfcMaterialRelationship mRelatesTo = null;// : SET [0:1] OF IfcMaterialRelationship FOR RelatingMaterial; internal IfcMaterialRelationship mRelatesTo = null;// : SET [0:1] OF IfcMaterialRelationship FOR RelatingMaterial;
public override string Name { get { return ParserIfc.Decode(mName); } set { mName = (string.IsNullOrEmpty(value) ? "UNKNOWN NAME" : ParserIfc.Encode(value)); } } public override string Name { get { return mName; } set { mName = (string.IsNullOrEmpty(value) ? "UNKNOWN NAME" : value); } }
public string Description { get { return (mDescription == "$" ? "" : ParserIfc.Decode(mDescription)); } set { mDescription = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Description { get { return mDescription; } set { mDescription = value; } }
public string Category { get { return (mCategory == "$" ? "" : ParserIfc.Decode(mCategory)); } set { mCategory = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Category { get { return mCategory; } set { mCategory = value; } }
public IfcMaterialDefinitionRepresentation HasRepresentation { get { return mHasRepresentation; } set { mHasRepresentation = value; if (value != null && value.RepresentedMaterial != this) value.RepresentedMaterial = this; } } public IfcMaterialDefinitionRepresentation HasRepresentation { get { return mHasRepresentation; } set { mHasRepresentation = value; if (value != null && value.RepresentedMaterial != this) value.RepresentedMaterial = this; } }
public override IfcMaterial PrimaryMaterial() { return this; } public override IfcMaterial PrimaryMaterial() { return this; }
@ -157,7 +157,7 @@ namespace GeometryGym.Ifc
{ {
get get
{ {
if (mCategory != "$") if (!string.IsNullOrEmpty(mCategory))
{ {
string cat = mCategory.ToUpper(); string cat = mCategory.ToUpper();
if (cat.Contains("STEEL")) if (cat.Contains("STEEL"))
@ -189,17 +189,17 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public partial class IfcMaterialConstituent : IfcMaterialDefinition //IFC4 public partial class IfcMaterialConstituent : IfcMaterialDefinition //IFC4
{ {
internal string mName = "$";// : OPTIONAL IfcLabel; internal string mName = "";// : OPTIONAL IfcLabel;
internal string mDescription = "$";// : OPTIONAL IfcText internal string mDescription = "";// : OPTIONAL IfcText
internal int mMaterial;// : IfcMaterial; internal int mMaterial;// : IfcMaterial;
internal double mFraction;// : OPTIONAL IfcNormalisedRatioMeasure; internal double mFraction;// : OPTIONAL IfcNormalisedRatioMeasure;
internal string mCategory = "$";// : OPTIONAL IfcLabel; internal string mCategory = "";// : OPTIONAL IfcLabel;
public override string Name { get { return (mName == "$" ? "" : ParserIfc.Decode(mName)); } set { mName = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public override string Name { get { return mName; } set { mName = value; } }
public string Description { get { return (mDescription == "$" ? "" : ParserIfc.Decode(mDescription)); } set { mDescription = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Description { get { return mDescription; } set { mDescription = value; } }
public IfcMaterial Material { get { return mDatabase[mMaterial] as IfcMaterial; } set { mMaterial = (value == null ? 0 : value.mIndex); } } public IfcMaterial Material { get { return mDatabase[mMaterial] as IfcMaterial; } set { mMaterial = (value == null ? 0 : value.mIndex); } }
public double Fraction { get { return mFraction; } set { mFraction = value; } } public double Fraction { get { return mFraction; } set { mFraction = value; } }
public string Category { get { return (mCategory == "$" ? "" : ParserIfc.Decode(mCategory)); } set { mCategory = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Category { get { return mCategory; } set { mCategory = value; } }
public override IfcMaterial PrimaryMaterial() { return Material; } public override IfcMaterial PrimaryMaterial() { return Material; }
@ -215,12 +215,12 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public partial class IfcMaterialConstituentSet : IfcMaterialDefinition public partial class IfcMaterialConstituentSet : IfcMaterialDefinition
{ {
internal string mName = "$";// : OPTIONAL IfcLabel; internal string mName = "";// : OPTIONAL IfcLabel;
internal string mDescription = "$";// : OPTIONAL IfcText internal string mDescription = "";// : OPTIONAL IfcText
internal Dictionary<string, IfcMaterialConstituent> mMaterialConstituents = new Dictionary<string, IfcMaterialConstituent>();// LIST [1:?] OF IfcMaterialConstituent; internal Dictionary<string, IfcMaterialConstituent> mMaterialConstituents = new Dictionary<string, IfcMaterialConstituent>();// LIST [1:?] OF IfcMaterialConstituent;
public override string Name { get { return (mName == "$" ? "" : ParserIfc.Decode(mName)); } set { mName = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public override string Name { get { return mName; } set { mName = value; } }
public string Description { get { return (mDescription == "$" ? "" : ParserIfc.Decode(mDescription)); } set { mDescription = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Description { get { return mDescription; } set { mDescription = value; } }
public Dictionary<string, IfcMaterialConstituent> MaterialConstituents { get { return mMaterialConstituents; } } public Dictionary<string, IfcMaterialConstituent> MaterialConstituents { get { return mMaterialConstituents; } }
public override IfcMaterial PrimaryMaterial() { return MaterialConstituents.First().Value.PrimaryMaterial(); } public override IfcMaterial PrimaryMaterial() { return MaterialConstituents.First().Value.PrimaryMaterial(); }
@ -349,17 +349,17 @@ namespace GeometryGym.Ifc
internal int mMaterial;// : OPTIONAL IfcMaterial; internal int mMaterial;// : OPTIONAL IfcMaterial;
internal double mLayerThickness;// :: IfcNonNegativeLengthMeasure IFC4Chagne IfcPositiveLengthMeasure; internal double mLayerThickness;// :: IfcNonNegativeLengthMeasure IFC4Chagne IfcPositiveLengthMeasure;
internal IfcLogicalEnum mIsVentilated = IfcLogicalEnum.FALSE; // : OPTIONAL IfcLogical; internal IfcLogicalEnum mIsVentilated = IfcLogicalEnum.FALSE; // : OPTIONAL IfcLogical;
internal string mName = "$";// : OPTIONAL IfcLabel; IFC4 internal string mName = "";// : OPTIONAL IfcLabel; IFC4
internal string mDescription = "$";// : OPTIONAL IfcText; IFC4 internal string mDescription = "";// : OPTIONAL IfcText; IFC4
internal string mCategory = "$";// : OPTIONAL IfcLabel; IFC4 internal string mCategory = "";// : OPTIONAL IfcLabel; IFC4
internal double mPriority = double.NaN;// : OPTIONAL IfcNormalisedRatioMeasure; internal double mPriority = double.NaN;// : OPTIONAL IfcNormalisedRatioMeasure;
public IfcMaterial Material { get { return mDatabase[mMaterial] as IfcMaterial; } set { mMaterial = (value == null ? 0 : value.mIndex); } } public IfcMaterial Material { get { return mDatabase[mMaterial] as IfcMaterial; } set { mMaterial = (value == null ? 0 : value.mIndex); } }
public double LayerThickness { get { return mLayerThickness; } set { mLayerThickness = value; } } public double LayerThickness { get { return mLayerThickness; } set { mLayerThickness = value; } }
public IfcLogicalEnum IsVentilated { get { return mIsVentilated; } set { mIsVentilated = value; } } public IfcLogicalEnum IsVentilated { get { return mIsVentilated; } set { mIsVentilated = value; } }
public override string Name { get { return (mName == "$" ? "" : ParserIfc.Decode(mName)); } set { mName = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public override string Name { get { return mName; } set { mName = value; } }
public string Description { get { return (mDescription == "$" ? "" : ParserIfc.Decode(mDescription)); } set { mDescription = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Description { get { return mDescription; } set { mDescription = value; } }
public string Category { get { return (mCategory == "$" ? "" : ParserIfc.Decode(mCategory)); } set { mCategory = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Category { get { return mCategory; } set { mCategory = value; } }
public double Priority { get { return mPriority; } set { mPriority = value; } } public double Priority { get { return mPriority; } set { mPriority = value; } }
public override IfcMaterial PrimaryMaterial() { return Material; } public override IfcMaterial PrimaryMaterial() { return Material; }
@ -378,12 +378,12 @@ namespace GeometryGym.Ifc
public partial class IfcMaterialLayerSet : IfcMaterialDefinition public partial class IfcMaterialLayerSet : IfcMaterialDefinition
{ {
private LIST<IfcMaterialLayer> mMaterialLayers = new LIST<IfcMaterialLayer>();// LIST [1:?] OF IfcMaterialLayer; private LIST<IfcMaterialLayer> mMaterialLayers = new LIST<IfcMaterialLayer>();// LIST [1:?] OF IfcMaterialLayer;
private string mLayerSetName = "$";// : OPTIONAL IfcLabel; private string mLayerSetName = "";// : OPTIONAL IfcLabel;
private string mDescription = "$";// : OPTIONAL IfcText private string mDescription = "";// : OPTIONAL IfcText
public LIST<IfcMaterialLayer> MaterialLayers { get { return mMaterialLayers; } } public LIST<IfcMaterialLayer> MaterialLayers { get { return mMaterialLayers; } }
public string LayerSetName { get { return (mLayerSetName == "$" ? "" : ParserIfc.Decode(mLayerSetName)); } set { mLayerSetName = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string LayerSetName { get { return mLayerSetName; } set { mLayerSetName = value; } }
public string Description { get { return (mDescription == "$" ? "" : ParserIfc.Decode(mDescription)); } set { mDescription = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Description { get { return mDescription; } set { mDescription = value; } }
public override string Name { get { return LayerSetName; } set { LayerSetName = value; } } public override string Name { get { return LayerSetName; } set { LayerSetName = value; } }
public override IfcMaterial PrimaryMaterial() { return (mMaterialLayers.Count != 1 ? null : MaterialLayers[0].Material); } public override IfcMaterial PrimaryMaterial() { return (mMaterialLayers.Count != 1 ? null : MaterialLayers[0].Material); }
@ -517,20 +517,20 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public partial class IfcMaterialProfile : IfcMaterialDefinition // IFC4 public partial class IfcMaterialProfile : IfcMaterialDefinition // IFC4
{ {
internal string mName = "$";// : OPTIONAL IfcLabel; internal string mName = "";// : OPTIONAL IfcLabel;
internal string mDescription = "$";// : OPTIONAL IfcText; internal string mDescription = "";// : OPTIONAL IfcText;
internal IfcMaterial mMaterial = null;// : OPTIONAL IfcMaterial; internal IfcMaterial mMaterial = null;// : OPTIONAL IfcMaterial;
internal IfcProfileDef mProfile = null;// : OPTIONAL IfcProfileDef; internal IfcProfileDef mProfile = null;// : OPTIONAL IfcProfileDef;
internal int mPriority = int.MaxValue;// : OPTIONAL IfcInteger [0..100] was IfcNormalisedRatioMeasure internal int mPriority = int.MaxValue;// : OPTIONAL IfcInteger [0..100] was IfcNormalisedRatioMeasure
internal string mCategory = "$";// : OPTIONAL IfcLabel internal string mCategory = "";// : OPTIONAL IfcLabel
// INVERSE // INVERSE
private IfcMaterialProfileSet mToMaterialProfileSet = null;// : IfcMaterialProfileSet FOR private IfcMaterialProfileSet mToMaterialProfileSet = null;// : IfcMaterialProfileSet FOR
public override string Name { get { return (mName == "$" ? "" : ParserIfc.Decode(mName)); } set { mName = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public override string Name { get { return mName; } set { mName = value; } }
public string Description { get { return (mDescription == "$" ? "" : ParserIfc.Decode(mDescription)); } set { mDescription = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Description { get { return mDescription; } set { mDescription = value; } }
public IfcMaterial Material { get { return mMaterial; } set { mMaterial = value; } } public IfcMaterial Material { get { return mMaterial; } set { mMaterial = value; } }
public IfcProfileDef Profile { get { return mProfile; } set { mProfile = value; } } public IfcProfileDef Profile { get { return mProfile; } set { mProfile = value; } }
public string Category { get { return (mCategory == "$" ? "" : ParserIfc.Decode(mCategory)); } set { mCategory = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Category { get { return mCategory; } set { mCategory = value; } }
public int Priority { get { return mPriority; } set { mPriority = (value >= 0 && value <= 100 ? value : int.MaxValue); } } public int Priority { get { return mPriority; } set { mPriority = (value >= 0 && value <= 100 ? value : int.MaxValue); } }
public IfcMaterialProfileSet ToMaterialProfileSet { get { return mToMaterialProfileSet; } set { mToMaterialProfileSet = value; } } public IfcMaterialProfileSet ToMaterialProfileSet { get { return mToMaterialProfileSet; } set { mToMaterialProfileSet = value; } }
@ -559,14 +559,14 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public partial class IfcMaterialProfileSet : IfcMaterialDefinition //IFC4 public partial class IfcMaterialProfileSet : IfcMaterialDefinition //IFC4
{ {
internal string mName = "$"; //: OPTIONAL IfcLabel; internal string mName = ""; //: OPTIONAL IfcLabel;
internal string mDescription = "$"; //: OPTIONAL IfcText; internal string mDescription = ""; //: OPTIONAL IfcText;
internal LIST<IfcMaterialProfile> mMaterialProfiles = new LIST<IfcMaterialProfile>();// LIST [1:?] OF IfcMaterialProfile; internal LIST<IfcMaterialProfile> mMaterialProfiles = new LIST<IfcMaterialProfile>();// LIST [1:?] OF IfcMaterialProfile;
internal IfcCompositeProfileDef mCompositeProfile = null;// : OPTIONAL IfcCompositeProfileDef; internal IfcCompositeProfileDef mCompositeProfile = null;// : OPTIONAL IfcCompositeProfileDef;
public override string Name { get { return (mName == "$" ? "" : ParserIfc.Decode(mName)); } set { mName = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public override string Name { get { return mName; } set { mName = value; } }
public string Description { get { return (mDescription == "$" ? "" : ParserIfc.Decode(mDescription)); } set { mDescription = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Description { get { return mDescription; } set { mDescription = value; } }
public LIST<IfcMaterialProfile> MaterialProfiles { get { return mMaterialProfiles; } set { mMaterialProfiles.Clear(); if(value != null) mMaterialProfiles = value; } } public LIST<IfcMaterialProfile> MaterialProfiles { get { return mMaterialProfiles; } }
public IfcCompositeProfileDef CompositeProfile { get { return mCompositeProfile; } set { mCompositeProfile = value; } } public IfcCompositeProfileDef CompositeProfile { get { return mCompositeProfile; } set { mCompositeProfile = value; } }
public override IfcMaterial PrimaryMaterial() { return (mMaterialProfiles.Count != 1 ? null : MaterialProfiles[0].Material); } public override IfcMaterial PrimaryMaterial() { return (mMaterialProfiles.Count != 1 ? null : MaterialProfiles[0].Material); }
@ -780,9 +780,9 @@ namespace GeometryGym.Ifc
{ {
internal double mCompressiveStrength = double.NaN;// : OPTIONAL IfcPressureMeasure; internal double mCompressiveStrength = double.NaN;// : OPTIONAL IfcPressureMeasure;
internal double mMaxAggregateSize = double.NaN;// : OPTIONAL IfcPositiveLengthMeasure; internal double mMaxAggregateSize = double.NaN;// : OPTIONAL IfcPositiveLengthMeasure;
internal string mAdmixturesDescription = "$", mWorkability = "$";// : OPTIONAL IfcText internal string mAdmixturesDescription = "", mWorkability = "";// : OPTIONAL IfcText
internal double mProtectivePoreRatio = double.NaN;// : OPTIONAL IfcNormalisedRatioMeasure; internal double mProtectivePoreRatio = double.NaN;// : OPTIONAL IfcNormalisedRatioMeasure;
internal string mWaterImpermeability = "$";// : OPTIONAL IfcText; internal string mWaterImpermeability = "";// : OPTIONAL IfcText;
internal IfcMechanicalConcreteMaterialProperties() : base() { } internal IfcMechanicalConcreteMaterialProperties() : base() { }
internal IfcMechanicalConcreteMaterialProperties(DatabaseIfc db, IfcMechanicalConcreteMaterialProperties p, DuplicateOptions options) : base(db, p, options) internal IfcMechanicalConcreteMaterialProperties(DatabaseIfc db, IfcMechanicalConcreteMaterialProperties p, DuplicateOptions options) : base(db, p, options)
{ {
@ -947,13 +947,13 @@ namespace GeometryGym.Ifc
public partial class IfcMetric : IfcConstraint public partial class IfcMetric : IfcConstraint
{ {
internal IfcBenchmarkEnum mBenchMark = IfcBenchmarkEnum.EQUALTO;// : IfcBenchmarkEnum internal IfcBenchmarkEnum mBenchMark = IfcBenchmarkEnum.EQUALTO;// : IfcBenchmarkEnum
internal string mValueSource = "$"; // : OPTIONAL IfcLabel; internal string mValueSource = ""; // : OPTIONAL IfcLabel;
private int mDataValue = 0;// : OPTIONAL IfcMetricValueSelect; private int mDataValue = 0;// : OPTIONAL IfcMetricValueSelect;
private IfcValue mDataValueValue = null; private IfcValue mDataValueValue = null;
private int mReferencePath;// : OPTIONAL IfcReference; private int mReferencePath;// : OPTIONAL IfcReference;
public IfcBenchmarkEnum BenchMark { get { return mBenchMark; } set { mBenchMark = value; } } public IfcBenchmarkEnum BenchMark { get { return mBenchMark; } set { mBenchMark = value; } }
public string ValueSource { get { return (mValueSource == "$" ? "" : ParserIfc.Decode(mValueSource)); } set { mValueSource = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string ValueSource { get { return mValueSource; } set { mValueSource = value; } }
public IfcMetricValueSelect DataValue public IfcMetricValueSelect DataValue
{ {
get get

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

@ -671,56 +671,61 @@ namespace GeometryGym.Ifc
return (!strict && mDecomposes != null ? mDecomposes.RelatingObject.FindStructAnalysisModel(false) : null); return (!strict && mDecomposes != null ? mDecomposes.RelatingObject.FindStructAnalysisModel(false) : null);
} }
internal override bool isDuplicate(BaseClassIfc e, double tol) internal override sealed bool isDuplicate(BaseClassIfc e, double tol)
{
return isDuplicate(e, false, tol);
}
internal virtual bool isDuplicate(BaseClassIfc e, bool includeAggregated, double tol)
{ {
IfcObjectDefinition objDef = e as IfcObjectDefinition; IfcObjectDefinition objDef = e as IfcObjectDefinition;
if (objDef == null) if (objDef == null)
return false; return false;
if (base.isDuplicate(e, tol)) if (base.isDuplicate(e, tol))
{ {
if (objDef.mIsDecomposedBy.Count != mIsDecomposedBy.Count) if (includeAggregated)
return false;
SET<IfcRelAggregates> rags = IsDecomposedBy, dupRags = objDef.IsDecomposedBy;
IEnumerable<IfcObjectDefinition> objDefs = rags.SelectMany(x => x.RelatedObjects), dupObjDefs = dupRags.SelectMany(x => x.RelatedObjects);
Dictionary<string, IfcObjectDefinition> dictObjDefs = dupObjDefs.ToDictionary(x => x.GlobalId, x => x);
foreach (IfcObjectDefinition od in objDefs)
{ {
if (!dictObjDefs.ContainsKey(od.GlobalId)) IEnumerable<IfcObjectDefinition> objDefs = IsDecomposedBy.SelectMany(x => x.RelatedObjects);
return false; IEnumerable<IfcObjectDefinition> dupObjDefs = objDef.IsDecomposedBy.SelectMany(x => x.RelatedObjects);
IfcObjectDefinition dup = dictObjDefs[od.GlobalId]; Dictionary<string, IfcObjectDefinition> dictObjDefs = dupObjDefs.ToDictionary(x => x.GlobalId, x => x);
if (!od.isDuplicate(dup, tol))
return false;
}
if (objDef.mIsNestedBy.Count != mIsNestedBy.Count) foreach (IfcObjectDefinition od in objDefs)
return false;
List<IfcRelNests> nestedBy = objDef.mIsNestedBy.ToList();
foreach (IfcRelNests relNests in mIsNestedBy)
{
IfcObjectDefinition firstRelated = relNests.RelatedObjects.First();
IfcRelNests testDuplicate = null;
foreach (IfcRelNests nests in nestedBy)
{ {
IfcObjectDefinition firstOther = nests.RelatedObjects.First(); if (!dictObjDefs.ContainsKey(od.GlobalId))
if (firstOther.isDuplicate(firstRelated, tol))
{
testDuplicate = nests;
break;
}
}
if (testDuplicate == null)
return false;
nestedBy.Remove(testDuplicate);
int count = testDuplicate.RelatedObjects.Count;
for (int icounter = 1; icounter < count; icounter++)
{
IfcObjectDefinition od1 = relNests.RelatedObjects[icounter];
IfcObjectDefinition od2 = testDuplicate.RelatedObjects[icounter];
if (!od1.isDuplicate(od2, tol))
return false; return false;
IfcObjectDefinition dup = dictObjDefs[od.GlobalId];
if (!od.isDuplicate(dup, tol))
return false;
}
if (objDef.mIsNestedBy.Count != mIsNestedBy.Count)
return false;
List<IfcRelNests> nestedBy = objDef.mIsNestedBy.ToList();
foreach (IfcRelNests relNests in mIsNestedBy)
{
IfcObjectDefinition firstRelated = relNests.RelatedObjects.First();
IfcRelNests testDuplicate = null;
foreach (IfcRelNests nests in nestedBy)
{
IfcObjectDefinition firstOther = nests.RelatedObjects.First();
if (firstOther.isDuplicate(firstRelated, tol))
{
testDuplicate = nests;
break;
}
}
if (testDuplicate == null)
return false;
nestedBy.Remove(testDuplicate);
int count = testDuplicate.RelatedObjects.Count;
for (int icounter = 1; icounter < count; icounter++)
{
IfcObjectDefinition od1 = relNests.RelatedObjects[icounter];
IfcObjectDefinition od2 = testDuplicate.RelatedObjects[icounter];
if (!od1.isDuplicate(od2, tol))
return false;
}
} }
} }
return true; return true;
@ -787,12 +792,12 @@ namespace GeometryGym.Ifc
internal LIST<IfcConstraint> mBenchmarkValues = new LIST<IfcConstraint>();// : OPTIONAL LIST [1:?] OF IfcConstraint; internal LIST<IfcConstraint> mBenchmarkValues = new LIST<IfcConstraint>();// : OPTIONAL LIST [1:?] OF IfcConstraint;
internal IfcLogicalOperatorEnum mLogicalAggregator = IfcLogicalOperatorEnum.NONE;// : OPTIONAL IfcLogicalOperatorEnum; internal IfcLogicalOperatorEnum mLogicalAggregator = IfcLogicalOperatorEnum.NONE;// : OPTIONAL IfcLogicalOperatorEnum;
internal IfcObjectiveEnum mObjectiveQualifier = IfcObjectiveEnum.NOTDEFINED;// : IfcObjectiveEnum internal IfcObjectiveEnum mObjectiveQualifier = IfcObjectiveEnum.NOTDEFINED;// : IfcObjectiveEnum
internal string mUserDefinedQualifier = "$"; // : OPTIONAL IfcLabel; internal string mUserDefinedQualifier = ""; // : OPTIONAL IfcLabel;
public LIST<IfcConstraint> BenchmarkValues { get { return mBenchmarkValues; } } public LIST<IfcConstraint> BenchmarkValues { get { return mBenchmarkValues; } }
public IfcLogicalOperatorEnum LogicalAggregator { get { return mLogicalAggregator; } set { mLogicalAggregator = value; } } public IfcLogicalOperatorEnum LogicalAggregator { get { return mLogicalAggregator; } set { mLogicalAggregator = value; } }
public IfcObjectiveEnum ObjectiveQualifier { get { return mObjectiveQualifier; } set { mObjectiveQualifier = value; } } public IfcObjectiveEnum ObjectiveQualifier { get { return mObjectiveQualifier; } set { mObjectiveQualifier = value; } }
public string UserDefinedQualifier { get { return (mUserDefinedQualifier == "$" ? "" : ParserIfc.Decode(mUserDefinedQualifier)); } set { mUserDefinedQualifier = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string UserDefinedQualifier { get { return mUserDefinedQualifier; } set { mUserDefinedQualifier = value; } }
internal IfcObjective() : base() { } internal IfcObjective() : base() { }
internal IfcObjective(DatabaseIfc db, IfcObjective o) : base(db,o) internal IfcObjective(DatabaseIfc db, IfcObjective o) : base(db,o)
@ -980,22 +985,22 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public partial class IfcOrganization : BaseClassIfc, IfcActorSelect, IfcObjectReferenceSelect, IfcResourceObjectSelect, NamedObjectIfc public partial class IfcOrganization : BaseClassIfc, IfcActorSelect, IfcObjectReferenceSelect, IfcResourceObjectSelect, NamedObjectIfc
{ {
internal string mIdentification = "$";// : OPTIONAL IfcIdentifier; internal string mIdentification = "";// : OPTIONAL IfcIdentifier;
private string mName = "";// : IfcLabel; private string mName = "";// : IfcLabel;
private string mDescription = "$";// : OPTIONAL IfcText; private string mDescription = "";// : OPTIONAL IfcText;
private LIST<IfcActorRole> mRoles = new LIST<IfcActorRole>();// : OPTIONAL LIST [1:?] OF IfcActorRole; private LIST<IfcActorRole> mRoles = new LIST<IfcActorRole>();// : OPTIONAL LIST [1:?] OF IfcActorRole;
private LIST<IfcAddress> mAddresses = new LIST<IfcAddress>();//: OPTIONAL LIST [1:?] OF IfcAddress; private LIST<IfcAddress> mAddresses = new LIST<IfcAddress>();//: OPTIONAL LIST [1:?] OF IfcAddress;
//INVERSE //INVERSE
private SET<IfcExternalReferenceRelationship> mHasExternalReference = new SET<IfcExternalReferenceRelationship>(); //IFC4 SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects; private SET<IfcExternalReferenceRelationship> mHasExternalReference = new SET<IfcExternalReferenceRelationship>(); //IFC4 SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects;
internal SET<IfcResourceConstraintRelationship> mHasConstraintRelationships = new SET<IfcResourceConstraintRelationship>(); //gg internal SET<IfcResourceConstraintRelationship> mHasConstraintRelationships = new SET<IfcResourceConstraintRelationship>(); //gg
public string Identification { get { return (mIdentification == "$" ? "" : ParserIfc.Decode(mIdentification)); } set { mIdentification = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Identification { get { return mIdentification; } set { mIdentification = value; } }
public string Name public string Name
{ {
get { return ParserIfc.Decode(mName); } get { return mName; }
set { mName = (string.IsNullOrEmpty(value) ? "UNKNOWN" : ParserIfc.Encode(value)); } set { mName = (string.IsNullOrEmpty(value) ? "UNKNOWN" : value); }
} }
public string Description { get { return (mDescription == "$" ? "" : ParserIfc.Decode(mDescription)); } set { mDescription = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Description { get { return mDescription; } set { mDescription = value; } }
public LIST<IfcActorRole> Roles { get { return mRoles; } } public LIST<IfcActorRole> Roles { get { return mRoles; } }
public LIST<IfcAddress> Addresses { get { return mAddresses; } } public LIST<IfcAddress> Addresses { get { return mAddresses; } }
public SET<IfcExternalReferenceRelationship> HasExternalReference { get { return mHasExternalReference; } } public SET<IfcExternalReferenceRelationship> HasExternalReference { get { return mHasExternalReference; } }
@ -1035,7 +1040,7 @@ namespace GeometryGym.Ifc
Roles.AddRange(o.Roles.Select(x => db.Factory.Duplicate(x) as IfcActorRole)); Roles.AddRange(o.Roles.Select(x => db.Factory.Duplicate(x) as IfcActorRole));
Addresses.AddRange(o.Addresses.Select(x => db.Factory.Duplicate(x) as IfcAddress)); Addresses.AddRange(o.Addresses.Select(x => db.Factory.Duplicate(x) as IfcAddress));
} }
public IfcOrganization(DatabaseIfc m, string name) : base(m) { Name = name; } public IfcOrganization(DatabaseIfc db, string name) : base(db) { Name = name; }
protected override void initialize() protected override void initialize()
{ {
base.initialize(); base.initialize();
@ -1188,10 +1193,10 @@ namespace GeometryGym.Ifc
private IfcApplication mOwningApplication = null;// : IfcApplication; private IfcApplication mOwningApplication = null;// : IfcApplication;
private IfcStateEnum mState = IfcStateEnum.NOTDEFINED;// : OPTIONAL IfcStateEnum; private IfcStateEnum mState = IfcStateEnum.NOTDEFINED;// : OPTIONAL IfcStateEnum;
private IfcChangeActionEnum mChangeAction;// : IfcChangeActionEnum; private IfcChangeActionEnum mChangeAction;// : IfcChangeActionEnum;
private int mLastModifiedDate = int.MinValue;// : OPTIONAL IfcTimeStamp; internal int mLastModifiedDate = int.MinValue;// : OPTIONAL IfcTimeStamp;
private IfcPersonAndOrganization mLastModifyingUser;// : OPTIONAL IfcPersonAndOrganization; private IfcPersonAndOrganization mLastModifyingUser;// : OPTIONAL IfcPersonAndOrganization;
private IfcApplication mLastModifyingApplication;// : OPTIONAL IfcApplication; private IfcApplication mLastModifyingApplication;// : OPTIONAL IfcApplication;
private int mCreationDate = 0;// : IfcTimeStamp; internal int mCreationDate = 0;// : IfcTimeStamp;
public IfcPersonAndOrganization OwningUser { get { return mOwningUser; } set { mOwningUser = value; } } public IfcPersonAndOrganization OwningUser { get { return mOwningUser; } set { mOwningUser = value; } }
public IfcApplication OwningApplication { get { return mOwningApplication; } set { mOwningApplication = value; } } public IfcApplication OwningApplication { get { return mOwningApplication; } set { mOwningApplication = value; } }
@ -1225,7 +1230,7 @@ namespace GeometryGym.Ifc
OwningUser = owningUser; OwningUser = owningUser;
OwningApplication = owningApplication; OwningApplication = owningApplication;
mChangeAction = action; mChangeAction = action;
CreationDate = DateTime.Now; CreationDate = DateTime.UtcNow;
if (action != IfcChangeActionEnum.NOCHANGE && action != IfcChangeActionEnum.NOTDEFINED) if (action != IfcChangeActionEnum.NOCHANGE && action != IfcChangeActionEnum.NOTDEFINED)
LastModifiedDate = CreationDate; LastModifiedDate = CreationDate;
} }

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

@ -154,8 +154,8 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public partial class IfcPerson : BaseClassIfc, IfcActorSelect, IfcObjectReferenceSelect, IfcResourceObjectSelect, NamedObjectIfc public partial class IfcPerson : BaseClassIfc, IfcActorSelect, IfcObjectReferenceSelect, IfcResourceObjectSelect, NamedObjectIfc
{ {
private string mIdentification = "$";// : OPTIONAL IfcIdentifier; private string mIdentification = "";// : OPTIONAL IfcIdentifier;
private string mFamilyName = "$", mGivenName = "$";// : OPTIONAL IfcLabel; private string mFamilyName = "", mGivenName = "";// : OPTIONAL IfcLabel;
private List<string> mMiddleNames = new List<string>(), mPrefixTitles = new List<string>(), mSuffixTitles = new List<string>();// : OPTIONAL LIST [1:?] OF IfcLabel; private List<string> mMiddleNames = new List<string>(), mPrefixTitles = new List<string>(), mSuffixTitles = new List<string>();// : OPTIONAL LIST [1:?] OF IfcLabel;
private LIST<IfcActorRole> mRoles = new LIST<IfcActorRole>();// : OPTIONAL LIST [1:?] OF IfcActorRole; private LIST<IfcActorRole> mRoles = new LIST<IfcActorRole>();// : OPTIONAL LIST [1:?] OF IfcActorRole;
private LIST<IfcAddress> mAddresses = new LIST<IfcAddress>();//: OPTIONAL LIST [1:?] OF IfcAddress; private LIST<IfcAddress> mAddresses = new LIST<IfcAddress>();//: OPTIONAL LIST [1:?] OF IfcAddress;
@ -163,12 +163,12 @@ namespace GeometryGym.Ifc
private SET<IfcExternalReferenceRelationship> mHasExternalReference = new SET<IfcExternalReferenceRelationship>(); //IFC4 SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects; private SET<IfcExternalReferenceRelationship> mHasExternalReference = new SET<IfcExternalReferenceRelationship>(); //IFC4 SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects;
internal SET<IfcResourceConstraintRelationship> mHasConstraintRelationships = new SET<IfcResourceConstraintRelationship>(); //gg internal SET<IfcResourceConstraintRelationship> mHasConstraintRelationships = new SET<IfcResourceConstraintRelationship>(); //gg
public string Identification { get { return (mIdentification == "$" ? "" : ParserIfc.Decode(mIdentification)); } set { mIdentification = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Identification { get { return mIdentification; } set { mIdentification = value; } }
public string FamilyName { get { return (mFamilyName == "$" ? "" : ParserIfc.Decode(mFamilyName)); } set { mFamilyName = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string FamilyName { get { return mFamilyName; } set { mFamilyName = value; } }
public string GivenName { get { return (mGivenName == "$" ? "" : ParserIfc.Decode(mGivenName)); } set { mGivenName = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string GivenName { get { return mGivenName; } set { mGivenName = value; } }
public ReadOnlyCollection<string> MiddleNames { get { return new ReadOnlyCollection<string>(mMiddleNames.ConvertAll(x => ParserIfc.Decode(x))); } } public List<string> MiddleNames { get { return mMiddleNames; } }
public ReadOnlyCollection<string> PrefixTitles { get { return new ReadOnlyCollection<string>(mPrefixTitles.ConvertAll(x => ParserIfc.Decode(x))); } } public List<string> PrefixTitles { get { return mPrefixTitles; } }
public ReadOnlyCollection<string> SuffixTitles { get { return new ReadOnlyCollection<string>(mSuffixTitles.ConvertAll(x => ParserIfc.Decode(x))); } } public List<string> SuffixTitles { get { return mSuffixTitles; } }
public LIST<IfcActorRole> Roles { get { return mRoles; } } public LIST<IfcActorRole> Roles { get { return mRoles; } }
public LIST<IfcAddress> Addresses { get { return mAddresses; } } public LIST<IfcAddress> Addresses { get { return mAddresses; } }
public SET<IfcExternalReferenceRelationship> HasExternalReference { get { return mHasExternalReference; } } public SET<IfcExternalReferenceRelationship> HasExternalReference { get { return mHasExternalReference; } }
@ -305,7 +305,7 @@ namespace GeometryGym.Ifc
public abstract partial class IfcPhysicalQuantity : BaseClassIfc, IfcResourceObjectSelect, NamedObjectIfc //ABSTRACT SUPERTYPE OF(ONEOF(IfcPhysicalComplexQuantity, IfcPhysicalSimpleQuantity)); public abstract partial class IfcPhysicalQuantity : BaseClassIfc, IfcResourceObjectSelect, NamedObjectIfc //ABSTRACT SUPERTYPE OF(ONEOF(IfcPhysicalComplexQuantity, IfcPhysicalSimpleQuantity));
{ {
internal string mName = "NoName";// : IfcLabel; internal string mName = "NoName";// : IfcLabel;
internal string mDescription = "$"; // : OPTIONAL IfcText; internal string mDescription = ""; // : OPTIONAL IfcText;
//INVERSE //INVERSE
private SET<IfcExternalReferenceRelationship> mHasExternalReference = new SET<IfcExternalReferenceRelationship>(); //IFC4 SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects; private SET<IfcExternalReferenceRelationship> mHasExternalReference = new SET<IfcExternalReferenceRelationship>(); //IFC4 SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects;
//PartOfComplex : SET[0:1] OF IfcPhysicalComplexQuantity FOR HasQuantities; //PartOfComplex : SET[0:1] OF IfcPhysicalComplexQuantity FOR HasQuantities;
@ -313,10 +313,10 @@ namespace GeometryGym.Ifc
public string Name public string Name
{ {
get { return ParserIfc.Decode(mName); } get { return mName; }
set { mName = (string.IsNullOrEmpty(value) ? "NoName" : ParserIfc.Encode(value)); } set { mName = (string.IsNullOrEmpty(value) ? "NoName" : value); }
} }
public string Description { get { return (mDescription == "$" ? "" : ParserIfc.Decode(mDescription)); } set { mDescription = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Description { get { return mDescription; } set { mDescription = value; } }
public SET<IfcExternalReferenceRelationship> HasExternalReference { get { return mHasExternalReference; } } public SET<IfcExternalReferenceRelationship> HasExternalReference { get { return mHasExternalReference; } }
public List<IfcResourceConstraintRelationship> HasConstraintRelationships { get { return mHasConstraintRelationships; } } public List<IfcResourceConstraintRelationship> HasConstraintRelationships { get { return mHasConstraintRelationships; } }
@ -756,21 +756,21 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public partial class IfcPostalAddress : IfcAddress public partial class IfcPostalAddress : IfcAddress
{ {
internal string mInternalLocation = "$";// : OPTIONAL IfcLabel; internal string mInternalLocation = "";// : OPTIONAL IfcLabel;
internal LIST<string> mAddressLines = new LIST<string>();// : OPTIONAL LIST [1:?] OF IfcLabel; internal List<string> mAddressLines = new List<string>();// : OPTIONAL LIST [1:?] OF IfcLabel;
internal string mPostalBox = "$";// :OPTIONAL IfcLabel; internal string mPostalBox = "";// :OPTIONAL IfcLabel;
internal string mTown = "$";// : OPTIONAL IfcLabel; internal string mTown = "";// : OPTIONAL IfcLabel;
internal string mRegion = "$";// : OPTIONAL IfcLabel; internal string mRegion = "";// : OPTIONAL IfcLabel;
internal string mPostalCode = "$";// : OPTIONAL IfcLabel; internal string mPostalCode = "";// : OPTIONAL IfcLabel;
internal string mCountry = "$";// : OPTIONAL IfcLabel; internal string mCountry = "";// : OPTIONAL IfcLabel;
public string InternalLocation { get { return (mInternalLocation == "$" ? "" : ParserIfc.Decode(mInternalLocation)); } set { mInternalLocation = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string InternalLocation { get { return mInternalLocation; } set { mInternalLocation = value; } }
public LIST<string> AddressLines { get { return mAddressLines; } set { mAddressLines = value; } } public List<string> AddressLines { get { return mAddressLines; } }
public string PostalBox { get { return (mPostalBox == "$" ? "" : ParserIfc.Decode(mPostalBox)); } set { mPostalBox = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string PostalBox { get { return mPostalBox; } set { mPostalBox = value; } }
public string Town { get { return (mTown == "$" ? "" : ParserIfc.Decode(mTown)); } set { mTown = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Town { get { return mTown; } set { mTown = value; } }
public string Region { get { return (mRegion == "$" ? "" : ParserIfc.Decode(mRegion)); } set { mRegion = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Region { get { return mRegion; } set { mRegion = value; } }
public string PostalCode { get { return (mPostalCode == "$" ? "" : ParserIfc.Decode(mPostalCode)); } set { mPostalCode = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string PostalCode { get { return mPostalCode; } set { mPostalCode = value; } }
public string Country { get { return (mCountry == "$" ? "" : ParserIfc.Decode(mCountry)); } set { mCountry = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Country { get { return mCountry; } set { mCountry = value; } }
internal IfcPostalAddress() : base() { } internal IfcPostalAddress() : base() { }
public IfcPostalAddress(DatabaseIfc db) : base(db) { } public IfcPostalAddress(DatabaseIfc db) : base(db) { }
@ -822,7 +822,7 @@ namespace GeometryGym.Ifc
public abstract partial class IfcPreDefinedItem : IfcPresentationItem, NamedObjectIfc public abstract partial class IfcPreDefinedItem : IfcPresentationItem, NamedObjectIfc
{ {
internal string mName = "";//: IfcLabel; internal string mName = "";//: IfcLabel;
public string Name { get { return (mName == "$" ? "" : ParserIfc.Decode(mName)); } set { mName = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Name { get { return mName; } set { mName = value; } }
protected IfcPreDefinedItem() : base() { } protected IfcPreDefinedItem() : base() { }
protected IfcPreDefinedItem(DatabaseIfc db, IfcPreDefinedItem i) : base(db, i) { mName = i.mName; } protected IfcPreDefinedItem(DatabaseIfc db, IfcPreDefinedItem i) : base(db, i) { mName = i.mName; }
@ -878,15 +878,15 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public partial class IfcPresentationLayerAssignment : BaseClassIfc, NamedObjectIfc //SUPERTYPE OF (IfcPresentationLayerWithStyle); public partial class IfcPresentationLayerAssignment : BaseClassIfc, NamedObjectIfc //SUPERTYPE OF (IfcPresentationLayerWithStyle);
{ {
private string mName = "$";// : IfcLabel; private string mName = "";// : IfcLabel;
internal string mDescription = "$";// : OPTIONAL IfcText; internal string mDescription = "";// : OPTIONAL IfcText;
internal SET<IfcLayeredItem> mAssignedItems = new SET<IfcLayeredItem>();// : SET [1:?] OF IfcLayeredItem; internal SET<IfcLayeredItem> mAssignedItems = new SET<IfcLayeredItem>();// : SET [1:?] OF IfcLayeredItem;
internal string mIdentifier = "$";// : OPTIONAL IfcIdentifier; internal string mIdentifier = "";// : OPTIONAL IfcIdentifier;
public string Name { get { return (mName == "$" ? "" : ParserIfc.Decode(mName)); } set { mName = (string.IsNullOrEmpty(value) ? "Default Layer" : mName = ParserIfc.Encode(value)); } } public string Name { get { return mName; } set { mName = (string.IsNullOrEmpty(value) ? "Default Layer" : value); } }
public string Description { get { return (mDescription == "$" ? "" : ParserIfc.Decode(mDescription)); } set { mDescription = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Description { get { return mDescription; } set { mDescription = value; } }
public SET<IfcLayeredItem> AssignedItems { get { return mAssignedItems; } } public SET<IfcLayeredItem> AssignedItems { get { return mAssignedItems; } }
public string Identifier { get { return (mIdentifier == "$" ? "" : ParserIfc.Decode(mIdentifier)); } set { mIdentifier = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Identifier { get { return mIdentifier; } set { mIdentifier = value; } }
internal IfcPresentationLayerAssignment() : base() { } internal IfcPresentationLayerAssignment() : base() { }
internal IfcPresentationLayerAssignment(DatabaseIfc db, IfcPresentationLayerAssignment a, DuplicateOptions options) : base(db, a) internal IfcPresentationLayerAssignment(DatabaseIfc db, IfcPresentationLayerAssignment a, DuplicateOptions options) : base(db, a)
@ -995,11 +995,11 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public abstract partial class IfcPresentationStyle : BaseClassIfc, IfcStyleAssignmentSelect, NamedObjectIfc //ABSTRACT SUPERTYPE OF (ONEOF(IfcCurveStyle,IfcFillAreaStyle,IfcSurfaceStyle,IfcSymbolStyle,IfcTextStyle)); public abstract partial class IfcPresentationStyle : BaseClassIfc, IfcStyleAssignmentSelect, NamedObjectIfc //ABSTRACT SUPERTYPE OF (ONEOF(IfcCurveStyle,IfcFillAreaStyle,IfcSurfaceStyle,IfcSymbolStyle,IfcTextStyle));
{ {
private string mName = "$";// : OPTIONAL IfcLabel; private string mName = "";// : OPTIONAL IfcLabel;
//INVERSE //INVERSE
internal SET<IfcStyledItem> mStyledItems = new SET<IfcStyledItem>(); internal SET<IfcStyledItem> mStyledItems = new SET<IfcStyledItem>();
public string Name { get { return (mName == "$" ? "" : ParserIfc.Decode(mName)); } set { mName = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Name { get { return mName; } set { mName = value; } }
public SET<IfcStyledItem> StyledItems { get { return mStyledItems; } } public SET<IfcStyledItem> StyledItems { get { return mStyledItems; } }
protected IfcPresentationStyle() : base() { } protected IfcPresentationStyle() : base() { }
@ -1030,7 +1030,7 @@ namespace GeometryGym.Ifc
public partial class IfcProcedure : IfcProcess public partial class IfcProcedure : IfcProcess
{ {
internal IfcProcedureTypeEnum mPredefinedType;// : IfcProcedureTypeEnum; internal IfcProcedureTypeEnum mPredefinedType;// : IfcProcedureTypeEnum;
internal string mUserDefinedProcedureType = "$";// : OPTIONAL IfcLabel; internal string mUserDefinedProcedureType = "";// : OPTIONAL IfcLabel;
public IfcProcedureTypeEnum PredefinedType { get { return mPredefinedType; } set { mPredefinedType = value; } } public IfcProcedureTypeEnum PredefinedType { get { return mPredefinedType; } set { mPredefinedType = value; } }
@ -1357,12 +1357,12 @@ namespace GeometryGym.Ifc
} }
return null; return null;
} }
internal override bool isDuplicate(BaseClassIfc e, double tol) internal override bool isDuplicate(BaseClassIfc e, bool includeAggregated, double tol)
{ {
IfcProduct product = e as IfcProduct; IfcProduct product = e as IfcProduct;
if (e == null) if (e == null)
return false; return false;
if (base.isDuplicate(e, tol)) if (base.isDuplicate(e, includeAggregated, tol))
{ {
IfcObjectPlacement placement = ObjectPlacement, placement2 = product.ObjectPlacement; IfcObjectPlacement placement = ObjectPlacement, placement2 = product.ObjectPlacement;
if (placement != null) if (placement != null)
@ -1411,12 +1411,12 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public abstract partial class IfcProductRepresentation<Representation, RepresentationItem> : BaseClassIfc, NamedObjectIfc where Representation : IfcRepresentation<RepresentationItem> where RepresentationItem : IfcRepresentationItem //IFC4 Abstract (IfcMaterialDefinitionRepresentation ,IfcProductDefinitionShape)); //IFC4 Abstract public abstract partial class IfcProductRepresentation<Representation, RepresentationItem> : BaseClassIfc, NamedObjectIfc where Representation : IfcRepresentation<RepresentationItem> where RepresentationItem : IfcRepresentationItem //IFC4 Abstract (IfcMaterialDefinitionRepresentation ,IfcProductDefinitionShape)); //IFC4 Abstract
{ {
private string mName = "$";// : OPTIONAL IfcLabel; private string mName = "";// : OPTIONAL IfcLabel;
private string mDescription = "$";// : OPTIONAL IfcText; private string mDescription = "";// : OPTIONAL IfcText;
private LIST<Representation> mRepresentations = new LIST<Representation>();// : LIST [1:?] OF IfcRepresentation; private LIST<Representation> mRepresentations = new LIST<Representation>();// : LIST [1:?] OF IfcRepresentation;
public string Name { get { return (mName == "$" ? "" : ParserIfc.Decode(mName)); } set { mName = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Name { get { return mName; } set { mName = value; } }
public string Description { get { return (mDescription == "$" ? "" : ParserIfc.Decode(mDescription)); } set { mDescription = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Description { get { return mDescription; } set { mDescription = value; } }
public LIST<Representation> Representations public LIST<Representation> Representations
{ {
get { return mRepresentations; } get { return mRepresentations; }
@ -1487,7 +1487,7 @@ namespace GeometryGym.Ifc
public partial class IfcProfileDef : BaseClassIfc, IfcResourceObjectSelect, NamedObjectIfc // SUPERTYPE OF (ONEOF (IfcArbitraryClosedProfileDef ,IfcArbitraryOpenProfileDef public partial class IfcProfileDef : BaseClassIfc, IfcResourceObjectSelect, NamedObjectIfc // SUPERTYPE OF (ONEOF (IfcArbitraryClosedProfileDef ,IfcArbitraryOpenProfileDef
{ //,IfcCompositeProfileDef ,IfcDerivedProfileDef ,IfcParameterizedProfileDef)); IFC2x3 abstract { //,IfcCompositeProfileDef ,IfcDerivedProfileDef ,IfcParameterizedProfileDef)); IFC2x3 abstract
internal IfcProfileTypeEnum mProfileType = IfcProfileTypeEnum.AREA;// : IfcProfileTypeEnum; internal IfcProfileTypeEnum mProfileType = IfcProfileTypeEnum.AREA;// : IfcProfileTypeEnum;
private string mProfileName = "$";// : OPTIONAL IfcLabel; private string mProfileName = "";// : OPTIONAL IfcLabel;
//INVERSE //INVERSE
private SET<IfcExternalReferenceRelationship> mHasExternalReference = new SET<IfcExternalReferenceRelationship>(); //IFC4 SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects; private SET<IfcExternalReferenceRelationship> mHasExternalReference = new SET<IfcExternalReferenceRelationship>(); //IFC4 SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects;
internal SET<IfcProfileProperties> mHasProperties = new SET<IfcProfileProperties>(); internal SET<IfcProfileProperties> mHasProperties = new SET<IfcProfileProperties>();
@ -1495,7 +1495,7 @@ namespace GeometryGym.Ifc
internal List<IfcResourceConstraintRelationship> HasConstraintRelationships { get { return mHasConstraintRelationships; } } internal List<IfcResourceConstraintRelationship> HasConstraintRelationships { get { return mHasConstraintRelationships; } }
public IfcProfileTypeEnum ProfileType { get { return mProfileType; } set { mProfileType = value; } } public IfcProfileTypeEnum ProfileType { get { return mProfileType; } set { mProfileType = value; } }
public string ProfileName { get { return mProfileName == "$" ? "" : ParserIfc.Decode(mProfileName); } set { mProfileName = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string ProfileName { get { return mProfileName; } set { mProfileName = value; } }
public string Name { get { return ProfileName; } set { ProfileName = value; } } public string Name { get { return ProfileName; } set { ProfileName = value; } }
public SET<IfcExternalReferenceRelationship> HasExternalReference { get { return mHasExternalReference; } } public SET<IfcExternalReferenceRelationship> HasExternalReference { get { return mHasExternalReference; } }
public SET<IfcProfileProperties> HasProperties { get { return mHasProperties; } set { mHasProperties = value; } } public SET<IfcProfileProperties> HasProperties { get { return mHasProperties; } set { mHasProperties = value; } }
@ -1576,7 +1576,7 @@ namespace GeometryGym.Ifc
{ {
public override string StepClassName { get { return (mDatabase != null && mDatabase.Release < ReleaseVersion.IFC4 ? base.StepClassName : "IFCPROFILEPROPERTIES"); } } public override string StepClassName { get { return (mDatabase != null && mDatabase.Release < ReleaseVersion.IFC4 ? base.StepClassName : "IFCPROFILEPROPERTIES"); } }
//[Obsolete("DEPRECATED IFC4", false)] //[Obsolete("DEPRECATED IFC4", false)]
//internal string mProfileName = "$";// : OPTIONAL IfcLabel; DELETED IFC4 //internal string mProfileName = "";// : OPTIONAL IfcLabel; DELETED IFC4
private IfcProfileDef mProfileDefinition = null;// : OPTIONAL IfcProfileDef; private IfcProfileDef mProfileDefinition = null;// : OPTIONAL IfcProfileDef;
public IfcProfileDef ProfileDefinition public IfcProfileDef ProfileDefinition
{ {
@ -1709,8 +1709,8 @@ namespace GeometryGym.Ifc
{ {
//internal string mID;// : IfcIdentifier; IFC4 relocated //internal string mID;// : IfcIdentifier; IFC4 relocated
internal IfcProjectOrderTypeEnum mPredefinedType = IfcProjectOrderTypeEnum.NOTDEFINED;// : IfcProjectOrderTypeEnum; internal IfcProjectOrderTypeEnum mPredefinedType = IfcProjectOrderTypeEnum.NOTDEFINED;// : IfcProjectOrderTypeEnum;
internal string mStatus = "$";// : OPTIONAL IfcLabel; internal string mStatus = "";// : OPTIONAL IfcLabel;
internal string mLongDescription = "$"; // : OPTIONAL IfcText; internal string mLongDescription = ""; // : OPTIONAL IfcText;
internal IfcProjectOrder() : base() { } internal IfcProjectOrder() : base() { }
internal IfcProjectOrder(DatabaseIfc db, IfcProjectOrder o, DuplicateOptions options) : base(db, o, options) { mPredefinedType = o.mPredefinedType; mStatus = o.mStatus; mLongDescription = o.mLongDescription; } internal IfcProjectOrder(DatabaseIfc db, IfcProjectOrder o, DuplicateOptions options) : base(db, o, options) { mPredefinedType = o.mPredefinedType; mStatus = o.mStatus; mLongDescription = o.mLongDescription; }
} }
@ -1922,11 +1922,11 @@ namespace GeometryGym.Ifc
{ {
internal int mDependingProperty;// : IfcProperty; internal int mDependingProperty;// : IfcProperty;
internal int mDependantProperty;// : IfcProperty; internal int mDependantProperty;// : IfcProperty;
internal string mExpression = "$";// : OPTIONAL IfcText; internal string mExpression = "";// : OPTIONAL IfcText;
public IfcProperty DependingProperty { get { return mDatabase[mDependingProperty] as IfcProperty; } set { mDependingProperty = value.mIndex; value.mPropertyDependsOn.Add(this); } } public IfcProperty DependingProperty { get { return mDatabase[mDependingProperty] as IfcProperty; } set { mDependingProperty = value.mIndex; value.mPropertyDependsOn.Add(this); } }
public IfcProperty DependantProperty { get { return mDatabase[mDependantProperty] as IfcProperty; } set { mDependantProperty = value.mIndex; value.mPropertyForDependance.Add(this); } } public IfcProperty DependantProperty { get { return mDatabase[mDependantProperty] as IfcProperty; } set { mDependantProperty = value.mIndex; value.mPropertyForDependance.Add(this); } }
public string Expression { get { return (mExpression == "$" ? "" : ParserIfc.Decode(mExpression)); } set { mExpression = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Expression { get { return mExpression; } set { mExpression = value; } }
internal IfcPropertyDependencyRelationship() : base() { } internal IfcPropertyDependencyRelationship() : base() { }
internal IfcPropertyDependencyRelationship(DatabaseIfc db, IfcPropertyDependencyRelationship p, DuplicateOptions options) internal IfcPropertyDependencyRelationship(DatabaseIfc db, IfcPropertyDependencyRelationship p, DuplicateOptions options)
@ -1973,6 +1973,7 @@ namespace GeometryGym.Ifc
if (p.mUnit != null) if (p.mUnit != null)
Unit = db.Factory.Duplicate((BaseClassIfc)p.mUnit, options) as IfcUnit; Unit = db.Factory.Duplicate((BaseClassIfc)p.mUnit, options) as IfcUnit;
} }
public IfcPropertyEnumeration(DatabaseIfc db, string name, IfcValue value) : base(db) { Name = name; mEnumerationValues.Add(value); }
public IfcPropertyEnumeration(DatabaseIfc db, string name, IEnumerable<IfcValue> values) : base(db) { Name = name; mEnumerationValues.AddRange(values); } public IfcPropertyEnumeration(DatabaseIfc db, string name, IEnumerable<IfcValue> values) : base(db) { Name = name; mEnumerationValues.AddRange(values); }
} }
[Serializable] [Serializable]
@ -1998,22 +1999,22 @@ namespace GeometryGym.Ifc
public partial class IfcPropertyListValue<T> : IfcSimpleProperty where T : IfcValue public partial class IfcPropertyListValue<T> : IfcSimpleProperty where T : IfcValue
{ {
private List<T> mNominalValue = new List<T>();// : OPTIONAL LIST [1:?] OF IfcValue; private List<T> mNominalValue = new List<T>();// : OPTIONAL LIST [1:?] OF IfcValue;
private int mUnit;// : OPTIONAL IfcUnit; private IfcUnit mUnit;// : OPTIONAL IfcUnit;
public ReadOnlyCollection<T> NominalValue { get { return new ReadOnlyCollection<T>(mNominalValue); } } public List<T> NominalValue { get { return mNominalValue; } }
public IfcUnit Unit { get { return mDatabase[mUnit] as IfcUnit; } set { mUnit = value == null ? 0 : value.Index; } } public IfcUnit Unit { get { return mUnit; } set { mUnit = value; } }
internal IfcPropertyListValue() : base() { } internal IfcPropertyListValue() : base() { }
public IfcPropertyListValue(DatabaseIfc db, string name, List<T> values) public IfcPropertyListValue(DatabaseIfc db, string name, IEnumerable<T> values)
: base(db, name) { mNominalValue.AddRange(values); } : base(db, name) { mNominalValue.AddRange(values); }
} }
[Serializable] [Serializable]
public partial class IfcPropertyReferenceValue : IfcSimpleProperty public partial class IfcPropertyReferenceValue : IfcSimpleProperty
{ {
internal string mUsageName = "$";// : OPTIONAL IfcText; internal string mUsageName = "";// : OPTIONAL IfcText;
internal int mPropertyReference = 0;// : OPTIONAL IfcObjectReferenceSelect; internal int mPropertyReference = 0;// : OPTIONAL IfcObjectReferenceSelect;
public string UsageName { get { return (mUsageName == "$" ? "" : ParserIfc.Decode(mUsageName)); } set { mUsageName = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string UsageName { get { return mUsageName; } set { mUsageName = value; } }
public IfcObjectReferenceSelect PropertyReference { get { return mDatabase[mPropertyReference] as IfcObjectReferenceSelect; } set { mPropertyReference = (value == null ? 0 : value.Index); } } public IfcObjectReferenceSelect PropertyReference { get { return mDatabase[mPropertyReference] as IfcObjectReferenceSelect; } set { mPropertyReference = (value == null ? 0 : value.Index); } }
internal IfcPropertyReferenceValue() : base() { } internal IfcPropertyReferenceValue() : base() { }
@ -2262,7 +2263,7 @@ namespace GeometryGym.Ifc
public partial class IfcPropertySetTemplate : IfcPropertyTemplateDefinition public partial class IfcPropertySetTemplate : IfcPropertyTemplateDefinition
{ {
internal IfcPropertySetTemplateTypeEnum mTemplateType = Ifc.IfcPropertySetTemplateTypeEnum.NOTDEFINED;// : OPTIONAL IfcPropertySetTemplateTypeEnum; internal IfcPropertySetTemplateTypeEnum mTemplateType = Ifc.IfcPropertySetTemplateTypeEnum.NOTDEFINED;// : OPTIONAL IfcPropertySetTemplateTypeEnum;
private string mApplicableEntity = "$";// : OPTIONAL IfcIdentifier; private string mApplicableEntity = "";// : OPTIONAL IfcIdentifier;
private Dictionary<string, IfcPropertyTemplate> mHasPropertyTemplates = new Dictionary<string, IfcPropertyTemplate>();// : SET [1:?] OF IfcPropertyTemplate; private Dictionary<string, IfcPropertyTemplate> mHasPropertyTemplates = new Dictionary<string, IfcPropertyTemplate>();// : SET [1:?] OF IfcPropertyTemplate;
//INVERSE //INVERSE
@ -2273,10 +2274,10 @@ namespace GeometryGym.Ifc
public IfcPropertySetTemplateTypeEnum TemplateType { get { return mTemplateType; } set { mTemplateType = value; } } public IfcPropertySetTemplateTypeEnum TemplateType { get { return mTemplateType; } set { mTemplateType = value; } }
public string ApplicableEntity public string ApplicableEntity
{ {
get { return (mApplicableEntity == "$" ? "" : ParserIfc.Decode(mApplicableEntity)); } get { return mApplicableEntity; }
set set
{ {
mApplicableEntity = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); mApplicableEntity = value;
mApplicableFilter = null; mApplicableFilter = null;
} }
} }
@ -2440,18 +2441,12 @@ namespace GeometryGym.Ifc
{ {
internal List <T> mDefiningValues = new List<T>();// : OPTIONAL LIST [1:?] OF UNIQUE IfcValue; internal List <T> mDefiningValues = new List<T>();// : OPTIONAL LIST [1:?] OF UNIQUE IfcValue;
internal List<U> mDefinedValues = new List<U>();// : OPTIONAL LIST [1:?] OF IfcValue; internal List<U> mDefinedValues = new List<U>();// : OPTIONAL LIST [1:?] OF IfcValue;
internal string mExpression = "$";// :: OPTIONAL IfcText; internal string mExpression = "";// :: OPTIONAL IfcText;
internal int mDefiningUnit;// : : OPTIONAL IfcUnit; internal IfcUnit mDefiningUnit;// : : OPTIONAL IfcUnit;
internal int mDefinedUnit;// : : OPTIONAL IfcUnit; internal IfcUnit mDefinedUnit;// : : OPTIONAL IfcUnit;
internal IfcCurveInterpolationEnum mCurveInterpolation = IfcCurveInterpolationEnum.NOTDEFINED;// : : OPTIONAL IfcCurveInterpolationEnum; internal IfcCurveInterpolationEnum mCurveInterpolation = IfcCurveInterpolationEnum.NOTDEFINED;// : : OPTIONAL IfcCurveInterpolationEnum;
internal IfcPropertyTableValue() : base() { } internal IfcPropertyTableValue() : base() { }
internal IfcPropertyTableValue(DatabaseIfc db, IfcPropertyTableValue p, DuplicateOptions options) : base(db, p, options)
{
#warning todo
// mDefiningValues.AddRange(p.DefiningValues);
// DefinedValues.AddRange(p.DefinedValues);//.ToArray()); mExpression = p.mExpression; mDefiningUnit = p.mDefiningUnit; mDefinedUnit = p.mDefinedUnit; mCurveInterpolation = p.mCurveInterpolation;
}
public IfcPropertyTableValue(DatabaseIfc db, string name) : base(db, name) { } public IfcPropertyTableValue(DatabaseIfc db, string name) : base(db, name) { }
} }
[Serializable] [Serializable]
@ -2459,7 +2454,7 @@ namespace GeometryGym.Ifc
{ {
internal List<IfcValue> mDefiningValues = new List<IfcValue>();// : OPTIONAL LIST [1:?] OF UNIQUE IfcValue; internal List<IfcValue> mDefiningValues = new List<IfcValue>();// : OPTIONAL LIST [1:?] OF UNIQUE IfcValue;
internal List<IfcValue> mDefinedValues = new List<IfcValue>();// : OPTIONAL LIST [1:?] OF IfcValue; internal List<IfcValue> mDefinedValues = new List<IfcValue>();// : OPTIONAL LIST [1:?] OF IfcValue;
internal string mExpression = "$";// :: OPTIONAL IfcText; internal string mExpression = "";// :: OPTIONAL IfcText;
internal IfcUnit mDefiningUnit = null;// : : OPTIONAL IfcUnit; internal IfcUnit mDefiningUnit = null;// : : OPTIONAL IfcUnit;
internal IfcUnit mDefinedUnit = null;// : : OPTIONAL IfcUnit; internal IfcUnit mDefinedUnit = null;// : : OPTIONAL IfcUnit;
internal IfcCurveInterpolationEnum mCurveInterpolation = IfcCurveInterpolationEnum.NOTDEFINED;// : : OPTIONAL IfcCurveInterpolationEnum; internal IfcCurveInterpolationEnum mCurveInterpolation = IfcCurveInterpolationEnum.NOTDEFINED;// : : OPTIONAL IfcCurveInterpolationEnum;
@ -2472,7 +2467,7 @@ namespace GeometryGym.Ifc
mExpression = p.mExpression; mExpression = p.mExpression;
mDefiningUnit = db.Factory.Duplicate(p.mDefiningUnit) as IfcUnit; mDefiningUnit = db.Factory.Duplicate(p.mDefiningUnit) as IfcUnit;
mDefinedUnit = db.Factory.Duplicate(p.mDefinedUnit) as IfcUnit; mDefinedUnit = db.Factory.Duplicate(p.mDefinedUnit) as IfcUnit;
//.ToArray()); mExpression = p.mExpression; mDefiningUnit = p.mDefiningUnit; mDefinedUnit = p.mDefinedUnit; mCurveInterpolation = p.mCurveInterpolation; mCurveInterpolation = p.mCurveInterpolation;
} }
public IfcPropertyTableValue(DatabaseIfc db, string name) : base(db, name) { } public IfcPropertyTableValue(DatabaseIfc db, string name) : base(db, name) { }
} }
@ -2540,10 +2535,10 @@ namespace GeometryGym.Ifc
public partial class IfcProxy : IfcProduct public partial class IfcProxy : IfcProduct
{ {
internal IfcObjectTypeEnum mProxyType;// : IfcObjectTypeEnum; internal IfcObjectTypeEnum mProxyType;// : IfcObjectTypeEnum;
internal string mTag = "$";// : OPTIONAL IfcLabel; internal string mTag = "";// : OPTIONAL IfcLabel;
public IfcObjectTypeEnum ProxyType { get { return mProxyType; } set { mProxyType = value; } } public IfcObjectTypeEnum ProxyType { get { return mProxyType; } set { mProxyType = value; } }
public string Tag { get { return mTag == "$" ? "" : ParserIfc.Decode(mTag); } set { mTag = string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value); } } public string Tag { get { return mTag; } set { mTag = value; } }
internal IfcProxy() : base() { } internal IfcProxy() : base() { }
internal IfcProxy(DatabaseIfc db, IfcProxy p, DuplicateOptions options) : base(db, p, options) internal IfcProxy(DatabaseIfc db, IfcProxy p, DuplicateOptions options) : base(db, p, options)

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

@ -281,14 +281,14 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public partial class IfcReference : BaseClassIfc, IfcMetricValueSelect, IfcAppliedValueSelect // IFC4 public partial class IfcReference : BaseClassIfc, IfcMetricValueSelect, IfcAppliedValueSelect // IFC4
{ {
internal string mTypeIdentifier = "$", mAttributeIdentifier = "$"; //: OPTIONAL IfcIdentifier; internal string mTypeIdentifier = "", mAttributeIdentifier = ""; //: OPTIONAL IfcIdentifier;
internal string mInstanceName = "$"; //:OPTIONAL IfcLabel; internal string mInstanceName = ""; //:OPTIONAL IfcLabel;
internal LIST<int> mListPositions = new LIST<int>();// : OPTIONAL LIST [1:?] OF INTEGER; internal LIST<int> mListPositions = new LIST<int>();// : OPTIONAL LIST [1:?] OF INTEGER;
private int mInnerReference = 0;// : OPTIONAL IfcReference; private int mInnerReference = 0;// : OPTIONAL IfcReference;
public string TypeIdentifier { get { return (mTypeIdentifier == "$" ? "" : ParserIfc.Decode(mTypeIdentifier)); } set { mTypeIdentifier = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string TypeIdentifier { get { return mTypeIdentifier; } set { mTypeIdentifier = value; } }
public string AttributeIdentifier { get { return (mAttributeIdentifier == "$" ? "" : ParserIfc.Decode(mAttributeIdentifier)); } set { mAttributeIdentifier = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string AttributeIdentifier { get { return mAttributeIdentifier; } set { mAttributeIdentifier = value; } }
public string InstanceName { get { return (mInstanceName == "$" ? "" : ParserIfc.Decode(mInstanceName)); } set { mInstanceName = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string InstanceName { get { return mInstanceName; } set { mInstanceName = value; } }
public LIST<int> ListPositions { get { return mListPositions; } } public LIST<int> ListPositions { get { return mListPositions; } }
public IfcReference InnerReference { get { return mDatabase[mInnerReference] as IfcReference; } set { mInnerReference = (value == null ? 0 : value.mIndex); } } public IfcReference InnerReference { get { return mDatabase[mInnerReference] as IfcReference; } set { mInnerReference = (value == null ? 0 : value.mIndex); } }
@ -504,22 +504,20 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public partial class IfcReinforcementDefinitionProperties : IfcPreDefinedPropertySet //IFC2x3 IfcPropertySetDefinition public partial class IfcReinforcementDefinitionProperties : IfcPreDefinedPropertySet //IFC2x3 IfcPropertySetDefinition
{ {
internal string mDefinitionType = "$";// : OPTIONAL IfcLabel; internal string mDefinitionType = "";// : OPTIONAL IfcLabel;
internal List<int> mReinforcementSectionDefinitions = new List<int>();// : LIST [1:?] OF IfcSectionReinforcementProperties; internal LIST<IfcSectionReinforcementProperties> mReinforcementSectionDefinitions = new LIST<IfcSectionReinforcementProperties>();// : LIST [1:?] OF IfcSectionReinforcementProperties;
public string DefinitionType { get { return (mDefinitionType == "$" ? "" : ParserIfc.Decode(mDefinitionType)); } set { mDefinitionType = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string DefinitionType { get { return mDefinitionType; } set { mDefinitionType = value; } }
public ReadOnlyCollection<IfcSectionReinforcementProperties> ReinforcementSectionDefinitions { get { return new ReadOnlyCollection<IfcSectionReinforcementProperties>(mReinforcementSectionDefinitions.ConvertAll(x => mDatabase[x] as IfcSectionReinforcementProperties)); } } public LIST<IfcSectionReinforcementProperties> ReinforcementSectionDefinitions { get { return mReinforcementSectionDefinitions; } }
internal IfcReinforcementDefinitionProperties() : base() { } internal IfcReinforcementDefinitionProperties() : base() { }
internal IfcReinforcementDefinitionProperties(DatabaseIfc db, IfcReinforcementDefinitionProperties p, DuplicateOptions options) : base(db, p, options) internal IfcReinforcementDefinitionProperties(DatabaseIfc db, IfcReinforcementDefinitionProperties p, DuplicateOptions options) : base(db, p, options)
{ {
mDefinitionType = p.mDefinitionType; mDefinitionType = p.mDefinitionType;
p.ReinforcementSectionDefinitions.ToList().ForEach(x => addSection(db.Factory.Duplicate(x) as IfcSectionReinforcementProperties)); ReinforcementSectionDefinitions.AddRange(p.ReinforcementSectionDefinitions.Select(x => db.Factory.Duplicate(x) as IfcSectionReinforcementProperties));
} }
public IfcReinforcementDefinitionProperties(string name, IEnumerable<IfcSectionReinforcementProperties> sectProps) public IfcReinforcementDefinitionProperties(string name, IEnumerable<IfcSectionReinforcementProperties> sectProps)
: base(sectProps.First().mDatabase, name) { foreach (IfcSectionReinforcementProperties prop in sectProps) addSection(prop); } : base(sectProps.First().mDatabase, name) { ReinforcementSectionDefinitions.AddRange(sectProps); }
internal void addSection(IfcSectionReinforcementProperties section) { mReinforcementSectionDefinitions.Add(section.mIndex); }
} }
[Serializable] [Serializable]
public partial class IfcReinforcingBar : IfcReinforcingElement public partial class IfcReinforcingBar : IfcReinforcingElement
@ -565,7 +563,7 @@ namespace GeometryGym.Ifc
internal double mCrossSectionArea;// : IfcAreaMeasure; IFC4 OPTIONAL internal double mCrossSectionArea;// : IfcAreaMeasure; IFC4 OPTIONAL
internal double mBarLength;// : OPTIONAL IfcPositiveLengthMeasure; internal double mBarLength;// : OPTIONAL IfcPositiveLengthMeasure;
internal IfcReinforcingBarSurfaceEnum mBarSurface = IfcReinforcingBarSurfaceEnum.NOTDEFINED;// //: OPTIONAL IfcReinforcingBarSurfaceEnum; internal IfcReinforcingBarSurfaceEnum mBarSurface = IfcReinforcingBarSurfaceEnum.NOTDEFINED;// //: OPTIONAL IfcReinforcingBarSurfaceEnum;
internal string mBendingShapeCode = "$";// : OPTIONAL IfcLabel; internal string mBendingShapeCode = "";// : OPTIONAL IfcLabel;
internal List<IfcBendingParameterSelect> mBendingParameters = new List<IfcBendingParameterSelect>();// : OPTIONAL LIST [1:?] OF IfcBendingParameterSelect; internal List<IfcBendingParameterSelect> mBendingParameters = new List<IfcBendingParameterSelect>();// : OPTIONAL LIST [1:?] OF IfcBendingParameterSelect;
public IfcReinforcingBarTypeEnum PredefinedType { get { return mPredefinedType; } set { mPredefinedType = value; } } public IfcReinforcingBarTypeEnum PredefinedType { get { return mPredefinedType; } set { mPredefinedType = value; } }
@ -573,8 +571,8 @@ namespace GeometryGym.Ifc
public double CrossSectionArea { get { return mCrossSectionArea; } set { mCrossSectionArea = value; } } public double CrossSectionArea { get { return mCrossSectionArea; } set { mCrossSectionArea = value; } }
public double BarLength { get { return mBarLength; } set { mBarLength = value; } } public double BarLength { get { return mBarLength; } set { mBarLength = value; } }
public IfcReinforcingBarSurfaceEnum BarSurface { get { return mBarSurface; } set { mBarSurface = value; } } public IfcReinforcingBarSurfaceEnum BarSurface { get { return mBarSurface; } set { mBarSurface = value; } }
public string BendingShapeCode { get { return (mBendingShapeCode == "$" ? "" : ParserIfc.Decode(mBendingShapeCode)); } set { mBendingShapeCode = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string BendingShapeCode { get { return mBendingShapeCode; } set { mBendingShapeCode = value; } }
public ReadOnlyCollection<IfcBendingParameterSelect> BendingParameters { get { return new ReadOnlyCollection<IfcBendingParameterSelect>(mBendingParameters); } } public List<IfcBendingParameterSelect> BendingParameters { get { return mBendingParameters; } }
internal IfcReinforcingBarType() : base() { } internal IfcReinforcingBarType() : base() { }
internal IfcReinforcingBarType(DatabaseIfc db, IfcReinforcingBarType t, DuplicateOptions options) : base(db, t, options) internal IfcReinforcingBarType(DatabaseIfc db, IfcReinforcingBarType t, DuplicateOptions options) : base(db, t, options)
@ -599,9 +597,9 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public abstract partial class IfcReinforcingElement : IfcElementComponent // ABSTRACT SUPERTYPE OF(ONEOF(IfcReinforcingBar, IfcReinforcingMesh, IfcTendon, IfcTendonAnchor)) public abstract partial class IfcReinforcingElement : IfcElementComponent // ABSTRACT SUPERTYPE OF(ONEOF(IfcReinforcingBar, IfcReinforcingMesh, IfcTendon, IfcTendonAnchor))
{ {
private string mSteelGrade = "$";// : OPTIONAL IfcLabel; //IFC4 DEPRECATED private string mSteelGrade = "";// : OPTIONAL IfcLabel; //IFC4 DEPRECATED
[Obsolete("DEPRECATED IFC4", false)] [Obsolete("DEPRECATED IFC4", false)]
public string SteelGrade { get { return (mSteelGrade == "$" ? "" : ParserIfc.Decode(mSteelGrade)); } set { mSteelGrade = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string SteelGrade { get { return mSteelGrade; } set { mSteelGrade = value; } }
protected IfcReinforcingElement() : base() { } protected IfcReinforcingElement() : base() { }
protected IfcReinforcingElement(DatabaseIfc db) : base(db) { } protected IfcReinforcingElement(DatabaseIfc db) : base(db) { }
@ -658,7 +656,7 @@ namespace GeometryGym.Ifc
internal double mLongitudinalBarNominalDiameter = double.NaN, mTransverseBarNominalDiameter = double.NaN;// :OPTIONAL IfcPositiveLengthMeasure; internal double mLongitudinalBarNominalDiameter = double.NaN, mTransverseBarNominalDiameter = double.NaN;// :OPTIONAL IfcPositiveLengthMeasure;
internal double mLongitudinalBarCrossSectionArea = double.NaN, mTransverseBarCrossSectionArea = double.NaN;// : OPTIONAL IfcAreaMeasure; internal double mLongitudinalBarCrossSectionArea = double.NaN, mTransverseBarCrossSectionArea = double.NaN;// : OPTIONAL IfcAreaMeasure;
internal double mLongitudinalBarSpacing = double.NaN, mTransverseBarSpacing = double.NaN;// : OPTIONAL IfcPositiveLengthMeasure; internal double mLongitudinalBarSpacing = double.NaN, mTransverseBarSpacing = double.NaN;// : OPTIONAL IfcPositiveLengthMeasure;
internal string mBendingShapeCode = "$"; // : OPTIONAL IfcLabel; internal string mBendingShapeCode = ""; // : OPTIONAL IfcLabel;
internal List<IfcBendingParameterSelect> mBendingParameters = new List<IfcBendingParameterSelect>(); // : OPTIONAL LIST [1:?] OF IfcBendingParameterSelect; internal List<IfcBendingParameterSelect> mBendingParameters = new List<IfcBendingParameterSelect>(); // : OPTIONAL LIST [1:?] OF IfcBendingParameterSelect;
public IfcReinforcingMeshTypeEnum PredefinedType { get { return mPredefinedType; } set { mPredefinedType = value; } } public IfcReinforcingMeshTypeEnum PredefinedType { get { return mPredefinedType; } set { mPredefinedType = value; } }
@ -670,8 +668,8 @@ namespace GeometryGym.Ifc
public double TransverseBarCrossSectionArea { get { return mTransverseBarCrossSectionArea; } set { mTransverseBarCrossSectionArea = value; } } public double TransverseBarCrossSectionArea { get { return mTransverseBarCrossSectionArea; } set { mTransverseBarCrossSectionArea = value; } }
public double LongitudinalBarSpacing { get { return mLongitudinalBarSpacing; } set { mLongitudinalBarSpacing = value; } } public double LongitudinalBarSpacing { get { return mLongitudinalBarSpacing; } set { mLongitudinalBarSpacing = value; } }
public double TransverseBarSpacing { get { return mTransverseBarSpacing; } set { mTransverseBarSpacing = value; } } public double TransverseBarSpacing { get { return mTransverseBarSpacing; } set { mTransverseBarSpacing = value; } }
public string BendingShapeCode { get { return (mBendingShapeCode == "$" ? "" : ParserIfc.Decode(mBendingShapeCode)); } set { mBendingShapeCode = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string BendingShapeCode { get { return mBendingShapeCode; } set { mBendingShapeCode = value; } }
public ReadOnlyCollection<IfcBendingParameterSelect> BendingParameters { get { return new ReadOnlyCollection<IfcBendingParameterSelect>(mBendingParameters); } } public List<IfcBendingParameterSelect> BendingParameters { get { return mBendingParameters; } }
internal IfcReinforcingMeshType() : base() { } internal IfcReinforcingMeshType() : base() { }
internal IfcReinforcingMeshType(DatabaseIfc db, IfcReinforcingMeshType m, DuplicateOptions options) : base(db, m, options) internal IfcReinforcingMeshType(DatabaseIfc db, IfcReinforcingMeshType m, DuplicateOptions options) : base(db, m, options)
@ -1088,10 +1086,10 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public partial class IfcRelAssociatesConstraint : IfcRelAssociates public partial class IfcRelAssociatesConstraint : IfcRelAssociates
{ {
internal string mIntent = "$";// : OPTIONAL IfcLabel; internal string mIntent = "";// : OPTIONAL IfcLabel;
private int mRelatingConstraint;// : IfcConstraint private int mRelatingConstraint;// : IfcConstraint
public string Intent { get { return (mIntent == "$" ? "" : ParserIfc.Decode(mIntent)); } set { mIntent = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Intent { get { return mIntent; } set { mIntent = value; } }
public IfcConstraint RelatingConstraint { get { return mDatabase[mRelatingConstraint] as IfcConstraint; } set { mRelatingConstraint = value.mIndex; value.mConstraintForObjects.Add(this); } } public IfcConstraint RelatingConstraint { get { return mDatabase[mRelatingConstraint] as IfcConstraint; } set { mRelatingConstraint = value.mIndex; value.mConstraintForObjects.Add(this); } }
public override NamedObjectIfc Relating() { return RelatingConstraint; } public override NamedObjectIfc Relating() { return RelatingConstraint; }
@ -1418,7 +1416,7 @@ namespace GeometryGym.Ifc
public partial class IfcRelConnectsWithRealizingElements : IfcRelConnectsElements public partial class IfcRelConnectsWithRealizingElements : IfcRelConnectsElements
{ {
internal SET<IfcElement> mRealizingElements = new SET<IfcElement>();// : SET [1:?] OF IfcElement; internal SET<IfcElement> mRealizingElements = new SET<IfcElement>();// : SET [1:?] OF IfcElement;
internal string mConnectionType = "$";// : : OPTIONAL IfcLabel; internal string mConnectionType = "";// : : OPTIONAL IfcLabel;
public SET<IfcElement> RealizingElements { get { return mRealizingElements; } } public SET<IfcElement> RealizingElements { get { return mRealizingElements; } }
@ -1480,11 +1478,11 @@ namespace GeometryGym.Ifc
internal IfcRelContainedInSpatialStructure(DatabaseIfc db, IfcRelContainedInSpatialStructure r, DuplicateOptions options) internal IfcRelContainedInSpatialStructure(DatabaseIfc db, IfcRelContainedInSpatialStructure r, DuplicateOptions options)
: base(db, r, options) : base(db, r, options)
{ {
RelatingStructure = db.Factory.Duplicate(r.RelatingStructure, new DuplicateOptions(options) { DuplicateDownstream = false }) as IfcSpatialElement; RelatingStructure = db.Factory.Duplicate(r.RelatingStructure, new DuplicateOptions(options) { DuplicateDownstream = false });
if (options.DuplicateDownstream) if (options.DuplicateDownstream)
{ {
DuplicateOptions optionsNoHost = new DuplicateOptions(options) { DuplicateHost = false }; DuplicateOptions optionsNoHost = new DuplicateOptions(options) { DuplicateHost = false };
RelatedElements.AddRange(r.RelatedElements.Select(x => db.Factory.Duplicate(x, optionsNoHost) as IfcProduct)); RelatedElements.AddRange(r.RelatedElements.Select(x => db.Factory.Duplicate(x, optionsNoHost)));
} }
} }
public IfcRelContainedInSpatialStructure(IfcSpatialElement host) : base(host.mDatabase) public IfcRelContainedInSpatialStructure(IfcSpatialElement host) : base(host.mDatabase)
@ -1946,14 +1944,14 @@ namespace GeometryGym.Ifc
internal int mRelatedElement;// : IfcInterferenceSelect; internal int mRelatedElement;// : IfcInterferenceSelect;
internal int mInterferenceGeometry;// : OPTIONAL IfcConnectionGeometry; internal int mInterferenceGeometry;// : OPTIONAL IfcConnectionGeometry;
internal IfcSpatialZone mInterferenceSpace = null;// : OPTIONAL IfcSpatialZone; internal IfcSpatialZone mInterferenceSpace = null;// : OPTIONAL IfcSpatialZone;
internal string mInterferenceType = "$";// : OPTIONAL IfcIdentifier; internal string mInterferenceType = "";// : OPTIONAL IfcIdentifier;
internal IfcLogicalEnum mImpliedOrder = IfcLogicalEnum.UNKNOWN;// : LOGICAL; internal IfcLogicalEnum mImpliedOrder = IfcLogicalEnum.UNKNOWN;// : LOGICAL;
public IfcInterferenceSelect RelatingElement { get { return mDatabase[mRelatingElement] as IfcInterferenceSelect; } set { mRelatingElement = value.StepId; value.InterferesElements.Add(this); } } public IfcInterferenceSelect RelatingElement { get { return mDatabase[mRelatingElement] as IfcInterferenceSelect; } set { mRelatingElement = value.StepId; value.InterferesElements.Add(this); } }
public IfcInterferenceSelect RelatedElement { get { return mDatabase[mRelatedElement] as IfcInterferenceSelect; } set { mRelatedElement = value.StepId; value.IsInterferedByElements.Add(this); } } public IfcInterferenceSelect RelatedElement { get { return mDatabase[mRelatedElement] as IfcInterferenceSelect; } set { mRelatedElement = value.StepId; value.IsInterferedByElements.Add(this); } }
public IfcConnectionGeometry InterferenceGeometry { get { return mDatabase[mInterferenceGeometry] as IfcConnectionGeometry; } set { mInterferenceGeometry = value == null ? 0 : value.mIndex; } } public IfcConnectionGeometry InterferenceGeometry { get { return mDatabase[mInterferenceGeometry] as IfcConnectionGeometry; } set { mInterferenceGeometry = value == null ? 0 : value.mIndex; } }
public IfcSpatialZone InterferenceSpace { get { return mInterferenceSpace; } set { mInterferenceSpace = value; } } public IfcSpatialZone InterferenceSpace { get { return mInterferenceSpace; } set { mInterferenceSpace = value; } }
public string InterferenceType { get { return (mInterferenceType == "$" ? "" : ParserIfc.Decode(mInterferenceType)); } set { mInterferenceType = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string InterferenceType { get { return mInterferenceType; } set { mInterferenceType = value; } }
public IfcLogicalEnum ImpliedOrder { get { return mImpliedOrder; } } public IfcLogicalEnum ImpliedOrder { get { return mImpliedOrder; } }
internal IfcRelInterferesElements() : base() { } internal IfcRelInterferesElements() : base() { }
@ -2179,7 +2177,7 @@ namespace GeometryGym.Ifc
private IfcLagTime mTimeLag;// : OPTIONAL IfcLagTime; IFC2x3 IfcTimeMeasure private IfcLagTime mTimeLag;// : OPTIONAL IfcLagTime; IFC2x3 IfcTimeMeasure
private double mTimeLagSS = double.NaN;// : OPTIONAL IfcLagTime; IFC2x3 IfcTimeMeasure private double mTimeLagSS = double.NaN;// : OPTIONAL IfcLagTime; IFC2x3 IfcTimeMeasure
internal IfcSequenceEnum mSequenceType = IfcSequenceEnum.NOTDEFINED;// : OPTIONAL IfcSequenceEnum; internal IfcSequenceEnum mSequenceType = IfcSequenceEnum.NOTDEFINED;// : OPTIONAL IfcSequenceEnum;
internal string mUserDefinedSequenceType = "$";// : OPTIONAL IfcLabel; internal string mUserDefinedSequenceType = "";// : OPTIONAL IfcLabel;
public IfcProcess RelatingProcess { get { return mRelatingProcess; } set { mRelatingProcess = value; value.mIsPredecessorTo.Add(this); } } public IfcProcess RelatingProcess { get { return mRelatingProcess; } set { mRelatingProcess = value; value.mIsPredecessorTo.Add(this); } }
public IfcProcess RelatedProcess { get { return mRelatedProcess; } set { mRelatedProcess = value; value.mIsSuccessorFrom.Add(this); } } public IfcProcess RelatedProcess { get { return mRelatedProcess; } set { mRelatedProcess = value; value.mIsSuccessorFrom.Add(this); } }
@ -2417,11 +2415,11 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public abstract partial class IfcRepresentationContext : BaseClassIfc //ABSTRACT SUPERTYPE OF(IfcGeometricRepresentationContext); public abstract partial class IfcRepresentationContext : BaseClassIfc //ABSTRACT SUPERTYPE OF(IfcGeometricRepresentationContext);
{ {
internal string mContextIdentifier = "$";// : OPTIONAL IfcLabel; internal string mContextIdentifier = "";// : OPTIONAL IfcLabel;
internal string mContextType = "$";// : OPTIONAL IfcLabel; internal string mContextType = "";// : OPTIONAL IfcLabel;
public string ContextIdentifier { get { return (mContextIdentifier == "$" ? "" : ParserIfc.Decode(mContextIdentifier)); } set { mContextIdentifier = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string ContextIdentifier { get { return mContextIdentifier; } set { mContextIdentifier = value; } }
public string ContextType { get { return (mContextType == "$" ? "" : ParserIfc.Decode(mContextType)); } set { mContextType = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string ContextType { get { return mContextType; } set { mContextType = value; } }
protected IfcRepresentationContext() : base() { } protected IfcRepresentationContext() : base() { }
@ -2643,32 +2641,32 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public partial class IfcResourceTime : IfcSchedulingTime //IFC4 public partial class IfcResourceTime : IfcSchedulingTime //IFC4
{ {
internal string mScheduleWork = "$";// : OPTIONAL IfcDuration; internal string mScheduleWork = "";// : OPTIONAL IfcDuration;
internal double mScheduleUsage = double.NaN; //: OPTIONAL IfcPositiveRatioMeasure; internal double mScheduleUsage = double.NaN; //: OPTIONAL IfcPositiveRatioMeasure;
internal DateTime mScheduleStart = DateTime.MinValue, mScheduleFinish = DateTime.MinValue;//: OPTIONAL IfcDateTime; internal DateTime mScheduleStart = DateTime.MinValue, mScheduleFinish = DateTime.MinValue;//: OPTIONAL IfcDateTime;
internal string mScheduleContour = "$";//: OPTIONAL IfcLabel; internal string mScheduleContour = "";//: OPTIONAL IfcLabel;
internal string mLevelingDelay = "$";// : OPTIONAL IfcDuration; internal IfcDuration mLevelingDelay = null;// : OPTIONAL IfcDuration;
internal bool mIsOverAllocated = false;// : OPTIONAL BOOLEAN; internal bool mIsOverAllocated = false;// : OPTIONAL BOOLEAN;
internal DateTime mStatusTime = DateTime.MinValue;//: OPTIONAL IfcDateTime; internal DateTime mStatusTime = DateTime.MinValue;//: OPTIONAL IfcDateTime;
internal string mActualWork = "$";// : OPTIONAL IfcDuration; internal IfcDuration mActualWork = null;// : OPTIONAL IfcDuration;
internal double mActualUsage = double.NaN; //: OPTIONAL IfcPositiveRatioMeasure; internal double mActualUsage = double.NaN; //: OPTIONAL IfcPositiveRatioMeasure;
internal DateTime mActualStart = DateTime.MinValue, mActualFinish = DateTime.MinValue;// : OPTIONAL IfcDateTime; internal DateTime mActualStart = DateTime.MinValue, mActualFinish = DateTime.MinValue;// : OPTIONAL IfcDateTime;
internal string mRemainingWork = "$";// : OPTIONAL IfcDuration; internal IfcDuration mRemainingWork = null;// : OPTIONAL IfcDuration;
internal double mRemainingUsage = double.NaN, mCompletion = double.NaN;// : OPTIONAL IfcPositiveRatioMeasure; internal double mRemainingUsage = double.NaN, mCompletion = double.NaN;// : OPTIONAL IfcPositiveRatioMeasure;
public string ScheduleWork { get { return (mScheduleWork == "$" ? "" : ParserIfc.Decode(mScheduleWork)); } set { mScheduleWork = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string ScheduleWork { get { return mScheduleWork; } set { mScheduleWork = value; } }
public double ScheduleUsage { get { return mScheduleUsage; } set { mScheduleUsage = value; } } public double ScheduleUsage { get { return mScheduleUsage; } set { mScheduleUsage = value; } }
public DateTime ScheduleStart { get { return mScheduleStart; } set { mScheduleStart = value; } } public DateTime ScheduleStart { get { return mScheduleStart; } set { mScheduleStart = value; } }
public DateTime ScheduleFinish { get { return mScheduleFinish; } set { mScheduleFinish = value; } } public DateTime ScheduleFinish { get { return mScheduleFinish; } set { mScheduleFinish = value; } }
public string ScheduleContour { get { return (mScheduleContour == "$" ? "" : ParserIfc.Decode(mScheduleContour)); } set { mScheduleContour = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string ScheduleContour { get { return mScheduleContour; } set { mScheduleContour = value; } }
public IfcDuration LevelingDelay { get { return null; } set { mLevelingDelay = (value == null ? "$" : value.ToString()); } } public IfcDuration LevelingDelay { get { return mLevelingDelay; } set { mLevelingDelay = value; } }
public bool IsOverAllocated { get { return mIsOverAllocated; } set { mIsOverAllocated = value; } } public bool IsOverAllocated { get { return mIsOverAllocated; } set { mIsOverAllocated = value; } }
public DateTime StatusTime { get { return mStatusTime; } set { mStatusTime = value; } } public DateTime StatusTime { get { return mStatusTime; } set { mStatusTime = value; } }
public IfcDuration ActualWork { get { return null; } set { mActualWork = (value == null ? "$" : value.ToString()); } } public IfcDuration ActualWork { get { return mActualWork; } set { mActualWork = value; } }
public double ActualUsage { get { return mActualUsage; } set { mActualUsage = value; } } public double ActualUsage { get { return mActualUsage; } set { mActualUsage = value; } }
public DateTime ActualStart { get { return mActualStart; } set { mActualStart = value; } } public DateTime ActualStart { get { return mActualStart; } set { mActualStart = value; } }
public DateTime ActualFinish { get { return mActualFinish; } set { mActualFinish = value; } } public DateTime ActualFinish { get { return mActualFinish; } set { mActualFinish = value; } }
public IfcDuration RemainingWork { get { return null; } set { mRemainingWork = (value == null ? "$" : value.ToString()); } } public IfcDuration RemainingWork { get { return mRemainingWork; } set { mRemainingWork = value; } }
public double RemainingUsage { get { return mRemainingUsage; } set { mRemainingUsage = value; } } public double RemainingUsage { get { return mRemainingUsage; } set { mRemainingUsage = value; } }
public double Completion { get { return mCompletion; } set { mCompletion = value; } } public double Completion { get { return mCompletion; } set { mCompletion = value; } }

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

@ -101,13 +101,13 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public abstract partial class IfcSchedulingTime : BaseClassIfc, NamedObjectIfc // ABSTRACT SUPERTYPE OF(ONEOF(IfcEventTime, IfcLagTime, IfcResourceTime, IfcTaskTime, IfcWorkTime)); public abstract partial class IfcSchedulingTime : BaseClassIfc, NamedObjectIfc // ABSTRACT SUPERTYPE OF(ONEOF(IfcEventTime, IfcLagTime, IfcResourceTime, IfcTaskTime, IfcWorkTime));
{ {
internal string mName = "$";// : OPTIONAL IfcLabel; internal string mName = "";// : OPTIONAL IfcLabel;
internal IfcDataOriginEnum mDataOrigin = IfcDataOriginEnum.NOTDEFINED;// OPTIONAL : IfcDataOriginEnum; internal IfcDataOriginEnum mDataOrigin = IfcDataOriginEnum.NOTDEFINED;// OPTIONAL : IfcDataOriginEnum;
internal string mUserDefinedDataOrigin = "$";//: OPTIONAL IfcLabel; internal string mUserDefinedDataOrigin = "";//: OPTIONAL IfcLabel;
public string Name { get { return (mName == "$" ? "" : ParserIfc.Decode(mName)); } set { mName = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Name { get { return mName; } set { mName = value; } }
public IfcDataOriginEnum DataOrigin { get { return mDataOrigin; } set { mDataOrigin = value; } } public IfcDataOriginEnum DataOrigin { get { return mDataOrigin; } set { mDataOrigin = value; } }
public string UserDefinedDataOrigin { get { return (mUserDefinedDataOrigin == "$" ? "" : ParserIfc.Decode(mName)); } set { mUserDefinedDataOrigin = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string UserDefinedDataOrigin { get { return mUserDefinedDataOrigin; } set { mUserDefinedDataOrigin = value; } }
protected IfcSchedulingTime() : base() { } protected IfcSchedulingTime() : base() { }
protected IfcSchedulingTime(DatabaseIfc db, IfcSchedulingTime t, DuplicateOptions options) : base(db,t) protected IfcSchedulingTime(DatabaseIfc db, IfcSchedulingTime t, DuplicateOptions options) : base(db,t)
@ -448,16 +448,16 @@ namespace GeometryGym.Ifc
public partial class IfcShapeAspect : BaseClassIfc, IfcResourceObjectSelect, NamedObjectIfc public partial class IfcShapeAspect : BaseClassIfc, IfcResourceObjectSelect, NamedObjectIfc
{ {
internal LIST<IfcShapeModel> mShapeRepresentations = new LIST<IfcShapeModel>();// : LIST [1:?] OF IfcShapeModel; internal LIST<IfcShapeModel> mShapeRepresentations = new LIST<IfcShapeModel>();// : LIST [1:?] OF IfcShapeModel;
internal string mName = "$";// : OPTIONAL IfcLabel; internal string mName = "";// : OPTIONAL IfcLabel;
internal string mDescription = "$";// : OPTIONAL IfcText; internal string mDescription = "";// : OPTIONAL IfcText;
private IfcLogicalEnum mProductDefinitional;// : LOGICAL; private IfcLogicalEnum mProductDefinitional;// : LOGICAL;
internal IfcProductRepresentationSelect mPartOfProductDefinitionShape;// IFC4 OPTIONAL IfcProductRepresentationSelect IFC2x3 IfcProductDefinitionShape; internal IfcProductRepresentationSelect mPartOfProductDefinitionShape;// IFC4 OPTIONAL IfcProductRepresentationSelect IFC2x3 IfcProductDefinitionShape;
// INVERSE // INVERSE
private SET<IfcExternalReferenceRelationship> mHasExternalReference = new SET<IfcExternalReferenceRelationship>(); //IFC4 SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects; private SET<IfcExternalReferenceRelationship> mHasExternalReference = new SET<IfcExternalReferenceRelationship>(); //IFC4 SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects;
public LIST<IfcShapeModel> ShapeRepresentations { get { return mShapeRepresentations; } } public LIST<IfcShapeModel> ShapeRepresentations { get { return mShapeRepresentations; } }
public string Name { get { return (mName == "$" ? "" : ParserIfc.Decode(mName)); } set { mName = (string.IsNullOrEmpty(value) ? "" : ParserIfc.Encode(value)); } } public string Name { get { return mName; } set { mName = value; } }
public string Description { get { return (mDescription == "$" ? "" : ParserIfc.Decode(mDescription)); } set { mDescription = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Description { get { return mDescription; } set { mDescription = value; } }
public IfcLogicalEnum ProductDefinitional { get { return mProductDefinitional; } set { mProductDefinitional = value; } } public IfcLogicalEnum ProductDefinitional { get { return mProductDefinitional; } set { mProductDefinitional = value; } }
public IfcProductRepresentationSelect PartOfProductDefinitionShape { get { return mPartOfProductDefinitionShape; } set { mPartOfProductDefinitionShape = value; if (value != null) value.HasShapeAspects.Add(this); } } public IfcProductRepresentationSelect PartOfProductDefinitionShape { get { return mPartOfProductDefinitionShape; } set { mPartOfProductDefinitionShape = value; if (value != null) value.HasShapeAspects.Add(this); } }
public SET<IfcExternalReferenceRelationship> HasExternalReference { get { return mHasExternalReference; } } public SET<IfcExternalReferenceRelationship> HasExternalReference { get { return mHasExternalReference; } }
@ -782,20 +782,20 @@ additional types some additional representation types are given:
public partial class IfcSimplePropertyTemplate : IfcPropertyTemplate public partial class IfcSimplePropertyTemplate : IfcPropertyTemplate
{ {
private IfcSimplePropertyTemplateTypeEnum mTemplateType = IfcSimplePropertyTemplateTypeEnum.NOTDEFINED;// : OPTIONAL IfcSimplePropertyTemplateTypeEnum; private IfcSimplePropertyTemplateTypeEnum mTemplateType = IfcSimplePropertyTemplateTypeEnum.NOTDEFINED;// : OPTIONAL IfcSimplePropertyTemplateTypeEnum;
internal string mPrimaryMeasureType = "$";// : OPTIONAL IfcLabel; internal string mPrimaryMeasureType = "";// : OPTIONAL IfcLabel;
internal string mSecondaryMeasureType = "$";// : OPTIONAL IfcLabel; internal string mSecondaryMeasureType = "";// : OPTIONAL IfcLabel;
internal int mEnumerators = 0;// : OPTIONAL IfcPropertyEnumeration; internal int mEnumerators = 0;// : OPTIONAL IfcPropertyEnumeration;
internal int mPrimaryUnit = 0, mSecondaryUnit = 0;// : OPTIONAL IfcUnit; internal int mPrimaryUnit = 0, mSecondaryUnit = 0;// : OPTIONAL IfcUnit;
internal string mExpression = "$";// : OPTIONAL IfcLabel; internal string mExpression = "";// : OPTIONAL IfcLabel;
internal IfcStateEnum mAccessState = IfcStateEnum.NOTDEFINED;// : OPTIONAL IfcStateEnum; internal IfcStateEnum mAccessState = IfcStateEnum.NOTDEFINED;// : OPTIONAL IfcStateEnum;
public IfcSimplePropertyTemplateTypeEnum TemplateType { get { return mTemplateType; } set { mTemplateType = value; } } public IfcSimplePropertyTemplateTypeEnum TemplateType { get { return mTemplateType; } set { mTemplateType = value; } }
public string PrimaryMeasureType { get { return (mPrimaryMeasureType == "$" ? "" : ParserIfc.Decode(mPrimaryMeasureType)); } set { mPrimaryMeasureType = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string PrimaryMeasureType { get { return mPrimaryMeasureType; } set { mPrimaryMeasureType = value; } }
public string SecondaryMeasureType { get { return (mSecondaryMeasureType == "$" ? "" : ParserIfc.Decode(mSecondaryMeasureType)); } set { mSecondaryMeasureType = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string SecondaryMeasureType { get { return mSecondaryMeasureType; } set { mSecondaryMeasureType = value; } }
public IfcPropertyEnumeration Enumerators { get { return mDatabase[mEnumerators] as IfcPropertyEnumeration; } set { mEnumerators = (value == null ? 0 : value.mIndex); } } public IfcPropertyEnumeration Enumerators { get { return mDatabase[mEnumerators] as IfcPropertyEnumeration; } set { mEnumerators = (value == null ? 0 : value.mIndex); } }
public IfcUnit PrimaryUnit { get { return mDatabase[mPrimaryUnit] as IfcUnit; } set { mPrimaryUnit = (value == null ? 0 : value.Index); } } public IfcUnit PrimaryUnit { get { return mDatabase[mPrimaryUnit] as IfcUnit; } set { mPrimaryUnit = (value == null ? 0 : value.Index); } }
public IfcUnit SecondaryUnit { get { return mDatabase[mSecondaryUnit] as IfcUnit; } set { mSecondaryUnit = (value == null ? 0 : value.Index); } } public IfcUnit SecondaryUnit { get { return mDatabase[mSecondaryUnit] as IfcUnit; } set { mSecondaryUnit = (value == null ? 0 : value.Index); } }
public string Expression { get { return (mExpression == "$" ? "" : ParserIfc.Decode(mExpression)); } set { mExpression = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Expression { get { return mExpression; } set { mExpression = value; } }
public IfcStateEnum AccessState { get { return mAccessState; } set { mAccessState = value; } } public IfcStateEnum AccessState { get { return mAccessState; } set { mAccessState = value; } }
internal IfcSimplePropertyTemplate() : base() { } internal IfcSimplePropertyTemplate() : base() { }
@ -839,14 +839,14 @@ additional types some additional representation types are given:
internal IfcCompoundPlaneAngleMeasure mRefLongitude = null;// : OPTIONAL IfcCompoundPlaneAngleMeasure; internal IfcCompoundPlaneAngleMeasure mRefLongitude = null;// : OPTIONAL IfcCompoundPlaneAngleMeasure;
internal double mRefElevation = double.NaN;// : OPTIONAL IfcLengthMeasure; internal double mRefElevation = double.NaN;// : OPTIONAL IfcLengthMeasure;
[Obsolete("DEPRECATED IFC4", false)] [Obsolete("DEPRECATED IFC4", false)]
internal string mLandTitleNumber = "$";// : OPTIONAL IfcLabel; internal string mLandTitleNumber = "";// : OPTIONAL IfcLabel;
internal int mSiteAddress;// : OPTIONAL IfcPostalAddress; internal int mSiteAddress;// : OPTIONAL IfcPostalAddress;
public IfcCompoundPlaneAngleMeasure RefLatitude { get { return mRefLatitude; } set { mRefLatitude = value; } } public IfcCompoundPlaneAngleMeasure RefLatitude { get { return mRefLatitude; } set { mRefLatitude = value; } }
public IfcCompoundPlaneAngleMeasure RefLongitude { get { return mRefLongitude; } set { mRefLongitude = value; } } public IfcCompoundPlaneAngleMeasure RefLongitude { get { return mRefLongitude; } set { mRefLongitude = value; } }
public double RefElevation { get { return mRefElevation; } set { mRefElevation = value; } } public double RefElevation { get { return mRefElevation; } set { mRefElevation = value; } }
[Obsolete("DEPRECATED IFC4", false)] [Obsolete("DEPRECATED IFC4", false)]
public string LandTitleNumber { get { return (mLandTitleNumber == "$" ? "" : ParserIfc.Decode(mLandTitleNumber)); } set { mLandTitleNumber = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string LandTitleNumber { get { return mLandTitleNumber; } set { mLandTitleNumber = value; } }
public IfcPostalAddress SiteAddress { get { return mDatabase[mSiteAddress] as IfcPostalAddress; } set { mSiteAddress = (value == null ? 0 : value.mIndex); } } public IfcPostalAddress SiteAddress { get { return mDatabase[mSiteAddress] as IfcPostalAddress; } set { mSiteAddress = (value == null ? 0 : value.mIndex); } }
internal IfcSite() : base() { } internal IfcSite() : base() { }
@ -1284,8 +1284,8 @@ additional types some additional representation types are given:
[Serializable] [Serializable]
public abstract partial class IfcSpatialElementType : IfcTypeProduct //IFC4 ABSTRACT SUPERTYPE OF(IfcSpatialStructureElementType) public abstract partial class IfcSpatialElementType : IfcTypeProduct //IFC4 ABSTRACT SUPERTYPE OF(IfcSpatialStructureElementType)
{ {
internal string mElementType = "$";// : OPTIONAL IfcLabel internal string mElementType = "";// : OPTIONAL IfcLabel
public string ElementType { get { return (mElementType == "$" ? "" : ParserIfc.Decode(mElementType)); } set { mElementType = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string ElementType { get { return mElementType; } set { mElementType = value; } }
protected IfcSpatialElementType() : base() { } protected IfcSpatialElementType() : base() { }
protected IfcSpatialElementType(DatabaseIfc db) : base(db) { } protected IfcSpatialElementType(DatabaseIfc db) : base(db) { }
@ -1561,8 +1561,8 @@ additional types some additional representation types are given:
[Serializable] [Serializable]
public abstract partial class IfcStructuralConnectionCondition : BaseClassIfc, NamedObjectIfc //ABSTRACT SUPERTYPE OF (ONEOF (IfcFailureConnectionCondition ,IfcSlippageConnectionCondition)); public abstract partial class IfcStructuralConnectionCondition : BaseClassIfc, NamedObjectIfc //ABSTRACT SUPERTYPE OF (ONEOF (IfcFailureConnectionCondition ,IfcSlippageConnectionCondition));
{ {
internal string mName = "$";// : OPTIONAL IfcLabel; internal string mName = "";// : OPTIONAL IfcLabel;
public string Name { get { return (mName == "$" ? "" : ParserIfc.Decode(mName)); } set { mName = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Name { get { return mName; } set { mName = value; } }
protected IfcStructuralConnectionCondition() : base() { } protected IfcStructuralConnectionCondition() : base() { }
protected IfcStructuralConnectionCondition(DatabaseIfc db) : base(db) { } protected IfcStructuralConnectionCondition(DatabaseIfc db) : base(db) { }
@ -1738,8 +1738,8 @@ additional types some additional representation types are given:
[Serializable] [Serializable]
public abstract partial class IfcStructuralLoad : BaseClassIfc, NamedObjectIfc // ABSTRACT SUPERTYPE OF(ONEOF(IfcStructuralLoadConfiguration, IfcStructuralLoadOrResult)); public abstract partial class IfcStructuralLoad : BaseClassIfc, NamedObjectIfc // ABSTRACT SUPERTYPE OF(ONEOF(IfcStructuralLoadConfiguration, IfcStructuralLoadOrResult));
{ {
internal string mName = "$";// : OPTIONAL IfcLabel internal string mName = "";// : OPTIONAL IfcLabel
public string Name { get { return (mName == "$" ? "" : ParserIfc.Decode(mName)); } set { mName = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Name { get { return mName; } set { mName = value; } }
protected IfcStructuralLoad() : base() { } protected IfcStructuralLoad() : base() { }
protected IfcStructuralLoad(DatabaseIfc db) : base(db) { } protected IfcStructuralLoad(DatabaseIfc db) : base(db) { }
@ -1796,7 +1796,7 @@ additional types some additional representation types are given:
internal IfcActionTypeEnum mActionType = IfcActionTypeEnum.NOTDEFINED;// : IfcActionTypeEnum; internal IfcActionTypeEnum mActionType = IfcActionTypeEnum.NOTDEFINED;// : IfcActionTypeEnum;
internal IfcActionSourceTypeEnum mActionSource = IfcActionSourceTypeEnum.NOTDEFINED;//: IfcActionSourceTypeEnum; internal IfcActionSourceTypeEnum mActionSource = IfcActionSourceTypeEnum.NOTDEFINED;//: IfcActionSourceTypeEnum;
internal double mCoefficient = double.NaN;//: OPTIONAL IfcRatioMeasure; internal double mCoefficient = double.NaN;//: OPTIONAL IfcRatioMeasure;
internal string mPurpose = "$";// : OPTIONAL IfcLabel; internal string mPurpose = "";// : OPTIONAL IfcLabel;
//INVERSE //INVERSE
internal IfcStructuralResultGroup mSourceOfResultGroup = null;// : SET [0:1] OF IfcStructuralResultGroup FOR ResultForLoadGroup; internal IfcStructuralResultGroup mSourceOfResultGroup = null;// : SET [0:1] OF IfcStructuralResultGroup FOR ResultForLoadGroup;
internal List<IfcStructuralAnalysisModel> mLoadGroupFor = new List<IfcStructuralAnalysisModel>();// : SET [0:?] OF IfcStructuralAnalysisModel internal List<IfcStructuralAnalysisModel> mLoadGroupFor = new List<IfcStructuralAnalysisModel>();// : SET [0:?] OF IfcStructuralAnalysisModel
@ -1805,7 +1805,7 @@ additional types some additional representation types are given:
public IfcActionTypeEnum ActionType { get { return mActionType; } set { mActionType = value; } } public IfcActionTypeEnum ActionType { get { return mActionType; } set { mActionType = value; } }
public IfcActionSourceTypeEnum ActionSource { get { return mActionSource; } set { mActionSource = value; } } public IfcActionSourceTypeEnum ActionSource { get { return mActionSource; } set { mActionSource = value; } }
public double Coefficient { get { return mCoefficient; } set { mCoefficient = value; } } public double Coefficient { get { return mCoefficient; } set { mCoefficient = value; } }
public string Purpose { get { return (mPurpose == "$" ? "" : ParserIfc.Decode(mPurpose)); } set { mPurpose = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Purpose { get { return mPurpose; } set { mPurpose = value; } }
internal IfcStructuralLoadGroup() : base() { } internal IfcStructuralLoadGroup() : base() { }
internal IfcStructuralLoadGroup(DatabaseIfc db, IfcStructuralLoadGroup g, DuplicateOptions options) : base(db, g, options) { mPredefinedType = g.mPredefinedType; mActionType = g.mActionType; mActionSource = g.mActionSource; mCoefficient = g.mCoefficient; mPurpose = g.mPurpose; } internal IfcStructuralLoadGroup(DatabaseIfc db, IfcStructuralLoadGroup g, DuplicateOptions options) : base(db, g, options) { mPredefinedType = g.mPredefinedType; mActionType = g.mActionType; mActionSource = g.mActionSource; mCoefficient = g.mCoefficient; mPurpose = g.mPurpose; }
@ -2209,7 +2209,7 @@ additional types some additional representation types are given:
{ {
private IfcRepresentationItem mItem = null;// : OPTIONAL IfcRepresentationItem; private IfcRepresentationItem mItem = null;// : OPTIONAL IfcRepresentationItem;
private SET<IfcStyleAssignmentSelect> mStyles = new SET<IfcStyleAssignmentSelect>();// : SET [1:?] OF IfcStyleAssignmentSelect; ifc2x3 IfcPresentationStyleAssignment; private SET<IfcStyleAssignmentSelect> mStyles = new SET<IfcStyleAssignmentSelect>();// : SET [1:?] OF IfcStyleAssignmentSelect; ifc2x3 IfcPresentationStyleAssignment;
private string mName = "$";// : OPTIONAL IfcLabel; private string mName = "";// : OPTIONAL IfcLabel;
public IfcRepresentationItem Item public IfcRepresentationItem Item
{ {
@ -2225,7 +2225,7 @@ additional types some additional representation types are given:
} }
} }
public SET<IfcStyleAssignmentSelect> Styles { get { return mStyles; } } public SET<IfcStyleAssignmentSelect> Styles { get { return mStyles; } }
public string Name { get { return (mName == "$" ? "" : ParserIfc.Decode(mName)); } set { mName = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Name { get { return mName; } set { mName = value; } }
internal IfcStyledItem() : base() { } internal IfcStyledItem() : base() { }
internal IfcStyledItem(DatabaseIfc db, IfcStyledItem i, DuplicateOptions options) : base(db, i, options) internal IfcStyledItem(DatabaseIfc db, IfcStyledItem i, DuplicateOptions options) : base(db, i, options)
@ -2633,15 +2633,15 @@ additional types some additional representation types are given:
{ {
internal bool mRepeatS;// : BOOLEAN; internal bool mRepeatS;// : BOOLEAN;
internal bool mRepeatT;// : BOOLEAN; internal bool mRepeatT;// : BOOLEAN;
internal string mMode = "$"; //: OPTIONAL IfcIdentifier; ifc2x3 IfcSurfaceTextureEnum mTextureType;// internal string mMode = ""; //: OPTIONAL IfcIdentifier; ifc2x3 IfcSurfaceTextureEnum mTextureType;//
internal int mTextureTransform;// : OPTIONAL IfcCartesianTransformationOperator2D; internal IfcCartesianTransformationOperator2D mTextureTransform;// : OPTIONAL IfcCartesianTransformationOperator2D;
internal List<string> mParameter = new List<string>();// IFC4 OPTIONAL LIST [1:?] OF IfcIdentifier; internal List<string> mParameter = new List<string>();// IFC4 OPTIONAL LIST [1:?] OF IfcIdentifier;
public bool RepeatS { get { return mRepeatS; } set { mRepeatS = value; } } public bool RepeatS { get { return mRepeatS; } set { mRepeatS = value; } }
public bool RepeatT { get { return mRepeatT; } set { mRepeatT = value; } } public bool RepeatT { get { return mRepeatT; } set { mRepeatT = value; } }
public string Mode { get { return (mMode == "$" ? "" : ParserIfc.Decode(mMode)); } set { mMode = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Mode { get { return mMode; } set { mMode = value; } }
public IfcCartesianTransformationOperator2D TextureTransform { get { return mDatabase[mTextureTransform] as IfcCartesianTransformationOperator2D; } set { mTextureTransform = (value == null ? 0 : value.mIndex); } } public IfcCartesianTransformationOperator2D TextureTransform { get { return mTextureTransform; } set { mTextureTransform = value; } }
public ReadOnlyCollection<string> Parameter { get { return new ReadOnlyCollection<string>( mParameter.ConvertAll(x => ParserIfc.Decode(x))); } } public List<string> Parameter { get { return mParameter; } }
protected IfcSurfaceTexture() : base() { } protected IfcSurfaceTexture() : base() { }
protected IfcSurfaceTexture(DatabaseIfc db, IfcSurfaceTexture t) : base(db,t) { mRepeatS = t.mRepeatS; mRepeatT = t.mRepeatT; mMode = t.mMode; mTextureTransform = t.mTextureTransform; } protected IfcSurfaceTexture(DatabaseIfc db, IfcSurfaceTexture t) : base(db,t) { mRepeatS = t.mRepeatS; mRepeatT = t.mRepeatT; mMode = t.mMode; mTextureTransform = t.mTextureTransform; }
@ -2652,7 +2652,7 @@ additional types some additional representation types are given:
mRepeatS = t.mRepeatS; mRepeatS = t.mRepeatS;
mRepeatT = t.mRepeatT; mRepeatT = t.mRepeatT;
mMode = t.mMode; mMode = t.mMode;
if (t.mTextureTransform > 0) if (t.mTextureTransform != null)
TextureTransform = db.Factory.Duplicate(t.TextureTransform, options) as IfcCartesianTransformationOperator2D; TextureTransform = db.Factory.Duplicate(t.TextureTransform, options) as IfcCartesianTransformationOperator2D;
mParameter.AddRange(t.mParameter); mParameter.AddRange(t.mParameter);
} }

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

@ -32,11 +32,11 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public partial class IfcTable : BaseClassIfc, IfcMetricValueSelect, IfcObjectReferenceSelect, NamedObjectIfc public partial class IfcTable : BaseClassIfc, IfcMetricValueSelect, IfcObjectReferenceSelect, NamedObjectIfc
{ {
internal string mName = "$"; //: OPTIONAL IfcLabel; internal string mName = ""; //: OPTIONAL IfcLabel;
private LIST<IfcTableRow> mRows = new LIST<IfcTableRow>();// OPTIONAL LIST [1:?] OF IfcTableRow; private LIST<IfcTableRow> mRows = new LIST<IfcTableRow>();// OPTIONAL LIST [1:?] OF IfcTableRow;
private LIST<IfcTableColumn> mColumns = new LIST<IfcTableColumn>();// : OPTIONAL LIST [1:?] OF IfcTableColumn; private LIST<IfcTableColumn> mColumns = new LIST<IfcTableColumn>();// : OPTIONAL LIST [1:?] OF IfcTableColumn;
public string Name { get { return (mName == "$" ? "" : ParserIfc.Decode(mName)); } set { mName = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Name { get { return mName; } set { mName = value; } }
public LIST<IfcTableRow> Rows { get { return mRows; } } public LIST<IfcTableRow> Rows { get { return mRows; } }
public LIST<IfcTableColumn> Columns { get { return mColumns; } } public LIST<IfcTableColumn> Columns { get { return mColumns; } }
@ -51,7 +51,7 @@ namespace GeometryGym.Ifc
public IfcTable(string name, IEnumerable<IfcTableRow> rows, IEnumerable<IfcTableColumn> cols) public IfcTable(string name, IEnumerable<IfcTableRow> rows, IEnumerable<IfcTableColumn> cols)
: base(rows == null || rows.Count() == 0 ? cols.First().mDatabase : rows.First().mDatabase) : base(rows == null || rows.Count() == 0 ? cols.First().mDatabase : rows.First().mDatabase)
{ {
Name = name.Replace("'", ""); Name = name;
mRows.AddRange(rows); mRows.AddRange(rows);
mColumns.AddRange(cols); mColumns.AddRange(cols);
} }
@ -59,15 +59,15 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public partial class IfcTableColumn : BaseClassIfc, NamedObjectIfc public partial class IfcTableColumn : BaseClassIfc, NamedObjectIfc
{ {
internal string mIdentifier = "$";// : OPTIONAL IfcIdentifier; internal string mIdentifier = "";// : OPTIONAL IfcIdentifier;
internal string mName = "$";// : OPTIONAL IfcLabel; internal string mName = "";// : OPTIONAL IfcLabel;
internal string mDescription = "$";// : OPTIONAL IfcText; internal string mDescription = "";// : OPTIONAL IfcText;
internal int mUnit;// : OPTIONAL IfcUnit; internal int mUnit;// : OPTIONAL IfcUnit;
private int mReferencePath;// : OPTIONAL IfcReference; private int mReferencePath;// : OPTIONAL IfcReference;
public string Identifier { get { return (mIdentifier == "$" ? "" : ParserIfc.Decode(mIdentifier)); } set { mIdentifier = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Identifier { get { return mIdentifier; } set { mIdentifier = value; } }
public string Name { get { return (mName == "$" ? "" : ParserIfc.Decode(mName)); } set { mName = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Name { get { return mName; } set { mName = value; } }
public string Description { get { return (mDescription == "$" ? "" : ParserIfc.Decode(mDescription)); } set { mDescription = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Description { get { return mDescription; } set { mDescription = value; } }
public IfcUnit Unit { get { return mDatabase[mUnit] as IfcUnit; } set { mUnit = (value == null ? 0 : value.Index); } } public IfcUnit Unit { get { return mDatabase[mUnit] as IfcUnit; } set { mUnit = (value == null ? 0 : value.Index); } }
public IfcReference ReferencePath { get { return mDatabase[mReferencePath] as IfcReference; } set { mReferencePath = (value == null ? 0 : value.mIndex); } } public IfcReference ReferencePath { get { return mDatabase[mReferencePath] as IfcReference; } set { mReferencePath = (value == null ? 0 : value.mIndex); } }
@ -184,32 +184,32 @@ namespace GeometryGym.Ifc
public partial class IfcTaskTime : IfcSchedulingTime //IFC4 public partial class IfcTaskTime : IfcSchedulingTime //IFC4
{ {
internal IfcTaskDurationEnum mDurationType = IfcTaskDurationEnum.NOTDEFINED; // : OPTIONAL IfcTaskDurationEnum; internal IfcTaskDurationEnum mDurationType = IfcTaskDurationEnum.NOTDEFINED; // : OPTIONAL IfcTaskDurationEnum;
internal string mScheduleDuration = "$";// : OPTIONAL IfcDuration; internal IfcDuration mScheduleDuration = null;// : OPTIONAL IfcDuration;
internal DateTime mScheduleStart = DateTime.MinValue, mScheduleFinish = DateTime.MinValue, mEarlyStart = DateTime.MinValue, mEarlyFinish = DateTime.MinValue, mLateStart = DateTime.MinValue, mLateFinish = DateTime.MinValue; //: OPTIONAL IfcDateTime; internal DateTime mScheduleStart = DateTime.MinValue, mScheduleFinish = DateTime.MinValue, mEarlyStart = DateTime.MinValue, mEarlyFinish = DateTime.MinValue, mLateStart = DateTime.MinValue, mLateFinish = DateTime.MinValue; //: OPTIONAL IfcDateTime;
internal string mFreeFloat = "$", mTotalFloat = "$";// : OPTIONAL IfcDuration; internal IfcDuration mFreeFloat = null, mTotalFloat = null;// : OPTIONAL IfcDuration;
internal bool mIsCritical;// : OPTIONAL BOOLEAN; internal bool mIsCritical;// : OPTIONAL BOOLEAN;
internal DateTime mStatusTime = DateTime.MinValue;// : OPTIONAL IfcDateTime; internal DateTime mStatusTime = DateTime.MinValue;// : OPTIONAL IfcDateTime;
internal string mActualDuration = "$";// : OPTIONAL IfcDuration; internal IfcDuration mActualDuration = null;// : OPTIONAL IfcDuration;
internal DateTime mActualStart = DateTime.MinValue, mActualFinish = DateTime.MinValue;// : OPTIONAL IfcDateTime; internal DateTime mActualStart = DateTime.MinValue, mActualFinish = DateTime.MinValue;// : OPTIONAL IfcDateTime;
internal string mRemainingTime = "$";// : OPTIONAL IfcDuration; internal IfcDuration mRemainingTime = null;// : OPTIONAL IfcDuration;
internal double mCompletion = double.NaN;// : OPTIONAL IfcPositiveRatioMeasure; internal double mCompletion = double.NaN;// : OPTIONAL IfcPositiveRatioMeasure;
public IfcTaskDurationEnum DurationType { get { return mDurationType; } set { mDurationType = value; } } public IfcTaskDurationEnum DurationType { get { return mDurationType; } set { mDurationType = value; } }
public IfcDuration ScheduleDuration { get { return IfcDuration.Convert(mScheduleDuration); } set { mScheduleDuration = IfcDuration.Convert(value); } } public IfcDuration ScheduleDuration { get { return mScheduleDuration; } set { mScheduleDuration = value; } }
public DateTime ScheduleStart { get { return mScheduleStart; } set { mScheduleStart = value; } } public DateTime ScheduleStart { get { return mScheduleStart; } set { mScheduleStart = value; } }
public DateTime ScheduleFinish { get { return mScheduleFinish; } set { mScheduleFinish = value; } } public DateTime ScheduleFinish { get { return mScheduleFinish; } set { mScheduleFinish = value; } }
public DateTime EarlyStart { get { return mEarlyStart; } set { mEarlyStart = value; } } public DateTime EarlyStart { get { return mEarlyStart; } set { mEarlyStart = value; } }
public DateTime EarlyFinish { get { return mEarlyFinish; } set { mEarlyFinish = value; } } public DateTime EarlyFinish { get { return mEarlyFinish; } set { mEarlyFinish = value; } }
public DateTime LateStart { get { return mLateStart; } set { mLateStart = value; } } public DateTime LateStart { get { return mLateStart; } set { mLateStart = value; } }
public DateTime LateFinish { get { return mLateFinish; } set { mLateFinish = value; } } public DateTime LateFinish { get { return mLateFinish; } set { mLateFinish = value; } }
public IfcDuration FreeFloat { get { return IfcDuration.Convert(mFreeFloat); } set { mFreeFloat = IfcDuration.Convert(value); } } public IfcDuration FreeFloat { get { return mFreeFloat; } set { mFreeFloat = value; } }
public IfcDuration TotalFloat { get { return IfcDuration.Convert(mTotalFloat); } set { mTotalFloat = IfcDuration.Convert(value); } } public IfcDuration TotalFloat { get { return mTotalFloat; } set { mTotalFloat = value; } }
public bool IsCritical { get { return mIsCritical; } set { mIsCritical = value; } } public bool IsCritical { get { return mIsCritical; } set { mIsCritical = value; } }
public DateTime StatusTime { get { return mStatusTime; } set { mStatusTime = value; } } public DateTime StatusTime { get { return mStatusTime; } set { mStatusTime = value; } }
public IfcDuration ActualDuration { get { return IfcDuration.Convert(mActualDuration); } set { mActualDuration = IfcDuration.Convert(value); } } public IfcDuration ActualDuration { get { return mActualDuration; } set { mActualDuration = value; } }
public DateTime ActualStart { get { return mActualStart; } set { mActualStart = value; } } public DateTime ActualStart { get { return mActualStart; } set { mActualStart = value; } }
public DateTime ActualFinish { get { return mActualFinish; } set { mActualFinish = value; } } public DateTime ActualFinish { get { return mActualFinish; } set { mActualFinish = value; } }
public IfcDuration RemainingTime { get { return IfcDuration.Convert(mRemainingTime); } set { mRemainingTime = IfcDuration.Convert(value); } } public IfcDuration RemainingTime { get { return mRemainingTime; } set { mRemainingTime = value; } }
public double Completion { get { return mCompletion; } set { mCompletion = value; } } public double Completion { get { return mCompletion; } set { mCompletion = value; } }
internal IfcTaskTime() : base() { } internal IfcTaskTime() : base() { }
@ -236,10 +236,10 @@ namespace GeometryGym.Ifc
public partial class IfcTaskType : IfcTypeProcess //IFC4 public partial class IfcTaskType : IfcTypeProcess //IFC4
{ {
internal IfcTaskTypeEnum mPredefinedType = IfcTaskTypeEnum.NOTDEFINED;// : IfcTaskTypeEnum; internal IfcTaskTypeEnum mPredefinedType = IfcTaskTypeEnum.NOTDEFINED;// : IfcTaskTypeEnum;
private string mWorkMethod = "$";// : OPTIONAL IfcLabel; private string mWorkMethod = "";// : OPTIONAL IfcLabel;
public IfcTaskTypeEnum PredefinedType { get { return mPredefinedType; } set { mPredefinedType = value; } } public IfcTaskTypeEnum PredefinedType { get { return mPredefinedType; } set { mPredefinedType = value; } }
public string WorkMethod { get { return (mWorkMethod == "$" ? "" : ParserIfc.Decode(mWorkMethod)); } set { mWorkMethod = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string WorkMethod { get { return mWorkMethod; } set { mWorkMethod = value; } }
internal IfcTaskType() : base() { } internal IfcTaskType() : base() { }
internal IfcTaskType(DatabaseIfc db, IfcTaskType t, DuplicateOptions options) : base(db, t, options) { mPredefinedType = t.mPredefinedType; mWorkMethod = t.mWorkMethod; } internal IfcTaskType(DatabaseIfc db, IfcTaskType t, DuplicateOptions options) : base(db, t, options) { mPredefinedType = t.mPredefinedType; mWorkMethod = t.mWorkMethod; }
@ -435,9 +435,9 @@ namespace GeometryGym.Ifc
public partial class IfcTextStyleFontModel : IfcPreDefinedTextFont public partial class IfcTextStyleFontModel : IfcPreDefinedTextFont
{ {
internal List<string> mFontFamily = new List<string>(1);// : OPTIONAL LIST [1:?] OF IfcTextFontName; internal List<string> mFontFamily = new List<string>(1);// : OPTIONAL LIST [1:?] OF IfcTextFontName;
internal string mFontStyle = "$";// : OPTIONAL IfcFontStyle; ['normal','italic','oblique']; internal string mFontStyle = "";// : OPTIONAL IfcFontStyle; ['normal','italic','oblique'];
internal string mFontVariant = "$";// : OPTIONAL IfcFontVariant; ['normal','small-caps']; internal string mFontVariant = "";// : OPTIONAL IfcFontVariant; ['normal','small-caps'];
internal string mFontWeight = "$";// : OPTIONAL IfcFontWeight; // ['normal','small-caps','100','200','300','400','500','600','700','800','900']; internal string mFontWeight = "";// : OPTIONAL IfcFontWeight; // ['normal','small-caps','100','200','300','400','500','600','700','800','900'];
internal string mFontSize;// : IfcSizeSelect; IfcSizeSelect = SELECT (IfcRatioMeasure ,IfcLengthMeasure ,IfcDescriptiveMeasure ,IfcPositiveLengthMeasure ,IfcNormalisedRatioMeasure ,IfcPositiveRatioMeasure); internal string mFontSize;// : IfcSizeSelect; IfcSizeSelect = SELECT (IfcRatioMeasure ,IfcLengthMeasure ,IfcDescriptiveMeasure ,IfcPositiveLengthMeasure ,IfcNormalisedRatioMeasure ,IfcPositiveRatioMeasure);
internal IfcTextStyleFontModel() : base() { } internal IfcTextStyleFontModel() : base() { }
internal IfcTextStyleFontModel(DatabaseIfc db, IfcTextStyleFontModel m) : base(db, m) internal IfcTextStyleFontModel(DatabaseIfc db, IfcTextStyleFontModel m) : base(db, m)
@ -621,19 +621,19 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public abstract partial class IfcTimeSeries : BaseClassIfc, IfcMetricValueSelect, IfcObjectReferenceSelect, IfcResourceObjectSelect, NamedObjectIfc public abstract partial class IfcTimeSeries : BaseClassIfc, IfcMetricValueSelect, IfcObjectReferenceSelect, IfcResourceObjectSelect, NamedObjectIfc
{ // ABSTRACT SUPERTYPE OF (ONEOF(IfcIrregularTimeSeries,IfcRegularTimeSeries)); { // ABSTRACT SUPERTYPE OF (ONEOF(IfcIrregularTimeSeries,IfcRegularTimeSeries));
internal string mName = "$";// : OPTIONAL IfcLabel; internal string mName = "";// : OPTIONAL IfcLabel;
internal string mDescription;// : OPTIONAL IfcText; internal string mDescription = "";// : OPTIONAL IfcText;
internal int mStartTime;// : IfcDateTimeSelect; internal int mStartTime;// : IfcDateTimeSelect;
internal int mEndTime;// : IfcDateTimeSelect; internal int mEndTime;// : IfcDateTimeSelect;
internal IfcTimeSeriesDataTypeEnum mTimeSeriesDataType = IfcTimeSeriesDataTypeEnum.NOTDEFINED;// : IfcTimeSeriesDataTypeEnum; internal IfcTimeSeriesDataTypeEnum mTimeSeriesDataType = IfcTimeSeriesDataTypeEnum.NOTDEFINED;// : IfcTimeSeriesDataTypeEnum;
internal IfcDataOriginEnum mDataOrigin = IfcDataOriginEnum.NOTDEFINED;// : IfcDataOriginEnum; internal IfcDataOriginEnum mDataOrigin = IfcDataOriginEnum.NOTDEFINED;// : IfcDataOriginEnum;
internal string mUserDefinedDataOrigin = "$";// : OPTIONAL IfcLabel; internal string mUserDefinedDataOrigin = "";// : OPTIONAL IfcLabel;
internal int mUnit;// : OPTIONAL IfcUnit; internal int mUnit;// : OPTIONAL IfcUnit;
//INVERSE //INVERSE
private SET<IfcExternalReferenceRelationship> mHasExternalReference = new SET<IfcExternalReferenceRelationship>(); //IFC4 SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects; private SET<IfcExternalReferenceRelationship> mHasExternalReference = new SET<IfcExternalReferenceRelationship>(); //IFC4 SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects;
internal SET<IfcResourceConstraintRelationship> mHasConstraintRelationships = new SET<IfcResourceConstraintRelationship>(); //gg internal SET<IfcResourceConstraintRelationship> mHasConstraintRelationships = new SET<IfcResourceConstraintRelationship>(); //gg
public string Name { get { return (mName == "$" ? "" : ParserIfc.Decode(mName)); } set { mName = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Name { get { return mName; } set { mName = value; } }
public SET<IfcExternalReferenceRelationship> HasExternalReference { get { return mHasExternalReference; } } public SET<IfcExternalReferenceRelationship> HasExternalReference { get { return mHasExternalReference; } }
public SET<IfcResourceConstraintRelationship> HasConstraintRelationships { get { return mHasConstraintRelationships; } } public SET<IfcResourceConstraintRelationship> HasConstraintRelationships { get { return mHasConstraintRelationships; } }
@ -1117,12 +1117,12 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public partial class IfcTypeObject : IfcObjectDefinition //(IfcTypeProcess, IfcTypeProduct, IfcTypeResource) IFC4 ABSTRACT public partial class IfcTypeObject : IfcObjectDefinition //(IfcTypeProcess, IfcTypeProduct, IfcTypeResource) IFC4 ABSTRACT
{ {
internal string mApplicableOccurrence = "$";// : OPTIONAL IfcLabel; internal string mApplicableOccurrence = "";// : OPTIONAL IfcLabel;
internal SET<IfcPropertySetDefinition> mHasPropertySets = new SET<IfcPropertySetDefinition>();// : OPTIONAL SET [1:?] OF IfcPropertySetDefinition internal SET<IfcPropertySetDefinition> mHasPropertySets = new SET<IfcPropertySetDefinition>();// : OPTIONAL SET [1:?] OF IfcPropertySetDefinition
//INVERSE //INVERSE
internal IfcRelDefinesByType mTypes = null; internal IfcRelDefinesByType mTypes = null;
public string ApplicableOccurrence { get { return (mApplicableOccurrence == "$" ? "" : ParserIfc.Decode(mApplicableOccurrence)); } set { mApplicableOccurrence = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string ApplicableOccurrence { get { return mApplicableOccurrence; } set { mApplicableOccurrence = value; } }
public SET<IfcPropertySetDefinition> HasPropertySets { get { return mHasPropertySets; } } public SET<IfcPropertySetDefinition> HasPropertySets { get { return mHasPropertySets; } }
public IfcRelDefinesByType Types { get { return mTypes; } } public IfcRelDefinesByType Types { get { return mTypes; } }
[Obsolete("RENAMED IFC4", false)] [Obsolete("RENAMED IFC4", false)]
@ -1433,15 +1433,15 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public abstract partial class IfcTypeProcess : IfcTypeObject, IfcProcessSelect //ABSTRACT SUPERTYPE OF(ONEOF(IfcEventType, IfcProcedureType, IfcTaskType)) public abstract partial class IfcTypeProcess : IfcTypeObject, IfcProcessSelect //ABSTRACT SUPERTYPE OF(ONEOF(IfcEventType, IfcProcedureType, IfcTaskType))
{ {
private string mIdentification = "$";// : OPTIONAL IfcIdentifier; private string mIdentification = "";// : OPTIONAL IfcIdentifier;
private string mLongDescription = "$";// : OPTIONAL IfcText; private string mLongDescription = "";// : OPTIONAL IfcText;
private string mProcessType = "$";// : OPTIONAL IfcLabel; private string mProcessType = "";// : OPTIONAL IfcLabel;
//INVERSE //INVERSE
internal SET<IfcRelAssignsToProcess> mOperatesOn = new SET<IfcRelAssignsToProcess>();// : SET [0:?] OF IfcRelAssignsToProcess FOR RelatingProcess; internal SET<IfcRelAssignsToProcess> mOperatesOn = new SET<IfcRelAssignsToProcess>();// : SET [0:?] OF IfcRelAssignsToProcess FOR RelatingProcess;
public string Identification { get { return (mIdentification == "$" ? "" : ParserIfc.Decode(mIdentification)); } set { mIdentification = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Identification { get { return mIdentification; } set { mIdentification = value; } }
public string LongDescription { get { return (mLongDescription == "$" ? "" : ParserIfc.Decode(mLongDescription)); } set { mLongDescription = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string LongDescription { get { return mLongDescription; } set { mLongDescription = value; } }
public string ProcessType { get { return (mProcessType == "$" ? "" : ParserIfc.Decode(mProcessType)); } set { mProcessType = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string ProcessType { get { return mProcessType; } set { mProcessType = value; } }
//INVERSE //INVERSE
public SET<IfcRelAssignsToProcess> OperatesOn { get { return mOperatesOn; } } public SET<IfcRelAssignsToProcess> OperatesOn { get { return mOperatesOn; } }
@ -1453,12 +1453,12 @@ namespace GeometryGym.Ifc
public partial class IfcTypeProduct : IfcTypeObject, IfcProductSelect //SUPERTYPE OF (ONEOF (IfcDoorStyle ,IfcElementType ,IfcSpatialElementType ,IfcWindowStyle)) public partial class IfcTypeProduct : IfcTypeObject, IfcProductSelect //SUPERTYPE OF (ONEOF (IfcDoorStyle ,IfcElementType ,IfcSpatialElementType ,IfcWindowStyle))
{ {
internal LIST<IfcRepresentationMap> mRepresentationMaps = new LIST<IfcRepresentationMap>();// : OPTIONAL LIST [1:?] OF UNIQUE IfcRepresentationMap; internal LIST<IfcRepresentationMap> mRepresentationMaps = new LIST<IfcRepresentationMap>();// : OPTIONAL LIST [1:?] OF UNIQUE IfcRepresentationMap;
private string mTag = "$";// : OPTIONAL IfcLabel private string mTag = "";// : OPTIONAL IfcLabel
//INVERSE //INVERSE
internal SET<IfcRelAssignsToProduct> mReferencedBy = new SET<IfcRelAssignsToProduct>();// : SET OF IfcRelAssignsToProduct FOR RelatingProduct; internal SET<IfcRelAssignsToProduct> mReferencedBy = new SET<IfcRelAssignsToProduct>();// : SET OF IfcRelAssignsToProduct FOR RelatingProduct;
public LIST<IfcRepresentationMap> RepresentationMaps { get { return mRepresentationMaps; } set { mRepresentationMaps.Clear(); if (value != null) { mRepresentationMaps.CollectionChanged -= mRepresentationMaps_CollectionChanged; mRepresentationMaps = value; mRepresentationMaps.CollectionChanged += mRepresentationMaps_CollectionChanged; } } } public LIST<IfcRepresentationMap> RepresentationMaps { get { return mRepresentationMaps; } set { mRepresentationMaps.Clear(); if (value != null) { mRepresentationMaps.CollectionChanged -= mRepresentationMaps_CollectionChanged; mRepresentationMaps = value; mRepresentationMaps.CollectionChanged += mRepresentationMaps_CollectionChanged; } } }
public string Tag { get { return (mTag == "$" ? "" : mTag); } set { mTag = (string.IsNullOrEmpty(value) ? "$" : value); } } public string Tag { get { return mTag; } set { mTag = value; } }
public SET<IfcRelAssignsToProduct> ReferencedBy { get { return mReferencedBy; } } public SET<IfcRelAssignsToProduct> ReferencedBy { get { return mReferencedBy; } }
protected IfcTypeProduct() : base() { } protected IfcTypeProduct() : base() { }
@ -1627,15 +1627,15 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public abstract partial class IfcTypeResource : IfcTypeObject, IfcResourceSelect //ABSTRACT SUPERTYPE OF(IfcConstructionResourceType) public abstract partial class IfcTypeResource : IfcTypeObject, IfcResourceSelect //ABSTRACT SUPERTYPE OF(IfcConstructionResourceType)
{ {
internal string mIdentification = "$";// : OPTIONAL IfcIdentifier; internal string mIdentification = "";// : OPTIONAL IfcIdentifier;
internal string mLongDescription = "$";// : OPTIONAL IfcText; internal string mLongDescription = "";// : OPTIONAL IfcText;
internal string mResourceType = "$";// : OPTIONAL IfcLabel; internal string mResourceType = "";// : OPTIONAL IfcLabel;
//INVERSE //INVERSE
internal SET<IfcRelAssignsToResource> mResourceOf = new SET<IfcRelAssignsToResource>();// : SET [0:?] OF IfcRelAssignsToResource FOR RelatingResource; internal SET<IfcRelAssignsToResource> mResourceOf = new SET<IfcRelAssignsToResource>();// : SET [0:?] OF IfcRelAssignsToResource FOR RelatingResource;
public string Identification { get { return (mIdentification == "$" ? "" : ParserIfc.Decode(mIdentification)); } set { mIdentification = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string Identification { get { return mIdentification; } set { mIdentification = value; } }
public string LongDescription { get { return (mLongDescription == "$" ? "" : ParserIfc.Decode(mLongDescription)); } set { mLongDescription = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string LongDescription { get { return mLongDescription; } set { mLongDescription = value; } }
public string ResourceType { get { return (mResourceType == "$" ? "" : ParserIfc.Decode(mResourceType)); } set { mResourceType = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string ResourceType { get { return mResourceType; } set { mResourceType = value; } }
//INVERSE //INVERSE
public SET<IfcRelAssignsToResource> ResourceOf { get { return mResourceOf; } } public SET<IfcRelAssignsToResource> ResourceOf { get { return mResourceOf; } }

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

@ -823,7 +823,7 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public partial class IfcTime : IfcSimpleValue public partial class IfcTime : IfcSimpleValue
{ {
internal string mTime = "$"; internal string mTime = "";
public override string ToString() { return mTime; } public override string ToString() { return mTime; }
public override object Value { get { return parseSTEP(mTime); } set { mTime = formatSTEP(Convert.ToDateTime(value)); } } public override object Value { get { return parseSTEP(mTime); } set { mTime = formatSTEP(Convert.ToDateTime(value)); } }
public override Type ValueType { get { return typeof(DateTime); } } public override Type ValueType { get { return typeof(DateTime); } }

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

@ -143,13 +143,13 @@ namespace GeometryGym.Ifc
internal double mOverallWidth = double.NaN;// : OPTIONAL IfcPositiveLengthMeasure; internal double mOverallWidth = double.NaN;// : OPTIONAL IfcPositiveLengthMeasure;
internal IfcWindowTypeEnum mPredefinedType = IfcWindowTypeEnum.NOTDEFINED;// : OPTIONAL IfcWindowTypeEnum; internal IfcWindowTypeEnum mPredefinedType = IfcWindowTypeEnum.NOTDEFINED;// : OPTIONAL IfcWindowTypeEnum;
internal IfcWindowTypePartitioningEnum mPartitioningType = IfcWindowTypePartitioningEnum.NOTDEFINED;// : OPTIONAL IfcWindowTypePartitioningEnum; internal IfcWindowTypePartitioningEnum mPartitioningType = IfcWindowTypePartitioningEnum.NOTDEFINED;// : OPTIONAL IfcWindowTypePartitioningEnum;
internal string mUserDefinedPartitioningType = "$";//: OPTIONAL IfcLabel; internal string mUserDefinedPartitioningType = "";//: OPTIONAL IfcLabel;
public double OverallHeight { get { return mOverallHeight; } set { mOverallHeight = (value > 0 ? value : double.NaN); } } public double OverallHeight { get { return mOverallHeight; } set { mOverallHeight = (value > 0 ? value : double.NaN); } }
public double OverallWidth { get { return mOverallWidth; } set { mOverallWidth = (value > 0 ? value : double.NaN); } } public double OverallWidth { get { return mOverallWidth; } set { mOverallWidth = (value > 0 ? value : double.NaN); } }
public IfcWindowTypeEnum PredefinedType { get { return mPredefinedType; } set { mPredefinedType = value; } } public IfcWindowTypeEnum PredefinedType { get { return mPredefinedType; } set { mPredefinedType = value; } }
public IfcWindowTypePartitioningEnum PartitioningType { get { return mPartitioningType; } set { mPartitioningType = value; } } public IfcWindowTypePartitioningEnum PartitioningType { get { return mPartitioningType; } set { mPartitioningType = value; } }
public string UserDefinedPartitioningType { get { return (mUserDefinedPartitioningType == "$" ? "" : ParserIfc.Decode(mUserDefinedPartitioningType)); } set { mUserDefinedPartitioningType = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string UserDefinedPartitioningType { get { return mUserDefinedPartitioningType; } set { mUserDefinedPartitioningType = value; } }
internal IfcWindow() : base() { } internal IfcWindow() : base() { }
internal IfcWindow(DatabaseIfc db, IfcWindow w, DuplicateOptions options) : base(db, w, options) { mOverallHeight = w.mOverallHeight; mOverallWidth = w.mOverallWidth; mPredefinedType = w.mPredefinedType; mPartitioningType = w.mPartitioningType; mUserDefinedPartitioningType = w.mUserDefinedPartitioningType; } internal IfcWindow(DatabaseIfc db, IfcWindow w, DuplicateOptions options) : base(db, w, options) { mOverallHeight = w.mOverallHeight; mOverallWidth = w.mOverallWidth; mPredefinedType = w.mPredefinedType; mPartitioningType = w.mPartitioningType; mUserDefinedPartitioningType = w.mUserDefinedPartitioningType; }

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

@ -31,8 +31,8 @@ namespace GeometryGym.Ifc
[Serializable] [Serializable]
public partial class IfcZone : IfcSystem public partial class IfcZone : IfcSystem
{ {
internal string mLongName = "$";// : OPTIONAL IfcLabel; IFC4 internal string mLongName = "";// : OPTIONAL IfcLabel; IFC4
public string LongName { get { return (mLongName == "$" ? "" : ParserIfc.Decode(mLongName)); } set { mLongName = (string.IsNullOrEmpty(value) ? "$" : ParserIfc.Encode(value)); } } public string LongName { get { return mLongName; } set { mLongName = value; } }
internal IfcZone() : base() { } internal IfcZone() : base() { }
internal IfcZone(DatabaseIfc db, IfcZone z, DuplicateOptions options) : base(db, z, options) { mLongName = z.mLongName; } internal IfcZone(DatabaseIfc db, IfcZone z, DuplicateOptions options) : base(db, z, options) { mLongName = z.mLongName; }

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

@ -485,7 +485,7 @@ namespace GeometryGym.Ifc
if (jobj != null) if (jobj != null)
UnitBasis = mDatabase.ParseJObject<IfcMeasureWithUnit>(jobj); UnitBasis = mDatabase.ParseJObject<IfcMeasureWithUnit>(jobj);
mDatabase.extractJArray<IfcAppliedValue>(obj.GetValue("Components", StringComparison.InvariantCultureIgnoreCase) as JArray).ForEach(x=>addComponent(x)); Components.AddRange(mDatabase.extractJArray<IfcAppliedValue>(obj.GetValue("Components", StringComparison.InvariantCultureIgnoreCase) as JArray));
List <IfcExternalReferenceRelationship> ers = mDatabase.extractJArray<IfcExternalReferenceRelationship>(obj.GetValue("HasExternalReference", StringComparison.InvariantCultureIgnoreCase) as JArray); List <IfcExternalReferenceRelationship> ers = mDatabase.extractJArray<IfcExternalReferenceRelationship>(obj.GetValue("HasExternalReference", StringComparison.InvariantCultureIgnoreCase) as JArray);

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

@ -333,7 +333,7 @@ namespace GeometryGym.Ifc
{ {
base.setJSON(obj, host, options); base.setJSON(obj, host, options);
setAttribute(obj, "Description", Description); setAttribute(obj, "Description", Description);
if (mReferencedDocument > 0) if (mReferencedDocument != null)
obj["ReferencedDocument"] = ReferencedDocument.getJson(this, options); obj["ReferencedDocument"] = ReferencedDocument.getJson(this, options);
} }
} }

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

@ -459,7 +459,7 @@ namespace GeometryGym.Ifc
if (str.StartsWith("IFCIDENTIFIER(")) if (str.StartsWith("IFCIDENTIFIER("))
return new IfcIdentifier(ParserIfc.Decode(str.Substring(15, str.Length - 17))); return new IfcIdentifier(ParserIfc.Decode(str.Substring(15, str.Length - 17)));
if (str.StartsWith("IFCINTEGER(")) if (str.StartsWith("IFCINTEGER("))
return new IfcInteger(int.Parse(str.Substring(11, str.Length - 12))); return new IfcInteger(long.Parse(str.Substring(11, str.Length - 12)));
if (str.StartsWith("IFCLABEL(")) if (str.StartsWith("IFCLABEL("))
{ {
if (str.Length <= 12) if (str.Length <= 12)

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

@ -83,6 +83,28 @@ namespace GeometryGym.Ifc
public Pset_ActuatorTypeRotationalActuation(IfcActuator instance) : base(instance) { } public Pset_ActuatorTypeRotationalActuation(IfcActuator instance) : base(instance) { }
public Pset_ActuatorTypeRotationalActuation(IfcActuatorType type) : base(type) { } public Pset_ActuatorTypeRotationalActuation(IfcActuatorType type) : base(type) { }
} }
public partial class Pset_Address : IfcPropertySet
{
public IfcAddressTypeEnum Purpose { set { AddProperty(new IfcPropertyEnumeratedValue(mDatabase, "Purpose", new IfcLabel(value.ToString()))); } }
public string AddressDescription { set { AddProperty(new IfcPropertySingleValue(mDatabase, "Description", new IfcText(value))); } }
public string UserDefinedPurpose { set { AddProperty(new IfcPropertySingleValue(mDatabase, "UserDefinedPurpose", new IfcLabel(value))); } }
public string InternalLocation { set { AddProperty(new IfcPropertySingleValue(mDatabase, "InternalLocation", new IfcLabel(value))); } }
public IfcPropertyListValue<IfcLabel> AddressLines { set { value.Name = "AddressLines"; addProperty(value); } }
public string PostalBox { set { AddProperty(new IfcPropertySingleValue(mDatabase, "PostalBox", new IfcLabel(value))); } }
public string Town { set { AddProperty(new IfcPropertySingleValue(mDatabase, "Town", new IfcLabel(value))); } }
public string Region { set { AddProperty(new IfcPropertySingleValue(mDatabase, "Region", new IfcLabel(value))); } }
public string PostalCode { set { AddProperty(new IfcPropertySingleValue(mDatabase, "PostalCode", new IfcLabel(value))); } }
public string Country { set { AddProperty(new IfcPropertySingleValue(mDatabase, "Country", new IfcLabel(value))); } }
public IfcPropertyListValue<IfcLabel> TelephoneNumbers { set { value.Name = "TelephoneNumbers"; addProperty(value); } }
public IfcPropertyListValue<IfcLabel> FacsimileNumbers { set { value.Name = "FacsimileNumbers"; addProperty(value); } }
public string PagerNumber { set { AddProperty(new IfcPropertySingleValue(mDatabase, "PagerNumber", new IfcLabel(value))); } }
public IfcPropertyListValue<IfcLabel> ElectronicMailAddresses { set { value.Name = "ElectronicMailAddresses"; addProperty(value); } }
public string WWWHomePageURL { set { AddProperty(new IfcPropertySingleValue(mDatabase, "WWWHomePageURL", new IfcURIReference(value))); } }
public IfcPropertyListValue<IfcURIReference> MessagingIDs { set { value.Name = "MessagingIDs"; addProperty(value); } }
public Pset_Address(IfcBuilding instance) : base(instance) { }
public Pset_Address(IfcActor instance) : base(instance) { }
public Pset_Address(IfcFacility instance) : base(instance) { }
}
public partial class Pset_AirSideSystemInformation : IfcPropertySet public partial class Pset_AirSideSystemInformation : IfcPropertySet
{ {
public string Name { set { AddProperty(new IfcPropertySingleValue(mDatabase, "Name", new IfcLabel(value))); } } public string Name { set { AddProperty(new IfcPropertySingleValue(mDatabase, "Name", new IfcLabel(value))); } }

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

@ -49,14 +49,22 @@ namespace GeometryGym.Ifc
} }
public partial class IfcActorRole public partial class IfcActorRole
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return "." + (release < ReleaseVersion.IFC4 && mRole == IfcRoleEnum.COMMISSIONINGENGINEER ? "COMISSIONINGENGINEER" : mRole.ToString()) + (mUserDefinedRole == "$" ? ".,$," : ".,'" + mUserDefinedRole + "',") + (mDescription == "$" ? "$" : "'" + mDescription + "'"); } protected override string BuildStringSTEP(ReleaseVersion release)
{
return "." + (release < ReleaseVersion.IFC4 && mRole == IfcRoleEnum.COMMISSIONINGENGINEER ? "COMISSIONINGENGINEER" : mRole.ToString()) +
(string.IsNullOrEmpty( mUserDefinedRole) ? ".,$," : ".,'" + ParserIfc.Encode(mUserDefinedRole) + "',") + (string.IsNullOrEmpty(mDescription) ? "$" : "'" + ParserIfc.Encode(mDescription) + "'"); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary)
{ {
string s = ParserSTEP.StripField(str, ref pos, len); string s = ParserSTEP.StripField(str, ref pos, len);
if (s != "$") if (s.StartsWith("."))
mRole = (string.Compare(s, "COMISSIONINGENGINEER", true) == 0 ? IfcRoleEnum.COMMISSIONINGENGINEER : (IfcRoleEnum)Enum.Parse(typeof(IfcRoleEnum), s.Replace(".", ""))); {
mUserDefinedRole = ParserSTEP.StripString(str, ref pos, len); if (string.Compare(s, "COMISSIONINGENGINEER", true) == 0)
mDescription = ParserSTEP.StripString(str, ref pos, len); mRole = IfcRoleEnum.COMMISSIONINGENGINEER;
else
Enum.TryParse<IfcRoleEnum>( s.Replace(".", ""), out mRole);
}
mUserDefinedRole = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcActuator public partial class IfcActuator
@ -89,14 +97,19 @@ namespace GeometryGym.Ifc
} }
public abstract partial class IfcAddress public abstract partial class IfcAddress
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return (mPurpose == IfcAddressTypeEnum.NOTDEFINED ? "$," : "." + mPurpose.ToString() + ".,") + (mDescription == "$" ? "$," : "'" + mDescription + "',") + (mUserDefinedPurpose == "$" ? "$" : "'" + mUserDefinedPurpose + "'"); } protected override string BuildStringSTEP(ReleaseVersion release)
{
return (mPurpose == IfcAddressTypeEnum.NOTDEFINED ? "$," : "." + mPurpose.ToString() + ".,") +
(string.IsNullOrEmpty(mDescription) ? "$," : "'" + ParserIfc.Encode(mDescription) + "',") +
(string.IsNullOrEmpty(mUserDefinedPurpose) ? "$" : "'" + ParserIfc.Encode(mUserDefinedPurpose) + "'");
}
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary)
{ {
string s = ParserSTEP.StripField(str, ref pos, len); string s = ParserSTEP.StripField(str, ref pos, len);
if (s.StartsWith(".")) if (s.StartsWith("."))
Enum.TryParse<IfcAddressTypeEnum>(s.Replace(".", ""), true, out mPurpose); Enum.TryParse<IfcAddressTypeEnum>(s.Replace(".", ""), true, out mPurpose);
mDescription = ParserSTEP.StripString(str, ref pos, len); mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mUserDefinedPurpose = ParserSTEP.StripString(str, ref pos, len); mUserDefinedPurpose = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcAdvancedBrep public partial class IfcAdvancedBrep
@ -322,13 +335,13 @@ namespace GeometryGym.Ifc
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
return (mTangentialContinuity == IfcLogicalEnum.UNKNOWN ? "$," : (mTangentialContinuity == IfcLogicalEnum.TRUE ? ".T.," : ".F.,")) + return (mTangentialContinuity == IfcLogicalEnum.UNKNOWN ? "$," : (mTangentialContinuity == IfcLogicalEnum.TRUE ? ".T.," : ".F.,")) +
(mStartTag == "$" ? "$," : "'" + mStartTag + "',") + (mEndTag == "$" ? "$" : "'" + mEndTag + "'"); (string.IsNullOrEmpty(mStartTag) ? "$," : "'" + ParserIfc.Encode(mStartTag) + "',") + (string.IsNullOrEmpty(mEndTag) ? "$" : "'" + ParserIfc.Encode(mEndTag) + "'");
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary)
{ {
mTangentialContinuity = ParserIfc.StripLogical(str, ref pos, len); mTangentialContinuity = ParserIfc.StripLogical(str, ref pos, len);
mStartTag = ParserSTEP.StripString(str, ref pos, len); mStartTag = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mEndTag = ParserSTEP.StripString(str, ref pos, len); mEndTag = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcAlignment2DVerSegCircularArc public partial class IfcAlignment2DVerSegCircularArc
@ -416,13 +429,13 @@ namespace GeometryGym.Ifc
{ {
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
return ParserSTEP.ObjToLinkString(mHorizontal) + "," + ParserSTEP.ObjToLinkString(mVertical) + "," + (mTag == "$" ? "$" : "'" + mTag + "'"); return ParserSTEP.ObjToLinkString(mHorizontal) + "," + ParserSTEP.ObjToLinkString(mVertical) + "," + (string.IsNullOrEmpty(mTag) ? "$" : "'" + ParserIfc.Encode(mTag) + "'");
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary)
{ {
mHorizontal = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcAlignment2DHorizontal; mHorizontal = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcAlignment2DHorizontal;
Vertical = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcAlignment2DVertical; Vertical = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcAlignment2DVertical;
mTag = ParserSTEP.StripString(str, ref pos, len); mTag = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcAlignmentHorizontal public partial class IfcAlignmentHorizontal
@ -600,7 +613,7 @@ namespace GeometryGym.Ifc
{ {
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
string result = (mName == "$" ? "$," : "'" + mName + "',") + (mDescription == "$" ? "$," : "'" + mDescription + "',"); string result = (string.IsNullOrEmpty(mName) ? "$," : "'" + ParserIfc.Encode(mName) + "',") + (string.IsNullOrEmpty( mDescription) ? "$," : "'" + ParserIfc.Encode(mDescription) + "',");
if (mAppliedValue == null) if (mAppliedValue == null)
result += "$"; result += "$";
else else
@ -615,14 +628,14 @@ namespace GeometryGym.Ifc
if (release < ReleaseVersion.IFC4) if (release < ReleaseVersion.IFC4)
return result + (mSSApplicableDate == null ? ",$" : ",#" + mSSApplicableDate.Index) + (mSSFixedUntilDate == null ? ",$" : ",#" + mSSFixedUntilDate.Index); return result + (mSSApplicableDate == null ? ",$" : ",#" + mSSApplicableDate.Index) + (mSSFixedUntilDate == null ? ",$" : ",#" + mSSFixedUntilDate.Index);
result += IfcDate.STEPAttribute(mApplicableDate) + "," + IfcDate.STEPAttribute(mFixedUntilDate); result += IfcDate.STEPAttribute(mApplicableDate) + "," + IfcDate.STEPAttribute(mFixedUntilDate);
result += (mCategory == "$" ? ",$," : ",'" + mCategory + "',") + (mCondition == "$" ? "$," : "'" + mCondition + "',"); result += (string.IsNullOrEmpty(mCategory) ? ",$," : ",'" + ParserIfc.Encode(mCategory) + "',") + (string.IsNullOrEmpty(mCondition) ? "$," : "'" + ParserIfc.Encode(mCondition) + "',");
return result + (mArithmeticOperator == IfcArithmeticOperatorEnum.NONE ? "$," : "." + mArithmeticOperator.ToString() + ".,") return result + (mArithmeticOperator == IfcArithmeticOperatorEnum.NONE ? "$," : "." + mArithmeticOperator.ToString() + ".,")
+ (mComponents.Count == 0 ? "$" : "(#" + string.Join(",#", mComponents.Select(x => x.StepId)) + ")"); ; + (mComponents.Count == 0 ? "$" : "(" + string.Join(",", mComponents.Select(x => "#" + x.StepId)) + ")"); ;
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
{ {
mName = ParserSTEP.StripString(str, ref pos, len); mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mDescription = ParserSTEP.StripString(str, ref pos, len); mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
string s = ParserSTEP.StripField(str, ref pos, len); string s = ParserSTEP.StripField(str, ref pos, len);
if(s.StartsWith("IFC")) if(s.StartsWith("IFC"))
mAppliedValue = ParserIfc.parseValue(s); mAppliedValue = ParserIfc.parseValue(s);
@ -638,8 +651,8 @@ namespace GeometryGym.Ifc
{ {
mApplicableDate = IfcDate.ParseSTEP(ParserSTEP.StripString(str, ref pos, len)); mApplicableDate = IfcDate.ParseSTEP(ParserSTEP.StripString(str, ref pos, len));
mFixedUntilDate = IfcDate.ParseSTEP(ParserSTEP.StripString(str, ref pos, len)); mFixedUntilDate = IfcDate.ParseSTEP(ParserSTEP.StripString(str, ref pos, len));
mCategory = ParserSTEP.StripString(str, ref pos, len); mCategory = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mCondition = ParserSTEP.StripString(str, ref pos, len); mCondition = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
s = ParserSTEP.StripField(str, ref pos, len); s = ParserSTEP.StripField(str, ref pos, len);
if (s.StartsWith(".")) if (s.StartsWith("."))
Enum.TryParse<IfcArithmeticOperatorEnum>(s.Replace(".", ""), true, out mArithmeticOperator); Enum.TryParse<IfcArithmeticOperatorEnum>(s.Replace(".", ""), true, out mArithmeticOperator);
@ -665,16 +678,48 @@ namespace GeometryGym.Ifc
} }
public partial class IfcApproval public partial class IfcApproval
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return mDescription + "," + ParserSTEP.LinkToString(mApprovalDateTime) + "," + mApprovalStatus + "," + mApprovalLevel + "," + mApprovalQualifier + "," + mName + "," + mIdentifier; } protected override string BuildStringSTEP(ReleaseVersion release)
{
if(release < ReleaseVersion.IFC4)
return (string.IsNullOrEmpty(mDescription) ? "$,#" : "'" + ParserIfc.Encode(mDescription) + "',#") +
mApprovalDateTime.StepId + (string.IsNullOrEmpty(mStatus) ? ",$," : ",'" + ParserIfc.Encode(mStatus) + "',") +
(string.IsNullOrEmpty(mLevel) ? "$," : "'" + ParserIfc.Encode(mLevel) + "',") +
(string.IsNullOrEmpty(mQualifier) ? "$," : "'" + ParserIfc.Encode(mQualifier) + "',") +
(string.IsNullOrEmpty(mName) ? "$," : "'" + ParserIfc.Encode(mName) + "',") +
(string.IsNullOrEmpty(mIdentifier) ? "$" : "'" + ParserIfc.Encode(mIdentifier) + "'");
return (string.IsNullOrEmpty(mIdentifier) ? "$," : "'" + ParserIfc.Encode(mIdentifier) + "',") +
(string.IsNullOrEmpty(mName) ? "$," : "'" + ParserIfc.Encode(mName) + "',") +
(string.IsNullOrEmpty(mDescription) ? "$," : "'" + ParserIfc.Encode(mDescription) + "',") +
IfcDate.STEPAttribute(mTimeOfApproval) +
(string.IsNullOrEmpty(mStatus) ? ",$," : ",'" + ParserIfc.Encode(mStatus) + "',") +
(string.IsNullOrEmpty(mLevel) ? "$," : "'" + ParserIfc.Encode(mLevel) + "',") +
(string.IsNullOrEmpty(mQualifier) ? "$," : "'" + ParserIfc.Encode(mQualifier) + "',") +
(mRequestingApproval == null ? "$," : "#," + mRequestingApproval.StepId) + (mGivingApproval == null ? "$" : "#" + mGivingApproval.StepId);
}
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
{ {
mDescription = ParserSTEP.StripString(str, ref pos, len); if (release < ReleaseVersion.IFC4)
mApprovalDateTime = ParserSTEP.StripLink(str, ref pos, len); {
mApprovalStatus = ParserSTEP.StripString(str, ref pos, len); mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mApprovalLevel = ParserSTEP.StripString(str, ref pos, len); mApprovalDateTime = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcDateTimeSelect;
mApprovalQualifier = ParserSTEP.StripString(str, ref pos, len); mStatus = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mName = ParserSTEP.StripString(str, ref pos, len); mLevel = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mIdentifier = ParserSTEP.StripString(str, ref pos, len); mQualifier = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mIdentifier = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
}
else
{
mIdentifier = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mTimeOfApproval = IfcDate.ParseSTEP(ParserSTEP.StripString(str, ref pos, len));
mStatus = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mLevel = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mQualifier = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
RequestingApproval = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcActorSelect;
GivingApproval = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcActorSelect;
}
} }
} }
public partial class IfcApprovalActorRelationship public partial class IfcApprovalActorRelationship

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

@ -146,10 +146,10 @@ namespace GeometryGym.Ifc
} }
public abstract partial class IfcBoundaryCondition public abstract partial class IfcBoundaryCondition
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return (mName == "$" ? "$" : "'" + mName + "'"); } protected override string BuildStringSTEP(ReleaseVersion release) { return (string.IsNullOrEmpty(mName) ? "$" : "'" + ParserIfc.Encode(mName) + "'"); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
{ {
mName = ParserSTEP.StripString(str, ref pos, len); mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcBoundaryEdgeCondition public partial class IfcBoundaryEdgeCondition

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

@ -468,26 +468,26 @@ namespace GeometryGym.Ifc
if (mReferenceTokens.Count > 0) if (mReferenceTokens.Count > 0)
tokens = "('" + string.Join("','", mReferenceTokens) + "')"; tokens = "('" + string.Join("','", mReferenceTokens) + "')";
bool older = mDatabase.Release <= ReleaseVersion.IFC2x3; bool older = mDatabase.Release <= ReleaseVersion.IFC2x3;
string result = (mSource == "$" ? (older ? "'Unknown'," : "$,") : "'" + mSource + "',") + string result = (string.IsNullOrEmpty(mSource) ? (older ? "'Unknown'," : "$,") : "'" + ParserIfc.Encode(mSource) + "',") +
(mEdition == "$" ? (older ? "'Unknown'," : "$,") : "'" + mEdition + "',") + (older ? ParserSTEP.LinkToString(mEditionDateSS) : IfcDate.STEPAttribute(mEditionDate)) + (string.IsNullOrEmpty(mEdition) ? (older ? "'Unknown'," : "$,") : "'" + ParserIfc.Encode(mEdition) + "',") + (older ? ParserSTEP.LinkToString(mEditionDateSS) : IfcDate.STEPAttribute(mEditionDate)) +
",'" + mName + (older ? "'" : (mDescription == "$" ? "',$," : "','" + mDescription + "',") + (mSpecification == "$" ? "$," : "'" + mSpecification + "',") + tokens); ",'" + ParserIfc.Encode(mName) + (older ? "'" : (string.IsNullOrEmpty(mDescription) ? "',$," : "','" + ParserIfc.Encode(mDescription) + "',") + (string.IsNullOrEmpty(mSpecification) ? "$," : "'" + ParserIfc.Encode(mSpecification) + "',") + tokens);
return result; return result;
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary)
{ {
mSource = ParserSTEP.StripString(str, ref pos, len); mSource = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mEdition = ParserSTEP.StripString(str, ref pos, len); mEdition = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
if (release <= ReleaseVersion.IFC2x3) if (release <= ReleaseVersion.IFC2x3)
{ {
mEditionDateSS = ParserSTEP.StripLink(str, ref pos, len); mEditionDateSS = ParserSTEP.StripLink(str, ref pos, len);
mName = ParserSTEP.StripString(str, ref pos, len); mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
else else
{ {
mEditionDate = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len)); mEditionDate = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len));
mName = ParserSTEP.StripString(str, ref pos, len); mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mDescription = ParserSTEP.StripString(str, ref pos, len); mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mSpecification = ParserSTEP.StripString(str, ref pos, len); mSpecification = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mReferenceTokens = ParserSTEP.SplitListStrings(ParserSTEP.StripField(str, ref pos, len)); mReferenceTokens = ParserSTEP.SplitListStrings(ParserSTEP.StripField(str, ref pos, len));
} }
} }
@ -533,7 +533,7 @@ namespace GeometryGym.Ifc
if (release < ReleaseVersion.IFC4) if (release < ReleaseVersion.IFC4)
return base.BuildStringSTEP(release) + (ReferencedSource is IfcClassification ? "," + ParserSTEP.ObjToLinkString(ReferencedSource) : ",$"); return base.BuildStringSTEP(release) + (ReferencedSource is IfcClassification ? "," + ParserSTEP.ObjToLinkString(ReferencedSource) : ",$");
return base.BuildStringSTEP(release) + "," + ParserSTEP.ObjToLinkString(ReferencedSource) + return base.BuildStringSTEP(release) + "," + ParserSTEP.ObjToLinkString(ReferencedSource) +
(mDescription == "$" ? ",$" : ",'" + mDescription + "'") + (mSort == "$" ? ",$" : ",'" + mSort + "'"); (string.IsNullOrEmpty(mDescription) ? ",$" : ",'" + ParserIfc.Encode(mDescription) + "'") + (string.IsNullOrEmpty(mSort) ? ",$" : ",'" + ParserIfc.Encode(mSort) + "'");
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary)
{ {
@ -541,8 +541,8 @@ namespace GeometryGym.Ifc
ReferencedSource = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcClassificationReferenceSelect; ReferencedSource = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcClassificationReferenceSelect;
if (release > ReleaseVersion.IFC2x3) if (release > ReleaseVersion.IFC2x3)
{ {
mDescription = ParserSTEP.StripString(str, ref pos, len); mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mSort = ParserSTEP.StripString(str, ref pos, len); mSort = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
} }
@ -608,10 +608,10 @@ namespace GeometryGym.Ifc
} }
public abstract partial class IfcColourSpecification public abstract partial class IfcColourSpecification
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return (mName == "$" ? "$" : "'" + mName + "'"); } protected override string BuildStringSTEP(ReleaseVersion release) { return (string.IsNullOrEmpty(mName) ? "$" : "'" + ParserIfc.Encode(mName) + "'"); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary)
{ {
mName = ParserSTEP.StripString(str, ref pos, len); mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcColumn public partial class IfcColumn
@ -715,13 +715,13 @@ namespace GeometryGym.Ifc
{ {
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
return base.BuildStringSTEP(release) + ",(#" + String.Join(",#", mProfiles.Select(x=>x.StepId)) + (mLabel == "$" ? "),$" : "),'" + mLabel + "'"); return base.BuildStringSTEP(release) + ",(#" + String.Join(",#", mProfiles.Select(x=>x.StepId)) + (string.IsNullOrEmpty(mLabel) ? "),$" : "),'" + ParserIfc.Encode(mLabel) + "'");
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
mProfiles.AddRange(ParserSTEP.StripListLink(str, ref pos, len).Select(x=>dictionary[x] as IfcProfileDef)); mProfiles.AddRange(ParserSTEP.StripListLink(str, ref pos, len).Select(x=>dictionary[x] as IfcProfileDef));
mLabel = ParserSTEP.StripString(str, ref pos, len); mLabel = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcCompressor public partial class IfcCompressor
@ -881,19 +881,25 @@ namespace GeometryGym.Ifc
} }
public abstract partial class IfcConstraint public abstract partial class IfcConstraint
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return "'" + mName + (mDescription == "$" ? "',$,." : "','" + mDescription + "',.") + mConstraintGrade.ToString() + (mConstraintSource == "$" ? ".,$," : ".,'" + mConstraintSource + "',") + ParserSTEP.LinkToString(mCreatingActor) + "," + (release < ReleaseVersion.IFC4 ? ParserSTEP.LinkToString(mSSCreationTime) : (mCreationTime == "$" ? "$" : "'" + mCreationTime + "'")) + (mUserDefinedGrade == "$" ? ",$" : ",'" + mUserDefinedGrade + "'"); } protected override string BuildStringSTEP(ReleaseVersion release)
{
return "'" + ParserIfc.Encode(mName) + (string.IsNullOrWhiteSpace(mDescription) ? "',$,." : "','" + ParserIfc.Encode(mDescription) +
"',.") + mConstraintGrade.ToString() + (string.IsNullOrWhiteSpace(mConstraintSource) ? ".,$," : ".,'" + ParserIfc.Encode(mConstraintSource) + "',") +
(mCreatingActor == null ? "$," : "#" + mCreatingActor.StepId + ",") +
(release < ReleaseVersion.IFC4 ? (mSSCreationTime == null ? "$" : "#" + mSSCreationTime.StepId) : IfcDate.STEPAttribute(mCreationTime)) +
(string.IsNullOrEmpty(mUserDefinedGrade) ? ",$" : ",'" + ParserIfc.Encode(mUserDefinedGrade) + "'"); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary)
{ {
mName = ParserSTEP.StripString(str, ref pos, len); Name = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mDescription = ParserSTEP.StripString(str, ref pos, len); Description = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
Enum.TryParse<IfcConstraintEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mConstraintGrade); Enum.TryParse<IfcConstraintEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mConstraintGrade);
mConstraintSource = ParserSTEP.StripString(str, ref pos, len); mConstraintSource = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mCreatingActor = ParserSTEP.StripLink(str, ref pos, len); mCreatingActor = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcActorSelect;
if (release < ReleaseVersion.IFC4) if (release < ReleaseVersion.IFC4)
mSSCreationTime = ParserSTEP.StripLink(str, ref pos, len); mSSCreationTime = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcDateTimeSelect;
else else
mCreationTime = ParserSTEP.StripString(str, ref pos, len); mCreationTime = IfcDate.ParseSTEP(ParserSTEP.StripString(str, ref pos, len));
mUserDefinedGrade = ParserSTEP.StripString(str, ref pos, len); mUserDefinedGrade = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcConstructionEquipmentResource public partial class IfcConstructionEquipmentResource
@ -1023,16 +1029,18 @@ namespace GeometryGym.Ifc
{ {
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
return base.BuildStringSTEP(release) + (mObjectType == "$" ? ",$" : ",'" + mObjectType + "'") + (mLongName == "$" ? ",$" : ",'" + mLongName + "'") + (mPhase == "$" ? ",$" : ",'" + mPhase + "'") + return base.BuildStringSTEP(release) + (string.IsNullOrEmpty(mObjectType) ? ",$" : ",'" + ParserIfc.Encode(mObjectType) + "'") +
(mRepresentationContexts.Count == 0 ? ",$," : ",(#" + string.Join(",#", mRepresentationContexts.ConvertAll(x => x.Index)) + "),") + (mUnitsInContext == 0 ? "$" : ParserSTEP.LinkToString(mUnitsInContext)); (string.IsNullOrEmpty(mLongName) ? ",$" : ",'" + ParserIfc.Encode(mLongName) + "'") +
(string.IsNullOrEmpty(mPhase) ? ",$" : ",'" + ParserIfc.Encode(mPhase) + "'") +
(mRepresentationContexts.Count == 0 ? ",$," : ",(#" + string.Join(",#", mRepresentationContexts.ConvertAll(x => x.StepId)) + "),") + (mUnitsInContext == 0 ? "$" : ParserSTEP.LinkToString(mUnitsInContext));
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
mObjectType = ParserSTEP.StripString(str, ref pos, len); mObjectType = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mLongName = ParserSTEP.StripString(str, ref pos, len); mLongName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mPhase = ParserSTEP.StripString(str, ref pos, len); mPhase = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
RepresentationContexts.AddRange(ParserSTEP.StripListLink(str, ref pos, len).ConvertAll(x => dictionary[x] as IfcRepresentationContext)); RepresentationContexts.AddRange(ParserSTEP.StripListLink(str, ref pos, len).ConvertAll(x => dictionary[x] as IfcRepresentationContext));
mUnitsInContext = ParserSTEP.StripLink(str, ref pos, len); mUnitsInContext = ParserSTEP.StripLink(str, ref pos, len);
@ -1054,12 +1062,12 @@ namespace GeometryGym.Ifc
} }
public abstract partial class IfcControl public abstract partial class IfcControl
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + (release < ReleaseVersion.IFC4 ? "" : (mIdentification == "$" ? ",$" : ",'" + mIdentification + "'")); } protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + (release < ReleaseVersion.IFC4 ? "" : (string.IsNullOrEmpty( mIdentification) ? ",$" : ",'" + ParserIfc.Encode(mIdentification) + "'")); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
if (release != ReleaseVersion.IFC2x3) if (release > ReleaseVersion.IFC2x3)
mIdentification = ParserSTEP.StripString(str, ref pos, len); mIdentification = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcController public partial class IfcController
@ -1269,32 +1277,27 @@ namespace GeometryGym.Ifc
{ {
if (release < ReleaseVersion.IFC4) if (release < ReleaseVersion.IFC4)
{ {
string str = base.BuildStringSTEP(release) + "," + ParserSTEP.LinkToString(mSubmittedBy) + "," + ParserSTEP.LinkToString(mPreparedBy) + "," + ParserSTEP.LinkToString(mSubmittedOnSS) + "," + mStatus; return base.BuildStringSTEP(release) + (mSubmittedBy == null ? ",$" : ",#" + mSubmittedBy.StepId) +
if (mTargetUsers.Count > 0) (mPreparedBy == null ? ",$" : ",#" + mPreparedBy.StepId) + (mSubmittedOnSS == null ? ",$" : ",#" + mSubmittedOnSS.StepId) +
{ (string.IsNullOrEmpty(mStatus) ? ",$" : ",'" + ParserIfc.Encode(mStatus) + "'") +
str += ",(" + ParserSTEP.LinkToString(mTargetUsers[0]); (mTargetUsers.Count == 0 ? ",$" : ",(" + string.Join(",", mTargetUsers.Select(x=>"#" + x.StepId)) +")") +
for (int icounter = 1; icounter < mTargetUsers.Count; icounter++) (mUpdateDateSS == null ? ",$" : ",#" + mUpdateDateSS.StepId) + (string.IsNullOrEmpty(mIdentification) ? ",$,." : ",'" + ParserIfc.Encode( mIdentification) + "',.") +
str += "," + ParserSTEP.LinkToString(mTargetUsers[icounter]); mPredefinedType.ToString() + ".";
str += "),";
}
else
str += ",$,";
return str + ParserSTEP.LinkToString(mUpdateDateSS) + (mIdentification == "$" ? ",$,." : ",'" + mIdentification + "',.") + mPredefinedType.ToString() + ".";
} }
return base.BuildStringSTEP(release) + ",." + mPredefinedType.ToString() + (mStatus == "$" ? ".,$," : ".,'" + mStatus + "',") + mSubmittedOn + "," + mUpdateDate; return base.BuildStringSTEP(release) + ",." + mPredefinedType.ToString() + (string.IsNullOrEmpty(mStatus) ? ".,$," : ".,'" + ParserIfc.Encode(mStatus) + "',") + IfcDate.STEPAttribute( mSubmittedOn) + "," + IfcDate.STEPAttribute(mUpdateDate);
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
if (release < ReleaseVersion.IFC4) if (release < ReleaseVersion.IFC4)
{ {
mSubmittedBy = ParserSTEP.StripLink(str, ref pos, len); mSubmittedBy = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcActorSelect;
mPreparedBy = ParserSTEP.StripLink(str, ref pos, len); mPreparedBy = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcActorSelect;
mSubmittedOnSS = ParserSTEP.StripLink(str, ref pos, len); mSubmittedOnSS = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcDateTimeSelect;
mStatus = ParserSTEP.StripString(str, ref pos, len); mStatus = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mTargetUsers = ParserSTEP.StripListLink(str, ref pos, len); mTargetUsers.AddRange(ParserSTEP.StripListLink(str, ref pos, len).Select(x=>dictionary[x] as IfcActorSelect));
mUpdateDateSS = ParserSTEP.StripLink(str, ref pos, len); mUpdateDateSS = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcDateTimeSelect;
mIdentification = ParserSTEP.StripString(str, ref pos, len); mIdentification = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
Enum.TryParse<IfcCostScheduleTypeEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mPredefinedType); Enum.TryParse<IfcCostScheduleTypeEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mPredefinedType);
} }
else else
@ -1575,12 +1578,12 @@ namespace GeometryGym.Ifc
{ {
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
return (mName == "$" ? "$,(" : "'" + mName + "',(") + return (string.IsNullOrEmpty(mName) ? "$,(" : "'" + ParserIfc.Encode(mName) + "',(") +
string.Join(",", mPatternList.Select(x => "#" + x.StepId)) + ")"; string.Join(",", mPatternList.Select(x => "#" + x.StepId)) + ")";
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
{ {
mName = ParserSTEP.StripString(str, ref pos, len); mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mPatternList.AddRange(ParserSTEP.StripListLink(str, ref pos, len).Select(x => dictionary[x] as IfcCurveStyleFontPattern)); mPatternList.AddRange(ParserSTEP.StripListLink(str, ref pos, len).Select(x => dictionary[x] as IfcCurveStyleFontPattern));
} }
} }

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

@ -62,13 +62,17 @@ namespace GeometryGym.Ifc
} }
public partial class IfcDerivedProfileDef public partial class IfcDerivedProfileDef
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + ",#" + mParentProfile.StepId + (mOperator == null ? ",*" : ",#" + mOperator.StepId) + (mLabel == "$" ? ",$" : ",'" + mLabel + "'"); } protected override string BuildStringSTEP(ReleaseVersion release)
{
return base.BuildStringSTEP(release) + ",#" + mParentProfile.StepId + (mOperator == null ? ",*" : ",#" + mOperator.StepId) +
(string.IsNullOrEmpty(mLabel) ? ",$" : ",'" + ParserIfc.Encode(mLabel) + "'");
}
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
mParentProfile = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcProfileDef; mParentProfile = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcProfileDef;
mOperator = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcCartesianTransformationOperator2D; mOperator = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcCartesianTransformationOperator2D;
mLabel = ParserSTEP.StripString(str, ref pos, len); mLabel = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcDerivedUnit public partial class IfcDerivedUnit
@ -287,13 +291,13 @@ namespace GeometryGym.Ifc
{ {
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
return base.BuildStringSTEP(release) + (release < ReleaseVersion.IFC4 ? (mControlElementId == "$" ? ",$" : ",'" + mControlElementId + "'") : ""); return base.BuildStringSTEP(release) + (release < ReleaseVersion.IFC4 ? (string.IsNullOrEmpty(mControlElementId) ? ",$" : ",'" + ParserIfc.Encode(mControlElementId) + "'") : "");
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
if(release < ReleaseVersion.IFC4) if(release < ReleaseVersion.IFC4)
mControlElementId = ParserSTEP.StripString(str, ref pos, len); mControlElementId = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcDistributionPort public partial class IfcDistributionPort
@ -318,11 +322,14 @@ namespace GeometryGym.Ifc
} }
public partial class IfcDistributionSystem public partial class IfcDistributionSystem
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + (release < ReleaseVersion.IFC4 ? "" : (mLongName == "$" ? ",$,." : ",'" + mLongName + "',.") + mPredefinedType.ToString() + "."); } protected override string BuildStringSTEP(ReleaseVersion release)
{
return base.BuildStringSTEP(release) + (release < ReleaseVersion.IFC4 ? "" : (string.IsNullOrEmpty(mLongName) ? ",$,." : ",'" + ParserIfc.Encode(mLongName) + "',.") + mPredefinedType.ToString() + ".");
}
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
mLongName = ParserSTEP.StripString(str, ref pos, len); mLongName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
string s = ParserSTEP.StripField(str, ref pos, len); string s = ParserSTEP.StripField(str, ref pos, len);
if (s.StartsWith(".")) if (s.StartsWith("."))
Enum.TryParse<IfcDistributionSystemEnum>(s.Replace(".", ""), true, out mPredefinedType); Enum.TryParse<IfcDistributionSystemEnum>(s.Replace(".", ""), true, out mPredefinedType);
@ -330,12 +337,17 @@ namespace GeometryGym.Ifc
} }
public partial class IfcDocumentElectronicFormat public partial class IfcDocumentElectronicFormat
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return (mFileExtension == "$" ? "$," : "'" + mFileExtension + ",',") + (mMimeContentType == "$" ? "$," : "'" + mMimeContentType + "',") + (mMimeSubtype == "$" ? "$" : "'" + mMimeSubtype + "'"); } protected override string BuildStringSTEP(ReleaseVersion release)
{
return (string.IsNullOrEmpty(mFileExtension) ? "$," : "'" + ParserIfc.Encode(mFileExtension) + ",',") +
(string.IsNullOrEmpty(mMimeContentType) ? "$," : "'" + ParserIfc.Encode(mMimeContentType) + "',") +
(string.IsNullOrEmpty(mMimeSubtype) ? "$" : "'" + ParserIfc.Encode(mMimeSubtype) + "'");
}
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
{ {
mFileExtension = ParserSTEP.StripString(str, ref pos, len); mFileExtension = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mMimeContentType = ParserSTEP.StripString(str, ref pos, len); mMimeContentType = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mMimeSubtype = ParserSTEP.StripString(str, ref pos, len); mMimeSubtype = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcDocumentInformation public partial class IfcDocumentInformation
@ -393,28 +405,30 @@ namespace GeometryGym.Ifc
{ {
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
string str = base.BuildStringSTEP(release) + "," + ParserSTEP.LinkToString(mRelatingDocument) + ",(" + ParserSTEP.LinkToString(mRelatedDocuments[0]); return base.BuildStringSTEP(release) + ",#" + mRelatingDocument.StepId + ",(" +
for (int icounter = 0; icounter < mRelatedDocuments.Count; icounter++) string.Join(",", mRelatedDocuments.Select(x=>"#" + x.StepId)) +
str += "," + ParserSTEP.LinkToString(mRelatedDocuments[icounter]); (string.IsNullOrEmpty( mRelationshipType) ? "),$" : "),'" + ParserIfc.Encode(mRelationshipType) + "'");
return str + (mRelationshipType == "$" ? "),$" : "),'" + mRelationshipType + "'");
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
{ {
mRelatingDocument = ParserSTEP.StripLink(str, ref pos, len); RelatingDocument = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcDocumentInformation;
mRelatedDocuments = ParserSTEP.StripListLink(str, ref pos, len); RelatedDocuments.AddRange(ParserSTEP.StripListLink(str, ref pos, len).Select(x=>dictionary[x] as IfcDocumentInformation));
mRelationshipType = ParserSTEP.StripString(str, ref pos, len); RelationshipType = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcDocumentReference public partial class IfcDocumentReference
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + (release < ReleaseVersion.IFC4 ? "" : (mDescription == "$" ? ",$," : ",'" + mDescription + "',") + ParserSTEP.LinkToString(mReferencedDocument)); } protected override string BuildStringSTEP(ReleaseVersion release)
{
return base.BuildStringSTEP(release) + (release < ReleaseVersion.IFC4 ? "" : (string.IsNullOrEmpty(mDescription) ? ",$," : ",'" + ParserIfc.Encode(mDescription) + "',") +
(mReferencedDocument == null ? ",$" : ",#" + mReferencedDocument.StepId)); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
if (release != ReleaseVersion.IFC2x3) if (release != ReleaseVersion.IFC2x3)
{ {
mDescription = ParserSTEP.StripString(str, ref pos, len); mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mReferencedDocument = ParserSTEP.StripLink(str, ref pos, len); mReferencedDocument = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcDocumentInformation;
} }
} }
} }
@ -425,7 +439,7 @@ namespace GeometryGym.Ifc
return base.BuildStringSTEP(release) + "," + ParserSTEP.DoubleOptionalToString(mOverallHeight) + "," + ParserSTEP.DoubleOptionalToString(mOverallWidth) return base.BuildStringSTEP(release) + "," + ParserSTEP.DoubleOptionalToString(mOverallHeight) + "," + ParserSTEP.DoubleOptionalToString(mOverallWidth)
+ (release < ReleaseVersion.IFC4 ? "" : (mPredefinedType == IfcDoorTypeEnum.NOTDEFINED ? ",$," : ",." + mPredefinedType.ToString() + ".,") + + (release < ReleaseVersion.IFC4 ? "" : (mPredefinedType == IfcDoorTypeEnum.NOTDEFINED ? ",$," : ",." + mPredefinedType.ToString() + ".,") +
(mOperationType == IfcDoorTypeOperationEnum.NOTDEFINED ? "$," : "." + SerializeDoorTypeOperation(mOperationType, release) + ".,") + (mOperationType == IfcDoorTypeOperationEnum.NOTDEFINED ? "$," : "." + SerializeDoorTypeOperation(mOperationType, release) + ".,") +
(mUserDefinedOperationType == "$" ? "$" : ",'" + mUserDefinedOperationType + "'")); (string.IsNullOrEmpty(mUserDefinedOperationType) ? "$" : ",'" + ParserIfc.Encode(mUserDefinedOperationType) + "'"));
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
{ {
@ -442,7 +456,7 @@ namespace GeometryGym.Ifc
mOperationType = ParseDoorTypeOperation(s.Substring(1, s.Length - 2)); mOperationType = ParseDoorTypeOperation(s.Substring(1, s.Length - 2));
try try
{ {
mUserDefinedOperationType = ParserSTEP.StripString(str, ref pos, len); mUserDefinedOperationType = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
catch (Exception) { } catch (Exception) { }
} }
@ -509,14 +523,14 @@ namespace GeometryGym.Ifc
(release < ReleaseVersion.IFC4 ? ",." : ",." + mPredefinedType.ToString() + ".,.") + (release < ReleaseVersion.IFC4 ? ",." : ",." + mPredefinedType.ToString() + ".,.") +
IfcDoor.SerializeDoorTypeOperation(mOperationType, release) + (release < ReleaseVersion.IFC4 ? ".,.NOTDEFINED" : "") + ".," + IfcDoor.SerializeDoorTypeOperation(mOperationType, release) + (release < ReleaseVersion.IFC4 ? ".,.NOTDEFINED" : "") + ".," +
ParserSTEP.BoolToString(mParameterTakesPrecedence) + (release < ReleaseVersion.IFC4 ? "," + ParserSTEP.BoolToString(mParameterTakesPrecedence) + (release < ReleaseVersion.IFC4 ? "," +
ParserSTEP.BoolToString(false) : (mUserDefinedOperationType == "$" ? ",$" : ",'" + mUserDefinedOperationType + "'")); } ParserSTEP.BoolToString(false) : (string.IsNullOrEmpty(mUserDefinedOperationType) ? ",$" : ",'" + ParserIfc.Encode(mUserDefinedOperationType) + "'")); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
Enum.TryParse<IfcDoorTypeEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mPredefinedType); Enum.TryParse<IfcDoorTypeEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mPredefinedType);
mOperationType = IfcDoor.ParseDoorTypeOperation(ParserSTEP.StripField(str, ref pos, len).Replace(".", "")); mOperationType = IfcDoor.ParseDoorTypeOperation(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""));
mParameterTakesPrecedence = ParserSTEP.StripBool(str, ref pos, len); mParameterTakesPrecedence = ParserSTEP.StripBool(str, ref pos, len);
mUserDefinedOperationType = ParserSTEP.StripString(str, ref pos, len); mUserDefinedOperationType = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcDraughtingCallout public partial class IfcDraughtingCallout
@ -531,14 +545,14 @@ namespace GeometryGym.Ifc
{ {
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
return (mName == "$" ? "$," : "'" + mName + "',") + return (string.IsNullOrEmpty(mName) ? "$," : "'" + ParserIfc.Encode(mName) + "',") +
(mDescription == "$" ? "$," : "'" + mDescription +"',") + (string.IsNullOrEmpty(mDescription) ? "$," : "'" + ParserIfc.Encode(mDescription) + "',") +
ParserSTEP.LinkToString(mRelatingDraughtingCallout) + "," + ParserSTEP.LinkToString(mRelatedDraughtingCallout); ParserSTEP.LinkToString(mRelatingDraughtingCallout) + "," + ParserSTEP.LinkToString(mRelatedDraughtingCallout);
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
{ {
mName = ParserSTEP.StripString(str, ref pos, len); mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mDescription = ParserSTEP.StripString(str, ref pos, len); mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mRelatingDraughtingCallout = ParserSTEP.StripLink(str, ref pos, len); mRelatingDraughtingCallout = ParserSTEP.StripLink(str, ref pos, len);
mRelatedDraughtingCallout = ParserSTEP.StripLink(str, ref pos, len); mRelatedDraughtingCallout = ParserSTEP.StripLink(str, ref pos, len);
} }

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

@ -145,12 +145,12 @@ namespace GeometryGym.Ifc
} }
public partial class IfcElectricDistributionPoint public partial class IfcElectricDistributionPoint
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + ",." + mDistributionPointFunction.ToString() + (mUserDefinedFunction == "$" ? ".,$" : ".,'" + mUserDefinedFunction + "'"); } protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + ",." + mDistributionPointFunction.ToString() + (string.IsNullOrEmpty(mUserDefinedFunction) ? ".,$" : ".,'" + ParserIfc.Encode(mUserDefinedFunction) + "'"); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
Enum.TryParse<IfcElectricDistributionPointFunctionEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mDistributionPointFunction); Enum.TryParse<IfcElectricDistributionPointFunctionEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mDistributionPointFunction);
mUserDefinedFunction = ParserSTEP.StripString(str, ref pos, len); mUserDefinedFunction = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcElectricFlowStorageDevice public partial class IfcElectricFlowStorageDevice
@ -282,11 +282,11 @@ namespace GeometryGym.Ifc
} }
public abstract partial class IfcElement public abstract partial class IfcElement
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + "," + (mTag == "$" ? "$" : "'" + mTag + "'"); } protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + "," + (string.IsNullOrEmpty(mTag) ? "$" : "'" + ParserIfc.Encode(mTag) + "'"); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
mTag = ParserSTEP.StripString(str, ref pos, len); mTag = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public abstract partial class IfcElementarySurface public abstract partial class IfcElementarySurface
@ -326,12 +326,12 @@ namespace GeometryGym.Ifc
{ {
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
return base.BuildStringSTEP(release) + (mMethodOfMeasurement == "$" ? ",$,(" : ",'" + mMethodOfMeasurement + "',(") + string.Join(",", mQuantities.Values.Select(x=>"#" + x.StepId)) + ")"; return base.BuildStringSTEP(release) + (string.IsNullOrEmpty(mMethodOfMeasurement) ? ",$,(" : ",'" + ParserIfc.Encode(mMethodOfMeasurement) + "',(") + string.Join(",", mQuantities.Values.Select(x=>"#" + x.StepId)) + ")";
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
mMethodOfMeasurement = ParserSTEP.StripString(str, ref pos, len); mMethodOfMeasurement = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
foreach (IfcPhysicalQuantity quantity in ParserSTEP.StripListLink(str, ref pos, len).Select(x => dictionary[x] as IfcPhysicalQuantity)) foreach (IfcPhysicalQuantity quantity in ParserSTEP.StripListLink(str, ref pos, len).Select(x => dictionary[x] as IfcPhysicalQuantity))
addQuantity(quantity); addQuantity(quantity);
} }
@ -340,12 +340,12 @@ namespace GeometryGym.Ifc
{ {
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
return base.BuildStringSTEP(release) + (release < ReleaseVersion.IFC4 && (this as IfcDoorType != null || this as IfcWindowType != null) ? "" : (mElementType == "$" ? ",$" : ",'" + mElementType + "'")); return base.BuildStringSTEP(release) + (release < ReleaseVersion.IFC4 && (this as IfcDoorType != null || this as IfcWindowType != null) ? "" : (string.IsNullOrEmpty(mElementType) ? ",$" : ",'" + ParserIfc.Encode(mElementType) + "'"));
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
mElementType = ParserSTEP.StripString(str, ref pos, len); mElementType = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcEllipse public partial class IfcEllipse
@ -395,13 +395,13 @@ namespace GeometryGym.Ifc
} }
public partial class IfcEnvironmentalImpactValue public partial class IfcEnvironmentalImpactValue
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + ",'" + mImpactType + "',." + mEnvCategory.ToString() + ".," +( mUserDefinedCategory == "$" ? "$" : "'" + mUserDefinedCategory + "'"); } protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + ",'" + mImpactType + "',." + mEnvCategory.ToString() + ".," +(string.IsNullOrEmpty(mUserDefinedCategory) ? "$" : "'" + ParserIfc.Encode(mUserDefinedCategory) + "'"); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
mImpactType = ParserSTEP.StripString(str, ref pos, len); mImpactType = ParserSTEP.StripString(str, ref pos, len);
Enum.TryParse<IfcEnvironmentalImpactCategoryEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mEnvCategory); Enum.TryParse<IfcEnvironmentalImpactCategoryEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mEnvCategory);
mUserDefinedCategory = ParserSTEP.StripString(str, ref pos, len); mUserDefinedCategory = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcEvaporativeCooler public partial class IfcEvaporativeCooler
@ -462,15 +462,20 @@ namespace GeometryGym.Ifc
} }
public partial class IfcEvent public partial class IfcEvent
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return (release < ReleaseVersion.IFC4 ? "" : base.BuildStringSTEP(release) + ",." + mPredefinedType.ToString() + ".,." + mEventTriggerType.ToString() + (mUserDefinedEventTriggerType == "$" ? ".,$" : (".,'" + mUserDefinedEventTriggerType + "'")) + "," + ParserSTEP.LinkToString(mEventOccurrenceTime)); } protected override string BuildStringSTEP(ReleaseVersion release)
{
return (release < ReleaseVersion.IFC4 ? "" : base.BuildStringSTEP(release) + ",." + mPredefinedType.ToString() + ".,." + mEventTriggerType.ToString() +
(string.IsNullOrEmpty(mUserDefinedEventTriggerType) ? ".,$" : (".,'" + ParserIfc.Encode(mUserDefinedEventTriggerType) + "'")) +
(mEventOccurrenceTime == null ? ",$" : ",#" + mEventOccurrenceTime.StepId));
}
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
Enum.TryParse<IfcEventTypeEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mPredefinedType); Enum.TryParse<IfcEventTypeEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mPredefinedType);
Enum.TryParse<IfcEventTriggerTypeEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mEventTriggerType); Enum.TryParse<IfcEventTriggerTypeEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mEventTriggerType);
mUserDefinedEventTriggerType = ParserSTEP.StripString(str, ref pos, len); mUserDefinedEventTriggerType = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mEventOccurrenceTime = ParserSTEP.StripLink(str, ref pos, len); mEventOccurrenceTime = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcEventTime;
} }
} }
public partial class IfcEventTime public partial class IfcEventTime
@ -494,13 +499,17 @@ namespace GeometryGym.Ifc
} }
public partial class IfcEventType public partial class IfcEventType
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return (release < ReleaseVersion.IFC4 ? "" : base.BuildStringSTEP(release) + ",." + mPredefinedType.ToString() + ".,." + mEventTriggerType.ToString() + (mUserDefinedEventTriggerType == "$" ? ".,$" : (".,'" + mUserDefinedEventTriggerType + "'"))); } protected override string BuildStringSTEP(ReleaseVersion release)
{
return (release < ReleaseVersion.IFC4 ? "" : base.BuildStringSTEP(release) + ",." + mPredefinedType.ToString() + ".,." + mEventTriggerType.ToString() +
(string.IsNullOrEmpty(mUserDefinedEventTriggerType) ? ".,$" : (".,'" + ParserIfc.Encode(mUserDefinedEventTriggerType) + "'")));
}
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
Enum.TryParse<IfcEventTypeEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mPredefinedType); Enum.TryParse<IfcEventTypeEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mPredefinedType);
Enum.TryParse<IfcEventTriggerTypeEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mEventTriggerType); Enum.TryParse<IfcEventTriggerTypeEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mEventTriggerType);
mUserDefinedEventTriggerType = ParserSTEP.StripString(str, ref pos, len); mUserDefinedEventTriggerType = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcExtendedMaterialProperties public partial class IfcExtendedMaterialProperties
@ -553,11 +562,16 @@ namespace GeometryGym.Ifc
} }
public abstract partial class IfcExternalReference public abstract partial class IfcExternalReference
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return (mLocation == "$" ? "$," : "'" + mLocation + "',") + (mIdentification == "$" ? "$" : "'" + mIdentification + "'") + (string.IsNullOrEmpty(mName) ? ",$" : ",'" + ParserIfc.Encode(mName) + "'"); } protected override string BuildStringSTEP(ReleaseVersion release)
{
return (string.IsNullOrEmpty(mLocation) ? "$," : "'" + ParserIfc.Encode(mLocation) + "',") +
(string.IsNullOrEmpty(mIdentification) ? "$" : "'" + ParserIfc.Encode(mIdentification) + "'") +
(string.IsNullOrEmpty(mName) ? ",$" : ",'" + ParserIfc.Encode(mName) + "'");
}
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
{ {
mLocation = ParserSTEP.StripString(str, ref pos, len); mLocation = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mIdentification = ParserSTEP.StripString(str, ref pos, len); mIdentification = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len)); mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }

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

@ -367,7 +367,8 @@ namespace GeometryGym.Ifc
{ {
return base.BuildStringSTEP(release) + ",." + mPropertySource.ToString() + ".," + ParserSTEP.LinkToString(mFlowConditionTimeSeries) + "," + return base.BuildStringSTEP(release) + ",." + mPropertySource.ToString() + ".," + ParserSTEP.LinkToString(mFlowConditionTimeSeries) + "," +
ParserSTEP.LinkToString(mVelocityTimeSeries) + "," + ParserSTEP.LinkToString(mFlowrateTimeSeries) + "," + ParserSTEP.LinkToString(mVelocityTimeSeries) + "," + ParserSTEP.LinkToString(mFlowrateTimeSeries) + "," +
ParserSTEP.LinkToString(mFluid) + "," + ParserSTEP.LinkToString(mPressureTimeSeries) + (mUserDefinedPropertySource == "$" ? ",$," : ",'" + mUserDefinedPropertySource + "',") + ParserSTEP.LinkToString(mFluid) + "," + ParserSTEP.LinkToString(mPressureTimeSeries) +
(string.IsNullOrEmpty(mUserDefinedPropertySource) ? ",$," : ",'" + ParserIfc.Encode(mUserDefinedPropertySource) + "',") +
ParserSTEP.DoubleOptionalToString(mTemperatureSingleValue) + "," + ParserSTEP.DoubleOptionalToString(mWetBulbTemperatureSingleValue) + "," + ParserSTEP.DoubleOptionalToString(mTemperatureSingleValue) + "," + ParserSTEP.DoubleOptionalToString(mWetBulbTemperatureSingleValue) + "," +
ParserSTEP.LinkToString(mWetBulbTemperatureTimeSeries) + "," + ParserSTEP.LinkToString(mTemperatureTimeSeries) + "," + ParserSTEP.LinkToString(mWetBulbTemperatureTimeSeries) + "," + ParserSTEP.LinkToString(mTemperatureTimeSeries) + "," +
ParserSTEP.DoubleOptionalToString(mFlowrateSingleValue) + "," + ParserSTEP.DoubleOptionalToString(mFlowConditionSingleValue) + "," + ParserSTEP.DoubleOptionalToString(mFlowrateSingleValue) + "," + ParserSTEP.DoubleOptionalToString(mFlowConditionSingleValue) + "," +
@ -382,7 +383,7 @@ namespace GeometryGym.Ifc
mFlowrateTimeSeries = ParserSTEP.StripLink(str, ref pos, len); mFlowrateTimeSeries = ParserSTEP.StripLink(str, ref pos, len);
mFluid = ParserSTEP.StripLink(str, ref pos, len); mFluid = ParserSTEP.StripLink(str, ref pos, len);
mPressureTimeSeries = ParserSTEP.StripLink(str, ref pos, len); mPressureTimeSeries = ParserSTEP.StripLink(str, ref pos, len);
mUserDefinedPropertySource = ParserSTEP.StripString(str, ref pos, len); mUserDefinedPropertySource = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mTemperatureSingleValue = ParserSTEP.StripLink(str, ref pos, len); mTemperatureSingleValue = ParserSTEP.StripLink(str, ref pos, len);
mWetBulbTemperatureSingleValue = ParserSTEP.StripLink(str, ref pos, len); mWetBulbTemperatureSingleValue = ParserSTEP.StripLink(str, ref pos, len);
mWetBulbTemperatureTimeSeries = ParserSTEP.StripLink(str, ref pos, len); mWetBulbTemperatureTimeSeries = ParserSTEP.StripLink(str, ref pos, len);

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

@ -118,14 +118,14 @@ namespace GeometryGym.Ifc
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
return base.BuildStringSTEP(release) + ",#" + mParentContext.Index + (double.IsNaN(mTargetScale) || mTargetScale <=0 ? ",$,." : "," + ParserSTEP.DoubleOptionalToString(mTargetScale) + ",.") + return base.BuildStringSTEP(release) + ",#" + mParentContext.Index + (double.IsNaN(mTargetScale) || mTargetScale <=0 ? ",$,." : "," + ParserSTEP.DoubleOptionalToString(mTargetScale) + ",.") +
mTargetView.ToString() + (mUserDefinedTargetView == "$" ? ".,$" : ".,'" + mUserDefinedTargetView + "'"); } mTargetView.ToString() + (string.IsNullOrEmpty(mUserDefinedTargetView) ? ".,$" : ".,'" + ParserIfc.Encode(mUserDefinedTargetView) + "'"); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
ParentContext = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcGeometricRepresentationContext; ParentContext = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcGeometricRepresentationContext;
mTargetScale = ParserSTEP.StripDouble(str, ref pos, len); mTargetScale = ParserSTEP.StripDouble(str, ref pos, len);
Enum.TryParse<IfcGeometricProjectionEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mTargetView); Enum.TryParse<IfcGeometricProjectionEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mTargetView);
mUserDefinedTargetView = ParserSTEP.StripString(str, ref pos, len); mUserDefinedTargetView = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcGeometricSet public partial class IfcGeometricSet
@ -196,10 +196,10 @@ namespace GeometryGym.Ifc
} }
public partial class IfcGridAxis public partial class IfcGridAxis
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return (mAxisTag == "$" ? "$," : "'" + mAxisTag + "',#") + AxisCurve.Index.ToString() + "," + ParserSTEP.BoolToString(mSameSense); } protected override string BuildStringSTEP(ReleaseVersion release) { return (string.IsNullOrEmpty(mAxisTag) ? "$," : "'" + ParserIfc.Encode(mAxisTag) + "',#") + AxisCurve.Index.ToString() + "," + ParserSTEP.BoolToString(mSameSense); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
{ {
mAxisTag = ParserSTEP.StripString(str, ref pos, len); mAxisTag = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
AxisCurve = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcCurve; AxisCurve = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcCurve;
mSameSense = ParserSTEP.StripBool(str, ref pos, len); mSameSense = ParserSTEP.StripBool(str, ref pos, len);
} }

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

@ -99,15 +99,15 @@ namespace GeometryGym.Ifc
{ {
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
string result = "'" + mName + (mVersion == "$" ? "',$," : "','" + mVersion + "',") + ParserSTEP.LinkToString(mPublisher); string result = "'" + ParserIfc.Encode(mName) + (string.IsNullOrEmpty(mVersion) ? "',$," : "','" + ParserIfc.Encode(mVersion) + "',") + ParserSTEP.LinkToString(mPublisher);
if (mDatabase.Release < ReleaseVersion.IFC4) if (mDatabase.Release < ReleaseVersion.IFC4)
return result + ",$,(" + string.Join(",", mHasConstraintRelationships.Select(x => "#" + x.StepId)) + ")"; return result + ",$,(" + string.Join(",", mHasConstraintRelationships.Select(x => "#" + x.StepId)) + ")";
return result + "," + IfcDateTime.STEPAttribute(mVersionDate) + "," + (mLocation == "$" ? "$," : "'" + mLocation + "',") + (mDescription == "$" ? "$" : "'" + mDescription + "'"); return result + "," + IfcDateTime.STEPAttribute(mVersionDate) + "," + (string.IsNullOrEmpty(mLocation) ? "$," : "'" + ParserIfc.Encode(mLocation) + "',") + (string.IsNullOrEmpty(mDescription) ? "$" : "'" + ParserIfc.Encode(mDescription) + "'");
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary)
{ {
mName = ParserSTEP.StripString(str, ref pos, len); mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mVersion = ParserSTEP.StripString(str, ref pos, len); mVersion = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mPublisher = ParserSTEP.StripLink(str, ref pos, len); mPublisher = ParserSTEP.StripLink(str, ref pos, len);
if (release < ReleaseVersion.IFC4) if (release < ReleaseVersion.IFC4)
{ {
@ -117,8 +117,8 @@ namespace GeometryGym.Ifc
else else
{ {
mVersionDate = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len)); mVersionDate = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len));
mLocation = ParserSTEP.StripString(str, ref pos, len); mLocation = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mDescription = ParserSTEP.StripString(str, ref pos, len); mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
} }
@ -130,7 +130,7 @@ namespace GeometryGym.Ifc
if (release < ReleaseVersion.IFC4) if (release < ReleaseVersion.IFC4)
return result; return result;
return result + (string.IsNullOrEmpty(mDescription) ? ",$," : ",'" + ParserIfc.Encode(mDescription) + "',") + return result + (string.IsNullOrEmpty(mDescription) ? ",$," : ",'" + ParserIfc.Encode(mDescription) + "',") +
(mLanguage == "$" ? "$," : "'" + mLanguage + "',") + ParserSTEP.ObjToLinkString(mReferencedLibrary); (string.IsNullOrEmpty(mLanguage) ? "$," : "'" + ParserIfc.Encode(mLanguage) + "',") + ParserSTEP.ObjToLinkString(mReferencedLibrary);
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary)
{ {
@ -138,7 +138,7 @@ namespace GeometryGym.Ifc
if (release != ReleaseVersion.IFC2x3) if (release != ReleaseVersion.IFC2x3)
{ {
mDescription = ParserSTEP.StripString(str, ref pos, len); mDescription = ParserSTEP.StripString(str, ref pos, len);
mLanguage = ParserSTEP.StripString(str, ref pos, len); mLanguage = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
ReferencedLibrary = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcLibraryInformation; ReferencedLibrary = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcLibraryInformation;
} }
} }
@ -197,10 +197,10 @@ namespace GeometryGym.Ifc
} }
public abstract partial class IfcLightSource public abstract partial class IfcLightSource
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return (mName == "$" ? "$," : "'" + mName + "',") + ParserSTEP.LinkToString(mLightColour) + "," + ParserSTEP.DoubleOptionalToString(mAmbientIntensity) + "," + ParserSTEP.DoubleOptionalToString(mIntensity); } protected override string BuildStringSTEP(ReleaseVersion release) { return (string.IsNullOrEmpty(mName) ? "$," : "'" + ParserIfc.Encode(mName) + "',") + ParserSTEP.LinkToString(mLightColour) + "," + ParserSTEP.DoubleOptionalToString(mAmbientIntensity) + "," + ParserSTEP.DoubleOptionalToString(mIntensity); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary)
{ {
mName = ParserSTEP.StripString(str, ref pos, len); mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mLightColour = ParserSTEP.StripLink(str, ref pos, len); mLightColour = ParserSTEP.StripLink(str, ref pos, len);
mAmbientIntensity = ParserSTEP.StripDouble(str, ref pos, len); mAmbientIntensity = ParserSTEP.StripDouble(str, ref pos, len);
mIntensity = ParserSTEP.StripDouble(str, ref pos, len); mIntensity = ParserSTEP.StripDouble(str, ref pos, len);

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

@ -108,16 +108,19 @@ namespace GeometryGym.Ifc
} }
public partial class IfcMaterial public partial class IfcMaterial
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return "'" + mName + (release > ReleaseVersion.IFC2x3 ? (mDescription == "$" ? "',$," : "','" + mDescription + "',") + (mCategory == "$" ? "$" : "'" + mCategory + "'") : "'" ); } protected override string BuildStringSTEP(ReleaseVersion release)
{
return "'" + ParserIfc.Encode(mName) + (release > ReleaseVersion.IFC2x3 ? (string.IsNullOrEmpty(mDescription) ? "',$," : "','" + ParserIfc.Encode(mDescription) + "',") +
(string.IsNullOrEmpty(mCategory) ? "$" : "'" + ParserIfc.Encode(mCategory) + "'") : "'" ); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
{ {
mName = ParserSTEP.StripString(str, ref pos, len); mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
if (release != ReleaseVersion.IFC2x3) if (release != ReleaseVersion.IFC2x3)
{ {
try try
{ {
mDescription = ParserSTEP.StripString(str, ref pos, len); mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mCategory = ParserSTEP.StripString(str, ref pos, len); mCategory = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
catch (Exception) { } catch (Exception) { }
} }
@ -137,27 +140,32 @@ namespace GeometryGym.Ifc
} }
public partial class IfcMaterialConstituent public partial class IfcMaterialConstituent
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return (mName == "$" ? "$," : "'" + mName + "',") + (mDescription == "$" ? "$," : "'" + mDescription + "',") + ParserSTEP.LinkToString(mMaterial) + "," + ParserSTEP.DoubleToString(mFraction) + (mCategory == "$" ? ",$" : ",'" + mDescription + "'"); } protected override string BuildStringSTEP(ReleaseVersion release)
{
return (string.IsNullOrEmpty(mName) ? "$," : "'" + ParserIfc.Encode(mName) + "',") +
(string.IsNullOrEmpty(mDescription) ? "$," : "'" + ParserIfc.Encode(mDescription) + "',") + ParserSTEP.LinkToString(mMaterial) + "," +
ParserSTEP.DoubleToString(mFraction) + (string.IsNullOrEmpty(mCategory) ? ",$" : ",'" + ParserIfc.Encode(mCategory) + "'");
}
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
{ {
mName = ParserSTEP.StripString(str, ref pos, len); mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mDescription = ParserSTEP.StripString(str, ref pos, len); mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mMaterial = ParserSTEP.StripLink(str, ref pos, len); mMaterial = ParserSTEP.StripLink(str, ref pos, len);
mFraction = ParserSTEP.StripDouble(str, ref pos, len); mFraction = ParserSTEP.StripDouble(str, ref pos, len);
mCategory = ParserSTEP.StripString(str, ref pos, len); mCategory = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcMaterialConstituentSet public partial class IfcMaterialConstituentSet
{ {
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
return (mName == "$" ? "$," : "'" + mName + "',") + (mDescription == "$" ? "$,(#" : "'" + mDescription + "',(#") + string.Join(",#", mMaterialConstituents.Values.Select(x=>x.StepId)) + ")"; return (string.IsNullOrEmpty(mName) ? "$," : "'" + ParserIfc.Encode(mName) + "',") + (string.IsNullOrEmpty(mDescription) ? "$,(#" : "'" + ParserIfc.Encode(mDescription) + "',(#") + string.Join(",#", mMaterialConstituents.Values.Select(x=>x.StepId)) + ")";
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
{ {
mName = ParserSTEP.StripString(str, ref pos, len); mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mDescription = ParserSTEP.StripString(str, ref pos, len); mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
foreach(IfcMaterialConstituent constituent in ParserSTEP.StripListLink(str, ref pos, len).Select(x=>dictionary[x] as IfcMaterialConstituent)) foreach (IfcMaterialConstituent constituent in ParserSTEP.StripListLink(str, ref pos, len).Select(x=>dictionary[x] as IfcMaterialConstituent))
mMaterialConstituents[constituent.Name] = constituent; mMaterialConstituents[constituent.Name] = constituent;
} }
} }
@ -174,7 +182,8 @@ namespace GeometryGym.Ifc
{ {
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
string s = (release < ReleaseVersion.IFC4 ? "" : (mName == "$" ? ",$," : ",'" + mName + "',") + (mDescription == "$" ? "$," : "'" + mDescription + "',") + (mCategory == "$" ? "$," : "'" + mCategory + "',") + ParserSTEP.DoubleOptionalToString(mPriority)); string s = (release < ReleaseVersion.IFC4 ? "" : (string.IsNullOrEmpty(mName) ? ",$," : ",'" + ParserIfc.Encode(mName) + "',") +
(string.IsNullOrEmpty(mDescription) ? "$," : "'" + ParserIfc.Encode(mDescription) + "',") + (string.IsNullOrEmpty(mCategory) ? "$," : "'" + ParserIfc.Encode(mCategory) + "',") + ParserSTEP.DoubleOptionalToString(mPriority));
return ParserSTEP.LinkToString(mMaterial) + "," + ParserSTEP.DoubleToString(mLayerThickness) + "," + ParserIfc.LogicalToString(mIsVentilated) + s; return ParserSTEP.LinkToString(mMaterial) + "," + ParserSTEP.DoubleToString(mLayerThickness) + "," + ParserIfc.LogicalToString(mIsVentilated) + s;
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
@ -186,9 +195,9 @@ namespace GeometryGym.Ifc
{ {
if (release != ReleaseVersion.IFC2x3) if (release != ReleaseVersion.IFC2x3)
{ {
mName = ParserSTEP.StripString(str, ref pos, len); mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mDescription = ParserSTEP.StripString(str, ref pos, len); mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mCategory = ParserSTEP.StripString(str, ref pos, len); mCategory = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mPriority = ParserSTEP.StripDouble(str, ref pos, len); mPriority = ParserSTEP.StripDouble(str, ref pos, len);
} }
} }
@ -200,14 +209,15 @@ namespace GeometryGym.Ifc
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
return "(" + string.Join(",", mMaterialLayers.Select(x=>"#" +x.StepId)) + return "(" + string.Join(",", mMaterialLayers.Select(x=>"#" +x.StepId)) +
(mLayerSetName == "$" ? "),$" : "),'" + mLayerSetName + "'") + (release < ReleaseVersion.IFC4 ? "" : (mDescription == "$" ? ",$" : ",'" + mDescription + "'")); (string.IsNullOrEmpty(mLayerSetName) ? "),$" : "),'" + ParserIfc.Encode(mLayerSetName) + "'") +
(release < ReleaseVersion.IFC4 ? "" : (string.IsNullOrEmpty(mDescription) ? ",$" : ",'" + ParserIfc.Encode(mDescription) + "'"));
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
{ {
MaterialLayers.AddRange(ParserSTEP.StripListLink(str, ref pos, len).Select(x => dictionary[x] as IfcMaterialLayer)); MaterialLayers.AddRange(ParserSTEP.StripListLink(str, ref pos, len).Select(x => dictionary[x] as IfcMaterialLayer));
mLayerSetName = ParserSTEP.StripString(str, ref pos, len); mLayerSetName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
if (release != ReleaseVersion.IFC2x3) if (release != ReleaseVersion.IFC2x3)
mDescription = ParserSTEP.StripString(str, ref pos, len); mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcMaterialLayerSetUsage public partial class IfcMaterialLayerSetUsage
@ -266,18 +276,23 @@ namespace GeometryGym.Ifc
} }
public partial class IfcMaterialProfile public partial class IfcMaterialProfile
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return (release < ReleaseVersion.IFC4 ? "" : (mName == "$" ? "$," : "'" + mName + "',") + (mDescription == "$" ? "$," : "'" + mDescription + "',") + ParserSTEP.ObjToLinkString(mMaterial) + "," + ParserSTEP.ObjToLinkString(mProfile) + (mPriority >= 0 && mPriority <= 100 ? "," + mPriority+ "," : ",$,") + (mCategory == "$" ? "$" : "'" + mCategory + "'")); } protected override string BuildStringSTEP(ReleaseVersion release)
{
return (release < ReleaseVersion.IFC4 ? "" : (string.IsNullOrEmpty(mName) ? "$," : "'" + ParserIfc.Encode(mName) + "',") +
(string.IsNullOrEmpty(mDescription) ? "$," : "'" + ParserIfc.Encode(mDescription) + "',") + ParserSTEP.ObjToLinkString(mMaterial) + "," +
ParserSTEP.ObjToLinkString(mProfile) + (mPriority >= 0 && mPriority <= 100 ? "," + mPriority+ "," : ",$,") + (string.IsNullOrEmpty(mCategory) ? "$" : "'" + ParserIfc.Encode(mCategory) + "'"));
}
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
{ {
mName = ParserSTEP.StripString(str, ref pos, len); mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mDescription = ParserSTEP.StripString(str, ref pos, len); mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
Material = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcMaterial; Material = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcMaterial;
Profile = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcProfileDef; Profile = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcProfileDef;
string s = ParserSTEP.StripField(str, ref pos, len); string s = ParserSTEP.StripField(str, ref pos, len);
double d = 0; double d = 0;
if( double.TryParse(s, System.Globalization.NumberStyles.Any, ParserSTEP.NumberFormat, out d)) //Was normalizedRatioMeasure if(double.TryParse(s, System.Globalization.NumberStyles.Any, ParserSTEP.NumberFormat, out d)) //Was normalizedRatioMeasure
Priority =(int)d; Priority =(int)d;
mCategory = ParserSTEP.StripString(str, ref pos, len); mCategory = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcMaterialProfileSet public partial class IfcMaterialProfileSet
@ -286,12 +301,12 @@ namespace GeometryGym.Ifc
{ {
if (release < ReleaseVersion.IFC4 || mMaterialProfiles.Count == 0) if (release < ReleaseVersion.IFC4 || mMaterialProfiles.Count == 0)
return ""; return "";
return (mName == "$" ? "$," : "'" + mName + "',") + (mDescription == "$" ? "$,(#" : "'" + mDescription + "',(#") + string.Join(",#", mMaterialProfiles.ConvertAll(x=>x.mIndex)) + ")," + ParserSTEP.ObjToLinkString(mCompositeProfile); return (string.IsNullOrEmpty(mName) ? "$," : "'" + ParserIfc.Encode(mName) + "',") + (string.IsNullOrEmpty(mDescription) ? "$,(#" : "'" + ParserIfc.Encode(mDescription) + "',(") + string.Join(",", mMaterialProfiles.Select(x=>"#" + x.StepId)) + ")," + ParserSTEP.ObjToLinkString(mCompositeProfile);
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
{ {
mName = ParserSTEP.StripString(str, ref pos, len); mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mDescription = ParserSTEP.StripString(str, ref pos, len); mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
MaterialProfiles.AddRange(ParserSTEP.StripListLink(str, ref pos, len).ConvertAll(x => dictionary[x] as IfcMaterialProfile)); MaterialProfiles.AddRange(ParserSTEP.StripListLink(str, ref pos, len).ConvertAll(x => dictionary[x] as IfcMaterialProfile));
CompositeProfile = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcCompositeProfileDef; CompositeProfile = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcCompositeProfileDef;
} }
@ -379,16 +394,22 @@ namespace GeometryGym.Ifc
} }
public partial class IfcMechanicalConcreteMaterialProperties public partial class IfcMechanicalConcreteMaterialProperties
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + "," + ParserSTEP.DoubleOptionalToString(mCompressiveStrength) + "," + ParserSTEP.DoubleOptionalToString(mMaxAggregateSize) + (mAdmixturesDescription == "$" ? ",$," : ",'" + mAdmixturesDescription + "',") + (mWorkability == "$" ? "$," : "'" + mWorkability + "',") + ParserSTEP.DoubleOptionalToString(mProtectivePoreRatio) + (mWaterImpermeability== "$" ? ",$" : ",'" + mWaterImpermeability + "'"); } protected override string BuildStringSTEP(ReleaseVersion release)
{
return base.BuildStringSTEP(release) + "," + ParserSTEP.DoubleOptionalToString(mCompressiveStrength) + "," +
ParserSTEP.DoubleOptionalToString(mMaxAggregateSize) +
(string.IsNullOrEmpty(mAdmixturesDescription) ? ",$," : ",'" + ParserIfc.Encode(mAdmixturesDescription) + "',") +
(string.IsNullOrEmpty(mWorkability) ? "$," : "'" + mWorkability + "',") + ParserSTEP.DoubleOptionalToString(mProtectivePoreRatio) +
(string.IsNullOrEmpty(mWaterImpermeability) ? ",$" : ",'" + ParserIfc.Encode(mWaterImpermeability) + "'"); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
mCompressiveStrength = ParserSTEP.StripDouble(str, ref pos, len); mCompressiveStrength = ParserSTEP.StripDouble(str, ref pos, len);
mMaxAggregateSize = ParserSTEP.StripDouble(str, ref pos, len); mMaxAggregateSize = ParserSTEP.StripDouble(str, ref pos, len);
mAdmixturesDescription = ParserSTEP.StripString(str, ref pos, len); mAdmixturesDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mWorkability = ParserSTEP.StripString(str, ref pos, len); mWorkability = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mProtectivePoreRatio = ParserSTEP.StripDouble(str, ref pos, len); mProtectivePoreRatio = ParserSTEP.StripDouble(str, ref pos, len);
mWaterImpermeability = ParserSTEP.StripString(str, ref pos, len); mWaterImpermeability = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcMechanicalFastener public partial class IfcMechanicalFastener
@ -507,12 +528,18 @@ namespace GeometryGym.Ifc
} }
public partial class IfcMetric public partial class IfcMetric
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + ",." + mBenchMark.ToString() + (mValueSource == "$" ? ".,$," : ".,'" + mValueSource + "',") + (mDataValueValue == null ? ParserSTEP.LinkToString(mDataValue) : mDataValueValue.ToString()) + (mDatabase.Release < ReleaseVersion.IFC4 ? "" : "," + ParserSTEP.LinkToString(mReferencePath)); } protected override string BuildStringSTEP(ReleaseVersion release)
{
return base.BuildStringSTEP(release) + ",." + mBenchMark.ToString() +
(string.IsNullOrEmpty(mValueSource) ? ".,$," : ".,'" + ParserIfc.Encode(mValueSource) + "',") +
(mDataValueValue == null ? ParserSTEP.LinkToString(mDataValue) : mDataValueValue.ToString()) +
(mDatabase.Release < ReleaseVersion.IFC4 ? "" : "," + ParserSTEP.LinkToString(mReferencePath));
}
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
Enum.TryParse<IfcBenchmarkEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mBenchMark); Enum.TryParse<IfcBenchmarkEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mBenchMark);
mValueSource = ParserSTEP.StripString(str, ref pos, len); mValueSource = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
string s = ParserSTEP.StripField(str, ref pos, len); string s = ParserSTEP.StripField(str, ref pos, len);
mDataValueValue = ParserIfc.parseValue(s); mDataValueValue = ParserIfc.parseValue(s);
if (mDataValueValue == null) if (mDataValueValue == null)

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

@ -59,7 +59,7 @@ namespace GeometryGym.Ifc
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
return base.BuildStringSTEP(release) + (mBenchmarkValues.Count == 0 ? ",$," : ",(" + string.Join(",", mBenchmarkValues.Select(x=>"#" + x.StepId)) + "),") + return base.BuildStringSTEP(release) + (mBenchmarkValues.Count == 0 ? ",$," : ",(" + string.Join(",", mBenchmarkValues.Select(x=>"#" + x.StepId)) + "),") +
(mLogicalAggregator != IfcLogicalOperatorEnum.NONE ? "." + mLogicalAggregator.ToString() + ".,." : "$,.") + mObjectiveQualifier + (mUserDefinedQualifier == "$" ? ".,$" : ".,'" + mUserDefinedQualifier + "'"); (mLogicalAggregator != IfcLogicalOperatorEnum.NONE ? "." + mLogicalAggregator.ToString() + ".,." : "$,.") + mObjectiveQualifier + (string.IsNullOrEmpty(mUserDefinedQualifier) ? ".,$" : ".,'" + ParserIfc.Encode(mUserDefinedQualifier) + "'");
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
{ {
@ -69,7 +69,7 @@ namespace GeometryGym.Ifc
if (s[0] == '.') if (s[0] == '.')
Enum.TryParse<IfcLogicalOperatorEnum>(s.Replace(".", ""), true, out mLogicalAggregator); Enum.TryParse<IfcLogicalOperatorEnum>(s.Replace(".", ""), true, out mLogicalAggregator);
Enum.TryParse<IfcObjectiveEnum>(ParserSTEP.StripField( str, ref pos, len).Replace(".", ""), true, out mObjectiveQualifier); Enum.TryParse<IfcObjectiveEnum>(ParserSTEP.StripField( str, ref pos, len).Replace(".", ""), true, out mObjectiveQualifier);
mUserDefinedQualifier = ParserSTEP.StripString(str, ref pos, len); mUserDefinedQualifier = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcOccupant public partial class IfcOccupant
@ -168,17 +168,17 @@ namespace GeometryGym.Ifc
string name = mName; string name = mName;
if(string.IsNullOrEmpty(name)) if(string.IsNullOrEmpty(name))
name = mDatabase.Factory.ApplicationDeveloper; name = mDatabase.Factory.ApplicationDeveloper;
return (mIdentification == "$" ? "$,'" : "'" + mIdentification + "','") + name return (string.IsNullOrEmpty(mIdentification) ? "$,'" : "'" + ParserIfc.Encode(mIdentification) + "','") + ParserIfc.Encode(name)
+ (mDescription == "$" ? "',$," : "','" + mDescription + "',") + (string.IsNullOrEmpty(mDescription) ? "',$," : "','" + ParserIfc.Encode(mDescription) + "',")
+ (mRoles.Count == 0 ? "$," : "(#" + string.Join(",#", Roles.Select(x=>x.Index)) + "),") + (mRoles.Count == 0 ? "$," : "(#" + string.Join(",#", Roles.Select(x=>x.Index)) + "),")
+ (mAddresses.Count == 0 ? "$" : "(#" + string.Join(",#", Addresses.Select(x=>x.Index)) + ")"); + (mAddresses.Count == 0 ? "$" : "(#" + string.Join(",#", Addresses.Select(x=>x.Index)) + ")");
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
{ {
mIdentification = ParserSTEP.StripString(str, ref pos, len); mIdentification = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mName = ParserSTEP.StripString(str, ref pos, len); mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mDescription = ParserSTEP.StripString(str, ref pos, len); mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
Roles.AddRange(ParserSTEP.StripListLink(str, ref pos, len).ConvertAll(x=>dictionary[x] as IfcActorRole)); Roles.AddRange(ParserSTEP.StripListLink(str, ref pos, len).ConvertAll(x=>dictionary[x] as IfcActorRole));
mAddresses.AddRange(ParserSTEP.StripListLink(str, ref pos, len).ConvertAll(x=>dictionary[x] as IfcAddress)); mAddresses.AddRange(ParserSTEP.StripListLink(str, ref pos, len).ConvertAll(x=>dictionary[x] as IfcAddress));
} }

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

@ -140,14 +140,14 @@ namespace GeometryGym.Ifc
{ {
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
string str = (mIdentification == "$" ? "$," : "'" + mIdentification + "',"); string str = (string.IsNullOrEmpty(mIdentification) ? "$," : "'" + ParserIfc.Encode(mIdentification) + "',");
if (mFamilyName == "$" && mGivenName == "$") if (string.IsNullOrEmpty(mFamilyName) && string.IsNullOrEmpty(mGivenName))
str += (mIdentification == "$" ? "'Unknown',$," : "'" + mIdentification + "',$,"); str += (string.IsNullOrEmpty(mIdentification) ? "'Unknown',$," : "'" + ParserIfc.Encode(mIdentification) + "',$,");
else else
str += (mFamilyName == "$" ? "$," : "'" + mFamilyName + "',") + (mGivenName == "$" ? "$," : "'" + mGivenName + "',"); str += (string.IsNullOrEmpty(mFamilyName) ? "$," : "'" + ParserIfc.Encode(mFamilyName) + "',") + (string.IsNullOrEmpty(mGivenName) ? "$," : "'" + ParserIfc.Encode(mGivenName) + "',");
str += (mMiddleNames.Count == 0 ? "$," : "(" + string.Join(",", mMiddleNames.Select(x=> "'" + x + "'")) + "),"); str += (mMiddleNames.Count == 0 ? "$," : "(" + string.Join(",", mMiddleNames.Select(x=> "'" + ParserIfc.Encode(x) + "'")) + "),");
str += (mPrefixTitles.Count == 0 ? "$," : "(" + string.Join(",", mPrefixTitles.Select(x=>"'" + x + "'")) + "),"); str += (mPrefixTitles.Count == 0 ? "$," : "(" + string.Join(",", mPrefixTitles.Select(x=>"'" + ParserIfc.Encode(x) + "'")) + "),");
str += (mSuffixTitles.Count == 0 ? "$," : "(" + string.Join(",", mSuffixTitles.Select(x=>"'" + x + "'")) + "),"); str += (mSuffixTitles.Count == 0 ? "$," : "(" + string.Join(",", mSuffixTitles.Select(x=>"'" + ParserIfc.Encode(x) + "'")) + "),");
str += (Roles.Count == 0 ? "$," : "(#" + string.Join(",#", Roles.ConvertAll(x=>x.Index.ToString())) + "),"); str += (Roles.Count == 0 ? "$," : "(#" + string.Join(",#", Roles.ConvertAll(x=>x.Index.ToString())) + "),");
return str + (Addresses.Count == 0 ? "$" : "(#" + string.Join(",#", Addresses.ConvertAll(x=>x.Index.ToString())) + ")"); return str + (Addresses.Count == 0 ? "$" : "(#" + string.Join(",#", Addresses.ConvertAll(x=>x.Index.ToString())) + ")");
@ -157,11 +157,11 @@ namespace GeometryGym.Ifc
mIdentification = ParserSTEP.StripString(str, ref pos, len); mIdentification = ParserSTEP.StripString(str, ref pos, len);
mFamilyName = ParserSTEP.StripString(str, ref pos, len); mFamilyName = ParserSTEP.StripString(str, ref pos, len);
mGivenName = ParserSTEP.StripString(str, ref pos, len); mGivenName = ParserSTEP.StripString(str, ref pos, len);
mMiddleNames = ParserSTEP.SplitListStrings(ParserSTEP.StripField(str, ref pos, len)).ConvertAll(x => x.Replace("'", "")); mMiddleNames.AddRange(ParserSTEP.SplitListStrings(ParserSTEP.StripField(str, ref pos, len)).Select(x=>ParserIfc.Decode(x)));
mPrefixTitles = ParserSTEP.SplitListStrings(ParserSTEP.StripField(str, ref pos, len)).ConvertAll(x => x.Replace("'", "")); mPrefixTitles.AddRange(ParserSTEP.SplitListStrings(ParserSTEP.StripField(str, ref pos, len)).Select(x => ParserIfc.Decode(x)));
mSuffixTitles = ParserSTEP.SplitListStrings(ParserSTEP.StripField(str, ref pos, len)).ConvertAll(x => x.Replace("'", "")); mSuffixTitles.AddRange(ParserSTEP.SplitListStrings(ParserSTEP.StripField(str, ref pos, len)).Select(x => ParserIfc.Decode(x)));
mRoles = new LIST<IfcActorRole>(ParserSTEP.StripListLink(str, ref pos, len).ConvertAll(x=> dictionary[x] as IfcActorRole)); mRoles.AddRange(ParserSTEP.StripListLink(str, ref pos, len).ConvertAll(x=> dictionary[x] as IfcActorRole));
mAddresses = new LIST<IfcAddress>(ParserSTEP.StripListLink(str, ref pos, len).ConvertAll(x=> dictionary[x] as IfcAddress)); mAddresses.AddRange(ParserSTEP.StripListLink(str, ref pos, len).ConvertAll(x=> dictionary[x] as IfcAddress));
} }
} }
public partial class IfcPersonAndOrganization public partial class IfcPersonAndOrganization
@ -198,11 +198,11 @@ namespace GeometryGym.Ifc
} }
public abstract partial class IfcPhysicalQuantity public abstract partial class IfcPhysicalQuantity
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return "'" + mName + (mDescription == "$" ? "',$" : "','" + mDescription + "'"); } protected override string BuildStringSTEP(ReleaseVersion release) { return "'" + ParserIfc.Encode(mName) + (string.IsNullOrEmpty(mDescription) ? "',$" : "','" + ParserIfc.Encode(mDescription) + "'"); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
{ {
mName = ParserSTEP.StripString(str, ref pos, len); mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mDescription = ParserSTEP.StripString(str, ref pos, len); mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public abstract partial class IfcPhysicalSimpleQuantity public abstract partial class IfcPhysicalSimpleQuantity
@ -450,48 +450,33 @@ namespace GeometryGym.Ifc
{ {
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
return base.BuildStringSTEP(release) + (mInternalLocation == "$" ? ",$" : ",'" + mInternalLocation + "'") + return base.BuildStringSTEP(release) + (string.IsNullOrEmpty(mInternalLocation) ? ",$" : ",'" + ParserIfc.Encode(mInternalLocation) + "'") +
(mAddressLines.Count == 0 ? ",$" : ",('" + string.Join("','", mAddressLines.Select(x => ParserIfc.Encode(x))) + "')") (mAddressLines.Count == 0 ? ",$" : ",('" + string.Join("','", mAddressLines.Select(x => ParserIfc.Encode(x))) + "')") +
+ (mPostalBox == "$" ? ",$" : ",'" + mPostalBox + "'") + (mTown == "$" ? ",$" : ",'" + mTown + "'") + (mRegion == "$" ? ",$" : ",'" + mRegion + "'") + (mPostalCode == "$" ? ",$" : ",'" + mPostalCode + "'") + (mCountry == "$" ? ",$" : ",'" + mCountry + "'"); (string.IsNullOrEmpty(mPostalBox) ? ",$" : ",'" + ParserIfc.Encode(mPostalBox) + "'") +
(string.IsNullOrEmpty(mTown) ? ",$" : ",'" + ParserIfc.Encode(mTown) + "'") +
(string.IsNullOrEmpty(mRegion) ? ",$" : ",'" + ParserIfc.Encode(mRegion) + "'") +
(string.IsNullOrEmpty(mPostalCode) ? ",$" : ",'" + ParserIfc.Encode(mPostalCode) + "'") +
(string.IsNullOrEmpty(mCountry) ? ",$" : ",'" + ParserIfc.Encode(mCountry) + "'");
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
mInternalLocation = ParserSTEP.StripString(str, ref pos, len); mInternalLocation = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
if (string.IsNullOrEmpty(mInternalLocation)) mAddressLines.AddRange(ParserSTEP.SplitListStrings(ParserSTEP.StripField(str, ref pos, len)).Select(x => ParserIfc.Decode(x)));
mInternalLocation = "$"; mPostalBox = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
string s = ParserSTEP.StripField(str, ref pos, len); mTown = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
if (s != "$") mRegion = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
{ mPostalCode = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
List<string> lst = ParserSTEP.SplitLineFields(s.Substring(1, s.Length - 2)); mCountry = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
for (int icounter = 0; icounter < lst.Count; icounter++)
{
string field = lst[icounter];
if (field.Length > 2)
mAddressLines.Add(ParserIfc.Decode(field.Substring(1, field.Length - 2)));
}
}
mPostalBox = ParserSTEP.StripString(str, ref pos, len);
if (string.IsNullOrEmpty(mPostalBox))
mPostalBox = "$";
mTown = ParserSTEP.StripString(str, ref pos, len);
if (string.IsNullOrEmpty(mTown))
mTown = "$";
mRegion = ParserSTEP.StripString(str, ref pos, len);
if (string.IsNullOrEmpty(mRegion))
mRegion = "$";
mPostalCode = ParserSTEP.StripString(str, ref pos, len);
if (string.IsNullOrEmpty(mPostalCode))
mPostalCode = "$";
mCountry = ParserSTEP.StripString(str, ref pos, len);
if (string.IsNullOrEmpty(mCountry))
mCountry = "$";
} }
} }
public abstract partial class IfcPreDefinedItem public abstract partial class IfcPreDefinedItem
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return "'" + mName + "'"; } protected override string BuildStringSTEP(ReleaseVersion release) { return "'" + ParserIfc.Encode(mName)+ "'"; }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) { mName = ParserSTEP.StripString(str, ref pos, len); } internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
{
mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
}
} }
public partial class IfcPresentationLayerAssignment public partial class IfcPresentationLayerAssignment
{ {
@ -499,17 +484,16 @@ namespace GeometryGym.Ifc
{ {
if (mAssignedItems.Count < 1) if (mAssignedItems.Count < 1)
return ""; return "";
return "'" + mName + (mDescription == "$" ? "',$,(#" : "','" + mDescription + "',(#") + return "'" + ParserIfc.Encode(mName) + (string.IsNullOrEmpty(mDescription) ? "',$,(" : "','" + ParserIfc.Encode(mDescription) + "',(") +
string.Join(",#", mAssignedItems.ConvertAll(x=>x.Index)) + (mIdentifier == "$" ? "),$" : "),'" + mIdentifier + "'"); string.Join(",", mAssignedItems.ConvertAll(x=> "#" + x.StepId)) + (string.IsNullOrEmpty(mIdentifier) ? "),$" : "),'" + ParserIfc.Encode(mIdentifier) + "'");
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
{ {
mName = ParserSTEP.StripString(str, ref pos, len); mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mDescription = ParserSTEP.StripString(str, ref pos, len); mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
AssignedItems.AddRange(ParserSTEP.StripListLink(str, ref pos, len).ConvertAll(x=>dictionary[x] as IfcLayeredItem)); AssignedItems.AddRange(ParserSTEP.StripListLink(str, ref pos, len).ConvertAll(x=>dictionary[x] as IfcLayeredItem));
mIdentifier = ParserSTEP.StripString(str, ref pos, len); mIdentifier = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcPresentationLayerWithStyle public partial class IfcPresentationLayerWithStyle
{ {
@ -532,8 +516,8 @@ namespace GeometryGym.Ifc
} }
public abstract partial class IfcPresentationStyle public abstract partial class IfcPresentationStyle
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return (mName == "$" ? "$" : "'" + mName + "'"); } protected override string BuildStringSTEP(ReleaseVersion release) { return (string.IsNullOrEmpty(mName) ? "$" : "'" + ParserIfc.Encode(mName) + "'"); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) { mName = ParserSTEP.StripString(str, ref pos, len); } internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) { mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len)); }
} }
public partial class IfcPresentationStyleAssignment public partial class IfcPresentationStyleAssignment
{ {
@ -551,7 +535,7 @@ namespace GeometryGym.Ifc
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
return base.BuildStringSTEP(release) + (release < ReleaseVersion.IFC4 ? ",'" + ParserIfc.Encode(mIdentification) + "'" : "") + ",." + return base.BuildStringSTEP(release) + (release < ReleaseVersion.IFC4 ? ",'" + ParserIfc.Encode(mIdentification) + "'" : "") + ",." +
mPredefinedType.ToString() + (release < ReleaseVersion.IFC4 ? mUserDefinedProcedureType == "$" ? ".,$" : ".,'" + mUserDefinedProcedureType + "'" : ""); mPredefinedType.ToString() + (release < ReleaseVersion.IFC4 ? string.IsNullOrEmpty(mUserDefinedProcedureType) ? ".,$" : ".,'" + ParserIfc.Encode(mUserDefinedProcedureType) + "'" : "");
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
{ {
@ -561,7 +545,7 @@ namespace GeometryGym.Ifc
Enum.TryParse<IfcProcedureTypeEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mPredefinedType); Enum.TryParse<IfcProcedureTypeEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mPredefinedType);
if(release < ReleaseVersion.IFC4) if(release < ReleaseVersion.IFC4)
mUserDefinedProcedureType = ParserSTEP.StripString(str, ref pos, len); mUserDefinedProcedureType = ParserIfc.Encode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcProcedureType public partial class IfcProcedureType
@ -604,27 +588,29 @@ namespace GeometryGym.Ifc
{ {
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
string result = (mName == "$" ? "$," : "'" + mName + "',") + (mDescription == "$" ? "$,(" : "'" + mDescription + "',("); return (string.IsNullOrEmpty(mName) ? "$," : "'" + ParserIfc.Encode(mName) + "',") +
if (mRepresentations.Count > 0) (string.IsNullOrEmpty(mDescription) ? "$,(" : "'" + ParserIfc.Encode(mDescription) + "',(") +
result += "#" + string.Join(",#", mRepresentations.ConvertAll(x => x.mIndex.ToString())); string.Join(",", mRepresentations.ConvertAll(x => "#" + x.StepId)) + ")";
return result + ")";
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
{ {
mName = ParserSTEP.StripString(str, ref pos, len); mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mDescription = ParserSTEP.StripString(str, ref pos, len); mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
Representations.AddRange(ParserSTEP.StripListLink(str, ref pos, len).ConvertAll(x=>dictionary[x] as Representation)); Representations.AddRange(ParserSTEP.StripListLink(str, ref pos, len).ConvertAll(x=>dictionary[x] as Representation));
} }
} }
public partial class IfcProfileDef public partial class IfcProfileDef
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return "." + mProfileType.ToString() + (mProfileName == "$" ? ".,$" : ".,'" + mProfileName + "'"); } protected override string BuildStringSTEP(ReleaseVersion release)
{
return "." + mProfileType.ToString() + (string.IsNullOrEmpty(mProfileName) ? ".,$" : ".,'" + ParserIfc.Encode( mProfileName) + "'");
}
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
{ {
string s = ParserSTEP.StripField(str, ref pos, len); string s = ParserSTEP.StripField(str, ref pos, len);
if (s.StartsWith(".")) if (s.StartsWith("."))
Enum.TryParse<IfcProfileTypeEnum>(s.Replace(".", ""), true, out mProfileType); Enum.TryParse<IfcProfileTypeEnum>(s.Replace(".", ""), true, out mProfileType);
mProfileName = ParserSTEP.StripString(str, ref pos, len); ProfileName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcProfileProperties public partial class IfcProfileProperties
@ -680,18 +666,22 @@ namespace GeometryGym.Ifc
} }
public partial class IfcProjectOrder public partial class IfcProjectOrder
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + (release < ReleaseVersion.IFC4 ? ",'" + mIdentification + "',." : ",.") + mPredefinedType.ToString() + (mStatus == "$" ? ".,$" : ".," + mStatus + "'") + (release < ReleaseVersion.IFC4 ? "" : (mLongDescription == "$" ? ",$" : ",'" + mLongDescription + "'")); } protected override string BuildStringSTEP(ReleaseVersion release)
{
return base.BuildStringSTEP(release) + (release < ReleaseVersion.IFC4 ? ",'" + ParserIfc.Encode(mIdentification) + "',." : ",.") +
mPredefinedType.ToString() + (string.IsNullOrEmpty(mStatus) ? ".,$" : ".," + ParserIfc.Encode(mStatus) + "'") +
(release < ReleaseVersion.IFC4 ? "" : (string.IsNullOrEmpty(mLongDescription) ? ",$" : ",'" + ParserIfc.Encode(mLongDescription) + "'")); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
if (release < ReleaseVersion.IFC4) if (release < ReleaseVersion.IFC4)
mIdentification = ParserSTEP.StripString(str, ref pos, len); mIdentification = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
string s = ParserSTEP.StripField(str, ref pos, len); string s = ParserSTEP.StripField(str, ref pos, len);
if (s.StartsWith(".")) if (s.StartsWith("."))
Enum.TryParse<IfcProjectOrderTypeEnum>(s.Replace(".", ""), true, out mPredefinedType); Enum.TryParse<IfcProjectOrderTypeEnum>(s.Replace(".", ""), true, out mPredefinedType);
mStatus = ParserSTEP.StripString(str, ref pos, len); mStatus = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
if (release != ReleaseVersion.IFC2x3) if (release != ReleaseVersion.IFC2x3)
mLongDescription = ParserSTEP.StripString(str, ref pos, len); mLongDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcProjectOrderRecord public partial class IfcProjectOrderRecord
@ -764,13 +754,13 @@ namespace GeometryGym.Ifc
} }
public partial class IfcPropertyDependencyRelationship public partial class IfcPropertyDependencyRelationship
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + ",#"+ mDependingProperty + ",#" + mDependantProperty + (mExpression == "$" ? ",$" : ",'" + mExpression + "'"); } protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + ",#"+ mDependingProperty + ",#" + mDependantProperty + (string.IsNullOrEmpty(mExpression) ? ",$" : ",'" + ParserIfc.Encode(mExpression) + "'"); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
mDependingProperty = ParserSTEP.StripLink(str, ref pos, len); mDependingProperty = ParserSTEP.StripLink(str, ref pos, len);
mDependantProperty = ParserSTEP.StripLink(str, ref pos, len); mDependantProperty = ParserSTEP.StripLink(str, ref pos, len);
mExpression = ParserSTEP.StripString(str, ref pos, len); mExpression = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcPropertyEnumeratedValue public partial class IfcPropertyEnumeratedValue
@ -830,26 +820,16 @@ namespace GeometryGym.Ifc
{ {
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
string result = base.BuildStringSTEP(release); return base.BuildStringSTEP(release) + (mNominalValue == null || mNominalValue.Count == 0 ? ",$," : ",(" + string.Join(",", mNominalValue.Select(x => x.ToString())) + "),") + (mUnit == null ? "$" : "#" + mUnit.StepId);
if (mNominalValue == null)
result += ",$,";
else
{
result += ",(" + mNominalValue[0].ToString();
for (int icounter = 1; icounter < mNominalValue.Count; icounter++)
result += "," + mNominalValue[icounter].ToString();
result += "),";
}
return result + (mUnit == 0 ? "$" : "#" + mUnit);
} }
} }
public partial class IfcPropertyReferenceValue public partial class IfcPropertyReferenceValue
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + (mUsageName == "$" ? ",$," : ",'" + mUsageName + "',") + (mPropertyReference == 0 ? "$" : "#" + mPropertyReference); } protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + (string.IsNullOrEmpty(mUsageName) ? ",$," : ",'" + ParserIfc.Encode(mUsageName) + "',") + (mPropertyReference == 0 ? "$" : "#" + mPropertyReference); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
mUsageName = ParserSTEP.StripString(str, ref pos, len); mUsageName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mPropertyReference = ParserSTEP.StripLink(str, ref pos, len); mPropertyReference = ParserSTEP.StripLink(str, ref pos, len);
} }
} }
@ -875,7 +855,7 @@ namespace GeometryGym.Ifc
if (release < ReleaseVersion.IFC4 || mHasPropertyTemplates.Count == 0) if (release < ReleaseVersion.IFC4 || mHasPropertyTemplates.Count == 0)
return ""; return "";
return base.BuildStringSTEP(release) + (mTemplateType == IfcPropertySetTemplateTypeEnum.NOTDEFINED ? ",$," : ",." + mTemplateType + ".,") + return base.BuildStringSTEP(release) + (mTemplateType == IfcPropertySetTemplateTypeEnum.NOTDEFINED ? ",$," : ",." + mTemplateType + ".,") +
(mApplicableEntity == "$" ? "$,(#" : "'" + mApplicableEntity + "',(#") + string.Join(",#", mHasPropertyTemplates.Values.Select(x => x.StepId)) + ")"; (string.IsNullOrEmpty(mApplicableEntity) ? "$,(#" : "'" + ParserIfc.Encode(mApplicableEntity) + "',(#") + string.Join(",#", mHasPropertyTemplates.Values.Select(x => x.StepId)) + ")";
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
{ {
@ -883,7 +863,7 @@ namespace GeometryGym.Ifc
string field = ParserSTEP.StripField(str, ref pos, len); string field = ParserSTEP.StripField(str, ref pos, len);
if (field.StartsWith(".")) if (field.StartsWith("."))
Enum.TryParse<IfcPropertySetTemplateTypeEnum>(field.Replace(".", ""), true, out mTemplateType); Enum.TryParse<IfcPropertySetTemplateTypeEnum>(field.Replace(".", ""), true, out mTemplateType);
mApplicableEntity = ParserSTEP.StripString(str, ref pos, len); mApplicableEntity = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
foreach (IfcPropertyTemplate property in ParserSTEP.StripListLink(str, ref pos, len).Select(x => dictionary[x] as IfcPropertyTemplate)) foreach (IfcPropertyTemplate property in ParserSTEP.StripListLink(str, ref pos, len).Select(x => dictionary[x] as IfcPropertyTemplate))
AddPropertyTemplate(property); AddPropertyTemplate(property);
} }
@ -914,26 +894,22 @@ namespace GeometryGym.Ifc
{ {
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
string result = base.BuildStringSTEP(release) + (mDefiningValues.Count > 0 ? ",(" + mDefiningValues[0].ToString() : ",$,"); return base.BuildStringSTEP(release) + (mDefiningValues.Count > 0 ? ",(" + string.Join(",", mDefiningValues.Select(x=>x.ToString())) + ")," : ",$,") +
for (int icounter = 1; icounter < mDefiningValues.Count; icounter++) (mDefinedValues.Count > 0 ? "(" + string.Join(",", mDefinedValues.Select(x=>x.ToString())) + ")," : "$,") +
result += "," + mDefiningValues[icounter].ToString(); (string.IsNullOrEmpty(mExpression) ? "$," : "'" + ParserIfc.Encode(mExpression) + "',") +
result += (mDefiningValues.Count > 0 ? ")," : "") + (mDefinedValues.Count > 0 ? "(" + mDefinedValues[0].ToString() : "$,"); (mDefiningUnit == null ? "$" : "#" + mDefiningUnit.StepId) +
for (int icounter = 1; icounter < mDefinedValues.Count; icounter++) (mDefinedUnit == null ? ",$,." : ",#,." + mDefinedUnit.StepId) + mCurveInterpolation.ToString() + ".";
result += "," + mDefinedValues[icounter].ToString();
return result + (mDefinedValues.Count > 0 ? ")," : "") + mExpression + "," + ParserSTEP.LinkToString(mDefiningUnit) + "," + ParserSTEP.LinkToString(mDefinedUnit) + ",." + mCurveInterpolation.ToString() + ".";
} }
} }
public partial class IfcPropertyTableValue public partial class IfcPropertyTableValue
{ {
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
string result = base.BuildStringSTEP(release) + (mDefiningValues.Count > 0 ? ",(" + mDefiningValues[0].ToString() : ",$,"); return base.BuildStringSTEP(release) + (mDefiningValues.Count > 0 ? ",(" + string.Join(",", mDefiningValues.Select(x => x.ToString())) + ")," : ",$,") +
for (int icounter = 1; icounter < mDefiningValues.Count; icounter++) (mDefinedValues.Count > 0 ? "(" + string.Join(",", mDefinedValues.Select(x => x.ToString())) + ")," : "$,") +
result += "," + mDefiningValues[icounter].ToString(); (string.IsNullOrEmpty(mExpression) ? "$," : "'" + ParserIfc.Encode(mExpression) + "',") +
result += (mDefiningValues.Count > 0 ? ")," : "") + (mDefinedValues.Count > 0 ? "(" + mDefinedValues[0].ToString() : "$,"); (mDefiningUnit == null ? "$" : "#" + mDefiningUnit.StepId) +
for (int icounter = 1; icounter < mDefinedValues.Count; icounter++) (mDefinedUnit == null ? ",$,." : ",#,." + mDefinedUnit.StepId) + mCurveInterpolation.ToString() + ".";
result += "," + mDefinedValues[icounter].ToString();
return result + (mDefinedValues.Count > 0 ? ")" : "") + (mExpression == "$" ? ",$," : ",'" + mExpression + "',") + ParserSTEP.ObjToLinkString(mDefiningUnit) + "," + ParserSTEP.ObjToLinkString(mDefinedUnit) + ",." + mCurveInterpolation.ToString() + ".";
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
{ {
@ -960,7 +936,7 @@ namespace GeometryGym.Ifc
mDefinedValues.Add(v); mDefinedValues.Add(v);
} }
} }
mExpression = ParserSTEP.StripString(str, ref pos, len); mExpression = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mDefiningUnit = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcUnit; mDefiningUnit = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcUnit;
mDefinedUnit = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcUnit; mDefinedUnit = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcUnit;
s = ParserSTEP.StripField(str, ref pos, len); s = ParserSTEP.StripField(str, ref pos, len);
@ -1014,12 +990,12 @@ namespace GeometryGym.Ifc
} }
public partial class IfcProxy public partial class IfcProxy
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + ",." + mProxyType.ToString() + ".," + (mTag == "$" ? "$" : "'" + mTag + "'"); } protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + ",." + mProxyType.ToString() + ".," + (string.IsNullOrEmpty(mTag) ? "$" : "'" + ParserIfc.Encode(mTag) + "'"); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
Enum.TryParse<IfcObjectTypeEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mProxyType); Enum.TryParse<IfcObjectTypeEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mProxyType);
mTag = ParserSTEP.StripString(str, ref pos, len); mTag = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcPump public partial class IfcPump

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

@ -347,24 +347,16 @@ namespace GeometryGym.Ifc
{ {
if (mDatabase.Release < ReleaseVersion.IFC4) if (mDatabase.Release < ReleaseVersion.IFC4)
return ""; return "";
string str = (mTypeIdentifier == "$" ? "$" : "'" + mTypeIdentifier + "'") + (mAttributeIdentifier == "$" ? ",$," : ",'" + mAttributeIdentifier + "',") + return (string.IsNullOrEmpty(mTypeIdentifier) ? "$" : "'" + ParserIfc.Encode(mTypeIdentifier) + "'") +
(mInstanceName == "$" ? "$," : "'" + mInstanceName + "',"); (string.IsNullOrEmpty(mAttributeIdentifier) ? ",$," : ",'" + ParserIfc.Encode(mAttributeIdentifier) + "',") +
if (mListPositions.Count == 0) (string.IsNullOrEmpty(mInstanceName) ? "$," : "'" + ParserIfc.Encode(mInstanceName) + "',") +
str += "$,"; (mListPositions.Count == 0 ? "$," : "(" + string.Join(",", mListPositions) + "),") + ParserSTEP.LinkToString(mInnerReference);
else
{
str += "(" + mListPositions[0];
for (int icounter = 1; icounter < mListPositions.Count; icounter++)
str += "," + mListPositions[icounter];
str += "),";
}
return str + ParserSTEP.LinkToString(mInnerReference);
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary)
{ {
mTypeIdentifier = ParserSTEP.StripString(str, ref pos, len); mTypeIdentifier = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mAttributeIdentifier = ParserSTEP.StripString(str, ref pos, len); mAttributeIdentifier = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mInstanceName = ParserSTEP.StripString(str, ref pos, len); mInstanceName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
string s = ParserSTEP.StripField(str, ref pos, len); string s = ParserSTEP.StripField(str, ref pos, len);
if (s.StartsWith("(")) if (s.StartsWith("("))
mListPositions.AddRange(ParserSTEP.SplitLineFields(s.Substring(1, s.Length - 2)).ConvertAll(x => int.Parse(x))); mListPositions.AddRange(ParserSTEP.SplitLineFields(s.Substring(1, s.Length - 2)).ConvertAll(x => int.Parse(x)));
@ -441,16 +433,14 @@ namespace GeometryGym.Ifc
{ {
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
string result = base.BuildStringSTEP(release) + (mDefinitionType == "$" ? ",$,(#" : ",'" + mDefinitionType + "',(#") + mReinforcementSectionDefinitions[0]; return base.BuildStringSTEP(release) + (string.IsNullOrEmpty(mDefinitionType) ? ",$,(" : ",'" + ParserIfc.Encode(mDefinitionType) + "',(")
for (int icounter = 1; icounter < mReinforcementSectionDefinitions.Count; icounter++) + string.Join(",", mReinforcementSectionDefinitions.Select(x=>"#" + x.StepId)) + ")";
result += ",#" + mReinforcementSectionDefinitions;
return result + ")";
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
mDefinitionType = ParserSTEP.StripString(str, ref pos, len); mDefinitionType = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mReinforcementSectionDefinitions = ParserSTEP.StripListLink(str, ref pos, len); ReinforcementSectionDefinitions.AddRange(ParserSTEP.StripListLink(str, ref pos, len).Select(x=>dictionary[x] as IfcSectionReinforcementProperties));
} }
} }
public partial class IfcReinforcingBar public partial class IfcReinforcingBar
@ -480,20 +470,11 @@ namespace GeometryGym.Ifc
{ {
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
string result = base.BuildStringSTEP(release); return base.BuildStringSTEP(release) + ",." + mPredefinedType + ".," + ParserSTEP.DoubleOptionalToString(mNominalDiameter) + "," +
result += ",." + mPredefinedType + ".," + ParserSTEP.DoubleOptionalToString(mNominalDiameter) + ","; ParserSTEP.DoubleOptionalToString(mCrossSectionArea) + "," + ParserSTEP.DoubleOptionalToString(mBarLength) +
result += ParserSTEP.DoubleOptionalToString(mCrossSectionArea) + "," + ParserSTEP.DoubleOptionalToString(mBarLength); (mBarSurface == IfcReinforcingBarSurfaceEnum.NOTDEFINED ? ",$," : ",." + mBarSurface.ToString() + ".,") +
result += (mBarSurface == IfcReinforcingBarSurfaceEnum.NOTDEFINED ? ",$," : ",." + mBarSurface.ToString() + ".,") + (mBendingShapeCode == "$" ? "$," : "'" + mBendingShapeCode + "',"); (string.IsNullOrEmpty(mBendingShapeCode) ? "$," : "'" + ParserIfc.Encode(mBendingShapeCode) + "',") +
if (mBendingParameters.Count == 0) (mBendingParameters.Count == 0 ? "$" : "(" + string.Join(",", mBendingParameters) + ")");
result += "$";
else
{
result += "(" + mBendingParameters[0].ToString();
for (int icounter = 1; icounter < mBendingParameters.Count; icounter++)
result += "," + mBendingParameters[icounter].ToString();
result += ")";
}
return result;
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary)
{ {
@ -503,18 +484,17 @@ namespace GeometryGym.Ifc
mCrossSectionArea = ParserSTEP.StripDouble(str, ref pos, len); mCrossSectionArea = ParserSTEP.StripDouble(str, ref pos, len);
mBarLength = ParserSTEP.StripDouble(str, ref pos, len); mBarLength = ParserSTEP.StripDouble(str, ref pos, len);
Enum.TryParse<IfcReinforcingBarSurfaceEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mBarSurface); Enum.TryParse<IfcReinforcingBarSurfaceEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mBarSurface);
mBendingShapeCode = ParserSTEP.StripString(str, ref pos, len); mBendingShapeCode = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
//t.mBendingParameters = mBendingParameters.AddRange(ParserSTEP.SplitListStrings(ParserSTEP.StripField(str, ref pos, len)).Select(x=>ParserIfc.parseValue(x) as IfcBendingParameterSelect));
ParserSTEP.StripField(str, ref pos, len);
} }
} }
public abstract partial class IfcReinforcingElement public abstract partial class IfcReinforcingElement
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + (mSteelGrade == "$" ? ",$" : ",'" + mSteelGrade + "'"); } protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + (string.IsNullOrEmpty(mSteelGrade) ? ",$" : ",'" + ParserIfc.Encode(mSteelGrade) + "'"); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
mSteelGrade = ParserSTEP.StripString(str, ref pos, len); mSteelGrade = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcReinforcingMesh public partial class IfcReinforcingMesh
@ -550,21 +530,12 @@ namespace GeometryGym.Ifc
{ {
if (mDatabase.Release < ReleaseVersion.IFC4) if (mDatabase.Release < ReleaseVersion.IFC4)
return ""; return "";
string result = base.BuildStringSTEP(release) + ",." + mPredefinedType + ".," + ParserSTEP.DoubleOptionalToString(mMeshLength) + "," + return base.BuildStringSTEP(release) + ",." + mPredefinedType + ".," + ParserSTEP.DoubleOptionalToString(mMeshLength) + "," +
ParserSTEP.DoubleOptionalToString(mMeshWidth) + "," + ParserSTEP.DoubleToString(mLongitudinalBarNominalDiameter) + "," + ParserSTEP.DoubleOptionalToString(mMeshWidth) + "," + ParserSTEP.DoubleToString(mLongitudinalBarNominalDiameter) + "," +
ParserSTEP.DoubleToString(mTransverseBarNominalDiameter) + "," + ParserSTEP.DoubleToString(mLongitudinalBarCrossSectionArea) + "," + ParserSTEP.DoubleToString(mTransverseBarNominalDiameter) + "," + ParserSTEP.DoubleToString(mLongitudinalBarCrossSectionArea) + "," +
ParserSTEP.DoubleToString(mTransverseBarCrossSectionArea) + "," + ParserSTEP.DoubleToString(mLongitudinalBarSpacing) + "," + ParserSTEP.DoubleToString(mTransverseBarCrossSectionArea) + "," + ParserSTEP.DoubleToString(mLongitudinalBarSpacing) + "," +
ParserSTEP.DoubleToString(mTransverseBarSpacing) + (mBendingShapeCode == "$" ? ",$," : ",'" + mBendingShapeCode + "',"); ParserSTEP.DoubleToString(mTransverseBarSpacing) + (string.IsNullOrEmpty(mBendingShapeCode) ? ",$," : ",'" + ParserIfc.Encode(mBendingShapeCode) + "',") +
if (mBendingParameters.Count == 0) (mBendingParameters.Count == 0 ? "$" : "(" + string.Join(",", mBendingParameters) + ")");
result += "$";
else
{
result += "(" + mBendingParameters[0].ToString();
for (int icounter = 1; icounter < mBendingParameters.Count; icounter++)
result += "," + mBendingParameters[icounter].ToString();
result += ")";
}
return result;
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary)
{ {
@ -579,8 +550,8 @@ namespace GeometryGym.Ifc
mTransverseBarCrossSectionArea = ParserSTEP.StripDouble(str, ref pos, len); mTransverseBarCrossSectionArea = ParserSTEP.StripDouble(str, ref pos, len);
mLongitudinalBarSpacing = ParserSTEP.StripDouble(str, ref pos, len); mLongitudinalBarSpacing = ParserSTEP.StripDouble(str, ref pos, len);
mTransverseBarSpacing = ParserSTEP.StripDouble(str, ref pos, len); mTransverseBarSpacing = ParserSTEP.StripDouble(str, ref pos, len);
mBendingShapeCode = ParserSTEP.StripString(str, ref pos, len); mBendingShapeCode = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
// parse bending mBendingParameters.AddRange(ParserSTEP.SplitListStrings(ParserSTEP.StripField(str, ref pos, len)).Select(x => ParserIfc.parseValue(x) as IfcBendingParameterSelect));
} }
} }
public partial class IfcRelAdheresToElement public partial class IfcRelAdheresToElement
@ -746,11 +717,13 @@ namespace GeometryGym.Ifc
} }
public partial class IfcRelAssociatesConstraint public partial class IfcRelAssociatesConstraint
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return (RelatingConstraint == null ? "" : base.BuildStringSTEP(release) + (mIntent == "$" ? ",$," : ",'" + mIntent + "',") + ParserSTEP.LinkToString(mRelatingConstraint)); } protected override string BuildStringSTEP(ReleaseVersion release)
{
return (RelatingConstraint == null ? "" : base.BuildStringSTEP(release) + (string.IsNullOrEmpty(mIntent) ? ",$," : ",'" + ParserIfc.Encode(mIntent) + "',") + ParserSTEP.LinkToString(mRelatingConstraint)); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
mIntent = ParserSTEP.StripString(str, ref pos, len); mIntent = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
RelatingConstraint = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcConstraint; RelatingConstraint = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcConstraint;
} }
} }
@ -944,13 +917,13 @@ namespace GeometryGym.Ifc
{ {
if (mRealizingElements.Count == 0) if (mRealizingElements.Count == 0)
return ""; return "";
return base.BuildStringSTEP(release) + ",(#" + string.Join(",#", mRealizingElements.Select(x => x.Index)) + (mConnectionType == "$" ? "),$" : "),'" + mConnectionType + "'"); return base.BuildStringSTEP(release) + ",(#" + string.Join(",#", mRealizingElements.Select(x => x.Index)) + (string.IsNullOrEmpty(mConnectionType) ? "),$" : "),'" + ParserIfc.Encode(mConnectionType) + "'");
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
RealizingElements.AddRange(ParserSTEP.StripListLink(str, ref pos, len).ConvertAll(x => dictionary[x] as IfcElement)); RealizingElements.AddRange(ParserSTEP.StripListLink(str, ref pos, len).ConvertAll(x => dictionary[x] as IfcElement));
mConnectionType = ParserSTEP.StripString(str, ref pos, len); mConnectionType = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcRelContainedInSpatialStructure public partial class IfcRelContainedInSpatialStructure
@ -1127,7 +1100,7 @@ namespace GeometryGym.Ifc
{ {
return base.BuildStringSTEP(release) + "," + ParserSTEP.LinkToString(mRelatingElement) + "," + ParserSTEP.LinkToString(mRelatedElement) + "," + return base.BuildStringSTEP(release) + "," + ParserSTEP.LinkToString(mRelatingElement) + "," + ParserSTEP.LinkToString(mRelatedElement) + "," +
ParserSTEP.LinkToString(mInterferenceGeometry) + (release > ReleaseVersion.IFC4X3_RC3 ? "," + ParserSTEP.ObjToLinkString(mInterferenceSpace) :"") + ParserSTEP.LinkToString(mInterferenceGeometry) + (release > ReleaseVersion.IFC4X3_RC3 ? "," + ParserSTEP.ObjToLinkString(mInterferenceSpace) :"") +
(mInterferenceType == "$" ? ",$," : ",'" + mInterferenceType + "',") + ParserIfc.LogicalToString(mImpliedOrder); (string.IsNullOrEmpty( mInterferenceType) ? ",$," : ",'" + ParserIfc.Encode(mInterferenceType) + "',") + ParserIfc.LogicalToString(mImpliedOrder);
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary)
{ {
@ -1137,7 +1110,7 @@ namespace GeometryGym.Ifc
mInterferenceGeometry = ParserSTEP.StripLink(str, ref pos, len); mInterferenceGeometry = ParserSTEP.StripLink(str, ref pos, len);
if (release > ReleaseVersion.IFC4X3_RC3) if (release > ReleaseVersion.IFC4X3_RC3)
mInterferenceSpace = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcSpatialZone; mInterferenceSpace = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcSpatialZone;
mInterferenceType = ParserSTEP.StripString(str, ref pos, len); mInterferenceType = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mImpliedOrder = ParserIfc.StripLogical(str, ref pos, len); mImpliedOrder = ParserIfc.StripLogical(str, ref pos, len);
} }
} }
@ -1220,7 +1193,7 @@ namespace GeometryGym.Ifc
{ {
return base.BuildStringSTEP(release) + ",#" + mRelatingProcess.StepId + ",#" + mRelatedProcess.StepId + "," + return base.BuildStringSTEP(release) + ",#" + mRelatingProcess.StepId + ",#" + mRelatedProcess.StepId + "," +
(release < ReleaseVersion.IFC4 ? ParserSTEP.DoubleToString(mTimeLagSS) : ParserSTEP.ObjToLinkString(mTimeLag)) + ",." + (release < ReleaseVersion.IFC4 ? ParserSTEP.DoubleToString(mTimeLagSS) : ParserSTEP.ObjToLinkString(mTimeLag)) + ",." +
mSequenceType + (release < ReleaseVersion.IFC4 ? "." : (mUserDefinedSequenceType == "$" ? ".,$" : ".,'" + mUserDefinedSequenceType + "'")); mSequenceType + (release < ReleaseVersion.IFC4 ? "." : (string.IsNullOrEmpty(mUserDefinedSequenceType) ? ".,$" : ".,'" + ParserIfc.Encode(mUserDefinedSequenceType) + "'"));
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary)
{ {
@ -1234,8 +1207,8 @@ namespace GeometryGym.Ifc
string s = ParserSTEP.StripField(str, ref pos, len); string s = ParserSTEP.StripField(str, ref pos, len);
if (s != "$") if (s != "$")
Enum.TryParse<IfcSequenceEnum>(s.Replace(".", ""), true, out mSequenceType); Enum.TryParse<IfcSequenceEnum>(s.Replace(".", ""), true, out mSequenceType);
if (release != ReleaseVersion.IFC2x3) if (release > ReleaseVersion.IFC2x3)
mUserDefinedSequenceType = ParserSTEP.StripString(str, ref pos, len); mUserDefinedSequenceType = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcRelServicesBuildings public partial class IfcRelServicesBuildings
@ -1330,11 +1303,11 @@ namespace GeometryGym.Ifc
} }
public abstract partial class IfcRepresentationContext public abstract partial class IfcRepresentationContext
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return (mContextIdentifier == "$" ? "$," : "'" + mContextIdentifier + "',") + (mContextType == "$" ? "$" : "'" + mContextType + "'"); } protected override string BuildStringSTEP(ReleaseVersion release) { return (string.IsNullOrEmpty(mContextIdentifier) ? "$," : "'" + ParserIfc.Encode(mContextIdentifier) + "',") + (string.IsNullOrEmpty(mContextType) ? "$" : "'" + ParserIfc.Encode(mContextType) + "'"); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary)
{ {
mContextIdentifier = ParserSTEP.StripString(str, ref pos, len); mContextIdentifier = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mContextType = ParserSTEP.StripString(str, ref pos, len); mContextType = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcRepresentationMap public partial class IfcRepresentationMap
@ -1410,26 +1383,33 @@ namespace GeometryGym.Ifc
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
return base.BuildStringSTEP(release) + (mScheduleWork == "$" ? ",$," : ",'" + mScheduleWork + "',") + ParserSTEP.DoubleOptionalToString(mScheduleUsage) + "," + IfcDateTime.STEPAttribute(mScheduleStart) + "," + return base.BuildStringSTEP(release) + (mScheduleWork == "$" ? ",$," : ",'" + mScheduleWork + "',") + ParserSTEP.DoubleOptionalToString(mScheduleUsage) + "," + IfcDateTime.STEPAttribute(mScheduleStart) + "," +
IfcDateTime.STEPAttribute(mScheduleFinish) + (mScheduleContour == "$" ? ",$," : ",'" + mScheduleContour + "',") + (mLevelingDelay == "$" ? "$," : "'" + mLevelingDelay + "',") + ParserSTEP.BoolToString(mIsOverAllocated) + "," + IfcDateTime.STEPAttribute(mScheduleFinish) + (mScheduleContour == "$" ? ",$," : ",'" + mScheduleContour + "',") + (mLevelingDelay == null ? "$," : "'" + mLevelingDelay.ValueString + "',") + ParserSTEP.BoolToString(mIsOverAllocated) + "," +
IfcDateTime.STEPAttribute(mStatusTime) + "," + (mActualWork == "$" ? "$," : "'" + mActualWork + "',") + ParserSTEP.DoubleOptionalToString(mActualUsage) + "," + IfcDateTime.STEPAttribute(mActualStart) + "," + IfcDateTime.STEPAttribute(mStatusTime) + "," + (mActualWork == null ? "$," : "'" + mActualWork.ValueString + "',") + ParserSTEP.DoubleOptionalToString(mActualUsage) + "," + IfcDateTime.STEPAttribute(mActualStart) + "," +
IfcDateTime.STEPAttribute(mActualFinish) + (mRemainingWork == "$" ? ",$," : ",'" + mRemainingWork + "',") + ParserSTEP.DoubleOptionalToString(mRemainingUsage) + "," + ParserSTEP.DoubleOptionalToString(mCompletion); IfcDateTime.STEPAttribute(mActualFinish) + (mRemainingWork == null ? ",$," : ",'" + mRemainingWork.ValueString + "',") + ParserSTEP.DoubleOptionalToString(mRemainingUsage) + "," + ParserSTEP.DoubleOptionalToString(mCompletion);
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
mRemainingWork = ParserSTEP.StripString(str, ref pos, len);
mScheduleWork = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mScheduleUsage = ParserSTEP.StripDouble(str, ref pos, len); mScheduleUsage = ParserSTEP.StripDouble(str, ref pos, len);
mScheduleStart = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len)); mScheduleStart = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len));
mScheduleFinish = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len)); mScheduleFinish = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len));
mScheduleContour = ParserSTEP.StripString(str, ref pos, len); mScheduleContour = ParserSTEP.StripString(str, ref pos, len);
mLevelingDelay = ParserSTEP.StripString(str, ref pos, len); string s = ParserSTEP.StripString(str, ref pos, len);
if (s != "$")
mLevelingDelay = IfcDuration.Convert(s);
mIsOverAllocated = ParserSTEP.StripBool(str, ref pos, len); mIsOverAllocated = ParserSTEP.StripBool(str, ref pos, len);
mStatusTime = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len)); mStatusTime = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len));
mActualWork = ParserSTEP.StripString(str, ref pos, len); s = ParserSTEP.StripString(str, ref pos, len);
if (s != "$")
mActualWork = IfcDuration.Convert(s);
mActualUsage = ParserSTEP.StripDouble(str, ref pos, len); mActualUsage = ParserSTEP.StripDouble(str, ref pos, len);
mActualStart = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len)); mActualStart = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len));
mActualFinish = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len)); mActualFinish = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len));
mRemainingWork = ParserSTEP.StripString(str, ref pos, len); s = ParserSTEP.StripString(str, ref pos, len);
if (s != "$")
mRemainingWork = IfcDuration.Convert(s);
mRemainingUsage = ParserSTEP.StripDouble(str, ref pos, len); mRemainingUsage = ParserSTEP.StripDouble(str, ref pos, len);
mCompletion = ParserSTEP.StripDouble(str, ref pos, len); mCompletion = ParserSTEP.StripDouble(str, ref pos, len);
} }

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

@ -90,15 +90,17 @@ namespace GeometryGym.Ifc
{ {
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
return (mName == "$" ? "$," : "'" + mName + "',") + return (string.IsNullOrEmpty(mName) ? "$," : "'" + ParserIfc.Encode(mName) + "',") +
(mDataOrigin == IfcDataOriginEnum.NOTDEFINED ? "$" : "." + mDataOrigin.ToString() + ".") + (mUserDefinedDataOrigin == "$" ? ",$" : ",'" + mUserDefinedDataOrigin + "'"); } (mDataOrigin == IfcDataOriginEnum.NOTDEFINED ? "$" : "." + mDataOrigin.ToString() + ".") +
(string.IsNullOrEmpty(mUserDefinedDataOrigin) ? ",$" : ",'" + ParserIfc.Encode(mUserDefinedDataOrigin) + "'");
}
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
{ {
mName = ParserSTEP.StripString(str, ref pos, len); mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
string s = ParserSTEP.StripField(str, ref pos, len); string s = ParserSTEP.StripField(str, ref pos, len);
if (s.StartsWith(".")) if (s.StartsWith("."))
Enum.TryParse<IfcDataOriginEnum>(s.Replace(".", ""), true, out mDataOrigin); Enum.TryParse<IfcDataOriginEnum>(s.Replace(".", ""), true, out mDataOrigin);
mUserDefinedDataOrigin = ParserSTEP.StripString(str, ref pos, len); mUserDefinedDataOrigin = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcSecondOrderPolynomialSpiral public partial class IfcSecondOrderPolynomialSpiral
@ -338,7 +340,7 @@ namespace GeometryGym.Ifc
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
return "(#" + string.Join(",#", ShapeRepresentations.Select(x=>x.StepId)) + return "(#" + string.Join(",#", ShapeRepresentations.Select(x=>x.StepId)) +
(mName == "$" ? "),$," : "),'" + mName + "',") + (mDescription == "$" ? "$," : "'" + mDescription + "',") + (string.IsNullOrEmpty(mName) ? "),$," : "),'" + ParserIfc.Encode( mName) + "',") + (mDescription == "$" ? "$," : "'" + mDescription + "',") +
ParserIfc.LogicalToString(mProductDefinitional) + "," + ParserSTEP.ObjToLinkString(mPartOfProductDefinitionShape); ParserIfc.LogicalToString(mProductDefinitional) + "," + ParserSTEP.ObjToLinkString(mPartOfProductDefinitionShape);
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
@ -429,9 +431,10 @@ namespace GeometryGym.Ifc
if (mDatabase.Release < ReleaseVersion.IFC4) if (mDatabase.Release < ReleaseVersion.IFC4)
return ""; return "";
return base.BuildStringSTEP(release) + (mTemplateType == IfcSimplePropertyTemplateTypeEnum.NOTDEFINED ? ",$," : ",." + mTemplateType.ToString() + ".,") + return base.BuildStringSTEP(release) + (mTemplateType == IfcSimplePropertyTemplateTypeEnum.NOTDEFINED ? ",$," : ",." + mTemplateType.ToString() + ".,") +
(mPrimaryMeasureType == "$" ? "$," : "'" + mPrimaryMeasureType + "',") + (mSecondaryMeasureType == "$" ? "$," : "'" + mSecondaryMeasureType + "',") + (string.IsNullOrEmpty(mPrimaryMeasureType) ? "$," : "'" + ParserIfc.Encode(mPrimaryMeasureType) + "',") +
(string.IsNullOrEmpty(mSecondaryMeasureType) ? "$," : "'" + ParserIfc.Encode(mSecondaryMeasureType) + "',") +
ParserSTEP.LinkToString(mEnumerators) + "," + ParserSTEP.LinkToString(mPrimaryUnit) + "," + ParserSTEP.LinkToString(mSecondaryUnit) + "," + ParserSTEP.LinkToString(mEnumerators) + "," + ParserSTEP.LinkToString(mPrimaryUnit) + "," + ParserSTEP.LinkToString(mSecondaryUnit) + "," +
(mExpression == "$" ? "$," : "'" + mExpression + "',") + (mAccessState == IfcStateEnum.NOTDEFINED ? "$" : "." + mAccessState.ToString() + "."); (string.IsNullOrEmpty(mExpression) ? "$," : "'" + ParserIfc.Encode(mExpression) + "',") + (mAccessState == IfcStateEnum.NOTDEFINED ? "$" : "." + mAccessState.ToString() + ".");
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
{ {
@ -439,12 +442,12 @@ namespace GeometryGym.Ifc
string s = ParserSTEP.StripField(str, ref pos, len); string s = ParserSTEP.StripField(str, ref pos, len);
if (s.StartsWith(".")) if (s.StartsWith("."))
Enum.TryParse<IfcSimplePropertyTemplateTypeEnum>(s.Replace(".", ""), true, out mTemplateType); Enum.TryParse<IfcSimplePropertyTemplateTypeEnum>(s.Replace(".", ""), true, out mTemplateType);
mPrimaryMeasureType = ParserSTEP.StripString(str, ref pos, len); ; mPrimaryMeasureType = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mSecondaryMeasureType = ParserSTEP.StripString(str, ref pos, len); ; mSecondaryMeasureType = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mEnumerators = ParserSTEP.StripLink(str, ref pos, len); mEnumerators = ParserSTEP.StripLink(str, ref pos, len);
mPrimaryUnit = ParserSTEP.StripLink(str, ref pos, len); mPrimaryUnit = ParserSTEP.StripLink(str, ref pos, len);
mSecondaryUnit = ParserSTEP.StripLink(str, ref pos, len); mSecondaryUnit = ParserSTEP.StripLink(str, ref pos, len);
mExpression = ParserSTEP.StripString(str, ref pos, len); mExpression = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
s = ParserSTEP.StripField(str, ref pos, len); s = ParserSTEP.StripField(str, ref pos, len);
if (s.StartsWith(".")) if (s.StartsWith("."))
Enum.TryParse<IfcStateEnum>(s.Replace(".", ""), true, out mAccessState); Enum.TryParse<IfcStateEnum>(s.Replace(".", ""), true, out mAccessState);
@ -465,14 +468,19 @@ namespace GeometryGym.Ifc
} }
public partial class IfcSite public partial class IfcSite
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + (mRefLatitude != null ? "," + mRefLatitude.ToSTEP() + "," : ",$,") + (mRefLongitude != null ? mRefLongitude.ToSTEP() + "," : "$,") + ParserSTEP.DoubleOptionalToString(mRefElevation) +(mLandTitleNumber== "$" ? ",$," : ",'" + mLandTitleNumber + "',") + ParserSTEP.LinkToString(mSiteAddress); } protected override string BuildStringSTEP(ReleaseVersion release)
{
return base.BuildStringSTEP(release) + (mRefLatitude != null ? "," + mRefLatitude.ToSTEP() + "," : ",$,") +
(mRefLongitude != null ? mRefLongitude.ToSTEP() + "," : "$,") + ParserSTEP.DoubleOptionalToString(mRefElevation) +
(string.IsNullOrEmpty(mLandTitleNumber) ? ",$," : ",'" + ParserIfc.Encode(mLandTitleNumber) + "',") + ParserSTEP.LinkToString(mSiteAddress);
}
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
mRefLatitude = IfcCompoundPlaneAngleMeasure.Parse(ParserSTEP.StripField(str, ref pos, len)); mRefLatitude = IfcCompoundPlaneAngleMeasure.Parse(ParserSTEP.StripField(str, ref pos, len));
mRefLongitude = IfcCompoundPlaneAngleMeasure.Parse(ParserSTEP.StripField(str, ref pos, len)); mRefLongitude = IfcCompoundPlaneAngleMeasure.Parse(ParserSTEP.StripField(str, ref pos, len));
mRefElevation = ParserSTEP.StripDouble(str, ref pos, len); mRefElevation = ParserSTEP.StripDouble(str, ref pos, len);
mLandTitleNumber = ParserSTEP.StripString(str, ref pos, len); mLandTitleNumber = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mSiteAddress = ParserSTEP.StripLink(str, ref pos, len); mSiteAddress = ParserSTEP.StripLink(str, ref pos, len);
} }
} }
@ -664,11 +672,11 @@ namespace GeometryGym.Ifc
} }
public abstract partial class IfcSpatialElementType public abstract partial class IfcSpatialElementType
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + (mElementType == "$" ? ",$" : ",'" + mElementType + "'"); } protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + (string.IsNullOrEmpty(mElementType) ? ",$" : ",'" + ParserIfc.Encode(mElementType) + "'"); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
mElementType = ParserSTEP.StripString(str, ref pos, len); mElementType = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public abstract partial class IfcSpatialStructureElement public abstract partial class IfcSpatialStructureElement
@ -862,8 +870,8 @@ namespace GeometryGym.Ifc
} }
public abstract partial class IfcStructuralConnectionCondition public abstract partial class IfcStructuralConnectionCondition
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return (mName == "$" ? "$" : "'" + mName + "'"); } protected override string BuildStringSTEP(ReleaseVersion release) { return (string.IsNullOrEmpty(mName) ? "$" : "'" + ParserIfc.Encode(mName) + "'"); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) { mName = ParserSTEP.StripString(str, ref pos, len); } internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) { mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len)); }
} }
public partial class IfcStructuralCurveAction : IfcStructuralAction // IFC4 SUPERTYPE OF(IfcStructuralLinearAction) public partial class IfcStructuralCurveAction : IfcStructuralAction // IFC4 SUPERTYPE OF(IfcStructuralLinearAction)
{ {
@ -921,8 +929,8 @@ namespace GeometryGym.Ifc
} }
public abstract partial class IfcStructuralLoad public abstract partial class IfcStructuralLoad
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return (mName == "$" ? "$" : "'" + mName + "'"); } protected override string BuildStringSTEP(ReleaseVersion release) { return (string.IsNullOrEmpty(mName) ? "$" : "'" + ParserIfc.Encode(mName) + "'"); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) { mName = ParserSTEP.StripString(str, ref pos, len); } internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) { mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len)); }
} }
public partial class IfcStructuralLoadConfiguration : IfcStructuralLoad //IFC4 public partial class IfcStructuralLoadConfiguration : IfcStructuralLoad //IFC4
{ {
@ -976,11 +984,20 @@ namespace GeometryGym.Ifc
} }
public partial class IfcStructuralLoadGroup public partial class IfcStructuralLoadGroup
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + ",." + mPredefinedType.ToString() + ".,." + mActionType.ToString() + ".,." + mActionSource.ToString() + ".," + ParserSTEP.DoubleOptionalToString(mCoefficient) + (mPurpose == "$" ? ",$" : ",'" + mPurpose + "'"); } protected override string BuildStringSTEP(ReleaseVersion release)
{
return base.BuildStringSTEP(release) + ",." + mPredefinedType.ToString() + ".,." + mActionType.ToString() + ".,." +
mActionSource.ToString() + ".," + ParserSTEP.DoubleOptionalToString(mCoefficient) +
(string.IsNullOrEmpty(mPurpose) ? ",$" : ",'" + ParserIfc.Encode(mPurpose) + "'");
}
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
Enum.TryParse<IfcLoadGroupTypeEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mPredefinedType); Enum.TryParse<IfcLoadGroupTypeEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mPredefinedType);
Enum.TryParse<IfcActionTypeEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mActionType);
Enum.TryParse<IfcActionSourceTypeEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mActionSource);
mCoefficient = ParserSTEP.StripDouble(str, ref pos, len);
mPurpose = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcStructuralLoadLinearForce public partial class IfcStructuralLoadLinearForce
@ -1187,14 +1204,14 @@ namespace GeometryGym.Ifc
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
return ParserSTEP.ObjToLinkString(mItem) + ",(" + return ParserSTEP.ObjToLinkString(mItem) + ",(" +
string.Join(",", mStyles.Select(x => "#" + x.StepId)) + (mName == "$" ? "),$" : "),'" + mName + "'"); string.Join(",", mStyles.Select(x => "#" + x.StepId)) + (string.IsNullOrEmpty(mName) ? "),$" : "),'" + ParserIfc.Encode(mName) + "'");
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
{ {
Item = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcRepresentationItem; Item = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcRepresentationItem;
foreach (IfcStyleAssignmentSelect style in ParserSTEP.StripListLink(str, ref pos, len).ConvertAll(x => dictionary[x] as IfcStyleAssignmentSelect)) foreach (IfcStyleAssignmentSelect style in ParserSTEP.StripListLink(str, ref pos, len).ConvertAll(x => dictionary[x] as IfcStyleAssignmentSelect))
addStyle(style); addStyle(style);
mName = ParserSTEP.StripString(str, ref pos, len); mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcSubContractResource public partial class IfcSubContractResource
@ -1405,20 +1422,12 @@ namespace GeometryGym.Ifc
IfcSurfaceTextureEnum texture = IfcSurfaceTextureEnum.NOTDEFINED; IfcSurfaceTextureEnum texture = IfcSurfaceTextureEnum.NOTDEFINED;
if (!Enum.TryParse<IfcSurfaceTextureEnum>(mMode,true, out texture)) if (!Enum.TryParse<IfcSurfaceTextureEnum>(mMode,true, out texture))
texture = IfcSurfaceTextureEnum.NOTDEFINED; texture = IfcSurfaceTextureEnum.NOTDEFINED;
result += ",." + texture.ToString() + ".,"+ ParserSTEP.LinkToString(mTextureTransform); result += ",." + texture.ToString() + (mTextureTransform == null ? ".,$" : ".,#" + mTextureTransform.StepId);
} }
else else
{ {
result += (mMode == "$" ? ",$," : ",'" + mMode + "',") + ParserSTEP.LinkToString(mTextureTransform); result += (string.IsNullOrEmpty(mMode) ? ",$," : ",'" + ParserIfc.Encode(mMode) + "',") + (mTextureTransform == null ? "$" : "#" + mTextureTransform.StepId);
if (mParameter.Count == 0) result += (mParameter.Count == 0 ? ",$" : ",(" + string.Join(",", mParameter.Select(x => "'" + ParserIfc.Encode(x) + "'")) + ")");
result += ",$";
else
{
result += ",('" + mParameter[0];
for (int icounter = 1; icounter < mParameter.Count; icounter++)
result += "','" + mParameter[icounter];
result += "')";
}
} }
return result; return result;
} }
@ -1427,11 +1436,11 @@ namespace GeometryGym.Ifc
mRepeatS = ParserSTEP.StripBool(str, ref pos, len); mRepeatS = ParserSTEP.StripBool(str, ref pos, len);
mRepeatT = ParserSTEP.StripBool(str, ref pos, len); mRepeatT = ParserSTEP.StripBool(str, ref pos, len);
string s = ParserSTEP.StripField(str, ref pos, len); string s = ParserSTEP.StripField(str, ref pos, len);
mMode = (release < ReleaseVersion.IFC4 ? s.Replace(".", "") : s.Replace("'", "")); mMode = (release < ReleaseVersion.IFC4 ? s.Replace(".", "") : ParserIfc.Decode(s.Replace("'", "")));
mTextureTransform = ParserSTEP.StripLink(str, ref pos, len); TextureTransform = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcCartesianTransformationOperator2D;
s = ParserSTEP.StripField(str, ref pos, len); s = ParserSTEP.StripField(str, ref pos, len);
if (s != "$") if (s != "$")
mParameter = ParserSTEP.SplitListStrings(s.Substring(1, s.Length - 2)); mParameter.AddRange(ParserSTEP.SplitListStrings(s.Substring(1, s.Length - 2)).Select(x=>ParserIfc.Decode(x)));
} }
} }
public abstract partial class IfcSweptAreaSolid public abstract partial class IfcSweptAreaSolid

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

@ -33,26 +33,32 @@ namespace GeometryGym.Ifc
{ {
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
string s = (mName == "$" ? "$," : "'" + mName + "',") + (mRows.Count == 0 ? "$" : "(" + string.Join(",", mRows.Select(x => "#" + x.StepId)) + ")"); string s = (string.IsNullOrEmpty(mName) ? "$," : "'" + ParserIfc.Encode(mName) + "',") + (mRows.Count == 0 ? "$" : "(" + string.Join(",", mRows.Select(x => "#" + x.StepId)) + ")");
if (release != ReleaseVersion.IFC2x3) if (release != ReleaseVersion.IFC2x3)
s += (mColumns.Count == 0 ? ",$" : "(" + string.Join(",", mColumns.Select(x=>"#" + x.StepId)) + ")"); s += (mColumns.Count == 0 ? ",$" : "(" + string.Join(",", mColumns.Select(x=>"#" + x.StepId)) + ")");
return s; return s;
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary)
{ {
mName = ParserSTEP.StripString(str, ref pos, len); mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mRows.AddRange(ParserSTEP.StripListLink(str, ref pos, len).Select(x=>dictionary[x] as IfcTableRow)); mRows.AddRange(ParserSTEP.StripListLink(str, ref pos, len).Select(x=>dictionary[x] as IfcTableRow));
mColumns.AddRange(ParserSTEP.StripListLink(str, ref pos, len).Select(x=>dictionary[x] as IfcTableColumn)); mColumns.AddRange(ParserSTEP.StripListLink(str, ref pos, len).Select(x=>dictionary[x] as IfcTableColumn));
} }
} }
public partial class IfcTableColumn public partial class IfcTableColumn
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return (release < ReleaseVersion.IFC4 ? "" : (mIdentifier == "$" ? "$," : "'" + mIdentifier + "',") + (mName == "$" ? "$," : "'" + mName + "',") + (mDescription == "$" ? "$," : "'" + mDescription + "',") + ParserSTEP.LinkToString(mUnit) + "," + ParserSTEP.LinkToString(mReferencePath)); } protected override string BuildStringSTEP(ReleaseVersion release)
{
return (release < ReleaseVersion.IFC4 ? "" : (string.IsNullOrEmpty(mIdentifier) ? "$," : "'" + ParserIfc.Encode(mIdentifier) + "',") +
(string.IsNullOrEmpty(mName) ? "$," : "'" + ParserIfc.Encode(mName) + "',") +
(string.IsNullOrEmpty(mDescription) ? "$," : "'" + ParserIfc.Encode(mDescription) + "',") +
ParserSTEP.LinkToString(mUnit) + "," + ParserSTEP.LinkToString(mReferencePath));
}
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary)
{ {
mIdentifier = ParserSTEP.StripString(str, ref pos, len); mIdentifier = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mName = ParserSTEP.StripString(str, ref pos, len); mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mDescription = ParserSTEP.StripString(str, ref pos, len); mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mUnit = ParserSTEP.StripLink(str, ref pos, len); mUnit = ParserSTEP.StripLink(str, ref pos, len);
mReferencePath = ParserSTEP.StripLink(str, ref pos, len); mReferencePath = ParserSTEP.StripLink(str, ref pos, len);
} }
@ -143,11 +149,11 @@ namespace GeometryGym.Ifc
{ {
if (release <= ReleaseVersion.IFC2x3) if (release <= ReleaseVersion.IFC2x3)
return ""; return "";
return base.BuildStringSTEP(release) + (mDurationType == IfcTaskDurationEnum.NOTDEFINED ? ",$," : ",." + mDurationType + ".,") + (mScheduleDuration == "$" ? "$," : "'" + mScheduleDuration + "',") + IfcDateTime.STEPAttribute(mScheduleStart) + "," + return base.BuildStringSTEP(release) + (mDurationType == IfcTaskDurationEnum.NOTDEFINED ? ",$," : ",." + mDurationType + ".,") + (mScheduleDuration == null ? "$," : "'" + mScheduleDuration.ValueString + "',") + IfcDateTime.STEPAttribute(mScheduleStart) + "," +
IfcDateTime.STEPAttribute(mScheduleFinish) + "," + IfcDateTime.STEPAttribute(mEarlyStart) + "," + IfcDateTime.STEPAttribute(mEarlyFinish) + "," + IfcDateTime.STEPAttribute(mLateStart) + "," + IfcDateTime.STEPAttribute(mScheduleFinish) + "," + IfcDateTime.STEPAttribute(mEarlyStart) + "," + IfcDateTime.STEPAttribute(mEarlyFinish) + "," + IfcDateTime.STEPAttribute(mLateStart) + "," +
IfcDateTime.STEPAttribute(mLateFinish) + (mFreeFloat == "$" ? ",$," : ",'" + mFreeFloat + "',") + (mTotalFloat == "$" ? "$," : "'" + mTotalFloat + "',") + ParserSTEP.BoolToString(mIsCritical) + "," + IfcDateTime.STEPAttribute(mLateFinish) + (mFreeFloat == null ? ",$," : ",'" + mFreeFloat.ValueString + "',") + (mTotalFloat == null ? "$," : "'" + mTotalFloat.ValueString + "',") + ParserSTEP.BoolToString(mIsCritical) + "," +
IfcDateTime.STEPAttribute(mStatusTime) + "," + (mActualDuration == "$" ? "$," : "'" + mActualDuration + "',") + IfcDateTime.STEPAttribute(mActualStart) + "," + IfcDateTime.STEPAttribute(mActualFinish) + "," + IfcDateTime.STEPAttribute(mStatusTime) + "," + (mActualDuration == null ? "$," : "'" + mActualDuration.ValueString + "',") + IfcDateTime.STEPAttribute(mActualStart) + "," + IfcDateTime.STEPAttribute(mActualFinish) + "," +
(mRemainingTime == "$" ? "$," : "'" + mRemainingTime + "',") + ParserSTEP.DoubleOptionalToString(mCompletion); (mRemainingTime == null ? "$," : "'" + mRemainingTime.ValueString + "',") + ParserSTEP.DoubleOptionalToString(mCompletion);
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary)
{ {
@ -155,21 +161,31 @@ namespace GeometryGym.Ifc
string s = ParserSTEP.StripField(str, ref pos, len); string s = ParserSTEP.StripField(str, ref pos, len);
if (s.StartsWith(".")) if (s.StartsWith("."))
Enum.TryParse<IfcTaskDurationEnum>(s.Replace(".", ""), true, out mDurationType); Enum.TryParse<IfcTaskDurationEnum>(s.Replace(".", ""), true, out mDurationType);
mScheduleDuration = ParserSTEP.StripString(str, ref pos, len); s = ParserSTEP.StripString(str, ref pos, len);
if(s != "$")
mScheduleDuration = IfcDuration.Convert(s);
mScheduleStart = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len)); mScheduleStart = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len));
mScheduleFinish = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len)); mScheduleFinish = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len));
mEarlyStart = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len)); mEarlyStart = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len));
mEarlyFinish = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len)); mEarlyFinish = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len));
mLateStart = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len)); mLateStart = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len));
mLateFinish = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len)); mLateFinish = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len));
mFreeFloat = ParserSTEP.StripString(str, ref pos, len); s = ParserSTEP.StripString(str, ref pos, len);
mTotalFloat = ParserSTEP.StripString(str, ref pos, len); if (s != "$")
mFreeFloat = IfcDuration.Convert(s);
s = ParserSTEP.StripString(str, ref pos, len);
if (s != "$")
mTotalFloat = IfcDuration.Convert(s);
mIsCritical = ParserSTEP.StripBool(str, ref pos, len); mIsCritical = ParserSTEP.StripBool(str, ref pos, len);
mStatusTime = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len)); mStatusTime = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len));
mActualDuration = ParserSTEP.StripString(str, ref pos, len); s = ParserSTEP.StripString(str, ref pos, len);
if (s != "$")
mActualDuration = IfcDuration.Convert(s);
mActualStart = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len)); mActualStart = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len));
mActualFinish = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len)); mActualFinish = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len));
mRemainingTime = ParserSTEP.StripString(str, ref pos, len); s = ParserSTEP.StripString(str, ref pos, len);
if (s != "$")
mRemainingTime = IfcDuration.Convert(s);
mCompletion = ParserSTEP.StripDouble(str, ref pos, len); mCompletion = ParserSTEP.StripDouble(str, ref pos, len);
} }
} }
@ -188,12 +204,12 @@ namespace GeometryGym.Ifc
} }
public partial class IfcTaskType public partial class IfcTaskType
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return (release < ReleaseVersion.IFC4 ? "" : base.BuildStringSTEP(release) + ",." + mPredefinedType.ToString() + (mWorkMethod == "$" ? ".,$" : (".,'" + mWorkMethod + "'"))); } protected override string BuildStringSTEP(ReleaseVersion release) { return (release < ReleaseVersion.IFC4 ? "" : base.BuildStringSTEP(release) + ",." + mPredefinedType.ToString() + (string.IsNullOrEmpty(mWorkMethod) ? ".,$" : (".,'" + ParserIfc.Encode(mWorkMethod) + "'"))); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
Enum.TryParse<IfcTaskTypeEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mPredefinedType); Enum.TryParse<IfcTaskTypeEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mPredefinedType);
mWorkMethod = ParserSTEP.StripString(str, ref pos, len); mWorkMethod = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcTelecomAddress public partial class IfcTelecomAddress
@ -414,17 +430,10 @@ namespace GeometryGym.Ifc
{ {
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
string str = base.BuildStringSTEP(release); return base.BuildStringSTEP(release) + (mFontFamily.Count == 0 ? ",$," : ",(" + string.Join(",", mFontFamily.Select(x=>ParserIfc.Encode(x)) + "),")) +
if (mFontFamily.Count > 0) (string.IsNullOrEmpty(mFontStyle) ? "$," : "'" + ParserIfc.Encode(mFontStyle) + "',") +
{ (string.IsNullOrEmpty(mFontVariant) ? "$," : "'" + ParserIfc.Encode(mFontVariant) + "',") +
str += ",(" + mFontFamily[0]; (string.IsNullOrEmpty(mFontWeight) ? "$," : "'" + ParserIfc.Encode(mFontWeight) + "',") + mFontSize;
for (int icounter = 1; icounter < mFontFamily.Count; icounter++)
str += "," + mFontFamily[icounter];
str += "),";
}
else
str += ",$,";
return str + (mFontStyle == "$" ? "$," : "'" + mFontStyle + "',") + (mFontVariant == "$" ? "$," : "'" + mFontVariant + "',") + (mFontWeight == "$" ? "$," : "'" + mFontWeight + "',") + mFontSize;
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary)
{ {
@ -436,9 +445,9 @@ namespace GeometryGym.Ifc
for (int icounter = 0; icounter < lst.Count; icounter++) for (int icounter = 0; icounter < lst.Count; icounter++)
mFontFamily.Add(lst[icounter]); mFontFamily.Add(lst[icounter]);
} }
mFontStyle = ParserSTEP.StripString(str, ref pos, len); mFontStyle = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mFontVariant = ParserSTEP.StripString(str, ref pos, len); mFontVariant = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mFontWeight = ParserSTEP.StripString(str, ref pos, len); mFontWeight = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mFontSize = ParserSTEP.StripField(str, ref pos, len); mFontSize = ParserSTEP.StripField(str, ref pos, len);
} }
} }
@ -598,18 +607,24 @@ namespace GeometryGym.Ifc
} }
public abstract partial class IfcTimeSeries public abstract partial class IfcTimeSeries
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return "'" + mName + "','" + mDescription + "'," + ParserSTEP.LinkToString(mStartTime) + "," + ParserSTEP.LinkToString(mEndTime) + ",." + mTimeSeriesDataType.ToString() + ".,." + mDataOrigin.ToString() + (mUserDefinedDataOrigin == "$" ? ".,$," : ".,'" + mUserDefinedDataOrigin + "',") + ParserSTEP.LinkToString(mUnit); } protected override string BuildStringSTEP(ReleaseVersion release)
{
return "'" + ParserIfc.Encode(mName) + (string.IsNullOrEmpty(mDescription) ? "',$," : "','" + ParserIfc.Encode(mDescription) + "',") +
ParserSTEP.LinkToString(mStartTime) + "," + ParserSTEP.LinkToString(mEndTime) + ",." + mTimeSeriesDataType.ToString() + ".,." +
mDataOrigin.ToString() + (string.IsNullOrEmpty(mUserDefinedDataOrigin) ? ".,$," : ".,'" + ParserIfc.Encode(mUserDefinedDataOrigin) + "',") +
ParserSTEP.LinkToString(mUnit);
}
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary) internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary)
{ {
mName = ParserSTEP.StripString(str, ref pos, len); mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mDescription = ParserSTEP.StripString(str, ref pos, len); mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mStartTime = ParserSTEP.StripLink(str, ref pos, len); mStartTime = ParserSTEP.StripLink(str, ref pos, len);
mEndTime = ParserSTEP.StripLink(str, ref pos, len); mEndTime = ParserSTEP.StripLink(str, ref pos, len);
Enum.TryParse<IfcTimeSeriesDataTypeEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mTimeSeriesDataType); Enum.TryParse<IfcTimeSeriesDataTypeEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mTimeSeriesDataType);
string s = ParserSTEP.StripField(str, ref pos, len); string s = ParserSTEP.StripField(str, ref pos, len);
if (s.StartsWith(".")) if (s.StartsWith("."))
Enum.TryParse<IfcDataOriginEnum>(s.Replace(".", ""), true, out mDataOrigin); Enum.TryParse<IfcDataOriginEnum>(s.Replace(".", ""), true, out mDataOrigin);
mUserDefinedDataOrigin = ParserSTEP.StripString(str, ref pos, len); mUserDefinedDataOrigin = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mUnit = ParserSTEP.StripLink(str, ref pos, len); mUnit = ParserSTEP.StripLink(str, ref pos, len);
} }
} }
@ -794,7 +809,7 @@ namespace GeometryGym.Ifc
{ {
base.WriteStepLineWorker(textWriter, release); base.WriteStepLineWorker(textWriter, release);
if (mNormals.Count == 0) if (mNormals.Count == 0)
textWriter.Write(",$,"); textWriter.Write(",$");
else else
textWriter.Write(",(" + string.Join(",", mNormals.Select(x => "(" + ParserSTEP.DoubleToString(x.Item1) + "," + ParserSTEP.DoubleToString(x.Item2) + "," + ParserSTEP.DoubleToString(x.Item3) + ")")) + ")"); textWriter.Write(",(" + string.Join(",", mNormals.Select(x => "(" + ParserSTEP.DoubleToString(x.Item1) + "," + ParserSTEP.DoubleToString(x.Item2) + "," + ParserSTEP.DoubleToString(x.Item3) + ")")) + ")");
if (release < ReleaseVersion.IFC4X3) if (release < ReleaseVersion.IFC4X3)
@ -835,7 +850,7 @@ namespace GeometryGym.Ifc
{ {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
if (mNormals.Count == 0) if (mNormals.Count == 0)
sb.Append(",$,"); sb.Append(",$");
else else
sb.Append(",(" + string.Join(",", mNormals.Select(x => "(" + ParserSTEP.DoubleToString(x.Item1) + "," + ParserSTEP.DoubleToString(x.Item2) + "," + ParserSTEP.DoubleToString(x.Item3) + ")")) + ")"); sb.Append(",(" + string.Join(",", mNormals.Select(x => "(" + ParserSTEP.DoubleToString(x.Item1) + "," + ParserSTEP.DoubleToString(x.Item2) + "," + ParserSTEP.DoubleToString(x.Item3) + ")")) + ")");
if(release < ReleaseVersion.IFC4X3) if(release < ReleaseVersion.IFC4X3)
@ -1080,13 +1095,17 @@ namespace GeometryGym.Ifc
} }
public abstract partial class IfcTypeProcess public abstract partial class IfcTypeProcess
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + (mIdentification == "$" ? ",$," : ",'" + mIdentification + "',") + (mLongDescription == "$" ? "$," : "'" + mLongDescription + "',") + (mProcessType == "$" ? "$" : "'" + mProcessType + "'"); } protected override string BuildStringSTEP(ReleaseVersion release)
{
return base.BuildStringSTEP(release) + (string.IsNullOrEmpty(mIdentification) ? ",$," : ",'" + ParserIfc.Encode(mIdentification) + "',") +
(string.IsNullOrEmpty(mLongDescription) ? "$," : "'" + ParserIfc.Encode(mLongDescription) + "',") +
(string.IsNullOrEmpty(mProcessType) ? "$" : "'" + ParserIfc.Encode(mProcessType) + "'"); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
mIdentification = ParserSTEP.StripString(str, ref pos, len); mIdentification = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mLongDescription = ParserSTEP.StripString(str, ref pos, len); mLongDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mProcessType = ParserSTEP.StripString(str, ref pos, len); mProcessType = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcTypeProduct public partial class IfcTypeProduct
@ -1094,24 +1113,28 @@ namespace GeometryGym.Ifc
protected override string BuildStringSTEP(ReleaseVersion release) protected override string BuildStringSTEP(ReleaseVersion release)
{ {
return base.BuildStringSTEP(release) + (mRepresentationMaps.Count == 0 ? ",$," : ",(#" + string.Join(",#", mRepresentationMaps.ConvertAll(x=>x.mIndex)) + "),") + return base.BuildStringSTEP(release) + (mRepresentationMaps.Count == 0 ? ",$," : ",(#" + string.Join(",#", mRepresentationMaps.ConvertAll(x=>x.mIndex)) + "),") +
(mTag == "$" ? "$" : "'" + mTag + "'"); (string.IsNullOrEmpty(mTag) ? "$" : "'" + ParserIfc.Encode(mTag) + "'");
} }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
RepresentationMaps.AddRange(ParserSTEP.StripListLink(str, ref pos, len).ConvertAll(x=>dictionary[x] as IfcRepresentationMap)); RepresentationMaps.AddRange(ParserSTEP.StripListLink(str, ref pos, len).ConvertAll(x=>dictionary[x] as IfcRepresentationMap));
mTag = ParserSTEP.StripString(str, ref pos, len); mTag = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public abstract partial class IfcTypeResource public abstract partial class IfcTypeResource
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + (mIdentification == "$" ? ",$," : ",'" + mIdentification + "',") + (mLongDescription == "$" ? "$," : "'" + mLongDescription + "',") + (mResourceType == "$" ? "$" : "'" + mResourceType + "'"); } protected override string BuildStringSTEP(ReleaseVersion release)
{
return base.BuildStringSTEP(release) + (string.IsNullOrEmpty(mIdentification) ? ",$," : ",'" + ParserIfc.Encode(mIdentification) + "',") +
(string.IsNullOrEmpty(mLongDescription) ? "$," : "'" + ParserIfc.Encode(mLongDescription) + "',") +
(string.IsNullOrEmpty(mResourceType) ? "$" : "'" + ParserIfc.Encode(mResourceType) + "'"); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
mIdentification = ParserSTEP.StripString(str, ref pos, len); mIdentification = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mLongDescription = ParserSTEP.StripString(str, ref pos, len); mLongDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
mResourceType = ParserSTEP.StripString(str, ref pos, len); mResourceType = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
} }

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

@ -98,7 +98,13 @@ namespace GeometryGym.Ifc
} }
public partial class IfcWindow public partial class IfcWindow
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + "," + ParserSTEP.DoubleOptionalToString(mOverallHeight) + "," + ParserSTEP.DoubleOptionalToString(mOverallWidth) + (release < ReleaseVersion.IFC4 ? "" : ",." + mPredefinedType + ".,." + mPartitioningType + (mUserDefinedPartitioningType == "$" ? ".,$" : ".,'" + mUserDefinedPartitioningType + "'")); } protected override string BuildStringSTEP(ReleaseVersion release)
{
return base.BuildStringSTEP(release) + "," + ParserSTEP.DoubleOptionalToString(mOverallHeight) + "," +
ParserSTEP.DoubleOptionalToString(mOverallWidth) +
(release < ReleaseVersion.IFC4 ? "" : ",." + mPredefinedType + ".,." + mPartitioningType +
(string.IsNullOrEmpty(mUserDefinedPartitioningType) ? ".,$" : ".,'" + ParserIfc.Encode(mUserDefinedPartitioningType) + "'"));
}
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
@ -112,7 +118,7 @@ namespace GeometryGym.Ifc
s = ParserSTEP.StripField(str, ref pos, len); s = ParserSTEP.StripField(str, ref pos, len);
if (s.StartsWith(".")) if (s.StartsWith("."))
Enum.TryParse<IfcWindowTypePartitioningEnum>(s.Replace(".", ""), true, out mPartitioningType); Enum.TryParse<IfcWindowTypePartitioningEnum>(s.Replace(".", ""), true, out mPartitioningType);
mUserDefinedPartitioningType = ParserSTEP.StripString(str, ref pos, len); mUserDefinedPartitioningType = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
} }

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

@ -31,12 +31,12 @@ namespace GeometryGym.Ifc
{ {
public partial class IfcZone public partial class IfcZone
{ {
protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + (release < ReleaseVersion.IFC4 ? "" : (mLongName == "$" ? ",$" : ",'" + mLongName + "'")); } protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + (release < ReleaseVersion.IFC4 ? "" : (string.IsNullOrEmpty(mLongName) ? ",$" : ",'" + ParserIfc.Encode(mLongName) + "'")); }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary) 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); base.parse(str, ref pos, release, len, dictionary);
if (release != ReleaseVersion.IFC2x3) if (release > ReleaseVersion.IFC2x3)
mLongName = ParserSTEP.StripString(str, ref pos, len); mLongName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
} }
} }
public partial class IfcZShapeProfileDef public partial class IfcZShapeProfileDef

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

@ -733,7 +733,7 @@ namespace GeometryGym.Ifc
{ {
IfcAppliedValue v = mDatabase.ParseXml<IfcAppliedValue>(node as XmlElement); IfcAppliedValue v = mDatabase.ParseXml<IfcAppliedValue>(node as XmlElement);
if (v != null) if (v != null)
addComponent(v); Components.Add(v);
} }
} }
else if (string.Compare(name, "HasExternalReference") == 0) else if (string.Compare(name, "HasExternalReference") == 0)

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

@ -843,8 +843,8 @@ namespace GeometryGym.Ifc
setAttribute(xml, "Description", Description); setAttribute(xml, "Description", Description);
xml.SetAttribute("ConstraintGrade", mConstraintGrade.ToString().ToLower()); xml.SetAttribute("ConstraintGrade", mConstraintGrade.ToString().ToLower());
setAttribute(xml, "ConstraintSource", ConstraintSource); setAttribute(xml, "ConstraintSource", ConstraintSource);
if (mCreatingActor > 0) if (mCreatingActor != null)
xml.AppendChild(mDatabase[mCreatingActor].GetXML(xml.OwnerDocument, "CreatingActor", host, processed)); xml.AppendChild((mCreatingActor as BaseClassIfc).GetXML(xml.OwnerDocument, "CreatingActor", host, processed));
setAttribute(xml, "UserDefinedGrade", UserDefinedGrade); setAttribute(xml, "UserDefinedGrade", UserDefinedGrade);
if (mHasExternalReference.Count > 0) if (mHasExternalReference.Count > 0)

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

@ -343,7 +343,7 @@ namespace GeometryGym.Ifc
{ {
base.SetXML(xml, host, processed); base.SetXML(xml, host, processed);
setAttribute(xml, "Description", Description); setAttribute(xml, "Description", Description);
if (mReferencedDocument > 0) if (mReferencedDocument != null)
xml.AppendChild(ReferencedDocument.GetXML(xml.OwnerDocument, "ReferencedDocument", this, processed)); xml.AppendChild(ReferencedDocument.GetXML(xml.OwnerDocument, "ReferencedDocument", this, processed));
} }
} }

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

@ -44,7 +44,7 @@ namespace GeometryGym.STEP
public int Index { get { return mIndex; } private set { mIndex = value; } } public int Index { get { return mIndex; } private set { mIndex = value; } }
public int StepId { get { return mIndex; } private set { mIndex = value; } } public int StepId { get { return mIndex; } private set { mIndex = value; } }
protected static ConcurrentDictionary<string, Type> mTypes = new ConcurrentDictionary<string, Type>(); protected static ConcurrentDictionary<string, Type> mSTEPTypes = new ConcurrentDictionary<string, Type>();
protected static ConcurrentDictionary<string, ConstructorInfo> mConstructors = new ConcurrentDictionary<string, ConstructorInfo>(); protected static ConcurrentDictionary<string, ConstructorInfo> mConstructors = new ConcurrentDictionary<string, ConstructorInfo>();
internal STEPEntity() { initialize(); } internal STEPEntity() { initialize(); }
@ -106,11 +106,11 @@ namespace GeometryGym.STEP
string[] fields = classNameIfc.Split(".".ToCharArray()); string[] fields = classNameIfc.Split(".".ToCharArray());
if (fields != null && fields.Length > 0) if (fields != null && fields.Length > 0)
name = fields[0]; name = fields[0];
if (!mTypes.TryGetValue(name, out type)) if (!mSTEPTypes.TryGetValue(name, out type))
{ {
type = Type.GetType("GeometryGym." + nameSpace + "." + name, false, true); type = Type.GetType("GeometryGym." + nameSpace + "." + name, false, true);
if (type != null) if (type != null)
mTypes[name] = type; mSTEPTypes[name] = type;
} }
return type; return type;
} }