occt.git
3 years ago0032041: Modeling Data - Access violation ExchangeUV in Geom_BezierSurface
kgv [Thu, 7 Jan 2021 20:10:27 +0000 (23:10 +0300)]
0032041: Modeling Data - Access violation ExchangeUV in Geom_BezierSurface

Added missing NULL-checks to Geom_BezierSurface::ExchangeUV() and Geom_BSplineSurface::ExchangeUV().

3 years ago0032040: Visualization, OpenGl_View - merge OpenGl_View_Redraw.cxx into OpenGl_View.cxx
kgv [Mon, 4 Jan 2021 09:13:38 +0000 (12:13 +0300)]
0032040: Visualization, OpenGl_View - merge OpenGl_View_Redraw.cxx into OpenGl_View.cxx

3 years ago0032038: Visualization, OpenGl_View - move out framebuffer initialization from :...
kgv [Mon, 4 Jan 2021 00:26:51 +0000 (03:26 +0300)]
0032038: Visualization, OpenGl_View - move out framebuffer initialization from ::Redraw() to ::prepareFrameBuffers()

3 years ago0032037: Visualization - move V3d_View::FitMinMax() to Graphic3d_Camera::FitMinMax()
kgv [Mon, 4 Jan 2021 08:53:24 +0000 (11:53 +0300)]
0032037: Visualization - move V3d_View::FitMinMax() to Graphic3d_Camera::FitMinMax()

3 years ago0032027: Visualization, Prs3d_Drawer - unable to unset HasOwnFaceBoundaryDraw() property
kgv [Tue, 29 Dec 2020 12:22:50 +0000 (15:22 +0300)]
0032027: Visualization, Prs3d_Drawer - unable to unset HasOwnFaceBoundaryDraw() property

Added missing Unset methods to Prs3d_Drawer properties.

3 years ago0029750: Samples - function arrows are not updated by moving a node in FuncDemo qt... IR-2020-12-25
vro [Thu, 17 Dec 2020 10:17:46 +0000 (13:17 +0300)]
0029750: Samples - function arrows are not updated by moving a node in FuncDemo qt sample

The visual links between functions are recovered.
The demo is synchronized with a corresponding demo from Qt (qt486-vc10-32\examples\graphicsview\elasticnodes). It may be successfully compiled by any further versions of Qt including 5.10.1
Also, because Open CASCADE (and OCAF in particular) is improved for usage in multi-threading mode, usage of mutexes is added in this sample (for access to the sharing TNaming_UsedShapes attribute, for example).

3 years ago0032009: Coding Rules, TKQADraw - suppress msvc10 compilation warning C4748
kgv [Sat, 19 Dec 2020 13:00:24 +0000 (16:00 +0300)]
0032009: Coding Rules, TKQADraw - suppress msvc10 compilation warning C4748

Added a workaround for msvc10 misbehavior.

3 years ago0032013: Samples - iOS sample compilation errors
kgv [Mon, 21 Dec 2020 14:14:49 +0000 (17:14 +0300)]
0032013: Samples - iOS sample compilation errors

Added missing includes.
Fixed usage of obsolete Standard_Failure interface.
Fixed file headers.

3 years ago0032011: Configuration - add batch files to build OCCT for macOS and iOS targets
kgv [Sun, 20 Dec 2020 16:52:40 +0000 (19:52 +0300)]
0032011: Configuration - add batch files to build OCCT for macOS and iOS targets

Added script adm/scripts/macos_build.sh and template macos_custom.bat.template
intended for automating building routines targeting macOS platform.

Added script adm/scripts/ios_build.sh and template ios_custom.bat.template
intended for automating building routines targeting iOS platform.

3 years ago0031999: Tests - request Core Profile on macOS for Ray-Tracing tests
kgv [Tue, 15 Dec 2020 19:15:33 +0000 (22:15 +0300)]
0031999: Tests - request Core Profile on macOS for Ray-Tracing tests

3 years ago0032015: Visualization - Select3D_SensitiveTriangulation::myDetectedIdx is inaccessible
kgv [Tue, 22 Dec 2020 13:12:57 +0000 (16:12 +0300)]
0032015: Visualization - Select3D_SensitiveTriangulation::myDetectedIdx is inaccessible

Added Select3D_SensitiveTriangulation::LastDetectedTriangle() property.

3 years ago0031939: Coding - correction of spelling errors in comments [part 5]
luz paz [Mon, 21 Dec 2020 08:48:18 +0000 (11:48 +0300)]
0031939: Coding - correction of spelling errors in comments [part 5]

Fix various typos

Fixed via `codespell v2.1.dev

3 years ago0029723: Modeling Data - Get rid of second writing format (additional save of UV...
asuraven [Tue, 15 Dec 2020 09:31:52 +0000 (12:31 +0300)]
0029723: Modeling Data - Get rid of second writing format (additional save of UV points)

Default BinTools_ShapeSet format version has been changed from 3 to 1.
BinMNaming_NamedShapeDriver (Bin OCAF) now writes shapes in 1st version of Binary format instead of 3rd.
XmlMNaming_NamedShapeDriver (Xml OCAF) now writes shapes in 1st version of ASCII  format instead of 2nd.

writebrep now by default writes into 1st binary format version instead of 3rd.

3 years ago0031756: Data Exchange - broken parsing of STEP entity in case of missing last parameter
dpasukhi [Fri, 27 Nov 2020 19:32:18 +0000 (22:32 +0300)]
0031756: Data Exchange - broken parsing of STEP entity in case of missing last parameter

- Parser is corrected to handle case of missing arguments properly (report error without corruption of the next entity)
- Added counter of entity arguments for appropriate error messages
- Plain C tools and data structures (recfile.*, stepfile.*) are converted to C++ class (StepFile_ReadData) to avoid use of static variables, so that reader can be safely used in a multi-threaded environment

3 years ago0032004: Foundation Classes, UnitsAPI - misprint in "ACCOUSTIC INTENSITY" unit name
luz paz [Thu, 10 Dec 2020 08:40:53 +0000 (11:40 +0300)]
0032004: Foundation Classes, UnitsAPI - misprint in "ACCOUSTIC INTENSITY" unit name

Found using `codespell 2.1.dev0`

3 years ago0031226: Foundation Classes - TCollection_AsciiString::IsRealValue() returns true...
mkrylova [Mon, 14 Dec 2020 12:18:43 +0000 (15:18 +0300)]
0031226: Foundation Classes - TCollection_AsciiString::IsRealValue() returns true if a string contains a non-real value

- Added comment to the method
- Added Boolean argument indicating the need for a strict
- Extended OCC11758 command in QABugs_19.cxx to verify IsRealValue()
- Updated existing places of IsRealValue() usage in ViewerTest to use new flag

3 years ago0029822: Make TDocStd_Document extensible
vro [Thu, 17 Dec 2020 11:34:47 +0000 (14:34 +0300)]
0029822: Make TDocStd_Document extensible

Two virtual methods NewDocument() and InitDocument() are moved from TDocStd_Application to its parent class CDF_Application. In TDocStd_Application these methods remain redefined. These little changes allow creation of a new document only in one virtual method NewDocument(). The methods CreateDocument() in all retrieval drivers are deleted.

Modified files:
- CDF_Application.hxx and cxx: two virtual methods NewDocument() and InitDocument() are moved from TDocStd_Application. The input parameter TDocStd_Document is changed to parent class CDM_Document.
- TDocStd_Application.hxx and cxx: redefines new virtual methods NewDocument() and InitDocument() of the parent class CDF_Application.
- BinLDrivers_DocumentRetrievalDriver.hxx and cxx, StdLDrivers_DocumentRetrievalDriver.hxx and cxx, XmlLDrivers_DocumentRetrievalDriver.hxx and cxx, PCDM_Reader.hxx: a virtual method CreateDocument() is deleted.
- TObj_Application.cxx, XCAFApp_Application.hxx and cxx: down-casting to a descendant class TDocStd_Document is applied.

Documentation:
- upgrade.md is modified.

3 years ago0031945: Foundation Classes - unique names of alerts of message report in DumpJson IR-2020-12-18
nds [Fri, 18 Dec 2020 10:09:08 +0000 (13:09 +0300)]
0031945: Foundation Classes - unique names of alerts of message report in DumpJson

- add OCCT_DUMP_FIELD_VALUE_NUMERICAL_INC and OCCT_DUMP_FIELD_VALUES_DUMPED_INC - to increment key Value;
- add OCCT_DUMP_STREAM_VALUE_DUMPED - to give stream as a parameter of the DumpJson;
- correct Message_Report, Message_CompositeAlerts to increment keys;
- correct Message_AttributeMeter to have in result start and stop values united in value block: [start stop]. It's better for parsing;
- correct result of Message::MetricToString output for updated in 29451 Message_MetricType enum;
- correct Standard_Dump::AddValuesSeparator to avoid adding ',' in additional case;
- correct Standard_Dump::FormatJson to add opening/closing brace for the whole result (for valid parsing);
- correct Standard_Dump::FormatJson to ignore '\n' in value.

3 years ago0032001: Visualization - moving dump of selection owner from sensitive to selection...
nds [Wed, 16 Dec 2020 09:19:17 +0000 (12:19 +0300)]
0032001: Visualization - moving dump of selection owner from sensitive to selection manager

3 years ago0031998: Tests - unexpected file artifact at the root of repository
asuraven [Wed, 16 Dec 2020 14:28:36 +0000 (17:28 +0300)]
0031998: Tests - unexpected file artifact at the root of repository

Saving path for .obj file changed

3 years ago0031350: Foundation Classes - Dump improvement for OCAF classes
nds [Wed, 16 Dec 2020 09:08:49 +0000 (12:08 +0300)]
0031350: Foundation Classes - Dump improvement for OCAF classes

- do not dump document in CDM_MetaData, just pointer text;
- move ID dump in to TDF_Attribute;
- extend TDF_Attribute with other important states(obtained by methods);
- extend TDocStd_Document  with other important states;
- avoid dumping of shapes in TNaming_UsedShapes (it takes much time);
- extend XCAFDoc, XCAFDimTolObjects dump to json;
- correct XCAFDoc_ColorTool, XCAFDoc_MaterialTool, XCAFDoc_LayerTool to dump only connected to the object information;
- correct XCAFDoc_Material to dump name and density value only if it exists;
- add check on correct direction in gp_Ax3.

3 years ago0032000: Foundation Classes - collect OSD_Timer time in message report
nds [Wed, 16 Dec 2020 09:29:06 +0000 (12:29 +0300)]
0032000: Foundation Classes - collect OSD_Timer time in message report

Added Message_MetricType_WallClock metric type handled by Message_AttributeMeter.
Added public OSD_Timer::GetWallClockTime() method.

3 years ago0031983: Samples - CSharp cannot be compiled "atomic<> is not supported by C++/CLI"
mpv [Wed, 16 Dec 2020 11:49:13 +0000 (14:49 +0300)]
0031983: Samples - CSharp cannot be compiled "atomic<> is not supported by C++/CLI"

Removed includes-dependency of the CSharp sample from TDF_Label.hxx

3 years ago0031995: Modeling Data - Bounding box wrong for face
ifv [Wed, 9 Dec 2020 14:28:37 +0000 (17:28 +0300)]
0031995: Modeling Data - Bounding box wrong for face

BndLib/BndLib_AddSurface.cxx : algorithm of building bounding box for BSpline surfaces is improved

Test cases are modified according to current state of algorithm
Test case bug31995 added

3 years ago0031944: Foundation Classes, Message_Report - add missing mutex locks for message...
nds [Sat, 31 Oct 2020 19:58:22 +0000 (22:58 +0300)]
0031944: Foundation Classes, Message_Report - add missing mutex locks for message level

3 years ago0031939: Coding - correction of spelling errors in comments [part 4]
luz paz [Wed, 16 Dec 2020 08:58:16 +0000 (11:58 +0300)]
0031939: Coding - correction of spelling errors in comments [part 4]

Fix various typos

Fixed via `codespell v2.1.dev

