Go to the documentation of this file.
54 const edge&
e = featureEdges[feI];
56 if( newPointLabel[
e[0]] == -1 )
58 if( newPointLabel[
e[1]] == -1 )
65 if( newPointLabel[pI] < 0 )
68 pCopy[newPointLabel[pI]] =
points[pI];
72 file <<
"# vtk DataFile Version 3.0\n";
73 file <<
"vtk output\n";
75 file <<
"DATASET POLYDATA\n";
78 file <<
"POINTS " << pCopy.size() <<
" float\n";
81 const point&
p = pCopy[pI];
82 file <<
p.x() <<
' ' <<
p.y() <<
' ' <<
p.z() <<
'\n';
85 file <<
"\nLINES " << featureEdges.size()
86 <<
' ' << 3*featureEdges.size() <<
nl;
87 forAll(featureEdges, edgeI)
89 const edge&
e = featureEdges[edgeI];
90 file <<
"2 " << newPointLabel[
e[0]]
98 "void exportFeatureEdges(const triSurf&, const fileName&)"
102 int main(
int argc,
char *argv[])
119 Info <<
"Out file no ext " << outFileNoExt <<
endl;
120 Info <<
"Extension " << outExtension <<
endl;
136 forAll(subsetIDs, subsetI)
147 fileName fName = outFileNoExt+
"_facetSubset_"+subsetName[0];
148 fName +=
'.'+outExtension;
156 fileName fName = outFileNoExt+
"_featureEdges";
static SLList< string > validArgs
A list of valid (mandatory) arguments.
const stringList & args() const
Return arguments.
A class for handling file names.
#define forAll(list, i)
Loop across all elements in list.
Template functions to aid in the implementation of demand driven data.
const pointField & points() const
access to points
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
Extract command arguments and options from the supplied argc and argv parameters.
Ostream & endl(Ostream &os)
Add newline and flush stream.
fileName lessExt() const
Return file name without extension (part before last .)
const edgeLongList & featureEdges() const
access to feature edges
const Foam::HashTable< string > & options() const
Return options.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
int main(int argc, char *argv[])
This is a typedef for LongList<edge>
static HashTable< string > validOptions
A list of valid options.
word ext() const
Return file name extension (part after last .)
const double e
Elementary charge.
errorManipArg< error, int > exit(error &err, const int errNo=1)
void facetSubsetIndices(DynList< label > &) const
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void writeSurface(const fileName &) const
word facetSubsetName(const label) const
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
void copySurface(const wordList &, triSurf &) const
copies selected patches/subsets to an already created mesh
static void noParallel()
Remove the parallel options.
Foam::argList args(argc, argv)
void exportFeatureEdges(const triSurf &origSurf, const fileName &edgeFileName)