mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-17 10:59:17 +00:00
Work towards v1.0 data model with encapsulated weak_ptr as basis for instances
This commit is contained in:
@@ -23,16 +23,16 @@ using namespace ifcopenshell::geometry;
|
||||
|
||||
#include "../profile_helper.h"
|
||||
|
||||
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcUShapeProfileDef* inst) {
|
||||
const bool doEdgeFillet = !!inst->EdgeRadius();
|
||||
const bool doFillet = !!inst->FilletRadius();
|
||||
const bool hasSlope = !!inst->FlangeSlope();
|
||||
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcUShapeProfileDef& inst) {
|
||||
const bool doEdgeFillet = !!inst.EdgeRadius();
|
||||
const bool doFillet = !!inst.FilletRadius();
|
||||
const bool hasSlope = !!inst.FlangeSlope();
|
||||
|
||||
const double y = inst->Depth() / 2.0f * length_unit_;
|
||||
const double x = inst->FlangeWidth() / 2.0f * length_unit_;
|
||||
const double d1 = inst->WebThickness() * length_unit_;
|
||||
const double d2 = inst->FlangeThickness() * length_unit_;
|
||||
const double slope = inst->FlangeSlope().get_value_or(0.) * angle_unit_;
|
||||
const double y = inst.Depth() / 2.0f * length_unit_;
|
||||
const double x = inst.FlangeWidth() / 2.0f * length_unit_;
|
||||
const double d1 = inst.WebThickness() * length_unit_;
|
||||
const double d2 = inst.FlangeThickness() * length_unit_;
|
||||
const double slope = inst.FlangeSlope().value_or(0.) * angle_unit_;
|
||||
|
||||
double dy1 = 0.0f;
|
||||
double dy2 = 0.0f;
|
||||
@@ -40,10 +40,10 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcUShapeProfileDef* inst) {
|
||||
double f2 = 0.0f;
|
||||
|
||||
if (doFillet) {
|
||||
f1 = *inst->FilletRadius() * length_unit_;
|
||||
f1 = *inst.FilletRadius() * length_unit_;
|
||||
}
|
||||
if (doEdgeFillet) {
|
||||
f2 = *inst->EdgeRadius() * length_unit_;
|
||||
f2 = *inst.EdgeRadius() * length_unit_;
|
||||
}
|
||||
|
||||
if (hasSlope) {
|
||||
@@ -61,10 +61,10 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcUShapeProfileDef* inst) {
|
||||
taxonomy::matrix4::ptr m4;
|
||||
bool has_position = true;
|
||||
#ifdef SCHEMA_IfcParameterizedProfileDef_Position_IS_OPTIONAL
|
||||
has_position = !!inst->Position();
|
||||
has_position = !!inst.Position();
|
||||
#endif
|
||||
if (has_position) {
|
||||
m4 = taxonomy::cast<taxonomy::matrix4>(map(inst->Position()));
|
||||
m4 = taxonomy::cast<taxonomy::matrix4>(map(inst.Position()));
|
||||
}
|
||||
|
||||
return profile_helper(m4, {
|
||||
|
||||
Reference in New Issue
Block a user