1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

52 Commits

Author SHA1 Message Date
dpasukhi
4ebd858084 0033246: Data Exchange, DE Wrapper - Checking license leads to performance problem
ReWork UpdateLoad functionality:
UpdateLoad calls only if provider is found.
UpdateLoad calls only for chosen type of translation (read/write)
Add new method to UpdateLoad all registered nodes.
2023-03-17 23:04:08 +00:00
ona
0bab2704ae 0031080: Data Exchange, STL reader - improve API for reading multi-domain STL files
reading of multidomain stl files into separate Poly_Triangulation objects
2022-07-15 18:22:10 +03:00
kgv
dee5eb82b5 0033054: Configuration - link errors due to missing references to new TKXDE toolkit
src/OS/DataExchange.tcl - added missing new toolkits.
TKRWMesh - added missing reference to TKTopAlgo (for using BRepLib_PointCloudShape).
Removed redundant dependency from TKBinXCAF.
DRAWEXE - added missing references for a static build.

THE_CONFIGURATION_SCOPE definition has been corrected to postpoine calling constructor till the first variable usage.
Fixed compiler warning at SelectMgr_Frustum<3>::DumpJson() due to misleading Standard_EXPORT for an inline template method definition.
2022-07-07 19:23:00 +03:00
atychini
6d1a049be7 0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files
Implementing DE_Wrapper and its formats
2022-06-23 20:29:00 +03:00
aml
a1f027b66e 0033018: Coding - get rid of unused headers [Plugin to ShapeAnalysis] 2022-06-15 20:41:12 +03:00
kgv
2922a73ea7 0032826: Data Exchange - use OSD_FileSystem within RWStl::ReadAscii() and StepFile_Read() 2022-02-10 20:39:28 +03:00
kgv
65acdce54c 0032352: Coding Rules - clean up code from compatibility hacks with pre-C++11 compilers
Removed usage of std::auto_ptr.
opencascade::std workarounds for VS2008 have been dropped, when possible.
OCCT_NO_RVALUE_REFERENCE workaround for VS2008 has been removed.
2021-12-03 17:56:37 +03:00
kgv
c983176406 0032580: Data Exchange, STL - add option splitting nodes at sharp corners
Added Poly_MergeNodesTool tool for merging nodes within triangulation.
Added RWStl_Reader::MergeAngle() property managing merging behavior.
2021-09-22 20:09:48 +03:00
mkrylova
ad3f20c684 0032455: Data Exchange - replace OSD_OpenStream() usage with OSD_FileSystem::DefaultFileSystem()
- replaced OSD_OpenStream() usage with OSD_FileSystem::DefaultFileSystem()
2021-07-23 18:28:23 +03:00
mkrylova
9749af25ae 0032441: Draw Harness - command readstl doesn't print error message on failure
- added producing error message when passing an invalid file path
2021-07-01 22:26:10 +03:00
luz paz
316ea29318 0031939: Coding - correction of spelling errors in comments [part 10]
Fix various typos via codespell.
2021-04-22 14:50:47 +03:00
vro
a8b605eb5e 0032133: Modeling Data - Restriction of access to internal arrays for Poly_Triangulation, revision of API
Removed methods from Poly_Triangulation/Poly_PolygonOnTriangulation giving access to internal arrays of 2d and 3d nodes, triangles and normals.
2021-02-18 18:55:21 +03:00
kgv
ff6122e008 0032055: Draw Harness, ViewerTest - add more vmanipulator position adjusting options
Draw::ParseOnOffIterator() - added auxiliary wrapper over Draw::ParseOnOff() for more compact syntax.
strncasecmp() definition for msvc compilers has been moved to Standard_CString for consistency with strcasecmp().
vmanipulator command has been refactored to use more straightforward parser.

vmanipulator now accepts "-adjustPosition {0|center|location|shapeLocation}" options
adjusting position to object's AABB center (existed before), object's local transformation or TopoDS_Shape location.
2021-01-14 19:21:54 +03:00
agv
97454ee0cb 0031173: Point Cloud Rendering - Enable remote file systems as input and output for the Point Cloud converter
Make RWStl_Reader::IsAscii() accepting optional argument pointing how to rewind the input stream, using unget() or seekg(). This allows writing a reader that uses a stream supporting seekg but not supporting unget.
2020-09-18 17:46:51 +03:00
msv
7e785937b3 0025748: Parallel version of progress indicator
Progress indication mechanism is refactored to support incrementing progress within multithreaded algorithms.

