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

1916 Commits

Author SHA1 Message Date
apl
f2a88e54e8 0028310: Visualization - crash on iteration through detected interactive objects
AIS_InteractiveContext::Remove (anIObj, ...) removes object from sequence of detected owners.
Therefore further iteration on detected will not require updating this list with ::MoveTo().
Additional modification includes incrementing properly the iterator of CurrentDetectedObject
and resets iterator of Highlighted detected objects, because nothing is really highlighted after that.
2017-01-19 17:24:49 +03:00
ski
44fae8b193 0027691: Remove dchrono from all test cases and move its to perf group
Remove performance comparing with hardcoded value.
Test cases for performance of some commands were moved to perf group.

Updated documentation.
2017-01-19 17:24:46 +03:00
kgv
ec7c343f23 0028306: Visualization - viewer crashes if style for shaded display is set to HATCH
Fixed NULL-dereference in OpenGl_Context::SetPolygonHatchStyle().
2017-01-19 16:28:13 +03:00
ssv
acc909a893 0028055: Add UpdateAssemblies() method for top-down update of assembly compounds
- Implement top-down update for assemblies in XCAFDoc_ShapeTool
- Get rid of UpdateAssembly() method used for partial (parent-only) update
- Adjust STEP and IGES translators to use the top-down update after filling OCAF
- Implement XUpdateAssemblies Draw command
- Add test cases bug28055_1 and bug28055_2 for component removal and part update
- Update XDE documentation to mention the new UpdateAssemblies() method

Correction for issue CR28055
Adjusting of test case bugs/fclasses/bug28217
2017-01-19 16:22:47 +03:00
emv
10ce324694 0028343: Modeling: ShapeUpgrade_UnifySameDomain algorithm produces invalid shape
Check coincidence of the normal directions of the adjacent faces to understand if the merging of these faces is possible.

Test cases for the issue.
2017-01-19 16:16:27 +03:00
ika
1209c1b923 0028315: Data Exchange - Import/Export GD&Ts without semantic
Implement import/export of Dimensions without semantic.
Add new type of dimension for GDTs with presentation and connecting to shapes.
Update test cases.

Small corrections for issue CR28315
2017-01-19 16:05:25 +03:00
emv
77a11d3df1 0028189: Result of Boolean operation is non-manifold wire
1. The result of Boolean operation on the arguments of collection type, containers WIRE/SHELL/COMPSOLID, is also a collection.
The containers of type WIRE included into result should now also (as the SHELLs) have coherent orientation of its sub-shapes.
For that the new method has been implemented (BOPTools_AlgoTools::OrientEdgesOnWire(TopoDS_Shape&)) which reorients edges for correct ordering.
The duplicating containers, i.e. containers with the contents completely included in other containers, are now avoided in the result of BOP.
2. The result of Fuse operation on Compsolids is now also will be Compsolid.
3. Documentation has been updated.
4. New test cases for the issue.
5. Adjusting test cases to current behavior.

Correction of test case bugs/modalg_4/bug726_2 according to the new behavior
2016-12-29 18:32:44 +03:00
ika
400af1bcf6 0028235: Data Exchange - DG&T datum XCAF object has incomplete list of shape references
Update STEP import and export of datums.
Update test cases.
2016-12-29 14:57:05 +03:00
emv
a8232603a0 0028273: Inefficient implementation of the BRepOffset_MakeOffset::BuildSplitsOfFace function
The method for building splits of the face BRepOffset_MakeOffset::BuildSplitsOfFace has been redesigned to use the BOPAlgo_BuilderFace algorithm directly.
The methods FindInvalidFaces and TrimNewIntersectionEdges have been corrected to avoid possible instabilities.
The filtering of invalid edges by existing bounding edges has been corrected to avoid removal of valid splits.
The method BRepOffset_Analyse::Correct2dPoint has been modified to avoid unnecessary initialization of BRepAdaptor_Surface.