3 years ago0030762: Foundation Classes - include backtrace within OSD_SIGSEGV
kgv [Mon, 3 Jun 2019 05:06:24 +0000 (08:06 +0300)]
0030762: Foundation Classes - include backtrace within OSD_SIGSEGV

Standard_Failure now holds an optional stack trace dump.
Added function Standard::StackTrace() dumping backtrace to the string.
SegvHandler within OSD_signal now appends backtrace to the message
if OSD::SignalStackTraceLength() is set to non-zero value
or environment variable "CSF_DEBUG_MODE" is set for debugging.

Added auxiliary macros Standard_NOINLINE disallowing function inlining.

Command "dsetsignal" has been extended by -strackTraceLength argument
for defining stack trace length within signals redirected to C++ exceptions.
Added "ddebugtraces" command for debugging purposes (adding stack traces to all exceptions).

3 years ago0031946: Modeling Data - replace version numbers with enumerations in TopTools and...
asuraven [Tue, 3 Nov 2020 14:22:14 +0000 (17:22 +0300)]
0031946: Modeling Data - replace version numbers with enumerations in TopTools and BinTools

Added enumerations BinTools_FormatVersion & TopTools_FormatVersion for more clear version tracking in the code.
Added new BinTools::Write() & BRepTools::Write() overloaded functions with version & isWithTriangles parameters.

Added new "readbrep"/"writebrep" DRAW commands handling reading and writing of both Binary and ASCII .brep formats
and providing arguments to setup writing of triangulation data and of format version.
"binrestore" is made an alias to new command "readbrep".
"binsave" now is an alias to new "writebrep" saving into binary format by default ("writebrep" writes into ASCII format by default).

3 years ago0031997: Visualization, TKOpenGl - phong shader compilation error with normal texture...
kgv [Mon, 14 Dec 2020 21:37:49 +0000 (00:37 +0300)]
0031997: Visualization, TKOpenGl - phong shader compilation error with normal texture map enabled

OpenGl_ShaderManager::defaultGlslVersion() now defines GLSL 120 for normal map texture.

3 years ago0031994: Draw Harness - dversion prints "Architecture: unrecognized" on ARM host
kgv [Sun, 13 Dec 2020 19:56:45 +0000 (22:56 +0300)]
0031994: Draw Harness - dversion prints "Architecture: unrecognized" on ARM host

Added handling of __aarch64__ macros.

3 years ago0031996: Visualization - PhongShading.fs compilation error on OpenGL drivers for...
kgv [Mon, 14 Dec 2020 19:07:24 +0000 (22:07 +0300)]
0031996: Visualization - PhongShading.fs compilation error on OpenGL drivers for AMD Radeon

Fixed occLight_IsHeadlight() misuse in sample GLSL program.

3 years ago0031703: Data Exchange, RWGltf_CafWriter - add option putting textures inside GLB...
mkrylova [Fri, 6 Nov 2020 08:33:58 +0000 (11:33 +0300)]
0031703: Data Exchange, RWGltf_CafWriter - add option putting textures inside GLB file as alternative to external references

RWGltf_CafWriter::ToEmbedTexturesInGlb() - added option embedding textures
into GLB file enabled by default.
Fixed uninitialized class field RWGltf_CafWriter::myIsForcedUVExport.

Image_Texture::MimeType() - added method returning MIME type based on image file format.
Image_Texture::WriteImage() - added method writing image into stream.

3 years ago0029441: Modeling Algorithms - Incorrect intersection curves between faces
ifv [Tue, 24 Nov 2020 11:17:03 +0000 (14:17 +0300)]
0029441: Modeling Algorithms - Incorrect intersection curves between faces

ApproxInt/ApproxInt_SvSurfaces.hxx : adding field myUseSolver in order to manage calculations of characteristics of intersection points.
ApproxInt/ApproxInt_MultiLine.gxx : implementation of using myUseSolver for treatment points of MultiLine.
ApproxInt/ApproxInt_ImpPrmSvSurfaces.gxx : implementation of using myUseSolver for case intersection of implicit and parametric surfaces.

Test cases added

3 years ago0031705: Visualization - move out construction of predefined markers from OpenGl_Aspe...
mkrylova [Fri, 20 Nov 2020 12:10:23 +0000 (15:10 +0300)]
0031705: Visualization - move out construction of predefined markers from OpenGl_AspectsSprite to Graphic3d_MarkerImage

Built-in markers definition has been moved from OpenGl_AspectsSprite to Graphic3d_MarkerImage and generalized.
RGBA8 pixel format is now preferred over BGRA8.
Fallback OpenGL 1.1 rendering code now supports drawing of colored markers using glDrawPixels().

Added function Image_PixMap::FlipY() flipping image rows.

3 years ago0029901: Support save to and restore from Stream interface in TObj package
vro [Fri, 11 Dec 2020 15:13:25 +0000 (18:13 +0300)]
0029901: Support save to and restore from Stream interface in TObj package

Storage and retrieval of a document by means of a stream is distributed to TObj model.
Modified files:
-TObj_Model.hxx, cxx - the virtual methods Load() and SaveAs() obtained a stream as an argument instead of a file name.
-TObj_Application.hxx, cxx - same extension: the virtual methods LoadDocument() and SaveDocument() use a stream to open and save a document.
-TObjDRAW.cxx - draw-commands TObjSave and TObjLoad are extended for -stream parameter, which allows usage of a file input or output stream instead of a file name.

A new test:
- bugs caf bug29901 - it creates a simple TObj-model, saves it on disk using a file stream, loads it by means of a file stream and checks the content.

Modified test:
- bugs caf bug28425 - just improved to proper manipulate a test-file on disk.

3 years ago0027426: FSD_BinaryFile: Assignment to a temporary handle variable
vro [Mon, 14 Dec 2020 10:18:27 +0000 (13:18 +0300)]
0027426: FSD_BinaryFile: Assignment to a temporary handle variable

A reference is added to the returning object of the method Storage_InternalData::ReadArray().
Modified files:
- Storage_InternalData.hxx

OCCT: CR27426
Products: nothing

3 years ago0031597: Visualization, TKOpenGl - allow disabling Alpha component writes within...
kgv [Sat, 12 Dec 2020 09:24:50 +0000 (12:24 +0300)]
0031597: Visualization, TKOpenGl - allow disabling Alpha component writes within OpenGl_Context::ColorMask()