The class Message_ProgressIndicator is only an interface to the user application.
It accumulates the progress provided by progress scopes.
The counter is protected by mutex for thread-safety.

The new class Message_ProgressScope replacing Message_ProgressSentry should be used to advance the progress.
The scopes are nested to each other to reflect the nested nature of operations.
The new class Message_ProgressRange should be used to pass the progress to sub-scopes.

All OCCT algorithms involving progress indication have been updated to new API.

Improvements in Draw_ProgressIndicator:
- Separate console mode has been added in order to make possible to put the progress into std::cout instead
  or in addition to the draw interpreter, instead of trigger option "-tclOutput".
- Treatment of Ctrl-Break signal has been added.
  Now any operation can be aborted by Ctrl-C or Ctrl-Break keystroke.

Added new test case 'perf fclasses progr_par' for testing of parallel work of the progress.
2020-09-12 20:42:22 +03:00
akaftasev
1fc1a207b0 0031504: Data Exchange - Wrong output of progress indicator when writing to stl
Added new condition for first indicated element at Draw_ProgressIndicator::Show(),
because it’s more logical that at start progress starts at 0
Changed usage of Next() to Next(step) for increment progress to IND_THRESHOLD in RWStl::writeASCII() and RWStl::writeBinary()
Changed condition for continuation of writing and add interrupt to this function
Added possibility to use Progress indicator in writestl
Changed paremeter in constructor Message_ProgressSentry aPS() IND_THRESHOLD to 1
Changed test
2020-06-09 19:53:08 +03:00
kgv
a87b1b3738 0031501: Foundation Classes, Message_Printer - remove theToPutEndl argument -- use shortcuts
Message::DefaultMessenger()->Send() have been replaced by shortcuts Message::Send().
2020-05-09 17:22:15 +03:00
mzernova
c37bd936c3 0031213: Coding Rules, RWStl_Reader - misnamed variable THE_BUFFER
Renamed THE_BUFFER variable.
2019-12-06 19:32:35 +03:00
mzernova
51ee6a7dbb 0030964: Data Exchange - use Standard_ReadLineBuffer within OBJ reader
Standard_ReadLineBuffer now supports a processing of the special multi-line case with \ at the end of the line.

Standard_RedLineBuffer was used to load Stl files
2019-11-20 17:08:31 +03:00
gka
d45b7860a5 0030113: Data Exchange - STL file in text format with "Facet" keywords can't be imported
Case-sensitive method strncmp used in the REStl_Reader cosidered register of letter was replaced on the method _strnicmp for Windows and strncasecmp for Linux and MacOs
Test script for case 0030113
2019-09-14 11:45:36 +03:00
tiv
0423218095 0030895: Coding Rules - specify std namespace explicitly for std::cout and streams
"endl" manipulator for Message_Messenger is renamed to "Message_EndLine".

The following entities from std namespace are now used
with std:: explicitly specified (from Standard_Stream.hxx):
std::istream,std::ostream,std::ofstream,std::ifstream,std::fstream,
std::filebuf,std::streambuf,std::streampos,std::ios,std::cout,std::cerr,
std::cin,std::endl,std::ends,std::flush,std::setw,std::setprecision,
std::hex,std::dec.
2019-08-16 12:16:38 +03:00
tiv
2b2be3fb82 0030550: Coding - Integer overflow in Standard_CString HashCodes
0030551: Foundation Classes - Integer overflow in NCollection_CellFilter HashCode

Signed integers are not used in hash code functions now to prevent undefined behavior on left shift operations with signed integers.
A possibility of negative values of hash codes is eliminated.
INT_MAX → IntegerLast() in hash code functions.
All found hash code functions behaves uniformly now: they return a value in the range [1, theUpperBound]. Relevant comments are added to such functions.
2019-04-16 20:38:23 +03:00
abv
6b1800cb76 0030130: Coding Rules - MSVC 2017 gives warnings about using of std::fpos::seekpos() within RWStl
Use of deprecated method std::fpos::seekpos() is avoided with MSVC 11 (Visual Studio 2012) and above.
2018-09-13 20:45:08 +03:00
kgv
4c4420dfe9 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).
2018-07-06 15:53:48 +03:00
abv
07bbde451a 0029399: Optimize reading of floating point values from text strings
Function Strtod() is reimplemented using open source (MIT-style license) code by David M. Gay instead of strtod() provided by standard run-time library. This improves its performance by 3-10 times.

