mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-16 10:08:36 +03:00
0031908: Draw Harness, TKTopTest - wavefront file path length is limited to 100 characters
* Change file path variable in wavefront function from char[100] to TCollection_AsciiString
This commit is contained in:
parent
5ae53d4986
commit
84d0342cef
@ -39,6 +39,7 @@
|
|||||||
#include <IMeshData_Status.hxx>
|
#include <IMeshData_Status.hxx>
|
||||||
#include <Message.hxx>
|
#include <Message.hxx>
|
||||||
#include <Message_ProgressRange.hxx>
|
#include <Message_ProgressRange.hxx>
|
||||||
|
#include <OSD_OpenFile.hxx>
|
||||||
#include <Poly_Connect.hxx>
|
#include <Poly_Connect.hxx>
|
||||||
#include <TopExp_Explorer.hxx>
|
#include <TopExp_Explorer.hxx>
|
||||||
#include <TopTools_MapIteratorOfMapOfShape.hxx>
|
#include <TopTools_MapIteratorOfMapOfShape.hxx>
|
||||||
@ -788,17 +789,17 @@ static Standard_Integer wavefront(Draw_Interpretor&, Standard_Integer nbarg, con
|
|||||||
Standard_Integer n1, n2, n3;
|
Standard_Integer n1, n2, n3;
|
||||||
Standard_Integer k1, k2, k3;
|
Standard_Integer k1, k2, k3;
|
||||||
|
|
||||||
char ffile[100];
|
TCollection_AsciiString aFile;
|
||||||
|
|
||||||
if (nbarg == 3) {
|
if (nbarg == 3) {
|
||||||
strcpy(ffile, argv[2]);
|
aFile = argv[2];
|
||||||
strcat(ffile, ".obj");
|
aFile += ".obj";
|
||||||
}
|
}
|
||||||
else strcpy(ffile, "wave.obj");
|
else aFile = "wave.obj";
|
||||||
FILE* outfile = fopen(ffile, "w");
|
FILE* outfile = OSD_OpenFile(aFile.ToCString(), "w");
|
||||||
|
|
||||||
|
|
||||||
fprintf(outfile, "%s %s\n%s %s\n\n", "# CASCADE ","MATRA DATAVISION", "#", ffile);
|
fprintf(outfile, "%s %s\n%s %s\n\n", "# CASCADE ","MATRA DATAVISION", "#", aFile.ToCString());
|
||||||
|
|
||||||
Standard_Integer nbNodes, totalnodes = 0, nbpolygons = 0;
|
Standard_Integer nbNodes, totalnodes = 0, nbpolygons = 0;
|
||||||
for (ex.Init(S, TopAbs_FACE); ex.More(); ex.Next()) {
|
for (ex.Init(S, TopAbs_FACE); ex.More(); ex.Next()) {
|
||||||
|
8
tests/demo/draw/bug31908
Normal file
8
tests/demo/draw/bug31908
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
puts "=========="
|
||||||
|
puts "0031908: Draw Harness, TKTopTest - wavefront file path length is limited to 100 characters"
|
||||||
|
puts "=========="
|
||||||
|
puts ""
|
||||||
|
pload MODELING
|
||||||
|
box b 10 20 30
|
||||||
|
wavefront b the_name_of_saved_with_wavefront_command_box_that_measures_10_20_30_and_has_length_of_its_name_longer_than_100_characters
|
||||||
|
puts "TEST COMPLETED"
|
Loading…
x
Reference in New Issue
Block a user