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

1695 Commits

Author SHA1 Message Date
vpa
0d5880e11a 0027893: Visualization - AIS_InteractiveContext::SetSelected does not work
- misprint in check of global selection existence in AIS_InteractiveContext::SetSelected was corrected;
- remaining occurrencies of hard-coded 0 selection mode were corrected to use global selection mode;
- test case for issue #27983
2016-09-30 11:17:13 +03:00
kgv
949c9b7f28 0027891: Visualization - FPE due to use of DBL_MAX in SelectMgr_SelectingVolumeManager::DetectedPoint() 2016-09-30 11:17:12 +03:00
vpa
8e5fb5eabc 0027818: Visualization - provide an interface to define highlight presentation properties
- introduces a wrapper for setting up highlight properties: Graphic3d_HighlightStyle;
- API of all methods that use highlight or selection color is changed to deal with Graphic3d_HighlightStyle;
- highlight in shading mode now supports transparency, implemented via blending;
- transparency for selection can also be set, but implementing custom entity owners with additional presentation on application level;
- methods PrsMgr_PresentationManager::Highlight, PrsMgr_PresentationManager::BoundBox that highlight object with hard-coded color are removed;
- deprecated methods of SelectMgr_EntityOwner, that use presentation manager's highlight method, were removed;
- methods of IsHilighted AIS context with selection color checks were replaced;
- added API to store dynamic and selection highlight to Prs3d_Drawer class;
- customization of dynamic and selection highlight for particular objects is now available through SelectMgr_SelectableObject::HilightAttributes();
- AIS_InteractiveContext highlight methods were updated to support individual highlight styles of interactive objects;
- introduced new command - vselprops, that allows to customize global selection and highlight properties like autoactivation, pixel tolerance and colors;
- Draw Harness commands vautoactivatesel and vselprecision were removed, use vselprops instead;
- fixed bug in command's parser;
- test case for issue #27818
2016-09-30 11:17:11 +03:00
dbp
3a9b5dc86a 0027607: Visualization - Implement adaptive screen space sampling in path tracing
This commit provides useful functionality for path tracing rendering core.

1) Graphic3d_RenderingParams class was extended with additional AdaptiveScreenSampling option (disabled by default).
   If this option is enabled, path tracing tries to adjust the number of samples for different screen areas.

   In this way, the more complex areas (from the point of light conditions) are sampled more intensively,
   while the simple areas are sampled very rarely.
   For example, caustics and glossy reflections are typical candidates for more precise sampling.

   In general, this allows to equalize image convergence and not to waste resources for already converged areas.
   It is also possible to visualize sampling densities by enabling ShowSamplingTiles option
   (activating and deactivating this option does not affect on the accumulated image).

2) Mixing OpenGL and ray-tracing output has been changed.
   Now blending is performed using OpenGL functionality, while ray-tracing shaders only output correct Z-value.

Test case bugs vis bug27083 has been updated,
since the alpha value is now correctly set by Ray-Tracing to 1, opaque.
2016-09-30 11:17:10 +03:00
kgv
778cd66786 0027860: Visualization - clean up Transformation Persistence API
Graphic3d_Camera::TransformMatrices redundant NCollection_Handle usage
has been replaced with validity flags.

Graphic3d_TransModeFlags now defined as enumeration, not integer bit flags.
Graphic3d_TMF_PanPers and Graphic3d_TMF_FullPers have been removed.
Graphic3d_TMF_ZoomRotatePers has been introduced.

Graphic3d_TransformPers is now inherits Standard_Transient.
Graphic3d_TransformPers now defines dedicated constructors
for 3D persistence (zoom / rotate) and 2D persistence (2d / trihedron).
2D persistence now supports dedicated values for X and Y offsets.
The corner is now specified by enumeration Aspect_TypeOfTriedronPosition
instead of indirect interpretation of anchor point values.
Fixed handling of Graphic3d_TMF_ZoomRotatePers (combination of Graphic3d_TMF_RotatePers + Graphic3d_TMF_ZoomPers).

PrsMgr_PresentableObject, Graphic3d_CStructure now hold
Handle(Graphic3d_TransformPers) instead of a value.
Method ::SetTransformPersistence(), ::TransformPersistence()
now works with Handle(Graphic3d_TransformPers).
Old methods have been marked deprecated.
2016-09-30 09:43:12 +03:00
nbv
e8e26df06c 0027873: Exception is raised in BRepFill_Filling::FindExtremitiesOfHoles()
The reason of exception has been eliminated.
Creation of the test case for this issue.
Correction of unstable test case.

