1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00
nbv e98e39903b 0025410: Tool for extended check of validity of the curve on the surface
Modifications:
1. class BOPTools_AlgoTools
1.1. method
 Standard_Boolean BOPTools_AlgoTools::ComputeTolerance
  (const Handle(Geom_Curve)& theCurve3D,
   const Handle(Geom2d_Curve)& theCurve2D,
   const Handle(Geom_Surface)& theSurf,
   const Standard_Real theFirst,
   const Standard_Real theLast,
   Standard_Real& theMaxDist,
   Standard_Real& theMaxPar)
  It computes the max distance between points taken from 3D and 2D curves by the same parameter

1.2. method
 Standard_Boolean BOPTools_AlgoTools::ComputeTolerance
  (const TopoDS_Face& theFace,
   const TopoDS_Edge& theEdge,
   Standard_Real& theMaxDist,
   Standard_Real& theParameter)
  Computes the valid value of the tolerance for the edge using the function above.

2.  Added possibility to check shape on the validity of the curves on the surfaces.
2.1. New status BOPAlgo_InvalidCurveOnSurface has been added to the enumeration BOPAlgo_CheckStatus
2.2. class BOPAlgo_ArgumentAnalyzer
 method
   void BOPAlgo_ArgumentAnalyzer::TestCurveOnSurface()
 It checks each edge/face pair in the shape using the method ComputeTolerance from BOPTools_AlgoTools and stores invalid pairs to myResults.
 Invalid pairs are those which contain the edge with tolerance value less then the value computed by the ComputeTolerance method.

2.3. class BOPAlgo_CheckResult
 Added new fields:
    myMaxDist1 : Real from Standard;
    myMaxDist2 : Real from Standard;
    myMaxPar1  : Real from Standard;
    myMaxPar2  : Real from Standard;
 and corresponding setters and getters.
 These fields are used to store the results of the TestCurveOnSurface() check.

3. Added new option to the bopargcheck command and two new commands.
class BOPTest_CheckCommands
3.1. command bopargcheck
 As it is using the BOPAlgo_ArgumentAnalyzer class to check the shapes
 it checks also the validity of the curves on the surfaces.
 The output for the invalid shapes is following:

Draw[]> bopargcheck b2 /ic #f
Made faulty shape: s1COnS_1 (MaxDist = 0.0013334343378738308, MaxPar = 0.02884285498274167)
Made faulty shape: s1COnS_2 (MaxDist = 0.0013334340648766174, MaxPar = 0.02884285497934707)
Made faulty shape: s1COnS_3 (MaxDist = 0.0013335086668628978, MaxPar = 1.4133051942712607)
Made faulty shape: s1COnS_4 (MaxDist = 0.0013335086525838983, MaxPar = 1.4133051942713901)
Faulties for FIRST  shape found : 4
---------------------------------
Shapes are not suppotrted by BOP: NO
Self-Intersections              : NO
Check for SI has been aborted   : NO
Too small edges                 : NO
Bad faces                       : NO
Too close vertices              : NO
Too close edges                 : NO
Shapes with Continuity C0       : NO
Invalid Curve on Surface        : YES  Cases(4)  Total shapes(8)

Faulties for SECOND  shape found : 0

 The compounds s1COnS_* contain pair of edge and face.
 MaxDist is maximal distance between points taken from 3D curve of the edge and 2D curve of that edge on the face.
 MaxPar is a parameter in which the MaxDist is reached.

 To disable this check it is necessary to use option /S (bopargcheck shape /S).

3.2. command xdistef
 Usage of the command:
   xdistef edge face
 It computes distance between points taken from 3D curve of the edge and 2D curve of that edge on the face.
 Example:
Draw[]> explode s1COnS_1
s1COnS_1_1 s1COnS_1_2
Draw[]> whatis s1COnS_1_1
s1COnS_1_1 is a shape EDGE FORWARD Modified Orientable
Draw[]> whatis s1COnS_1_2
s1COnS_1_2 is a shape FACE FORWARD Modified Orientable
Draw[]> xdistef s1COnS_1_1 s1COnS_1_2
Max Distance = 0.0013334343378738308; Parameter on curve = 0.02884285498274167

3.3. command checkcurveonsurf
 Usage of the command:
  checkcurveonsurf shape.
 It checks each edge/face pair in the shape using the method ComputeTolerance from BOPTools_AlgoTools.
