1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-08 14:17:06 +03:00

0025936: Reusable data structure for 2D tesselation (3- and 4-nodal mesh)

* Replaced all arrays in Poly_Triangulation to NCollection_Vector.
* Poly_Triangulation now does not provide access to whole arrays stored inside it. Only by one element.
* New classes Poly_Element, Poly_Mesh.
* New classes BinMDataStd_MeshDriver, XmlMDataStd_MeshDriver, TDataStd_Mesh - Mesh attribute for OCAF
* Test cases on CAD mesh attribute
This commit is contained in:
akz
2016-09-08 14:34:59 +03:00
parent 5c7744eaef
commit d359cc102a
77 changed files with 2606 additions and 837 deletions

41
tests/caf/basic/N1 Normal file
View File

@@ -0,0 +1,41 @@
#INTERFACE CAF
# Basic attributes
#
# Testing attribute: TDataStd_Mesh
#
# Testing command: SetMesh
# Testing command: DumpMesh
#
puts "caf001-N1"
# Make a sphere and produce triangulation
psphere s 100
vdisplay s
explode s f
# Create a XML document
NewDocument D XmlXCAF
# Set mesh from the spherical face
SetMesh D 0:1 s_1
# Print the mesh data
set dump1 [DumpMesh D 0:1]
# Save document on disk.
SaveAs D "test.xml"
# Close and open the document again.
Close D
Open test.xml DD
# Print mesh data
set dump2 [DumpMesh DD 0:1]
# Check data
if { ${dump1}!=${dump2} } {
puts "TDataStd_Mesh(XML) attribute: Error"
return
}
puts "TDataStd_Mesh(XML) attribute: OK"

42
tests/caf/basic/N2 Normal file
View File

@@ -0,0 +1,42 @@
#INTERFACE CAF
# Basic attributes
#
# Testing attribute: TDataStd_Mesh
#
# Testing command: SetMesh
# Testing command: DumpMesh
# Test : Binary file format
#
puts "caf001-N2"
# Make a sphere and produce triangulation
psphere s 100
vdisplay s
explode s f
# Create a binary document
NewDocument D BinXCAF
# Set mesh from the spherical face
SetMesh D 0:1 s_1
# Print the mesh data
set dump1 [DumpMesh D 0:1]
# Save document on disk.
SaveAs D "test.xbf"
# Close and open the document again.
Close D
Open test.xbf DD
# Print mesh data
set dump2 [DumpMesh DD 0:1]
# Check data
if { ${dump1}!=${dump2} } {
puts "TDataStd_Mesh(BIN) attribute: Error"
return
}
puts "TDataStd_Mesh(BIN) attribute: OK"