Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions register_selection_tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,14 @@ void RegisterSelectionTools(ProMeshRegistry& reg, string baseGrp)
"max deviation angle || value = 1D; min = 0D; max = 180D #"
"select flipped edges || value = true",
TOOLTIP_SELECT_EDGES_BY_DIRECTION)
.add_function("SelectSubsetEdgesByDirection", &SelectSubsetEdgesByDirection, grp, "",
"mesh #"
"subset index#"
"direction#"
"min deviation angle || value = 0D; min = 0D; max = 180D #"
"max deviation angle || value = 1D; min = 0D; max = 180D #"
"select flipped edges || value = true",
TOOLTIP_SELECT_SUBSET_EDGES_BY_DIRECTION)
.add_function("SelectShortPolychains", &SelectShortPolychains, grp, "",
"mesh # maxChainLength || min=0D; value=1D # closedChainsOnly",
TOOLTIP_SELECT_SHORT_POLYCHAINS)
Expand Down
15 changes: 15 additions & 0 deletions tools/selection_tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,21 @@ void SelectEdgesByDirection(
maxDeviationAngle, selectFlipped);
}

void SelectSubsetEdgesByDirection(
Mesh* m,
int subsetIndex,
const vector3& dir,
number minDeviationAngle,
number maxDeviationAngle,
bool selectFlipped)
{
Selector& sel = m->selector();
SubsetHandler& sh = m->subset_handler();
Mesh::position_accessor_t aaPos = m->position_accessor();
SelectSubsetEdgesByDirection(sel, sh, subsetIndex, aaPos, dir, minDeviationAngle,
maxDeviationAngle, selectFlipped);
}

////////////////////////////////////////////////////////////////////////////////
// FACES
void SelectBoundaryFaces(Mesh* obj)
Expand Down
9 changes: 9 additions & 0 deletions tools/selection_tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
#define TOOLTIP_SELECT_ANISOTROPIC_ELEMENTS "Selects elements and associated long edges wich have a shortest-to-longest edge ratio smaller than the specified one."
#define TOOLTIP_SELECT_ELEMENTS_BY_SPLIT_PLANE "Selects elements whose center lies in front of the specified plane."
#define TOOLTIP_SELECT_EDGES_BY_DIRECTION "Selects all edges which do not deviate further from the specified direction than the given angle. A minimal required deviation angle can also be specified."
#define TOOLTIP_SELECT_SUBSET_EDGES_BY_DIRECTION "Selects all subset edges which do not deviate further from the specified direction than the given angle. A minimal required deviation angle can also be specified."
#define TOOLTIP_SELECT_ELEMENTS_IN_COORDINATE_RANGE "Selects all elements whose center lies in the specified range."
#define TOOLTIP_DESELECT_ELEMENTS_IN_COORDINATE_RANGE "Deselects all elements whose center lies in the specified range."
#define TOOLTIP_SELECT_VERTEX_IN_BOX "Selects all vertices in the given box"
Expand Down Expand Up @@ -323,6 +324,14 @@ void SelectEdgesByDirection(
number maxDeviationAngle,
bool selectFlipped);

void SelectSubsetEdgesByDirection(
Mesh* m,
int subsetIndex,
const vector3& dir,
number minDeviationAngle,
number maxDeviationAngle,
bool selectFlipped);

void SelectBoundaryFaces(Mesh* obj);

void SelectInnerFaces(Mesh* obj);
Expand Down