Functions Atof(), Strtod(), Printf(), Sprintf(), Fprintf() are declared as extern "C" to be usable from C programs.

Strtod() is used in Interface_FileReaderData::Fastof() and in RWStl_Reader to accelerate their work.

DRAW command QATestAtof and test perf fclasses strtod are added to check correctness and performance of Strtod().
Test perf draw restore is added to monitor performance of reading BREP files.

Minor off-topic corrections:
- method Standard_GUID::Assign (const Standard_UUID&) is implemented (was empty);
- Precision.hxx is included in BRepMesh_Vertex.hxx that uses it.
2018-01-26 20:11:03 +03:00
oan
71c810df61 0028824: Possibility to build OCCT 7.1.0 and above using Visual Studio 2008
Possibility to build OCCT using Visual Studio 2008 (VC9) is restored.
For that:

- template functions and classes from namespace std or tr1 (for VC9) are imported to namespace opencascade which is then used instead of std in relevant places
- templates not provided by compiler (VC9) but required for OCCT are defined in this namespace (in Standard_Handle.hxx)
- methods implementing move semantics are excluded for VC9 compiler (which does not support && syntax)
- support of vc9 compiler is restored in build procedures and environment scripts
- check of type of the current class in macros DEFINE_STANDARD_RTTI* is refactored

VS 2008 is restored in the list of supported platforms on Overview / System Requirements.
2017-09-22 11:52:00 +03:00
abv
22e7073865 0027561: Since OCCT 7.0.0, exporting a curve to STL creates a file that results in an endless loop when read
Add check for empty triangulation when writing STL file to report error instead of creation of empty file.

STL reader has been improved to properly handle case of empty or small files, and Ascii files without EOL at the end.
2017-08-17 15:49:11 +03:00
abv
1d949423b7 0028680: Data Exchange - allow reading of multi-domain STL files
Method RWStl::Read() is improved to support reading multi-domain STL files.

Test added: bugs stlvrml bug28680
2017-08-01 23:48:20 +03:00
aml
4178b3531b 0028840: Data Exchange - rewrite the STL Reader/Writer
STL Reader and Writer tools have been refactored to improve performance and usability:
- Basic reading of STL file is separated to abstract class RWStl_Reader which is not bound to particular data structures; the target data model can be bound via inheritance.
- RWStl package uses class Poly_Triangulation to represent triangular mesh.
- Obsolete data structures and tools (packages StlMesh and StlTransfer) are removed.
2017-08-01 23:48:15 +03:00
ski
9775fa6110 0026937: Eliminate NO_CXX_EXCEPTION macro support
Macro NO_CXX_EXCEPTION was removed from code.
Method Raise() was replaced by explicit throw statement.
Method Standard_Failure::Caught() was replaced by normal C++mechanism of exception transfer.
Method Standard_Failure::Caught() is deprecated now.
Eliminated empty constructors.
Updated samples.
Eliminate empty method ChangeValue from NCollection_Map class.
Removed not operable methods from NCollection classes.
2017-02-02 16:35:54 +03:00
kgv
dde6883382 0027772: Foundation Classes - define Standard_Boolean using C++ type "bool" instead of "unsigned int"
Code has been updated to remove no-op casts and implicit casts to Standard_Boolean.

Places of inproper use of Standard_Boolean instead of Standard_Integer
have been corrected:
- Bnd_Box, Bnd_Box2d
  Bit flags are now defined as private enum
- HLRAlgo_BiPoint, HLRAlgo_EdgesBlock, HLRBRep_EdgeData, HLRBRep_FaceData
  Bit flags are now defined as enum
- HLRAlgo_EdgeStatus, HLRBRep_BiPnt2D, HLRBRep_BiPoint
  Bit flags are now defined as bool fields
- HLRAlgo_PolyData
  Bit flags are now defined as Standard_Integer
- OSD_DirectoryIterator, OSD_FileIterator
  Boolean flag is now defined as Standard_Boolean
