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

196 Commits

Author SHA1 Message Date
dpasukhi
bd651bbbd9 0033531: Configuration - Rework DataExchange ToolKits organization
Integrated DE plugin functionality.
Reworked DE components:
 - TKDESTEP: Handling STEP file format.
 - TKDEOBJ: Handling OBJ file format.
 - TKDEIGES: Handling IGES file format.
 - TKDEGLTF: Handling GLTF file format.
 - TKDEVRML: Handling VRML file format.
 - TKDEPLY: Handling PLY file format.
 - TKDESTL: Handling STL file format.
Reworked DE DRAW components:
  TKXSDRAWSTEP: Container for DE command to work with STEP.
  TKXSDRAWOBJ: Container for DE command to work with OBJ.
  TKXSDRAWIGES: Container for DE command to work with IGES.
  TKXSDRAWGLTF: Container for DE command to work with GLTF.
  TKXSDRAWVRML: Container for DE command to work with VRML.
  TKXSDRAWPLY: Container for DE command to work with PLY.
  TKXSDRAWSTL: Container for DE command to work with STL.
TKXSDRAW rework to be base DRAW plugin to keep DE session and utils.
Updated documentation
Updated samples
2023-12-04 15:52:47 +00:00
sshutina
3421323164 0032879: Visualization, AIS_ViewController - define separate gesture mappings for dragging
Fixed problem of usage of objects dragging during zoom and pan
Added new draw command to change gesture for muse buttons
Added test
2023-07-18 16:20:12 +01:00
mzernova
b47b7e69f7 0031956: Visualization - provide Image_AlienPixMap::Save() writing into a memory buffer instead of a file
Added two new Image_AlienPixMap::Save() overloads, taking std::ostream or memory buffer arguments.
2023-06-12 11:20:44 +01:00
mzernova
b0afa94d10 0027848: Visualization - sensitivity of lines is too high
Improved objects sorting by depth.

The sensitivity calculation for the manipulator has been changed.
Now the sensitivity of the elements of the manipulator depends on its size.

Also fixed the problem of erroneous selection of unfilled circles (SelectMgr_Frustum<N>::hasCircleOverlap() function).

Test case vselect/bugs/bug27848 added.
2023-02-04 09:17:58 +00:00
mzernova
53eae1a935 0032570: Visualization, AIS_AnimationObject - define rotation around axis
When using AIS_AnimationObject, linear interpolation is performed from one gp_Trsf transformation to another.
But when an object rotates around a specific axis, the object moves not along a linear trajectory,
but along a circle. Therefore, a separate class AIS_AnimationAxisRotation was created that
allows to animate rotation around a specific axis.

Test case tests/v3d/bugs/bug32570 was added.
2023-02-01 23:26:46 +00:00
smoskvin
057dcfddf7 0033225: Changing the status of tests on Ubuntu 20.04 and Windows 64 VC142 2022-11-28 00:04:06 +03:00
oan
c4ea4ca3d1 0032241: Mesh - wrong shading display of thrusections [regression since OCCT 7.4.0]
0032422: Mesh - Weird rendering
0029641: Mesher produce 'bad' result for extruded spline with given deviation coefficient

Added method BRepMesh_NURBSRangeSplitter::getUndefinedInterval() intended to compute checkpoint parameters for those NURBS surfaces which have no intervals at all. In this case number of poles is used to produce artificial regular grid which can be refined further. Add at least one midpoint for surfaces with one interval and only two poles.

Added BRepMesh_ExtrusionRangeSplitter and BRepMesh_UndefinedRangeSplitter derivatives from BRepMesh_NURBSRangeSplitter intended to handle special cases of extrusion surfaces and general surfaces with undefined parameters.
2022-09-16 18:34:44 +03:00
mzernova
7aaed2ce3b 0032547: Visualization, Select3D_SensitiveCylinder - implement picking of a hollow cylinder
Select3D_SensitiveCircle now inherits directly from Select3D_SensitiveEntity.
The sensitive circle sector is created using the Select3D_SensitivePoly class directly.

