mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 10:33:20 +00:00
Windows/MSVC + OCCT 7.0.0 (#124)
* Windows/MSVC build scripts: option to build and use official Open CASCADE instead of the community edition.
* Fix C4800 warnings ("'Standard_Boolean': forcing value to bool 'true' or 'false' (performance warning)") + unnecessary integer cast.
* build-deps.cmd: fix OCCT download
* Fix MSVC linking against OCCT 7.0.0. Example executables fail still, needs research.
* occt-V7_0_0-9059ca1_CMakeLists.txt: add_definitions(-DHAVE_NO_DLL) in order to fix static linking to OCCT. Mark IfcOpenShell patches in the OCCT patch files for clarity.
* Patch OCCT in order to fix compliaction when HAVE_NO_DLL is defind. Clean up IfcOpenSHell's linker warnings by defining HAVE_NO_DLL.
* CMakeLists.txt: remove linking to the newly added OCCT libs, these are not needed when HAVE_NO_DLL is defined.
* cmake/CMakeLists.txt: make add_debug_variants() function to handle filenames/paths also. Apply the coding conventions while at it. Fixes #123.
* Patch OCCT's OpenGl_PrimitiveArray.cxx and XCAFDoc_GeomTolerance.cxx in order to fix Debug build. Do not trigger OCCT rebuild each time build-deps.cmd is ran.
* build-deps.cmd: fix OCCT file patch copy.
* Non-MSVC compiler: use -Wextra, suppress/fix -Wignored-qualifiers warnings.
* build-deps.cmd: do not check return values of copy commands as they seem not to be fully reliable.
This commit is contained in:
committed by
Thomas Krijnen
parent
e064098f84
commit
64dc2ea95c
@@ -25,6 +25,9 @@
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201 4512)
|
||||
#else
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wignored-qualifiers"
|
||||
#endif
|
||||
#include <COLLADASWStreamWriter.h>
|
||||
#include <COLLADASWLibraryGeometries.h>
|
||||
@@ -33,6 +36,8 @@
|
||||
#include <COLLADASWLibraryMaterials.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#else
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#include "../ifcgeom/IfcGeomIterator.h"
|
||||
|
||||
@@ -2259,7 +2259,7 @@ bool IfcGeom::Kernel::approximate_plane_through_wire(const TopoDS_Wire& wire, gp
|
||||
BRepTools_WireExplorer exp(wire);
|
||||
|
||||
for (;; exp.Next()) {
|
||||
const bool has_more = exp.More();
|
||||
const bool has_more = exp.More() != 0;
|
||||
if (has_more) {
|
||||
const TopoDS_Vertex& v = exp.CurrentVertex();
|
||||
current = BRep_Tool::Pnt(v);
|
||||
|
||||
@@ -433,9 +433,9 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcPolygonalBoundedHalfSpace* l,
|
||||
|
||||
TColgp_SequenceOfPnt points;
|
||||
if (wire_to_sequence_of_point(wire, points)) {
|
||||
remove_duplicate_points_from_loop(points, wire.Closed()); // Note: wire always closed, as per if statement above
|
||||
remove_collinear_points_from_loop(points, wire.Closed());
|
||||
sequence_of_point_to_wire(points, wire, wire.Closed());
|
||||
remove_duplicate_points_from_loop(points, wire.Closed() != 0); // Note: wire always closed, as per if statement above
|
||||
remove_collinear_points_from_loop(points, wire.Closed() != 0);
|
||||
sequence_of_point_to_wire(points, wire, wire.Closed() != 0);
|
||||
}
|
||||
|
||||
TopoDS_Shape prism = BRepPrimAPI_MakePrism(BRepBuilderAPI_MakeFace(wire),gp_Vec(0,0,200));
|
||||
@@ -659,7 +659,7 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcConnectedFaceSet* l, TopoDS_Sh
|
||||
try {
|
||||
builder.Perform();
|
||||
shape = builder.SewedShape();
|
||||
valid_shell = BRepCheck_Analyzer(shape).IsValid();
|
||||
valid_shell = BRepCheck_Analyzer(shape).IsValid() != 0;
|
||||
} catch(...) {}
|
||||
if (valid_shell) {
|
||||
try {
|
||||
@@ -720,10 +720,10 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcMappedItem* l, IfcRepresentati
|
||||
|
||||
const IfcGeom::SurfaceStyle* mapped_item_style = get_style(l);
|
||||
|
||||
const unsigned int previous_size = (const unsigned int) shapes.size();
|
||||
const size_t previous_size = shapes.size();
|
||||
bool b = convert_shapes(map->MappedRepresentation(), shapes);
|
||||
|
||||
for ( unsigned int i = previous_size; i < shapes.size(); ++ i ) {
|
||||
for (size_t i = previous_size; i < shapes.size(); ++ i ) {
|
||||
shapes[i].append(gtrsf);
|
||||
|
||||
// Apply styles assigned to the mapped item only if on
|
||||
|
||||
@@ -218,11 +218,11 @@ namespace IfcUtil {
|
||||
return f;
|
||||
}
|
||||
|
||||
const char* const schema_identifier() {
|
||||
const char* schema_identifier() {
|
||||
return IfcSchema::Identifier;
|
||||
}
|
||||
|
||||
const char* const version() {
|
||||
const char* version() {
|
||||
return IFCOPENSHELL_VERSION;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user