v0.2.03
This commit is contained in:
Родитель
6f3b1de0ff
Коммит
3ee20b85de
|
@ -259,7 +259,7 @@ namespace GeometryGym.Ifc
|
|||
if (string.IsNullOrEmpty(str))
|
||||
return null;
|
||||
|
||||
DatabaseIfc db = new DatabaseIfc(false, ReleaseVersion.IFC4);
|
||||
DatabaseIfc db = new DatabaseIfc(ModelView.Ifc4NotAssigned);
|
||||
#if (!NOIFCJSON)
|
||||
if (str.StartsWith("{"))
|
||||
{
|
||||
|
@ -529,14 +529,12 @@ namespace GeometryGym.Ifc
|
|||
else if (release < ReleaseVersion.IFC4X2)
|
||||
{
|
||||
if(typeof(IfcFacility).IsAssignableFrom(type) && !typeof(IfcBuilding).IsAssignableFrom(type))
|
||||
type = typeof(IfcSite);
|
||||
else if (typeof(IfcFacilityPart).IsAssignableFrom(type))
|
||||
type = host is IfcBuilding ? typeof(IfcSpace) : typeof(IfcSite);
|
||||
else if (release < ReleaseVersion.IFC4X1)
|
||||
{
|
||||
if (type != typeof(IfcBuilding) && typeof(IfcFacility).IsAssignableFrom(type))
|
||||
if (release < ReleaseVersion.IFC4X1)
|
||||
type = host is IfcBuilding ? typeof(IfcBuilding) : typeof(IfcSite);
|
||||
}
|
||||
else if (typeof(IfcFacilityPart).IsAssignableFrom(type))
|
||||
type = typeof(IfcSpace);
|
||||
}
|
||||
}
|
||||
else if (release > ReleaseVersion.IFC4X1)
|
||||
|
@ -829,7 +827,6 @@ namespace GeometryGym.Ifc
|
|||
}
|
||||
|
||||
public T DuplicateProperty<T>(T property) where T : IfcProperty { return duplicateProperty(property) as T; }
|
||||
public IfcPropertySingleValue DuplicatePropertySingleValue(IfcPropertySingleValue property) { return duplicateProperty(property) as IfcPropertySingleValue; }
|
||||
public IfcProperty DuplicateProperty(IfcProperty property) { return duplicateProperty(property); }
|
||||
private IfcProperty duplicateProperty(IfcProperty property)
|
||||
{
|
||||
|
@ -860,7 +857,7 @@ namespace GeometryGym.Ifc
|
|||
return result;
|
||||
}
|
||||
result = Duplicate(property, new DuplicateOptions(mDatabase.Tolerance) { DuplicateDownstream = true }) as IfcProperty;
|
||||
if (psv != null)
|
||||
if (psv != null && val != null)
|
||||
psv.NominalValue = val;
|
||||
mProperties[stepString] = result;
|
||||
return result;
|
||||
|
@ -982,10 +979,10 @@ namespace GeometryGym.Ifc
|
|||
}
|
||||
public IfcConversionBasedUnit ConversionUnit(IfcConversionBasedUnit.CommonUnitName name)
|
||||
{
|
||||
if (mDictionaryConversionBasedUnits.TryGetValue(name, out IfcConversionBasedUnit exisiting))
|
||||
return exisiting;
|
||||
if (mDictionaryConversionBasedUnits.TryGetValue(name, out IfcConversionBasedUnit existing))
|
||||
return existing;
|
||||
IfcUnitAssignment assignment = (mDatabase.Context == null ? null : mDatabase.Context.UnitsInContext);
|
||||
string nameString = name.ToString().Replace("_", "");
|
||||
string nameString = name.ToString().Replace("_", " ");
|
||||
IfcNamedUnit unit = assignment == null ? null : assignment[IfcUnitEnum.LENGTHUNIT];
|
||||
if (unit == null)
|
||||
unit = SILength;
|
||||
|
@ -1459,7 +1456,7 @@ namespace GeometryGym.Ifc
|
|||
}
|
||||
set { mPersonOrganization = value; }
|
||||
}
|
||||
internal string PersonName() { return System.Environment.UserName; }
|
||||
internal string PersonIdentification() { return System.Environment.UserName; }
|
||||
internal IfcPerson mPerson = null;
|
||||
public IfcPerson Person
|
||||
{
|
||||
|
@ -1467,7 +1464,11 @@ namespace GeometryGym.Ifc
|
|||
{
|
||||
if (mPerson == null)
|
||||
{
|
||||
mPerson = new IfcPerson(mDatabase) { Identification = PersonName() };
|
||||
mPerson = new IfcPerson(mDatabase);
|
||||
if (mDatabase.Release > ReleaseVersion.IFC2x3)
|
||||
mPerson.Identification = PersonIdentification();
|
||||
else
|
||||
mPerson.FamilyName = PersonIdentification();
|
||||
#if (IFCMODEL && !IFCIMPORTONLY && (RHINO || GH))
|
||||
string str = ggAssembly.mOptions.OwnerRole;
|
||||
if (!string.IsNullOrEmpty(str))
|
||||
|
@ -1476,10 +1477,10 @@ namespace GeometryGym.Ifc
|
|||
if (Enum.TryParse<IfcRoleEnum>(str, out role))
|
||||
{
|
||||
if (role != IfcRoleEnum.NOTDEFINED)
|
||||
mPerson.Roles.Add(new IfcActorRole(mDatabase, role, "", "", new List<int>()));
|
||||
mPerson.Roles.Add(new IfcActorRole(mDatabase) { Role = role });
|
||||
}
|
||||
else
|
||||
mPerson.Roles.Add(new IfcActorRole(mDatabase, IfcRoleEnum.USERDEFINED, str, "", new List<int>()));
|
||||
mPerson.Roles.Add(new IfcActorRole(mDatabase) { Role = IfcRoleEnum.USERDEFINED, UserDefinedRole = str });
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -2709,7 +2710,7 @@ namespace GeometryGym.Ifc
|
|||
DateTime now = DateTime.Now;
|
||||
lines.Add("/* time_stamp */ '" + now.Year + "-" + (now.Month < 10 ? "0" : "") + now.Month + "-" + (now.Day < 10 ? "0" : "") + now.Day + "T" + (now.Hour < 10 ? "0" : "") + now.Hour + ":" + (now.Minute < 10 ? "0" : "") + now.Minute + ":" + (now.Second < 10 ? "0" : "") + now.Second + "',");
|
||||
IfcPerson person = mDatabase.Factory.mPerson;
|
||||
string authorName = person == null ? mDatabase.Factory.PersonName() : person.Name;
|
||||
string authorName = person == null ? mDatabase.Factory.PersonIdentification() : person.Name;
|
||||
lines.Add("/* author */ ('" + ParserIfc.Encode(authorName) + "'),");
|
||||
string organizationName = IfcOrganization.Organization;
|
||||
IfcOrganization organization = mDatabase.Factory.Organization;
|
||||
|
|
|
@ -914,7 +914,6 @@ namespace GeometryGym.Ifc
|
|||
private double mSegmentLength = 0; //: IfcNonNegativeLengthMeasure;
|
||||
private double mGravityCenterLineHeight = double.NaN; //: OPTIONAL IfcPositiveLengthMeasure;
|
||||
private IfcAlignmentHorizontalSegmentTypeEnum mPredefinedType; //: IfcAlignmentHorizontalSegmentTypeEnum;
|
||||
//INVERSE
|
||||
public IfcCartesianPoint StartPoint { get { return mStartPoint; } set { mStartPoint = value; } }
|
||||
public double StartDirection { get { return mStartDirection; } set { mStartDirection = value; } }
|
||||
public double StartRadiusOfCurvature { get { return mStartRadiusOfCurvature; } set { mStartRadiusOfCurvature = double.IsNaN(value) ? 0 : value; } }
|
||||
|
@ -1871,7 +1870,7 @@ namespace GeometryGym.Ifc
|
|||
internal double mBottomFlangeSlope = double.NaN;// : OPTIONAL IfcPlaneAngleMeasure;
|
||||
internal double mTopFlangeEdgeRadius = double.NaN;// : OPTIONAL IfcNonNegativeLengthMeasure;
|
||||
internal double mTopFlangeSlope = double.NaN;//: OPTIONAL IfcPlaneAngleMeasure;
|
||||
internal double mCentreOfGravityInY;// : OPTIONAL IfcPositiveLengthMeasure IFC4 deleted
|
||||
internal double mCentreOfGravityInY = double.NaN;// : OPTIONAL IfcPositiveLengthMeasure IFC4 deleted
|
||||
|
||||
public double BottomFlangeWidth { get { return mBottomFlangeWidth; } set { mBottomFlangeWidth = value; } }
|
||||
public double OverallDepth { get { return mOverallDepth; } set { mOverallDepth = value; } }
|
||||
|
|
|
@ -1609,7 +1609,7 @@ namespace GeometryGym.Ifc
|
|||
}
|
||||
protected IfcControl(DatabaseIfc db) : base(db)
|
||||
{
|
||||
if (mDatabase.mModelView != ModelView.Ifc4NotAssigned && mDatabase.mModelView != ModelView.Ifc2x3NotAssigned)
|
||||
if (mDatabase.mModelView == ModelView.Ifc4Reference)
|
||||
throw new Exception("Invalid Model View for IfcControl : " + db.ModelView.ToString());
|
||||
}
|
||||
|
||||
|
|
|
@ -187,7 +187,7 @@ namespace GeometryGym.Ifc
|
|||
public override string StepClassName { get { if (mDatabase != null && mDatabase.Release > ReleaseVersion.IFC4X2 && mDatabase.Release < ReleaseVersion.IFC4X3) return "IfcFacilityPart"; return base.StepClassName; } }
|
||||
public IfcFacilityPartCommon() : base() { }
|
||||
public IfcFacilityPartCommon(DatabaseIfc db) : base(db) { }
|
||||
public IfcFacilityPartCommon(DatabaseIfc db, IfcBridgePart bridgePart, DuplicateOptions options) : base(db, bridgePart, options) { }
|
||||
public IfcFacilityPartCommon(DatabaseIfc db, IfcFacilityPartCommon facilityPartCommon, DuplicateOptions options) : base(db, facilityPartCommon, options) { }
|
||||
public IfcFacilityPartCommon(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductDefinitionShape representation) : base(host, placement, representation) { }
|
||||
}
|
||||
[Serializable]
|
||||
|
|
|
@ -106,7 +106,7 @@ namespace GeometryGym.Ifc
|
|||
public override string StepClassName { get { if (mDatabase != null && mDatabase.Release > ReleaseVersion.IFC4X2 && mDatabase.Release < ReleaseVersion.IFC4X3) return "IfcFacilityPart"; return base.StepClassName; } }
|
||||
public IfcMarinePart() : base() { }
|
||||
public IfcMarinePart(DatabaseIfc db) : base(db) { }
|
||||
public IfcMarinePart(DatabaseIfc db, IfcBridgePart marinePart, DuplicateOptions options) : base(db, marinePart, options) { }
|
||||
public IfcMarinePart(DatabaseIfc db, IfcMarinePart marinePart, DuplicateOptions options) : base(db, marinePart, options) { }
|
||||
public IfcMarinePart(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductDefinitionShape representation) : base(host, placement, representation) { }
|
||||
}
|
||||
[Serializable]
|
||||
|
|
|
@ -282,7 +282,7 @@ namespace GeometryGym.Ifc
|
|||
if (o.mDecomposes != null)
|
||||
(db.Factory.Duplicate(o.mDecomposes, new DuplicateOptions(options) { DuplicateDownstream = false }) as IfcRelAggregates).RelatedObjects.Add(this);
|
||||
if(o.mNests != null)
|
||||
(db.Factory.Duplicate(o.mNests, new DuplicateOptions(options) { DuplicateDownstream = false }) as IfcRelNests).RelatedObjects.Add(this);
|
||||
db.Factory.Duplicate(o.mNests, new DuplicateOptions(options) { DuplicateDownstream = true });
|
||||
if (mHasContext != null)
|
||||
(db.Factory.Duplicate(mHasContext, new DuplicateOptions(options) { DuplicateDownstream = false }) as IfcRelDeclares).RelatedDefinitions.Add(this);
|
||||
}
|
||||
|
|
|
@ -53,12 +53,14 @@ namespace GeometryGym.Ifc
|
|||
}
|
||||
protected IfcParameterizedProfileDef(DatabaseIfc db, string name) : base(db, name)
|
||||
{
|
||||
if (db.mModelView == ModelView.Ifc4Reference)
|
||||
throw new Exception("Invalid Model View for IfcParameterizedProfileDef : " + db.ModelView.ToString());
|
||||
if (db.mRelease < ReleaseVersion.IFC4)
|
||||
Position = db.Factory.Origin2dPlace;
|
||||
if (db != null)
|
||||
{
|
||||
if (db.mModelView == ModelView.Ifc4Reference)
|
||||
throw new Exception("Invalid Model View for IfcParameterizedProfileDef : " + db.ModelView.ToString());
|
||||
if (db.mRelease < ReleaseVersion.IFC4)
|
||||
Position = db.Factory.Origin2dPlace;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
[Serializable]
|
||||
public partial class IfcPath : IfcTopologicalRepresentationItem
|
||||
|
@ -604,7 +606,6 @@ namespace GeometryGym.Ifc
|
|||
[Serializable]
|
||||
public partial class IfcPolygonalFaceSet : IfcTessellatedFaceSet //IFC4A2
|
||||
{
|
||||
|
||||
internal LIST<IfcIndexedPolygonalFace> mFaces = new LIST<IfcIndexedPolygonalFace>(); // : LIST [1:?] OF IfcIndexedPolygonalFace;
|
||||
internal LIST<int> mPnIndex = new LIST<int>(); // : OPTIONAL LIST [1:?] OF IfcPositiveInteger;
|
||||
|
||||
|
@ -636,8 +637,9 @@ namespace GeometryGym.Ifc
|
|||
[Serializable]
|
||||
public partial class IfcPolyLoop : IfcLoop
|
||||
{
|
||||
internal LIST<IfcCartesianPoint> mPolygon = new LIST<IfcCartesianPoint> ();// : LIST [3:?] OF UNIQUE IfcCartesianPoint;
|
||||
public LIST<IfcCartesianPoint> Polygon { get { return mPolygon; } set { mPolygon = value; } }
|
||||
private LIST<IfcCartesianPoint> mPolygon = new LIST<IfcCartesianPoint> ();// : LIST [3:?] OF UNIQUE IfcCartesianPoint;
|
||||
public LIST<IfcCartesianPoint> Polygon { get { return mPolygon; }
|
||||
set { mPolygon = value; } }
|
||||
|
||||
internal IfcPolyLoop() : base() { }
|
||||
internal IfcPolyLoop(DatabaseIfc db, IfcPolyLoop l, DuplicateOptions options) : base(db, l, options) { mPolygon.AddRange(l.Polygon.ConvertAll(x=> db.Factory.Duplicate(x) as IfcCartesianPoint)); }
|
||||
|
@ -1071,7 +1073,7 @@ namespace GeometryGym.Ifc
|
|||
}
|
||||
protected IfcProcess(DatabaseIfc db) : base(db)
|
||||
{
|
||||
if (mDatabase.mModelView != ModelView.Ifc4NotAssigned && mDatabase.mModelView != ModelView.Ifc2x3NotAssigned)
|
||||
if (mDatabase.mModelView == ModelView.Ifc4Reference)
|
||||
throw new Exception("Invalid Model View for IfcProcess : " + db.ModelView.ToString());
|
||||
}
|
||||
public bool AddOperatesOn(IfcObjectDefinition related)
|
||||
|
@ -2354,8 +2356,6 @@ namespace GeometryGym.Ifc
|
|||
|
||||
public IfcValue NominalValue { get { return mNominalValue; } set { mNominalValue = value; } }
|
||||
public IfcUnit Unit { get { return mUnit as IfcUnit; } set { mUnit = value; } }
|
||||
|
||||
internal string mVal;
|
||||
internal IfcPropertySingleValue() : base() { }
|
||||
|
||||
public IfcPropertySingleValue(IfcPropertySingleValue propertySingleValue) : base(propertySingleValue)
|
||||
|
@ -2393,8 +2393,6 @@ namespace GeometryGym.Ifc
|
|||
else
|
||||
return false;
|
||||
}
|
||||
else if (string.Compare(mVal, psv.mVal) != 0)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -172,8 +172,8 @@ namespace GeometryGym.Ifc
|
|||
internal IfcRationalBSplineSurfaceWithKnots() : base() { }
|
||||
internal IfcRationalBSplineSurfaceWithKnots(DatabaseIfc db, IfcRationalBSplineSurfaceWithKnots s, DuplicateOptions options) : base(db, s, options)
|
||||
{
|
||||
for (int icounter = 0; icounter < s.mWeightsData.Count; icounter++)
|
||||
mWeightsData.Add(new List<double>(s.mWeightsData[icounter].ToArray()));
|
||||
foreach(var list in s.WeightsData)
|
||||
mWeightsData.Add(new List<double>(list));
|
||||
}
|
||||
public IfcRationalBSplineSurfaceWithKnots(int uDegree, int vDegree, IEnumerable<IEnumerable<IfcCartesianPoint>> controlPoints, IEnumerable<int> uMultiplicities, IEnumerable<int> vMultiplicities, IEnumerable<double> uKnots, IEnumerable<double> vKnots, IfcKnotType type, List<List<double>> weights)
|
||||
: base(uDegree, vDegree, controlPoints, uMultiplicities, vMultiplicities, uKnots, vKnots, type)
|
||||
|
@ -1931,16 +1931,16 @@ namespace GeometryGym.Ifc
|
|||
internal IfcInterferenceSelect mRelatingElement;// : IfcInterferenceSelect;
|
||||
internal IfcInterferenceSelect mRelatedElement;// : IfcInterferenceSelect;
|
||||
internal IfcConnectionGeometry mInterferenceGeometry;// : OPTIONAL IfcConnectionGeometry;
|
||||
internal IfcSpatialZone mInterferenceSpace = null;// : OPTIONAL IfcSpatialZone;
|
||||
internal string mInterferenceType = "";// : OPTIONAL IfcIdentifier;
|
||||
internal IfcLogicalEnum mImpliedOrder = IfcLogicalEnum.UNKNOWN;// : LOGICAL;
|
||||
internal IfcSpatialZone mInterferenceSpace = null;// : OPTIONAL IfcSpatialZone;
|
||||
|
||||
public IfcInterferenceSelect RelatingElement { get { return mRelatingElement; } set { mRelatingElement = value; value.InterferesElements.Add(this); } }
|
||||
public IfcInterferenceSelect RelatedElement { get { return mRelatedElement; } set { mRelatedElement = value; value.IsInterferedByElements.Add(this); } }
|
||||
public IfcConnectionGeometry InterferenceGeometry { get { return mInterferenceGeometry; } set { mInterferenceGeometry = value; } }
|
||||
public IfcSpatialZone InterferenceSpace { get { return mInterferenceSpace; } set { mInterferenceSpace = value; } }
|
||||
public string InterferenceType { get { return mInterferenceType; } set { mInterferenceType = value; } }
|
||||
public IfcLogicalEnum ImpliedOrder { get { return mImpliedOrder; } }
|
||||
public IfcSpatialZone InterferenceSpace { get { return mInterferenceSpace; } set { mInterferenceSpace = value; } }
|
||||
|
||||
internal IfcRelInterferesElements() : base() { }
|
||||
internal IfcRelInterferesElements(DatabaseIfc db, IfcRelInterferesElements r, DuplicateOptions options) : base(db, r, options)
|
||||
|
@ -2741,7 +2741,7 @@ namespace GeometryGym.Ifc
|
|||
public override string StepClassName { get { if (mDatabase != null && mDatabase.Release > ReleaseVersion.IFC4X2 && mDatabase.Release < ReleaseVersion.IFC4X3) return "IfcFacilityPart"; return base.StepClassName; } }
|
||||
public IfcRoadPart() : base() { }
|
||||
public IfcRoadPart(DatabaseIfc db) : base(db) { }
|
||||
public IfcRoadPart(DatabaseIfc db, IfcRailwayPart railwayPart, DuplicateOptions options) : base(db, railwayPart, options) { }
|
||||
public IfcRoadPart(DatabaseIfc db, IfcRoadPart roadPart, DuplicateOptions options) : base(db, roadPart, options) { }
|
||||
public IfcRoadPart(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductDefinitionShape representation) : base(host, placement, representation) { }
|
||||
}
|
||||
[Serializable]
|
||||
|
|
|
@ -171,11 +171,11 @@ namespace GeometryGym.Ifc
|
|||
[Obsolete("REVISED IFC4x3RC4", false)]
|
||||
internal LIST<IfcCurveMeasureSelect> mCrossSectionPositionMeasures_OBSOLETE = new LIST<IfcCurveMeasureSelect>();// : LIST [2:?] OF IfcCurveMeasureSelect;
|
||||
internal LIST<IfcAxis2PlacementLinear> mCrossSectionPositions = new LIST<IfcAxis2PlacementLinear>();// : LIST [2:?] OF IfcAxis2PlacementLinear;
|
||||
[Obsolete("REVISED IFC4x3RC5", false)]
|
||||
[Obsolete("REVISED IFC4x3", false)]
|
||||
internal bool mFixedAxisVertical;// : IfcBoolean
|
||||
|
||||
public LIST<IfcAxis2PlacementLinear> CrossSectionPositions { get { return mCrossSectionPositions; } set { mCrossSectionPositions.Clear(); if (value != null) CrossSectionPositions = value; } }
|
||||
[Obsolete("REVISED IFC4x3RC5", false)]
|
||||
[Obsolete("REVISED IFC4x3", false)]
|
||||
public bool FixedAxisVertical { get { return mFixedAxisVertical; } set { mFixedAxisVertical = value; } }
|
||||
|
||||
internal IfcSectionedSolidHorizontal() : base() { }
|
||||
|
@ -186,11 +186,10 @@ namespace GeometryGym.Ifc
|
|||
mCrossSectionPositionMeasures_OBSOLETE.AddRange(s.mCrossSectionPositionMeasures_OBSOLETE);
|
||||
FixedAxisVertical = s.FixedAxisVertical;
|
||||
}
|
||||
public IfcSectionedSolidHorizontal(IfcCurve directrix, IEnumerable<IfcProfileDef> profiles, IEnumerable<IfcAxis2PlacementLinear> positions, bool fixedAxisVertical)
|
||||
public IfcSectionedSolidHorizontal(IfcCurve directrix, IEnumerable<IfcProfileDef> profiles, IEnumerable<IfcAxis2PlacementLinear> positions)
|
||||
: base(directrix, profiles)
|
||||
{
|
||||
CrossSectionPositions.AddRange(positions);
|
||||
FixedAxisVertical = fixedAxisVertical;
|
||||
}
|
||||
[Obsolete("REVISED IFC4x3", false)]
|
||||
public IfcSectionedSolidHorizontal(IfcCurve directrix, IEnumerable<IfcProfileDef> profiles, IEnumerable<IfcPointByDistanceExpression> positions, bool fixedAxisVertical)
|
||||
|
@ -233,9 +232,9 @@ namespace GeometryGym.Ifc
|
|||
public IfcCurve Directrix { get { return mDirectrix; } set { mDirectrix = value; } }
|
||||
public LIST<IfcAxis2PlacementLinear> CrossSectionPositions { get { return mCrossSectionPositions; } }
|
||||
public LIST<IfcProfileDef> CrossSections { get { return mCrossSections; } }
|
||||
[Obsolete("REVISED IFC4x3RC5", false)]
|
||||
[Obsolete("REVISED IFC4x3", false)]
|
||||
public bool FixedAxisVertical { get { return mFixedAxisVertical; } set { mFixedAxisVertical = value; } }
|
||||
[Obsolete("REVISED IFC4x3RC5", false)]
|
||||
[Obsolete("REVISED IFC4x3", false)]
|
||||
public LIST<IfcPointByDistanceExpression> CrossSectionPositions_OBSOLETE { get { return mCrossSectionPositions_OBSOLETE; } }
|
||||
|
||||
public IfcSectionedSurface() : base() { }
|
||||
|
@ -1747,8 +1746,8 @@ additional types some additional representation types are given:
|
|||
}
|
||||
public IfcStructuralLoadConfiguration(IfcStructuralLoadOrResult val, double length)
|
||||
: base(val.Database) { mValues.Add(val); mLocations.Add( new List<double>() { length } ); }
|
||||
public IfcStructuralLoadConfiguration(List<IfcStructuralLoadOrResult> vals, List<List<double>> lengths)
|
||||
: base(vals[0].mDatabase) { mValues.AddRange(vals); if (lengths != null) mLocations.AddRange(lengths); }
|
||||
public IfcStructuralLoadConfiguration(List<IfcStructuralLoadOrResult> vals, IEnumerable<List<double>> locations)
|
||||
: base(vals[0].mDatabase) { mValues.AddRange(vals); if (locations != null) mLocations.AddRange(locations); }
|
||||
public IfcStructuralLoadConfiguration(IfcStructuralLoadOrResult val1, double loc1, IfcStructuralLoadOrResult val2, double loc2)
|
||||
: this(new List<IfcStructuralLoadOrResult>() { val1, val2}, new List<List<double>>() { new List<double>() { loc1 }, new List<double>() { loc2 } }) { }
|
||||
|
||||
|
@ -1833,15 +1832,15 @@ additional types some additional representation types are given:
|
|||
[Serializable]
|
||||
public partial class IfcStructuralLoadLinearForce : IfcStructuralLoadStatic
|
||||
{
|
||||
internal double mLinearForceX = 0, mLinearForceY = 0, mLinearForceZ = 0; // : OPTIONAL IfcLinearForceMeasure
|
||||
internal double mLinearMomentX = 0, mLinearMomentY = 0, mLinearMomentZ = 0;// : OPTIONAL IfcLinearMomentMeasure;
|
||||
private double mLinearForceX = 0, mLinearForceY = 0, mLinearForceZ = 0; // : OPTIONAL IfcLinearForceMeasure
|
||||
private double mLinearMomentX = 0, mLinearMomentY = 0, mLinearMomentZ = 0;// : OPTIONAL IfcLinearMomentMeasure;
|
||||
|
||||
public double LinearForceX { get { return mLinearForceX; } set { mLinearForceX = value; } }
|
||||
public double LinearForceY { get { return mLinearForceY; } set { mLinearForceY = value; } }
|
||||
public double LinearForceZ { get { return mLinearForceZ; } set { mLinearForceZ = value; } }
|
||||
public double LinearMomentX { get { return mLinearMomentX; } set { mLinearMomentX = value; } }
|
||||
public double LinearMomentY { get { return mLinearMomentY; } set { mLinearMomentY = value; } }
|
||||
public double LinearMomentZ { get { return mLinearMomentZ; } set { mLinearMomentZ = value; } }
|
||||
public double LinearForceX { get { return double.IsNaN(mLinearForceX) ? 0 : mLinearForceX; } set { mLinearForceX = value; } }
|
||||
public double LinearForceY { get { return double.IsNaN(mLinearForceY) ? 0 : mLinearForceY; } set { mLinearForceY = value; } }
|
||||
public double LinearForceZ { get { return double.IsNaN(mLinearForceZ) ? 0 : mLinearForceZ; } set { mLinearForceZ = value; } }
|
||||
public double LinearMomentX { get { return double.IsNaN(mLinearMomentX) ? 0 : mLinearMomentX; } set { mLinearMomentX = value; } }
|
||||
public double LinearMomentY { get { return double.IsNaN(mLinearMomentY) ? 0 : mLinearMomentY; } set { mLinearMomentY = value; } }
|
||||
public double LinearMomentZ { get { return double.IsNaN(mLinearMomentZ) ? 0 : mLinearMomentZ; } set { mLinearMomentZ = value; } }
|
||||
|
||||
internal IfcStructuralLoadLinearForce() : base() { }
|
||||
internal IfcStructuralLoadLinearForce(DatabaseIfc db, IfcStructuralLoadLinearForce f) : base(db,f) { mLinearForceX = f.mLinearForceX; mLinearForceY = f.mLinearForceY; mLinearForceZ = f.mLinearForceZ; mLinearMomentX = f.mLinearMomentX; mLinearMomentY = f.mLinearMomentY; mLinearMomentZ = f.mLinearMomentZ; }
|
||||
|
|
|
@ -925,8 +925,6 @@ namespace GeometryGym.Ifc
|
|||
internal IfcTrapeziumProfileDef(DatabaseIfc db, IfcTrapeziumProfileDef p, DuplicateOptions options) : base(db, p, options) { mBottomXDim = p.mBottomXDim; mTopXDim = p.mTopXDim; mYDim = p.mYDim; mTopXOffset = p.mTopXOffset; }
|
||||
public IfcTrapeziumProfileDef(DatabaseIfc db, string name, double bottomXDim, double topXDim, double yDim, double topXOffset) : base(db, name)
|
||||
{
|
||||
if (mDatabase.mModelView != ModelView.Ifc4NotAssigned && mDatabase.mModelView != ModelView.Ifc2x3NotAssigned)
|
||||
throw new Exception("Invalid Model View for IfcTrapeziumProfileDef : " + db.ModelView.ToString());
|
||||
mBottomXDim = bottomXDim;
|
||||
mTopXDim = topXDim;
|
||||
mYDim = yDim;
|
||||
|
|
|
@ -630,7 +630,7 @@ namespace GeometryGym.Ifc
|
|||
obj["TopFlangeEdgeRadius"] = formatLength(mTopFlangeEdgeRadius);
|
||||
if (!double.IsNaN(mTopFlangeSlope) && mTopFlangeSlope > 0)
|
||||
obj["TopFlangeSlope"] = mTopFlangeSlope;
|
||||
if (mDatabase.Release <= ReleaseVersion.IFC2x3)
|
||||
if (mDatabase != null && mDatabase.Release < ReleaseVersion.IFC4)
|
||||
{
|
||||
if (!double.IsNaN(mCentreOfGravityInY) && mCentreOfGravityInY > 0)
|
||||
obj["CentreOfGravityInY"] = formatLength(mCentreOfGravityInY);
|
||||
|
|
|
@ -429,7 +429,7 @@ namespace GeometryGym.Ifc
|
|||
}
|
||||
}
|
||||
}
|
||||
public partial class IfcRelConnectsStructuralActivity : IfcRelConnects
|
||||
public partial class IfcRelConnectsStructuralActivity
|
||||
{
|
||||
internal override void parseJObject(JObject obj)
|
||||
{
|
||||
|
|
|
@ -882,7 +882,11 @@ namespace GeometryGym.Ifc
|
|||
}
|
||||
public partial class IfcPropertySingleValue
|
||||
{
|
||||
protected override string BuildStringSTEP(ReleaseVersion release) { return base.BuildStringSTEP(release) + "," + (mNominalValue == null ? (string.IsNullOrEmpty(mVal) ? "$" : mVal) : mNominalValue.ToString()) + "," + ParserSTEP.ObjToLinkString(mUnit); }
|
||||
protected override string BuildStringSTEP(ReleaseVersion release)
|
||||
{
|
||||
return base.BuildStringSTEP(release) + "," + (mNominalValue == null ? "$" : mNominalValue.ToString()) +
|
||||
(mUnit == null ? ",$" : ",#" + mUnit.StepId);
|
||||
}
|
||||
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int,BaseClassIfc> dictionary)
|
||||
{
|
||||
base.parse(str, ref pos, release, len, dictionary);
|
||||
|
@ -894,10 +898,6 @@ namespace GeometryGym.Ifc
|
|||
mNominalValue = ParserIfc.parseValue(s);
|
||||
}
|
||||
catch { }
|
||||
if (mNominalValue == null)
|
||||
{
|
||||
mVal = s;
|
||||
}
|
||||
}
|
||||
mUnit = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcUnit;
|
||||
}
|
||||
|
|
|
@ -1078,10 +1078,10 @@ namespace GeometryGym.Ifc
|
|||
protected override string BuildStringSTEP(ReleaseVersion release)
|
||||
{
|
||||
return base.BuildStringSTEP(release) + ",#" + mRelatingElement.StepId + ",#" + mRelatedElement.StepId +
|
||||
(mInterferenceGeometry == null ? ",$" : ",#" + mInterferenceGeometry.StepId) +
|
||||
(release > ReleaseVersion.IFC4X3_RC3 ? "," + ParserSTEP.ObjToLinkString(mInterferenceSpace) : "") +
|
||||
(mInterferenceGeometry == null ? ",$" : ",#" + mInterferenceGeometry.StepId) +
|
||||
(string.IsNullOrEmpty( mInterferenceType) ? ",$," : ",'" + ParserIfc.Encode(mInterferenceType) + "',") +
|
||||
ParserIfc.LogicalToString(mImpliedOrder);
|
||||
ParserIfc.LogicalToString(mImpliedOrder) +
|
||||
(release > ReleaseVersion.IFC4X3_RC3 ? "," + ParserSTEP.ObjToLinkString(mInterferenceSpace) : "");
|
||||
}
|
||||
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary<int, BaseClassIfc> dictionary)
|
||||
{
|
||||
|
@ -1089,10 +1089,10 @@ namespace GeometryGym.Ifc
|
|||
RelatingElement = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcInterferenceSelect;
|
||||
RelatedElement = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcInterferenceSelect;
|
||||
InterferenceGeometry =dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcConnectionGeometry;
|
||||
if (release > ReleaseVersion.IFC4X3_RC3)
|
||||
mInterferenceSpace = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcSpatialZone;
|
||||
mInterferenceType = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
|
||||
mImpliedOrder = ParserIfc.StripLogical(str, ref pos, len);
|
||||
if (release > ReleaseVersion.IFC4X3_RC3)
|
||||
mInterferenceSpace = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcSpatialZone;
|
||||
}
|
||||
}
|
||||
public partial class IfcRelNests
|
||||
|
|
|
@ -20,8 +20,8 @@ using System.Reflection;
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[assembly: AssemblyVersion("0.2.02.0")]
|
||||
[assembly: AssemblyFileVersion("0.2.02.0")]
|
||||
[assembly: AssemblyVersion("0.2.03.0")]
|
||||
[assembly: AssemblyFileVersion("0.2.03.0")]
|
||||
|
||||
[assembly: AssemblyTitle("GeometryGymIFC")]
|
||||
[assembly: AssemblyDescription("C# classes to generate and parse buildingSMART IFC (Industry Foundation Class) files")]
|
||||
|
|
|
@ -20,8 +20,8 @@ using System.Reflection;
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[assembly: AssemblyVersion("0.2.02.0")]
|
||||
[assembly: AssemblyFileVersion("0.2.02.0")]
|
||||
[assembly: AssemblyVersion("0.2.03.0")]
|
||||
[assembly: AssemblyFileVersion("0.2.03.0")]
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<PackageId>GeometryGymIFC_Core</PackageId>
|
||||
<Version>0.2.02</Version>
|
||||
<Version>0.2.03</Version>
|
||||
<Authors>Geometry Gym</Authors>
|
||||
<Product>GeometryGymIFC_Core</Product>
|
||||
<Description>.Net Standard 2.0 C# classes to generate and parse buildingSMART IFC (Industry Foundation Class) files
|
||||
|
@ -14,8 +14,8 @@ License https://github.com/GeometryGym/GeometryGymIFC/blob/master/LICENSE</Descr
|
|||
<PackageProjectUrl></PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/GeometryGym/GeometryGymIFC</RepositoryUrl>
|
||||
<PackageTags>BIM, IFC, openBIM</PackageTags>
|
||||
<AssemblyVersion>0.1.24.0</AssemblyVersion>
|
||||
<FileVersion>0.1.24.0</FileVersion>
|
||||
<AssemblyVersion>0.2.03.0</AssemblyVersion>
|
||||
<FileVersion>0.2.03.0</FileVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
|
|
|
@ -69,16 +69,16 @@ namespace GeometryGym.Ifc
|
|||
internal IfcBSplineCurveWithKnots(DatabaseIfc m, NurbsCurve nc, bool twoD)
|
||||
: base(m, nc, twoD)
|
||||
{
|
||||
if (mDatabase.mModelView != ModelView.Ifc4NotAssigned)
|
||||
throw new Exception("Invalid Model View for IfcRationalBSplineCurveWithKnots : " + mDatabase.ModelView.ToString());
|
||||
if (mDatabase.mModelView == ModelView.Ifc4Reference)
|
||||
throw new Exception("Invalid Model View for IfcBSplineCurveWithKnots : " + mDatabase.ModelView.ToString());
|
||||
ClosedCurve = nc.IsClosed ? IfcLogicalEnum.TRUE : IfcLogicalEnum.FALSE;
|
||||
adoptKnotsAndMultiplicities(nc);
|
||||
}
|
||||
public IfcBSplineCurveWithKnots(DatabaseIfc m, int degree, List<Point2d> controlPoints, IEnumerable<int> multiplicities, IEnumerable<double> knots, IfcKnotType knotSpec) :
|
||||
base(degree, controlPoints.ConvertAll(x => new IfcCartesianPoint(m, x)))
|
||||
{
|
||||
if (mDatabase.mModelView != ModelView.Ifc4NotAssigned)
|
||||
throw new Exception("Invalid Model View for IfcRationalBSplineCurveWithKnots : " + mDatabase.ModelView.ToString());
|
||||
if (mDatabase.mModelView != ModelView.Ifc4Reference)
|
||||
throw new Exception("Invalid Model View for IfcBSplineCurveWithKnots : " + mDatabase.ModelView.ToString());
|
||||
mKnotMultiplicities.AddRange(multiplicities);
|
||||
mKnots.AddRange(knots);
|
||||
}
|
||||
|
|
|
@ -116,7 +116,7 @@ namespace GeometryGym.Ifc
|
|||
{
|
||||
public Vector3d Force
|
||||
{
|
||||
get { return new Vector3d(mForceX, mForceY, mForceZ); }
|
||||
get { return new Vector3d(ForceX, ForceY, ForceZ); }
|
||||
set
|
||||
{
|
||||
if (value.IsValid)
|
||||
|
@ -131,7 +131,7 @@ namespace GeometryGym.Ifc
|
|||
}
|
||||
public Vector3d Moment
|
||||
{
|
||||
get { return new Vector3d(mMomentX, mMomentY, mMomentZ); }
|
||||
get { return new Vector3d(MomentX, MomentY, MomentZ); }
|
||||
set
|
||||
{
|
||||
if (value.IsValid)
|
||||
|
|
|
@ -37,15 +37,25 @@ namespace GeometryGym.Ifc
|
|||
mMasterRepresentation = IfcTrimmingPreference.CARTESIAN;
|
||||
mSenseAgreement = true;
|
||||
}
|
||||
internal IfcTrimmedCurve(DatabaseIfc db, Arc a, bool twoD, IfcCartesianPoint optStrt, out IfcCartesianPoint end) : base(db)
|
||||
internal IfcTrimmedCurve(DatabaseIfc db, Arc a, bool twoD, IfcCartesianPoint optStrt, out IfcCartesianPoint end)
|
||||
:this(db, a, twoD)
|
||||
{
|
||||
Point3d o = a.Plane.Origin, s = a.StartPoint, e = a.EndPoint;
|
||||
Vector3d x = s - o;
|
||||
mSenseAgreement = true;
|
||||
if (optStrt == null)
|
||||
optStrt = twoD ? new IfcCartesianPoint(db, new Point2d(s.X, s.Y)) : new IfcCartesianPoint(db, s);
|
||||
end = twoD ? new IfcCartesianPoint(db, new Point2d(e.X, e.Y)) : new IfcCartesianPoint(db,e);
|
||||
mTrim1.CartesianPoint = twoD ? new IfcCartesianPoint(db, new Point2d(s.X, s.Y)) : new IfcCartesianPoint(db, s);
|
||||
else
|
||||
mTrim1.CartesianPoint = optStrt;
|
||||
end = twoD ? new IfcCartesianPoint(db, new Point2d(e.X, e.Y)) : new IfcCartesianPoint(db, e);
|
||||
mTrim2.CartesianPoint = end;
|
||||
|
||||
}
|
||||
internal IfcTrimmedCurve(DatabaseIfc db, Arc a, bool twoD) : base(db)
|
||||
{
|
||||
Point3d o = a.Plane.Origin, s = a.StartPoint, e = a.EndPoint;
|
||||
Vector3d x = s - o;
|
||||
double angleFactor = mDatabase.mContext.UnitsInContext.ScaleSI(IfcUnitEnum.PLANEANGLEUNIT);
|
||||
mSenseAgreement = true;
|
||||
if (twoD)
|
||||
{
|
||||
if (a.Plane.ZAxis.Z < 0)
|
||||
|
@ -54,15 +64,15 @@ namespace GeometryGym.Ifc
|
|||
x = e - o;
|
||||
IfcAxis2Placement2D ap = new IfcAxis2Placement2D(db, new Point2d(o.X, o.Y), new Vector2d(x.X, x.Y));
|
||||
BasisCurve = new IfcCircle(ap, a.Radius);
|
||||
mTrim1 = new IfcTrimmingSelect(a.Angle / angleFactor, optStrt);
|
||||
mTrim2 = new IfcTrimmingSelect(0, end);
|
||||
mTrim1 = new IfcTrimmingSelect(a.Angle / angleFactor);
|
||||
mTrim2 = new IfcTrimmingSelect(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
IfcAxis2Placement2D ap = new IfcAxis2Placement2D(db, new Point2d(o.X, o.Y), new Vector2d(x.X, x.Y));
|
||||
BasisCurve = new IfcCircle(ap, a.Radius);
|
||||
mTrim1 = new IfcTrimmingSelect(0, optStrt);
|
||||
mTrim2 = new IfcTrimmingSelect(a.Angle / angleFactor, end);
|
||||
mTrim1 = new IfcTrimmingSelect(0);
|
||||
mTrim2 = new IfcTrimmingSelect(a.Angle / angleFactor);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -71,8 +81,8 @@ namespace GeometryGym.Ifc
|
|||
Plane pl = new Plane(o, x, y);
|
||||
IfcAxis2Placement3D ap = new IfcAxis2Placement3D(db, pl);
|
||||
BasisCurve = new IfcCircle(ap, a.Radius);
|
||||
mTrim1 = new IfcTrimmingSelect(0, optStrt);
|
||||
mTrim2 = new IfcTrimmingSelect(a.Angle / angleFactor, end);
|
||||
mTrim1 = new IfcTrimmingSelect(0);
|
||||
mTrim2 = new IfcTrimmingSelect(a.Angle / angleFactor);
|
||||
}
|
||||
mMasterRepresentation = IfcTrimmingPreference.PARAMETER;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче