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

50 Commits

Author SHA1 Message Date
atereshi
a453f9d128 0028414: Data Exchange, STEP - Face on a closed surface with single inner wire and without natural bound not correctly read
Problem: From the point of view of the STEP format (and others), it is allowed
to describe a face on a surface with natural boundaries (torus, sphere) without
specifying these boundaries. Thus, a face on a closed surface and containing
an inner wire (or several) is correctly defined and describes a face with a
cutout defined by this wire. At the same time, there is a function
(ShapeFix_Face::FixOrientation) in the ShapeHealing procedure that corrects the
orientation of the wires, and it starts before the function of adding natural
boundaries (ShapeFix_Face::FixAddNaturalBound). There are many shapes that have
incorrectly oriented wires and this procedure successfully heals them, but on a
correctly specified face with single inner wire on closed surface, we do not get
the entire surface with a cutout, but a part of the surface defined by the wire.
This fix is intended to resolve this ambiguity.

Change:
1. Added function isNeedAddNaturalBound that returns TRUE if face needs to add
 natural bounds.
2. Corrected condition in FixOrientation to ignoring faces that needs to add
 natural bounds.
3. For tests in which one wire was incorrectly oriented on a closed surface,
flag AddNaturalBound was disabled.
5. Test with cutout from torus was created: bugs step bug28414.

Result: By default, it is correct to add natural boundaries, because this case
 is correct from the point of view of the STEP format and others.
2022-10-31 18:10:55 +03:00
dpasukhi
7d5e26eb2e 0032596: [REGRESSION] Data Exchange, STEP Reader - OCCT 7.6.0dev does not open file correctly
Fixed typo in the StepToTopoDS_TranslateFace.cxx after #29564 issue
2021-10-01 19:08:36 +03:00
dpasukhi
da80ff68f1 0031382: Data Exchange - BinXCAF should preserve length unit information
Possibility for adding LengthUnit info to XCAF document using special class XCAFDoc_LenghtUnit and XCAFDoc_LenghtUnitTool is implemented.
Package UnitsMethods is split: geom methods were placed to new file GeomConvert_Units which is in the toolkit TKXSBase, internal step scale factors was placed to StepData.
Updated UnitMethods to convert scale factor to different unit types.
Now, XSAlgo::XSAlgo_AlgoContainer is used to update unit info from static interface values.
New Draw command "XSetLengthUnit" and "XGetLengthUnit" for set or get XDE attribute.
Upgraded tests for STEP, IGES, OBJ, glTF, VRML formats to check area regressing with used unit.
Upgraded tests\de test cases to use any units in the "loop back" algorithms.
2021-08-20 20:30:11 +03:00
dpasukhi
0c38be8f8d 0031970: Data Exchange, STEP reader - parser syntax error messages are inaccessible
- Upgraded files using new version of WinFlexBison
 - Removed global variables within StepFile_Read.cxx
 - Upgraded error message during bison analyzing ( added a expected expression information )
 - Used 'Interface_ParamType' as argument type for the StepFile_ReadData::Argument
 for a compatibility with the StepData/StepData_StepReaderData
 - Added handling parse errors and transferring it to the StepData_StepReaderData
 - Now parsing and referencing errors save in the check and non output by default
 - Step_file's and Step_Data's output info prints according by trace level of printer
 - Removed useless location.hxx
 - Removed TraceLevel for the StepFile_Reader ( now it useless,
  it is 0 by default and newer and nowhere change )
 - Translate error message into English within StepData_StepReaderData
 - Replace "Error" word in the output messages
2021-02-05 20:35:19 +03:00
dpasukhi
96049f2e3d 0032049: Data Exchange - STEP file import problems
- Added checking for null objects
- Added support to find layers according to visible attr
- Fixed problem with same names of layers:
 Now, layers are grouped by names and visibility parameter
2021-01-22 13:16:22 +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
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
ifv
fffc249f21 0027531: Modeling Algorithms - Make the algorithm Approx_SameParameter more clear and robust
Approx/Approx_SameParameter.cxx,hxx:
Class Approx_SameParameter refactoring. Logic is changed in many places to unify usage, simplify maintenance.
Method Curve2d() is changed to return Geom2d_Curve instead of Geom2d_BSplineCurve. Corresponding message is added to the upgrade guide.
.lxx file is merged into .hxx.
Tangent computation is extracted into special method.
Comparing number of sample points after CheckSameParameter(...) is added to define cases with projection fails.
Undesirable behavior when curves are not same parameterized is fixed.

