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

134 Commits

Author SHA1 Message Date
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
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
dpasukhi
14abc514ed 0031685: Data Exchange, STEPCAFControl_Reader - NULL dereference on translating PLACED_DATUM_TARGET_FEATURE
- Fix incorrect sharing DatumTargetType_Area
- Add check for null object
2020-09-28 10:46:02 +03:00
dpasukhi
4661dcadd4 0025171: Data Exchange - STEP Lexer - the strings with quote sign inside can't be properly lexed
Add a test case to verify that the .STEP is read correctly
2020-09-18 18:15:09 +03:00
dpasukhi
3d46ce87d7 0030014: Data Exchange - Step File import does not create shapes, after transfer roots
Add a test case to verify that the .STEP is read correctly
2020-09-18 18:15:01 +03:00
dpasukhi
ebfd071c3c 0031191: Data Exchange - STEP import returns empty shape for a file written by SolidWorks 2018
Add a test case to verify that the .STEP is read correctly
2020-09-18 18:10:03 +03:00
dpasukhi
c6d45aceb8 0030539: Data Exchange - Step file can't be imported (ADT.step)
Add a test case to verify that the .STEP is read correctly
2020-09-18 18:10:03 +03:00
dpasukhi
87cf7029c3 0025440: Data Exchange - STEP file with Japanese unicode symbols cannot be read
Add a test case to verify that the .STEP is read correctly
2020-09-18 18:10:02 +03:00
ika
ba98b079eb 0031491: Data Exchange, STEP Import - Regression due to patch 29068
Add parameter read.step.root.transformation to switch on/off using transformation placed in the root shape representation.
2020-09-18 17:47:02 +03:00
dpasukhi
16bb5630bc 0031675: Data Exchange - Error opening the STEP-file
Add a check for null array object ("Elements") within StepShape_GeometricSet.cxx
2020-09-18 17:47:01 +03:00
dpasukhi
2547d97917 0031711: Data Exchange - STEPCAFControl_Reader hangs on attached file in an infinite loop
Add check if .step external file is the same main file.
2020-09-18 17:46:48 +03:00
dpasukhi
bf0114a372 0030848: Data Exchange - Problem load step file
Update .step scanner rules to read anything within the text, including nested apostrophes
2020-09-12 20:42:20 +03:00
dpasukhi
183c99caf8 0030053: STEP read fails due to comment string
- Update .step scanner:
  - add rules to read anything within the comment
  - add a function to initialize of lexical scanner
  - add states for Commit & End instead of global variables modcom & modend
2020-09-12 20:42:19 +03:00
dpasukhi
e0a25f3d93 0030397: Data Exchange - STEP Reader extension to support entities which have a text description field with not supported symbols
STEP file is now opened in binary mode (instead of text mode) to avoid unexpected handling of control symbols inside string constants.
2020-09-12 20:42:19 +03:00
dpasukhi
4637000015 0031489: Data Exchange - STEP Reader can't read a big file
- Add checking for null object for edge_curve within TranslateEdgeLoop;
- Update STEP parser rule allowing empty element in the list of entity parameters;
- Update test case of bug26451 for a new scanner rule;
- Update test case of bug30273 for a new added check for null object
2020-09-09 19:32:00 +03:00
dpasukhi
078f916446 0028345: Data Exchange - Reading STEP model using STEPCAF crashes
# Add test to verify import
* Note: Each layer contains a valid name, but only one contains a link to the shape, so .step file contains only one valid Layer.
2020-07-23 16:08:19 +03:00
jgv
c28d4a89d4 0031617: Export STEP in nonmanifold mode corrupts the shape
Modify method XSControl_TransferWriter::TransferWriteShape: add removal of locations before writing the shape.
2020-07-23 16:08:19 +03:00
jgv
36cc58f85d 0031485: Data Exchange - Export STEP in nonmanifold mode looses all faces except one
Small correction in STEPControl_ActorWrite::TransferCompound - take into account the case when a subshape has type TopAbs_FACE.
2020-06-10 20:41:40 +03:00
ika
ae58f70718 0031568: Data Exchange - invalid model produced after STEP import
Add protection against reference to reference in STEP import.
2020-05-22 19:32:21 +03:00
Igor Khozhanov
691711cd3e 0031550: Data Exchange, STEP Import - surface transparency is ignored (SURFACE_STYLE_TRANSPARENT)
Implemented reading and writing transparency to/from step files
2020-05-22 11:07:37 +03:00
dpasukhi
b04decfaae 0029240: Data Exchange - Crash during reading STEP file
- Issue is done in previous version OCCT
- Add test to verify import
2020-05-14 20:28:22 +03:00
dpasukhi
72e6020d50 0026925: Data Exchange - Exception can be raised if assembly is empty
- Issue is done in previous version OCCT
- Add test to verify the creating of the label structure using plain OCAF/XDE API
- Situation when the assembly label has no shape attached is correct
2020-05-12 19:51:12 +03:00
dpasukhi
e00b8ed948 0031435: Data Exchange - Problem importing STEP files
- Fix recursion in EntityCluster's methods :
  -  Value
  -  SetValue
  -  Append
- Add destructor in the EntityCluster
- Add check null grade in the STEPCAFControl_GDTProperty::GetDimClassOfTolerance
2020-04-16 20:43:51 +03:00
gka
1e1b83c07b 0031472: Exception raised during translation of the STEP entity Constructive Geometry Representation containing one representation
Modification number of the representation items are considered for STEP entity "Constructive Geometry Representation"
2020-04-10 17:43:52 +03:00
gka
89180f9822 0029803: STEP Import: Units (inch) not applied to entity possessing GEOMETRIC_REPRESENTATION_CONTEXT
Translation of the entities AXIS2_PLACEMENT_3D including in the entity CONSTRUCTIVE_GEOMETRY_REPRESENTATION_RELATIONSHIP was added.
Entity  AXIS2_PLACEMENT_3D is translated to the planar face with axis equal to AXIS2_PLACEMENT_3D.
New parameter "read.step.constructivegeom.relationship" is added to enable this translation (by default it is OFF).

Added test bugs step bug29803
2020-03-25 19:52:12 +03:00
gka
7ef1f9b7c1 0031301: Data Exchange - Export to STEP corrupts the shape
For small edges fully covered by tolerances of vertices BSpline periodic curves are converted to not periodic BSpline curves by cutting segment before writing.
In the class TopoDSToStep_MakeStepEdge permute of edge vertices for closed curves was added for the case when the range obtained from the vertex projection contradicts the edge range in order to avoid computation of the invalid edge range after reading.

Second test script for bug 0031301
2020-03-20 10:24:10 +03:00
gka
6a9f983a16 0030052: Data Exchange - STEP import missing surfaces
Changes made for #31233 are reverted.

Correction in the ShapeFix_ComposeShell:
 Modification of the method SplitByLine in order to find all points of the intersection for case when initial curve shifts in the positive or negative direction
 to avoid splitting edge when split point lies in the limits of the tolerance of the vertex.
 to correct shift of the pcurves for case when initial shift is more than 1 in the method ShapeFix_ComposeShell::SplitByLine

In the method ShapeFix_Face::FixMissingSeam added removing small edges having length less than working precision and removing wires having area less than working precision

Modified test cases; added test for related issue: bugs step bug31301
2020-03-18 20:03:05 +03:00
msv
ef59b5e064 0031292: Data Exchange - SIGSEGV on reading STEP file with references to invalid entities
Changes:

- in StepData_StepReaderData::ReadEntity, make sure that entity handle is not null before calling IsKind() of it.

- in StepData_StepReaderData::SetEntityNumbers, do not invert the sign of entity number of referenced parameter if the second pass is not required. Otherwise, the number -1 (obviously invalid) becomes 1 (invalid, but not obviously) without further correction of it.

- in StepData_UndefinedEntity::ReadRecord, consider the case when the entity number is positive but refers to non-existing entity. In this case literal value will be used instead of null entity for the problematic parameter.
2020-01-13 16:16:48 +03:00
kgv
ba00aab7a0 0029528: Visualization, TKOpenGl - allow defining sRGB textures
OpenGL rendering is now done into sRGB framebuffer.
OpenGl_ShaderManager::prepareStdProgramFboBlit() has been extended
by programs resolving MSAA texture and applying gamma correction as fallbacks.

Quantity_Color definition has been modified to store RGB components
in linear color space within Quantity_TOC_RGB type.
Standard colors defined by Quantity_NameOfColor enumeration has been updated accordingly.
New Quantity_TOC_sRGB type has been introduced to handle RGB components in non-linear sRGB color space.

OpenGl_TextureFormat class definition has been moved to dedicated files.
New method OpenGl_TextureFormat::FindFormat() replaces OpenGl_Texture::GetDataFormat().
New method OpenGl_TextureFormat::FindSizedFormat() replaces OpenGl_FrameBuffer::getColorDataFormat()
and OpenGl_FrameBuffer::getDepthDataFormat().

Graphic3d_TextureRoot::IsColorMap() - introduced new property defining
if RGB(A)8 image formats should be loaded as sRGB(A) textures or as data RGB(A) textures.
OpenGl_Texture initialization methods have been extended with new theIsColorMap argument.

vreadpixel - added argument -sRGB printing color in sRGB color space.

Test cases have been updated to new sRGB rendered results.
2019-10-22 15:15:52 +03:00
kgv
aaf8d6a98d 0030969: Coding Rules - refactor Quantity_Color.cxx color table definition
The table of named colors has been compressed and moved out
from Quantity_Color.cxx into Quantity_ColorTable.pxx.

Quantity_NameOfColor - grayscale enumeration values have been re-ordered to fix discontinuity.
Duplicating colors has been merged within enumeration:
  CHARTREUSE=CHARTREUSE1, GOLD=GOLD1, GREEN=GREEN1, ORANGE=ORANGE1,
  ORANGERED=ORANGERED1, RED=RED1, TOMATO=TOMATO1, YELLOW=YELLOW1.
Added aliases to several other common colors:
  BLUE=BLUE1, CYAN=CYAN1, LIGHTCYAN=LIGHTCYAN1, MAGENTA=MAGENTA1.

Quantity_Color class definition has been cleaned to follow OCCT coding style.
Quantity_Color now stores NCollection_Vec3<float> as class field instead of separate components.
Removed unused class Quantity_ColorDefinitionError.

New methods Quantity_Color::Convert_LinearRGB_To_sRGB() and Quantity_Color::Convert_sRGB_To_LinearRGB()
converting RGB components from linear to non-linear sRGB colorspace and vice versa.
Image_PixMap::PixelColor() and Image_PixMap::SetPixelColor() methods have been extended
with an optional argument for performing linearization/delinearization of 8-bit sRGB pixel formats.

Draw Harness command AISColor has been corrected to take color name instead of enumeration index.
2019-10-22 15:15:51 +03:00
skl
13a44c4b7f 0029068: Data Exchange - Invalid rotation of result shape after import attached STEP file
Changes for using Axis Placement(not used during creation of assembly) as transformation for root Shape Representation.
Test for bug 29068 and auxilary command are added.
2019-10-22 15:15:46 +03:00
gka
258a844b63 0029780: [REGRESSION] Shape Healing - Operator FixShape failed with exception
Method ShapeFix_Wire::FixNotchedEdges() is corrected to handle the case of closed notched edges: on such edges split parameter may fall to wrong end of the curve due to projection.
2019-09-20 19:40:47 +03:00
abv
cd58de63de 0028144: Modeling Data, GeomAdaptor_Curve - regression in comparison of version OCCT654
Test case moved to grid modalg_7 and corrected to use BREP instead of STEP, and to use wireframe in 3D viewer
2019-09-16 09:47:26 +03:00
abv
fa68c1e116 0029979: Data Exchange - Crash by reading STEP file
Added work-around against specific problem of ORIENTED_EDGE referring to another ORIENTED_EDGE instead of EDGE_CURVE.
Added handling of edges with null EDGE_CURVE, to allow passing the translation further instead of exception.

Off-topic: text of warning message is corrected in genproj

Added test bugs step bug29979
2019-09-06 19:23:19 +03:00
ika
da7e894868 0030856: Data Exchange - Wrong colors after STEP file import
Fix processing of colors, attached to assemblies in STEP file.
2019-08-06 17:14:42 +03:00
msv
e8dec5e171 0030790: [REGRESSION] Modeling Algorithms - Crash when loading specific step file
The problem occurred when the algorithm IntCurvesFace_Intersector was called for a face occupying zero extension along V direction. This is obviously a bad face, but we need to have the algorithm not crashing the application. So, the algorithm has been protected against such input data. At attempt to make calculations it establishes NotDone status.

Bad test case tests/de/step_3/D9 has been updated.
False memory leak detection has been suppressed in tests/bugs/fclasses/bug7287_2.
2019-07-19 12:23:00 +03:00
kgv
2fb08f0132 0030628: [REGRESSION] Data Exchange - Crash on importing STEP file
RWHeaderSection_RWFileDescription::ReadStep(), added check for an empty list.
2019-07-15 15:48:00 +03:00
ika
3b739e69c9 0030789: Data Exchange - Some names are lost during STEP import
Add importing name from PRODUCT_DEFINITION_WITH_ASSOCIATED_DOCUMENTS STEP entity.
Update test cases with files contained this entity.
2019-06-20 15:20:50 +03:00
kgv
e3249d8e5a 0030694: Data Exchange - support non-standard GB2312-encoded STEP files
STEPCAFControl_Reader::SourceCodePage() - added property defining text encoding
for converting names within STEPCAFControl_Reader::ReadNames() method.
Added associated "read.stepcaf.codepage" parameter,
which default value is Resource_UTF8, preserving current behavior.

Resource_FormatType enumeration has been extended by UTF8 and SystemLocale values.
Resource_Unicode - added conversion methods taking Resource_FormatType as argument.

GetName command has been corrected to NOT replace non-Latin symbols.
2019-05-24 16:59:16 +03:00
gka
33defc7121 0030616: Crash on reading STEP file
Added protections to avoid exceptions for null objects.
For reading entity StepShape_ToleranceValue was added reading lower and upper bounds represented by entities "StepRepr_ReprItemAndMeasureWithUnit" or "StepRepr_MeasureRepresentationItem"
2019-04-02 21:24:57 +03:00
kgv
85831628d6 0027316: Draw Harness - access violation on passing non-existing shape to XAddShape
Add NULL check to XAddShape command.
Removed broken test case bugs/step/bug27316.
2019-03-21 13:15:15 +03:00
ika
7b93ae3c5e 0030533: Data Exchange - Crash during STEP import.
Add Null checks to avoid crash during reading faces without bounds.
2019-03-03 20:58:37 +03:00
nbv
4fe725a46a 0027976: Unstable work of 2d intersection algorithm for two lines
1. Test case for the issue has been created.
The problem is still reproduced on MASTER.

2. Some test cases have been moved to lowalgos/2dinter grid.
2018-12-21 15:38:03 +03:00
nbv
0df4bbd689 0030380: Exception while reading Step-file
Incorrect initialization of array (when upper bound is less than lower bound) has been avoided in some places.
2018-11-23 12:17:38 +03:00
ika
5290fb106f 0030362: Data Exchange - Writing dimensions with inches produced invalid file.
Writing dimensions into STEP files in inches not produce invalid references between STEP entities.
2018-11-15 17:34:43 +03:00
ika
87efa821fa 0030189: Data Exchange - Wrong export to STEP of located root.
Now roots-references in XCAF Document can be exported to STEP without losing structure of assembly/sharing/metadata of this root. New auxiliary root assembly with each root-reference is created to save all necessary data.
2018-10-04 17:57:13 +03:00
gka
06a505ba53 0030087: Invalid result of the translation of the assembly when relating and related products are mixed in the SRR entity
Detection of specific case of error in the definition of transformation matrix describing position of the component within assembly, when it has Axis Placements swapped, is corrected to handle the case when one of these Axis Placements is contained in both Shape Representations (of the assembly and its component).
This allows the problematic STEP file to be translated correctly.

Added test bugs step bug30087
2018-09-03 15:48:41 +03:00
skl
65bb82f241 0028694: IGES reader produces too small edge covered by its vertices
Methods IsUClosed() and IsVClosed() are changed (check distance to middle point is added).
2018-08-24 13:08:30 +03:00
kgv
1f26f80bb7 0029967: Draw Harness - command bounding has annoying syntax
Bnd_OBB constructor from Bnd_Box is fixed for VOID input.

DRAW command bounding command is adjusted:
- Support of old syntax 'bounding shape'is restored.
- Exception on VOID bounding box is avoided.
- Arguments are handled in case-insensitive way.
- Options -s, -perfmeter, and ability to set result as first argument are removed as redundant.
- Help is moved to command definition.

Separate command OCC29311 is added (in QADraw) to do the same as option -perfmeter did; tests are updated.
2018-07-27 16:19:26 +03:00