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

2202 Commits

Author SHA1 Message Date
luz paz
7b5e532f83 0031939: Coding - correction of spelling errors in comments [part 7]
Fix various typos

Fixed via codespell v2.1.dev
2021-01-20 21:27:44 +03:00
akaftasev
5bae0bebe4 0028026: Modeling Data - BRepTools::Clean() does not clean all triangulation from shape
Added flag for force clean triangulation and treatment for it
Command "trinfo" now show number of polygons on triangulation
2021-01-20 21:25:44 +03:00
asuraven
9f45d35b6b 0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
Information about normals are stored in BinOCAF, XmlOCAF, BRep and BBRep (in case of triangulation-only Faces).
Versions of formats have been changed (11 for TDocStd, 4 for BRep Shape and 3 for Binary BRep Shape)
theWithNormals parameter added to BRepTools::Write()
IsWithNormals()/SetWithNormals() function added to BRepTools_ShapeSet
-normals/-noNormals option added to StoreTriangulation DRAW command
-normals/-noNormals option added to writebrep DRAW command
Tests for writing to brep/binary brep/BinXCaf/XmlXCaf added
Test for StoreTriangulation options -normals/-noNormals added
2021-01-20 21:20:43 +03:00
aavtamon
6fab0b3428 0031172: Unexpected result of BRepTools::OuterWire()
In BRepTools::OuterWire() compare of parameters was rewritten using Precision.
The test case bug31172 has been created
2021-01-15 18:52:11 +03:00
akaftasev
607f045954 0025055: Modeling Algorithms - Incorrect shape copying in BRepBuilderAPI_Copy
Correct test case: exclude "fixshape" calls
2021-01-13 17:18:49 +03:00
kgv
83746de803 0032041: Modeling Data - Access violation ExchangeUV in Geom_BezierSurface
Added missing NULL-checks to Geom_BezierSurface::ExchangeUV() and Geom_BSplineSurface::ExchangeUV().
2021-01-12 13:30:35 +03:00
kgv
41046145c4 0032009: Coding Rules, TKQADraw - suppress msvc10 compilation warning C4748
Added a workaround for msvc10 misbehavior.
2020-12-25 12:34:20 +03:00
kgv
ba562b2b7a 0031999: Tests - request Core Profile on macOS for Ray-Tracing tests 2020-12-23 19:45:32 +03:00
asuraven
3b1129a546 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.
2020-12-23 19:30:48 +03:00
dpasukhi
2057c37b67 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
2020-12-23 19:30:47 +03:00
mkrylova
d45edf248c 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
2020-12-21 20:30:06 +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
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
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
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
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
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
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
emv
9d9edcf49d 0031913: Modeling Algorithms - Invalid result of cut operation
Fixed by 0029711. Integrating test case only.
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
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
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
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
skl
5ae53d4986 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.
2020-11-21 12:19:43 +03:00
asuraven
7a88ce5b98 0029108: Crash writing STEP file
* Wrapped a try / catch block on creating objects in TopoDSToStep_MakeStepFace::Init()
2020-11-02 14:32:39 +03:00
asuraven
3940436ae2 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).
2020-10-29 18:55:36 +03:00
abv
94f16a8961 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_*)
2020-10-28 22:18:11 +03:00
abv
f41fd243b6 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
2020-10-25 08:46:49 +03:00
emv
0612bb7010 0031858: Modeling Algorithms - boolean operation crash between the given cylinder and torus.
Integrating test cases only, as the problem is not reproduced.
2020-10-23 19:57:30 +03:00
dpasukhi
692decba26 0031825: Data Exchange, STEP - NULL dereference while re-exporting model with empty Datum description
Fix adding name and description of the datum
2020-10-23 19:54:58 +03:00
dpasukhi
1b9cb073b9 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
2020-10-22 17:54:29 +03:00
ifv
380748c340 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.
2020-10-22 17:49:17 +03:00
jgv
3e98579a83 0031855: Modeling Algorithms - regression of the unifysamedom command.
Transformation of 2d-curves on elementary surfaces has been corrected.
2020-10-20 18:13:49 +03:00
abv
ae9f4b64ca 0031851: Data Exchange, STEP - enable Unicode symbols in STEP export
Class STEPCAFControl_Writer is corrected to avoid replacing non-Ascii symbols by question marks, and spaces by underscores, on export to STEP.

