Refactoring

This commit is contained in:
Thomas Krijnen
2022-11-13 11:04:16 +01:00
parent 6558f68cd4
commit 3736a8b4b4
28 changed files with 849 additions and 1105 deletions
+1 -33
View File
@@ -124,38 +124,10 @@ namespace IfcGeom {
return implementation_->convert_placement(item, trsf);
}
IFC_PARSE_API static int count(const TopoDS_Shape&, TopAbs_ShapeEnum, bool unique = false);
IFC_PARSE_API static int surface_genus(const TopoDS_Shape&);
IFC_PARSE_API static bool is_manifold(const TopoDS_Shape& a);
IFC_PARSE_API static IfcUtil::IfcBaseEntity* get_decomposing_entity(IfcUtil::IfcBaseEntity*, bool include_openings = true);
IFC_PARSE_API static std::map<std::string, IfcUtil::IfcBaseEntity*> get_layers(IfcUtil::IfcBaseEntity*);
// For axis placements detect equality early in order for the
// relatively computionaly expensive gp_Trsf calculation to be skipped
IFC_PARSE_API static bool axis_equal(const gp_Ax3& a, const gp_Ax3& b, double tolerance) {
if (!a.Location().IsEqual(b.Location(), tolerance)) return false;
// Note that the tolerance below is angular, above is linear. Since architectural
// objects are about 1m'ish in scale, it should be somewhat equivalent. Besides,
// this is mostly a filter for NULL or default values in the placements.
if (!a.Direction().IsEqual(b.Direction(), tolerance)) return false;
if (!a.XDirection().IsEqual(b.XDirection(), tolerance)) return false;
if (!a.YDirection().IsEqual(b.YDirection(), tolerance)) return false;
return true;
}
IFC_PARSE_API static bool axis_equal(const gp_Ax2d& a, const gp_Ax2d& b, double tolerance) {
if (!a.Location().IsEqual(b.Location(), tolerance)) return false;
if (!a.Direction().IsEqual(b.Direction(), tolerance)) return false;
return true;
}
IFC_PARSE_API static bool is_identity(const gp_Trsf2d& t, double tolerance);
IFC_PARSE_API static bool is_identity(const gp_GTrsf2d& t, double tolerance);
IFC_PARSE_API static bool is_identity(const gp_Trsf& t, double tolerance);
IFC_PARSE_API static bool is_identity(const gp_GTrsf& t, double tolerance);
IFC_PARSE_API static gp_Trsf combine_offset_and_rotation(const gp_Vec &offset, const gp_Quaternion& rotation);
};
namespace impl {
@@ -171,10 +143,6 @@ namespace IfcGeom {
KernelFactoryImplementation& kernel_implementations();
}
namespace util {
bool is_nested_compound_of_solid(const TopoDS_Shape& s, int depth = 0);
}
class IFC_GEOM_API geometry_exception : public std::exception {
protected:
std::string message;