Added appropriate methods for selecting sensitive circles.
Added parameter myIsHollow to Select3D_SensitiveCylinder class.
It allows you to search for intersections with cylinders without covers.

The Draw vcircle command has been extended with UStart and UEnd parameters
to create a sector of a circle.

Added tests: vselect/cone_cylinder/circle_sector
             vselect/cone_cylinder/circle_wire
             vselect/cone_cylinder/filled_circle
             vselect/cone_cylinder/transformed
             vselect/cone_cylinder/hollow_cone_cyl
2022-08-26 17:38:19 +03:00
kgv
86d6c284c2 0032978: Visualization - AIS_ViewController::PickPoint() includes objects invisible in current View
SelectMgr_ViewerSelector::TraverseSensitives() now takes into account object's view affinity.
AIS_InteractiveContext::moveTo() - dropped code SelectMgr_AndOrFilter::SetDisabledObjects()
as filtering is now done by selector itself.

ViewAffinity property has been moved to PrsMgr_PresentableObject for simplicity.
Removed redundant map Graphic3d_CView::HiddenObjects().
2022-05-21 17:25:43 +03:00
sshutina
e3fd3d83da 0032861: Visualization - Separate rotate and move the object behavior in AIS_ViewController
Added the flag in Dragging structure that defines perform dragging (ToMove).
2022-04-06 03:16:12 +03:00
gka
e2d60d0f7f 0029325: Modeling Algorithms - add tool BRepLib_PointCloudShape for generation point cloud for specified shape
Added PLY writing tools RWPly_CafWriter and RWPly_PlyWriterContext.

Added tool BRepLib_PointCloudShape generating point cloud from shape in two ways:
- random points on surface with specified density;
- points from triangulation nodes.

StdPrs_ToolTriangulatedShape::ComputeNormals() has been moved to
BRepLib_ToolTriangulatedShape for reusing outside of AIS.

Command vpointcloud has been extended to use new generation tool.
Command writeply has been added to write triangulation or point set into PLY format.
2022-02-08 22:15:24 +03:00
kgv
4f5e934445 0032704: Visualization, Prs3d_Drawer - do not implicitly create aspects within getters
Prs3d_Drawer getters now return NULL instead of implicitly creating "default" aspects.
Added missing initialization of default properties in AIS_InteractiveContext.
AIS_InteractiveContext::setContextToObject() - added missing propagation of Context to child presentations.
2021-12-03 17:56:37 +03:00
kgv
005caf39cf 0032633: Draw Harness - extend command incmesh to apply default visualization parameters
incmesh - added -prs option to use StdPrs_ToolTriangulatedShape::GetDeflection() as meshing parameters.
vdisplay, XDisplay - added -autoTriangulation option to manage meshing behavior before displaying a shape.
trinfo - added output of meshing parameters.
Fixed broken incmesh syntax usage in several test cases.
2021-10-22 19:58:15 +03:00
emv
efac173377 0030151: Modeling Algorithms - Removal of the API level of old Boolean operations algorithm (BRepAlgo_BooleanOperation)
The following classes have been removed as obsolete:
- BRepAlgo_BooleanOperation
- BRepAlgo_Fuse
- BRepAlgo_Cut
- BRepAlgo_Common
- BRepAlgo_Section

The corresponding classes from BRepAlgoAPI package have to be used instead.

Draw commands:
- fuse
- cut
- common
- section/psection
have also been removed as obsolete.

The corresponding commands for modern Boolean operations algorithm (bfuse/bcut/bcommon/bsection) have to be used instead.

Adjustment of the test cases to use the commands for modern algorithm.
2021-09-10 20:24:50 +03:00
ifv
9592ae247b 0027457: Modeling - Raise exception if scaled transformation is used for shape location
Implementation of raising exception while using scale and mirror transformation in shape location
TopLoc/TopLoc_Location.hxx
TopoDS/TopoDS_Shape.hxx

Implementation of new tools for removing forbidden locations from shapes:
BRepTools/BRepTools_PurgeLocations.cxx
BRepTools/BRepTools_PurgeLocations.hxx
BRepTools/BRepTools.cxx
BRepTools/BRepTools.hxx

Draw commands for transforming shapes are corrected, new draw commands: purgeloc, checkloc added
BRepTest/BRepTest_BasicCommands.cxx

Fixing unstable test bug xde bug24759
StepToGeom/StepToGeom.cxx

All other C++ commits are modification of algorithms used mainly in import/export operations in order to allows these operations if shape locations contains scale and mirror transformations.

New test for command purgeloc added
tests/bugs/moddata_3/bug27457
tests/bugs/moddata_3/bug27457_1
tests/bugs/moddata_3/bug27457_2

Some test corrected according to modifications.
2021-08-20 20:18:06 +03:00
nds
4e993e4d0d 0027919: Visualization - support multiple transformation persistence groups within single presentation
Added transform persistence property to Graphic3d_Group and Select3D_SensitiveEntity.
SelectMgr_ViewerSelector, Graphic3d_Layer and OpenGl_Structure have been updated
to process per-group transform persistence within picking, ZFit and rendering.

Added zoomable state to Prs3d_ArrowAspect supported by PrsDim_Dimension.

Added gp_GTrsf::SetMat4(), opposite to gp_GTrsf::GetMat4().
2021-07-23 18:31:51 +03:00
oan
f1c034f905 0032471: Mesh - Deflection of the triangulation is not recomputed for planar face
Method EstimateDeflection has been added to BRepLib in order to check and update value of deflection provided by Poly_Triangulation;
Introduction of Poly_TriangulationParameters intended to keep info about initial parameters of mesh stored by Poly_Triangulation;
BRepMesh stores user-specified parameters to Poly_Triangulation via Poly_TriangulationParameters;
Prefer initial parameters of mesh generator stored in Poly_Triangulation during check of mesh consistency.
2021-07-23 18:15:55 +03:00
mkrylova
a3b2aaefac 0032183: Visualization - implement AIS_LightSource::ProcessDragging() for rotating directional light
- Added sensitive sphere for a light source
- Implemented AIS_LightSource::ProcessDragging() interface for rotating directional light source
- Added possibility to turn on/off directional light source dragging
- Added test
2021-07-23 11:28:42 +03:00
kgv
06d40093b7 0032121: Draw Harness, ViewerTest - implement -reset option for vlight command
vlight command has been revised to provide more friendly syntax.
Command now accepts light index or name as first argument.
Added arguments -enable/-disable for managing enabled state.
Added argument -reset to reset light parameters to default values.

V3d_Viewer::SetDefaultLights() now sets names "headlight" and "ambient" to created lights.
Graphic3d_TypeOfLightSource enumeration values have been renamed to avoid shortcuts.
Draw::Atof(), applied corrections to avoid explicit new/delete calls.
2021-07-12 20:50:25 +03:00
bugmaster
50174691dc 0032404: Draw - problems with definition of cpulimit in tests
- The maximum value of cpulimit in test cases was limited to 1000 seconds (~ 17 minutes)
- cpulimit 1000 has been added to hlr/begin
2021-06-16 17:10:53 +03:00
kgv
1b6b8afcd0 0029303: Data Exchange - add RWObj_CafWriter tool for wavefront OBJ file
Unstable test case v3d/memory/bug26538 has been adjusted.
2021-06-03 18:28:45 +03:00
kgv
14ba0bbad7 0032351: Visualization, PrsDim_LengthDimension - add NULL checks for handling non-Line curves
Added several missing NULL-checks.
Reduced restrictions on building Edge-Edge and Edge-Vertex length dimension.
Added empty constructor for more straightforward initialization from vdimension command.
2021-05-11 19:24:10 +03:00
nds
b06da8f1f1 0032091: Visualization - possibility to redefine Graphic3d_TransformPers 2021-04-22 14:50:53 +03:00
kgv
95bdefb201 0032274: Tests - unstable snapshots from test case v3d/bugs/bug24785
Test case has been adjusted to reproduce scenario it was supposed to check.
2021-04-07 18:38:17 +03:00
kgv
285b5189cd 0032246: Tests, Visualization - unstable test case bugs/vis/bug79 reporting memory leak
Test case has been adjusted to check memory trend after the loop.
2021-03-27 13:46:02 +03:00
kgv
0d828ac838 0032208: Tests - refactor visualization tests to cover several graphic drivers
Removed testgrids 'bugs/vis' and '3rdparty'; tests have been redistributed across other grids.
Moved testgrid 'v3d/ivtk' into dedicated 'vtk/ivtk'.