Adjustment of the test cases.
Test case bugs modalg_6 bug26513 has been modified to unify faces of the input shape before operation.
2016-12-29 14:50:24 +03:00
msv
0c5a6d479b 0028283: The command bopcheck crashes on the given shape
BOPAlgo_CheckerSI crashed due to building of pcurve for an edge not lying on surface. The fix avoids building of pcurves in this algorithm.
The new flag has been added in BOPAlgo_PaveFiller class (method SetAvoidBuildPCurve). It tells whether to avoid building pcurves. It is worth to set if the result is not used to create splits of faces, as in example with BOPAlgo_CheckerSI.
2016-12-29 14:48:36 +03:00
abv
b3d20c7f46 0028217: Error handling is not thread safe and causing memory corruption and sporadic crashes
Static variable holding handle to the last raised exception is made thread-local on compilers that support C++11 keyword thread_local (MCVC++ 14+, GCC 4.8+, ICC 14+, CLang).
Test bugs fclasses bug28217 is added (BAD on vc < 14 and gcc < 4.8).

Test case tuning bugs/fclasses/bug28217
2016-12-29 14:38:02 +03:00
ifv
0a40a30da5 0028223: Projection of closed curve onto cylinder is wrong
Algorithm of calculation UV bounds of projected curve for periodic surfaces is modified.
2016-12-29 14:27:22 +03:00
isk
0f0f0c06d1 0028244: Visualization - AIS_AngleDimension throws exception for 180 degree
Small correction of test case for issue CR28244
2016-12-22 17:24:31 +03:00
ika
51663cb434 0028250: Data Exchange - Wrong number of geometric tolerance modifiers.
fix some copy paste mistakes,
update test cases.
2016-12-22 17:24:30 +03:00
isk
decdee7d3f 0028205: Visualization - add functionality for dumping results of detection algorithms into image
StdSelect_ViewerSelector3d::ToPixMap() - added new method for dumping
detection results into an image.
2016-12-22 12:46:49 +03:00
msv
4e66868ad7 0028221: General Fuse operation error
The method BOPTools_AlgoTools2D::AttachExistingPCurve has been corrected so that
to call BRepLib::SameParameter not on the target edge with the whole set of pcurves,
but rather on a temporary edge with 3D curve and copied pcurve only.
After that the updated pcurve is transferred to the target edge.

Small correction of test case for issue CR28221
2016-12-22 12:44:05 +03:00
ski
1ef277c369 0028204: TopoTools_ShapeSet::Dump() does not show flag Locked
Corrected command dump to show flag Locked for shapes in DRAW.
Test case for issue CR28204
Updated test case.
2016-12-22 12:41:16 +03:00
kgv
4b3d6eb1d2 0028004: Visualization, AIS_ColorScale - allow defining labels list not equal to intervals list
Cosmetics, code clean up.

AIS_ColorScale now draw labels using Graphic3d_VTA_CENTER
vertical alignment flag, instead of incorrect own alignment logic.
The color bar now adds margin on the top simmetrical to the bottom.

AIS_ColorScale::SetSmoothTransition() - added new property
for displaying colorscale with smooth transition between color intervals.

AIS_ColorScale::SetHueRange() - added new property defining the hue angles
corresponding to minimal and maximum values on the color scale.

AIS_ColorScale::SetLabels() now allows setting the sequence of free labels,
which number does not match the number of intervals.
In this case the labels will be displayed at positions of virtual
intervals corresponding to the number of labels.
2016-12-22 12:39:35 +03:00
msv
09a4804444 0028183: Modeling - BRepExtrema_DistShapeShape does not find all solutions
Disable SetSingleSolutionFlag when calling algorithm of curve-curve Extrema.
Now DistShapeShape will find all solutions, even if they are located on the same pair of edges.
The fix brings the speed down for the cases of coinciding curves.
2016-12-22 12:37:54 +03:00
msv
24542bc056 0028017: Unexpected result of General Fuse operation
Several improvements have been made in BO code to fix the bug:

