Example #1
0
        /// <summary>
        /// Revert to using a mesh representation if that's allowed.
        /// </summary>
        /// <returns>True if the change is made.</returns>
        public bool RevertToMeshIfPossible()
        {
            // Note that CanRevertToMesh() is redundant, but a trivial enough check.
            if (!CanRevertToMesh())
            {
                return(false);
            }

            SetTargetAndFallbackGeometry(TessellatedShapeBuilderTarget.Mesh, TessellatedShapeBuilderFallback.Salvage);

            // We also need to reset the Comparer for TessellatedFaceVertices to a new tolerance.
            // Note that since we are always lowering the tolerance, there should be no concern that
            // previous entries would disappear.  That isn't always true; see the remarks of
            // IFCFuzzyXYZSet.
            TessellatedFaceVertices.ResetTolerance(GetVertexTolerance());
            return(true);
        }