Added testgrid 'vselect' dedicated to 3D viewer picking/selection functionality
and filled with tests from 'v3d/vertex', 'v3d/face' and similar groups.

Added testgrid 'opengl' dedicated to OpenGL driver low-level functionality (GLSL programs and similar)
and filled with tests from 'v3d/glsl', 'v3d/raytrace', '3rdparty/fonts', 'bugs/vis' (portion) and similar.

Added testgrid 'opengles3' dedicated to OpenGL ES 3.0 driver low-level functionality
and reusing tests from 'opengl' testgrid.
Subgroup 'opengles3/raytrace' is disabled on Windows, as Ray-Tracing currently requires OpenGL ES 3.2.
while ANGLE library implements only OpenGL ES 3.0.

Added testgrid 'opengles2' dedicated to OpenGL ES 2.0 driver low-level functionality
and reusing a limited subset of passing tests from 'opengl' testgrid.
Currently testgrid is activated only on Windows platform when using ANGLE library
(properietary OpenGL ES drivers do not allow creation of restricted 2.0 context).

Test cases have been cleaned out to put bug description into log,
to properly load necessary plugins and to explicitly dump viewer.
2021-03-25 19:14:33 +03:00
kgv
b8ef513c8f 0032206: Visualization, TKOpenGl - move out OpenGL ES support to dedicated library TKOpenGles
Added TKOpenGles and TKOpenGlesTest toolkits built with HAVE_GLES2 macros.
Added CSF_OpenGlesLibs as alternative to CSF_OpenGlLibs.
2021-03-21 19:15:06 +03:00
kgv
b8db9379fe 0032203: Draw Harness, ViewerTest - drop dependency from OpenGL
Added TKOpenGlTest and TKD3DHostTest Draw Harness plugins.
TKOpenGlTest is automatically loaded by ViewerTest::ViewerInit().

Commands vgldebug, vvbo, vcaps and vuserdraw have been moved to TKOpenGlTest.
New command vglshaders lists GLSL programs defined by OpenGl_GraphicDriver,
previously implemented by "vshaderprog -list".

Added new command vdriver for graphic driver selection.
Removed erroneous code from command vstereo.
2021-03-17 19:56:54 +03:00
kgv
61a05a3658 0032198: Visualization, TKOpenGl - per-vertex lighting ignores back/front material colors
Graphic3d_ShaderManager::stdComputeLighting() now multiplies vertex color by material color.
2021-03-17 19:53:13 +03:00
kgv
e70625d6b1 0030640: Visualization, Graphic3d_Camera - add option creating Projection matrix with [0,1] depth range
Added new property Graphic3d_Camera::IsZeroToOneDepth() and OpenGl_Caps::useZeroToOneDepth
for activating [0,1] depth range instead of [-1,1] range using glClipControl() within OpenGL 4.5+.
2021-03-05 17:41:27 +03:00
mkrylova
395d00e058 0032144: Draw Harness - add -silent option to command Close
- Extended command Close with an option -silent
- Extended command Close to handle */-ALL for closing ALL document
- Replaced catch {Close D} by Close D -silent in tests
2021-03-05 17:31:07 +03:00
mkrylova
e3d4b87912 0031779: Visualization, AIS_ViewController - controller should handle selection schemes
Added AIS_ViewController::MouseSelectionSchemes() property defining map of selection schemes for mouse+modifier combinations.
IsXOR flag has been replaced by AIS_SelectionScheme in interfaces.

Rubber-band selection with Shift key pressed now applies XOR selection scheme in in Draw Harness.
Command vselect has been extended to specify selection scheme by name.
2021-03-04 19:43:13 +03:00
kgv
72ed06442e 0032154: Tests - include vglinfo into Tests Summary
Command testgrid now includes vglinfo into summary.
Command vinit has been extended by -virtual option creating an offscreen window.
Command vglinfo now splits long values into multiple lines.
Added test case v3d/glsl/glinfo dumping OpenGL context creation info.