Added OpenGl_Caps::buffersOpaqueAlpha option allowing to disable writes
into alpha component of color buffer and keep it opaque.
Added OpenGl_Context::SetColorMaskRGBA() method overriding each color component deliberately.

New option is set within WebGL sample.

3 years ago0031000: Data Exchange - STEP file cannot be opened due to lower-case special token...
dpasukhi [Tue, 24 Nov 2020 12:52:39 +0000 (15:52 +0300)]
0031000: Data Exchange - STEP file cannot be opened due to lower-case special token End-ISO-10303-21

Update flex lexical scanner (step.lex lex.step.cxx) to parse special tokens in a case insensitive manner

3 years ago0031939: Coding - correction of spelling errors in comments [part 3] IR-2020-12-11
luz paz [Thu, 10 Dec 2020 08:40:53 +0000 (11:40 +0300)]
0031939: Coding - correction of spelling errors in comments [part 3]

Fix various typos

Fixed via `codespell v2.1.dev0`

3 years ago0031985: Documentation - description of TDocStd_FormatVersion is excessive
vro [Wed, 9 Dec 2020 09:08:40 +0000 (12:08 +0300)]
0031985: Documentation - description of TDocStd_FormatVersion is excessive

Description of TDocStd_FormatVersion enum is simplified and formatting for good rendering in HTML

3 years ago0028966: Coding Rules - remove Adaptor2d_HCurve2d, Adaptor3d_HCurve and Adaptor3d_HSu...
kgv [Thu, 3 Dec 2020 14:36:19 +0000 (17:36 +0300)]
0028966: Coding Rules - remove Adaptor2d_HCurve2d, Adaptor3d_HCurve and Adaptor3d_HSurface classes

Adaptor2d_Curve2d, Adaptor3d_Curve and Adaptor3d_Surface now inherit Standard_Transient.
Interfaces Adaptor2d_HCurve2d, Adaptor3d_HCurve, Adaptor3d_HSurface and their subclasses
are now aliases to Adaptor2d_Curve2d, Adaptor3d_Curve and Adaptor3d_Surface.
Removed numerous unsafe reinterpret casts.

Generic classes Adaptor3d_GenHCurve, Adaptor3d_GenHSurface, Adaptor2d_GenHCurve2d have been removed.
Several redundant .lxx files have been merged into .hxx.

Removed obsolete adaptor classes with H suffix.

3 years ago0031987: Visualization - Slow rectangular selection on models with big number of...
age [Tue, 8 Dec 2020 10:32:07 +0000 (13:32 +0300)]
0031987: Visualization - Slow rectangular selection on models with big number of sensitives

SelectMgr_SensitiveEntitySet now stores a map of registered owners with a counter of registered entities.
SelectMgr_ViewerSelector::traverseObject() now reads the number of sensitive entities for specific owner
from SelectMgr_SensitiveEntitySet instead of re-computing it every time.

3 years ago0031986: Visualization - Regression in StdPrs_WFDeflectionRestrictedFace::Add()
kgv [Mon, 7 Dec 2020 10:39:07 +0000 (13:39 +0300)]
0031986: Visualization - Regression in StdPrs_WFDeflectionRestrictedFace::Add()

Fixed misplaced closing bracket after #0030146 fix.

3 years ago0031977: Modeling Algorithms - useless static variable in BRepFill_OffsetWire::Init...
abv [Sun, 6 Dec 2020 16:20:47 +0000 (19:20 +0300)]
0031977: Modeling Algorithms - useless static variable in BRepFill_OffsetWire::Init() preventing its parallel usage

Removed useless "static" before local variable and some commented code

3 years ago0031923: DXF import - add support of code page DOS850
dpasukhi [Mon, 23 Nov 2020 12:04:06 +0000 (15:04 +0300)]
0031923: DXF import - add support of code page DOS850

- Add support for converting from CP850 to UTF-8 and UTF-8 to CP850;
- Add support for reading STEP file encoding by cp850 code page.

3 years ago0031402: Modeling Data - Geom_BSplineSurface::Segment() produces wrong result IR-2020-12-04
aavtamon [Wed, 2 Dec 2020 07:18:15 +0000 (10:18 +0300)]
0031402: Modeling Data - Geom_BSplineSurface::Segment() produces wrong result

In the method Segment() index1 needs to be checked as well as index2 in Geom_BSplineSurface and Geom2d_BSplineCurve
(Geom_BSplineCurve already has this check).
New test cases bug31402_1, bug31402_2 has been added.

The unnecessary code block in Geom2d_BSplineCurve has been deleted,
and checking index2 block has beed extended.

3 years ago0031976: Foundation Classes, BVH_IndexedBoxSet - access members of base class via...
emv [Fri, 4 Dec 2020 05:52:23 +0000 (08:52 +0300)]
0031976: Foundation Classes, BVH_IndexedBoxSet - access members of base class via this pointer

3 years ago0030737: Visualization - implementing new selection schemes in context
nds [Fri, 18 Sep 2020 18:36:05 +0000 (21:36 +0300)]
0030737: Visualization - implementing new selection schemes in context

AIS_SelectionScheme enumeration is defined to set which selection behaviour is used in Select of context
AIS_InteractiveContext is corrected to use single Select method instead of combination of Select/ShiftSelect methods with a selection scheme parameter.
Upgrade: Select() -> SelectDetected/Rectangle/Polygon(AIS_SelectionScheme_Replace), ShiftSelect -> SelectDetected/Rectangle/Polygon(AIS_SelectionScheme_XOR)

3 years ago0030075: [REGRESSION] Shape Healing - Regression after implementation of fix for...
skl [Wed, 25 Nov 2020 10:55:12 +0000 (13:55 +0300)]
0030075: [REGRESSION] Shape Healing - Regression after implementation of fix for bug 28694.

Detect situation when U or V parameter has a big jump between two neighbour 2D points (diffX > 0.95*(Umax-Umin) or diffY > 0.95*(Vmax-Vmin)).
Additionaly surface must BSpline and distance between corresponding 3D points must be less than given precision.
For set of 2D points contains such jump method InsertAdditionalPointOrAdjust() is performed.