Some test cases have been adjusted according to their new behavior.
2016-09-23 09:57:52 +03:00
jgv
8d795b5130 0027720: HLRBrep_Algo BSpline missing edges
The algorithm that builds outlines ("silhouettes") makes an outline in 2d parametric space of the surface starting from some previously detected point where normal is orthogonal to direction of view. So, the surface is previously discretized into (m*n) sample points and some of them become starting points for future outlines.

    If the surface has non-uniform parametrization and/or some local extremums of curvature, the outlines can not be built without breaks, so there are several groups of consequent outlines in this case. Unfortunately, it leads to the situation when current number of sample points becomes insufficient to build all the parts of outlines.

    The idea is to detect the "holes" between already constructed parts of outlines and then complete the construction.

New auxiliary draw command for testing of HLR.

Correction according to the remarks.

Update of test case according to the developer's directive
2016-09-23 09:57:50 +03:00
bugmaster
b1c5466550 0006768: Problems making offset wires
Adding testing case
2016-09-23 09:57:48 +03:00
bugmaster
b357dcc225 0014531: Boolean Operation Algorithm fails
Adding test case
2016-09-23 09:57:46 +03:00
nbv
84bd25527c 0027875: GeomFill_NSections constructor crash on sequence of curve containing only one curve
The GeomFill_NSections algorithm cannot create any surface from sequence with single curve only.

Therefore, return is provided in corresponding place of the code. Additionally, some public methods of GeomFill_NSections class checks if the surface has been created earlier.

Test case for this issue has been created.

Compiler error has been eliminated.
2016-09-22 12:27:14 +03:00
jgv
5da005403b 0027822: Exception access violation is raised in BRepOffsetAPI_MakePipeShell during of build
New public method IsDone() is added to abstract class BRepFill_SectionLaw.

Test case bugs/modlag_6/bug27822 has been added
2016-09-22 12:26:07 +03:00
bugmaster
aea33d0ab8 0010234: BRepOffsetAPI_MakePipeShell fails on spine built from two segments and profile built from arc
Adding testing case
2016-09-22 12:19:45 +03:00
rkv
a2f76b15f1 0027567: VIS - possible memory leaks due to use of plain pointers: Fix also the VIS guide. Add the test v3d/ivtk/bug27567. Add a draw command "ivtkremove".
0027734: Configuration - TKIVtkDraw build fails with TBB: Remove unnecessary define statement (windows specific).

Small correction of test case for issue CR27567
2016-09-22 12:14:30 +03:00
ika
935069d23d 0027808: Some geometric_tolerances are not imported.
Process datum_feature entity during collecting shape_aspects of GDT.
Update test cases.
2016-09-15 12:22:16 +03:00
msv
14ea8abd0a 0027830: Infinite HLR looping
Make protection of HLR algo against garbage data in faces. In particular case, there are faces built on a periodical surfaces, which U bounds exceed period thousands times. Such faces are excluded from the process of edges hiding.

In addition, while fitting the intersection point in period for periodical faces, replace looping with the single call to AdjustPeriodic method.

- Add new test case.
- Update tests of HLR according to new numbers of subshapes.

Update of test cases according to the new behavior
2016-09-15 12:19:52 +03:00
bugmaster
46f4a251a0 0022037: Exception (Construction Error) during splitting face with hole by another face
Adding test case
2016-09-15 12:13:18 +03:00
bugmaster
d0aafb064b 0025138: SIGSEGV when sweeping along helix
Adding test case
2016-09-15 12:11:58 +03:00
msv
ef444297f5 0027862: Exception in BRepOffsetAPI_MakePipeShell
Check if the shape is not null before querying its ShapeType.
Create test case for the bug.

Small correction of test case for issue CR27862
2016-09-15 12:04:32 +03:00
nbv
c204d492ae 0027851: Wrong result of classification of the point relative to the solid
Test case creation.
2016-09-15 11:38:53 +03:00
apl
099f351396 0027739: Visualization, TKV3d - implement individual acceleration data structure for selection of 2D persistent objects
Low-level selection algorithms has been improved to explicitly support 2D
transformation persistent objects. This patch generally touches:

1) SelectMgr_SelectableObjectSet - the lists of objects has been split onto three
subsets (regular, 3d-persistent, 2d-persistent). Each subset has individual BVH
tree. The algorithms are now have more flexibility to update only those trees
that is really required for actual camera state.

2) SelectMgr_ViewerSelector - explicitly supports Eye space selection operations
on BVH tree for 2d-persistent subset. Change of camera position does not
anymore affect acceleration data structure (BVH tree) of 2d-persistent selectable objects.

3) Other classes from SelectMgr have been fine-tuned to provide appropriate API.

Porting notes:

This patch touches very low-level selection classes. If the low-level features were used
the following modifications may need to be considered for porting:

1) Iteration over objects of SelectMgr_SelectableObjectSet should now
be implemented with corresponding Iterator class.

2) SelectMgr_BaseFrustum::ScaleAndTransform and derived classes return
Handle(SelectMgr_BaseFrustum) instead of NCollection_Handle<> type.

Small correction of test case for issue CR27739
2016-09-15 11:35:10 +03:00
ika
c10703215e 0027313: Exception during WriteStep with PMI
Add check for datum position during export of datum_system
Add Draw commands for set/get datum position
update test cases

Correction of case bugs/step/bug27313
2016-09-15 11:30:46 +03:00
bugmaster
7b3aef359f 0025423: Incorrect result of splitting some shapes
Adding testing case
2016-09-15 11:20:16 +03:00
bugmaster
15b9dfc95d 0022609: Cut operation between two solids produces not valid shape
Adding test case
2016-09-15 11:18:16 +03:00
bugmaster
849c137461 0022454: Export /Import of valid model leads to lost of tolerances
Adding testing case
2016-09-15 11:16:18 +03:00
nbv
5c7744eaef 0027842: Exception in intersection algorithm if FPE is switched on
1. The reason of exception has been eliminated.
2. Interfaces of DistanceMinimizeByGradient and DistanceMinimizeByExtrema methods of IntWalk_PWalking class has been changed.

Creation of test case for this issue.

TODO has been added with reference to the issue #26329
2016-09-08 11:44:49 +03:00
kgv
71d8ccc753 0027836: Visualization, TKOpenGl - gradient background is lost at some camera positions
OpenGl_View::ZLayerBoundingBox() now adds screen background plane for proper Z-fit.

Graphic3d_TransformPers::Compute() - projection matrix has been excluded
from the math to eliminate floating point computation error.
2016-09-08 11:43:01 +03:00
bugmaster
6b5b9abf8b 0025152: Incorrect result of Boolean Union by BRepAlgoAPI_Fuse
Adding testing case
2016-09-08 11:32:43 +03:00
bugmaster
7f3bf449a9 0025102: A part of intersection cannot be found
Adding testing case
2016-09-08 11:30:31 +03:00
emv
c45fefa76e 0027222: Empty result of making volume operation
1. BOPAlgo_MakerVolume - Taking into account the possibility of Same Domain faces
   while collecting the faces for building the solids;
2. BOPDS_DS - Making the check on coincidence of edges consistent with the intersection
   algorithm which also adds the Precision::Confusion() to the intersection tolerance;
3. Test case for the issue.
4. Adjusting test cases (improvements) to their new behavior.
2016-09-08 11:28:14 +03:00
kgv
02974a19c6 0027805: Visualization - AIS_InteractiveContext::FitSelected() is broken for global selection
AIS_Selection class has been cleaned up:
- SelectMgr_EntityOwner is now used in interface instead of Standard_Transient.
- Method ::Select() has been renamed to ::Clear() for clarity.
- Dropped unused class fields.
- Owners without Selectable are not added to the list (should never happen).

SelectMgr_SelectableObject::BndBoxOfSelected() has been modified
to properly compute bounding box of ALL selection Entities
for specified Owner (only first Entity has been used before the patch).

Methods of AIS_InteractiveContext::DisplaySelected(), ::SetSelectedAspect(),
::FitSelected(), ::SubIntensityOff() have been fixed (wrong DownCast).
AIS_InteractiveContext::AddSelect() now handles properly AIS_InteractiveObject as argument.
2016-09-08 11:24:28 +03:00
msv
3065019c99 0027804: Two breps cause intersections to loop for too long/infinitely
In ProjLib_ComputeApprox algorithm, compute correct parametric tolerance from the input 3D tolerance using surface resolution, in order to pass it to low-level 2D algorithm Approx_FitAndDivide2d (instantiation of the generic class Approx_ComputeCLine). Earlier 3D tolerance was used as parametric tolerance directly, which was a problem for surfaces with too small radius of curvature.

