mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0032241: Mesh - wrong shading display of thrusections [regression since OCCT 7.4.0]
0032422: Mesh - Weird rendering 0029641: Mesher produce 'bad' result for extruded spline with given deviation coefficient Added method BRepMesh_NURBSRangeSplitter::getUndefinedInterval() intended to compute checkpoint parameters for those NURBS surfaces which have no intervals at all. In this case number of poles is used to produce artificial regular grid which can be refined further. Add at least one midpoint for surfaces with one interval and only two poles. Added BRepMesh_ExtrusionRangeSplitter and BRepMesh_UndefinedRangeSplitter derivatives from BRepMesh_NURBSRangeSplitter intended to handle special cases of extrusion surfaces and general surfaces with undefined parameters.
This commit is contained in:
45
src/BRepMesh/BRepMesh_ExtrusionRangeSplitter.cxx
Normal file
45
src/BRepMesh/BRepMesh_ExtrusionRangeSplitter.cxx
Normal file
@@ -0,0 +1,45 @@
|
||||
// Created on: 2022-09-07
|
||||
// Copyright (c) 2022 OPEN CASCADE SAS
|
||||
// Created by: Oleg AGASHIN
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <BRepMesh_ExtrusionRangeSplitter.hxx>
|
||||
|
||||
//=======================================================================
|
||||
// Function: getUndefinedIntervalNb
|
||||
// Purpose :
|
||||
//=======================================================================
|
||||
Standard_Integer BRepMesh_ExtrusionRangeSplitter::getUndefinedIntervalNb(
|
||||
const Handle(Adaptor3d_Surface)& theSurface,
|
||||
const Standard_Boolean /*isU*/,
|
||||
const GeomAbs_Shape theContinuity) const
|
||||
{
|
||||
// Here we need just a regular grid along dimension with no
|
||||
// geometrical data regarding intervals like extrusion surface.
|
||||
const Handle(Adaptor3d_Curve) aCurve = theSurface->BasisCurve();
|
||||
Standard_Integer aIntervalsNb = aCurve->NbIntervals(theContinuity);
|
||||
if (aIntervalsNb == 1)
|
||||
{
|
||||
const GeomAbs_CurveType aCurveType = aCurve->GetType();
|
||||
const Standard_Boolean isBSplineCurve =
|
||||
aCurveType == GeomAbs_BezierCurve ||
|
||||
aCurveType == GeomAbs_BSplineCurve;
|
||||
|
||||
if (isBSplineCurve)
|
||||
{
|
||||
aIntervalsNb = aCurve->NbPoles() - 1;
|
||||
}
|
||||
}
|
||||
|
||||
return aIntervalsNb;
|
||||
}
|
Reference in New Issue
Block a user