3 years ago0031972: Application Framework, FSD_CmpFile - exception on reading file in old persis...
kgv [Wed, 2 Dec 2020 11:28:38 +0000 (14:28 +0300)]
0031972: Application Framework, FSD_CmpFile - exception on reading file in old persistence format with Windows EOL

FSD_CmpFile::ReadLine()/FSD_CmpFile::ReadString() now use TCollection_AsciiString::Trunc()
instead of ill-formed character assignment to '\0'.

3 years ago0029217: Application Framework - nonsense API method XmlLDrivers::SetStorageVersion()
vro [Wed, 2 Dec 2020 06:38:28 +0000 (09:38 +0300)]
0029217: Application Framework - nonsense API method XmlLDrivers::SetStorageVersion()

1. Unification of usage of a storage version of an OCAF document by XML and binary file formats.
2. A new format version enumeration in TDocStd package: TDocStd_FormatVersion.
3. Removal of unnecessary methods for storage version like XmlLDrivers::StorageVersion() and BinLDrivers::StorageVersion().
4. Support of old documents (storage version <= 9) in binary file format (came from ESA).

New files:
- TDocStd_FormatVersion.hxx: a new storage format version enumeration for an OCAF document.

Modified files:
- CDM_Document.hxx and cxx: removal of storage format version property (moved to TDocStd_Document).
- TDocStd_Document.hxx and cxx: a storage format version property (moved from CDM_Document).
- BinLDrivers_DocumentSection.hxx and cxx: support of old document storage version in binary file format.
- BinDrivers_DocumentStorageDriver.hxx and cxx,
- BinLDrivers_DocumentStorageDriver.hxx and cxx,
- BinLDrivers_DocumentRetrievalDriver.cxx,
- XmlLDrivers_DocumentRetrievalDriver.cxx,
- XmlLDrivers_DocumentStorageDriver.cxx: usage of document storage version from TDocStd_Document in storage and retrieval drivers.
- DDocStd_ApplicationCommands.cxx: draw-command name StorageVersion is replaced by StorageFormatVersion (to be the same everywhere). A corresponding script is corrected too.

New test:
- bugs caf bug29217: a test case for old document storage version in binary file format. It checks several attributes saved by the version TDocStd_FormatVersion_VERSION_7 (old) and the latest version.

Modified test:
- caf presentation M1: the test used a file in the current folder, not in {imagedir} like all other tests.
- bugs caf bug28691

Documentation:
- dox/upgrade/upgrade.md

// All remarks are fixed.

3 years ago0031965: Visualization - AIS_InteractiveContext::HilightWithColor() ignores passed...
kgv [Mon, 30 Nov 2020 08:47:30 +0000 (11:47 +0300)]
0031965: Visualization - AIS_InteractiveContext::HilightWithColor() ignores passed highlight style

AIS_InteractiveContext::highlightGlobal() now passed through Style argument to highlightOwners().
Added OCC31965 command for testing AIS_InteractiveContext::Hilight() behavior.

3 years ago0031939: Coding - correction of spelling errors in comments [part 2]
luz paz [Mon, 30 Nov 2020 09:55:48 +0000 (12:55 +0300)]
0031939: Coding - correction of spelling errors in comments [part 2]

Fix various typos

Fixed via `codespell v2.0.dev`

3 years ago0029564: STEP Import and Export failure IR-2020-11-27
skl [Mon, 2 Nov 2020 16:52:44 +0000 (19:52 +0300)]
0029564: STEP Import and Export failure

In the result of translation one face lying on the spherical surface converted to the two separate faces due to method IsSurfaceUVPeriodic returned false for spherical surface.
Now method IsSurfaceUVPeriodic returns true for spherical surface in order to natural bounds can be added for spherical surface too.
Method ShapeFix_Face::FixOrientation was corrected to avoid reversing inner wire for case when spherical face has only one inner bound without outer bound.
Check that wire has bounding box equal to bounding box of surface was added in the method ShapeFix_Face::FixAddNaturalBound in order to avoid addition of the natural bounds ( test bugs xde bug22535_2 1 for face 2 lying on the torus)

In order to avoid regressions fix for translation "VERTEX_LOOP" entities was added. Natural bounds for "VERTEX_LOOP" lying on the Spherical and BSpline surface is added only if face does not have any other bounds.
In other case natural bounds were added during ShapeFix operation after translation in order take into account mutual position of the all bounds in the UV space of the face.

3 years ago0031958: Tests - testdiff shows empty Total Image difference
kgv [Wed, 25 Nov 2020 12:18:01 +0000 (15:18 +0300)]
0031958: Tests - testdiff shows empty Total Image difference

stat(img1) counter is now incremented in case of total log.

Renamed "Total Image difference" -> "Total IMAGE difference" for consistency with other output.

Regexp inserting links to images now looks for "IMAGE ..." at the start of line
to avoid misdetection on "Total IMAGE difference" line.
_diff_show_positive_ratio() now prints image difference percents
without leading empty space to highlight large deviations in RED.

Image files having no match are now added to statistics as differences.

3 years ago0031940: Foundation Classes - TCollection_ExtendedString::Print() corrupts UNICODE...
kgv [Wed, 18 Nov 2020 11:56:59 +0000 (14:56 +0300)]
0031940: Foundation Classes - TCollection_ExtendedString::Print() corrupts UNICODE strings and does not compile with C++20

TCollection_ExtendedString::Print() now converts string into UTF-8
instead of printing character indexes.

3 years ago0031921: Application Framework - reading OCAF data from several threads is not possible
mpv [Mon, 16 Nov 2020 13:49:23 +0000 (16:49 +0300)]
0031921: Application Framework - reading OCAF data from several threads is not possible

Make myLastFoundChild field of TDF_LabelNode that can be changed during accessing to different sub-labels in different threads as atomic (only for newer versions of compilers which support this "atomic").

Added definition of Standard_ATOMIC macro to the Standard_Macro.hxx

