1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00

4591 Commits

Author SHA1 Message Date
nds
9283bba22f 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.
2020-12-18 19:48:02 +03:00
mpv
53f46612d9 0031983: Samples - CSharp cannot be compiled "atomic<> is not supported by C++/CLI"
Removed includes-dependency of the CSharp sample from TDF_Label.hxx
2020-12-17 21:17:45 +03:00
ifv
2fda738623 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
2020-12-17 21:17:44 +03:00
nds
38b336df80 0031944: Foundation Classes, Message_Report - add missing mutex locks for message level 2020-12-17 21:17:44 +03:00
luz paz
0177fe2617 0031939: Coding - correction of spelling errors in comments [part 4]
Fix various typos

Fixed via `codespell v2.1.dev
2020-12-17 21:17:43 +03:00
kgv
7fb9d6d573 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).
2020-12-17 21:17:43 +03:00
asuraven
14eea8293d 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).
2020-12-17 21:17:42 +03:00
kgv
1e1158c78b 0031997: Visualization, TKOpenGl - phong shader compilation error with normal texture map enabled
OpenGl_ShaderManager::defaultGlslVersion() now defines GLSL 120 for normal map texture.
2020-12-17 21:05:06 +03:00
kgv
fccc168a6f 0031994: Draw Harness - dversion prints "Architecture: unrecognized" on ARM host
Added handling of __aarch64__ macros.
2020-12-17 21:05:06 +03:00
kgv
6169ae2d3d 0031996: Visualization - PhongShading.fs compilation error on OpenGL drivers for AMD Radeon
Fixed occLight_IsHeadlight() misuse in sample GLSL program.
2020-12-17 21:05:05 +03:00
mkrylova
6eb502b27b 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.
2020-12-17 21:05:05 +03:00
ifv
a2cb8561eb 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
2020-12-17 21:05:04 +03:00
mkrylova
59500bb229 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.
2020-12-17 21:05:04 +03:00
vro
a8d3a0b102 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.
2020-12-17 21:05:03 +03:00
vro
c6685c65fd 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
2020-12-17 21:05:02 +03:00
kgv
31174e1a58 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.
2020-12-17 21:05:02 +03:00
dpasukhi
465ffe2840 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
2020-12-14 18:39:00 +03:00
luz paz
a25d5aaa30 0031939: Coding - correction of spelling errors in comments [part 3]
Fix various typos

Fixed via `codespell v2.1.dev0`
2020-12-11 19:19:10 +03:00
vro
65cec1a6ef 0031985: Documentation - description of TDocStd_FormatVersion is excessive
Description of TDocStd_FormatVersion enum is simplified and formatting for good rendering in HTML
2020-12-11 19:13:17 +03:00
kgv
c22b52d60e 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.
2020-12-11 19:12:48 +03:00
age
266877a7c3 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.
2020-12-10 19:03:12 +03:00
kgv
c74e3dc300 0031986: Visualization - Regression in StdPrs_WFDeflectionRestrictedFace::Add()
Fixed misplaced closing bracket after #0030146 fix.
2020-12-08 19:50:46 +03:00
abv
954caad094 0031977: Modeling Algorithms - useless static variable in BRepFill_OffsetWire::Init() preventing its parallel usage
Removed useless "static" before local variable and some commented code
2020-12-08 19:49:20 +03:00
dpasukhi
c026141bb6 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.
2020-12-08 19:45:50 +03:00
aavtamon
1e08a76f1e 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.
2020-12-04 19:00:48 +03:00
emv
1aa38057ef 0031976: Foundation Classes, BVH_IndexedBoxSet - access members of base class via this pointer 2020-12-04 19:00:12 +03:00
nds
75cf82505b 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)
2020-12-04 18:50:20 +03:00
skl
b735354545 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.
2020-12-04 18:50:19 +03:00
kgv
6078550944 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'.
2020-12-03 18:51:47 +03:00
vro
716cf4d96b 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.
2020-12-03 18:51:08 +03:00
kgv
4268c64672 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.
2020-12-03 18:46:25 +03:00
skl
d66f7c0fa2 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.
2020-11-28 12:36:49 +03:00
kgv
59069d3fd8 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.
2020-11-28 12:36:07 +03:00
kgv
90e0d12d8f 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.
2020-11-28 12:36:06 +03:00
mpv
b84b672185 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
2020-11-28 12:36:06 +03:00
ifv
9a640cbe72 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
2020-11-28 12:36:05 +03:00
akaftasev
9ab58ebf65 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
2020-11-25 18:48:38 +03:00
dpasukhi
65eed8ff8e 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 )
2020-11-23 11:43:57 +03:00
aavtamon
0f5a1a9485 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
2020-11-21 12:26:06 +03:00
mzernova
4552cb8552 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
2020-11-21 12:19:50 +03:00
luz paz
21c7c45701 0031939: Coding - correction of spelling errors in comments
Fix various typos

Fixed via `codespell v2.0.dev`
2020-11-21 12:19:49 +03:00
kgv
81ff49158a 0029642: Foundation Classes - deprecate TCollection classes except strings
Removed remnants of generic templates in TCollection package.
2020-11-21 12:19:49 +03:00
kgv
d99673cf22 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.
2020-11-21 12:19:48 +03:00
akaftasev
6e01c25ad1 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.
2020-11-21 12:19:48 +03:00
kgv
026aec1860 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().
2020-11-21 12:19:47 +03:00
skl
ad2ef2599a 0029855: Data Exchange, XCAF GD&T - PMI objects copy constructors ignore presentation
Add all missing values.
2020-11-21 12:19:46 +03:00
akaftasev
c5b42a1afe 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.
2020-11-21 12:19:46 +03:00
kgv
e89202ea02 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.
2020-11-21 12:19:45 +03:00
kgv
0aeb898418 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.
2020-11-21 12:19:45 +03:00
kgv
24f9d04c72 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.
2020-11-21 12:19:44 +03:00