mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-11 22:31:55 +00:00
Fixes for 4.3 compilation
This commit is contained in:
@@ -258,12 +258,12 @@ class curve_segment_evaluator {
|
||||
}
|
||||
if (s == inst) {
|
||||
emit_next = true;
|
||||
} else {
|
||||
logger_.warning("GEO", 242, "IfcCurveSegment belongs to multiple IfcCompositeCurve instances. Cannot determine the next segment.");
|
||||
}
|
||||
} else {
|
||||
mapping_->logger().warning("GEO", 242, "IfcCurveSegment belongs to multiple IfcCompositeCurve instances. Cannot determine the next segment.");
|
||||
}
|
||||
} else {
|
||||
::logger::root().warning("IfcCurveSegment belongs to multiple IfcCompositeCurve instances. Cannot determine the next segment.");
|
||||
logger_.warning("IfcCurveSegment belongs to multiple IfcCompositeCurve instances. Cannot determine the next segment.");
|
||||
}
|
||||
|
||||
bool is_horizontal = false;
|
||||
@@ -283,7 +283,7 @@ class curve_segment_evaluator {
|
||||
if ((is_horizontal + is_vertical + is_cant) != 1) {
|
||||
// We have to choose the correct functor based on usage. We can't
|
||||
// support multiple, because we don't know the caller at this point.
|
||||
mapping_->logger().error("UNS", 10, std::runtime_error("multiple uses of IfcSegmentCurve not supported"), inst_);
|
||||
logger_.error("UNS", 10, std::runtime_error("multiple uses of IfcSegmentCurve not supported"), inst_);
|
||||
}
|
||||
|
||||
segment_type_ = is_horizontal ? ST_HORIZONTAL : is_vertical ? ST_VERTICAL : is_cant ? ST_CANT : ST_HORIZONTAL;
|
||||
@@ -321,7 +321,7 @@ class curve_segment_evaluator {
|
||||
end_point = segmented_reference_curve.EndPoint();
|
||||
}
|
||||
} else {
|
||||
mapping_->logger().warning("GEO", 243, "IfcCurveSegment belongs to multiple IfcCompositeCurve instances. Cannot determine the end point.");
|
||||
logger_.warning("GEO", 243, "IfcCurveSegment belongs to multiple IfcCompositeCurve instances. Cannot determine the end point.");
|
||||
}
|
||||
if (end_point) {
|
||||
next_segment_placement_ = taxonomy::cast<taxonomy::matrix4>(mapping_->map(end_point))->ccomponents();
|
||||
@@ -343,7 +343,7 @@ class curve_segment_evaluator {
|
||||
|
||||
taxonomy::ptr get_segment_curve_function() {
|
||||
if (!parent_curve_fn_ || !parent_curve_start_point_) {
|
||||
mapping_->logger().error("UNS", 11, std::runtime_error(inst_->ParentCurve()->declaration().name() + " not implemented"), inst_);
|
||||
mapping_->logger().error("UNS", 11, std::runtime_error(inst_.ParentCurve().declaration().name() + " not implemented"), inst_);
|
||||
}
|
||||
|
||||
auto length = fabs(this->length());
|
||||
@@ -860,8 +860,6 @@ class curve_segment_evaluator {
|
||||
|
||||
auto sign_l = sign(length_);
|
||||
|
||||
auto sign_l = sign(length_);
|
||||
|
||||
// center point of the parent curve
|
||||
auto pcCenterX = parent_curve_position(0, 3);
|
||||
auto pcCenterY = parent_curve_position(1, 3);
|
||||
|
||||
@@ -3,19 +3,34 @@
|
||||
add_executable(test_ifcopenshell_geometry
|
||||
test_ifcopenshell_geometry.cpp
|
||||
)
|
||||
if(NOT TARGET parse_schema_ifc2x3)
|
||||
message(FATAL_ERROR "test_ifcopenshell_geometry requires SCHEMA_VERSIONS to include 2x3.")
|
||||
list(GET SCHEMA_VERSIONS -1 IFCGEOM_TEST_SCHEMA_VERSION)
|
||||
set(IFCGEOM_TEST_SCHEMA_TARGET parse_schema_ifc${IFCGEOM_TEST_SCHEMA_VERSION})
|
||||
set(IFCGEOM_TEST_MAPPING_TARGET geometry_mapping_ifc${IFCGEOM_TEST_SCHEMA_VERSION})
|
||||
if(NOT TARGET ${IFCGEOM_TEST_SCHEMA_TARGET})
|
||||
message(FATAL_ERROR "test_ifcopenshell_geometry requires ${IFCGEOM_TEST_SCHEMA_TARGET}.")
|
||||
endif()
|
||||
if(NOT TARGET ${IFCGEOM_TEST_MAPPING_TARGET})
|
||||
message(FATAL_ERROR "test_ifcopenshell_geometry requires ${IFCGEOM_TEST_MAPPING_TARGET}.")
|
||||
endif()
|
||||
target_include_directories(test_ifcopenshell_geometry PRIVATE "${CMAKE_SOURCE_DIR}/../src")
|
||||
target_link_libraries(test_ifcopenshell_geometry PRIVATE Catch2::Catch2WithMain IfcGeom IfcParse parse_schema_ifc2x3)
|
||||
add_dependencies(test_ifcopenshell_geometry geometry_mapping_ifc2x3 geometry_kernel_passthrough)
|
||||
target_compile_definitions(test_ifcopenshell_geometry PRIVATE
|
||||
IfcSchema=Ifc${IFCGEOM_TEST_SCHEMA_VERSION}
|
||||
"IFCGEOM_TEST_SCHEMA_HEADER=\"ifcparse/schemas/Ifc${IFCGEOM_TEST_SCHEMA_VERSION}.h\""
|
||||
)
|
||||
target_link_libraries(test_ifcopenshell_geometry PRIVATE
|
||||
Catch2::Catch2WithMain
|
||||
IfcGeom
|
||||
IfcParse
|
||||
${IFCGEOM_TEST_SCHEMA_TARGET}
|
||||
)
|
||||
add_dependencies(test_ifcopenshell_geometry ${IFCGEOM_TEST_MAPPING_TARGET} geometry_kernel_passthrough)
|
||||
catch_discover_tests(test_ifcopenshell_geometry
|
||||
DL_PATHS
|
||||
$<TARGET_FILE_DIR:Catch2::Catch2>
|
||||
$<TARGET_FILE_DIR:Catch2::Catch2WithMain>
|
||||
$<TARGET_FILE_DIR:IfcGeom>
|
||||
$<TARGET_FILE_DIR:IfcParse>
|
||||
$<TARGET_FILE_DIR:parse_schema_ifc2x3>
|
||||
$<TARGET_FILE_DIR:${IFCGEOM_TEST_SCHEMA_TARGET}>
|
||||
$<TARGET_FILE_DIR:plugin>
|
||||
# Catch2 discovery uses DL_PATHS in order; CTest PATH prepends reverse it.
|
||||
$<TARGET_FILE_DIR:IfcGeom>
|
||||
|
||||
@@ -6,10 +6,9 @@
|
||||
|
||||
#include "ifcgeom/Converter.h"
|
||||
#include "ifcgeom/kernel_registry.h"
|
||||
#define IfcSchema Ifc2x3
|
||||
#include "ifcparse/hierarchy_helper.h"
|
||||
#include "ifcparse/macros.h"
|
||||
#include "ifcparse/schemas/Ifc2x3.h"
|
||||
#include IFCGEOM_TEST_SCHEMA_HEADER
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user