mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 22:39:58 +00:00
IfcCraneRailAShapeProfileDef for better or worse
This commit is contained in:
@@ -968,6 +968,49 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcCircleProfileDef* l, TopoDS_Sh
|
|||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SCHEMA_HAS_IfcCraneRailAShapeProfileDef
|
||||||
|
bool IfcGeom::Kernel::convert(const IfcSchema::IfcCraneRailAShapeProfileDef* l, TopoDS_Shape& face) {
|
||||||
|
double oh = l->OverallHeight() * getValue(GV_LENGTH_UNIT);
|
||||||
|
double bw2 = l->BaseWidth2() * getValue(GV_LENGTH_UNIT);
|
||||||
|
double hw = l->HeadWidth() * getValue(GV_LENGTH_UNIT);
|
||||||
|
double hd2 = l->HeadDepth2() * getValue(GV_LENGTH_UNIT);
|
||||||
|
double hd3 = l->HeadDepth3() * getValue(GV_LENGTH_UNIT);
|
||||||
|
double wt = l->WebThickness() * getValue(GV_LENGTH_UNIT);
|
||||||
|
double bw4 = l->BaseWidth4() * getValue(GV_LENGTH_UNIT);
|
||||||
|
double bd1 = l->BaseDepth1() * getValue(GV_LENGTH_UNIT);
|
||||||
|
double bd2 = l->BaseDepth2() * getValue(GV_LENGTH_UNIT);
|
||||||
|
double bd3 = l->BaseDepth3() * getValue(GV_LENGTH_UNIT);
|
||||||
|
|
||||||
|
gp_Trsf2d trsf2d;
|
||||||
|
bool has_position = true;
|
||||||
|
#ifdef SCHEMA_IfcParameterizedProfileDef_Position_IS_OPTIONAL
|
||||||
|
has_position = l->hasPosition();
|
||||||
|
#endif
|
||||||
|
if (has_position) {
|
||||||
|
IfcGeom::Kernel::convert(l->Position(), trsf2d);
|
||||||
|
}
|
||||||
|
|
||||||
|
double coords[28] = {
|
||||||
|
-hw / 2., +oh / 2.,
|
||||||
|
-hw / 2., +oh / 2. - hd3,
|
||||||
|
-wt / 2., +oh / 2. - hd2,
|
||||||
|
-wt / 2., -oh / 2. + bd2,
|
||||||
|
-bw4 / 2., -oh / 2. + bd3,
|
||||||
|
-bw2 / 2., -oh / 2. + bd1,
|
||||||
|
-bw2 / 2., -oh / 2.,
|
||||||
|
+bw2 / 2., -oh / 2.,
|
||||||
|
+bw2 / 2., -oh / 2. + bd1,
|
||||||
|
+bw4 / 2., -oh / 2. + bd3,
|
||||||
|
+wt / 2., -oh / 2. + bd2,
|
||||||
|
+wt / 2., +oh / 2. - hd2,
|
||||||
|
+hw / 2., +oh / 2. - hd3,
|
||||||
|
+hw / 2., +oh / 2.
|
||||||
|
};
|
||||||
|
|
||||||
|
return profile_helper(14, coords, 0, 0, 0, trsf2d, face);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
bool IfcGeom::Kernel::convert(const IfcSchema::IfcCircleHollowProfileDef* l, TopoDS_Shape& face) {
|
bool IfcGeom::Kernel::convert(const IfcSchema::IfcCircleHollowProfileDef* l, TopoDS_Shape& face) {
|
||||||
const double r = l->Radius() * getValue(GV_LENGTH_UNIT);
|
const double r = l->Radius() * getValue(GV_LENGTH_UNIT);
|
||||||
const double t = l->WallThickness() * getValue(GV_LENGTH_UNIT);
|
const double t = l->WallThickness() * getValue(GV_LENGTH_UNIT);
|
||||||
|
|||||||
@@ -121,6 +121,10 @@ FACE(IfcDerivedProfileDef);
|
|||||||
// IfcAdvancedFace included in case of IFC4
|
// IfcAdvancedFace included in case of IFC4
|
||||||
FACE(IfcFace);
|
FACE(IfcFace);
|
||||||
|
|
||||||
|
#ifdef SCHEMA_HAS_IfcCraneRailAShapeProfileDef
|
||||||
|
FACE(IfcCraneRailAShapeProfileDef);
|
||||||
|
#endif
|
||||||
|
|
||||||
WIRE(IfcEdgeCurve);
|
WIRE(IfcEdgeCurve);
|
||||||
WIRE(IfcSubedge);
|
WIRE(IfcSubedge);
|
||||||
WIRE(IfcOrientedEdge);
|
WIRE(IfcOrientedEdge);
|
||||||
|
|||||||
Reference in New Issue
Block a user