Also, eliminate redundant creation of the object of type AppParCurves_MultiCurve on each iteration in the method Approx_ComputeCLine::Compute.

The post treatment of the Edge/Edge intersections has been improved. Namely:
a. Making the procedure of sharing Edge/Edge intersection vertices consistent with intersection algorithm by enlarging bounding box of each vertex on half of Precision::Confusion();
b. Algorithm of computation of vertex tolerance (in order to cover tangent zone between Edges) has been changed for Line/Circle cases.

Test cases for issue CR27804
Adjusting test cases according to their new behavior.

Mark the test boolean/volumemaker/A8 as unstable between different versions of MSVS (2010 and 2013).
2016-09-08 11:22:40 +03:00
emv
84caaf81a0 0027759: Invalid result of a Boolean fuse operation
Test case for the issue.
2016-09-08 11:13:56 +03:00
bugmaster
4e785ab59b 0025055: Incorrect shape copying in BRepBuilderAPI_Copy
Adding testing case
2016-09-08 11:09:27 +03:00
kgv
f1fb0901d6 0027835: Application Framework, BinXCAF - handle correctly faces with NULL surface within BinTools_ShapeSet
BinTools_ShapeSet::AddGeometry() now writes NULL surface with 0 index.
myWithTriangles is ignored for TopoDS_Face with NULL surface so that
triangulation-only faces are not lost with defaults.

Added Draw Harness command StoreTriangulation defining
WithTriangulation flag for BinXCAF/BinOcaf storage drivers.
2016-09-08 11:04:51 +03:00
kgv
e7879c5796 0027817: Visualization, StdSelect_BRepOwner - copy transformation persistence flag 2016-09-01 13:19:14 +03:00
akz
413b1c1a97 0027821: Visualization, AIS_Shape - add NULL checks for displaying TopoDS_Face with NULL surface NULL surface 2016-09-01 13:19:13 +03:00
ika
fe0d928d97 0027807: Units are lost during import presentation of GDT.
Add entities to import a subtype of draughting_model,
Add units calculating during STEP reading.
2016-09-01 13:19:12 +03:00
osa
3bffef5524 0022582: Visualization - provide an API for dumping a sub-region of the viewport
Graphic3d_Camera definition has been exended by optional Tile property (Graphic3d_CameraTile structure).
V3d_View::ToPixMap() now performs tiled dump when image size exceeds hardware limits.

OpenGl_View::Redraw() - fixed dump of immediate Z layers in no stereo and no MSAA case.

OpenGl_Context now tracks viewport values.
Draw Harness command vdump has been extended with new argument -tileSize.
2016-09-01 13:19:11 +03:00
kgv
150ed3d5ef 0027796: Visualization - allow 3D objects with Graphic3d_TMF_2d flag
Graphic3d_TransformPers::Apply() now does not reset projection matrix
for objects with Graphic3d_TMF_2d flag.

Useless flag Graphic3d_TMF_2d_IsTopDown has been removed.
SelectMgr_SelectableObjectTrsfPersSet now does not skip Graphic3d_TMF_2d presentations.
OpenGl_Layer::BoundingBox() now takes into account Graphic3d_TMF_2d presentations for proper Z-fit.

AIS_ColorScale now uses "lazy" mode for rendering labels
(considering 2D persistence to be already defined within entire structure).

OpenGl_Layer::updateBVH() now updates myAlwaysRenderedMap to handle
dynamic transformation persistence flag change without redisplaying the object.
2016-09-01 13:19:10 +03:00
apn
0766573201 0027626: Attempt to display shape in 3d leads to very long calculation loop
Added test case bugs/mesh/bug27626

Small correction of test case for issue CR27626
2016-09-01 13:19:09 +03:00
msv
8b1e055f0b 0027781: [Regression to 6.9.0] Exception in ShapeFix_Shape algorithm with option FixSmallAreaWireMode
The matter was that during checking wires of a shape for small area, non-outer wires were checked with constructing a new face with BRepBuilderAPI_MakeFace. If a face has location an edge from original face has no pcurve on the constructed face, which leads to exception in BRepGProp::SurfaceProperties. The fix constructs new face using EmptyCopy.

