mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-09 18:50:54 +03:00
0029868: Draw Harness - help message for readstl command is unclear
readstl syntax has been modified, so that it creates a single-face triangulation by default. The argument "trinagulation" is no more supported. The new argument "-brep" has been introduced to generate a compound of per-triangle faces instead (old default behavior of the command).
This commit is contained in:
parent
b2cd90e2b6
commit
4c4420dfe9
@ -416,7 +416,7 @@ Standard_Boolean RWStl_Reader::ReadBinary (Standard_IStream& theStream,
|
|||||||
const std::streamsize aDataToRead = aNbFacesInBuffer * aFaceDataLen;
|
const std::streamsize aDataToRead = aNbFacesInBuffer * aFaceDataLen;
|
||||||
if (theStream.read (aBuffer, aDataToRead).gcount() != aDataToRead)
|
if (theStream.read (aBuffer, aDataToRead).gcount() != aDataToRead)
|
||||||
{
|
{
|
||||||
Message::DefaultMessenger()->Send ("Error: read filed", Message_Fail);
|
Message::DefaultMessenger()->Send ("Error: binary STL read failed", Message_Fail);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
aBufferPtr = aBuffer;
|
aBufferPtr = aBuffer;
|
||||||
|
@ -105,36 +105,61 @@ static Standard_Integer readstl(Draw_Interpretor& theDI,
|
|||||||
Standard_Integer theArgc,
|
Standard_Integer theArgc,
|
||||||
const char** theArgv)
|
const char** theArgv)
|
||||||
{
|
{
|
||||||
if (theArgc < 3)
|
TCollection_AsciiString aShapeName, aFilePath;
|
||||||
|
bool toCreateCompOfTris = false;
|
||||||
|
for (Standard_Integer anArgIter = 1; anArgIter < theArgc; ++anArgIter)
|
||||||
{
|
{
|
||||||
theDI << "wrong number of parameters" << "\n";
|
TCollection_AsciiString anArg (theArgv[anArgIter]);
|
||||||
return 1;
|
anArg.LowerCase();
|
||||||
}
|
if (aShapeName.IsEmpty())
|
||||||
else
|
|
||||||
{
|
|
||||||
if (theArgc == 4 &&
|
|
||||||
strcmp("triangulation", theArgv[3]) == 0)
|
|
||||||
{
|
{
|
||||||
// Read STL file to the triangulation.
|
aShapeName = theArgv[anArgIter];
|
||||||
Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator (theDI, 1);
|
}
|
||||||
Handle(Poly_Triangulation) aTriangulation = RWStl::ReadFile (theArgv[2], aProgress);
|
else if (aFilePath.IsEmpty())
|
||||||
|
{
|
||||||
TopoDS_Face aFace;
|
aFilePath = theArgv[anArgIter];
|
||||||
BRep_Builder aB;
|
}
|
||||||
aB.MakeFace(aFace);
|
else if (anArg == "-brep")
|
||||||
aB.UpdateFace(aFace, aTriangulation);
|
{
|
||||||
DBRep::Set(theArgv[1], aFace);
|
toCreateCompOfTris = true;
|
||||||
|
if (anArgIter + 1 < theArgc
|
||||||
|
&& ViewerTest::ParseOnOff (theArgv[anArgIter + 1], toCreateCompOfTris))
|
||||||
|
{
|
||||||
|
++anArgIter;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TopoDS_Shape aShape;
|
std::cout << "Syntax error: unknown argument '" << theArgv[anArgIter] << "'\n";
|
||||||
Standard_DISABLE_DEPRECATION_WARNINGS
|
return 1;
|
||||||
StlAPI::Read(aShape, theArgv[2]);
|
|
||||||
Standard_ENABLE_DEPRECATION_WARNINGS
|
|
||||||
DBRep::Set(theArgv[1], aShape);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (aFilePath.IsEmpty())
|
||||||
|
{
|
||||||
|
std::cout << "Syntax error: not enough arguments\n";
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
TopoDS_Shape aShape;
|
||||||
|
if (!toCreateCompOfTris)
|
||||||
|
{
|
||||||
|
// Read STL file to the triangulation.
|
||||||
|
Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator (theDI, 1);
|
||||||
|
Handle(Poly_Triangulation) aTriangulation = RWStl::ReadFile (aFilePath.ToCString(), aProgress);
|
||||||
|
|
||||||
|
TopoDS_Face aFace;
|
||||||
|
BRep_Builder aB;
|
||||||
|
aB.MakeFace (aFace);
|
||||||
|
aB.UpdateFace (aFace, aTriangulation);
|
||||||
|
aShape = aFace;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Standard_DISABLE_DEPRECATION_WARNINGS
|
||||||
|
StlAPI::Read(aShape, aFilePath.ToCString());
|
||||||
|
Standard_ENABLE_DEPRECATION_WARNINGS
|
||||||
|
}
|
||||||
|
DBRep::Set (aShapeName.ToCString(), aShape);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1233,7 +1258,12 @@ void XSDRAWSTLVRML::InitCommands (Draw_Interpretor& theCommands)
|
|||||||
|
|
||||||
theCommands.Add ("writevrml", "shape file [version VRML#1.0/VRML#2.0 (1/2): 2 by default] [representation shaded/wireframe/both (0/1/2): 1 by default]",__FILE__,writevrml,g);
|
theCommands.Add ("writevrml", "shape file [version VRML#1.0/VRML#2.0 (1/2): 2 by default] [representation shaded/wireframe/both (0/1/2): 1 by default]",__FILE__,writevrml,g);
|
||||||
theCommands.Add ("writestl", "shape file [ascii/binary (0/1) : 1 by default] [InParallel (0/1) : 0 by default]",__FILE__,writestl,g);
|
theCommands.Add ("writestl", "shape file [ascii/binary (0/1) : 1 by default] [InParallel (0/1) : 0 by default]",__FILE__,writestl,g);
|
||||||
theCommands.Add ("readstl", "shape file [triangulation: no by default]",__FILE__,readstl,g);
|
theCommands.Add ("readstl",
|
||||||
|
"readstl shape file [-brep]"
|
||||||
|
"\n\t\t: Reads STL file and creates a new shape with specified name."
|
||||||
|
"\n\t\t: When -brep is specified, creates a Compound of per-triangle Faces."
|
||||||
|
"\n\t\t: Single triangulation-only Face is created otherwise (default).",
|
||||||
|
__FILE__, readstl, g);
|
||||||
theCommands.Add ("loadvrml" , "shape file",__FILE__,loadvrml,g);
|
theCommands.Add ("loadvrml" , "shape file",__FILE__,loadvrml,g);
|
||||||
|
|
||||||
theCommands.Add ("meshfromstl", "creates MeshVS_Mesh from STL file", __FILE__, createmesh, g );
|
theCommands.Add ("meshfromstl", "creates MeshVS_Mesh from STL file", __FILE__, createmesh, g );
|
||||||
|
@ -22,7 +22,7 @@ writestl res ${aFile} ${anASCIImode}
|
|||||||
catch {exec chmod 777 ${aFile}}
|
catch {exec chmod 777 ${aFile}}
|
||||||
|
|
||||||
if { [file exists ${aFile}] } {
|
if { [file exists ${aFile}] } {
|
||||||
readstl result ${aFile}
|
readstl result ${aFile} -brep
|
||||||
|
|
||||||
checknbshapes result -vertex 8 -edge 18 -wire 12 -face 12 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 51
|
checknbshapes result -vertex 8 -edge 18 -wire 12 -face 12 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 51
|
||||||
# Check file size
|
# Check file size
|
||||||
|
@ -22,7 +22,7 @@ writestl res ${aFile} ${anASCIImode}
|
|||||||
catch {exec chmod 777 ${aFile}}
|
catch {exec chmod 777 ${aFile}}
|
||||||
|
|
||||||
if { [file exists ${aFile}] } {
|
if { [file exists ${aFile}] } {
|
||||||
readstl result ${aFile}
|
readstl result ${aFile} -brep
|
||||||
|
|
||||||
checknbshapes result -vertex 8 -edge 18 -wire 12 -face 12 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 51
|
checknbshapes result -vertex 8 -edge 18 -wire 12 -face 12 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 51
|
||||||
# Check file size
|
# Check file size
|
||||||
|
@ -4,7 +4,7 @@ puts "========"
|
|||||||
puts ""
|
puts ""
|
||||||
|
|
||||||
pload VISUALIZATION XDE MODELING
|
pload VISUALIZATION XDE MODELING
|
||||||
readstl m [locate_data_file model_stl_045.stl] triangulation
|
readstl m [locate_data_file model_stl_045.stl]
|
||||||
vclear
|
vclear
|
||||||
vinit View1
|
vinit View1
|
||||||
vdisplay -dispMode 1 m
|
vdisplay -dispMode 1 m
|
||||||
|
@ -16,7 +16,7 @@ incmesh comp 1.
|
|||||||
writestl comp $imagedir/${casename}.stl 1
|
writestl comp $imagedir/${casename}.stl 1
|
||||||
|
|
||||||
# load STL
|
# load STL
|
||||||
readstl result $imagedir/${casename}.stl
|
readstl result $imagedir/${casename}.stl -brep
|
||||||
|
|
||||||
# check that bounding box is
|
# check that bounding box is
|
||||||
bounding -s result -save Xmin Ymin Zmin Xmax Ymax Zmax -nodraw
|
bounding -s result -save Xmin Ymin Zmin Xmax Ymax Zmax -nodraw
|
||||||
|
@ -6,7 +6,7 @@ puts ""
|
|||||||
# Data Exchange - STL file having less than 4 triangles cannot be read
|
# Data Exchange - STL file having less than 4 triangles cannot be read
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
readstl result [locate_data_file bug27622_Design1.stl]
|
readstl result [locate_data_file bug27622_Design1.stl] -brep
|
||||||
|
|
||||||
set nbshapes_expected "
|
set nbshapes_expected "
|
||||||
Number of shapes in result
|
Number of shapes in result
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file bug28680_sample01b.stl] triangulation
|
readstl m [locate_data_file bug28680_sample01b.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 62075 -nod 31879
|
checktrinfo m -tri 62075 -nod 31879
|
||||||
|
@ -8,7 +8,7 @@ puts ""
|
|||||||
|
|
||||||
set BugNumber OCC22670
|
set BugNumber OCC22670
|
||||||
|
|
||||||
readstl res_mesh [locate_data_file OMF6391_box.stl]
|
readstl res_mesh [locate_data_file OMF6391_box.stl] -brep
|
||||||
|
|
||||||
set aFile ${imagedir}/OCC22670.stl
|
set aFile ${imagedir}/OCC22670.stl
|
||||||
file delete ${aFile}
|
file delete ${aFile}
|
||||||
@ -19,7 +19,7 @@ set anASCIImode 0
|
|||||||
writestl res_mesh ${aFile} ${anASCIImode}
|
writestl res_mesh ${aFile} ${anASCIImode}
|
||||||
catch {exec chmod 777 ${aFile}}
|
catch {exec chmod 777 ${aFile}}
|
||||||
|
|
||||||
readstl result ${aFile}
|
readstl result ${aFile} -brep
|
||||||
|
|
||||||
checknbshapes result -vertex 8 -edge 18 -wire 12 -face 12 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 51
|
checknbshapes result -vertex 8 -edge 18 -wire 12 -face 12 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 51
|
||||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
||||||
|
@ -18,7 +18,7 @@ puts ""
|
|||||||
set BugNumber OCC22670
|
set BugNumber OCC22670
|
||||||
|
|
||||||
set filepath [locate_data_file OMF6391_box.stl]
|
set filepath [locate_data_file OMF6391_box.stl]
|
||||||
if { [catch { readstl res_mesh $filepath } catch_result] } {
|
if { [catch { readstl res_mesh $filepath -brep } catch_result] } {
|
||||||
puts "Faulty ${BugNumber}: here is reading problem"
|
puts "Faulty ${BugNumber}: here is reading problem"
|
||||||
} else {
|
} else {
|
||||||
set aFile $imagedir/${test_image}.stl
|
set aFile $imagedir/${test_image}.stl
|
||||||
@ -30,7 +30,7 @@ if { [catch { readstl res_mesh $filepath } catch_result] } {
|
|||||||
writestl res_mesh ${aFile} ${anASCIImode}
|
writestl res_mesh ${aFile} ${anASCIImode}
|
||||||
catch {exec chmod 777 ${aFile}}
|
catch {exec chmod 777 ${aFile}}
|
||||||
|
|
||||||
readstl result ${aFile}
|
readstl result ${aFile} -brep
|
||||||
|
|
||||||
checknbshapes result -vertex 8 -edge 18 -wire 12 -face 12 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 51
|
checknbshapes result -vertex 8 -edge 18 -wire 12 -face 12 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 51
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ checkarea step_1 3.978e8 1e6 0.001
|
|||||||
# STL
|
# STL
|
||||||
incmesh hammer 38.9076
|
incmesh hammer 38.9076
|
||||||
writestl hammer $imagedir/hammer.stl
|
writestl hammer $imagedir/hammer.stl
|
||||||
readstl stl $imagedir/hammer.stl
|
readstl stl $imagedir/hammer.stl -brep
|
||||||
checkshape stl
|
checkshape stl
|
||||||
tolerance stl
|
tolerance stl
|
||||||
checkarea stl 3.978e8 1e6 0.001
|
checkarea stl 3.978e8 1e6 0.001
|
||||||
|
@ -6,10 +6,8 @@ puts ""
|
|||||||
# StlAPI_Reader still use old Sewing algorithm
|
# StlAPI_Reader still use old Sewing algorithm
|
||||||
#######################################################################################
|
#######################################################################################
|
||||||
|
|
||||||
## readstl command from XSDRAWSTLVRML.cxx file !!!!!
|
|
||||||
|
|
||||||
set BugNumber OCC6384
|
set BugNumber OCC6384
|
||||||
|
|
||||||
readstl res_mesh [locate_data_file OMF6391_box.stl]
|
readstl res_mesh [locate_data_file OMF6391_box.stl] -brep
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ incmesh m 1.0
|
|||||||
|
|
||||||
# Save, read and delete file
|
# Save, read and delete file
|
||||||
writestl m $imagedir/${casename}
|
writestl m $imagedir/${casename}
|
||||||
readstl res $imagedir/${casename} triangulation
|
readstl res $imagedir/${casename}
|
||||||
file delete $imagedir/${casename}
|
file delete $imagedir/${casename}
|
||||||
|
|
||||||
checktrinfo res -tri 22748 -nod 11376
|
checktrinfo res -tri 22748 -nod 11376
|
||||||
|
@ -6,7 +6,7 @@ incmesh m 1.0
|
|||||||
|
|
||||||
# Save, read and delete file
|
# Save, read and delete file
|
||||||
writestl m $imagedir/${casename}
|
writestl m $imagedir/${casename}
|
||||||
readstl res $imagedir/${casename} triangulation
|
readstl res $imagedir/${casename}
|
||||||
file delete $imagedir/${casename}
|
file delete $imagedir/${casename}
|
||||||
|
|
||||||
checktrinfo res -tri 130 -nod 67
|
checktrinfo res -tri 130 -nod 67
|
||||||
|
@ -6,7 +6,7 @@ incmesh m 1.0
|
|||||||
|
|
||||||
# Save, read and delete file
|
# Save, read and delete file
|
||||||
writestl m $imagedir/${casename}
|
writestl m $imagedir/${casename}
|
||||||
readstl res $imagedir/${casename} triangulation
|
readstl res $imagedir/${casename}
|
||||||
file delete $imagedir/${casename}
|
file delete $imagedir/${casename}
|
||||||
|
|
||||||
checktrinfo res -tri 150 -nod 77
|
checktrinfo res -tri 150 -nod 77
|
||||||
|
@ -6,7 +6,7 @@ incmesh m 1.0
|
|||||||
|
|
||||||
# Save, read and delete file
|
# Save, read and delete file
|
||||||
writestl m $imagedir/${casename}
|
writestl m $imagedir/${casename}
|
||||||
readstl res $imagedir/${casename} triangulation
|
readstl res $imagedir/${casename}
|
||||||
file delete $imagedir/${casename}
|
file delete $imagedir/${casename}
|
||||||
|
|
||||||
checktrinfo res -tri 4396 -nod 2200
|
checktrinfo res -tri 4396 -nod 2200
|
||||||
|
@ -6,7 +6,7 @@ incmesh m 1.0
|
|||||||
|
|
||||||
# Save, read and delete file
|
# Save, read and delete file
|
||||||
writestl m $imagedir/${casename}
|
writestl m $imagedir/${casename}
|
||||||
readstl res $imagedir/${casename} triangulation
|
readstl res $imagedir/${casename}
|
||||||
file delete $imagedir/${casename}
|
file delete $imagedir/${casename}
|
||||||
|
|
||||||
checktrinfo res -tri 290 -nod 147
|
checktrinfo res -tri 290 -nod 147
|
||||||
|
@ -6,7 +6,7 @@ incmesh m 1.0
|
|||||||
|
|
||||||
# Save, read and delete file
|
# Save, read and delete file
|
||||||
writestl m $imagedir/${casename}
|
writestl m $imagedir/${casename}
|
||||||
readstl res $imagedir/${casename} triangulation
|
readstl res $imagedir/${casename}
|
||||||
file delete $imagedir/${casename}
|
file delete $imagedir/${casename}
|
||||||
|
|
||||||
checktrinfo res -tri 200 -nod 102
|
checktrinfo res -tri 200 -nod 102
|
||||||
|
@ -6,7 +6,7 @@ incmesh m 1.0
|
|||||||
|
|
||||||
# Save, read and delete file
|
# Save, read and delete file
|
||||||
writestl m $imagedir/${casename}
|
writestl m $imagedir/${casename}
|
||||||
readstl res $imagedir/${casename} triangulation
|
readstl res $imagedir/${casename}
|
||||||
file delete $imagedir/${casename}
|
file delete $imagedir/${casename}
|
||||||
|
|
||||||
checktrinfo res -tri 146 -nod 75
|
checktrinfo res -tri 146 -nod 75
|
||||||
|
@ -6,7 +6,7 @@ incmesh m 1.0
|
|||||||
|
|
||||||
# Save, read and delete file
|
# Save, read and delete file
|
||||||
writestl m $imagedir/${casename}
|
writestl m $imagedir/${casename}
|
||||||
readstl res $imagedir/${casename} triangulation
|
readstl res $imagedir/${casename}
|
||||||
file delete $imagedir/${casename}
|
file delete $imagedir/${casename}
|
||||||
|
|
||||||
checktrinfo res -tri 13102 -nod 6553
|
checktrinfo res -tri 13102 -nod 6553
|
||||||
|
@ -6,7 +6,7 @@ incmesh m 1.0
|
|||||||
|
|
||||||
# Save, read and delete file
|
# Save, read and delete file
|
||||||
writestl m $imagedir/${casename}
|
writestl m $imagedir/${casename}
|
||||||
readstl res $imagedir/${casename} triangulation
|
readstl res $imagedir/${casename}
|
||||||
file delete $imagedir/${casename}
|
file delete $imagedir/${casename}
|
||||||
|
|
||||||
checktrinfo res -tri 2398 -nod 1201
|
checktrinfo res -tri 2398 -nod 1201
|
||||||
|
@ -6,7 +6,7 @@ incmesh m 1.0
|
|||||||
|
|
||||||
# Save, read and delete file
|
# Save, read and delete file
|
||||||
writestl m $imagedir/${casename}
|
writestl m $imagedir/${casename}
|
||||||
readstl res $imagedir/${casename} triangulation
|
readstl res $imagedir/${casename}
|
||||||
file delete $imagedir/${casename}
|
file delete $imagedir/${casename}
|
||||||
|
|
||||||
checktrinfo res -tri 40 -nod 22
|
checktrinfo res -tri 40 -nod 22
|
||||||
|
@ -6,7 +6,7 @@ incmesh m 1.0
|
|||||||
|
|
||||||
# Save, read and delete file
|
# Save, read and delete file
|
||||||
writestl m $imagedir/${casename}
|
writestl m $imagedir/${casename}
|
||||||
readstl res $imagedir/${casename} triangulation
|
readstl res $imagedir/${casename}
|
||||||
file delete $imagedir/${casename}
|
file delete $imagedir/${casename}
|
||||||
|
|
||||||
checktrinfo res -tri 58 -nod 31
|
checktrinfo res -tri 58 -nod 31
|
||||||
|
@ -6,7 +6,7 @@ incmesh m 1.0
|
|||||||
|
|
||||||
# Save, read and delete file
|
# Save, read and delete file
|
||||||
writestl m $imagedir/${casename}
|
writestl m $imagedir/${casename}
|
||||||
readstl res $imagedir/${casename} triangulation
|
readstl res $imagedir/${casename}
|
||||||
file delete $imagedir/${casename}
|
file delete $imagedir/${casename}
|
||||||
|
|
||||||
checktrinfo res -tri 56 -nod 30
|
checktrinfo res -tri 56 -nod 30
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_001.stl] triangulation
|
readstl m [locate_data_file model_stl_001.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 3609 -nod 1807
|
checktrinfo m -tri 3609 -nod 1807
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_010.stl] triangulation
|
readstl m [locate_data_file model_stl_010.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 26582 -nod 13346
|
checktrinfo m -tri 26582 -nod 13346
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_011.stl] triangulation
|
readstl m [locate_data_file model_stl_011.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 9170 -nod 4595
|
checktrinfo m -tri 9170 -nod 4595
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_012.stl] triangulation
|
readstl m [locate_data_file model_stl_012.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 10059 -nod 5036
|
checktrinfo m -tri 10059 -nod 5036
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_013.stl] triangulation
|
readstl m [locate_data_file model_stl_013.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 8773 -nod 4406
|
checktrinfo m -tri 8773 -nod 4406
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_014.stl] triangulation
|
readstl m [locate_data_file model_stl_014.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 18462 -nod 9272
|
checktrinfo m -tri 18462 -nod 9272
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_015.stl] triangulation
|
readstl m [locate_data_file model_stl_015.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 7662 -nod 3836
|
checktrinfo m -tri 7662 -nod 3836
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_002.stl] triangulation
|
readstl m [locate_data_file model_stl_002.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 19034 -nod 9535
|
checktrinfo m -tri 19034 -nod 9535
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_003.stl] triangulation
|
readstl m [locate_data_file model_stl_003.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 3236 -nod 1620
|
checktrinfo m -tri 3236 -nod 1620
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_004.stl] triangulation
|
readstl m [locate_data_file model_stl_004.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 15479 -nod 7793
|
checktrinfo m -tri 15479 -nod 7793
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_005.stl] triangulation
|
readstl m [locate_data_file model_stl_005.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 10526 -nod 5265
|
checktrinfo m -tri 10526 -nod 5265
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_006.stl] triangulation
|
readstl m [locate_data_file model_stl_006.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 14447 -nod 7264
|
checktrinfo m -tri 14447 -nod 7264
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_007.stl] triangulation
|
readstl m [locate_data_file model_stl_007.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 4199 -nod 2109
|
checktrinfo m -tri 4199 -nod 2109
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_008.stl] triangulation
|
readstl m [locate_data_file model_stl_008.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 22149 -nod 11118
|
checktrinfo m -tri 22149 -nod 11118
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_009.stl] triangulation
|
readstl m [locate_data_file model_stl_009.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 5678 -nod 2841
|
checktrinfo m -tri 5678 -nod 2841
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_016.stl] triangulation
|
readstl m [locate_data_file model_stl_016.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 68 -nod 36
|
checktrinfo m -tri 68 -nod 36
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_025.stl] triangulation
|
readstl m [locate_data_file model_stl_025.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 54364 -nod 24452
|
checktrinfo m -tri 54364 -nod 24452
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_026.stl] triangulation
|
readstl m [locate_data_file model_stl_026.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 41113 -nod 18457
|
checktrinfo m -tri 41113 -nod 18457
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_027.stl] triangulation
|
readstl m [locate_data_file model_stl_027.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 7440 -nod 3720
|
checktrinfo m -tri 7440 -nod 3720
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_028.stl] triangulation
|
readstl m [locate_data_file model_stl_028.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 10956 -nod 5238
|
checktrinfo m -tri 10956 -nod 5238
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_029.stl] triangulation
|
readstl m [locate_data_file model_stl_029.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 33313 -nod 15442
|
checktrinfo m -tri 33313 -nod 15442
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_030.stl] triangulation
|
readstl m [locate_data_file model_stl_030.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 38380 -nod 19158
|
checktrinfo m -tri 38380 -nod 19158
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_017.stl] triangulation
|
readstl m [locate_data_file model_stl_017.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 1 -nod 3
|
checktrinfo m -tri 1 -nod 3
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_018.stl] triangulation
|
readstl m [locate_data_file model_stl_018.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 2 -nod 5
|
checktrinfo m -tri 2 -nod 5
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_019.stl] triangulation
|
readstl m [locate_data_file model_stl_019.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 509952 -nod 254992
|
checktrinfo m -tri 509952 -nod 254992
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_020.stl] triangulation
|
readstl m [locate_data_file model_stl_020.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 26840 -nod 13432
|
checktrinfo m -tri 26840 -nod 13432
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_021.stl] triangulation
|
readstl m [locate_data_file model_stl_021.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 63268 -nod 31445
|
checktrinfo m -tri 63268 -nod 31445
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_022.stl] triangulation
|
readstl m [locate_data_file model_stl_022.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 4388 -nod 2194
|
checktrinfo m -tri 4388 -nod 2194
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_023.stl] triangulation
|
readstl m [locate_data_file model_stl_023.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 288 -nod 144
|
checktrinfo m -tri 288 -nod 144
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_024.stl] triangulation
|
readstl m [locate_data_file model_stl_024.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 116 -nod 60
|
checktrinfo m -tri 116 -nod 60
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_031.stl] triangulation
|
readstl m [locate_data_file model_stl_031.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 29606 -nod 14817
|
checktrinfo m -tri 29606 -nod 14817
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_040.stl] triangulation
|
readstl m [locate_data_file model_stl_040.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 5720 -nod 2864
|
checktrinfo m -tri 5720 -nod 2864
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_041.stl] triangulation
|
readstl m [locate_data_file model_stl_041.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 6082 -nod 3052
|
checktrinfo m -tri 6082 -nod 3052
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_042.stl] triangulation
|
readstl m [locate_data_file model_stl_042.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 10131 -nod 5068
|
checktrinfo m -tri 10131 -nod 5068
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_043.stl] triangulation
|
readstl m [locate_data_file model_stl_043.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 17780 -nod 8954
|
checktrinfo m -tri 17780 -nod 8954
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_044.stl] triangulation
|
readstl m [locate_data_file model_stl_044.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 5998 -nod 3002
|
checktrinfo m -tri 5998 -nod 3002
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_045.stl] triangulation
|
readstl m [locate_data_file model_stl_045.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 19011 -nod 9598
|
checktrinfo m -tri 19011 -nod 9598
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_032.stl] triangulation
|
readstl m [locate_data_file model_stl_032.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 4340 -nod 2172
|
checktrinfo m -tri 4340 -nod 2172
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_033.stl] triangulation
|
readstl m [locate_data_file model_stl_033.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 25560 -nod 12928
|
checktrinfo m -tri 25560 -nod 12928
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_034.stl] triangulation
|
readstl m [locate_data_file model_stl_034.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 10762 -nod 5387
|
checktrinfo m -tri 10762 -nod 5387
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_035.stl] triangulation
|
readstl m [locate_data_file model_stl_035.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 21778 -nod 10963
|
checktrinfo m -tri 21778 -nod 10963
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_036.stl] triangulation
|
readstl m [locate_data_file model_stl_036.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 7806 -nod 3907
|
checktrinfo m -tri 7806 -nod 3907
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_037.stl] triangulation
|
readstl m [locate_data_file model_stl_037.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 8286 -nod 4164
|
checktrinfo m -tri 8286 -nod 4164
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_038.stl] triangulation
|
readstl m [locate_data_file model_stl_038.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 6811 -nod 3408
|
checktrinfo m -tri 6811 -nod 3408
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
readstl m [locate_data_file model_stl_039.stl] triangulation
|
readstl m [locate_data_file model_stl_039.stl]
|
||||||
|
|
||||||
# Number of triangles check
|
# Number of triangles check
|
||||||
checktrinfo m -tri 19651 -nod 9862
|
checktrinfo m -tri 19651 -nod 9862
|
||||||
|
@ -19,7 +19,7 @@ set fd [open ${imagedir}/${casename}_one_ascii_dos.stl w]
|
|||||||
fconfigure $fd -translation crlf
|
fconfigure $fd -translation crlf
|
||||||
puts $fd $minimal_ascii_stl
|
puts $fd $minimal_ascii_stl
|
||||||
close $fd
|
close $fd
|
||||||
readstl res_one_ascii_dos ${imagedir}/${casename}_one_ascii_dos.stl
|
readstl res_one_ascii_dos ${imagedir}/${casename}_one_ascii_dos.stl -brep
|
||||||
checknbshapes res_one_ascii_dos -face 1
|
checknbshapes res_one_ascii_dos -face 1
|
||||||
|
|
||||||
puts "\n#======================================================================"
|
puts "\n#======================================================================"
|
||||||
@ -29,7 +29,7 @@ set fd [open ${imagedir}/${casename}_one_ascii_unix.stl w]
|
|||||||
fconfigure $fd -translation lf
|
fconfigure $fd -translation lf
|
||||||
puts $fd $minimal_ascii_stl
|
puts $fd $minimal_ascii_stl
|
||||||
close $fd
|
close $fd
|
||||||
readstl res_one_ascii_unix ${imagedir}/${casename}_one_ascii_unix.stl
|
readstl res_one_ascii_unix ${imagedir}/${casename}_one_ascii_unix.stl -brep
|
||||||
checknbshapes res_one_ascii_unix -face 1
|
checknbshapes res_one_ascii_unix -face 1
|
||||||
|
|
||||||
puts "\n#======================================================================"
|
puts "\n#======================================================================"
|
||||||
@ -39,7 +39,7 @@ set fd [open ${imagedir}/${casename}_one_ascii_noeol.stl w]
|
|||||||
fconfigure $fd -translation lf
|
fconfigure $fd -translation lf
|
||||||
puts -nonewline $fd $minimal_ascii_stl
|
puts -nonewline $fd $minimal_ascii_stl
|
||||||
close $fd
|
close $fd
|
||||||
readstl res_one_ascii_noeol ${imagedir}/${casename}_one_ascii_noeol.stl
|
readstl res_one_ascii_noeol ${imagedir}/${casename}_one_ascii_noeol.stl -brep
|
||||||
checknbshapes res_one_ascii_noeol -face 1
|
checknbshapes res_one_ascii_noeol -face 1
|
||||||
|
|
||||||
puts "\n#======================================================================"
|
puts "\n#======================================================================"
|
||||||
@ -49,7 +49,7 @@ set fd [open ${imagedir}/${casename}_zero_ascii_dos.stl w]
|
|||||||
fconfigure $fd -translation crlf
|
fconfigure $fd -translation crlf
|
||||||
puts $fd "solid \nendsolid"
|
puts $fd "solid \nendsolid"
|
||||||
close $fd
|
close $fd
|
||||||
readstl res_zero_ascii_dos ${imagedir}/${casename}_zero_ascii_dos.stl
|
readstl res_zero_ascii_dos ${imagedir}/${casename}_zero_ascii_dos.stl -brep
|
||||||
|
|
||||||
puts "\n#======================================================================"
|
puts "\n#======================================================================"
|
||||||
puts "# Ascii file with no facets, LF"
|
puts "# Ascii file with no facets, LF"
|
||||||
@ -58,7 +58,7 @@ set fd [open ${imagedir}/${casename}_zero_ascii_unix.stl w]
|
|||||||
fconfigure $fd -translation lf
|
fconfigure $fd -translation lf
|
||||||
puts $fd "solid \nendsolid"
|
puts $fd "solid \nendsolid"
|
||||||
close $fd
|
close $fd
|
||||||
readstl res_zero_ascii_unix ${imagedir}/${casename}_zero_ascii_unix.stl
|
readstl res_zero_ascii_unix ${imagedir}/${casename}_zero_ascii_unix.stl -brep
|
||||||
|
|
||||||
puts "\n#======================================================================"
|
puts "\n#======================================================================"
|
||||||
puts "# Binary file with single facet"
|
puts "# Binary file with single facet"
|
||||||
@ -68,7 +68,7 @@ fconfigure $fd -translation binary
|
|||||||
puts -nonewline $fd "stl [string repeat { } 76]"
|
puts -nonewline $fd "stl [string repeat { } 76]"
|
||||||
puts -nonewline $fd [binary format if3f3f3f3t 1 {0 0 1} {0 0 0} {1 0 0} {0 1 0} 0]
|
puts -nonewline $fd [binary format if3f3f3f3t 1 {0 0 1} {0 0 0} {1 0 0} {0 1 0} 0]
|
||||||
close $fd
|
close $fd
|
||||||
readstl res_one_binary ${imagedir}/${casename}_one_binary.stl
|
readstl res_one_binary ${imagedir}/${casename}_one_binary.stl -brep
|
||||||
checknbshapes res_one_binary -face 1
|
checknbshapes res_one_binary -face 1
|
||||||
|
|
||||||
puts "\n#======================================================================"
|
puts "\n#======================================================================"
|
||||||
@ -79,7 +79,7 @@ set fd [open ${imagedir}/${casename}_zero_binary.stl w]
|
|||||||
fconfigure $fd -translation binary
|
fconfigure $fd -translation binary
|
||||||
puts -nonewline $fd "stl [string repeat { } 76][binary format i 0]"
|
puts -nonewline $fd "stl [string repeat { } 76][binary format i 0]"
|
||||||
close $fd
|
close $fd
|
||||||
readstl res_zero_binary ${imagedir}/${casename}_zero_binary.stl
|
readstl res_zero_binary ${imagedir}/${casename}_zero_binary.stl -brep
|
||||||
|
|
||||||
puts "\n#======================================================================"
|
puts "\n#======================================================================"
|
||||||
puts "# Empty file"
|
puts "# Empty file"
|
||||||
@ -87,5 +87,5 @@ puts "#======================================================================"
|
|||||||
puts "REQUIRED ALL: Error: unexpected format of facet at line 2"
|
puts "REQUIRED ALL: Error: unexpected format of facet at line 2"
|
||||||
set fd [open ${imagedir}/${casename}_empty.stl w]
|
set fd [open ${imagedir}/${casename}_empty.stl w]
|
||||||
close $fd
|
close $fd
|
||||||
readstl res_empty ${imagedir}/${casename}_empty.stl
|
readstl res_empty ${imagedir}/${casename}_empty.stl -brep
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user