- Create empty edge-edge interference if intersection is close to an end vertex. This will help to avoid creation of unnecessary edge-face intersections.
- Improve PutPaveOnCurve() method to join nearly located vertices when they are put on the same section curve.
- Add processing of same-domain vertices for section edges in UpdatePaveBlocks() method.
- Improve the method CorrectWires() in order to not increase vertex tolerance if it will cover the major part of an edge.
- Replace vertices of section edges by same-domain equivalents.
- In the algorithm BOPAlgo_WireSplitter, correct angles computation and evaluation, taking into account periodicity.
- Modify PostTreatFF to properly take into account the orientations of coinciding section edges.
- In IntTools_Context::ComputePE, check distance from the point to vertices of the edge if the projection to the curve is failure.

Tests update:
- test offset\faces_type_i\C9 has been updated; now instead of returning bad shape it returns null result.

Notes for porting:
- Modify BopAlgo_PaveFiller so that on output each interference refers to the new vertex that will hit in the result (same-domain of the initial new vertex).
- Make the method BOPDS_DS::Index() returning valid index for new shapes.

// eliminate compile warning on VC14
2016-12-16 11:59:40 +03:00
abk
5200cc4aa3 Test for 0028196: Algorithm 'Extrema_GenLocateExtPS' failed to find the extremum in a case
Draw command 'proj' has been improved:
- Add possibility to pass the starting point. If it is passed than the algorithm Extrema_GenLocateExtPS is used instead of standard projection.
- Make the output of the command more clear.

Test case bugs/moddata_3/bug28196 has been added.
2016-12-16 11:58:12 +03:00
kgv
f838dac48b 0025695: Visualization, AIS_InteractiveContext - define default HilightMode
AIS_InteractiveContext - removed the following unused properties:
- PreSelectionColor(), DefaultColor(), WasCurrentTouched(), ZDetection().
AIS_InteractiveObject - removed unused property SelectionPriority().

Prs3d_Drawer - removed properties HighlightStyle() and SelectionStyle().
Graphic3d_HighlightStyle has been superseded by Prs3d_Drawer
inheriting from new class Graphic3d_PresentationAttributes.

Graphic3d_PresentationAttributes (as Graphic3d_HighlightStyle replacement)
has been extended with new properties:
- ZLayer() defining Z-Layer for highlighting presentation.
- DisplayMode() defining display mode for highlighting.

StdSelect_BRepSelectionTool methods have been corrected to take
SelectMgr_EntityOwner instead of StdSelect_BRepOwner.
StdSelect_Shape - duplicated field myDrawer has been dropped.

AIS_InteractiveObject - myDrawer->Color() is now used instead of myOwnColor,
myDrawer->Transparency() instead of myTransparency
and myDrawer->ZLayer() instead of myZLayer.

PrsMgr_PresentationManager::Unhighlight() now unhighlight all modes.
The method taking Mode as argument has been marked deprecated.

New enumeration Prs3d_TypeOfHighlight has been introduced
defining different highlight types.
AIS_InteractiveObject::HighlightStyle() now takes enumeration argument
and defines different styles for Global and Local selection.

ComesFromDecomposition() property has been moved
from StdSelect_BRepOwner to SelectMgr_EntityOwner.
2016-12-16 11:58:10 +03:00
isk
404c893694 0028162: Draw Harness - eliminate usage of deprecated Local Context
Create a general draw command 'VRelation' and drop the old 'relation' commands.
Add test cases for new draw command "vrelation".
Add two new methods: Activate and Deactivate which activate/deactivate the given selection mode for all displayed objects.
Eliminate deprecated local context methods in ObjectCommands, QABugs.
Eliminate deprecated local context methods in mfc standard sample and qt samples.
2016-12-16 11:58:08 +03:00
kgv
0a8630615d 0028213: Visualization, StdPrs_ShadedShape - compute face edges for triangulation-only Faces 2016-12-15 16:37:35 +03:00
aml
f79b19a17e 0028175: Bad result of curve-curve extrema
Extrema between curves has been made producing correct result for the cases of solution located near bounds.

- Class math_GlobOptMin has been improved to use lower order methods of local optimization when high-order methods are failed.
- Add support of conditional optimization (in bounds) in the classes math_BFGS and math_BracketMinimum.
- Turn on conditional optimization in the case of usage of math_BFGS in the class math_GlobOptMin.
- Correct mistake in distmini command, which caused incorrect reading of deflection parameter.
- To avoid possible FPE signals, ensure initialization of fields in the class math/math_BracketMinimum.
- In the algorithms math_BFGS, math_Powell and math_FRPR, take into account that the function math_MultipleVarFunction can return failure status (e.g. when computing D0 out of bounds).

New test cases have been added.
Tests cases are updated.

// correct test case
2016-12-15 16:33:12 +03:00
vpa
640d5fe219 0028107: Visualization - provide a flexible interface to set custom hatch styles
- class Graphic3d_HatchStyle is added to provide a possibility to set up custom and predefined hatching;
- added the ability to set custom hatch patterns through bitmaps;
- test case for issue #28107
2016-12-15 16:28:58 +03:00
emv
291fced1e6 0028187: Add possibility to avoid creation of Internal parts in the result of Volume maker algorithm
1. The possibility to prevent addition of internal parts has been added into the following algorithms:
- BOPAlgo_BuilderFace;
- BOPAlgo_BuilderSolid;
- BOPAlgo_MakerVolume.

Setting the option to avoid internal parts for MakerVolume algorithm guarantees that the result solids
will be manifold and not contain any internal parts. But it does not prevent from occurrence
of the internal edges or vertices in the faces.

2. The Set/Get methods of the BOPAlgo_BuilderArea class have been made inline.

3. Draw command mkvolume has been updated to take into account the new option.

4. BRepOffset_MakeOffset::BuildShellsCompleteInter() has been modified to use the new option of BOPAlgo_MakerVolume
to speed up the construction of the final result solid.

5. Documentation has been updated with new section dedicated to BOPAlgo_MakerVolume algorithm.

6. Test case for the issue.
2016-12-08 16:59:25 +03:00
emv
51db017972 0028165: Improve performance of Boolean Operations
1. Unification of the usage of the BRepAdaptor_Surface in Boolean Operations algorithm.
For each face when it is necessary the Adaptor is initialized only once and stored in Context.

For that purpose the new IntTools_Context::SurfaceAdaptor(const TopoDS_Face&) method has been implemented.

To provide possibility to take the Adaptor from the context, the context has been added as
a parameter in following methods:
BOPTools_AlgoTools::MakePCurve()
BOPTools_AlgoTools::Sence()
BOPTools_AlgoTools2D::BuildPCurveForEdgeOnFace()
BOPTools_AlgoTools2D::PointOnSurface
BOPTools_AlgoTools2D::CurveOnSurface
BOPTools_AlgoTools2D::AdjustPCurveOnFace
BOPTools_AlgoTools2D::Make2D
BOPTools_AlgoTools2D::MakePCurveOnFace
BOPTools_AlgoTools3D::GetNormalToFaceOnEdge

It is also possible now to pass the context into BOPAlgo_WireSplitter algorithm.

Also, the new IntTools_Context::UVBounds(const TopoDS_Face&) method
has been implemented to get the UV bounds of a face.

2. Additional improvement is a calculation of reduced intersection range only for the intersection
type VERTEX during computation of Edge/Face interference.

3. The methods IntTools_EdgeFace::Prepare() and IntTools_EdgeFace::FindProjectableRoot()
and the fields IntTools_EdgeFace::myProjectableRanges and IntTools_EdgeFace::myFClass2d
have been removed as obsolete.

4. Test cases for the issue.
2016-12-08 16:53:22 +03:00
emv
483ce1bd89 0027878: Development of the Gluing operations based on the new Boolean component
The Gluing operation is an additional option for the algorithms in the Boolean Component
such as General Fuse, Boolean operations, Section operation, Maker Volume and Cells Builder algorithms.

