1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0027720: HLRBrep_Algo BSpline missing edges

The algorithm that builds outlines ("silhouettes") makes an outline in 2d parametric space of the surface starting from some previously detected point where normal is orthogonal to direction of view. So, the surface is previously discretized into (m*n) sample points and some of them become starting points for future outlines.

    If the surface has non-uniform parametrization and/or some local extremums of curvature, the outlines can not be built without breaks, so there are several groups of consequent outlines in this case. Unfortunately, it leads to the situation when current number of sample points becomes insufficient to build all the parts of outlines.

    The idea is to detect the "holes" between already constructed parts of outlines and then complete the construction.

New auxiliary draw command for testing of HLR.

Correction according to the remarks.

Update of test case according to the developer's directive
This commit is contained in:
jgv
2016-09-08 18:20:57 +03:00
committed by bugmaster
parent b1c5466550
commit 8d795b5130
16 changed files with 600 additions and 30 deletions

View File

@@ -16,7 +16,9 @@
#include <gp_Pnt.hxx>
#include <IntSurf_PntOn2S.hxx>
IntSurf_PntOn2S::IntSurf_PntOn2S () : pt(0,0,0),u1(0),v1(0),u2(0),v2(0) {}
IntSurf_PntOn2S::IntSurf_PntOn2S ()
: pt(0,0,0),u1(0),v1(0),u2(0),v2(0)
{}
void IntSurf_PntOn2S::SetValue (const gp_Pnt& Pt,
const Standard_Boolean OnFirst,
@@ -49,6 +51,29 @@ void IntSurf_PntOn2S::SetValue (const Standard_Boolean OnFirst,
}
}
gp_Pnt2d IntSurf_PntOn2S::ValueOnSurface(const Standard_Boolean OnFirst) const
{
gp_Pnt2d PointOnSurf;
if (OnFirst)
PointOnSurf.SetCoord(u1,v1);
else
PointOnSurf.SetCoord(u2,v2);
return PointOnSurf;
}
void IntSurf_PntOn2S::ParametersOnSurface(const Standard_Boolean OnFirst,
Standard_Real& U,
Standard_Real& V) const
{
if (OnFirst) {
U = u1;
V = v1;
}
else {
U = u2;
V = v2;
}
}
Standard_Boolean IntSurf_PntOn2S::IsSame( const IntSurf_PntOn2S& theOterPoint,
const Standard_Real theTol3D,

View File

@@ -25,6 +25,7 @@
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
class gp_Pnt;
class gp_Pnt2d;
//! This class defines the geometric informations
@@ -58,24 +59,31 @@ public:
//! Set the values of the point in the parametric
//! space of one of the surface.
void SetValue (const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2);
void SetValue (const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2) ;
//! Returns the point in 3d space.
const gp_Pnt& Value() const;
const gp_Pnt& Value() const;
//! Returns the point in 2d space of one of the surfaces.
Standard_EXPORT gp_Pnt2d ValueOnSurface (const Standard_Boolean OnFirst) const;
//! Returns the parameters of the point on the first surface.
void ParametersOnS1 (Standard_Real& U1, Standard_Real& V1) const;
//! Returns the parameters of the point on the second surface.
void ParametersOnS2 (Standard_Real& U2, Standard_Real& V2) const;
void ParametersOnS2 (Standard_Real& U2, Standard_Real& V2) const;
//! Returns the parameters of the point in the
//! parametric space of one of the surface.
Standard_EXPORT void ParametersOnSurface (const Standard_Boolean OnFirst, Standard_Real& U, Standard_Real& V) const;
//! Returns the parameters of the point on both surfaces.
void Parameters (Standard_Real& U1, Standard_Real& V1, Standard_Real& U2, Standard_Real& V2) const;
void Parameters (Standard_Real& U1, Standard_Real& V1, Standard_Real& U2, Standard_Real& V2) const;
//! Returns TRUE if 2D- and 3D-coordinates of theOterPoint are equal to
//! corresponding coordinates of me (with given tolerance).
//! If theTol2D < 0.0 we will compare 3D-points only.
Standard_EXPORT Standard_Boolean IsSame (const IntSurf_PntOn2S& theOterPoint, const Standard_Real theTol3D = 0.0, const Standard_Real theTol2D = -1.0) const;
Standard_EXPORT Standard_Boolean IsSame (const IntSurf_PntOn2S& theOtherPoint, const Standard_Real theTol3D = 0.0, const Standard_Real theTol2D = -1.0) const;