[MOAB-dev] r2715 - MOAB/trunk
Jason Kraftcheck
kraftche at cae.wisc.edu
Fri Mar 13 11:48:35 CDT 2009
jiangtao_ma at yahoo.com wrote:
> Author: janehu
> Date: 2009-03-13 11:33:25 -0500 (Fri, 13 Mar 2009)
> New Revision: 2715
>
> Modified:
> MOAB/trunk/ReadCGM.cpp
> MOAB/trunk/ReadCGM.hpp
> MOAB/trunk/ReadNCDF.hpp
> Log:
> Added option for tolerance and attribute for porting cgm to moab.
>
> Modified: MOAB/trunk/ReadCGM.cpp
> ===================================================================
> --- MOAB/trunk/ReadCGM.cpp 2009-03-13 14:16:05 UTC (rev 2714)
> +++ MOAB/trunk/ReadCGM.cpp 2009-03-13 16:33:25 UTC (rev 2715)
> @@ -46,6 +46,7 @@
> #include <assert.h>
>
> #include "ReadCGM.hpp"
> +#include "MBReadUtilIface.hpp"
>
> #define GF_CUBIT_FILE_TYPE "CUBIT"
> #define GF_STEP_FILE_TYPE "STEP"
> @@ -100,13 +101,69 @@
> const int* blocks_to_load,
> const int num_blocks)
> {
> - //opts, blocks_to_load and num_blocks are ignored.
> + // blocks_to_load and num_blocks are ignored.
> + //opts is currently designed as following
> + //cgm_opts = [d <tol>|D] [,n <tol>|N] [,l <tol>|L] [,A|a]
> + //currently attribute option is not checked.
> + //-d max. distance deviation between facet and geometry
> + //-D no distance tolerance
> + // (default:0.001)
> + //-n max. normal angle deviation (degrees) between facet and geometry
> + // (default:5)
> + //-N no normal tolerance
> + //-l max. facet edge length
> + //-L no facet edge length maximum
> + // (default:0)
> + //-a force actuation of all CGM attributes
> + //-A disable all CGM attributes
Please use more self-documenting options (and add them to README.IO.).
These are not command-line flags. Drop the "cgm_opts" thing entirely.
Perhaps something like:
FACET_DISTANCE_TOLERANCE=0.001
NO_FACET_DISTANCE_TOLERANCE
FACET_NORMAL_TOLERANCE=5
NO_FACET_NORMAL_TOLERANCE
MAX_FACET_EDGE_LENGTH=1
CGM_ATTRIBS={all|none|name1,name2,...}
The -L option is not required at all (assuming that the default value of 0
implies no maximum edge length.) Similarly, only one of -a or -A is
required, unless the default is to actuate some subset of the attributes.
You could probably drop the NO_FACET_DISTANCE_TOLERANCE and
NO_FACET_NORMAL_TOLERANCE as well, as a value of zero would suffice for
disabling the tolerance entirely.
- jason
More information about the moab-dev
mailing list