mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-30 03:59:55 +00:00
This commit is contained in:
@@ -306,6 +306,14 @@ namespace ifcopenshell {
|
|||||||
static constexpr int defaultvalue = 16;
|
static constexpr int defaultvalue = 16;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct KeepBoundingBoxes : public SettingBase<KeepBoundingBoxes, bool> {
|
||||||
|
static constexpr const char* const name = "keep-bounding-boxes";
|
||||||
|
static constexpr const char* const description =
|
||||||
|
"Default is to removes IfcBoundingBox from model prior to converting geometry."
|
||||||
|
"Setting this option disables that behaviour";
|
||||||
|
static constexpr bool defaultvalue = false;
|
||||||
|
};
|
||||||
|
|
||||||
enum PiecewiseStepMethod {
|
enum PiecewiseStepMethod {
|
||||||
MAXSTEPSIZE,
|
MAXSTEPSIZE,
|
||||||
MINSTEPS };
|
MINSTEPS };
|
||||||
@@ -408,7 +416,7 @@ namespace ifcopenshell {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class IFC_GEOM_API Settings : public SettingsContainer<
|
class IFC_GEOM_API Settings : public SettingsContainer<
|
||||||
std::tuple<MesherLinearDeflection, MesherAngularDeflection, ReorientShells, LengthUnit, PlaneUnit, Precision, IncludeCurves, IncludeSurfaces, LayersetFirst, DisableBooleanResult, NoWireIntersectionCheck, NoWireIntersectionTolerance, PrecisionFactor, DebugBooleanOperations, BooleanAttempt2d, WeldVertices, UseWorldCoords, ConvertBackUnits, ContextIds, IteratorOutput, DisableOpeningSubtractions, ApplyDefaultMaterials, DontEmitNormals, GenerateUvs, ApplyLayerSets, UseElementHierarchy, ValidateQuantities, EdgeArrows, BuildingLocalPlacement, SiteLocalPlacement, ForceSpaceTransparency, CircleSegments, PiecewiseStepType, PiecewiseStepParam>
|
std::tuple<MesherLinearDeflection, MesherAngularDeflection, ReorientShells, LengthUnit, PlaneUnit, Precision, IncludeCurves, IncludeSurfaces, LayersetFirst, DisableBooleanResult, NoWireIntersectionCheck, NoWireIntersectionTolerance, PrecisionFactor, DebugBooleanOperations, BooleanAttempt2d, WeldVertices, UseWorldCoords, ConvertBackUnits, ContextIds, IteratorOutput, DisableOpeningSubtractions, ApplyDefaultMaterials, DontEmitNormals, GenerateUvs, ApplyLayerSets, UseElementHierarchy, ValidateQuantities, EdgeArrows, BuildingLocalPlacement, SiteLocalPlacement, ForceSpaceTransparency, CircleSegments, KeepBoundingBoxes, PiecewiseStepType, PiecewiseStepParam>
|
||||||
>
|
>
|
||||||
{};
|
{};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,11 @@
|
|||||||
using namespace ifcopenshell::geometry;
|
using namespace ifcopenshell::geometry;
|
||||||
|
|
||||||
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcBoundingBox* inst) {
|
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcBoundingBox* inst) {
|
||||||
|
if (!settings_.get<settings::KeepBoundingBoxes>().get()) {
|
||||||
|
// @todo make sure it doesn't log.
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
const double dx = inst->XDim() * length_unit_;
|
const double dx = inst->XDim() * length_unit_;
|
||||||
const double dy = inst->YDim() * length_unit_;
|
const double dy = inst->YDim() * length_unit_;
|
||||||
const double dz = inst->ZDim() * length_unit_;
|
const double dz = inst->ZDim() * length_unit_;
|
||||||
|
|||||||
Reference in New Issue
Block a user