mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0023705: Isoline in the AIS viewer is not trimmed
Signed-off-by: skv <skv@opencascade.com>
This commit is contained in:
parent
1f63e9254a
commit
20c76d1afc
@ -146,6 +146,7 @@ void StdPrs_WFDeflectionRestrictedFace::Add
|
||||
gp_Pnt dummypnt;
|
||||
Standard_Real ddefle= Max(UMax-UMin, VMax-VMin) * aDrawer->DeviationCoefficient();
|
||||
TColgp_SequenceOfPnt2d tabP;
|
||||
Standard_Real aHatchingTol = 1.e100;
|
||||
|
||||
UMin = VMin = 1.e100;
|
||||
UMax = VMax = -1.e100;
|
||||
@ -173,6 +174,7 @@ void StdPrs_WFDeflectionRestrictedFace::Add
|
||||
UMax = Max(P2.X(), UMax);
|
||||
VMin = Min(P2.Y(), VMin);
|
||||
VMax = Max(P2.Y(), VMax);
|
||||
aHatchingTol = Min(P1.SquareDistance(P2), aHatchingTol);
|
||||
|
||||
if(Orient == TopAbs_FORWARD ) {
|
||||
//isobuild.Trim(P1,P2);
|
||||
@ -219,6 +221,8 @@ void StdPrs_WFDeflectionRestrictedFace::Add
|
||||
UMax = Max(P2.X(), UMax);
|
||||
VMin = Min(P2.Y(), VMin);
|
||||
VMax = Max(P2.Y(), VMax);
|
||||
aHatchingTol = Min(P1.SquareDistance(P2), aHatchingTol);
|
||||
|
||||
if(Orient == TopAbs_FORWARD ) {
|
||||
// isobuild.Trim(P1,P2);
|
||||
tabP.Append(P1);
|
||||
@ -240,8 +244,13 @@ void StdPrs_WFDeflectionRestrictedFace::Add
|
||||
FFaceTimer2.Start();
|
||||
#endif
|
||||
|
||||
// Compute the hatching tolerance.
|
||||
aHatchingTol *= 0.1;
|
||||
aHatchingTol = Max(Precision::Confusion(), aHatchingTol);
|
||||
aHatchingTol = Min(1.e-5, aHatchingTol);
|
||||
|
||||
// load the isos
|
||||
Hatch_Hatcher isobuild(1.e-5,ToolRst.IsOriented());
|
||||
Hatch_Hatcher isobuild(aHatchingTol, ToolRst.IsOriented());
|
||||
Standard_Boolean UClosed = aFace->IsUClosed();
|
||||
Standard_Boolean VClosed = aFace->IsVClosed();
|
||||
|
||||
|
@ -56,6 +56,7 @@
|
||||
#include <Graphic3d_AspectFillArea3d.hxx>
|
||||
#include <Image_AlienPixMap.hxx>
|
||||
#include <Prs3d_ShadingAspect.hxx>
|
||||
#include <Prs3d_IsoAspect.hxx>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
@ -3556,6 +3557,10 @@ void ViewerTest::Commands(Draw_Interpretor& theCommands)
|
||||
const char *group = "AIS_Display";
|
||||
|
||||
// display
|
||||
theCommands.Add("visos",
|
||||
"visos [name1 ...] [nbUIsos nbVIsos IsoOnPlane(0|1)]\n"
|
||||
"\tIf last 3 optional parameters are not set prints numbers of U-, V- isolines and IsoOnPlane.\n",
|
||||
__FILE__, visos, group);
|
||||
|
||||
theCommands.Add("vdisplay",
|
||||
"vdisplay : vdisplay2 name1 [name2] ... [name n] ",
|
||||
|
22
tests/bugs/vis/bug23705
Executable file
22
tests/bugs/vis/bug23705
Executable file
@ -0,0 +1,22 @@
|
||||
puts "========"
|
||||
puts "CR23705"
|
||||
puts "========"
|
||||
puts ""
|
||||
###############################################################
|
||||
## Isoline in the AIS viewer is not trimmed
|
||||
###############################################################
|
||||
|
||||
restore [locate_data_file bug23705_plancher20igs_face.brep] result
|
||||
|
||||
vinit
|
||||
visos 10 10 1
|
||||
|
||||
vdisplay result
|
||||
vfit
|
||||
|
||||
set x 326
|
||||
set y 295
|
||||
|
||||
checkcolor $x $y 0 0 0
|
||||
|
||||
set only_screen 1
|
Loading…
x
Reference in New Issue
Block a user