Overture
Version 25
|
#include <CompositeTopology.h>
Public Types | |
enum | EdgeCurveStatusEnum { edgeCurveIsNotMerged =0, edgeCurveIsSplit, edgeCurveIsMerged, edgeCurveIsRemoved, edgeCurveIsNotDefined } |
Public Member Functions | |
CompositeTopology (CompositeSurface &cs) | |
~CompositeTopology () | |
Destroy a CompositeTopology. | |
int | cleanup () |
Cleanup temporary storage used while determining the connectivity and global triangulation. | |
CompositeTopology & | operator= (const CompositeTopology &X) |
int | update () |
Interactively build the connectivity information for a CompositeSurface. | |
int | getNumberOfEdgeCurves () |
EdgeCurveStatusEnum | getEdgeCurveStatus (int number) |
Return the status of an edge curve. | |
Mapping & | getEdgeCurve (int number) |
Return a reference to an edge curve. | |
int | getNearestEdge (real x[3]) |
Return the number of the edge curve nearest to the point x. | |
int | findBoundaryCurves (int &numberOfBoundaryCurves, Mapping **&boundaryCurves) |
UnstructuredMapping * | getTriangulation () const |
int | buildTriangulationForVisibleSurfaces () |
Given a global triangulation for all surfaces, build a new triangulation for only visible surfaces. | |
bool | topologyDetermined () |
const IntegerArray & | getSignForNormal () const |
int | getEdgeFromEndPoints (real *x0, real *x1) |
Find an edge with the given end points. | |
virtual int | get (const GenericDataBase &dir, const aString &name) |
Get from a data base file. | |
virtual int | put (GenericDataBase &dir, const aString &name) const |
Put to a data-base. | |
UnstructuredMapping * | getTriangulationSurface (int s) |
void | setMaximumArea (real maxa) |
real | getMaximumArea () const |
void | setDeltaS (real ds) |
real | getDeltaS () const |
bool | computeTopology (GenericGraphicsInterface &gi, int debug=0) |
void | invalidateTopology () |
EdgeInfo * | edgeFromNumber (int n) |
int | buildEdgeCurveSearchTree (int &debug) |
Split an edge curve at a given point. | |
Protected Member Functions | |
void | setupAllEdges () |
void | adjustEndPoints () |
bool | checkConsistency (bool quiet=false) |
int | initializeTopology () |
Initialize parameters such as the suggested deltaS and mergeTolerance. | |
int | computeNumberOfGridPoints (real arcLength, realArray &x, real &maxCurvature) |
Determine the number of grid points to put on a curve. | |
int | buildEdgeSegment (Mapping &trimCurve, Mapping &surface, NurbsMapping *&edge, int &numberOfGridPoints, real &arcLength, int &debug, GenericGraphicsInterface &gi) |
Build an edge curve by interpolation of points on the sub-surface. | |
int | buildEdgeCurves (GenericGraphicsInterface &gi) |
Build edge curves for all sub-surfaces. | |
int | buildEdgeCurveBoundaryNodes () |
Build the boundary nodes on the edge curves (based on deltaS) that will be used in the triangulation. | |
int | getAnotherEdge (EdgeInfo *&edgeChosen, GenericGraphicsInterface &gi, const aString &question, const aString &cancel) |
Prompt for another edge. | |
int | merge (EdgeInfo *e, int debug) |
Attempt to merge the edgeCurve e with other edge curves. | |
int | mergeEdgeCurves (EdgeInfo &e, EdgeInfo &e2, int debug=0) |
Attempt to force a merge between two edge curves. Double check that the merge make sense. | |
bool | mergeTwoEdges (EdgeInfo *e, EdgeInfo *eMin, int orientation, real tolerance, int debug) |
int | joinEdgeCurves (EdgeInfo &e1, bool toNext, int debug=0) |
Attempt to join two adjacent edges curves (which normally will be on the same surface). | |
int | splitAndMergeEdgeCurves (GenericGraphicsInterface &gi, int &debug) |
Split and merge edge curves. | |
int | splitEdge (EdgeInfo **er, real rSplit, int &debug, bool mergeNewEdges=true) |
Split an edge curve into two. | |
int | triangulateCompositeSurface (int &debug, GenericGraphicsInterface &gi, GraphicsParameters ¶ms) |
Build a global triangulation for a CompositeSurface. | |
int | buildSubSurfaceTriangulation (int s, IntegerArray &numberOfBoundaryNodes, realArray *rCoordinates, IntegerArray *edgeNodeInfop, IntegerArray *boundaryNodeInfop, int &totalNumberOfNodes, int &totalNumberOfFaces, int &totalNumberOfElements, real &totalTimeToBuildSeparateTriangulations, real &totalTriangleTime, real &totalNurbTime, real &totalResolutionTime, int &debug, GenericGraphicsInterface &gi, GraphicsParameters ¶ms) |
Build a triangulation on a sub-surface using the merged edge curves. | |
int | printEdgeCurveInfo (GenericGraphicsInterface &gi) |
Print a summary of the number of edge curves of the various types. | |
void | printInfoForAnEdgeCurve (EdgeInfo *e) |
Print info about a particular edge curve. | |
void | unMergeEdge (EdgeInfo &e) |
CompositeTopology::CompositeTopology | ( | CompositeSurface & | cs_ | ) |
This Class can be used to determine the connectivity (topology) of a CompositeSurface by determining where adjacent sub-surfaces meet.
The CompositeTopology class can be used to build a global triangulation for the CompositeSurface. There are two steps in this process. First determine the connectivity of the CompositeSurface by matching edge curves on the sub-surface boundaries. Second build triangulations for each sub-surface using common nodes at the shared edges.
cs | (input): determine the topology for this surface. |
References allEdges, boundingBox, boundingBox, boundingBoxExtension, curvatureTolerance, curveResolutionTolerance, deltaS, edgeCurvesAreBuilt, faceInfoArray, globalTriangulation, globalTriangulationForVisibleSurfaces, improveTri, initializeTopology(), maxDist, maximumArea, mergedCurvesAreValid, NULL, numberOfEdgeCurves, numberOfEndPoints, numberOfUniqueEdgeCurves, REAL_MAX, recomputeEdgeCurveBoundaryNodes, searchTree, splitToleranceFactor, and triangulationSurface.
CompositeTopology::~CompositeTopology | ( | ) |
Destroy a CompositeTopology.
References cleanup(), ReferenceCounting::decrementReferenceCount(), globalTriangulation, globalTriangulationForVisibleSurfaces, and searchTree.
|
protected |
References cs, endPoint, faceInfoArray, Loop::firstEdge, FaceInfo::loop, mergeTolerance, EdgeInfo::next, Loop::numberOfEdges(), FaceInfo::numberOfLoops, and CompositeSurface::numberOfSubSurfaces().
Referenced by splitAndMergeEdgeCurves().
|
protected |
Build the boundary nodes on the edge curves (based on deltaS) that will be used in the triangulation.
References CurveSegment::arcLength, axis1, computeNumberOfGridPoints(), cs, EdgeInfo::curve, faceInfoArray, Loop::firstEdge, NurbsMapping::getGrid(), Mapping::getGridDimensions(), CurveSegment::getNURBS(), FaceInfo::loop, EdgeInfo::next, Loop::numberOfEdges(), CurveSegment::numberOfGridPoints, FaceInfo::numberOfLoops, CompositeSurface::numberOfSubSurfaces(), s, Mapping::setGridDimensions(), and x.
Referenced by computeTopology(), and update().
|
protected |
Build edge curves for all sub-surfaces.
An edge curve is a 3D (physical space) representation of a trimming sub-curve.
References Overture::abort(), FaceInfo::allocateLoops(), CurveSegment::arcLength, EdgeInfoArray::array, assert, Loop::assignEndPointNumbers(), axis1, axis2, buildEdgeSegment(), NurbsMapping::buildSubCurves(), c, checkConsistency(), cleanup(), constructOuterBoundaryCurve(), cs, EdgeInfo::curve, ReferenceCounting::decrementReferenceCount(), Loop::deleteEdge(), EdgeInfo::edgeNumber, endPoint, faceInfoArray, EdgeInfo::faceNumber, Loop::firstEdge, Mapping::functionPeriodic, Mapping::getClassName(), getCPU(), NurbsMapping::getGrid(), Mapping::getIsPeriodic(), CurveSegment::getNURBS(), NurbsMapping::getOrder(), ReferenceCounting::incrementReferenceCount(), Loop::insertEdge(), joinEdgeCurves(), Loop::lastEdge, FaceInfo::loop, EdgeInfo::loopNumber, masterEdge, max(), mergeTolerance, NurbsMapping::moveEndpoint(), EdgeInfo::next, NULL, numberOfEdgeCurves, Loop::numberOfEdges(), numberOfEndPoints, numberOfFaces, CurveSegment::numberOfGridPoints, NurbsMapping::numberOfSubCurves(), CompositeSurface::numberOfSubSurfaces(), GenericGraphicsInterface::outputString(), EdgeInfo::prev, q, REAL_MIN, EdgeInfoArray::resize(), s, SC, CurveSegment::startingPoint, NurbsMapping::subCurve(), TrimmedMapping::surface, triangulationSurface, Loop::trimOrientation, and x.
Referenced by computeTopology(), and update().
int CompositeTopology::buildEdgeCurveSearchTree | ( | int & | debug | ) |
Split an edge curve at a given point.
This function is called when the user wants to explicitly split an edge curve. /param e (input): split this edge curve /param xSplit (input): split curve at this point. /return: 0==success.Fill in the search tree with the bounding box for each edgeCurve
(input): debug level
References bb, boundingBox, boundingBoxExtension, cs, EdgeInfo::edgeCurveIsNotUsed, End, faceInfoArray, Loop::firstEdge, getCPU(), Mapping::getRangeBound(), Mapping::getRangeDimension(), FaceInfo::loop, max(), EdgeInfo::next, numberOfEdgeCurves, Loop::numberOfEdges(), FaceInfo::numberOfLoops, CompositeSurface::numberOfSubSurfaces(), searchTree, and Start.
Referenced by computeTopology(), get(), and update().
|
protected |
Build an edge curve by interpolation of points on the sub-surface.
Here we build both the edgeCurve (saved in edge) and the set of points used in the triangulation of the edge.
trimCurve | (input) : this edge curve is from a trimming curve (or a boundary curve for untrimmed surfaces) |
surface | (input) : Mapping that defines the sub-surface. |
edge | (output) : If not NULL then an edge curve was built AND the referenceCount was incremented. If NULL no edge curve was built. since the arcLength of the curve was too small. |
numberOfGridPoints | (output) : number of points on the curve to use for the triangulation, based on the current value of deltaS |
arcLength | (output): the arc-length of the edge curve |
References axis1, computeNumberOfGridPoints(), curveResolutionTolerance, Mapping::debug, deltaS, dr, GenericGraphicsInterface::erase(), fabs(), Mapping::getClassName(), NurbsMapping::getGrid(), Mapping::getGrid(), Mapping::getIsPeriodic(), GI_TOP_LABEL, improveTri, ReferenceCounting::incrementReferenceCount(), Mapping::inverseMap(), ip, Mapping::map(), max(), mergeTolerance, min(), minNumberOfPointsOnAnEdge, NULL, numberOfEdgeCurves, PlotIt::plot(), GenericGraphicsInterface::plotPoints(), pow(), r, GraphicsParameters::set(), Mapping::setGridDimensions(), Mapping::setIsPeriodic(), and x.
Referenced by buildEdgeCurves().
|
protected |
Build a triangulation on a sub-surface using the merged edge curves.
References addInteriorNodes(), EdgeInfoArray::array, assert, aString, axis1, bb, cs, curvatureTolerance, EdgeInfo::curve, Mapping::determineResolution(), display(), E, EdgeInfo::edgeCurveIsNotUsed, EdgeInfo::edgeNumber, End, CurveSegment::endingPoint, GenericGraphicsInterface::erase(), fabs(), faceInfoArray, EdgeInfo::faceNumber, Loop::firstEdge, Mapping::functionPeriodic, TriangleWrapper::generate(), TriangleWrapper::generateElementList(), Mapping::getClassName(), getCPU(), Mapping::getDomainBound(), TriangleWrapperParameters::getFreezeSegments(), NurbsMapping::getGrid(), Mapping::getGridDimensions(), Mapping::getIsPeriodic(), GenericGraphicsInterface::getMenuItem(), Mapping::getName(), TriangleWrapper::getNeighbours(), UnstructuredMapping::getNodes(), TriangleWrapper::getNumberOfBoundaryEdges(), TriangleWrapper::getNumberOfEdges(), UnstructuredMapping::getNumberOfElements(), UnstructuredMapping::getNumberOfFaces(), UnstructuredMapping::getNumberOfNodes(), CurveSegment::getNURBS(), TriangleWrapper::getParameters(), TriangleWrapper::getPoints(), Mapping::getRangeBound(), GI_PLOT_THE_OBJECT_AND_EXIT, GI_POINT_COLOUR, GI_TOP_LABEL, improveTri, ReferenceCounting::incrementReferenceCount(), EdgeInfo::initialCurve, TriangleWrapper::initialize(), Mapping::inverseMap(), FaceInfo::loop, EdgeInfo::loopNumber, Mapping::map(), NurbsMapping::map(), Mapping::mappingName, EdgeInfo::master, masterEdge, EdgeInfo::masterEdgeNumber(), max(), maxDist, maximumArea, min(), EdgeInfo::next, Mapping::notPeriodic, NULL, Loop::numberOfEdges(), numberOfFaces, FaceInfo::numberOfLoops, EdgeInfo::orientation, PlotIt::plot(), GenericGraphicsInterface::plotLines(), GenericGraphicsInterface::plotPoints(), r, R, ra, REAL_EPSILON, REAL_MAX, REAL_MIN, refineCurve(), refineTriangulation(), Loop::removeEdge(), RR, s, TriangleWrapperParameters::saveNeighbourList(), TriangleWrapperParameters::saveVoronoi(), SCALE_TWO_SIDES, scaleNodes(), GraphicsParameters::set(), TriangleWrapper::setHoles(), TriangleWrapperParameters::setMaximumArea(), Mapping::setName(), UnstructuredMapping::setNodesElementsAndNeighbours(), TriangleWrapperParameters::setQuietMode(), TriangleWrapperParameters::setVerboseMode(), EdgeInfo::slave, sPrintF(), SQR, Start, CurveSegment::startingPoint, GenericGraphicsInterface::stopReadingCommandFile(), CurveSegment::subCurve, CurveSegment::surfaceNumber, TriangleWrapperParameters::toggleFreezeSegments(), triangleErrorDetected, triangulationSurface, Loop::trimOrientation, and XR.
Referenced by triangulateCompositeSurface().
int CompositeTopology::buildTriangulationForVisibleSurfaces | ( | ) |
Given a global triangulation for all surfaces, build a new triangulation for only visible surfaces.
This routine will build a new triangulation for those sub-surfaces that are still visible.
References UnstructuredMapping::checkConnectivity(), cs, ReferenceCounting::decrementReferenceCount(), UnstructuredMapping::getElementFaces(), UnstructuredMapping::getElements(), UnstructuredMapping::getFaceElements(), UnstructuredMapping::getFaces(), UnstructuredMapping::getNodes(), UnstructuredMapping::getNumberOfElements(), UnstructuredMapping::getNumberOfFaces(), UnstructuredMapping::getNumberOfNodes(), UnstructuredMapping::getTags(), globalTriangulation, globalTriangulationForVisibleSurfaces, ReferenceCounting::incrementReferenceCount(), CompositeSurface::isVisible(), NULL, numberOfFaces, and UnstructuredMapping::setTags().
Referenced by HyperbolicMapping::update().
|
protected |
References aString, cs, EdgeInfo::curve, EdgeInfo::edgeNumber, faceInfoArray, Loop::firstEdge, Mapping::functionPeriodic, EdgeInfo::getEndPoint(), Overture::getGraphicsInterface(), Mapping::getIsPeriodic(), CurveSegment::getNURBS(), EdgeInfo::getStartPoint(), FaceInfo::loop, EdgeInfo::next, Loop::numberOfEdges(), FaceInfo::numberOfLoops, CompositeSurface::numberOfSubSurfaces(), GenericGraphicsInterface::outputString(), EdgeInfo::prev, q, and sPrintF().
Referenced by buildEdgeCurves(), get(), splitAndMergeEdgeCurves(), splitEdge(), and update().
int CompositeTopology::cleanup | ( | ) |
Cleanup temporary storage used while determining the connectivity and global triangulation.
Call this next routine to cleanup objects that are only needed while the topology in the process of being computed or changed. For example, call this routine to release memory once you have computed a valid global triangulation.
References allEdges, faceInfoArray, NULL, numberOfEdgeCurves, numberOfFaces, EdgeInfoArray::pop(), CurveSegment::resetGlobalCount(), s, triangulationSurface, and unusedEdges.
Referenced by buildEdgeCurves(), and ~CompositeTopology().
|
protected |
Determine the number of grid points to put on a curve.
arcLength | (input) : arcLength of the curve defined by the grid points x. |
x | (input) : |
maxCurvature | (output): |
References curvatureTolerance, deltaS, fabs(), max(), and minNumberOfPointsOnAnEdge.
Referenced by buildEdgeCurveBoundaryNodes(), and buildEdgeSegment().
bool CompositeTopology::computeTopology | ( | GenericGraphicsInterface & | gi, |
int | debug = 0 |
||
) |
References aString, buildEdgeCurveBoundaryNodes(), buildEdgeCurves(), buildEdgeCurveSearchTree(), UnstructuredMapping::checkConnectivity(), edgeCurvesAreBuilt, globalTriangulation, mergedCurvesAreValid, GenericGraphicsInterface::outputString(), printEdgeCurveInfo(), recomputeEdgeCurveBoundaryNodes, splitAndMergeEdgeCurves(), sPrintF(), GenericGraphicsInterface::stopReadingCommandFile(), triangulateCompositeSurface(), and triangulationIsValid.
Referenced by CompositeSurface::computeTopology().
EdgeInfo * CompositeTopology::edgeFromNumber | ( | int | n | ) |
References cs, faceInfoArray, Loop::firstEdge, FaceInfo::loop, EdgeInfo::next, NULL, Loop::numberOfEdges(), FaceInfo::numberOfLoops, CompositeSurface::numberOfSubSurfaces(), OV_ABORT, printF(), and s.
Referenced by update().
int CompositeTopology::findBoundaryCurves | ( | int & | numberOfBoundaryCurves, |
Mapping **& | boundaryCurves | ||
) |
Locate boundary curves on a CompositeSurface. Merge boundary edge curves that form a smooth portion of the boundary.
numberOfBoundaryCurves | (output) : number of boundary curves found. |
boundaryCurves | (output) : Boundary curves. |
References bb, boundingBox, cs, delta, EdgeInfo::edgeCurveIsBoundary, End, fabs(), faceInfoArray, Loop::firstEdge, NurbsMapping::getGrid(), Mapping::getGrid(), Mapping::getGridDimensions(), Mapping::getRangeBound(), Mapping::getRangeDimension(), Bound::isFinite(), FaceInfo::loop, NurbsMapping::map(), max(), NurbsMapping::merge(), EdgeInfo::next, Loop::numberOfEdges(), FaceInfo::numberOfLoops, CompositeSurface::numberOfSubSurfaces(), r, Start, and x.
Referenced by CompositeSurface::findBoundaryCurves().
|
virtual |
Get from a data base file.
References EdgeInfo::assignPointers(), aString, boundingBox, buildEdgeCurveSearchTree(), checkConsistency(), cs, curvatureTolerance, curveResolutionTolerance, ReferenceCounting::decrementReferenceCount(), deltaS, edgeCurvesAreBuilt, endPoint, faceInfoArray, GenericDataBase::find(), CurveSegment::get(), EdgeInfo::get(), NurbsMapping::get(), GenericDataBase::get(), EdgeInfoArray::get(), FaceInfo::get(), UnstructuredMapping::get(), GenericDataBase::getDistributed(), globalTriangulation, ReferenceCounting::incrementReferenceCount(), masterEdge, maximumArea, mergedCurvesAreValid, mergeTolerance, minNumberOfPointsOnAnEdge, NULL, numberOfEdgeCurves, numberOfEndPoints, numberOfFaces, CompositeSurface::numberOfSubSurfaces(), q, CurveSegment::resetGlobalCount(), s, signForNormal, splitToleranceFactor, sPrintF(), triangulationIsValid, triangulationSurface, and GenericDataBase::virtualConstructor().
Referenced by CompositeSurface::get().
|
protected |
Prompt for another edge.
References DialogData::addInfoLabel(), aString, cs, EdgeInfo::edgeCurveIsBoundary, faceInfoArray, Loop::firstEdge, GenericGraphicsInterface::getAnswer(), FaceInfo::loop, EdgeInfo::next, SelectionInfo::nSelect, Loop::numberOfEdges(), FaceInfo::numberOfLoops, CompositeSurface::numberOfSubSurfaces(), GenericGraphicsInterface::outputString(), GenericGraphicsInterface::popGUI(), GenericGraphicsInterface::pushGUI(), s, GenericGraphicsInterface::savePickCommands(), SelectionInfo::selection, and DialogData::setExitCommand().
Referenced by update().
Mapping & CompositeTopology::getEdgeCurve | ( | int | number | ) |
Return a reference to an edge curve.
number | (input): edge curve number. |
References allEdges, EdgeInfo::curve, CurveSegment::getNURBS(), NULL, numberOfUniqueEdgeCurves, and setupAllEdges().
Referenced by HyperbolicMapping::buildCurve(), MappingBuilder::buildSurfacePatch(), HyperbolicMapping::createCurveOnSurface(), HyperbolicMapping::drawBoundariesAndCurves(), HyperbolicMapping::drawReferenceSurface(), MappingBuilder::plot(), HyperbolicMapping::update(), and HyperbolicMapping::updateBoundaryConditionMappings().
CompositeTopology::EdgeCurveStatusEnum CompositeTopology::getEdgeCurveStatus | ( | int | number | ) |
Return the status of an edge curve.
number | (input): edge curve number. |
References allEdges, EdgeInfo::edgeCurveIsBoundary, EdgeInfo::edgeCurveIsMaster, edgeCurveIsMerged, edgeCurveIsNotDefined, edgeCurveIsNotMerged, EdgeInfo::edgeCurveIsNotUsed, edgeCurveIsRemoved, EdgeInfo::edgeCurveIsSlave, NULL, numberOfUniqueEdgeCurves, and setupAllEdges().
Referenced by HyperbolicMapping::createCurveOnSurface(), HyperbolicMapping::drawReferenceSurface(), MappingBuilder::plot(), and HyperbolicMapping::update().
Find an edge with the given end points.
References allEdges, EdgeInfo::curve, fabs(), NurbsMapping::getGrid(), CurveSegment::getNURBS(), max(), NULL, numberOfUniqueEdgeCurves, and setupAllEdges().
real CompositeTopology::getMaximumArea | ( | ) | const |
References maximumArea.
int CompositeTopology::getNearestEdge | ( | real | x[3] | ) |
Return the number of the edge curve nearest to the point x.
x[3] | (input): A point in physical space. |
References allEdges, bb, EdgeInfo::curve, delta, EdgeInfo::edgeCurveIsBoundary, EdgeInfo::edgeCurveIsMaster, fabs(), CurveSegment::getNURBS(), Mapping::inverseMap(), NurbsMapping::map(), max(), mergeTolerance, min(), NULL, numberOfUniqueEdgeCurves, r, searchTree, and EdgeInfo::status.
Referenced by HyperbolicMapping::buildCurve().
int CompositeTopology::getNumberOfEdgeCurves | ( | ) |
References allEdges, NULL, numberOfUniqueEdgeCurves, and setupAllEdges().
Referenced by HyperbolicMapping::buildCurve(), MappingBuilder::buildSurfacePatch(), HyperbolicMapping::createCurveOnSurface(), HyperbolicMapping::drawBoundariesAndCurves(), HyperbolicMapping::drawReferenceSurface(), MappingBuilder::plot(), HyperbolicMapping::update(), and HyperbolicMapping::updateBoundaryConditionMappings().
|
inline |
References signForNormal.
Referenced by CompositeSurface::computeTopology(), and CompositeSurface::updateTopology().
|
inline |
References globalTriangulation, and globalTriangulationForVisibleSurfaces.
Referenced by HyperbolicMapping::correctProjectionOfInitialCurve(), HyperbolicMapping::drawReferenceSurface(), evaluateDeviation(), CompositeSurface::insideOrOutside(), main(), HyperbolicMapping::matchToCurve(), CompositeSurface::printStatistics(), CompositeSurface::project(), HyperbolicMapping::project(), update(), and HyperbolicMapping::update().
|
inline |
References NULL, and triangulationSurface.
Referenced by refineVisibleSurfaces().
|
protected |
Initialize parameters such as the suggested deltaS and mergeTolerance.
References averageMergeDistance, boundingBox, boundingBoxExtension, cs, deltaS, edgeCurvesAreBuilt, End, Mapping::getGrid(), Mapping::getRangeBound(), Mapping::getRangeDimension(), CompositeSurface::getTolerance(), Bound::isFinite(), max(), maximumMergeDistance, mergedCurvesAreValid, mergeTolerance, minimumUnmergedDistance, minNumberOfPointsOnAnEdge, numberOfEdgeCurves, CompositeSurface::numberOfSubSurfaces(), REAL_MAX, recomputeEdgeCurveBoundaryNodes, s, Start, and triangulationIsValid.
Referenced by CompositeTopology().
void CompositeTopology::invalidateTopology | ( | ) |
References edgeCurvesAreBuilt, mergedCurvesAreValid, and recomputeEdgeCurveBoundaryNodes.
Referenced by CompositeSurface::computeTopology().
|
protected |
Attempt to join two adjacent edges curves (which normally will be on the same surface).
e,e2 | (input): try to join these two edge curves. |
References CurveSegment::arcLength, EdgeInfoArray::array, axis1, bb, EdgeInfo::curve, ReferenceCounting::decrementReferenceCount(), EdgeInfo::edgeCurveIsBoundary, Loop::edgeInLoop(), EdgeInfo::edgeNumber, End, CurveSegment::endingPoint, EdgeInfo::faceNumber, EdgeInfo::getEndPoint(), Overture::getGraphicsInterface(), CurveSegment::getNURBS(), Mapping::getRangeBound(), EdgeInfo::getStartPoint(), if(), ReferenceCounting::incrementReferenceCount(), NurbsMapping::joinSubCurves(), EdgeInfo::loopNumber, EdgeInfo::loopy, masterEdge, max(), NurbsMapping::merge(), min(), minNumberOfPointsOnAnEdge, CurveSegment::newEndPoint, CurveSegment::newStartPoint, EdgeInfo::next, numberOfEdgeCurves, CurveSegment::numberOfGridPoints, NurbsMapping::numberOfSubCurves(), EdgeInfo::orientation, GenericGraphicsInterface::outputString(), EdgeInfo::prev, q, Loop::removeEdge(), Loop::replaceEdge(), searchTree, Mapping::setGridDimensions(), EdgeInfo::setUnused(), Start, CurveSegment::startingPoint, EdgeInfo::status, CurveSegment::subCurve, NurbsMapping::subCurve(), CurveSegment::surfaceLoop, CurveSegment::surfaceNumber, and unusedEdges.
Referenced by buildEdgeCurves(), and update().
|
protected |
Attempt to merge the edgeCurve e with other edge curves.
e | (input) : try to merge this edge curve, edgeCurve[e] |
eStart | (input): check other edge curves starting at this one. |
References averageMergeDistance, axis1, bb, EdgeInfo::curve, delta, EdgeInfo::edgeCurveIsNotUsed, EdgeInfo::edgeCurveIsSlave, EdgeInfo::edgeNumber, endPoint, fabs(), EdgeInfo::faceNumber, Mapping::functionPeriodic, EdgeInfo::getEndPoint(), Mapping::getIsPeriodic(), CurveSegment::getNURBS(), EdgeInfo::getStartPoint(), Mapping::inverseMap(), isPeriodic, EdgeInfo::loopNumber, NurbsMapping::map(), EdgeInfo::master, max(), maximumMergeDistance, mergeTolerance, mergeTwoEdges(), min(), minimumUnmergedDistance, NULL, q, r, REAL_MIN, searchTree, EdgeInfo::status, x, and xr.
Referenced by splitAndMergeEdgeCurves(), and splitEdge().
Attempt to force a merge between two edge curves. Double check that the merge make sense.
e,e2 | (input): try to merge these two edge curves. |
References averageMergeDistance, EdgeInfo::curve, EdgeInfo::edgeCurveIsBoundary, EdgeInfo::edgeNumber, endPoint, fabs(), EdgeInfo::faceNumber, EdgeInfo::getEndPoint(), CurveSegment::getNURBS(), EdgeInfo::getStartPoint(), Mapping::inverseMap(), Mapping::map(), max(), maximumMergeDistance, mergeTolerance, mergeTwoEdges(), min(), q, r, EdgeInfo::status, and x.
Referenced by update().
|
protected |
References EdgeInfo::curve, EdgeInfo::edgeCurveIsMaster, EdgeInfo::edgeCurveIsSlave, EdgeInfo::edgeNumber, CurveSegment::endingPoint, endPoint, EdgeInfo::eraseEdge(), EdgeInfo::faceNumber, EdgeInfo::getEndPoint(), EdgeInfo::getStartPoint(), EdgeInfo::loopNumber, EdgeInfo::master, masterEdge, CurveSegment::newEndPoint, CurveSegment::newStartPoint, EdgeInfo::next, NULL, EdgeInfo::orientation, EdgeInfo::prev, s, EdgeInfo::setEndPoint(), EdgeInfo::slave, CurveSegment::startingPoint, EdgeInfo::status, unusedEdges, and CurveSegment::usage.
Referenced by merge(), and mergeEdgeCurves().
CompositeTopology & CompositeTopology::operator= | ( | const CompositeTopology & | X | ) |
|
protected |
Print a summary of the number of edge curves of the various types.
References aString, cs, EdgeInfo::edgeCurveIsBoundary, EdgeInfo::edgeCurveIsMaster, EdgeInfo::edgeCurveIsSlave, faceInfoArray, Loop::firstEdge, FaceInfo::loop, EdgeInfo::next, numberOfEdgeCurves, Loop::numberOfEdges(), FaceInfo::numberOfLoops, CompositeSurface::numberOfSubSurfaces(), GenericGraphicsInterface::outputString(), s, and sPrintF().
Referenced by computeTopology(), and update().
|
protected |
Print info about a particular edge curve.
/param e (input): edge curve number
|
virtual |
Put to a data-base.
References aString, boundingBox, c, GenericDataBase::create(), EdgeInfo::curve, EdgeInfo::edgeNumber, Loop::firstEdge, CurveSegment::getCurveNumber(), CurveSegment::getGlobalCount(), EdgeInfo::initialCurve, EdgeInfo::master, NULL, Loop::numberOfEdges(), CurveSegment::put(), EdgeInfo::put(), GenericDataBase::put(), NurbsMapping::put(), GenericDataBase::putDistributed(), q, EdgeInfo::slave, sPrintF(), CurveSegment::surfaceLoop, and GenericDataBase::virtualConstructor().
Referenced by CompositeSurface::put().
void CompositeTopology::setDeltaS | ( | real | ds | ) |
References deltaS, and recomputeEdgeCurveBoundaryNodes.
void CompositeTopology::setMaximumArea | ( | real | maxa | ) |
References maximumArea.
|
protected |
References allEdges, cs, EdgeInfo::edgeCurveIsBoundary, EdgeInfo::edgeCurveIsMaster, faceInfoArray, Loop::firstEdge, FaceInfo::loop, EdgeInfo::next, NULL, Loop::numberOfEdges(), FaceInfo::numberOfLoops, CompositeSurface::numberOfSubSurfaces(), and numberOfUniqueEdgeCurves.
Referenced by getEdgeCurve(), getEdgeCurveStatus(), getEdgeFromEndPoints(), and getNumberOfEdgeCurves().
|
protected |
Split and merge edge curves.
References adjustEndPoints(), aString, averageMergeDistance, bb, boundingBoxExtension, checkConsistency(), cs, delta, EdgeInfo::edgeCurveIsBoundary, EdgeInfo::edgeCurveIsMaster, EdgeInfo::edgeCurveIsNotUsed, EdgeInfo::edgeCurveIsSlave, EdgeInfo::edgeNumber, End, endPoint, fabs(), faceInfoArray, EdgeInfo::faceNumber, Loop::firstEdge, getCPU(), EdgeInfo::getEndPoint(), Mapping::getRangeBound(), EdgeInfo::getStartPoint(), Mapping::inverseMap(), FaceInfo::loop, NurbsMapping::map(), max(), maximumMergeDistance, merge(), mergeTolerance, min(), minimumUnmergedDistance, EdgeInfo::next, Loop::numberOfEdges(), FaceInfo::numberOfLoops, CompositeSurface::numberOfSubSurfaces(), GenericGraphicsInterface::outputString(), q, r, REAL_MAX, s, searchTree, splitEdge(), splitToleranceFactor, sPrintF(), Start, EdgeInfo::status, triangulationIsValid, and x.
Referenced by computeTopology(), and update().
|
protected |
Split an edge curve into two.
Utility routine.
References Loop::addEdge(), CurveSegment::arcLength, EdgeInfoArray::array, axis1, bb, checkConsistency(), EdgeInfo::curve, ReferenceCounting::decrementReferenceCount(), EdgeInfo::edgeCurveIsBoundary, Loop::edgeInLoop(), EdgeInfo::edgeNumber, End, CurveSegment::endingPoint, endPoint, fabs(), EdgeInfo::faceNumber, EdgeInfo::getEndPoint(), NurbsMapping::getGrid(), CurveSegment::getNURBS(), Mapping::getRangeBound(), EdgeInfo::getStartPoint(), ReferenceCounting::incrementReferenceCount(), EdgeInfo::loopNumber, EdgeInfo::loopy, masterEdge, max(), merge(), minNumberOfPointsOnAnEdge, NurbsMapping::moveEndpoint(), CurveSegment::newEndPoint, CurveSegment::newStartPoint, NULL, numberOfEdgeCurves, numberOfEndPoints, CurveSegment::numberOfGridPoints, NurbsMapping::numberOfSubCurves(), EdgeInfo::orientation, q, Loop::replaceEdge(), EdgeInfoArray::resize(), searchTree, Mapping::setGridDimensions(), EdgeInfo::setUnused(), NurbsMapping::split(), NurbsMapping::splitSubCurve(), Start, CurveSegment::startingPoint, EdgeInfo::status, CurveSegment::subCurve, NurbsMapping::subCurve(), CurveSegment::surfaceLoop, CurveSegment::surfaceNumber, unusedEdges, and x.
Referenced by splitAndMergeEdgeCurves(), and update().
|
inline |
References signForNormal.
Referenced by CompositeSurface::updateTopology().
|
protected |
Build a global triangulation for a CompositeSurface.
Given the set of Triangulations for the sub-surfaces and the edge curve information, build a global triangulation. This requires removing duplicate nodes and building the connectivity information between the sub-surfaces.
References abs(), assert, aString, buildSubSurfaceTriangulation(), UnstructuredMapping::checkConnectivity(), cs, ReferenceCounting::decrementReferenceCount(), display(), duplicateNodeFound(), fabs(), getCPU(), UnstructuredMapping::getElementFaces(), UnstructuredMapping::getElements(), UnstructuredMapping::getFaceElements(), UnstructuredMapping::getFaces(), UnstructuredMapping::getNodes(), UnstructuredMapping::getNumberOfBoundaryFaces(), UnstructuredMapping::getNumberOfElements(), UnstructuredMapping::getNumberOfFaces(), UnstructuredMapping::getNumberOfNodes(), globalTriangulation, improveTriangulation(), ReferenceCounting::incrementReferenceCount(), max(), maxDist, maximumArea, mergeTolerance, min(), NULL, numberOfEdgeCurves, numberOfFaces, CompositeSurface::numberOfSubSurfaces(), GenericGraphicsInterface::outputString(), UnstructuredMapping::printConnectivity(), R, REAL_MAX, s, UnstructuredMapping::setNodesAndConnectivity(), UnstructuredMapping::setTags(), signForNormal, sPrintF(), and triangulationSurface.
Referenced by computeTopology(), and update().
|
protected |
References EdgeInfo::curve, EdgeInfo::edgeCurveIsBoundary, EdgeInfo::edgeNumber, endPoint, EdgeInfo::eraseEdge(), EdgeInfo::getEndPoint(), EdgeInfo::getStartPoint(), EdgeInfo::initialCurve, EdgeInfo::master, masterEdge, mergeTolerance, EdgeInfo::next, NULL, EdgeInfo::orientation, EdgeInfo::prev, EdgeInfo::setEndPoint(), EdgeInfo::setStartPoint(), EdgeInfo::slave, EdgeInfo::status, unusedEdges, and CurveSegment::usage.
Referenced by update().
int CompositeTopology::update | ( | ) |
Interactively build the connectivity information for a CompositeSurface.
References SelectionInfo::active, DialogData::addPulldownMenu(), DialogData::addRadioBox(), assert, aString, buildEdgeCurveBoundaryNodes(), buildEdgeCurves(), buildEdgeCurveSearchTree(), UnstructuredMapping::checkConnectivity(), checkConsistency(), GenericGraphicsInterface::createMessageDialog(), cs, GraphicsParameters::curveLineWidth, GenericGraphicsInterface::deleteList(), deltaS, EdgeInfo::edgeCurveIsBoundary, EdgeInfo::edgeCurveIsMaster, EdgeInfo::edgeCurveIsNotUsed, EdgeInfo::edgeCurveIsSlave, edgeCurvesAreBuilt, edgeFromNumber(), EdgeInfo::edgeNumber, MappingProjectionParameters::elementIndex, GenericGraphicsInterface::erase(), UnstructuredMapping::eraseUnstructuredMapping(), errorDialog, UnstructuredMapping::Face, faceInfoArray, Loop::firstEdge, GenericGraphicsInterface::generateNewDisplayList(), GraphicsParameters::get(), getAnotherEdge(), GenericGraphicsInterface::getAnswer(), getCPU(), Mapping::getDomainDimension(), UnstructuredMapping::getElementFaces(), UnstructuredMapping::getElements(), UnstructuredMapping::getFaceElements(), UnstructuredMapping::getFaces(), GenericGraphicsInterface::getGlobalBound(), Overture::getGraphicsInterface(), MappingProjectionParameters::getIntArray(), UnstructuredMapping::getNodes(), UnstructuredMapping::getNumberOfElements(), UnstructuredMapping::getNumberOfNodes(), DialogData::getRadioBox(), Mapping::getRangeDimension(), UnstructuredMapping::getTags(), getTriangulation(), GI_LINE_COLOUR, GI_MAPPING_COLOUR, GI_PLOT_BLOCK_BOUNDARIES, GI_PLOT_END_POINTS_ON_CURVES, GI_PLOT_GRID_POINTS_ON_CURVES, GI_PLOT_LINES_ON_MAPPING_BOUNDARIES, GI_PLOT_MAPPING_EDGES, GI_PLOT_MAPPING_NORMALS, GI_PLOT_SHADED_MAPPING_BOUNDARIES, GI_PLOT_THE_OBJECT_AND_EXIT, GI_PLOT_UNS_BOUNDARY_EDGES, GI_PLOT_UNS_EDGES, GI_PLOT_UNS_FACES, GI_POINT_COLOUR, GI_PUSHBUTTON, GI_UNS_FLAT_SHADING, globalTriangulation, MappingInformation::gp_, MappingInformation::graphXInterface, improveTri, informationDialog, GenericGraphicsInterface::inputFileName(), GenericGraphicsInterface::isGraphicsWindowOpen(), joinEdgeCurves(), FaceInfo::loop, maxDist, maximumArea, mergedCurvesAreValid, mergeEdgeCurves(), mergeTolerance, minNumberOfPointsOnAnEdge, EdgeInfo::next, SelectionInfo::nSelect, NULL, numberOfEdgeCurves, Loop::numberOfEdges(), FaceInfo::numberOfLoops, CompositeSurface::numberOfSubSurfaces(), EdgeInfo::orientation, GenericGraphicsInterface::outputString(), GenericGraphicsInterface::outputToCommandFile(), GenericGraphicsInterface::pause(), PlotIt::plot(), GenericGraphicsInterface::plotLines(), GenericGraphicsInterface::popGUI(), printEdgeCurveInfo(), printF(), UnstructuredMapping::project(), DialogData::pushButtonWidget, GenericGraphicsInterface::pushGUI(), UnstructuredMapping::put(), q, recomputeEdgeCurveBoundaryNodes, s, GenericGraphicsInterface::savePickCommands(), SC, searchTree, SelectionInfo::selection, GraphicsParameters::set(), UnstructuredMapping::setColour(), RadioBox::setCurrentChoice(), DialogData::setExitCommand(), GenericGraphicsInterface::setGlobalBound(), DialogData::setLastPullDownIsHelp(), GenericGraphicsInterface::setPlotDL(), DialogData::setPushButtons(), DialogData::setSensitive(), DialogData::setTextBoxes(), DialogData::setTextLabel(), DialogData::setToggleButtons(), DialogData::setToggleState(), DialogData::setWindowTitle(), UnstructuredMapping::specifyEntity(), splitAndMergeEdgeCurves(), splitEdge(), splitToleranceFactor, sPrintF(), sScanF(), EdgeInfo::status, GenericGraphicsInterface::stopReadingCommandFile(), MappingProjectionParameters::subSurfaceIndex, DialogData::toggleButtonWidget, triangulateCompositeSurface(), triangulationIsValid, triangulationSurface, unMergeEdge(), CompositeSurface::update(), UnstructuredMapping::update(), SelectionInfo::x, and x.
Referenced by CompositeSurface::updateTopology().
|
protected |
An array of pointers to edge curves (which has a pointer to the corresponding CurveSegment object).
Referenced by cleanup(), CompositeTopology(), getEdgeCurve(), getEdgeCurveStatus(), getEdgeFromEndPoints(), getNearestEdge(), getNumberOfEdgeCurves(), and setupAllEdges().
|
protected |
Referenced by initializeTopology(), merge(), mergeEdgeCurves(), and splitAndMergeEdgeCurves().
|
protected |
Referenced by buildEdgeCurveSearchTree(), CompositeTopology(), findBoundaryCurves(), get(), and initializeTopology().
|
protected |
for increasing the size of bounding boxes when searching
Referenced by buildEdgeCurveSearchTree(), CompositeTopology(), initializeTopology(), and splitAndMergeEdgeCurves().
|
protected |
Referenced by adjustEndPoints(), buildEdgeCurveBoundaryNodes(), buildEdgeCurves(), buildEdgeCurveSearchTree(), buildSubSurfaceTriangulation(), buildTriangulationForVisibleSurfaces(), checkConsistency(), edgeFromNumber(), findBoundaryCurves(), get(), getAnotherEdge(), initializeTopology(), printEdgeCurveInfo(), setupAllEdges(), splitAndMergeEdgeCurves(), triangulateCompositeSurface(), and update().
|
protected |
Referenced by buildSubSurfaceTriangulation(), CompositeTopology(), computeNumberOfGridPoints(), and get().
|
protected |
Referenced by buildEdgeSegment(), CompositeTopology(), and get().
|
protected |
Suggested arclength distance between points on the edge curves of the global triangulation.
Referenced by buildEdgeSegment(), CompositeTopology(), computeNumberOfGridPoints(), get(), getDeltaS(), initializeTopology(), setDeltaS(), and update().
|
protected |
Referenced by CompositeTopology(), computeTopology(), get(), initializeTopology(), invalidateTopology(), and update().
|
protected |
Referenced by adjustEndPoints(), buildEdgeCurves(), get(), merge(), mergeEdgeCurves(), mergeTwoEdges(), splitAndMergeEdgeCurves(), splitEdge(), and unMergeEdge().
|
protected |
Referenced by adjustEndPoints(), buildEdgeCurveBoundaryNodes(), buildEdgeCurves(), buildEdgeCurveSearchTree(), buildSubSurfaceTriangulation(), checkConsistency(), cleanup(), CompositeTopology(), edgeFromNumber(), findBoundaryCurves(), get(), getAnotherEdge(), printEdgeCurveInfo(), setupAllEdges(), splitAndMergeEdgeCurves(), and update().
|
protected |
Holds the global triangulation.
Referenced by buildTriangulationForVisibleSurfaces(), CompositeTopology(), computeTopology(), get(), getTriangulation(), triangulateCompositeSurface(), update(), and ~CompositeTopology().
|
protected |
Holds the triangulation when some surfaces are hidden.
Referenced by buildTriangulationForVisibleSurfaces(), CompositeTopology(), getTriangulation(), and ~CompositeTopology().
|
protected |
Referenced by buildEdgeSegment(), buildSubSurfaceTriangulation(), CompositeTopology(), and update().
|
protected |
Referenced by buildEdgeCurves(), buildSubSurfaceTriangulation(), get(), joinEdgeCurves(), mergeTwoEdges(), splitEdge(), and unMergeEdge().
|
protected |
Referenced by buildSubSurfaceTriangulation(), CompositeTopology(), triangulateCompositeSurface(), and update().
|
protected |
Referenced by buildSubSurfaceTriangulation(), CompositeTopology(), get(), getMaximumArea(), setMaximumArea(), triangulateCompositeSurface(), and update().
|
protected |
Referenced by initializeTopology(), merge(), mergeEdgeCurves(), and splitAndMergeEdgeCurves().
|
protected |
Referenced by CompositeTopology(), computeTopology(), get(), initializeTopology(), invalidateTopology(), and update().
|
protected |
tolerance for merging adjacent edge curves.
Referenced by adjustEndPoints(), buildEdgeCurves(), buildEdgeSegment(), get(), getNearestEdge(), initializeTopology(), merge(), mergeEdgeCurves(), splitAndMergeEdgeCurves(), triangulateCompositeSurface(), unMergeEdge(), and update().
|
protected |
Referenced by initializeTopology(), merge(), and splitAndMergeEdgeCurves().
|
protected |
Minimum number of points to place on an edge curve (over-rides deltaS).
Referenced by buildEdgeSegment(), computeNumberOfGridPoints(), get(), initializeTopology(), joinEdgeCurves(), splitEdge(), and update().
|
protected |
|
protected |
Referenced by buildEdgeCurves(), CompositeTopology(), get(), and splitEdge().
|
protected |
|
protected |
|
protected |
Referenced by CompositeTopology(), computeTopology(), initializeTopology(), invalidateTopology(), setDeltaS(), and update().
|
protected |
|
protected |
Referenced by get(), getSignForNormal(), topologyDetermined(), and triangulateCompositeSurface().
|
protected |
splitTolerance = mergeTolerance * splitToleranceFactor
Referenced by CompositeTopology(), get(), splitAndMergeEdgeCurves(), and update().
|
protected |
True if the global triangulation has been built.
Referenced by computeTopology(), get(), initializeTopology(), splitAndMergeEdgeCurves(), and update().
|
protected |
An array of triangulations for each sub-surface.
Referenced by buildEdgeCurves(), buildSubSurfaceTriangulation(), cleanup(), CompositeTopology(), get(), getTriangulationSurface(), triangulateCompositeSurface(), and update().
|
protected |
Referenced by cleanup(), joinEdgeCurves(), mergeTwoEdges(), splitEdge(), and unMergeEdge().