OpenGl_Window - fixed initialization of OpenGL 4.6 Core Profile (was limited to 4.5).
2021-02-25 18:55:29 +03:00
kgv
008210c3e2 0032129: Visualization, TKOpenGl - shadowmap is broken for ZLayer having non-zero origin
OpenGl_LayerList::renderLayer() - fixed usage of wrong camera while rendering shadowmap,
and apply Z-Layer origin shift to shadowmap matrix while applying shadow.
2021-02-14 01:11:37 +03:00
mkrylova
2daa5d95a5 0031704: Visualization - add an interactive object AIS_LightSource representing a light source
Added new class AIS_LightSource representing a light source presentation.

Graphic3d_TMF_CameraPers - added new mode to Graphic3d_TransformPers
defining 3D point relative to camera Eye position
2021-02-11 20:06:14 +03:00
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
kgv
78c4e836b1 0031571: Visualization, TKOpenGl - provide depth peeling OIT option
Graphic3d_RenderTransparentMethod has been extended by Graphic3d_RTM_DEPTH_PEELING_OIT,
which is handled by OpenGl_LayerList::renderTransparent().

OpenGl_FrameBuffer::Init() now does not silently ignore unknown color attachment format and return failure.
OpenGl_FrameBuffer::InitWrapper() - added constructor wrapping existing color textures.

v3d/transparency/oit: test case added
2021-01-20 21:21:59 +03:00
kgv
ff6122e008 0032055: Draw Harness, ViewerTest - add more vmanipulator position adjusting options
Draw::ParseOnOffIterator() - added auxiliary wrapper over Draw::ParseOnOff() for more compact syntax.
strncasecmp() definition for msvc compilers has been moved to Standard_CString for consistency with strcasecmp().
vmanipulator command has been refactored to use more straightforward parser.

vmanipulator now accepts "-adjustPosition {0|center|location|shapeLocation}" options
adjusting position to object's AABB center (existed before), object's local transformation or TopoDS_Shape location.
2021-01-14 19:21:54 +03:00
kgv
d84e866973 0032039: Visualization, TKOpenGl - implement simple shadow mapping for a direct light source
Graphic3d_CLight::ToCastShadows() - added new property defining if light should cast shadows (ignored by Ray-Tracing).

OpenGl_ShaderManager::stdComputeLighting() now implements shadow mapping for directional lights.
OpenGl_ShaderManager::prepareGeomMainSrc() now handles copying of arrays.
OpenGl_Context::ShadowMapTexUnit() - added property defining an offset for shadow map texture units.
OpenGl_ShadowMap - added new class storing shadow map FBO with parameters.
OpenGl_View::prepareFrameBuffers() - added resizing of shadow map FBOs.
OpenGl_View::Redraw() - added section redrawing scene into shadow map FBOs via OpenGl_View::renderShadowMap() method.

vrenderparams - added new parameters -shadowMapResolution and -shadowMapBias.
2021-01-13 17:10:26 +03:00
kgv
ba562b2b7a 0031999: Tests - request Core Profile on macOS for Ray-Tracing tests 2020-12-23 19:45:32 +03:00
mzernova
4552cb8552 0027130: Visualization, Ray tracing - skip structures with transformation persistence flag
Objects with transform persistence are detected as non ray-tracable and redered using the rasterization approach.
The renderFiltered() method moved to the OpenGl_Group class.

v3d/raytrace/bug27130: test case added
2020-11-21 12:19:50 +03:00
mzernova
e2409d34b5 0031793: Draw Harness, vmanipulator - disable sorting picking result workaround
AIS_InteractiveContext::SetPickClosest() has been removed from vmanipulator command,
and test cases using the manipulator have been updated.
2020-09-29 18:11:03 +03:00
mzernova
113bda7072 0031773: Visualization - add Prs3d_ToolTorus
Added Prs3d_ToolTorus tool to create a torus