3 years ago0031913: Modeling Algorithms - Invalid result of cut operation
emv [Wed, 25 Nov 2020 05:18:13 +0000 (08:18 +0300)]
0031913: Modeling Algorithms - Invalid result of cut operation

Fixed by 0029711. Integrating test case only.

3 years ago0030703: Modeling Algorithms - Intersector returns overlapping curves
ifv [Thu, 5 Nov 2020 12:28:17 +0000 (15:28 +0300)]
0030703: Modeling Algorithms - Intersector returns overlapping curves

IntPatch/IntPatch_ImpPrmIntersection.cxx - calculation of step depending on resolution of surface

IntWalk_IWalking_6.gxx - calculation of point-line coincidence is improved

Correction of tests according to current results

lowalgos/intss/bug30703 - new test case added

3 years ago0029392: Modeling data - Exception when getting UIso of offset surface of surface...
akaftasev [Thu, 19 Nov 2020 11:42:18 +0000 (14:42 +0300)]
0029392: Modeling data - Exception when getting UIso of offset surface of surface of linear extrusion

Added treatment for Geom_OffsetSurface::UIso() if basisSurface is Geom_SurfaceOfLinearExtrusion

3 years ago0026047: Data Exchange - Lost colors for IGES export
dpasukhi [Wed, 11 Nov 2020 11:23:30 +0000 (14:23 +0300)]
0026047: Data Exchange - Lost colors for IGES export

- Fix problem with write shape with locations ( IGESCAFControl_Writer.cxx )
- Add support for adding sub-shapes (labels) together with sub-shapes without location ( XCAFDoc_ShapeTool.cxx )

3 years ago0028572: Modeling Algorithms - Wrong result of the mkface command IR-2020-11-20
aavtamon [Tue, 27 Oct 2020 13:15:22 +0000 (16:15 +0300)]
0028572: Modeling Algorithms - Wrong result of the mkface command

- Added note to BRepBuilderAPI_MakeFace(const Handle(Geom_Surface)& S,
const TopoDS_Wire& W,
const Standard_Boolean Inside = Standard_True)
in BRepBuilderAPI_MakeFace.hxx;
- Modified subsubsection occt_modalg_3_5_2 in dox/user_guides/modeling_algos/modeling_algos.md

3 years ago0027130: Visualization, Ray tracing - skip structures with transformation persistence...
mzernova [Thu, 9 Jul 2020 08:32:40 +0000 (11:32 +0300)]
0027130: Visualization, Ray tracing - skip structures with transformation persistence flag

Objects with transform persistence are detected as non ray-tracable and redered using the rasterization approach.
The renderFiltered() method moved to the OpenGl_Group class.

v3d/raytrace/bug27130: test case added

3 years ago0031939: Coding - correction of spelling errors in comments
luz paz [Fri, 13 Nov 2020 15:46:02 +0000 (10:46 -0500)]
0031939: Coding - correction of spelling errors in comments

Fix various typos

Fixed via `codespell v2.0.dev`

3 years ago0029642: Foundation Classes - deprecate TCollection classes except strings
kgv [Mon, 29 Jun 2020 07:35:07 +0000 (10:35 +0300)]
0029642: Foundation Classes - deprecate TCollection classes except strings

Removed remnants of generic templates in TCollection package.

3 years ago0031943: Foundation Classes, TColStd_PackedMapOfInteger - get rid of TCollection_BasicMap
kgv [Wed, 26 Sep 2018 14:10:30 +0000 (17:10 +0300)]
0031943: Foundation Classes, TColStd_PackedMapOfInteger - get rid of TCollection_BasicMap

TCollection_BasicMap has been merged into TColStd_PackedMapOfInteger.
TColStd_PackedMapOfInteger has been cleaned up from redundant type casts.

3 years ago0029827: Modeling Data - TopoDS_Shape::Nullify() does not reset location
akaftasev [Tue, 10 Nov 2020 06:41:23 +0000 (09:41 +0300)]
0029827: Modeling Data - TopoDS_Shape::Nullify() does not reset location

TopoDS_Shape::Nullify() nullify not only myTShape but myLocation and myOrient.
Nullified shapes are equal and same now.
Added test.

