mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +03:00
0029325: Modeling Algorithms - add tool BRepLib_PointCloudShape for generation point cloud for specified shape
Added PLY writing tools RWPly_CafWriter and RWPly_PlyWriterContext. Added tool BRepLib_PointCloudShape generating point cloud from shape in two ways: - random points on surface with specified density; - points from triangulation nodes. StdPrs_ToolTriangulatedShape::ComputeNormals() has been moved to BRepLib_ToolTriangulatedShape for reusing outside of AIS. Command vpointcloud has been extended to use new generation tool. Command writeply has been added to write triangulation or point set into PLY format.
This commit is contained in:
@@ -5,3 +5,4 @@
|
||||
005 gltf_lateload
|
||||
006 obj_read
|
||||
007 obj_write
|
||||
008 ply_write
|
||||
|
14
tests/de_mesh/ply_write/equerre
Normal file
14
tests/de_mesh/ply_write/equerre
Normal file
@@ -0,0 +1,14 @@
|
||||
puts "============"
|
||||
puts "0029325: Modeling Algorithms - add tool BRepLib_PointCloudShape for generation point cloud for specified shape"
|
||||
puts "============"
|
||||
puts ""
|
||||
|
||||
pload XDE OCAF MODELING VISUALIZATION
|
||||
|
||||
set aNbPntsExpected 32581
|
||||
set aTmpPly ${imagedir}/${casename}_tmp.ply
|
||||
lappend occ_tmp_files $aTmpPly
|
||||
|
||||
restore [locate_data_file bug29325_EQUERRE.brep] aShape
|
||||
set aNbPnts [writeply aShape $aTmpPly -pointCloud -dist 0.0 -dens 0.1 -colors 0]
|
||||
if {$aNbPnts != $aNbPntsExpected} { puts "Error: ($aNbPnts) generated while expected ($aNbPntsExpected)" }
|
14
tests/de_mesh/ply_write/sangle
Normal file
14
tests/de_mesh/ply_write/sangle
Normal file
@@ -0,0 +1,14 @@
|
||||
puts "============"
|
||||
puts "0029325: Modeling Algorithms - add tool BRepLib_PointCloudShape for generation point cloud for specified shape"
|
||||
puts "============"
|
||||
puts ""
|
||||
|
||||
pload XDE OCAF MODELING VISUALIZATION
|
||||
|
||||
set aNbPntsExpected 27890
|
||||
set aTmpPly ${imagedir}/${casename}_tmp.ply
|
||||
lappend occ_tmp_files $aTmpPly
|
||||
|
||||
restore [locate_data_file bug29325_SANGLE_DE_FIXATION.brep] aShape
|
||||
set aNbPnts [writeply aShape $aTmpPly -pointCloud -dist 0.0 -dens 0.5 -colors 0]
|
||||
if {$aNbPnts != $aNbPntsExpected} { puts "Error: ($aNbPnts) generated while expected ($aNbPntsExpected)" }
|
@@ -21,7 +21,7 @@ vrotate 0.2 0.0 0.0
|
||||
vdump $::imagedir/${::casename}_green.png
|
||||
|
||||
# random colors mode
|
||||
vpointcloud p s -randcolors
|
||||
vpointcloud p s -randcolors -nonormals
|
||||
vdump $::imagedir/${::casename}_rand.png
|
||||
|
||||
# texture mapping
|
||||
|
Reference in New Issue
Block a user