Fix a Far::StencilTablesFactory crash bug on 'perfect' topology

Torii (and other planar topologies) are made entirely of regular b-spline patches and do not
generate sub-patches through adaptive isolation: we need to make sure that we construct
stencil tables with singular stencils for the coarse vertices instead of returning empty
tables (and crash in the limit stencils factory)
This commit is contained in:
manuelk 2014-11-25 11:48:49 -08:00
parent 5c99660f47
commit c2e8148efc

View File

@ -61,11 +61,11 @@ StencilTablesFactory::Create(TopologyRefiner const & refiner,
StencilTables * result = new StencilTables;
int maxlevel = std::min(int(options.maxLevel), refiner.GetMaxLevel());
if (maxlevel==0) {
if (maxlevel==0 and (not options.generateControlVerts)) {
return result;
}
// maxsize reflects the size of the default supporting basis factorized
// 'maxsize' reflects the size of the default supporting basis factorized
// in the stencils, with a little bit of head-room. Each subdivision scheme
// has a set valence for 'regular' vertices, which drives the size of the
// supporting basis of control-vertices. The goal is to reduce the number
@ -101,7 +101,7 @@ StencilTablesFactory::Create(TopologyRefiner const & refiner,
StencilAllocator * srcAlloc = &allocators[0],
* dstAlloc = &allocators[1];
///
//
// Interpolate stencils for each refinement level using
// TopologyRefiner::InterpolateLevel<>()
//