Skip to content

Commit

Permalink
remove detail implementation classes
Browse files Browse the repository at this point in the history
  • Loading branch information
francoisbonneau committed Oct 4, 2023
1 parent fd7a1da commit 5c08849
Show file tree
Hide file tree
Showing 18 changed files with 1,511 additions and 1,789 deletions.
48 changes: 23 additions & 25 deletions include/geode/inspector/topology/brep_blocks_topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,33 +32,31 @@ namespace geode

namespace geode
{
namespace detail

/*!
* Class for inspecting the topology of a BRep model blocks through
* their unique vertices
*/
class opengeode_inspector_inspector_api BRepBlocksTopology
{
/*!
* Class for inspecting the topology of a BRep model blocks through
* their unique vertices
*/
class BRepBlocksTopologyImpl
{
public:
BRepBlocksTopologyImpl( const BRep& brep );
public:
BRepBlocksTopology( const BRep& brep );

BRepBlocksTopologyImpl( const BRep& brep, bool verbose );
BRepBlocksTopology( const BRep& brep, bool verbose );

/*!
* Checks if the brep unique vertices are parts of valid blocks,
* i.e. verify:
* If the vertex is part of multiple blocks, either it is part of
* exactly 2 blocks (and at least one surface which is boundary to
* the 2 blocks), or it is part of more than to blocks (and it is
* either a corner, or not a corner but part of only one line).
*/
bool brep_vertex_blocks_topology_is_valid(
index_t unique_vertex_index ) const;
/*!
* Checks if the brep unique vertices are parts of valid blocks,
* i.e. verify:
* If the vertex is part of multiple blocks, either it is part of
* exactly 2 blocks (and at least one surface which is boundary to
* the 2 blocks), or it is part of more than to blocks (and it is
* either a corner, or not a corner but part of only one line).
*/
bool brep_vertex_blocks_topology_is_valid(
index_t unique_vertex_index ) const;

private:
const BRep& brep_;
bool verbose_;
};
} // namespace detail
private:
const BRep& brep_;
bool verbose_;
};
} // namespace geode
54 changes: 25 additions & 29 deletions include/geode/inspector/topology/brep_corners_topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,41 +32,37 @@ namespace geode

namespace geode
{
namespace detail
class opengeode_inspector_inspector_api BRepCornersTopology
{
class BRepCornersTopologyImpl
{
public:
BRepCornersTopologyImpl( const BRep& brep );
public:
BRepCornersTopology( const BRep& brep );

BRepCornersTopologyImpl( const BRep& brep, bool verbose );
BRepCornersTopology( const BRep& brep, bool verbose );

/*!
* Checks if the brep unique vertices are valid corners, i.e.
* corners that verify:
* Each unique_vertex can only be associated to one corner.
* Each corner can only be internal to one object (surface or
* block).
* Each corner is a boundary of every line it is associated to.
*/
bool brep_corner_topology_is_valid(
index_t unique_vertex_index ) const;
/*!
* Checks if the brep unique vertices are valid corners, i.e.
* corners that verify:
* Each unique_vertex can only be associated to one corner.
* Each corner can only be internal to one object (surface or
* block).
* Each corner is a boundary of every line it is associated to.
*/
bool brep_corner_topology_is_valid( index_t unique_vertex_index ) const;

bool unique_vertex_has_multiple_corners(
index_t unique_vertex_index ) const;
bool unique_vertex_has_multiple_corners(
index_t unique_vertex_index ) const;

bool corner_has_multiple_embeddings(
index_t unique_vertex_index ) const;
bool corner_has_multiple_embeddings(
index_t unique_vertex_index ) const;

bool corner_is_not_internal_nor_boundary(
index_t unique_vertex_index ) const;
bool corner_is_not_internal_nor_boundary(
index_t unique_vertex_index ) const;

bool corner_is_part_of_line_but_not_boundary(
index_t unique_vertex_index ) const;
bool corner_is_part_of_line_but_not_boundary(
index_t unique_vertex_index ) const;

private:
const BRep& brep_;
bool verbose_;
};
} // namespace detail
private:
const BRep& brep_;
bool verbose_;
};
} // namespace geode
67 changes: 32 additions & 35 deletions include/geode/inspector/topology/brep_lines_topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,47 +32,44 @@ namespace geode

namespace geode
{
namespace detail
/*!
* Class for inspecting the topology of a BRep model lines through their
* unique vertices
*/
class opengeode_inspector_inspector_api BRepLinesTopology
{
/*!
* Class for inspecting the topology of a BRep model lines through their
* unique vertices
*/
class BRepLinesTopologyImpl
{
public:
BRepLinesTopologyImpl( const BRep& brep );
public:
BRepLinesTopology( const BRep& brep );

BRepLinesTopologyImpl( const BRep& brep, bool verbose );
BRepLinesTopology( const BRep& brep, bool verbose );

/*!
* Checks if the brep unique vertices are parts of valid lines, i.e.
* verify:
* Each line is either internal or boundary.
* If a line is internal to an object, it cannot be incident to it.
* If the vertex is part of only one line, the line is either
* internal to a surface, internal to a block, or a boundary of
* multiple surfaces.
* If the vertex is part of multiple lines, it is also a corner.
*/
bool brep_vertex_lines_topology_is_valid(
index_t unique_vertex_index ) const;
/*!
* Checks if the brep unique vertices are parts of valid lines, i.e.
* verify:
* Each line is either internal or boundary.
* If a line is internal to an object, it cannot be incident to it.
* If the vertex is part of only one line, the line is either
* internal to a surface, internal to a block, or a boundary of
* multiple surfaces.
* If the vertex is part of multiple lines, it is also a corner.
*/
bool brep_vertex_lines_topology_is_valid(
index_t unique_vertex_index ) const;

bool vertex_is_part_of_not_boundary_nor_internal_line(
const index_t unique_vertex_index ) const;
bool vertex_is_part_of_not_boundary_nor_internal_line(
const index_t unique_vertex_index ) const;

bool vertex_is_part_of_line_with_invalid_internal_topology(
const index_t unique_vertex_index ) const;
bool vertex_is_part_of_line_with_invalid_internal_topology(
const index_t unique_vertex_index ) const;

bool vertex_is_part_of_invalid_unique_line(
index_t unique_vertex_index ) const;
bool vertex_is_part_of_invalid_unique_line(
index_t unique_vertex_index ) const;

bool vertex_has_lines_but_is_not_corner(
index_t unique_vertex_index ) const;
bool vertex_has_lines_but_is_not_corner(
index_t unique_vertex_index ) const;

private:
const BRep& brep_;
bool verbose_;
};
} // namespace detail
private:
const BRep& brep_;
bool verbose_;
};
} // namespace geode
83 changes: 40 additions & 43 deletions include/geode/inspector/topology/brep_surfaces_topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,56 +32,53 @@ namespace geode

