Родитель
394c378f3d
Коммит
a6fb0f0d8e
|
@ -348,14 +348,13 @@ namespace GeometryGym.Ifc
|
|||
{
|
||||
string str = className, definedType = "", enumName = "";
|
||||
ReleaseVersion release = mDatabase.Release;
|
||||
if (!string.IsNullOrEmpty(str))
|
||||
if (string.IsNullOrEmpty(str))
|
||||
return null;
|
||||
string[] fields = str.Split(".".ToCharArray());
|
||||
if (fields.Length > 1)
|
||||
{
|
||||
string[] fields = str.Split(".".ToCharArray());
|
||||
if (fields.Length > 1)
|
||||
{
|
||||
enumName = str = fields[0];
|
||||
definedType = fields[1];
|
||||
}
|
||||
enumName = str = fields[0];
|
||||
definedType = fields[1];
|
||||
}
|
||||
if (str.EndsWith("Type"))
|
||||
str = str.Substring(0, str.Length - 4);
|
||||
|
|
|
@ -638,7 +638,6 @@ namespace GeometryGym.Ifc
|
|||
public enum PEnum_DistributionPortElectricalType { ACPLUG, DCPLUG, COAXIAL, CRIMP, RJ, RADIO, DIN, DSUB, DVI, EIAJ, HDMI, RCA, SOCKET, TRS, USB, XLR, OTHER, NOTKNOWN, UNSET };
|
||||
public enum PEnum_DistributionPortGender { MALE, FEMALE, OTHER, NOTKNOWN, UNSET };
|
||||
public enum PEnum_ElectricActuatorType { MOTORDRIVE, MAGNETIC, OTHER, NOTKNOWN, UNSET };
|
||||
public enum PEnum_Status { NEW, EXISTING, DEMOLISH, TEMPORARY, OTHER, NOTKNOWN, UNSET };
|
||||
public enum PEnum_ElementComponentDeliveryType { CAST_IN_PLACE, WELDED_TO_STRUCTURE, LOOSE, ATTACHED_FOR_DELIVERY, PRECAST, NOTDEFINED };
|
||||
public enum PEnum_ElementComponentCorrosionTreatment { PAINTED, EPOXYCOATED, GALVANISED, STAINLESS, NONE, NOTDEFINED };
|
||||
public enum PEnum_EnergySource { COAL, COAL_PULVERIZED, ELECTRICITY, GAS, OIL, PROPANE, WOOD, WOOD_CHIP, WOOD_PELLET, WOOD_PULVERIZED, OTHER, NOTKNOWN, UNSET };
|
||||
|
@ -660,6 +659,8 @@ namespace GeometryGym.Ifc
|
|||
public enum PEnum_SpaceHeaterTemperatureClassification { LOWTEMPERATURE, HIGHTEMPERATURE, OTHER, NOTKNOWN, UNSET };
|
||||
public enum PEnum_SpaceHeaterHeatTransferDimension { POINT, PATH, SURFACE, OTHER, NOTKNOWN, UNSET };
|
||||
public enum PEnum_SpaceHeaterHeatTransferMedium { WATER, STEAM, OTHER, NOTKNOWN, UNSET };
|
||||
public enum PEnum_Status { NEW, EXISTING, DEMOLISH, TEMPORARY, OTHER, NOTKNOWN, UNSET };
|
||||
public enum PEnum_StrataAssemblyPurpose { NOTKNOWN, NOTDEFINED, USERDEFINED, SITE_INVESTIGATION, HYDROCARBON, FEEDSTOCK, MINERAL, GEOLOGICAL, HYDROGEOLOGICAL, DEPOSIT, STORAGE, ENVIRONMENTAL, PEDOLOGICAL, GEOTHERMAL };
|
||||
public enum PEnum_TaskCategory { ADJUSTMENT, CALIBRATION, EMERGENCY, INSPECTION, OPERATION, PM, SAFETY, SHUTDOWN, STARTUP, TESTING, TROUBLE };
|
||||
public enum PEnum_TaskStatus { NOT_YET_STARTED, STARTED, COMPLETED };
|
||||
public enum PEnum_ValveMechanism { BALL, BUTTERFLY, CONFIGUREDGATE, GLAND, GLOBE, LUBRICATEDPLUG, NEEDLE, PARALLELSLIDE, PLUG, WEDGEGATE, OTHER, NOTKNOWN, UNSET };
|
||||
|
|
|
@ -328,7 +328,6 @@ namespace GeometryGym.Ifc
|
|||
internal IfcLinearDimension() : base() { }
|
||||
//internal IfcLinearDimension(IfcAngularDimension el) : base((IfcDimensionCurveDirectedCallout)el) { }
|
||||
}
|
||||
[Serializable]
|
||||
public partial class IfcLinearPlacement : IfcObjectPlacement
|
||||
{
|
||||
private IfcCurve mPlacementMeasuredAlong = null; //: IfcCurve;
|
||||
|
@ -379,7 +378,8 @@ namespace GeometryGym.Ifc
|
|||
public IfcLinearAxisSelect Axis { get { return mAxis; } set { mAxis = value; } }
|
||||
|
||||
protected IfcLinearPositioningElement() : base() { }
|
||||
protected IfcLinearPositioningElement(IfcSite host, IfcCurve axis) : base(host) { Axis = axis; }
|
||||
protected IfcLinearPositioningElement(IfcSpatialStructureElement host) : base(host) { }
|
||||
protected IfcLinearPositioningElement(IfcSpatialStructureElement host, IfcCurve axis) : base(host) { Axis = axis; }
|
||||
protected IfcLinearPositioningElement(DatabaseIfc db, IfcLinearPositioningElement e, DuplicateOptions options) : base(db, e, options) { Axis = db.Factory.Duplicate(e.Axis) as IfcCurve; }
|
||||
}
|
||||
[Serializable]
|
||||
|
|
|
@ -716,7 +716,7 @@ namespace GeometryGym.Ifc
|
|||
public IfcRelContainedInSpatialStructure ContainedinStructure { get { return mContainedInStructure; } }
|
||||
protected IfcPositioningElement() : base() { }
|
||||
protected IfcPositioningElement(DatabaseIfc db) : base(db) { }
|
||||
protected IfcPositioningElement(IfcSite host) : base(host.Database) { host.AddElement(this); }
|
||||
protected IfcPositioningElement(IfcSpatialStructureElement host) : base(host.Database) { host.AddElement(this); }
|
||||
protected IfcPositioningElement(IfcObjectPlacement placement, IfcProductDefinitionShape representation) : base(placement, representation) { }
|
||||
protected IfcPositioningElement(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductDefinitionShape representation) : base(host, placement, representation) { }
|
||||
protected IfcPositioningElement(DatabaseIfc db, IfcPositioningElement e, DuplicateOptions options) : base(db, e, options) { }
|
||||
|
@ -1060,7 +1060,20 @@ namespace GeometryGym.Ifc
|
|||
if (product == null)
|
||||
ObjectPlacement = new IfcLocalPlacement(mDatabase.Factory.XYPlanePlacement);
|
||||
else
|
||||
ObjectPlacement = new IfcLocalPlacement(product.ObjectPlacement, mDatabase.Factory.XYPlanePlacement);
|
||||
{
|
||||
if (mDatabase.mRelease > ReleaseVersion.IFC2x3)
|
||||
{
|
||||
if (product.mContainerCommonPlacement == null)
|
||||
{
|
||||
ObjectPlacement = mContainerCommonPlacement = new IfcLocalPlacement(ObjectPlacement, mDatabase.Factory.XYPlanePlacement);
|
||||
mContainerCommonPlacement.mContainerHost = product;
|
||||
}
|
||||
else
|
||||
ObjectPlacement = product.mContainerCommonPlacement;
|
||||
}
|
||||
else
|
||||
ObjectPlacement = new IfcLocalPlacement(product.ObjectPlacement, mDatabase.Factory.XYPlanePlacement);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -784,6 +784,14 @@ namespace GeometryGym.Ifc
|
|||
//Pset_FurnitureTypeDesk
|
||||
//Pset_FurnitureTypeFileCabinet
|
||||
//Pset_FurnitureTypeTable
|
||||
public partial class Pset_GeotechnicalAssemblyCommon : IfcPropertySet
|
||||
{
|
||||
public string Limitations { set { AddProperty(new IfcPropertySingleValue(mDatabase, "Limitations", new IfcIdentifier(value))); } }
|
||||
public string Methodology { set { AddProperty(new IfcPropertySingleValue(mDatabase, "Methodology", new IfcIdentifier(value))); } }
|
||||
public PEnum_StrataAssemblyPurpose Purpose { set { AddProperty(new IfcPropertyEnumeratedValue(mDatabase, "Purpose", new IfcLabel(value.ToString()))); } }
|
||||
public PEnum_Status Status { set { AddProperty(new IfcPropertyEnumeratedValue(mDatabase, "Status", new IfcLabel(value.ToString()))); } }
|
||||
public Pset_GeotechnicalAssemblyCommon(IfcGeotechnicalAssembly instance) : base(instance) { }
|
||||
}
|
||||
//Pset_HeatExchangerTypeCommon
|
||||
//Pset_HeatExchangerTypePlate
|
||||
//Pset_HumidifierPHistory
|
||||
|
|
|
@ -48,7 +48,8 @@ namespace GeometryGym.STEP
|
|||
|
||||
private string getKey(T item)
|
||||
{
|
||||
if (item is IfcRoot root)
|
||||
IfcRoot root = item as IfcRoot;
|
||||
if (root != null)
|
||||
return root.GlobalId;
|
||||
return item.StepId > 0 ? item.StepId.ToString() : item.GetHashCode().ToString();
|
||||
}
|
||||
|
|
|
@ -142,10 +142,5 @@ namespace GeometryGym.Ifc
|
|||
{
|
||||
public Curve Curve() { return Curve(mDatabase == null ? 1e-5 : mDatabase.Tolerance); }
|
||||
public abstract Curve Curve(double tol);
|
||||
|
||||
internal virtual Plane planeAt(IfcDistanceExpression distanceExpression, bool vertical, double tol)
|
||||
{
|
||||
throw new Exception("PlaneAt DistanceExpression not implemented for " + this.StepClassName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,38 +36,6 @@ namespace GeometryGym.Ifc
|
|||
return new Line(pt, pt + Dir.Vector);
|
||||
}
|
||||
}
|
||||
public partial class IfcLinearPlacement : IfcObjectPlacement
|
||||
{
|
||||
public override Transform Transform()
|
||||
{
|
||||
double tol = mDatabase == null ? 1e-5 : mDatabase.Tolerance;
|
||||
IfcDistanceExpression distanceExpression = Distance;
|
||||
IfcCurve curve = PlacementMeasuredAlong;
|
||||
Plane plane = Plane.Unset;
|
||||
plane = curve.planeAt(distanceExpression, false, tol);
|
||||
if (plane.IsValid)
|
||||
{
|
||||
Vector3d xAxis = Vector3d.CrossProduct(plane.ZAxis, Vector3d.ZAxis);
|
||||
plane = new Plane(plane.Origin, xAxis, plane.ZAxis);
|
||||
|
||||
if (plane.IsValid)
|
||||
{
|
||||
IfcOrientationExpression orientationExpression = Orientation;
|
||||
if (orientationExpression != null)
|
||||
{
|
||||
Vector3d x = orientationExpression.LateralAxisDirection.Vector3d, z = orientationExpression.VerticalAxisDirection.Vector3d;
|
||||
Vector3d y = Vector3d.CrossProduct(z, x);
|
||||
plane = new Plane(plane.Origin, x, y);
|
||||
}
|
||||
return Rhino.Geometry.Transform.ChangeBasis(plane, Plane.WorldXY);
|
||||
}
|
||||
}
|
||||
if (CartesianPosition != null)
|
||||
return CartesianPosition.Transform();
|
||||
|
||||
return Rhino.Geometry.Transform.Unset;
|
||||
}
|
||||
}
|
||||
public partial class IfcLocalPlacement : IfcObjectPlacement
|
||||
{
|
||||
public override Transform Transform()
|
||||
|
|
Загрузка…
Ссылка в новой задаче