Example:
Draw[]> checkcurveonsurf b2
Invalid curves on surface:
edge e_0 on face f_0 (max dist: 0.0013334343378738, parameter on curve: 0.0288428549827417)
edge e_1 on face f_0 (max dist: 0.0013334340648766, parameter on curve: 0.0288428549793471)
edge e_2 on face f_1 (max dist: 0.0013335086668629, parameter on curve: 1.4133051942712607)
edge e_3 on face f_1 (max dist: 0.0013335086525839, parameter on curve: 1.4133051942713901)

Sugestions to fix the shape:
explode b2 e;
settolerance b2_6 0.0013335086668629;
settolerance b2_7 0.0013334343378738;
settolerance b2_8 0.0013334340648766;
settolerance b2_10 0.0013335086525839;

The command gives suggestions to fix the shape by increasing tolerance values of the invalid edges.
In some cases the tolerance values suggested by the tool can be very large.
Such values should be used very carefully, because setting large tolerance values to the sub-shapes
of the shape can make it non valid (self-interfered) or lead to unexpected result when using
such shapes in some operations (boolean for example).

Test case for issue CR25410
2014-10-30 14:27:29 +03:00
2014-10-30 12:58:05 +03:00

Open CASCADE Technology
=======================

This directory contains sources of Open CASCADE Technology (OCCT), a software
development platform providing services for 3D surface and solid modeling, CAD 
data exchange, and visualization. Most of OCCT functionality is available in 
the form of C++ libraries. OCCT can be best applied in development of software 
dealing with 3D modeling (CAD), manufacturing / measuring (CAM) or numerical 
simulation (CAE).

License
-------

Open CASCADE Technology is free software; you can redistribute it and / or 
modify it under the terms of the GNU Lesser General Public 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.

Alternatively, Open CASCADE Technology may be used under the terms of Open 
CASCADE commercial license or contractual agreement.

Note that Open CASCADE Technology is provided on an "AS IS" basis, WITHOUT 
WARRANTY OF ANY KIND. The entire risk related to any use of the OCCT code and 
materials is on you. See the license text for formal disclaimer.

Packaging
---------

You can receive certified version of OCCT code in different packages.

- Snapshot of Git repository: contains only bare sources of OCCT; many C++ 
  files, HTML documentation, and project files / makefiles for building OCCT
  need to be generated.

- Complete source archive: contains all sources of OCCT, including C++ files
  generated by WOK, HTML and PDF documentation, and projects / makefiles for 
  building on all officially supported platforms.

- Binary package (platform-specific): in addition to complete source archive, 
  it includes binaries of OCCT and third-party libraries built on one platform. 
  This package allows using OCCT immediately after installation.

Certified versions of OCCT can be downloaded from http://www.opencascade.org

You can also find OCCT pre-installed on your system, or install it from 
packages provided by a third party. Note that packaging and functionality
of such versions can be different from certified releases. Please consult 
documentation accompanyog your version for details.

Documentation
-------------

Open file doc/html/index.html to browse HTML documentation.

If HTML documentation is not available in your package, you can:

- Generate it from sources. 

  You need to have Tcl and Doxygen 1.8.4 (or above) installed on your system.
  and accessible in your environment (check environment variable PATH).
  Run batch file *gendoc.bat* on Windows or Bash scriot *gendoc.sh* on Linux
  or Mac OS X to (re)generate documentation.

- Read documentation in source plain text (MarkDown) format found in 
  subfolder *dox*

See *dox/dev_guides/documentation/documentation.md* for details.

Building
--------

In most cases you need to rebuild OCCT on your platform (OS, compiler) before
using it in your project, to ensure binary compatibility.

Consult the file *dox/dev_guides/building/building.md* for instructions on
building OCCT from sources on supported platforms.

Version
-------

The current version of OCCT can be consulted in the file
*src/Standard/Standard_Version.hxx*

Development
-----------

For information regarding OCCT code development please consult the official 
OCCT Collaborative Development Portal:
http://dev.opencascade.org
Description
Mirror of OpenCascade OCCT, at https://git.dev.opencascade.org/repos/occt
Readme 167 MiB
Languages
C++ 98.1%
CMake 1%
Tcl 0.3%
C 0.2%
GLSL 0.1%