0026106: BRepMesh - revision of data model
authoroan <oan@opencascade.com>
Mon, 9 Oct 2017 10:04:54 +0000 (13:04 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 2 Nov 2018 14:06:40 +0000 (17:06 +0300)
commit7bd071edb13e5aa7a1d3aed4ed4366fe3da83324
tree417ee621ea7a571265d1064a94ea4f99171638c2
parent80da8585f4351470d5034519a8468a88bd12a819
0026106: BRepMesh - revision of data model

Removed tight connections between data structures, auxiliary tools and algorithms in order to create extensible solution, easy for maintenance and improvements;
Code is separated on several functional units responsible for specific operation for the sake of simplification of debugging and readability;
Introduced new data structures enabling possibility to manipulate discrete model of particular entity (edge, wire, face) in order to perform computations locally instead of processing an entire model.

The workflow of updated component can be divided on six parts:
* Creation of model data structure: source TopoDS_Shape passed to algorithm is analyzed and exploded on faces and edges. For each topological entity corresponding reflection is created in data model. Note that underlying algorithms use data model as input and access it via common interface which allows user to create custom data model with necessary dependencies between particular entities;
* Discretize edges 3D & 2D curves: 3D curve as well as associated set of 2D curves of each model edge is discretized in order to create coherent skeleton used as a base in faces meshing process. In case if some edge of source shape already contains polygonal data which suites specified parameters, it is extracted from shape and stored to the model as is. Each edge is processed separately, adjacency is not taken into account;
* Heal discrete model: source TopoDS_Shape can contain problems, such as open-wire or self-intersections, introduced during design, exchange or modification of model. In addition, some problems like self-intersections can be introduced by roughly discretized edges. This stage is responsible for analysis of discrete model in order to detect and repair faced problems or refuse model’s part for further processing in case if problem cannot be solved;
* Preprocess discrete model: defines actions specific for implemented approach to be performed before meshing of faces. By default, iterates over model faces and checks consistency of existing triangulations. Cleans topological faces and its adjacent edges from polygonal data in case of inconsistency or marks face of discrete model as not required for computation;
* Discretize faces: represents core part performing mesh generation for particular face based on 2D discrete data related to processing face. Caches polygonal data associated with face’s edges in data model for further processing and stores generated mesh to TopoDS_Face;
* Postprocess discrete model: defines actions specific for implemented approach to be performed after meshing of faces. By default, stores polygonal data obtained on previous stage to TopoDS_Edge objects of source model.

Component is now spread over IMeshData, IMeshTools, BRepMeshData and BRepMesh units.

<!break>

1. Extend "tricheck" DRAW-command in order to find degenerated triangles.

2. Class BRepMesh_FastDiscret::Parameters has been declared as deprecated.

3. NURBS range splitter: do not split intervals without necessity. Intervals are split only in case if it is impossible to compute normals directly on intervals.

4. Default value of IMeshTools_Parameters::MinSize has been changed. New value is equal to 0.1*Deflection.

5. Correction of test scripts:

1) perf mesh bug27119: requested deflection is increased from 1e-6 to 1e-5 to keep reasonable performance (but still reproducing original issue)
2) bugs mesh bug26692_1, 2: make snapshot of triangulation instead of wireframe (irrelevant)