Geom2dAdaptor/Geom2dAdaptor.cxx: treatment of offset curve is added

Adaptor3d/Adaptor3d_TopolTool.cxx: minor improvement of performance for BSpline surfaces with huge number of knots

Tests were modified according to new behavior of sameparameter algorithm
2020-03-06 15:54:46 +03:00
anv
4e8c1d8666 0031202: Shape Healing - FixMissingSeam creates degenerated edge
Adding tolerance to prevent degenerated cuts in cases where all vertex tolerance is covered by distance of the edge curve from vertex point.
2019-12-06 19:32:34 +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
gka
f9c58d7c4e 0029269: Improvement for thread safety of the STEP translator - cleanup
Removal of unused stuff and some protections implemented within #29269
2019-09-06 18:26:44 +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
ifv
d8406b2f3a 0030199: Extrema Point<->Curve gives inaccurate result
Special treatment of bspline curve of first degree is implemented in Extrema_GExtPC.gxx
Test case is added
Some test cases are modified according to actual state of algorithm
2018-10-23 20:08:38 +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
skl
3b7f55e9d1 0029873: Data Exchange - STEPCAFControl_Reader::Transfer() returns TRUE even when external files are missing
Output information about failure during reading of external file has been added (it can be checked by using Draw command "tpstat").
If the reader cannot find an external file at the first found location
(using entity APPLIED_EXTERNAL_IDENTIFICATION_ASSIGNMENT) it checks other information about file path
(using entity DOCUMENT_FILE related with the above-mentioned entity) and uses a new location for import of the external file.
2018-07-13 16:38:07 +03:00
gka
39ab2e0c4d 0029916: Regressions in Data Exchange on VC 2017
The "end" file from folder "de" has been corrected to exclude comparing the number of edges in the shapes from current result with test data.
"TODO messages generated for differences were removed.
Data exchange tests were regenerated.
2018-07-13 15:02:58 +03:00
apn
0e443e130c 0028097: Test system does not recognize 'fail...' messages as errors
Test parse rules are improved to recognize messages with word 'fail' or 'failure' as errors.
Test cases are corrected accordingly (TODO or REQUIRED statements added where fail messages were not noticed previously).
2018-03-26 15:40:11 +03:00
emv
03cca6f742 0028599: Replacement of old Boolean operations with new ones in BRepProj_Projection algorithm
The usage of *BRepAlgo_Section* has been replaced with the usage of *BRepAlgoAPI_Section* in *BRepProj_Projection* algorithm.

The TODO statements have been removed from the failing test case in the "prj" grid as they are working correctly now.

The following changes have been made to improve the performance *BRepAlgoAPI_Section*:
1. Revision of the *IntPolyh_Intersection* class to avoid repeated calculation of the deflection of the same triangulation.
2. Small revision of the Edge/Face intersection algorithm to perform Extrema computation on the whole intersection range of the edge instead of discrete ranges.
3. Implementation of the extrema computation for the Circle and Sphere.
4. Correct computation of the parameter of the point on the Circle.
2018-02-01 18:46:36 +03:00
abv
07bbde451a 0029399: Optimize reading of floating point values from text strings
Function Strtod() is reimplemented using open source (MIT-style license) code by David M. Gay instead of strtod() provided by standard run-time library. This improves its performance by 3-10 times.

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

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

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

Minor off-topic corrections:
- method Standard_GUID::Assign (const Standard_UUID&) is implemented (was empty);
- Precision.hxx is included in BRepMesh_Vertex.hxx that uses it.
2018-01-26 20:11:03 +03:00
ifv
69f87d091e 0029162: Geom2dInt_GInter algorithm does not find intersection of ellipse and line
Analytical intersection algorithm is implemented for ellipse-line intersection
2017-11-09 18:08:11 +03:00
ika
02fd709bbb 0026930: ShapeConstruct_ProjectCurveOnSurface returns a B-Spline instead of line (again)
Upgrade check of closeness of 2dcurve to line during projection:
  For C1 and more surfaces check distance to normal, not to surface, for C0 surfaces update tolerance formula.
  Add check for possible period jump in some inner point.
Update some test cases.

Add cache saving for lines,
update fixPeriodicTroubles() function, using parameters from cashe.

Small correction of test cases for issue #26930

fix processing of points from cache.

Update of test cases according to the new behavior

Fix behavior of fixPeriodicityTroubles() on different isolines,
fix copy/paste mistake.
Update test cases:
iges_2 C4 - return to master values
step_3 E6 - improvement.
2016-04-21 11:37:32 +03:00
gka
4f99f761b1 0024595: STEP import missing surfaces
Modification to create natural bounds for face based on the spherical and Bspline surface and having only one bound represented by Vertex loop was made.
 According to the specification of ISO-10303 part 42:
    "If the face has only one bound and this is of type vertex_loop, then the interior of the face is the domain of the face_surface.face_geometry. In such a case the underlying surface shall be closed (e.g. a spherical_surface.)"
    - natural bounds are applied only in case if VertexLoop is only the one
      defined face bound.

Update of test-cases according to the new behavior

Test-case for issue #24595
2015-12-17 17:55:47 +03:00
gka
0d3d226ed3 0025553: ShapeFix_Face::FixMissingSeam() fails to correct a face
Modification to support case when edges on face  have incorrect orientation was added.
Modification to support case when wires have intersecting segment was added

Test cases for issue 25553 added; other affected tests corrected (improvements)

Corrected test case
2015-09-10 17:43:12 +03:00
apv
380eaf77b9 Adjusting test cases at new structure of OCCT 2015-07-23 11:46:13 +03:00
azv
94f71cad33 0024682: Move out B-spline cache from curves and surfaces to dedicated classes BSplCLib_Cache and BSplSLib_Cache
1. B-spline cache was moved into separated classes: BSplCLib_Cache for 2D and 3D curves and BSplSLib_Cache for surfaces.

2. The cache is used now in corresponding adaptor classes (Geom2dAdaptor_Curve, GeomAdaptor_Curve and GeomAdaptor_Surface) when the curve or surface is a B-spline.

3. Algorithms were changed to use adaptors for B-spline calculations instead of curves or surfaces.

4. Precised calculation of derivatives of surface of revolution is implemented for the points of surface placed on the axis of revolution (Geom_SurfaceOfRevolution.cxx)

5. Small modifications are made to adjust algorithms to new behavior of B-spline calculation.

6. Test cases were modified according to the modern behavior.

7. Changes in BOPAlgo_WireSplitter, BOPTools_AlgoTools, BRepLib_CheckCurveOnSurface and ShapeAnalysis_Wire to use adaptors instead of geometric entities

8. Allow Geom2dAdaptor and GeomAdaptor in case of offset curve to use corresponding adaptor for basis curve

Modification of test-cases according to the new behavior.
2015-05-28 13:38:22 +03:00
apn
9aa684edf4 0025987: Integration part of modified unstable test cases
Unstable test cases were reviewed
Modified test cases using checktrend command
Modified test cases for Linux platform
Modified test cases for Debug mode
2015-03-26 18:10:29 +03:00
ika
3163e9fdeb 0025013: ShapeFix_Wire tweaks for better results
Recalculate of tolerance before edge cutting

Test case for issue CR25013

add try to increase tolerance before splitting in singularity during PCurve adding.

Correction of test cases for issue CR25013
2015-03-05 14:53:00 +03:00
bugmaster
50b994e73f Adjusting testing cases
1. bugs modalg_4 bug697_2 bug697_4 bug697_7 bug697_8 - unstable test cases after fix 25735
Its will be checked and modified during work with performance (issue 24232).

2. bugs mesh bug25364 was tuned for 64-bit Windows.

3. de step_1 ZQ2 fails (64-bit only). Issue 25848 was registered.

4. de step_3 D8 shows improvement (no checkape error) in 64-bit only, this is after 22598 and  issue 25797 was registered for that.

5. draft angle G8 improvement (algorithm produces some shape, but fails on checkshape).

6. perf ncollection A1 was tuned for 64-bit Windows.

7. de step_1 R9 - update reference data (according to 25176)
2015-02-20 17:17:34 +03:00
akz
d088c9c2a1 0025699: Crash while importing STeP file
1) Try-catch block was added on a StepToTopoDS_TranslateEdgeLoop::Init() to
catch Standard_ConstructionError during the Curve conversion.

2) Checks of BSpline curve degree added to prevent construction error when converting edges to BSpline_Curve.
3) Warning message was added in case of incorrect curve definition.

Correct of the test cases according to the new error message added with fix

Conflicts:
	tests/de/step_1/R9

Modified test cases according to new reference data
2015-02-13 17:24:52 +03:00
akz
b8f2022f8c 0025176: STEP Reader - no error report if referenced entity has wrong type.
Interface_CheckTool does not reset the Check added to CheckList now.

Added test case bugs/xde/bug25176

Update reference data in test cases.

Resolving conflicts:
	tests/de/iges_3/A4
	tests/de/step_1/R7
	tests/de/step_2/H1
2015-02-12 11:37:11 +03:00
aml
15b54261a3 0022598: Approximation of p-curve by 2D line
Check whether p-curve being projected can be approximated by straight line is made before full-scale projection, to improve performance.
If straight, pcurve is created as Line only if this will lead to the same range parameterization as 3d curve, otherwise BSpline of degree 1 is created.
Re-approximation of line pcurves by bsplines removed from ShapeFix_Edge.

Test case updating to new behavior.

Added "static" keyword to the  fixPeriodictyTroubles() function.

Update of test-cases according new behavior
2015-02-05 18:02:16 +03:00
apn
a520f6eb9a 0025313: Review of TODOs in test cases for unused platforms
TODOs for unused platforms were deleted. Issue 22988 was closed.
2014-10-16 16:45:27 +04:00
nbv
9e20ed5793 0023547: Tests failures in debug mode
1. DRAW-commands for curve/surface continuity returning were changed.
2. Output of "distmini" DRAW-command is amended.
3. Function MinMax() was moved from Standard_Real to IntPatch_ImpImpIntersection_4.gxx.
4. Incorrect computing of nbcurveC1 in Geom2dConvert::C0BSplineToC1BSplineCurve(...) function was liquidated.

Test cases were changed.
2014-10-16 16:45:13 +04:00
dbv
ec661e4333 0024159: Colors are not imported for Step-Files created with Inventor 2014
Method STEPConstruct_Styles::LoadStyles() now imports StepVisual_StyledItem entities even if they was defined without StepVisual_MechanicalDesignGeometricPresentationRepresentation or StepVisual_DraughtingModel entity

Update of reference data
2014-09-26 16:23:58 +04:00
ibs
46aed280cc 0024249: Crash on ShapeFix_Shape
MAIN CHANGES:
FixAddNaturalBound: the boundaries of "natural bound addition" are restricted: a face, that does not contains an outer wire, should not have any infinite UV boundaries due to new face building (with using a surface) requires specified UV boundaries.
FixAddNaturalBound: myResult is updated in FixAddNaturalBound when the method creates a new face with natural boundary. myResult is required to be updated for next "fix small-area wires" algorithm
IsPeriodicConicalLoop: incorrect working BRepTools_WireExplorer was replaced on TopoDS_Iterator.
a natural bound is added to all the faces are constructed with UV-periodical surfaces (not only sphere and torus; e.g., closed b-splines)

other:
ShapeAnalysis: ReverceSeq renamed to ReverseSeq
BRep_Tool Pnt and Tolerance has the check for null TShape
Test cases for issue CR24249

required null checks were added
test cases were corrected according to their new behavior
Correction test case for issue CR24249
2014-04-17 16:17:16 +04:00
mkv
dd8f1b191b Update of test cases for Debug 2014-03-28 16:02:51 +04:00
abv
bbd47d8f35 0024748: Remove unused instantiations of collection classes
Removed:
- packages PColPGeom, PColPGeom2d
- in Geom package: classes SequenceOfBoundedSurface, (H)SequenceOfSurface
- in TColGeom package: classes Array1OfBoundedCurve, (H)Array1OfBoundedSurface, HArray1OfBoundedCurve, (H)Array2OfBoundedSurface, (H)Array2OfBSplineSurface, HArray2OfBezierSurface, (H)SequenceOfBoundedSurface, HSequenceOfSurface
- in TColGeom2d package: classes (H)Array1OfGeometry, (H)Array1OfBoundedCurve, HSequenceOfGeometry
2014-03-27 16:37:21 +04:00
mkv
0a58bfe2c3 Update test cases for debug mode 2014-03-21 16:16:29 +04:00
ibs
630ab8c7fe 0024549: Faulty shape after IGES translation with xstep.cascade.unit set to M
pcurve as line isn't created to avoid incorrect parameterization
Test case for issue CR24549

Test cases were corrected according to their new behavior
2014-03-21 16:11:31 +04:00
apn
3054a9f4df Improvements IGES and STEP interface in DEBUG mode 2013-10-18 11:51:12 +04:00
apn
3cdfdc9a2b 0024156: It's necessary to add TODO in test cases to avoid known regressions on MacOS 2013-09-12 14:18:28 +04:00
apn
b58dfc5e92 0024121: It's necessary to add TODO in test cases to avoid known regressions in debug mode 2013-09-05 13:43:39 +04:00
ika
602952413f 0022535: Cut sphere: invalid shape after reading from STEP
In cutting sphere it's seam edge was divided into two parts(by cylinder),
but pcurves of  the second were not shifted during shape healing.
Test cases correction
2013-08-15 17:23:40 +04:00
ika
673693f1cf 0021317: Face cannot be fixed by Shape Healing
Fix that face, in which only wire was reordered during shape healing, was not replaced.
Add test case for this fix
Add status for shifted wires in reordering.
Modified test case de/step_1/E3 according to new reference data
2013-08-01 12:34:52 +04:00
ika
fdabc2117e 0023746: IGES wheel model fails to load when OCCT unit is meters
Add check for too small distances during edges reordering
Fix writing TrimmedSurface (Type 144).
Fix checking for too small distances between loops of edges during edge's reordering.
Add checking for too small BSpline segments during reading and writing IGES.
Fix wire splitting by adding checking that vertexes same not only in 3d, but in 2d too.
use tolerance of vertexes recomputed through resolution surface, not 2d curves.
Adding test case for this fix
Modified test case bugs iges bug23746 and cases in group de according to new reference data
2013-07-25 12:39:12 +04:00
emv
c1746a0ac9 0024060: Wrong result done by general fuse algorithm.
Added treatment of the vertex as a single object.
Added test case bugs/modalg_5/bug24060
Modified shape's extension in test cases bugs/moddata_3/bug23943_3 bug23943_4
Modified test cases in group de according to new reference data in issue 24035
2013-07-12 12:42:42 +04:00
Roman Lygin
96a85238fb 0024043: Performance improvements: Modeling Algorithms
Performance improvements: Modeling Algorithms (added Shape Healing)
Added TODO to unstable test cases
2013-07-12 12:27:30 +04:00
ika
404d419daa 0024035: Intersector is not symmetrical
asymmetrical check in  Standard_Boolean IntCurve_IntPolyPolyGen::findIntersect was changed to symmetrical.
fix wrong calculation of approx parameter on curve for last polygon segment
Added test case bugs/modalg_5/bug24035
Modified TODO in "de" test cases because there are small differences with old behaviour
Modified test case heal/split_closed_faces/G5 because of corrections in intersector's behavior, which lead to changes in checkshape
2013-06-27 13:56:52 +04:00
git
3af9db62e0 Adjusting testing case for testing on Debian60 64bit 2013-04-23 13:54:52 +04:00
ika
c97067ad95 0023439: Integration of test grid "xigs" into the new testing system
Loop back tests for iges and step files with possibility of generation of reference data.
Clean up of test scripts (removal of obsolete code, adding comments, corrected formatting)
two fixes were done (same like bug 23722 and bug 23736)
Cancelling checking for number of warnings
rewrite some test scripts in cause of this and fix 23794
Tolerance checking was weakened.
Fix to check instability on Linux (bug 23822) was added.
TODO messages was added to tests which have different results on Windows and Mandriva2010
Ability to update this TODO in regeneration mode was added.
Add fix to bug 23852
Test groups were recomposed.
'dataexch' was renamed to 'de'.
CPU limit was decreased from 2000 sec. to 1500 sec.
2013-04-05 16:09:52 +04:00