Plugins
Loading...
Searching...
No Matches
selection_tools.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2013-2017: G-CSC, Goethe University Frankfurt
3 * Author: Sebastian Reiter
4 *
5 * This file is part of UG4.
6 *
7 * UG4 is free software: you can redistribute it and/or modify it under the
8 * terms of the GNU Lesser General Public License version 3 (as published by the
9 * Free Software Foundation) with the following additional attribution
10 * requirements (according to LGPL/GPL v3 §7):
11 *
12 * (1) The following notice must be displayed in the Appropriate Legal Notices
13 * of covered and combined works: "Based on UG4 (www.ug4.org/license)".
14 *
15 * (2) The following notice must be displayed at a prominent place in the
16 * terminal output of covered works: "Based on UG4 (www.ug4.org/license)".
17 *
18 * (3) The following bibliography is recommended for citation and must be
19 * preserved in all covered files:
20 * "Reiter, S., Vogel, A., Heppner, I., Rupp, M., and Wittum, G. A massively
21 * parallel geometric multigrid solver on hierarchically distributed grids.
22 * Computing and visualization in science 16, 4 (2013), 151-164"
23 * "Vogel, A., Reiter, S., Rupp, M., Nägel, A., and Wittum, G. UG4 -- a novel
24 * flexible software system for simulating pde based models on high performance
25 * computers. Computing and visualization in science 16, 4 (2013), 165-179"
26 *
27 * This program is distributed in the hope that it will be useful,
28 * but WITHOUT ANY WARRANTY; without even the implied warranty of
29 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 * GNU Lesser General Public License for more details.
31 */
32
33#ifndef __H__UG__selection_tools__
34#define __H__UG__selection_tools__
35
36#include <vector>
37#include <stack>
38#include "../mesh.h"
48
49//selection tools
50#define TOOLTIP_SELECT_LINKED_MANIFOLD_FACES "Selects faces linked with the selection, not crossing non-manifold edges." //?
51#define TOOLTIP_SELECT_NON_MANIFOLD_EDGES "Selects edges with more than 2 associated faces."
52#define TOOLTIP_CLEAR_SELECTION "Clears the selection."
53#define TOOLTIP_SELECT_ELEMENTS_BY_INDEX_RANGE "Selects elements by the given index ranges (e.g.: \"0,1,2-5,9,11-23\")."
54#define TOOLTIP_SELECT_SMOOTH_EDGE_PATH "Selects a smooth edge path."
55#define TOOLTIP_SELECT_BOUNDARY_VERTICES "Selects vertices that lie on the boundary of the geometry"
56#define TOOLTIP_SELECT_INNER_VERTICES "Selects vertices that do not lie on the boundary of the geometry"
57#define TOOLTIP_SELECT_BOUNDARY_EDGES "Selects edges that lie on the boundary of the geometry"
58#define TOOLTIP_SELECT_INNER_EDGES "Selects edges that do not lie on the boundary of the geometry"
59#define TOOLTIP_SELECT_BOUNDARY_FACES "Selects faces that lie on the boundary of the geometry"
60#define TOOLTIP_SELECT_INNER_FACES "Selects faces that do not lie on the boundary of the geometry"
61#define TOOLTIP_SELECT_SHORT_EDGES "Selects edges that are shorter than a given threshold."
62#define TOOLTIP_SELECT_LONG_EDGES "Selects edges that are longer than a given threshold."
63#define TOOLTIP_SELECT_CREASE_EDGES "Selects edges that at which triangles meet in a given angle."
64#define TOOLTIP_SELECT_DEGENERATE_FACES "Selects faces that have a height shorter than a given threshold."
65#define TOOLTIP_SELECT_LINKED_FLAT_FACES "Selects linked faces of selected faces that have a similar normal."
66#define TOOLTIP_SELECT_LINKED_BOUNDARY_EDGES "Selects linked boundary edges of selected edges."
67#define TOOLTIP_SELECT_LINKED_BOUNDARY_FACES "Selects linked boundary faces of selected faces."
68#define TOOLTIP_SELECT_INTERSECTING_TRIANGLES "Selects intersecting triangles. Neighbors are ignored."
69#define TOOLTIP_SELECT_ASSOCIATED_VERTICES "Selects vertices that belong to selected edges, faces and volumes."
70#define TOOLTIP_SELECT_ASSOCIATED_EDGES "Selects edges that belong to selected faces and volumes."
71#define TOOLTIP_SELECT_ASSOCIATED_FACES "Selects faces that belong to selected volumes."
72#define TOOLTIP_SELECT_ALL "Selects all vertices, edges ,faces and volumes of the current grid"
73#define TOOLTIP_SELECT_ALL_VERTICES "Selects all vertices of the current grid"
74#define TOOLTIP_DESELECT_ALL_VERTICES "Deselects all vertices of the current grid"
75#define TOOLTIP_SELECT_ALL_EDGES "Selects all edges of the current grid"
76#define TOOLTIP_DESELECT_ALL_EDGES "Deselects all edges of the current grid"
77#define TOOLTIP_SELECT_ALL_FACES "Selects all faces of the current grid"
78#define TOOLTIP_DESELECT_ALL_FACES "Deselects all faces of the current grid"
79#define TOOLTIP_SELECT_ALL_VOLUMES "Selects all volumes of the current grid"
80#define TOOLTIP_DESELECT_ALL_VOLUMES "Deselects all volumes of the current grid"
81#define TOOLTIP_SELECT_MARKED_VERTICES "Selects vertices which are marked."
82#define TOOLTIP_SELECT_MARKED_EDGES "Selects edges which are marked."
83#define TOOLTIP_SELECT_MARKED_FACES "Selects faces which are marked."
84#define TOOLTIP_SELECT_UNORIENTABLE_VOLUMES "Selects all volumes whose orientation can not be determined"
85#define TOOLTIP_EXTEND_SELECTION "Selects neighbors of selected elements."
86#define TOOLTIP_EXTEND_SELECTION_IN_DIRECTION "Selects neighbors of selected elements whose center can be reached in the given direction from the center of already selected elements."
87#define TOOLTIP_SELECT_VERTEX_BY_INDEX "Selects a vertex given its index."
88#define TOOLTIP_SELECT_EDGE_BY_INDEX "Selects a edge given its index."
89#define TOOLTIP_SELECT_FACE_BY_INDEX "Selects a face given its index."
90#define TOOLTIP_SELECT_FACES_BY_NORMAL "Selects faces given a normal and a maximum deviation angle."
91#define TOOLTIP_SELECT_VOLUME_BY_INDEX "Selects a volume given its index."
92#define TOOLTIP_SELECT_VOLUMES_BY_TYPE "Selects all volumes of a given type."
93#define TOOLTIP_SELECT_VERTEX_BY_COORDINATE "Selects a vertex given a coordinate."
94#define TOOLTIP_SELECT_EDGE_BY_COORDINATE "Selects the edge whose center is closest to the specified coordinate."
95#define TOOLTIP_SELECT_CLOSEST_EDGE "Selects the edge closest to the specified coordinate with respect to its perpendicular distance (or distance to the closest edge vertex resp., if the projection lies outside of the line segment)."
96#define TOOLTIP_SELECT_FACE_BY_COORDINATE "Selects the face whose center is closest to the specified coordinate."
97#define TOOLTIP_SELECT_VOLUME_BY_COORDINATE "Selects the volume whose center is closest to the specified coordinate."
98#define TOOLTIP_SELECT_VERTEX_BY_CYL_COORDINATE "Selects a vertex given a cylindrical coordinate."
99#define TOOLTIP_SELECT_EDGE_BY_CYL_COORDINATE "Selects the edge whose center is closest to the specified cylindrical coordinate."
100#define TOOLTIP_SELECT_FACE_BY_CYL_COORDINATE "Selects the face whose center is closest to the specified cylindrical coordinate."
101#define TOOLTIP_SELECT_VOLUME_BY_CYL_COORDINATE "Selects the volume whose center is closest to the specified cylindrical coordinate."
102#define TOOLTIP_SELECT_UNCONNECTED_VERTICES "Selects vertices which are not connected to the given element type."
103#define TOOLTIP_SELECT_SUBSET "Selects all elements of a subset."
104#define TOOLTIP_SELECT_SUBSET_BOUNDARY "Selects the boundary of a subset."
105#define TOOLTIP_SELECT_UNASSIGNED_ELEMENTS "Selects all elements not assigned to any subset."
106#define TOOLTIP_INVERT_SELECTION "Inverts current selection."
107#define TOOLTIP_EDGE_SELECTION_FILL "Selects neighbours of selected edges over non-selected vertices."
108#define TOOLTIP_FACE_SELECTION_FILL "Selects neighbours of selected faces over non-selected edges."
109#define TOOLTIP_VOLUME_SELECTION_FILL "Selects neighbours of selected volumes over non-selected faces."
110#define TOOLTIP_SELECT_SELECTION_BOUNDARY "Selects the boundary of the current selection."
111#define TOOLTIP_SELECT_BENT_QUADRILATERALS "Selects quadrilaterals which do not lie in a plane."
112#define TOOLTIP_CLOSE_SELECTION "Selects all associated elements of lower dimensions."
113#define TOOLTIP_RESTRICT_SELECTION_TO_SUBSET "Deselects all elements from the selection that are not in the specified subset."
114#define TOOLTIP_SELECT_SLIVERS "Selects flat tetrahedrons. Threshold-ratio specifies the minimal ratio between the distance of two opposing edges to the length of the longest edge."
115#define TOOLTIP_SELECT_SELECTION_KINK_VERTICES "Selects kink vertices in selected paths"
116#define TOOLTIP_SELECT_SUBSET_KINK_VERTICES "Selects kink vertices in subset-paths"
117#define TOOLTIP_SELECT_LINKED_EDGES "Repeatedly selects all edges which are vertex-neighbors of selected edges."
118#define TOOLTIP_SELECT_LINKED_FACES "Repeatedly selects all faces which are edge-neighbors of selected faces."
119#define TOOLTIP_SELECT_LINKED_VOLUMES "Repeatedly selects all volumes which are face-neighbors of selected volumes."
120#define TOOLTIP_SELECT_SHORT_POLYCHAINS "Selects polygonal chains which are shorter than the given threshold."
121#define TOOLTIP_SELECT_INTERFACE_ELEMENTS "Selects elements which are adjacent to higher dimensional elements of different subsets."
122#define TOOLTIP_SELECT_ANISOTROPIC_ELEMENTS "Selects elements and associated long edges wich have a shortest-to-longest edge ratio smaller than the specified one."
123#define TOOLTIP_SELECT_ELEMENTS_BY_SPLIT_PLANE "Selects elements whose center lies in front of the specified plane."
124#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."
125#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."
126#define TOOLTIP_SELECT_ELEMENTS_IN_COORDINATE_RANGE "Selects all elements whose center lies in the specified range."
127#define TOOLTIP_DESELECT_ELEMENTS_IN_COORDINATE_RANGE "Deselects all elements whose center lies in the specified range."
128#define TOOLTIP_SELECT_VERTEX_IN_BOX "Selects all vertices in the given box"
129#define TOOLTIP_SELECT_EDGE_IN_BOX "Selects all edges in the given box"
130#define TOOLTIP_SELECT_FACE_IN_BOX "Selects all faces in the given box"
131#define TOOLTIP_SELECT_VOLUME_IN_BOX "Selects all volumes in the given box"
132#define TOOLTIP_SELECT_VERTEX_IN_CYLINDER "Selects all vertices in the given cylinder"
133#define TOOLTIP_SELECT_EDGE_IN_CYLINDER "Selects all edges in the given cylinder"
134#define TOOLTIP_SELECT_FACE_IN_CYLINDER "Selects all faces in the given cylinder"
135#define TOOLTIP_SELECT_VOLUME_IN_CYLINDER "Selects all volumes in the given cylinder"
136
137#define TOOLTIP_CLEAR_MARKS "Clears all marks"
138#define TOOLTIP_MARK_CREASE_EDGES "Marks edges whose associated faces have a certain angle as crease-edge."
139#define TOOLTIP_MARK_SELECTION "Marks selected vertices and edges."
140#define TOOLTIP_UNMARK_SELECTION "Unmarks selected elements."
141#define TOOLTIP_MARK_CORNERS_OF_MARKED_EDGES "Marks selected vertices as fixed, if they lie at a sharp corner of a marked path or if they are at endpoints or at junctions of marked edges."
142
143
144namespace ug{
145namespace promesh{
146
149
150void ClearSelection(Mesh* obj);
151
152void SelectAll(Mesh* obj);
153
154void SelectElementsByIndexRange (Mesh* obj,
155 const char* vrtRanges,
156 const char* edgeRanges,
157 const char* faceRanges,
158 const char* volRanges,
159 bool clearSelection);
160
161void ExtendSelection(Mesh* obj, int neighborhoodSize);
162
164 Mesh* obj,
165 int neighborhoodSize,
166 const vector3& dir,
167 number minAngle,
168 number maxAngle);
169
170template <class TElem>
171TElem* SelectElemByCoordinate(Mesh* obj, const vector3& coord)
172{
173 Grid& grid = obj->grid();
175
176 TElem* e = FindClosestByCoordinate<TElem>(coord,
177 grid.begin<TElem>(),
178 grid.end<TElem>(),
179 aaPos);
180
181 if(e)
182 obj->selector().select(e);
183
184 return e;
185}
186
187template <class TElem>
189{
190 number x = rho * cos(phi);
191 number y = rho * sin(phi);
192
193 vector3 coord = vector3(x,y,z);
194 return SelectElemByCoordinate<TElem>(obj, coord);
195}
196
197void SelectSubset(
198 Mesh* obj,
199 int si,
200 bool selVrts,
201 bool selEdges,
202 bool selFaces,
203 bool selVols);
204
206 Mesh* obj,
207 int si,
208 bool edgeBnds,
209 bool faceBnds,
210 bool volBnds);
211
213 Mesh* obj,
214 bool selVrts,
215 bool selEdges,
216 bool selFaces,
217 bool selVols);
218
219void InvertSelection(
220 Mesh* obj,
221 bool invVrts,
222 bool invEdges,
223 bool invFaces,
224 bool invVols);
225
226void SelectSelectionBoundary(Mesh* obj);
227
228void CloseSelection(Mesh* obj);
229
230void RestrictSelectionToSubset(Mesh* obj, int si);
231
232template <class TElem>
233void SelectInterfaceElements(Mesh* obj, bool regardSelectedNbrsOnly)
234{
235 Grid& g = obj->grid();
237 g.begin<TElem>(), g.end<TElem>(),
238 regardSelectedNbrsOnly);
239}
240
241
242template <class TElem>
243void SelectAnisotropicElements(Mesh* obj, number minEdgeRatio)
244{
245 Grid& g = obj->grid();
247 g,
248 obj->selector(),
249 minEdgeRatio,
250 g.begin<TElem>(),
251 g.end<TElem>(),
252 obj->position_accessor());
253}
254
255
257// VERTICES
258void SelectBoundaryVertices(Mesh* obj);
259
260void SelectInnerVertices(Mesh* obj);
261
262void SelectAssociatedVertices(Mesh* obj);
263
264void SelectAllVertices(Mesh* obj);
265
266void DeselectAllVertices(Mesh* obj);
267
268void SelectMarkedVertices(Mesh* obj);
269
270bool SelectVertexByIndex(Mesh* obj, int index);
271
273 Mesh* obj,
274 bool edgeCons,
275 bool faceCons,
276 bool volCons);
277
279 Mesh* obj,
280 number thresholdAngle,
281 bool selectDarts);
282
284 Mesh* obj,
285 int subsetIndex,
286 number thresholdAngle,
287 bool selectDarts);
288
289void SelectBoundaryEdges(Mesh* obj);
290
291void SelectInnerEdges(Mesh* obj);
292
293void SelectNonManifoldEdges(Mesh* obj);
294
296 Mesh* obj,
297 number maxDeviation,
298 number normalWeight,
299 bool stopAtSelectedVrts);
300
301void SelectShortEdges(Mesh* obj, number maxLength);
302
303void SelectLongEdges(Mesh* obj, number minLength);
304
305void SelectCreaseEdges(Mesh* obj, number minAngle);
306
307void SelectLinkedBoundaryEdges(Mesh* obj, bool stopAtSelectedVrts);
308
309void SelectAssociatedEdges(Mesh* obj);
310
311void SelectAllEdges(Mesh* obj);
312
313void DeselectAllEdges(Mesh* obj);
314
315void SelectMarkedEdges(Mesh* obj);
316
317bool SelectEdgeByIndex(Mesh* obj, int index);
318
319void EdgeSelectionFill(Mesh* obj);
320
321void SelectShortPolychains(Mesh* m, number maxChainLength, bool closedChainsOnly);
322
324 Mesh* m,
325 const vector3& dir,
326 number minDeviationAngle,
327 number maxDeviationAngle,
328 bool selectFlipped);
329
331 Mesh* m,
332 int subsetIndex,
333 const vector3& dir,
334 number minDeviationAngle,
335 number maxDeviationAngle,
336 bool selectFlipped);
337
339 Mesh* m,
340 const vector3& coord);
341
342void SelectBoundaryFaces(Mesh* obj);
343
344void SelectInnerFaces(Mesh* obj);
345
346void SelectMarkedFaces(Mesh* obj);
347
348void SelectLinkedManifoldFaces(Mesh* obj);
349
350template <class TElem>
352{
353 SelectLinkedElements<TElem>(obj->selector());
354}
355
356void SelectLinkedBoundaryFaces(Mesh* obj, bool stopAtSelectedEdges);
357
358void SelectDegenerateFaces(Mesh* obj, number maxHeight);
359
361 Mesh* obj,
362 number maxDeviationAngle,
363 bool ignoreOrientation,
364 bool traverseDegeneratedFaces,
365 bool stopAtSelectedEdges);
366
367void SelectIntersectingTriangles(Mesh* obj);
368
369void SelectAssociatedFaces(Mesh* obj);
370
371void SelectAllFaces(Mesh* obj);
372
373void DeselectAllFaces(Mesh* obj);
374
375bool SelectFaceByIndex(Mesh* obj, int index);
376
378 Mesh* obj,
379 const vector3& refNormal,
380 number maxDeviationAngle);
381
383 Mesh* obj,
384 const vector3& refNormal,
385 number minDeviationAngle,
386 number maxDeviationAngle,
387 bool noInnerFaces);
388
389void FaceSelectionFill(Mesh* obj);
390
391size_t SelectBentQuadrilaterals(Mesh* obj, number dotThreshold);
392
393void SelectAllVolumes(Mesh* obj);
394
395void DeselectAllVolumes(Mesh* obj);
396
397int SelectUnorientableVolumes(Mesh* obj);
398
399int SelectSlivers(Mesh* obj, number thresholdRatio);
400
401bool SelectVolumeByIndex(Mesh* obj, int index);
402
404 Mesh* obj,
405 bool selHexahedra,
406 bool selOctahedra,
407 bool selPrisms,
408 bool selPyramids,
409 bool selTetrahedra);
410
411void VolumeSelectionFill(Mesh* obj);
412
413void ClearMarks(Mesh* obj);
414
415void MarkCornersOfMarkedEdges(Mesh* obj, number angle);
416
417void MarkSelection(Mesh* obj);
418
419void UnmarkSelection(Mesh* obj);
420
421void MarkCreaseEdges(Mesh* obj, number minAngle, bool clearMarks);
422
424 Mesh* obj,
425 bool selectVrts,
426 bool selectEdges,
427 bool selectFaces,
428 bool selectVols,
429 const vector3& pivot,
430 const vector3& normal);
431
432
433template <int icoord, int selFlag, class TElem>
435 Mesh* obj,
436 number min,
437 number max)
438{
439 Grid& g = obj->grid();
440 Selector& sel = obj->selector();
442
443 for(typename Grid::traits<TElem>::iterator iter = g.begin<TElem>();
444 iter != g.end<TElem>(); ++iter)
445 {
446 vector3 c = CalculateCenter(*iter, aaPos);
447 if(c[icoord] >= min && c[icoord] <= max)
448 sel.select(*iter, selFlag);
449 }
450}
451
452template <int icoord, int selFlag>
454 Mesh* mesh,
455 number min,
456 number max,
457 bool vrts,
458 bool edges,
459 bool faces,
460 bool vols)
461{
462 if(vrts)
463 SelectElementsInCoordinateRange<icoord, selFlag, Vertex>(mesh, min, max);
464 if(edges)
465 SelectElementsInCoordinateRange<icoord, selFlag, Edge>(mesh, min, max);
466 if(faces)
467 SelectElementsInCoordinateRange<icoord, selFlag, Face>(mesh, min, max);
468 if(vols)
469 SelectElementsInCoordinateRange<icoord, selFlag, Volume>(mesh, min, max);
470}
471
472
474template <class TElem>
475void SelectElementsInBox(Mesh* obj, const vector3& min, const vector3& max)
476{
478
479 Grid& grid = obj->grid();
480 Selector& sel = obj->selector();
481
482 for(typename Grid::traits<TElem>::iterator iter = grid.begin<TElem>();
483 iter != grid.end<TElem>(); ++iter)
484 {
485 if(BoxBoundProbe(CalculateCenter(*iter, aaPos), min, max))
486 sel.select(*iter);
487 }
488}
489
490
492template <class TElem>
494 Mesh* obj,
495 const vector3& cylBase,
496 const vector3& cylTop,
497 number radius)
498{
500
501 Grid& grid = obj->grid();
502 Selector& sel = obj->selector();
503
504 vector3 from = cylBase;
505 vector3 dir;
506 VecSubtract(dir, cylTop, cylBase);
507
508 for(typename Grid::traits<TElem>::iterator iter = grid.begin<TElem>();
509 iter != grid.end<TElem>(); ++iter)
510 {
511 vector3 c = CalculateCenter(*iter, aaPos);
512 vector3 p;
513 number s = ProjectPointToRay(p, c, from, dir);
514 if((s > -SMALL) && (s < (1. + SMALL))){
515 if(VecDistanceSq(p, c) <= sq(radius))
516 sel.select(*iter);
517 }
518 }
519}
520
522
523}}// end of namespace
524
525#endif
parameterString p
Definition Biogas.lua:1
parameterString s
Definition Biogas.lua:2
geometry_traits< TGeomObj >::iterator begin()
geometry_traits< TGeomObj >::iterator end()
void select(GridObject *elem, byte status)
Definition mesh.h:73
SubsetHandler & subset_handler()
Definition mesh.h:100
Selector & selector()
Definition mesh.h:102
position_accessor_t & position_accessor()
returns accessor to vertex positions
Definition mesh.h:113
Grid & grid()
Definition mesh.h:99
SmartPtr< TGrid > grid()
UG_API TVertexPositionAttachmentAccessor::ValueType CalculateCenter(const Edge *e, TVertexPositionAttachmentAccessor &aaPosVRT)
void VolumeSelectionFill(Mesh *obj)
Definition selection_tools.cpp:1052
void SelectShortEdges(Mesh *obj, number maxLength)
Definition selection_tools.cpp:475
void SelectMarkedFaces(Mesh *obj)
Definition selection_tools.cpp:650
void DeselectAllFaces(Mesh *obj)
Definition selection_tools.cpp:844
void DeselectAllVertices(Mesh *obj)
Definition selection_tools.cpp:314
void SelectElementsInBox(Mesh *obj, const vector3 &min, const vector3 &max)
Selects elements whose center lie in a box.
Definition selection_tools.h:475
void DeselectAllEdges(Mesh *obj)
Definition selection_tools.cpp:540
void SelectLongEdges(Mesh *obj, number minLength)
Definition selection_tools.cpp:491
void SelectAll(Mesh *obj)
Definition selection_tools.cpp:49
void MarkSelection(Mesh *obj)
Definition selection_tools.cpp:1074
size_t SelectSubsetKinkVertices(Mesh *obj, int subsetIndex, number thresholdAngle, bool selectDarts)
Definition selection_tools.cpp:401
void InvertSelection(Mesh *obj, bool invVrts, bool invEdges, bool invFaces, bool invVols)
Definition selection_tools.cpp:217
void SelectDegenerateFaces(Mesh *obj, number maxHeight)
Definition selection_tools.cpp:707
void SelectShortPolychains(Mesh *m, number maxChainLength, bool closedChainsOnly)
Definition selection_tools.cpp:575
void SelectElementsInCoordinateRange(Mesh *obj, number min, number max)
Definition selection_tools.h:434
void SelectSelectionBoundary(Mesh *obj)
Definition selection_tools.cpp:244
void SelectLinkedFlatFaces(Mesh *obj, number maxDeviationAngle, bool ignoreOrientation, bool traverseDegeneratedFaces, bool stopAtSelectedEdges)
Definition selection_tools.cpp:746
void SelectAssociatedEdges(Mesh *obj)
Definition selection_tools.cpp:526
void SelectVolumesByType(Mesh *obj, bool selHexahedra, bool selOctahedra, bool selPrisms, bool selPyramids, bool selTetrahedra)
Definition selection_tools.cpp:1029
void SelectElementsBySplitPlane(Mesh *obj, bool selectVrts, bool selectEdges, bool selectFaces, bool selectVols, const vector3 &pivot, const vector3 &normal)
Definition selection_tools.cpp:1140
void SelectInnerVertices(Mesh *obj)
Definition selection_tools.cpp:292
void SelectFacesByNormal(Mesh *obj, const vector3 &refNormal, number maxDeviationAngle)
Definition selection_tools.cpp:866
void SelectInnerEdges(Mesh *obj)
Definition selection_tools.cpp:444
void SelectLinkedManifoldFaces(Mesh *obj)
Definition selection_tools.cpp:657
void SelectElementsInCylinder(Mesh *obj, const vector3 &cylBase, const vector3 &cylTop, number radius)
Selects elements whose center lie in a cylinder.
Definition selection_tools.h:493
void SelectAllEdges(Mesh *obj)
Definition selection_tools.cpp:533
bool SelectVertexByIndex(Mesh *obj, int index)
Definition selection_tools.cpp:327
void SelectSmoothEdgePath(Mesh *obj, number maxDeviation, number normalWeight, bool stopAtSelectedVrts)
Definition selection_tools.cpp:466
void SelectLinkedBoundaryEdges(Mesh *obj, bool stopAtSelectedVrts)
Definition selection_tools.cpp:515
void MarkCornersOfMarkedEdges(Mesh *obj, number angle)
Definition selection_tools.cpp:1064
bool SelectVolumeByIndex(Mesh *obj, int index)
Definition selection_tools.cpp:1013
Edge * SelectClosestEdge(Mesh *m, const vector3 &coord)
Definition selection_tools.cpp:609
void SelectEdgesByDirection(Mesh *m, const vector3 &dir, number minDeviationAngle, number maxDeviationAngle, bool selectFlipped)
Definition selection_tools.cpp:581
void FaceSelectionFill(Mesh *obj)
Definition selection_tools.cpp:918
void ClearSelection(Mesh *obj)
Definition selection_tools.cpp:44
void EdgeSelectionFill(Mesh *obj)
Definition selection_tools.cpp:569
size_t SelectBentQuadrilaterals(Mesh *obj, number dotThreshold)
Definition selection_tools.cpp:924
void SelectMarkedEdges(Mesh *obj)
Definition selection_tools.cpp:546
void SelectInnerFaces(Mesh *obj)
Definition selection_tools.cpp:643
TElem * SelectElemByCylindricalCoordinate(Mesh *obj, number rho, number phi, number z)
Definition selection_tools.h:188
void SelectAssociatedFaces(Mesh *obj)
Definition selection_tools.cpp:831
void DeselectAllVolumes(Mesh *obj)
Definition selection_tools.cpp:965
bool SelectFaceByIndex(Mesh *obj, int index)
Definition selection_tools.cpp:850
void SelectBoundaryEdges(Mesh *obj)
Definition selection_tools.cpp:437
size_t SelectUnconnectedVertices(Mesh *obj, bool edgeCons, bool faceCons, bool volCons)
Definition selection_tools.cpp:365
bool SelectEdgeByIndex(Mesh *obj, int index)
Definition selection_tools.cpp:553
int SelectSlivers(Mesh *obj, number thresholdRatio)
Definition selection_tools.cpp:1003
void ExtendSelection(Mesh *obj, int neighborhoodSize)
Definition selection_tools.cpp:81
void SelectCreaseEdges(Mesh *obj, number minAngle)
Definition selection_tools.cpp:507
void SelectIntersectingTriangles(Mesh *obj)
Definition selection_tools.cpp:763
TElem * SelectElemByCoordinate(Mesh *obj, const vector3 &coord)
Definition selection_tools.h:171
void SelectSubsetBoundary(Mesh *obj, int si, bool edgeBnds, bool faceBnds, bool volBnds)
Definition selection_tools.cpp:162
void ExtendSelectionInDirection(Mesh *obj, int neighborhoodSize, const vector3 &dir, number minAngle, number maxAngle)
Definition selection_tools.cpp:86
void SelectUnassignedElements(Mesh *obj, bool selVrts, bool selEdges, bool selFaces, bool selVols)
Definition selection_tools.cpp:196
void SelectAssociatedVertices(Mesh *obj)
Definition selection_tools.cpp:299
void SelectElementsByIndexRange(Mesh *obj, const char *vrtRanges, const char *edgeRanges, const char *faceRanges, const char *volRanges, bool clearSelection)
Definition selection_tools.cpp:59
void SelectLinkedBoundaryFaces(Mesh *obj, bool stopAtSelectedEdges)
Definition selection_tools.cpp:696
size_t SelectSelectionKinkVertices(Mesh *obj, number thresholdAngle, bool selectDarts)
Definition selection_tools.cpp:384
void UnmarkSelection(Mesh *obj)
Definition selection_tools.cpp:1090
void CloseSelection(Mesh *obj)
Definition selection_tools.cpp:254
void SelectBoundaryVertices(Mesh *obj)
Definition selection_tools.cpp:285
void SelectAllVertices(Mesh *obj)
Definition selection_tools.cpp:307
void SelectNonManifoldEdges(Mesh *obj)
Definition selection_tools.cpp:451
void SelectMarkedVertices(Mesh *obj)
Definition selection_tools.cpp:320
void MarkCreaseEdges(Mesh *obj, number minAngle, bool clearMarks)
Definition selection_tools.cpp:1103
void SelectAnisotropicElements(Mesh *obj, number minEdgeRatio)
Definition selection_tools.h:243
void SelectAllVolumes(Mesh *obj)
Definition selection_tools.cpp:958
void SelectInterfaceElements(Mesh *obj, bool regardSelectedNbrsOnly)
Definition selection_tools.h:233
void SelectBoundaryFaces(Mesh *obj)
Definition selection_tools.cpp:636
void SelectSubset(Mesh *obj, int si, bool selVrts, bool selEdges, bool selFaces, bool selVols)
Definition selection_tools.cpp:103
void ClearMarks(Mesh *obj)
Definition selection_tools.cpp:1059
int SelectUnorientableVolumes(Mesh *obj)
Definition selection_tools.cpp:971
void SelectSubsetEdgesByDirection(Mesh *m, int subsetIndex, const vector3 &dir, number minDeviationAngle, number maxDeviationAngle, bool selectFlipped)
Definition selection_tools.cpp:594
void SelectAllFaces(Mesh *obj)
Definition selection_tools.cpp:837
void SelectLinkedElements(Mesh *obj)
Definition selection_tools.h:351
double number
TNumber sq(TNumber val)
bool BoxBoundProbe(const vector_t &v, const vector_t &boxMin, const vector_t &boxMax)
number ProjectPointToRay(vector_t &vOut, const vector_t &v, const vector_t &from, const vector_t &dir)
MathVector< 3, number > vector3
void VecSubtract(vector_t &vOut, const vector_t &v, typename vector_t::value_type s)
void RestrictSelectionToSubset(Selector &sel, const SubsetHandler &sh, int si)
Definition selection_tools.cpp:260
const number SMALL
TVector::value_type VecDistanceSq(const TVector &v1, const TVector &v2, const TMatrix &M)
void MarkForAnisotropicRefinement(Grid &grid, TRef &ref, number minEdgeRatio, TIter elemsBegin, TIter elemsEnd, TAAPos aaPos)
geometry_traits< TElem >::iterator iterator