mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-12 22:43:41 +00:00
MSYS build scripts and instructions (#99) and warning fixes
* Preliminary MSYS2 + MinGW build scripts and instructions. * CMakeLists.txt: MinGW tweaks, enforce C++03, suppress warnings for now. * Fix some GCC warnings. * Fix unused parameter warnings coming from Ifc*.h. * Fix warning regarding unreachable code (++jt) on MSVC. * Add IfcParse_EXPORT for IfcInvalidTokenException * Fix potentially uninitialized pointer variables. * Note about OpenCASCADE cyclic dependencies fix. * GCC warning fix: don't generate 'current_enum' variable that is only set and not used for anything ever * Work around -Wmaybe-uninitialized warnings about boost::optional constructs. Also prevent passing of negative values for --bounds. * Remove unused variable. * CMakeLists.txt: ENABLE_BUILD_OPTIMIZATIONS for GCC (simply enforce -03)
This commit is contained in:
committed by
Thomas Krijnen
parent
435eb7ae10
commit
4a85e5e7a5
@@ -280,9 +280,9 @@ public:
|
||||
return _get_surface_style<T>(representation_item->as<IfcSchema::IfcStyledItem>());
|
||||
}
|
||||
IfcSchema::IfcStyledItem::list::ptr styled_items = representation_item->StyledByItem();
|
||||
for (IfcSchema::IfcStyledItem::list::it jt = styled_items->begin(); jt != styled_items->end(); ++jt) {
|
||||
if (styled_items->size()) {
|
||||
// StyledByItem is a SET [0:1] OF IfcStyledItem, so we return after the first IfcStyledItem:
|
||||
return _get_surface_style<T>(*jt);
|
||||
return _get_surface_style<T>(*styled_items->begin());
|
||||
}
|
||||
return std::make_pair<IfcSchema::IfcSurfaceStyle*, T*>(0,0);
|
||||
}
|
||||
|
||||
@@ -1366,7 +1366,6 @@ bool IfcGeom::Kernel::convert_layerset(const IfcSchema::IfcProduct* product, std
|
||||
const IfcSchema::IfcMaterialLayerSet* layerset = usage->ForLayerSet();
|
||||
const bool positive = usage->DirectionSense() == IfcSchema::IfcDirectionSenseEnum::IfcDirectionSense_POSITIVE;
|
||||
double offset = usage->OffsetFromReferenceLine() * getValue(GV_LENGTH_UNIT);
|
||||
const int axis = usage->LayerSetDirection();
|
||||
|
||||
IfcSchema::IfcMaterialLayer::list::ptr material_layers = layerset->MaterialLayers();
|
||||
|
||||
@@ -1723,7 +1722,7 @@ bool IfcGeom::Kernel::fold_layers(const IfcSchema::IfcWall* wall, const IfcRepre
|
||||
|
||||
bool found_intersection = false;
|
||||
boost::optional<gp_Pnt> point_outside_param_range;
|
||||
double param;
|
||||
//double param;
|
||||
|
||||
const Handle_Geom_Surface& surface = *jt;
|
||||
|
||||
@@ -1734,7 +1733,7 @@ bool IfcGeom::Kernel::fold_layers(const IfcSchema::IfcWall* wall, const IfcRepre
|
||||
intersections.Parameters(1, u, v, w);
|
||||
if (w < axis_u1 || w > axis_u2) {
|
||||
point_outside_param_range = p;
|
||||
param = w;
|
||||
//param = w;
|
||||
} else {
|
||||
// Found an intersection. Layer end point is covered by connecting wall
|
||||
found_intersection = true;
|
||||
|
||||
@@ -393,8 +393,6 @@ namespace IfcGeom {
|
||||
}
|
||||
}
|
||||
|
||||
const int repid = representation->entity->id();
|
||||
|
||||
bool has_openings = false;
|
||||
bool has_layers = false;
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ int convert_to_ifc(const gp_Ax2& a, IfcSchema::IfcAxis2Placement3D*& ax, bool ad
|
||||
IfcSchema::IfcCartesianPoint* p;
|
||||
IfcSchema::IfcDirection *x, *z;
|
||||
if (!(convert_to_ifc(a.Location(), p, advanced) && convert_to_ifc(a.Direction(), z, advanced) && convert_to_ifc(a.XDirection(), x, advanced))) {
|
||||
ax = 0;
|
||||
return 0;
|
||||
}
|
||||
ax = new IfcSchema::IfcAxis2Placement3D(p, z, x);
|
||||
|
||||
@@ -1150,7 +1150,6 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcTriangulatedFaceSet* l, TopoDS
|
||||
|
||||
if (faces.empty()) return false;
|
||||
|
||||
const unsigned int num_faces = (unsigned)indices.size();
|
||||
bool valid_shell = false;
|
||||
|
||||
if (faces.size() < getValue(GV_MAX_FACES_TO_SEW)) {
|
||||
|
||||
Reference in New Issue
Block a user