namespace geode
{
namespace detail
/*!
* Class for inspecting the topology of a BRep model surfaces through
* their unique vertices
*/
class opengeode_inspector_inspector_api BRepSurfacesTopology
{
/*!
* Class for inspecting the topology of a BRep model surfaces through
* their unique vertices
*/
class BRepSurfacesTopologyImpl
{
public:
BRepSurfacesTopologyImpl( const BRep& brep );
public:
BRepSurfacesTopology( const BRep& brep );

BRepSurfacesTopologyImpl( const BRep& brep, bool verbose );
BRepSurfacesTopology( const BRep& brep, bool verbose );

/*!
* Checks if the brep unique vertices are parts of valid surfaces,
* i.e. verify:
* Each surface is either internal or boundary.
* Each internal surface is internal to only one object and is not
* boundary.
* If the vertex is part of only one surface, the vertex is part of
* no more than 2 blocks, and the surface is either internal to a
* block (and the vertex is in one and only one block) or a boundary
* of all the blocks the vertex is in.
* If the vertex is part of multiple surfaces, it is either part of
* only one line (and no corner, and the line is boundary to all the
* surfaces) or multiple lines (and all the lines are either
* internal or boundary to at least 2 of the surfaces the vertex is
* in).
*/
bool brep_vertex_surfaces_topology_is_valid(
index_t unique_vertex_index ) const;
/*!
* Checks if the brep unique vertices are parts of valid surfaces,
* i.e. verify:
* Each surface is either internal or boundary.
* Each internal surface is internal to only one object and is not
* boundary.
* If the vertex is part of only one surface, the vertex is part of
* no more than 2 blocks, and the surface is either internal to a
* block (and the vertex is in one and only one block) or a boundary
* of all the blocks the vertex is in.
* If the vertex is part of multiple surfaces, it is either part of
* only one line (and no corner, and the line is boundary to all the
* surfaces) or multiple lines (and all the lines are either
* internal or boundary to at least 2 of the surfaces the vertex is
* in).
*/
bool brep_vertex_surfaces_topology_is_valid(
index_t unique_vertex_index ) const;

bool vertex_is_part_of_not_boundary_nor_internal_surface(
const index_t unique_vertex_index ) const;
bool vertex_is_part_of_not_boundary_nor_internal_surface(
const index_t unique_vertex_index ) const;

bool vertex_is_part_of_surface_with_invalid_internal_topology(
const index_t unique_vertex_index ) const;
bool vertex_is_part_of_surface_with_invalid_internal_topology(
const index_t unique_vertex_index ) const;

bool vertex_is_part_of_invalid_unique_surface(
index_t unique_vertex_index ) const;
bool vertex_is_part_of_invalid_unique_surface(
index_t unique_vertex_index ) const;

bool vertex_is_part_of_invalid_multiple_surfaces(
index_t unique_vertex_index ) const;
bool vertex_is_part_of_invalid_multiple_surfaces(
index_t unique_vertex_index ) const;

bool vertex_is_part_of_line_and_not_on_surface_border(
index_t unique_vertex_index ) const;
bool vertex_is_part_of_line_and_not_on_surface_border(
index_t unique_vertex_index ) const;

private:
const BRep& brep_;
bool verbose_;
};
} // namespace detail
private:
const BRep& brep_;
bool verbose_;
};
} // namespace geode
9 changes: 9 additions & 0 deletions include/geode/inspector/topology/brep_topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
#include <geode/basic/pimpl.h>

#include <geode/inspector/common.h>
#include <geode/inspector/topology/brep_blocks_topology.h>
#include <geode/inspector/topology/brep_corners_topology.h>
#include <geode/inspector/topology/brep_lines_topology.h>
#include <geode/inspector/topology/brep_surfaces_topology.h>

namespace geode
{
Expand All @@ -39,6 +43,10 @@ namespace geode
* Class for inspecting the topology of a BRep model corners
*/
class opengeode_inspector_inspector_api BRepTopologyInspector
: public BRepCornersTopology,
public BRepLinesTopology,
public BRepSurfacesTopology,
public BRepBlocksTopology
{
OPENGEODE_DISABLE_COPY( BRepTopologyInspector );

Expand Down Expand Up @@ -119,5 +127,6 @@ namespace geode

private:
IMPLEMENTATION_MEMBER( impl_ );
const BRep& brep_;
};
} // namespace geode
Loading

0 comments on commit 5c08849

Please sign in to comment.