Related: DRAW commands dealing with strings in OCAF documents are corrected to pass Unicode symbols as UTF-8.

Off-topic: code saving names of external STEP files in XDE and fetching them back is corrected to preserve Unicode symbols as UTF-8.

Added test bugs xde bug31851

Test de step_4 E7 corrected (no more replacement of spaces by underscores in names of layers)
2020-10-14 19:28:58 +03:00
emv
870ae593c3 0031850: Modeling Algorithms - boolean cut and common generate unexpected result
IntPatch_WLineTool::JoinWLines(): using correct point for the check if WLines may be joined.
2020-10-14 19:25:45 +03:00
emv
135c2bd908 0031835: Modeling Algorithms - step by step Boolean common produces bad shape on given three cylinders
Fix inconsistency between IntAna_QuadQuadGeo(gp_Cylinder,gp_Cylinder) and AxeOperator::Coplanar().
2020-10-14 19:23:26 +03:00
emv
815f039bd2 0031836: Modeling Algorithms - Boolean cut failed between a Cone and a Torus
BOPAlgo_PaveFiller::UpdateExistingPaveBlocks: Add check for closed edge when updating pave block.
2020-10-13 19:18:02 +03:00
dpasukhi
baf60a870c 0031670: Data Exchange - cp1251 Cyrillic characters in STEP file
Add support for converting pages from Windows encoding to Unicode
2020-10-06 20:40:26 +03:00
jgv
99c9a82021 0031735: Modeling Algorithms - BRepOffset_MakeOffset works slowly and produces wrong result
Modify method IsPlanar of BRepOffset_MakeOffset: try to make planar all possible faces to simplify the input shape.
2020-10-06 20:40:25 +03:00
ifv
bf46352772 0031700: Modeling Algorithms - Regression in 0029580 after integration 0029839
BOPAlgo_PaveFiller_6.cxx: protection against creation of thin faces is added
bug29580_1: reverting in original state

dimensions.tcl: correction according to current state of BO algorithm
2020-10-06 20:40:24 +03:00
gka
809a2e13f8 0031812: IGES import - NURBS patches lost in the import process - 720
Correction for case invalid color definition to avoid considering an entity that has a number corresponding to the color field as erroneous if entity is not a color entity.
2020-10-06 20:40:21 +03:00
abv
b81a7e3160 0030378: Data Exchange - extract of subset of model entities fails (regression)
Field theflags in class Interface_BitMap is always initialized to avoid exception on operations with the class.

Added test bugs step bug30378
2020-10-06 20:40:20 +03:00
abv
d430d12909 0030800: Foundation Classes, UnitsAPI - poise dynamic viscosity unit is not defined correctly
Definition of Poise unit corrected.

Added test bugs fclasses bug30800
2020-10-03 16:06:35 +03:00
imn
68922bccc4 0027342: STEP - support C++ streams for import / export
- STEP low-level parser is converted to C++; required minimal version of flex is elevated to 2.5.37.
- Added possibility to import STEP from stream, see new method XSControl_Reader::ReadStream() (now implemented in STEP only).
- Parsers ported to win_flex_bison 2.5.23 (flex 2.6.4, bison 3.7.1)
- Added support of C++ flex and bison scanners in in CMake scripts
- Some code clean-up in StepFile and around (unused files and functions are eliminated)
- Option to read from stream is added in DRAW command testreadstep for testing ReadStream() function
- Added test bugs step bug27342
2020-09-28 10:46:04 +03:00
sshutina
ed75148574 0031786: Data Exchange - After the importing STEP file the free shape is empty
- Fixed the exception
 - Added the test
2020-09-28 10:46:03 +03:00