Correction in upgrade guide.
261 files changed:
adm/UDLIST
dox/dev_guides/upgrade/upgrade.md
dox/user_guides/modeling_algos/images/modeling_algos_mesh_001.svg [new file with mode: 0644]
dox/user_guides/modeling_algos/images/modeling_algos_mesh_002.svg [new file with mode: 0644]
dox/user_guides/modeling_algos/images/modeling_algos_mesh_003.svg [new file with mode: 0644]
dox/user_guides/modeling_algos/images/modeling_algos_mesh_004.svg [new file with mode: 0644]
dox/user_guides/modeling_algos/modeling_algos.md
src/AIS/AIS_RubberBand.cxx
src/BRepMesh/BRepMesh.hxx [deleted file]
src/BRepMesh/BRepMesh_BaseMeshAlgo.cxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_BaseMeshAlgo.hxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_BoundaryParamsRangeSplitter.hxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_CircleInspector.hxx
src/BRepMesh/BRepMesh_CircleTool.cxx
src/BRepMesh/BRepMesh_CircleTool.hxx
src/BRepMesh/BRepMesh_Classifier.cxx
src/BRepMesh/BRepMesh_Classifier.hxx
src/BRepMesh/BRepMesh_ConeRangeSplitter.cxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_ConeRangeSplitter.hxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_Context.cxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_Context.hxx [moved from src/BRepMesh/BRepMesh_Status.hxx with 53% similarity]
src/BRepMesh/BRepMesh_CurveTessellator.cxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_CurveTessellator.hxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_CylinderRangeSplitter.cxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_CylinderRangeSplitter.hxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_DataStructureOfDelaun.cxx
src/BRepMesh/BRepMesh_DataStructureOfDelaun.hxx
src/BRepMesh/BRepMesh_DefaultRangeSplitter.cxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_DefaultRangeSplitter.hxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_Deflection.cxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_Deflection.hxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_Delaun.cxx
src/BRepMesh/BRepMesh_Delaun.hxx
src/BRepMesh/BRepMesh_DelaunayBaseMeshAlgo.cxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_DelaunayBaseMeshAlgo.hxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_DelaunayDeflectionControlMeshAlgo.hxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_DelaunayNodeInsertionMeshAlgo.hxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_DiscretRoot.hxx
src/BRepMesh/BRepMesh_Edge.hxx
src/BRepMesh/BRepMesh_EdgeDiscret.cxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_EdgeDiscret.hxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_EdgeParameterProvider.cxx [deleted file]
src/BRepMesh/BRepMesh_EdgeParameterProvider.hxx
src/BRepMesh/BRepMesh_EdgeTessellationExtractor.cxx
src/BRepMesh/BRepMesh_EdgeTessellationExtractor.hxx
src/BRepMesh/BRepMesh_EdgeTessellator.cxx [deleted file]
src/BRepMesh/BRepMesh_EdgeTessellator.hxx [deleted file]
src/BRepMesh/BRepMesh_FaceAttribute.cxx [deleted file]
src/BRepMesh/BRepMesh_FaceAttribute.hxx [deleted file]
src/BRepMesh/BRepMesh_FaceChecker.cxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_FaceChecker.hxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_FaceDiscret.cxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_FaceDiscret.hxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_FastDiscret.cxx [deleted file]
src/BRepMesh/BRepMesh_FastDiscret.hxx
src/BRepMesh/BRepMesh_FastDiscretFace.cxx [deleted file]
src/BRepMesh/BRepMesh_FastDiscretFace.hxx [deleted file]
src/BRepMesh/BRepMesh_GeomTool.cxx
src/BRepMesh/BRepMesh_GeomTool.hxx
src/BRepMesh/BRepMesh_IEdgeTool.cxx [deleted file]
src/BRepMesh/BRepMesh_IncAllocator.hxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_IncrementalMesh.cxx
src/BRepMesh/BRepMesh_IncrementalMesh.hxx
src/BRepMesh/BRepMesh_MeshAlgoFactory.cxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_MeshAlgoFactory.hxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_MeshTool.cxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_MeshTool.hxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_ModelBuilder.cxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_ModelBuilder.hxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_ModelHealer.cxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_ModelHealer.hxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_ModelPostProcessor.cxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_ModelPostProcessor.hxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_ModelPreProcessor.cxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_ModelPreProcessor.hxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_NURBSRangeSplitter.cxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_NURBSRangeSplitter.hxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_NodeInsertionMeshAlgo.hxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_OrientedEdge.hxx
src/BRepMesh/BRepMesh_PairOfPolygon.hxx [deleted file]
src/BRepMesh/BRepMesh_SelectorOfDataStructureOfDelaun.cxx
src/BRepMesh/BRepMesh_SelectorOfDataStructureOfDelaun.hxx
src/BRepMesh/BRepMesh_ShapeTool.cxx
src/BRepMesh/BRepMesh_ShapeTool.hxx
src/BRepMesh/BRepMesh_ShapeVisitor.cxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_ShapeVisitor.hxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_SphereRangeSplitter.cxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_SphereRangeSplitter.hxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_TorusRangeSplitter.cxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_TorusRangeSplitter.hxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_Triangle.hxx
src/BRepMesh/BRepMesh_UVParamRangeSplitter.hxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_Vertex.hxx
src/BRepMesh/BRepMesh_VertexInspector.hxx
src/BRepMesh/BRepMesh_VertexTool.cxx
src/BRepMesh/BRepMesh_VertexTool.hxx
src/BRepMesh/BRepMesh_WireChecker.cxx [deleted file]
src/BRepMesh/BRepMesh_WireChecker.hxx [deleted file]
src/BRepMesh/BRepMesh_WireInterferenceChecker.cxx [deleted file]
src/BRepMesh/BRepMesh_WireInterferenceChecker.hxx [deleted file]
src/BRepMesh/FILES
src/BRepMeshData/BRepMeshData_Curve.cxx [new file with mode: 0644]
src/BRepMeshData/BRepMeshData_Curve.hxx [new file with mode: 0644]
src/BRepMeshData/BRepMeshData_Edge.cxx [new file with mode: 0644]
src/BRepMeshData/BRepMeshData_Edge.hxx [new file with mode: 0644]
src/BRepMeshData/BRepMeshData_Face.cxx [new file with mode: 0644]
src/BRepMeshData/BRepMeshData_Face.hxx [new file with mode: 0644]
src/BRepMeshData/BRepMeshData_Model.cxx [new file with mode: 0644]
src/BRepMeshData/BRepMeshData_Model.hxx [new file with mode: 0644]
src/BRepMeshData/BRepMeshData_PCurve.cxx [new file with mode: 0644]
src/BRepMeshData/BRepMeshData_PCurve.hxx [new file with mode: 0644]
src/BRepMeshData/BRepMeshData_Wire.cxx [new file with mode: 0644]
src/BRepMeshData/BRepMeshData_Wire.hxx [new file with mode: 0644]
src/BRepMeshData/FILES [new file with mode: 0644]
src/DBRep/DBRep_DrawableShape.cxx
src/DrawResources/Vector.tcl
src/ElCLib/ElCLib.cxx
src/GCPnts/GCPnts_TangentialDeflection.pxx
src/IMeshData/FILES [new file with mode: 0644]
src/IMeshData/IMeshData_Curve.hxx [new file with mode: 0644]
src/IMeshData/IMeshData_Edge.hxx [new file with mode: 0644]
src/IMeshData/IMeshData_Face.hxx [new file with mode: 0644]
src/IMeshData/IMeshData_Model.hxx [new file with mode: 0644]
src/IMeshData/IMeshData_PCurve.hxx [new file with mode: 0644]
src/IMeshData/IMeshData_ParametersList.hxx [new file with mode: 0644]
src/IMeshData/IMeshData_ParametersListArrayAdaptor.hxx [new file with mode: 0644]
src/IMeshData/IMeshData_Shape.hxx [new file with mode: 0644]
src/IMeshData/IMeshData_Status.hxx [new file with mode: 0644]
src/IMeshData/IMeshData_StatusOwner.hxx [new file with mode: 0644]
src/IMeshData/IMeshData_TessellatedShape.hxx [new file with mode: 0644]
src/IMeshData/IMeshData_Types.hxx [new file with mode: 0644]
src/IMeshData/IMeshData_Wire.hxx [new file with mode: 0644]
src/IMeshTools/FILES [new file with mode: 0644]
src/IMeshTools/IMeshTools_Context.hxx [new file with mode: 0644]
src/IMeshTools/IMeshTools_CurveTessellator.hxx [moved from src/BRepMesh/BRepMesh_IEdgeTool.hxx with 62% similarity]
src/IMeshTools/IMeshTools_MeshAlgo.hxx [new file with mode: 0644]
src/IMeshTools/IMeshTools_MeshAlgoFactory.hxx [new file with mode: 0644]
src/IMeshTools/IMeshTools_MeshBuilder.cxx [new file with mode: 0644]
src/IMeshTools/IMeshTools_MeshBuilder.hxx [new file with mode: 0644]
src/IMeshTools/IMeshTools_ModelAlgo.hxx [new file with mode: 0644]
src/IMeshTools/IMeshTools_ModelBuilder.hxx [new file with mode: 0644]
src/IMeshTools/IMeshTools_Parameters.hxx [new file with mode: 0644]
src/IMeshTools/IMeshTools_ShapeExplorer.cxx [new file with mode: 0644]
src/IMeshTools/IMeshTools_ShapeExplorer.hxx [new file with mode: 0644]
src/IMeshTools/IMeshTools_ShapeVisitor.hxx [new file with mode: 0644]
src/IVtkOCC/IVtkOCC_ShapeMesher.cxx
src/MeshTest/MeshTest.cxx
src/MeshTest/MeshTest_CheckTopology.cxx
src/MeshTest/MeshTest_CheckTopology.hxx
src/MeshTest/MeshTest_Debug.cxx
src/MeshTest/MeshTest_DrawableMesh.cxx
src/MeshTest/MeshTest_PluginCommands.cxx
src/QABugs/QABugs_11.cxx
src/QABugs/QABugs_2.cxx
src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx
src/StdPrs/StdPrs_HLRPolyShape.cxx
src/TKMesh/EXTERNLIB
src/TKMesh/PACKAGES
src/VrmlConverter/VrmlConverter_ShadedShape.cxx
src/VrmlData/VrmlData_ShapeConvert.cxx
src/XBRepMesh/XBRepMesh.cxx
tests/bugs/end
tests/bugs/fclasses/bug7287_4
tests/bugs/heal/bug26244
tests/bugs/heal/bug26716
tests/bugs/iges/buc60820_1
tests/bugs/iges/buc60820_2
tests/bugs/iges/buc60823
tests/bugs/iges/bug22487_2
tests/bugs/iges/bug306
tests/bugs/mesh/bug22778
tests/bugs/mesh/bug23105
tests/bugs/mesh/bug23631
tests/bugs/mesh/bug24127
tests/bugs/mesh/bug24938
tests/bugs/mesh/bug25061
tests/bugs/mesh/bug25503_2
tests/bugs/mesh/bug25519
tests/bugs/mesh/bug25628
tests/bugs/mesh/bug25817
tests/bugs/mesh/bug25837_2
tests/bugs/mesh/bug26291
tests/bugs/mesh/bug26372
tests/bugs/mesh/bug26664
tests/bugs/mesh/bug26692_1
tests/bugs/mesh/bug26692_2
tests/bugs/mesh/bug27384_2
tests/bugs/mesh/bug27453
tests/bugs/mesh/bug28247
tests/bugs/mesh/bug28500
tests/bugs/mesh/bug30167 [new file with mode: 0644]
tests/bugs/modalg_2/bug264_0
tests/bugs/modalg_2/bug264_11
tests/bugs/modalg_2/bug264_7
tests/bugs/modalg_2/bug269_1
tests/bugs/modalg_2/bug269_2
tests/bugs/modalg_2/bug269_3
tests/bugs/modalg_2/bug269_4
tests/bugs/modalg_2/bug291
tests/bugs/modalg_2/bug292
tests/bugs/modalg_2/bug358
tests/bugs/modalg_2/bug397
tests/bugs/modalg_4/bug825
tests/bugs/modalg_7/bug29311_17
tests/bugs/modalg_7/bug29701_1
tests/bugs/modalg_7/bug29701_2
tests/bugs/modalg_7/bug29701_3
tests/bugs/modalg_7/bug29807_b3a
tests/bugs/moddata_1/bug15
tests/bugs/moddata_1/bug15519
tests/bugs/moddata_1/bug21122
tests/bugs/moddata_1/bug22759
tests/bugs/moddata_2/bug428
tests/bugs/moddata_2/fra62476_2
tests/bugs/moddata_3/bug25737_1
tests/bugs/vis/buc60858
tests/bugs/vis/bug19_1
tests/bugs/vis/bug22313
tests/bugs/vis/bug22849
tests/bugs/vis/bug288_5
tests/bugs/vis/bug344
tests/bugs/xde/bug22898
tests/de_mesh/shape_write_stl/A10
tests/de_mesh/shape_write_stl/A11
tests/de_mesh/shape_write_stl/A4
tests/de_mesh/shape_write_stl/A7
tests/de_mesh/shape_write_stl/A8
tests/de_mesh/shape_write_stl/A9
tests/mesh/data/advanced/A1
tests/mesh/data/advanced/A6
tests/mesh/data/advanced/A9
tests/mesh/data/advanced/B8
tests/mesh/data/standard/B5
tests/mesh/data/standard/B9
tests/mesh/data/standard/C7
tests/mesh/data/standard/C9
tests/mesh/data/standard/G1
tests/mesh/data/standard/H5
tests/mesh/data/standard/J8
tests/mesh/data/standard/L2
tests/mesh/data/standard/M1
tests/mesh/data/standard/M4
tests/mesh/data/standard/M8
tests/mesh/data/standard/Q3
tests/mesh/data/standard/U2
tests/mesh/data/standard/U5
tests/mesh/data/standard/U6
tests/mesh/data/standard/U7
tests/mesh/data/standard/V2
tests/mesh/data/standard/V4
tests/mesh/data/standard/V7
tests/mesh/data/standard/W2
tests/mesh/data/standard/W4
tests/mesh/data/standard/W5
tests/mesh/data/standard/W6
tests/mesh/data/standard/W7
tests/mesh/data/standard/X1
tests/mesh/data/standard/X2
tests/mesh/data/standard/X4
tests/mesh/end
tests/perf/mesh/bug27119