Added DRAW commands:
- vtorus
- vcylinder
- vsphere

Added test cases:
- v3d/quadric/torus
- v3d/quadric/cylinder
- v3d/quadric/sphere
2020-09-21 12:36:27 +03:00
age
6a2fb7a1d1 0031757: Visualization - Prebuild BVH for Select3D_SensitiveEntity in separate threads
- Added a new mode in SelectMgr_ViewerSelector for computing BVH for Select3D_SensitiveEntity in background which can be activated via method SelectMgr_ViewerSelector::SetToPrebuildBVH(). Default behavior has not been changed.
- New class SelectMgr_BVHThreadPool manages background processing of BVH building queue.
- Added Select3D_SensitiveEntity::ToBuildBVH() method that checks if BVH (if it used) is in invalidated state. Defined this method for all standard classes inherited from Select3D_SensitiveEntity.
2020-09-18 17:46:57 +03:00
kgv
12e6d49993 0031713: Draw Harness, IVtkDraw - add commands ivtksetcolor, ivtkaxo, ivtkclose, ivtksettransparency
Added missing NULL checks before accessing GetInteractor().
Errors are now reported using Message::SendFail().
Not found actor names are now reported as syntax error instead of silently skipping them.

ivtkinit now accepts aguments -srgb and -msaa for overriding defaults.
Default MSAA settings have been changed from 8 to 0 to match vinit behavior.
Added command ivtkclose closing a Vtk view.

Added commands ivtkaxo, ivtkfront, ivtkback, ivtkleft, ivtkright,
ivtktop and ivtkbottom assigning view projection similar to sonamed commands in ViewerTest.

Added commands ivtksetcolor and ivtksettransparency assigning
color properties to shaded presentation.
2020-08-14 13:30:05 +03:00
kgv
e0b2443737 0031698: Visualization, Graphic3d_Aspects - provide stipple line factor parameter
Added Graphic3d_Aspects::LineStippleFactor() property.
Adjusted help for vaspects command suggesting a shorter syntax.
2020-08-07 15:17:53 +03:00
kgv
9f013fee98 0031682: Visualization - Prs3d_ShadingAspect::SetTransparency() has no effect with Graphic3d_TOSM_UNLIT shading model
Prs3d_ShadingAspect::SetTransparency() now sets transparency also to interior color.
AIS_RubberBand now uses Graphic3d_TOSM_UNLIT.
2020-07-23 16:14:57 +03:00
kgv
dbc8becff4 0031673: Draw Harness, ViewerTest - command vlocation applies transformation in opposite order
gp_Trsf::SetRotationPart() - added method replacing rotation matrix without reseting other components,
similar to existing SetTraslationPart() and SetScaleFactor().

Transformation multiplication order has been fixed
for vlocation arguments -rotate, -translate, -mirror and -scale.
Added -prerotate, -pretranslate, -premirror and -prescale options following previous behavior.

vlocation -setRotation now uses new method gp_Trsf::SetRotationPart()
for consistency with methods -setLocation and -setScale.
2020-07-23 16:08:17 +03:00
mzernova
832a6f4412 0031279: Visualization, TKOpenGl - environment background is misplaced within Ray-Tracing
Fixed problem with misplacing background texture in Ray-Tracing.

An environment background is always drawn using a perspective matrix.
2020-06-26 15:07:40 +03:00
mzernova
2ff1d580f1 0031412: Visualization - entity behind is returned as topmost at the edges
SelectMgr_RectangularFrustum now handles degenerated triangle as a segment or a point.
Triangle orthogonal to view direction is now handled as a segment.
myViewRayDir field is now defined as normalized vector to avoid confusing math.

For the case when the segment and myViewRayDir are almost parallel,
the segmentSegmentDistance function may set the depth to zero, although this will not
be the correct value, therefore it is better to pass a segment that will not
be parallel to myViewRayDir as an argument to the function.

vpoint command has been extended by arguments -2d and -nosel
for displaying picking mouse position as on-screen point in pixels.
Fixed double-binding-map error in case of displaying point with already used name.

bugs/vis/bug31412: test case added.
2020-06-25 19:09:04 +03:00