3 years ago0031922: Configuration - unresolved external symbol NCollection_Lerp<Handle(Graphic3d...
kgv [Thu, 12 Nov 2020 09:02:44 +0000 (12:02 +0300)]
0031922: Configuration - unresolved external symbol NCollection_Lerp<Handle(Graphic3d_Camera)>::Interpolate()

A normal method Graphic3d_Camera::Interpolate() is now exported instead of
template method NCollection_Lerp<Handle(Graphic3d_Camera)>::Interpolate().

3 years ago0029855: Data Exchange, XCAF GD&T - PMI objects copy constructors ignore presentation
skl [Wed, 11 Nov 2020 10:27:33 +0000 (13:27 +0300)]
0029855: Data Exchange, XCAF GD&T - PMI objects copy constructors ignore presentation

Add all missing values.

3 years ago0030342: Modeling Data - Successively trimming surface in both directions lose the...
akaftasev [Mon, 2 Nov 2020 14:23:14 +0000 (17:23 +0300)]
0030342: Modeling Data - Successively trimming surface in both directions lose the first trim

Added trim for U and V directions when trimming happens sequentially in these directions.
Added possibility to set sense to trim command.

3 years ago0031815: Visualization, TKOpenGl - avoid XResizeWindow() within OpenGl_Window::Resize()
kgv [Mon, 9 Nov 2020 07:55:34 +0000 (10:55 +0300)]
0031815: Visualization, TKOpenGl - avoid XResizeWindow() within OpenGl_Window::Resize()

OpenGl_Window::Resize() no more calls XResizeWindow() and relies only on dimensions returned by Aspect_Window.
Xw_Window::Size() now ignores Window in case of virtual window in similar way as WNT_Window does.

3 years ago0031729: Visualization, Prs3d_DatumAspect - provide per axis text aspects
kgv [Thu, 5 Nov 2020 14:34:08 +0000 (17:34 +0300)]
0031729: Visualization, Prs3d_DatumAspect - provide per axis text aspects

Prs3d_DatumAspect::TextAspect() now takes Prs3d_DatumParts argument
and defined separately for Prs3d_DatumParts_XAxis/Prs3d_DatumParts_YAxis/Prs3d_DatumParts_ZAxis.
The method without arguments has been marked as deprecated.

V3d_Trihedron now stores per-label text attributes.
Added method V3d_View::Trihedron() returning V3d_Trihedron object for more straightforward definition.
V3d_Trihedron::SetWireframe() - added missing invalidation.

AIS_Trihedron::setOwnDatumAspect() implementation has been moved to Prs3d_DatumAspect::CopyAspectsFrom()
and now used by Prs3d_Drawer::SetOwnDatumAspects().
OpenGl_Text::render() - added NULL-check.

AIS_Trihedron::computePresentation() now takes into account Prs3d_Datum*Arrow shading/line aspects.

Command vtrihedron has been extended by "-textColor XAxis|YAxis|ZAxis Color" syntax.
Command vviewcube has been extended by "-xAxisTextColor|-yAxisTextColor|-zAxisTextColor" arguments.

3 years ago0031909: Visualization, AIS_Trihedron - replace maps with arrays
kgv [Thu, 5 Nov 2020 09:30:46 +0000 (12:30 +0300)]
0031909: Visualization, AIS_Trihedron - replace maps with arrays

Prs3d_DatumAspect, AIS_Trihedron - redundant maps have been replaced by explicitly sized arrays.

AIS_Trihedron::myHasOwnDatumAspect - removed unused class field.

Prs3d_DatumAttribute, Prs3d_DatumParts, Prs3d_DatumAxes - enumeration values
have been renamed to have full name prefix.

vzbufftrihedron - fixed no more necessary Quantity_Color -> Quantity_NameOfColor convertion.

3 years ago0031908: Draw Harness, TKTopTest - wavefront file path length is limited to 100 chara...
asuraven [Tue, 3 Nov 2020 14:22:14 +0000 (17:22 +0300)]
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

3 years ago0030421: Data Exchange - Standard_RangeError exception while reading VRML files with...
skl [Fri, 6 Nov 2020 08:16:22 +0000 (11:16 +0300)]
0030421: Data Exchange - Standard_RangeError exception while reading VRML files with polygons

Import of arbitrary polygon is implemented in VrmlData_IndexedFaceSet.
Class IFCCAFControl_Triangulator has been moved to BRepMesh_Triangulator.
New Draw test /bugs/stlvrml/bug30421 is added.

3 years agoUpdate version up to 7.6.0.dev
bugmaster [Wed, 11 Nov 2020 16:59:29 +0000 (19:59 +0300)]
Update version up to 7.6.0.dev

3 years agoIncrement OCCT version up to 7.5.0 OCCT-750 V7_5_0
bugmaster [Mon, 2 Nov 2020 16:52:44 +0000 (19:52 +0300)]
Increment OCCT version up to 7.5.0

3 years ago0031898: Coding Rules - extend Standard_WarningsDisable.hxx with -Wreorder
kgv [Mon, 2 Nov 2020 14:36:34 +0000 (17:36 +0300)]
0031898: Coding Rules - extend Standard_WarningsDisable.hxx with -Wreorder

3 years ago0029108: Crash writing STEP file
asuraven [Mon, 2 Nov 2020 06:31:55 +0000 (09:31 +0300)]
0029108: Crash writing STEP file

* Wrapped a try / catch block on creating objects in TopoDSToStep_MakeStepFace::Init()

3 years ago0031887: IntTools_Context::IsPointInFace always return TRUE IR-2020-10-30
Xu Zhongxing [Thu, 29 Oct 2020 11:33:27 +0000 (19:33 +0800)]
0031887: IntTools_Context::IsPointInFace always return TRUE

If aDist >= aTol, bIn is never updated to false, and the function
always returns TRUE.

3 years ago0031888: Configuration, qmake - linkage error due to missing .cpp file in TKMesh
kgv [Thu, 29 Oct 2020 14:18:10 +0000 (17:18 +0300)]
0031888: Configuration, qmake - linkage error due to missing .cpp file in TKMesh

OccToolkit.pri now handles also .cpp file extension.

3 years ago0031878: DXF import - support Windows and ISO 8859 code pages in DXF import
dpasukhi [Wed, 28 Oct 2020 12:13:56 +0000 (15:13 +0300)]
0031878: DXF import - support Windows and ISO 8859 code pages in DXF import

Add support of converting Big5 and GBK code pages to Unicode within Resource_Unicode::ConvertFormatToUnicode

3 years ago0030921: Data Exchange - STEPCAFControl_Reader incorrectly reads the specified stp...
asuraven [Tue, 15 Sep 2020 18:54:40 +0000 (21:54 +0300)]
0030921: Data Exchange - STEPCAFControl_Reader incorrectly reads the specified stp file -- refactoring

File StepToGeom_MakeBSplineCurve.pxx is removed, relevant code is converted to C++ template and merged to StepToGeom.cxx

3 years ago0030921: Data Exchange - STEPCAFControl_Reader incorrectly reads the specified stp...
asuraven [Tue, 15 Sep 2020 18:14:39 +0000 (21:14 +0300)]
0030921: Data Exchange - STEPCAFControl_Reader incorrectly reads the specified stp file -- fix

The number of weights is adjusted to the number of poles in StepToGeom::MakeBSplineCurve(2d).

3 years ago0031884: Data Exchange - NULL de-reference within STEPCAFControl_Reader::SetSourceCod...
kgv [Tue, 27 Oct 2020 08:41:12 +0000 (11:41 +0300)]
0031884: Data Exchange - NULL de-reference within STEPCAFControl_Reader::SetSourceCodePage()

Removed methods with unclear usage rules.

3 years ago0031808: Visualization - NULL dereference in Graphic3d_Structure::IsDisplayed() on...
mzernova [Mon, 26 Oct 2020 14:14:05 +0000 (17:14 +0300)]
0031808: Visualization - NULL dereference in Graphic3d_Structure::IsDisplayed() on Removed presentation

Added a NULL check for IsDisplayed(), IsHighlighted(), IsTransformed(), IsVisible(), etc.

3 years ago0014673: Provide true support for Unicode symbols
abv [Sun, 25 Oct 2020 19:10:27 +0000 (22:10 +0300)]
0014673: Provide true support for Unicode symbols

Construction of TCollection_ExtendedString from plain C string is fixed to consider input string as UTF-8 in several places (identified as described in notes to #31113).

Message_MsgFile is corrected to load resource file as UTF-8 (unless it has BOM indicating use of UTF-16).

Added tests for use of Unicode in some DRAW commands (bugs demo bug14673_*)

3 years ago0031881: Coding Rules - OpenGl_HaltonSampler::initRandom() uses deprecated in C+...
kgv [Tue, 27 Oct 2020 04:57:36 +0000 (07:57 +0300)]
0031881: Coding Rules - OpenGl_HaltonSampler::initRandom() uses deprecated in C++14 function std::random_shuffle

Unused function has been removed.

3 years ago0030003: Construction of pipe by two circular sections and spine curve leads to crash
akaftasev [Wed, 16 Sep 2020 13:01:38 +0000 (16:01 +0300)]
0030003: Construction of pipe by two circular sections and spine curve leads to crash

GeomFill_NSection.cxx  : setting of UPeriodic flag while call constructor of BSpline surface is added

bug3003 : Test cases added

3 years ago0031873: Samples, Qt OCCT Overview sample - Problems of compilation and launch in...
asuraven [Mon, 26 Oct 2020 13:35:51 +0000 (16:35 +0300)]
0031873: Samples, Qt OCCT Overview sample - Problems of compilation and launch in 32 bit mode on Windows

3 years ago0031876: Configuration - Prs3d_Arrow::DrawShaded() crashes in msvc10 win32 Release...
kgv [Sat, 24 Oct 2020 18:01:50 +0000 (21:01 +0300)]
0031876: Configuration - Prs3d_Arrow::DrawShaded() crashes in msvc10 win32 Release build

Use longer code syntax to workaround compiler bug.

3 years ago0031877: DRAW - some Visualization commands are not protected against uninitialized...
abv [Fri, 2 Oct 2020 03:54:01 +0000 (06:54 +0300)]
0031877: DRAW - some Visualization commands are not protected against uninitialized viewer

Added protections in DRAW commands against accessing Null context

Added test bugs demo bug31877

3 years ago0031875: Draw Harness, ViewerTest - command vaspects -mostContinuity lacks g1 and... IR-2020-10-23
kgv [Fri, 23 Oct 2020 08:35:15 +0000 (11:35 +0300)]
0031875: Draw Harness, ViewerTest - command vaspects -mostContinuity lacks g1 and g2 options

vaspects -mostContinuity now accepts g1 and g2 values.

3 years ago0031858: Modeling Algorithms - boolean operation crash between the given cylinder...
emv [Thu, 22 Oct 2020 11:47:23 +0000 (14:47 +0300)]
0031858: Modeling Algorithms - boolean operation crash between the given cylinder and torus.

Integrating test cases only, as the problem is not reproduced.

3 years ago0031782: Modeling Algorithms - Regressions on VS 2019 (vc142) on fillet tests
ifv [Thu, 22 Oct 2020 12:28:40 +0000 (15:28 +0300)]
0031782: Modeling Algorithms - Regressions on VS 2019 (vc142) on fillet tests

ChFiKPart_ComputeData_FilPlnCyl.cxx - rewriting some code to avoid "extra" optimization

3 years ago0031825: Data Exchange, STEP - NULL dereference while re-exporting model with empty...
dpasukhi [Sat, 17 Oct 2020 13:21:51 +0000 (16:21 +0300)]
0031825: Data Exchange, STEP - NULL dereference while re-exporting model with empty Datum description

Fix adding name and description of the datum

3 years ago0028454: Data Exchange, STEP reader - names with special characters cannot be read
dpasukhi [Fri, 9 Oct 2020 10:57:30 +0000 (13:57 +0300)]
0028454: Data Exchange, STEP reader - names with special characters cannot be read

- Add support of the control directives ( "\X2\" "\X4" "\X\" "\P*\" "\S\");
- Make param "read.stepcaf.codepage" base for conversion inside StepData instead of CAF;
- Rename "read.stepcaf.codepage" to "read.step.codepage".
- Add ISO 8859-1 - 9 code pages for conversion
- Add Resource_FormatType_NoConversion format type, that indicates non-conversion behavior
- Update old test cases that contain control directives

3 years ago0027469: Modeling Algorithms - Regression vs 6.9.1: Wrong result of Edge/Face interse...
ifv [Thu, 15 Oct 2020 07:34:35 +0000 (10:34 +0300)]
0027469: Modeling Algorithms - Regression vs 6.9.1: Wrong result of Edge/Face intersection

IntTools/IntTools_BeanFaceIntersector.cxx - decreasing parameter aDeltaRestrictor in method ComputeRangeFromStartPoint(...) to avoid "jumping" across the common part boundary.

IntTools/IntTools_EdgeFace.cxx - method IsCoincident() - improving criteria of coincidence between edge and face.

3 years ago0031866: Documentation - add description to Graphic3d_NameOfMaterial enumeration...
kgv [Wed, 21 Oct 2020 07:28:12 +0000 (10:28 +0300)]
0031866: Documentation - add description to Graphic3d_NameOfMaterial enumeration values

Enumeration values have been renamed to use complete prefix Graphic3d_NOM_ -> Graphic3d_NameOfMaterial_
and to match string names (with old values preserved as aliases).

3 years ago0031827: Samples - Qt OCCT Overview sample is not compiled with VS 2010
asuraven [Thu, 15 Oct 2020 15:23:10 +0000 (18:23 +0300)]
0031827: Samples - Qt OCCT Overview sample is not compiled with VS 2010

 * Menu storage changed from json to XML (because Qt 4 does not support json)
 * C++11 for(object : container) construction changed to OCCT iterators / Qt foreach
 * enum type::name changed to type_name
 * non used class members removed
 * Qt connect functions changed to macros version
 * warning 4127 disabled for Q_INIT_RESOURCE in VS2010 / Qt 4 case
 * widgets parent problem on Qt 4 fixed
 * QRegularExpression changed to QRegExp