Skip to content

Commit fd16427

Browse files
committed
fix cmake files
1 parent 2247452 commit fd16427

27 files changed

+841
-592
lines changed

CMakeLists.txt

+24-10
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,32 @@ set(IFCPP_CONFIG_DIR "share/IFCPP/cmake")
4242
ADD_SUBDIRECTORY (IfcPlusPlus)
4343

4444
# Install configuration file
45-
INCLUDE(CMakePackageConfigHelpers)
46-
set(config_file_input "${CMAKE_CURRENT_SOURCE_DIR}/cmake/IFCPPConfig.cmake.in")
47-
set(config_file_output "${CMAKE_CURRENT_BINARY_DIR}/cmake/IFCPPConfig.cmake")
45+
#INCLUDE(CMakePackageConfigHelpers)
46+
#set(config_file_input "${CMAKE_CURRENT_SOURCE_DIR}/cmake/IFCPPConfig.cmake.in")
47+
#set(config_file_output "${CMAKE_CURRENT_BINARY_DIR}/cmake/IFCPPConfig.cmake")
4848

49-
CONFIGURE_PACKAGE_CONFIG_FILE(
50-
${config_file_input}
51-
${config_file_output}
52-
INSTALL_DESTINATION ${IFCPP_CONFIG_DIR})
49+
#CONFIGURE_PACKAGE_CONFIG_FILE(
50+
# ${config_file_input}
51+
# ${config_file_output}
52+
# INSTALL_DESTINATION ${IFCPP_CONFIG_DIR})
5353

54-
INSTALL(
55-
FILES ${config_file_output}
56-
DESTINATION ${IFCPP_CONFIG_DIR})
54+
#INSTALL(
55+
# FILES ${config_file_output}
56+
# DESTINATION ${IFCPP_CONFIG_DIR})
57+
58+
#install(
59+
# DIRECTORY src/ifcpp
60+
# DESTINATION include
61+
# FILES_MATCHING PATTERN "*.h"
62+
#)
63+
64+
#install(
65+
# TARGETS IfcPlusPlus
66+
#EXPORT IfcPlusPlus
67+
# RUNTIME DESTINATION bin
68+
# LIBRARY DESTINATION bin
69+
# ARCHIVE DESTINATION bin
70+
#)
5771

5872
IF(BUILD_CONSOLE_APPLICATION)
5973
ADD_SUBDIRECTORY (examples/CreateIfcWallAndWriteFile)

