Last minute refactoring

This commit is contained in:
Thomas Krijnen
2026-08-08 07:42:45 +02:00
parent 8870ffb018
commit af58eaf79f
300 changed files with 5230 additions and 5150 deletions
@@ -21,7 +21,7 @@
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcAnnotationFillArea& inst) {
auto loop = taxonomy::cast<taxonomy::loop>(map(inst.OuterBoundary()));
@@ -21,7 +21,7 @@
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcArbitraryClosedProfileDef& inst) {
auto loop = taxonomy::cast<taxonomy::loop>(map(inst.OuterCurve()));
@@ -21,7 +21,7 @@
#define _USE_MATH_DEFINES
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcArbitraryOpenProfileDef& inst) {
auto mapped = map(inst.Curve());
@@ -20,7 +20,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#include "../profile_helper.h"
+1 -1
View File
@@ -20,7 +20,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcAxis1Placement& inst) {
Eigen::Vector3d P(0, 0, 0), axis(0, 0, 1), ref;
+1 -1
View File
@@ -21,7 +21,7 @@
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcAxis2Placement2D& inst) {
Eigen::Vector3d P(0, 0, 0), axis(0, 0, 1), V(1, 0, 0);
+1 -1
View File
@@ -21,7 +21,7 @@
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcAxis2Placement3D& inst) {
Eigen::Vector3d o(0, 0, 0), axis(0, 0, 1), refDirection, X(1, 0, 0);
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#if defined SCHEMA_HAS_IfcAxis2PlacementLinear
@@ -22,7 +22,7 @@
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#ifdef SCHEMA_HAS_IfcBSplineCurveWithKnots
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcBSplineCurveWithKnots& inst) {
@@ -43,4 +43,4 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcBSplineCurveWithKnots& inst)
return bc;
}
#endif
#endif
@@ -21,7 +21,7 @@
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#ifdef SCHEMA_HAS_IfcBSplineSurfaceWithKnots
+1 -1
View File
@@ -20,7 +20,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcBlock& inst) {
const double dx = inst.XLength() * length_unit_;
+1 -1
View File
@@ -21,7 +21,7 @@
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
namespace {
taxonomy::boolean_result::operation_t boolean_op_type(IfcSchema::IfcBooleanOperator::Value op) {
+1 -1
View File
@@ -20,7 +20,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcBoundingBox& inst) {
if (!settings_.get<settings::KeepBoundingBoxes>().get()) {
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#include "../profile_helper.h"
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcCartesianPoint& inst) {
std::vector<double> xyz = inst.Coordinates();
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcCartesianTransformationOperator2D& inst) {
auto m = taxonomy::make<taxonomy::matrix4>();
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcCartesianTransformationOperator3D& inst) {
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcCenterLineProfileDef& inst) {
return nullptr;
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcCircle& inst) {
const double r = inst.Radius() * length_unit_;
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#include <boost/math/constants/constants.hpp>
+4 -4
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcCompositeCurve& inst) {
auto loop = taxonomy::make<taxonomy::loop>();
@@ -95,7 +95,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcCompositeCurve& inst) {
}
if (spans.empty()) {
std::vector<express::Entity> profile = inst.file()->get_inverse(inst.id(), &IfcSchema::IfcProfileDef::Class(), -1);
std::vector<express::entity> profile = inst.file()->get_inverse(inst.id(), &IfcSchema::IfcProfileDef::Class(), -1);
const bool force_close = !profile.empty();
loop->closed = force_close;
loop->instance = inst;
@@ -182,7 +182,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcCompositeCurve* l, TopoDS_Wi
TopTools_ListIteratorOfListOfShape it(converted_segments);
std::vector<express::Base> profile = inst.data().get_inverse(&IfcSchema::IfcProfileDef::Class(), -1);
std::vector<express::base> profile = inst.data().get_inverse(&IfcSchema::IfcProfileDef::Class(), -1);
const bool force_close = profile && profile->size() > 0;
util::wire_builder bld(getValue(GV_PRECISION), l);
@@ -192,4 +192,4 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcCompositeCurve* l, TopoDS_Wi
return true;
}
*/
*/
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcCompositeProfileDef& inst) {
// @todo double check that this is actually supported
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcConnectedFaceSet& inst) {
auto shell = map_to_collection<taxonomy::shell>(this, inst.CfsFaces());
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#include "../profile_helper.h"
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcCsgSolid& inst) {
return map(inst.TreeRootExpression());
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcCurveBoundedPlane& inst) {
taxonomy::plane::ptr pl = taxonomy::cast<taxonomy::plane>(map(inst.BasisSurface()));
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#ifdef SCHEMA_HAS_IfcCurveSegment
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#ifdef SCHEMA_HAS_IfcCylindricalSurface
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcDerivedProfileDef& inst) {
auto it = map(inst.ParentProfile());
+2 -2
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcDirection& inst) {
auto coords = inst.DirectionRatios();
@@ -28,4 +28,4 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcDirection& inst) {
coords.size() >= 2 ? coords[1] : 0.,
coords.size() >= 3 ? coords[2] : 0.
);
}
}
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcEdge& inst) {
auto v1 = inst.EdgeStart().as<IfcSchema::IfcVertexPoint>();
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcEdgeLoop& inst) {
return map_to_collection<taxonomy::loop>(this, inst.EdgeList());
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcEllipse& inst) {
double x = inst.SemiAxis1() * length_unit_;
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcEllipseProfileDef& inst) {
double rx = inst.SemiAxis1() * length_unit_;
+1 -1
View File
@@ -22,7 +22,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcExtrudedAreaSolid& inst) {
const double height = inst.Depth() * length_unit_;
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#ifdef SCHEMA_HAS_IfcExtrudedAreaSolidTapered
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcFace& inst) {
auto face = taxonomy::make<taxonomy::face>();
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcFaceBasedSurfaceModel& inst) {
// @todo check styles?
@@ -20,7 +20,7 @@
#include "../function_item_evaluator.h"
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#ifdef SCHEMA_HAS_IfcFixedReferenceSweptAreaSolid
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcGeometricSet& inst) {
return map_to_collection(this, inst.Elements());
+2 -2
View File
@@ -20,7 +20,7 @@
#include "mapping.h"
#include "../function_item_evaluator.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#ifdef SCHEMA_HAS_IfcGradientCurve
@@ -80,4 +80,4 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcGradientCurve& inst) {
return gradient_function;
}
#endif
#endif
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcHalfSpaceSolid& inst) {
auto surface = inst.BaseSurface();
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#include "../profile_helper.h"
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#ifdef SCHEMA_HAS_IfcIndexedPolyCurve
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#include "../profile_helper.h"
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcLine& inst) {
// @todo test with trimmed curve on non-normalized direction
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcManifoldSolidBrep& inst) {
std::vector<IfcSchema::IfcClosedShell> voids;
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcMappedItem& inst) {
auto transform = inst.MappingTarget();
+4 -4
View File
@@ -19,14 +19,14 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#include <deque>
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcObjectPlacement& inst) {
if (placement_rel_to_type_ || placement_rel_to_instance_) {
using QueueItem = std::pair<IfcSchema::IfcObjectPlacement, int>;
std::deque<QueueItem> q = {{inst, 0}};
using queue_item = std::pair<IfcSchema::IfcObjectPlacement, int>;
std::deque<queue_item> q = {{inst, 0}};
while (!q.empty()) {
auto [placement, depth] = q.front();
q.pop_front();
@@ -59,7 +59,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcObjectPlacement& inst) {
}
IfcSchema::IfcObjectPlacement relative_to;
express::Base transform;
express::base transform;
IfcSchema::IfcAxis2Placement3D fallback;
@@ -21,7 +21,7 @@
#include "../profile_helper.h"
#include "../function_item_evaluator.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
// ifc4x1
//#define SCHEMA_IfcOffsetCurveByDistances_HAS_OffsetValues
@@ -186,4 +186,4 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcOffsetCurveByDistances& inst
return fn;
}
#endif
#endif
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#include "../../ifcgeom/profile_helper.h"
#include "../../ifcgeom/infra_sweep_helper.h"
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcOrientedEdge& inst) {
auto e = taxonomy::cast<taxonomy::edge>(map(inst.EdgeElement()));
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcPlane& inst) {
auto p = taxonomy::make<taxonomy::plane>();
@@ -22,7 +22,7 @@
#include "../function_item_evaluator.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#if defined SCHEMA_HAS_IfcPointByDistanceExpression
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#include "../profile_helper.h"
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcPolygonalBoundedHalfSpace& inst) {
auto s = taxonomy::cast<taxonomy::solid>(map_impl((IfcSchema::IfcHalfSpaceSolid&) inst));
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#ifdef SCHEMA_HAS_IfcPolygonalFaceSet
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#include "../profile_helper.h"
+2 -4
View File
@@ -1,8 +1,6 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace IfcGeom;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcProduct& inst) {
// @todo decide on this, what happens in the product mapping?
@@ -54,7 +52,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcProduct& inst) {
ci.setIdentity();
}
std::vector<express::Base> operands(new aggregate_of_instance);
std::vector<express::base> operands(new aggregate_of_instance);
operands->push(body);
operands->push(openings);
auto n = map_to_collection<taxonomy::boolean_result>(this, operands);
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#include "../profile_helper.h"
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#include "../profile_helper.h"
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#include "../profile_helper.h"
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcRectangularTrimmedSurface& inst) {
// @todo we'll need to add support for p-curves at some point, but not now.
@@ -31,7 +31,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcRectangularTrimmedSurface& i
return false;
}
gp_Pln pln;
IfcGeom::Kernel::convert((IfcSchema::IfcPlane*) inst.BasisSurface(), pln);
ifcopenshell::geom::Kernel::convert((IfcSchema::IfcPlane*) inst.BasisSurface(), pln);
BRepBuilderAPI_MakeFace mf(pln, inst.U1(), inst.U2(), inst.V1(), inst.V2());
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcRepresentation& inst) {
auto items_to_include = this->settings_.get<settings::OutputDimensionality>().get();
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#include <boost/math/constants/constants.hpp>
+2 -2
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcRightCircularCone& inst) {
// @todo
@@ -30,7 +30,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcRightCircularCone& inst) {
BRepPrimAPI_MakeCone builder(r, 0., h);
gp_Trsf trsf;
IfcGeom::Kernel::convert(inst.Position(),trsf);
ifcopenshell::geom::Kernel::convert(inst.Position(),trsf);
// IfcCsgPrimitive3D.Position has unit scale factor
shape = builder.Solid().Moved(trsf);
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcRightCircularCylinder& inst) {
// @todo
@@ -31,7 +31,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcRightCircularCylinder& inst)
BRepPrimAPI_MakeCylinder builder(r, h);
gp_Trsf trsf;
IfcGeom::Kernel::convert(inst.Position(),trsf);
ifcopenshell::geom::Kernel::convert(inst.Position(),trsf);
// IfcCsgPrimitive3D.Position has unit scale factor
shape = builder.Solid().Moved(trsf);
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#include "../profile_helper.h"
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#include "../../ifcgeom/profile_helper.h"
#include "../../ifcgeom/infra_sweep_helper.h"
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#include "../../ifcgeom/profile_helper.h"
#include "../../ifcgeom/infra_sweep_helper.h"
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#include "../function_item_evaluator.h"
@@ -73,4 +73,4 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSegmentedReferenceCurve& ins
return cant_function;
}
#endif
#endif
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcShellBasedSurfaceModel& inst) {
return map_to_collection(this, inst.SbsmBoundary());
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSphere& inst) {
auto sol = taxonomy::make<taxonomy::solid>();
+2 -2
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#ifdef SCHEMA_HAS_IfcSphericalSurface
@@ -28,7 +28,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSphericalSurface& inst) {
/*
gp_Trsf trsf;
IfcGeom::Kernel::convert(inst.Position(), trsf);
ifcopenshell::geom::Kernel::convert(inst.Position(), trsf);
// IfcElementarySurface.Position has unit scale factor
face = BRepBuilderAPI_MakeFace(new Geom_SphericalSurface(gp::XOY(), inst.Radius() * length_unit_), getValue(GV_PRECISION)).Face().Moved(trsf);
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
/*
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSubedge& inst) {
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#ifdef SCHEMA_HAS_IfcSurfaceCurve
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSurfaceCurve& inst) {
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSurfaceCurveSweptAreaSolid& inst) {
taxonomy::face::ptr f = taxonomy::cast<taxonomy::face>(map(inst.SweptArea()));
@@ -65,7 +65,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSurfaceCurveSweptAreaSolid&
bool directrix_on_plane = is_plane;
if (is_plane) {
IfcGeom::Kernel::convert((IfcSchema::IfcPlane*) inst.ReferenceSurface(), pln);
ifcopenshell::geom::Kernel::convert((IfcSchema::IfcPlane*) inst.ReferenceSurface(), pln);
// As per Informal propositions 2: The Directrix shall lie on the ReferenceSurface.
// This is not always the case with the test files in the repository. I am not sure
@@ -91,7 +91,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSurfaceCurveSweptAreaSolid&
crv->D1(u0, directrix_origin, directrix_tangent);
}
if (is_plane && pln.Axis().Direction().IsNormal(directrix_tangent, Precision::Approximation()) && directrix_on_plane) {
if (is_plane && pln.Axis().Direction().IsNormal(directrix_tangent, ::Precision::Approximation()) && directrix_on_plane) {
directrix.SetTransformation(gp_Ax3(directrix_origin, directrix_tangent, pln.Axis().Direction()), gp::XOY());
} else if (!is_plane) {
ShapeAnalysis_Surface sas(BRep_Tool::Surface(surface_face));
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSurfaceOfLinearExtrusion& inst) {
taxonomy::matrix4::ptr matrix;
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSurfaceOfRevolution& inst) {
taxonomy::matrix4::ptr matrix;
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#include "../profile_helper.h"
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#include "../profile_helper.h"
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#ifdef SCHEMA_HAS_IfcToroidalSurface
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#include "../profile_helper.h"
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#ifdef SCHEMA_HAS_IfcTriangulatedFaceSet
@@ -85,4 +85,4 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcTriangulatedFaceSet& inst) {
return shell;
}
#endif
#endif
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#include <boost/math/constants/constants.hpp>
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#include "../profile_helper.h"
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcVector& inst) {
auto d = taxonomy::cast<taxonomy::direction3>(map(inst.Orientation()));
+1 -1
View File
@@ -19,7 +19,7 @@
#include "mapping.h"
#define mapping POSTFIX_SCHEMA(mapping)
using namespace ifcopenshell::geometry;
using namespace ifcopenshell::geom;
#include "../profile_helper.h"
+1 -1
View File
@@ -2,6 +2,6 @@
#undef BIND
#endif
#define BIND(T) ifcopenshell::geometry::taxonomy::ptr map_impl(const IfcSchema::T&);
#define BIND(T) ifcopenshell::geom::taxonomy::ptr map_impl(const IfcSchema::T&);
#include "mapping.i"
+34 -35
View File
@@ -36,19 +36,18 @@
#include <boost/spirit/home/x3.hpp>
using namespace ifcopenshell;
using namespace ifcopenshell::geometry;
using namespace IfcGeom;
using namespace ifcopenshell::geom;
namespace {
struct POSTFIX_SCHEMA(factory_t) {
abstract_mapping* operator()(ifcopenshell::file* file, Settings& settings, ::logger& logger) const {
ifcopenshell::geometry::POSTFIX_SCHEMA(mapping)* m = new ifcopenshell::geometry::POSTFIX_SCHEMA(mapping)(file, settings, logger);
abstract_mapping* operator()(ifcopenshell::file* file, ifcopenshell::geom::settings& settings, ::logger& logger) const {
ifcopenshell::geom::POSTFIX_SCHEMA(mapping)* m = new ifcopenshell::geom::POSTFIX_SCHEMA(mapping)(file, settings, logger);
return m;
}
};
}
void MAKE_INIT_FN(MappingImplementation)(ifcopenshell::geometry::impl::mapping_registry* mapping) {
void MAKE_INIT_FN(MappingImplementation)(ifcopenshell::geom::impl::mapping_registry* mapping) {
static const std::string schema_name = STRINGIFY(IfcSchema);
POSTFIX_SCHEMA(factory_t) factory;
mapping->bind(schema_name, factory);
@@ -132,7 +131,7 @@ std::vector<IfcSchema::IfcProduct> filter_products(const std::vector<IfcSchema::
bool mapping::reuse_ok_(const std::vector<IfcSchema::IfcProduct>& products) {
// With world coords enabled, object transformations are directly applied to
// the BRep. There is no way to re-use the geometry for multiple products.
// the brep. There is no way to re-use the geometry for multiple products.
if (settings_.get<settings::UseWorldCoords>().get()) {
return false;
}
@@ -141,7 +140,7 @@ bool mapping::reuse_ok_(const std::vector<IfcSchema::IfcProduct>& products) {
return true;
}
std::set<std::optional<express::Base>> associated_single_materials;
std::set<std::optional<express::base>> associated_single_materials;
for (auto& product : products) {
if (!settings_.get<settings::DisableOpeningSubtractions>().get() && !find_openings(product).empty()) {
@@ -161,15 +160,15 @@ bool mapping::reuse_ok_(const std::vector<IfcSchema::IfcProduct>& products) {
}
auto mat = get_single_material_association(product);
associated_single_materials.insert(mat ? std::optional<express::Base>{mat} : std::nullopt);
associated_single_materials.insert(mat ? std::optional<express::base>{mat} : std::nullopt);
if (associated_single_materials.size() > 1) return false;
}
return associated_single_materials.size() == 1;
}
std::vector<express::Base> mapping::find_openings(const express::Base& inst) {
std::vector<express::Base> openings;
std::vector<express::base> mapping::find_openings(const express::base& inst) {
std::vector<express::base> openings;
if (auto rep = inst.as<IfcSchema::IfcRepresentation>()) {
// @todo this is essentially only for hybrid kernel trying to guess
@@ -328,7 +327,7 @@ void mapping::get_representations(std::vector<geometry_conversion_task>& tasks,
}
}
const express::Base mapping::get_product_type(const express::Base& product_) {
const express::base mapping::get_product_type(const express::base& product_) {
auto product = product_.as<IfcSchema::IfcProduct>();
#ifdef SCHEMA_IfcObject_HAS_IsTypedBy
auto rels = product.IsTypedBy();
@@ -350,10 +349,10 @@ const express::Base mapping::get_product_type(const express::Base& product_) {
}
return rel.RelatingType();
}
return express::Base{};
return express::base{};
}
const express::Base mapping::get_single_material_association(const express::Base& product_) {
const express::base mapping::get_single_material_association(const express::base& product_) {
auto product = product_.as<IfcSchema::IfcObjectDefinition>();
IfcSchema::IfcMaterial single_material;
auto associations = product.HasAssociations();
@@ -364,7 +363,7 @@ const express::Base mapping::get_single_material_association(const express::Base
}
}
if (associated_materials.size() == 1) {
express::Base associated_material;
express::base associated_material;
try {
associated_material = associated_materials.front().RelatingMaterial().concrete();
@@ -383,7 +382,7 @@ const express::Base mapping::get_single_material_association(const express::Base
if (auto m = associated_material.as<IfcSchema::IfcMaterialLayerSetUsage>()) {
if (m.get("ForLayerSet").isNull()) {
logger_.warning("GEO", 302, "Missing ForLayerSet for:", m);
return express::Base{};
return express::base{};
}
layerset = m.ForLayerSet();
} else {
@@ -403,7 +402,7 @@ const express::Base mapping::get_single_material_association(const express::Base
if (auto m = associated_material.as<IfcSchema::IfcMaterialProfileSetUsage>()) {
if (m.get("ForProfileSet").isNull()) {
logger_.warning("GEO", 303, "Missing ForProfileSet for:", m);
return express::Base{};
return express::base{};
}
profileset = m.ForProfileSet();
} else {
@@ -642,7 +641,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcMaterial& material) {
*/
// @todo
// IfcGeom::SurfaceStyle material_style = IfcGeom::SurfaceStyle(material->data().id(), material->Name());
// ifcopenshell::geom::SurfaceStyle material_style = ifcopenshell::geom::SurfaceStyle(material->data().id(), material->Name());
// return &(style_cache[material->data().id()] = material_style);
}
@@ -746,7 +745,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSurfaceStyle& style) {
return surface_style;
}
taxonomy::ptr mapping::map(const express::Base& inst) {
taxonomy::ptr mapping::map(const express::base& inst) {
if (!inst) {
logger_.error("GEO", 306, "Warning nullptr passed to map() function");
return nullptr;
@@ -781,7 +780,7 @@ taxonomy::ptr mapping::map(const express::Base& inst) {
}
namespace {
express::Base get_RelatingObject(IfcSchema::IfcRelDecomposes& decompose) {
express::base get_RelatingObject(IfcSchema::IfcRelDecomposes& decompose) {
#ifdef SCHEMA_IfcRelDecomposes_HAS_RelatingObject
return decompose.RelatingObject();
#else
@@ -789,12 +788,12 @@ namespace {
if (aggr) {
return aggr.RelatingObject();
}
return express::Base{};
return express::base{};
#endif
}
}
express::Base mapping::get_decomposing_entity(const express::Base& inst, bool include_openings) {
express::base mapping::get_decomposing_entity(const express::base& inst, bool include_openings) {
IfcSchema::IfcObjectDefinition parent;
auto product = inst.as<IfcSchema::IfcProduct>();
@@ -833,12 +832,12 @@ express::Base mapping::get_decomposing_entity(const express::Base& inst, bool in
/* Parent decompositions to the RelatingObject */
if (!parent) {
std::vector<express::Entity> parents = product.file()->get_inverse(product.id(), (&IfcSchema::IfcRelAggregates::Class()), -1);
std::vector<express::entity> parents = product.file()->get_inverse(product.id(), (&IfcSchema::IfcRelAggregates::Class()), -1);
auto nests = product.file()->get_inverse(product.id(), (&IfcSchema::IfcRelNests::Class()), -1);
parents.insert(parents.end(), nests.begin(), nests.end());
for (auto it = parents.begin(); it != parents.end(); ++it) {
IfcSchema::IfcRelDecomposes decompose = (*it).as<IfcSchema::IfcRelDecomposes>();
express::Base ifc_objectdef;
express::base ifc_objectdef;
ifc_objectdef = get_RelatingObject(decompose);
@@ -849,11 +848,11 @@ express::Base mapping::get_decomposing_entity(const express::Base& inst, bool in
return parent;
}
std::map<std::string, express::Base> mapping::get_layers(const express::Base& inst) {
std::map<std::string, express::base> mapping::get_layers(const express::base& inst) {
auto prod = inst.as<IfcSchema::IfcProduct>();
std::map<std::string, express::Base> layers;
std::map<std::string, express::base> layers;
if (prod.Representation()) {
std::vector<express::Base> representations = ifcopenshell::traverse(prod.Representation());
std::vector<express::base> representations = ifcopenshell::traverse(prod.Representation());
for (auto& inst : representations) {
if (auto repr = inst.as<IfcSchema::IfcRepresentation>()) {
std::vector<IfcSchema::IfcPresentationLayerAssignment> a = repr.LayerAssignments();
@@ -948,8 +947,8 @@ void mapping::initialize_units_() {
}
// Translation is applied first, then rotation.
if (settings_.get<ModelOffset>().has()) {
auto vs = settings_.get<ModelOffset>().get();
if (settings_.get<settings::ModelOffset>().has()) {
auto vs = settings_.get<settings::ModelOffset>().get();
if (vs.size() == 3) {
offset_and_rotation_ *= Eigen::Affine3d(Eigen::Translation3d(vs[0], vs[1], vs[2])).matrix();
} else {
@@ -957,8 +956,8 @@ void mapping::initialize_units_() {
}
}
if (settings_.get<ModelRotation>().has()) {
auto vs = settings_.get<ModelRotation>().get();
if (settings_.get<settings::ModelRotation>().has()) {
auto vs = settings_.get<settings::ModelRotation>().get();
if (vs.size() == 4) {
// @nb W, X, Y, Z
auto m3 = Eigen::Quaterniond(vs[3], vs[0], vs[1], vs[2]).normalized().matrix();
@@ -1020,10 +1019,10 @@ void mapping::initialize_settings() {
}
}
settings_.get<Precision>().value = precision_to_set;
settings_.get<settings::Precision>().value = precision_to_set;
}
bool mapping::get_layerset_information(const express::Base& p, layerset_information& info, int &)
bool mapping::get_layerset_information(const express::base& p, layerset_information& info, int &)
{
auto product = p.as<IfcSchema::IfcProduct>();
@@ -1215,7 +1214,7 @@ bool mapping::get_layerset_information(const express::Base& p, layerset_informat
return true;
}
bool mapping::get_wall_neighbours(const express::Base&, std::vector<endpoint_connection>&) {
bool mapping::get_wall_neighbours(const express::base&, std::vector<endpoint_connection>&) {
return false;
}
@@ -1555,7 +1554,7 @@ void mapping::ensureRepresentationContextCache_() {
representation_context_cache_valid_ = true;
}
express::Base mapping::representation_of(const express::Base& product) {
express::base mapping::representation_of(const express::base& product) {
std::vector<IfcSchema::IfcRepresentation> of_product;
std::vector<IfcSchema::IfcRepresentation> intersection;
std::vector<IfcSchema::IfcRepresentation> intersection_no_box;
@@ -1595,7 +1594,7 @@ express::Base mapping::representation_of(const express::Base& product) {
}
if (intersection.size() == 0) {
return express::Base{};
return express::base{};
} else {
for (auto& r : intersection) {
auto resources = ifcopenshell::traverse(r);
+15 -15
View File
@@ -15,7 +15,7 @@
namespace ifcopenshell {
namespace geometry {
namespace geom {
class POSTFIX_SCHEMA(mapping) : public abstract_mapping {
private:
@@ -23,11 +23,11 @@ namespace geometry {
double length_unit_, angle_unit_;
std::string length_unit_name_;
std::map<uint32_t, ifcopenshell::geometry::taxonomy::ptr> cache_;
std::map<uint32_t, ifcopenshell::geom::taxonomy::ptr> cache_;
std::mutex cache_guard_; // provides mutually exclusive access to cache_
const ifcopenshell::declaration* placement_rel_to_type_;
const express::Base placement_rel_to_instance_;
const express::base placement_rel_to_instance_;
Eigen::Matrix4d offset_and_rotation_ = Eigen::Matrix4d::Identity();
@@ -39,7 +39,7 @@ namespace geometry {
// Set of instances to mark failures that are intended, such as representations not
// resulting in any items due to dimensionality filters.
std::set<express::Base> failed_on_purpose_;
std::set<express::base> failed_on_purpose_;
std::set<IfcSchema::IfcRepresentationMap> not_reusable_maps_;
std::unordered_set<uint32_t> representation_context_cache_;
std::vector<uint32_t> representation_context_priority_cache_;
@@ -52,7 +52,7 @@ namespace geometry {
std::mutex representation_context_cache_guard_;
template <typename T>
void process_mapping(bool& matched, taxonomy::ptr& item, const express::Base& inst) {
void process_mapping(bool& matched, taxonomy::ptr& item, const express::base& inst) {
if (!item && inst.as<T>()) {
matched = true;
try {
@@ -87,27 +87,27 @@ namespace geometry {
}
IfcSchema::IfcStyledItem find_style(const IfcSchema::IfcRepresentationItem&);
public:
POSTFIX_SCHEMA(mapping)(ifcopenshell::file* file, Settings& settings, ::logger& logger = ::logger::root()) : abstract_mapping(settings, logger), file_(file), placement_rel_to_type_(nullptr) {
POSTFIX_SCHEMA(mapping)(ifcopenshell::file* file, ifcopenshell::geom::settings& settings, ::logger& logger = ::logger::root()) : abstract_mapping(settings, logger), file_(file), placement_rel_to_type_(nullptr) {
initialize_units_();
}
virtual ifcopenshell::geometry::taxonomy::ptr map(const express::Base&);
virtual ifcopenshell::geom::taxonomy::ptr map(const express::base&);
virtual void get_representations(std::vector<geometry_conversion_task>& tasks, std::vector<filter_t>& filters);
virtual std::map<std::string, express::Base> get_layers(const express::Base&);
virtual std::map<std::string, express::base> get_layers(const express::base&);
virtual void initialize_settings();
virtual double get_length_unit() const { return length_unit_; }
virtual const std::string& get_length_unit_name() const { return length_unit_name_; }
virtual std::vector<express::Base> find_openings(const express::Base&);
virtual express::Base representation_of(const express::Base& product);
virtual std::vector<express::base> find_openings(const express::base&);
virtual express::base representation_of(const express::base& product);
virtual const express::Base get_product_type(const express::Base& product_);
virtual const express::Base get_single_material_association(const express::Base& product);
virtual const express::base get_product_type(const express::base& product_);
virtual const express::base get_single_material_association(const express::base& product);
IfcSchema::IfcRepresentation representation_mapped_to(const IfcSchema::IfcRepresentation& representation);
std::vector<IfcSchema::IfcProduct> products_represented_by(const IfcSchema::IfcRepresentation& representation, IfcSchema::IfcRepresentationMap& rmap, bool only_direct = false);
bool reuse_ok_(const std::vector<IfcSchema::IfcProduct>& products);
express::Base get_decomposing_entity(const express::Base& product, bool include_openings);
express::base get_decomposing_entity(const express::base& product, bool include_openings);
bool get_layerset_information(const express::Base&, layerset_information&, int&);
bool get_wall_neighbours(const express::Base&, std::vector<endpoint_connection>&);
bool get_layerset_information(const express::base&, layerset_information&, int&);
bool get_wall_neighbours(const express::base&, std::vector<endpoint_connection>&);
IfcSchema::IfcRepresentation find_representation(const IfcSchema::IfcProduct&, const std::string&);
#include "bind_convert_decl.i"
+5 -5
View File
@@ -23,13 +23,13 @@
#include <boost/dll/alias.hpp>
namespace ifcopenshell {
namespace geometry {
namespace geom {
namespace impl {
namespace mapping_plugin {
namespace {
struct POSTFIX_SCHEMA(factory_t) {
abstract_mapping* operator()(ifcopenshell::file* file, Settings& settings, ::logger& logger) const {
abstract_mapping* operator()(ifcopenshell::file* file, ifcopenshell::geom::settings& settings, ::logger& logger) const {
return new POSTFIX_SCHEMA(mapping)(file, settings, logger);
}
};
@@ -53,6 +53,6 @@ namespace ifcopenshell {
}
}
BOOST_DLL_ALIAS(ifcopenshell::geometry::impl::mapping_plugin::plugin_abi, ifcopenshell_plugin_abi_v1)
BOOST_DLL_ALIAS(ifcopenshell::geometry::impl::mapping_plugin::plugin_metadata, ifcopenshell_plugin_metadata_v1)
BOOST_DLL_ALIAS(ifcopenshell::geometry::impl::mapping_plugin::register_plugin, ifcopenshell_register_mapping_plugin_v1)
BOOST_DLL_ALIAS(ifcopenshell::geom::impl::mapping_plugin::plugin_abi, ifcopenshell_plugin_abi_v1)
BOOST_DLL_ALIAS(ifcopenshell::geom::impl::mapping_plugin::plugin_metadata, ifcopenshell_plugin_metadata_v1)
BOOST_DLL_ALIAS(ifcopenshell::geom::impl::mapping_plugin::register_plugin, ifcopenshell_register_mapping_plugin_v1)