- ShapeAnalysis_Surface::SurfaceNewton()
  now returns Standard_Integer (values 0, 1 or 3)
- ChFi2d_FilletAlgo
  now uses TColStd_SequenceOfBoolean instead of TColStd_SequenceOfInteger
  for storing boolean flags

Method IFSelect_Dispatch::PacketsCount() has been dropped from interface.

ShapeFix_Solid::Status() has been fixed to decode requested status
instead of returning integer value.

TopOpeBRepBuild_Builder1 now defines map storing Standard_Boolean values
instead of Standard_Integer.

Persistence for Standard_Boolean type has been corrected
to keep backward compatibility:
- BinMDataStd, BinTools, FSD_BinaryFile

Broken Draw Harness commands vdisplaymode and verasemode have been removed.

BRepMesh_FastDiscretFace::initDataStructure() - workaround old gcc limitations

BRepMesh_IncrementalMesh::clear() - avoid ambiguity
2016-08-26 10:16:17 +03:00
kgv
a47d34efa9 0027622: Data Exchange - STL file having less than 4 triangles cannot be read
Drop minimum file size check from RWStl::ReadBinary().

Test case for issue #27622
2016-06-23 18:14:53 +03:00
rkv
9816003815 0026781: Coding rules - eliminate GCC warning -Wunused-result
Check return code of fgets() and system() within FSD_BinaryFile::ReadChar(),
IFSelect_SessionFile::ReadFile(), IFSelect_SessionPilot::ReadScript(),
OSD_File::Print(), OSD_Process::Spawn(), RWStl::ReadAscii(), iges_lire().
2015-10-29 15:04:43 +03:00
aml
a7653f4f55 0026593: Coding rules - revert compatibility of NCollection_CellFilter constructor with old code
Restored old constructor and old behavior where possible.

Minor correction.
2015-09-03 15:06:26 +03:00
aml
50bc8f9624 0026395: Merge clasees NCollection_CellFilter_NDim and NCollection_CellFilter
Deleted exceed class CellFilterNDim.
Now dimension count used as input parameter in NCollection_CellFilter.

minor corrections.
2015-07-28 18:14:18 +03:00
abv
e8862cf41a 0024870: Provide OCCT RTTI test cases
Test commands for checking performance and functionality of OCCT handles and RTTI added.
New test case added for that: test perf fclasses handle.

Implementation of opencascade::handle improved to enable compile-time error if two handles of incompatible types are compared.
Comparison of handle to NULL is not possible any more; method IsNull() should be used instead.

Method LDOM_MemManager::Doc() is removed to avoid cyclic dependency of headers; constructor of LDOM_Document(LDOM_MemManager&) is used directly instead.

Inclusion of headers corrected for compilation after previous patch.
2015-07-12 12:30:27 +03:00
abv
42cf5bc1ca 0024002: Overall code and build procedure refactoring -- automatic
Automatic upgrade of OCCT code by command "occt_upgrade . -nocdl":
- WOK-generated header files from inc and sources from drv are moved to src
- CDL files removed
- All packages are converted to nocdlpack
2015-07-12 07:42:38 +03:00
pdn
947085567f 0025367: IGES and BRep persistence - support unicode file names on Windows
OSD_OpenFile.hxx header is created for using in file open operations with Unicode names.

Fix for STEP files reading.

Adding test cases for issue 25367
Update test case for issue 25364
Update test cases due to improvements
2014-11-06 13:55:51 +03:00
abv
0797d9d30a 0025418: Debug output to be limited to OCC development environment
Macros ending on "DEB" are replaced by OCCT_DEBUG across OCCT code; new macros described in documentation.
Macros starting with DEB are changed to start with "OCCT_DEBUG_".
Some code cleaned.
2014-11-05 16:55:24 +03:00
vro
fcc61cc4c9 0025405: STL reader doesn't keep shared nodes
An improved RWSTL::ReadFile() method + a draw-command returning the number of nodes and triangles for a MeshVS_Mesh object based on STL mesh data source.

An indexed map of points is replaced by a CellFilter of XYZ objects already implemented in BRepBuilderAPI.
Also, BRepBuilderAPI_VertexInspector became exported for TKTopAlgo library (Standard_EXPORT is added for the methods of this class).