IfcPlusPlus/src/external/Carve/src/include/carve/aabb.hpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@ struct aabb {
8989

9090
std::pair<double, double> rangeInDirection( const carve::geom::vector<ndim>& v) const;
9191

92-
vector_t min() const;
93-
vector_t mid() const;
94-
vector_t max() const;
92+
vector_t minPoint() const; // renamed from min() to minPoint() because it can create compiler problems in projects where min is defined as a macro
93+
vector_t midPoint() const;
94+
vector_t maxPoint() const;
9595

96-
double min(size_t dim) const;
97-
double mid(size_t dim) const;
98-
double max(size_t dim) const;
96+
double minCoordinateInDimension(size_t dim) const;
97+
double midCoordinateInDimension(size_t dim) const;
98+
double maxDimension(size_t dim) const;
9999

100100
double volume() const;
101101

IfcPlusPlus/src/external/Carve/src/include/carve/aabb_impl.hpp

+16-16
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ namespace carve {
5959
vector_t min, max;
6060
aabb<ndim> a = get_aabb<ndim, value_type>()(*begin);
6161
++begin;
62-
min = a.min();
63-
max = a.max();
62+
min = a.minPoint();
63+
max = a.maxPoint();
6464
while( begin != end ) {
6565
a = get_aabb<ndim, value_type>()(*begin);
6666
++begin;
67-
assign_op(min, min, a.min(), carve::util::min_functor());
68-
assign_op(max, max, a.max(), carve::util::max_functor());
67+
assign_op(min, min, a.minPoint(), carve::util::min_functor());
68+
assign_op(max, max, a.maxPoint(), carve::util::max_functor());
6969
}
7070

7171
pos = (min + max) / 2.0;
@@ -96,13 +96,13 @@ namespace carve {
9696

9797
vector_t min, max;
9898
aabb<ndim> a = *begin++;
99-
min = a.min();
100-
max = a.max();
99+
min = a.minPoint();
100+
max = a.maxPoint();
101101
while( begin != end ) {
102102
aabb<ndim> a = *begin;
103103
++begin;
104-
assign_op(min, min, a.min(), carve::util::min_functor());
105-
assign_op(max, max, a.max(), carve::util::max_functor());
104+
assign_op(min, min, a.minPoint(), carve::util::min_functor());
105+
assign_op(max, max, a.maxPoint(), carve::util::max_functor());
106106
}
107107

108108
pos = (min + max) / 2.0;
@@ -165,8 +165,8 @@ namespace carve {
165165
void aabb<ndim>::unionAABB(const aabb<ndim>& a) {
166166
vector_t vmin, vmax;
167167

168-
assign_op(vmin, min(), a.min(), carve::util::min_functor());
169-
assign_op(vmax, max(), a.max(), carve::util::max_functor());
168+
assign_op(vmin, minPoint(), a.minPoint(), carve::util::min_functor());
169+
assign_op(vmax, maxPoint(), a.maxPoint(), carve::util::max_functor());
170170
pos = (vmin + vmax) / 2.0;
171171
assign_op(extent, vmax - pos, pos - vmin, carve::util::max_functor());
172172
}
@@ -252,34 +252,34 @@ namespace carve {
252252
}
253253

254254
template <unsigned ndim>
255-
typename aabb<ndim>::vector_t aabb<ndim>::min() const {
255+
typename aabb<ndim>::vector_t aabb<ndim>::minPoint() const {
256256
return pos - extent;
257257
}
258258

259259
template <unsigned ndim>
260-
typename aabb<ndim>::vector_t aabb<ndim>::mid() const {
260+
typename aabb<ndim>::vector_t aabb<ndim>::midPoint() const {
261261
return pos;
262262
}
263263

264264
template <unsigned ndim>
265-
typename aabb<ndim>::vector_t aabb<ndim>::max() const {
265+
typename aabb<ndim>::vector_t aabb<ndim>::maxPoint() const {
266266
return pos + extent;
267267
}
268268

269269
template <unsigned ndim>
270-
double aabb<ndim>::min(size_t dim) const
270+
double aabb<ndim>::minCoordinateInDimension(size_t dim) const
271271
{
272272
return pos.v[dim] - extent.v[dim];
273273
}
274274

275275
template <unsigned ndim>
276-
double aabb<ndim>::mid(size_t dim) const
276+
double aabb<ndim>::midCoordinateInDimension(size_t dim) const
277277
{
278278
return pos.v[dim];
279279
}
280280

281281
template <unsigned ndim>
282-
double aabb<ndim>::max(size_t dim) const
282+
double aabb<ndim>::maxDimension(size_t dim) const
283283
{
284284
return pos.v[dim] + extent.v[dim];
285285
}

IfcPlusPlus/src/external/Carve/src/include/carve/kd_node.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ class kd_node {
181181
}
182182

183183
if (splitpos.pos == std::numeric_limits<double>::max()) {
184-
carve::geom::vector<ndim> min = aabb.min();
185-
carve::geom::vector<ndim> max = aabb.max();
184+
carve::geom::vector<ndim> min = aabb.minPoint();
185+
carve::geom::vector<ndim> max = aabb.maxPoint();
186186
splitpos.pos = aabb.pos.v[splitpos.axis];
187187
}
188188

IfcPlusPlus/src/external/Carve/src/include/carve/mesh.hpp

+6-13
Original file line numberDiff line numberDiff line change
@@ -433,11 +433,8 @@ namespace carve {
433433
}
434434

435435
void invert() {
436-
// We invert the direction of the edges of the face in this
437-
// way so that the edge rev pointers (if any) are still
438-
// correct. It is expected that invert() will be called on
439-
// every other face in the mesh, too, otherwise everything
440-
// will get messed up.
436+
// We invert the direction of the edges of the face in this way so that the edge rev pointers (if any) are still
437+
// correct. It is expected that invert() will be called on every other face in the mesh, too, otherwise everything will get messed up.
441438

442439
{
443440
// advance vertices.
@@ -496,10 +493,8 @@ namespace carve {
496493

497494
typedef std::pair<const vertex_t*, const vertex_t*> vpair_t;
498495
typedef std::list<edge_t*> edgelist_t;
499-
typedef std::unordered_map<vpair_t, edgelist_t, carve::mesh::hash_vertex_pair>
500-
edge_map_t;
501-
typedef std::unordered_map<const vertex_t*, std::set<const vertex_t*> >
502-
edge_graph_t;
496+
typedef std::unordered_map<vpair_t, edgelist_t, carve::mesh::hash_vertex_pair> edge_map_t;
497+
typedef std::unordered_map<const vertex_t*, std::set<const vertex_t*> > edge_graph_t;
503498

504499
MeshOptions opts;
505500

@@ -542,8 +537,7 @@ namespace carve {
542537
carve::geom::vector<3> edge_dir;
543538
carve::geom::vector<3> base_dir;
544539

545-
Cmp(const carve::geom::vector<3>& _edge_dir,
546-
const carve::geom::vector<3>& _base_dir)
540+
Cmp(const carve::geom::vector<3>& _edge_dir, const carve::geom::vector<3>& _base_dir)
547541
: edge_dir(_edge_dir), base_dir(_base_dir) {}
548542
bool operator()(const EdgeOrderData& a, const EdgeOrderData& b) const;
549543
};
@@ -715,8 +709,7 @@ namespace carve {
715709
};
716710

717711
// A MeshSet manages vertex storage, and a collection of meshes.
718-
// It should be easy to turn a vertex pointer into its index in
719-
// its MeshSet vertex_storage.
712+
// It should be easy to turn a vertex pointer into its index in its MeshSet vertex_storage.
720713
template <unsigned int ndim>
721714
class MeshSet {
722715
MeshSet();

0 commit comments

Comments
 (0)