The method ShapeAnalysis_Wire::CheckSmallArea() has been changed so as to check area of the outer wire without hole-wires. API of this method has been changed, as the second argument theIsOuterWire is not needed any more.

The test cases have been updated, below are explanations of changes:

test de iges_2 G7
The fixed version leaves a wire in a face, but the master version considered it small and removed. The master version works wrong. It is because the face built with this wire has negative area, but the code in CheckSmallArea function does not get absolute value before comparing area with the tolerance. The left wire leads to splitting of the face on two, checkshape error in the face, and statshape faulty due to increased number of faces in the second pass.

test de iges_2 G2
The fixed version leaves a wire that is removed in the master version. The cause is the same as in G7 test case. However, here the problematic wire has very big tolerance. So, when the fixed version left it in the shape, the overall maximal tolerance became much greater than in reference data.

test de step_3 E6
In fixed version a really bad small wire is removed from the face, while in master version it is left and produces an error in checkshape report. So, it is an improvement.
2016-09-01 13:19:09 +03:00
bugmaster
87b48b40c6 0025220: Using BRepFill_OffsetWire withs wires containing arc edges throws exception "Standard_NullValue"
Adding testing case
2016-09-01 11:21:49 +03:00
bugmaster
45396f870c 0026910: General fuse does not find intersection between line and circle
Adding testing case
2016-09-01 11:15:35 +03:00
kgv
3fe9ce0edd 0027793: Visualization - object drifts at zoom within Graphic3d_TMF_TriedronPers applied
Graphic3d_TransformPers now takes Graphic3d_Camera definition as argument
for methods applying transformation.

Graphic3d_TransformPers::Apply() now computes Graphic3d_TMF_TriedronPers
transformation in the following way:
- The object is moved onto Z focus distance.
- The object is expected to be defined in pixels.
- The Z coordinate on anchor point is used as offset from the view corner in pixels.
- It is now possible to define not only corners of the view, but also middle of the side.
- Graphic3d_TMF_TriedronPers now works with perspective projection.

OpenGl_LayerList::ChangeLayer() - fixed removing of the element in old ZLayer.

OpenGl_Layer::BoundingBox() now takes into account bounding box
of Graphic3d_TMF_TriedronPers presentations for Z-fit operation.
2016-08-26 09:46:43 +03:00
ika
f3ec3b372c 0027645: Data Exchange - access violation when reading STEP AP242 file
Fix exceptions, add test cases.

Small correction of test cases for issue CR27645
2016-08-25 15:10:51 +03:00
kgv
1593b4eeab 0027797: Visualization - consider ZLayer properties while sorting list of picked entities
OpenGl_GraphicDriver::ZLayers() / V3d_Viewer::GetAllZLayers() now return
the layers sequence following rendering order (taking into account IsImmediate flag).

StdSelect_ViewerSelector3d::Pick() now sort result taking into account ZLayers flags.
2016-08-25 15:10:50 +03:00
msv
5185b1617a 0027780: Face-face intersection produces 2D curve that has reversed derivative at its end
The matter was that with starting point paased into intersector the walking line goes one point outside of the surface domain. Then during purging this extra point is removed from the line but its geometry is used for the last vertex. This makes a set of points invalid for approximation, and as a result we obtain the curve with reversed tangent direction at the end.

The API of the method IntPatch_WLineTool::ComputePurgedWLine has been changed to insert a new Boolean parameter RestrictLine. If this parameter is false than the step of removing of outside points is skipped, and the result line is not distorted. This flag is determined inside IntTools_FaceFace to tell the intersector if it is needed to limit intersection line by surface domain.

Test case has been added.
2016-08-25 11:26:05 +03:00
bugmaster
afa6834bcd 0023585: Boolean Fuse Operation Fails.
Adding test case
2016-08-25 11:14:13 +03:00
bugmaster
4eb65ae9ee 0022794: Boolean Cut operation produces incorrect result.
Adding testing case
2016-08-25 11:11:59 +03:00
kgv
60273f7774 0027763: Visualization - remove V3d_View::Print() method
Dependency from FreeImagePlus.dll (but not FreeImage.dll) has been removed.

Method V3d_View::Export() has been marked as deprecated.

Added Standard_DISABLE_DEPRECATION_WARNINGS and Standard_ENABLE_DEPRECATION_WARNINGS
to eliminate compiler warnings for using deprecated APIs within Draw Harness for testing.

compatibility with gcc 4.5-
2016-08-18 15:02:37 +03:00