Standard_EXPORT is removed for in-line methods of BRepBuilderAPI_VertexInspector

Test-case for issue #25405

Update of test-cases, according to new behavior
2014-10-30 12:19:36 +03:00
dbv
63c629aa3a 0025266: Debug statements in the source are getting flushed on to the console
Output to cout activated previously in Debug mode by #ifdef DEB is suppressed by using macro <PACKAGE>_DEB instead of DEB
2014-10-16 16:44:56 +04:00
abv
857ffd5e57 0024814: Avoid using explicit names of Handle classes
Sources corrected replacing Handle_XXX by Handle(XXX)
2014-04-22 18:36:12 +04:00
abv
d5f74e42d6 0024624: Lost word in license statement in source files
License statement text corrected; compiler warnings caused by Bison 2.41 disabled for MSVC; a few other compiler warnings on 54-bit Windows eliminated by appropriate type cast
Wrong license statements corrected in several files.
Copyright and license statements added in XSD and GLSL files.
Copyright year updated in some files.
Obsolete documentation files removed from DrawResources.
2014-02-20 16:15:17 +04:00
abv
8cb69787f2 0024607: Fix some GCC compiler warnings
- enumeration value not handled in switch in Aspect_ColorScale.cxx, TNaming_DeltaOnModification.cxx
- comparison between signed and unsigned integer expressions in NIS_Triangulated.cxx, OSD_MAllocHook.cxx, RWStl.cxx
- static function defined or declared but not used in OpenGl_Workspace_2.cxx, ProjLib_ComputeApprox.cxx
2014-02-13 14:04:29 +04:00
bugmster
973c2be1e1 0024428: Implementation of LGPL license
The copying permission statements at the beginning of source files updated to refer to LGPL.
Copyright dates extended till 2014 in advance.
2013-12-17 12:42:41 +04:00
abv
6ff736d802 0024259: Clean up OSD_File implementation
Field myFileChannel removed from OSD_FileNode and introduced to OSD_File as Linux-only along with Windows-only myFileHandle.
Implementation of OSD_File cleaned from redundant type casts; some missing type cases added.
File mode passed to fdopen() corrected in read-write case ("rw" replaced by "w+").
Method OSD_File::Size() now returns Standard_Size to be able to return correct value for large files (on 64-bit platforms only).
2013-10-17 12:23:02 +04:00
abv
91322f44fd 0022898: IGES import fails in german environment
Added DRAW command dlocale to set and query current locale of the C subsystem
Equivalents of C functions working with conversions of strings to/from reals added in Standard_CString, providing locale-independent behavior (using always "C" locale)
In DRAW packages, calls to atof() and atoi() are replaced by direct calls to Draw::Atof() and Draw::Atoi(), respectively, instead of substituting by #define
Use of atof(), strtod(), and *scanf() involving floating point conversions in OCCT code replaced by locale-independent Atof() and Strtod()
Calls to sprintf() involving floating point in OCCT code are replaced by call to locale-independent Sprintf(), except a few places where converted strings are used immediately for display in the 3d viewer
Changes of global locale are eliminated throughout OCCT code
Proposed correction for GNU libC where v*printf_l functions are absent
Added test case (bugs xde bug22898) for data exchange operations with non-standard locale
Use xlocale on Mac OS X and within glibc
Corrected strtod_l wrapper
Generate error rather than warning
Introduce Standard_CLocaleSentry replacement for removed OSD_Localizer
Standard_CLocaleSentry - copy locale string
Standard_CLocaleSentry - use _configthreadlocale on Windows
Standard_CLocaleSentry::GetCLocale() - return locale_t rather than void*
Corrected misprint in ~Standard_CLocaleSentry()
Use French locale in bug22898 test case
Mark test case as skipped if locale is unavailable on tested system.
Use fr_FR locale for tests on Mac OS X
2013-02-01 18:41:16 +04:00
bugmaster
b311480ed5 0023024: Update headers of OCCT files
Added appropriate copyright and license information in source files
2012-03-21 19:43:04 +04:00
KGV
68bc5ed764 0022760: Regression in the method RWStl::WriteAscii 2012-03-05 19:30:40 +04:00
RLN and KGV
9c6afe1912 OCC22572 Support of progress indicator in RWStl and optimization of reading Ascii. 2012-03-05 19:29:21 +04:00