The Gluing options have been designed to speed up the computation of the interference among arguments of the operations on special cases,
in which the arguments may be overlapping but do not have real intersections between their sub-shapes.

This option cannot be used on the shapes having real intersections, like intersection vertex between edges,
or intersection vertex between edge and a face or intersection line between faces.

The Gluing option is an enumeration implemented in BOPAlgo_GlueEnum.hxx. There are following items in the enum:
* BOPAlgo_GlueOff - default value for the algorithms, Gluing is switched off;
* BOPAlgo_GlueShift - Glue option for shapes with partial coincidence;
* BOPAlgo_GlueFull - Glue option for shapes with full coincidence.

For setting the Gluing options for the algorithm it is just necessary to call the SetGlue(BOPAlgo_GlueEnum) method with appropriate Glue value.

For using this option in DRAW the command bglue has been implemented:
* 0 - default value, Gluing is off;
* 1 - for partial coincidence;
* 2 - for full coincidence

Elimination of the warnings.
2016-12-08 16:50:17 +03:00
dbp
b4327ba8df 0028126: Visualization, Path tracing - Provide ability to use two-sided scattering models 2016-12-08 16:36:09 +03:00
aka
a148c938b0 0027434: Wrong result of classification of the point in "infinity"
In the case of infinite point due to not enough machine precision the distance from the point to each edge of the face is computed the same, and the algorithm cannot correctly select the nearest edge. To solve this problem checking of point was added, if the point is located too far from the bounding box of the face, then it will be replaced with another point located on the line between the point and the center of the bounding box.
    The new point has the same state as initial one but its state can be resolved without ambiguity.

Corrections in CheckPoint method
Small correction of test case for issue CR27434
2016-12-08 16:34:18 +03:00
aml
8013367c92 0027954: Create topology-preserving offset computation algorithm
New topology-preserving offset algorithm has been added. It allows to construct offset shape of build solid.
test cases have been added.
Documentation has been updated to be up to date.

Minor corrections.
Grid is renamed for simplification purposes.
Old constructors are restored with Standard_DEPRECATED macros.
2016-12-08 16:30:53 +03:00
emv
b443d53628 0028163: 3D Offset algorithm produces incorrect result on attached shape in mode Complete Intersection
1. Correct building of the lists of intersection faces connected to the same vertex.
2. For the artificially invalid cases with only one invalid face avoid usage of the edges having same origins as invalid edges.
3. Test cases for the issue.
4. Test cases offset shape_type_i_c XM1, ZW*,ZX*,ZY* have been modified to provide more clear result.
5. TODO statements have been removed from the test case offset shape_type_i_c XE6 as it is OK.
6. Test case offset shape_type_i_c ZZ2 is improvement.
2016-12-08 16:28:42 +03:00
aka
851f870162 0027674: BRepOffsetAPI_ThruSections make invalid shape if sections are connected at ends
The edge which will be created between same vertexes should be degenerated and without 3d curve.

Small correction of test case for issue CR27674
2016-12-08 16:22:33 +03:00
msv
89aebdea8d 0027033: Modeling -- ensure stable result of area calculation
The method BRepGProp_Face::LKnots has been corrected to make proper initialization of the output data for the case of a circle.
Added test case bugs/modalg_6/bug27033
2016-11-25 13:50:18 +03:00
apn
7dd37838f7 Modify test case bugs/mesh/bug28118 2016-11-24 11:57:08 +03:00
apn
1dd28279c8 Modify test cases according using imagedir folder for saving tmp files 2016-11-24 07:07:00 +03:00
gka
cde381c4e2 0028118: Mesh generation hangs then crashes
Protection against hangs of mesh  and crash(made by epa)
Added test case bugs/mesh/bug28118
Tests mesh* standard_* W7 are corrected (TODO removed)
2016-11-24 07:06:49 +03:00
apn
10f55672df 0026450: Boolean operation is running endless
Added test case bugs/modalg_6/bug26450
2016-11-23 18:08:37 +03:00
kgv
aff1875311 0028147: Data Exchange - NULL dereference while reading color from STEP file
StepVisual_StyledItem::Item() now does not call IsKind() on NULL object.
Add several checks for NULL to import/export.

Add test case bugs/step/bug28147
2016-11-23 15:54:55 +03:00
mkv
2fb5823d31 0028146: Data files with the same content in test cases
Names of used shapes were corrected in test cases
2016-11-23 13:09:48 +03:00
kgv
b3eab8efc3 0028127: Visualization - transparent object breaks Z-Layer depth buffer clear
OpenGl_LayerList::Render() now calls glDepthMask(GL_TRUE) before clearing depth buffer.
Depth buffer is now cleared even if ZLayer with this command has no structures.
2016-11-23 13:05:18 +03:00
emv
41aa3c3d5d 0028046: Incomplete result of offset operation in mode complete intersection
1. Special usage of the common edges not belonging to any invalidity while rebuilding the invalid faces (method IntersectFaces() in BRepOffset_MakeOffset_1.cxx).
Such edges could only be extended to the valid faces boundaries, thus could only split the face and not create any new part.

2. Test cases for the issue.
2016-11-23 13:02:53 +03:00
razmyslovich
f9ac4dc9ab 0027849: ResourceManager path computations fail for the folders containing dots
Treatment of paths in Resource_Manager is corrected to handle properly paths with dots inside.
Extraction of extension from path in DOS mode when working on Linux is corrected in OSD_Path.
Test case added.
2016-11-23 13:01:46 +03:00
abk
d673da182b 0028103: Foundation Classes - extend NCollection_Map to check whether two given maps are intersected
Mehtod HasIntersection added in NCollection_Map to check whether two given maps contain at least one same item.
'Draw' command and test to check the method were created.
2016-11-18 15:19:40 +03:00
dbp
f411f94fac 0027256: Visualization, Path Tracing - add support of alpha-channel of texture
Regenerate resource files.
2016-11-18 15:17:36 +03:00
msv
c894a5fdfc 0027992: Modeling Algorithms - Extrema_ExtPS crashes on face without geometric surface
The algorithm BRepExtrema_DistShapeShape has been protected against exceptions when non-geometric shape data is given on input, like a face containing triangulation only or an edge containing polygon only. Such faces/edges are ignored by the algorithm.

BRepGProps::VolumeProperties() now ignores faces without geometric surface to avoid access violation.
2016-11-17 18:49:36 +03:00
kgv
f9f740d6b0 0028095: Draw Harness, ViewerTest - use RGBA format instead of BGRA within vreadpixel
OpenGl_Workspace::BufferDump() now implicitly converts RGBA dump
into requested BGR, BGRA and RGB image.

DRAW command dversion is improved to report OpenGL variant used (desktop or ES); reporting of version of MSVC is corrected for VC14 and above; reporting of HAVE_OPENCL option is removed.

Usage of command vdump is corrected in some tests to specify extension .png for an image file.

Compiler warning is eliminated in OpenGl_Text.cxx (OpenGL ES mode only).
2016-11-17 15:40:15 +03:00
gka
16c93d97eb 0028094: Shape obtained after DRAW command "splitshape" has unnecessary high tolerance.
Check of the gap between ends of the p-curves having common vertex in the parametric space of face similar as in the class BRepCheck_Wire was added.
Check that face lies on the periodic surface was added.
Added check between ends of 2D curves in the 3D space and vertex the same which used in the BRepCheck_Wire::SelfIntersect
Test case for issue CR28094 has been created.
2016-11-17 15:36:26 +03:00
kgv
ef9a9362ae 0028093: Visualization - access violation on removal of dynamic highlighting after device loss
OpenGl_Layer::Remove() now tries to remove object from myAlwaysRenderedMap
if it was not removed from other groups.
2016-11-17 15:32:47 +03:00