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

98 Commits

Author SHA1 Message Date
kgv
0e93d9e5b8 0024430: vviewlist draw command does not added name of viewer created by XShow draw command
Remove ViewerTest_Tool, keep only one unified way to create viewer using ViewerTest - ViewerTest::ViewerInit().
Remove test case bugs/vis/buc60851 and command BUC60851.
Added test case bugs/xde/bug24430
2014-05-22 17:27:27 +04:00
abv
857ffd5e57 0024814: Avoid using explicit names of Handle classes
Sources corrected replacing Handle_XXX by Handle(XXX)
2014-04-22 18:36:12 +04:00
kgv
871fa1038d 0024406: Visualization - crash on re-usage of the same primitive array
Redesign Graphic3d_ArrayOfPrimitives
Store vertices data in buffer objects managed using smart-pointers
- no more low-level memory corruption by memory releasing after VBO creation.
Remove broken hasEdgeInfos.

Interleave vertex attributes (position, color, normal, uv) in single buffer.
Remove from Graphic3d_ArrayOfPrimitives methods ::Orientate().
Remove structures Graphic3d_PrimitiveArray, CALL_DEF_PARRAY.
Add support for 2D vertex arrays.

Graphic3d_Group - remove array or primitive arrays.
Introduce more universal method Graphic3d_Group::AddPrimitiveArray().

Fix warning
2014-04-17 18:01:51 +04:00
abv
d5f74e42d6 0024624: Lost word in license statement in source files
License statement text corrected; compiler warnings caused by Bison 2.41 disabled for MSVC; a few other compiler warnings on 54-bit Windows eliminated by appropriate type cast
Wrong license statements corrected in several files.
Copyright and license statements added in XSD and GLSL files.
Copyright year updated in some files.
Obsolete documentation files removed from DrawResources.
2014-02-20 16:15:17 +04:00
apl
f38896916f 0024569: AIS_InteractiveContext::Update(...) does not updates selection when changing AIS_Plane
1) Allow AIS_InteractiveContext::Update to check, re-project and recompute selection structures even if presentations are not "to be updated".
2) Test case bugs vis bug24569.

Small correction of test case for issue CR24569
2014-01-30 13:04:26 +04:00
Denis Barbier
96a95605cd 0024510: Remove unused local variables
When warnings are enabled, compilers report lots of occurrences
of unused local variables, which makes it harder to find other
meaningful warnings.
This commit does not fix all unused local variables.

Fix new type conversion warning

Code cleaned to avoid MSVC compiler warnings on unused function arguments.
Several useless pieces of code are removed.
Changes in IntTools_EdgeFace.cxx, Blend_Walking_1.gxx, Bnd_BoundSortBox.cxx, ProjLib_ProjectedCurve.cxx are reverted (separated to specific issue for more in-depth analysis).
2014-01-09 12:21:51 +04:00
bugmster
973c2be1e1 0024428: Implementation of LGPL license
The copying permission statements at the beginning of source files updated to refer to LGPL.
Copyright dates extended till 2014 in advance.
2013-12-17 12:42:41 +04:00
dbv
9e8804b6db 0024420: Add methods to switch the type of sensitivity in AIS_Circle and AIS_Plane
Added methods to AIS_Circle and AIS_Plane for switching type of sensitivity
By default AIS_Circle and AIS_Plane have boundary sensitivity
2013-12-06 13:10:44 +04:00
apl
9f37b47ddd 0024396: "vselmode" - disable auto loading of objects into Local Context
Corrected DRAWEXE "vselmode" command.
Added test case.

corrected test cases

- 24293 failed due to initialization view without "name".
- 24374 adjusted, the test case was initially incorrect.

Modified test cases bugs/vis/bug24293 and bugs/vis/bug24374
2013-11-28 11:33:47 +04:00
kgv
725ef85e1e 0024386: Provide high-level API to specify font by user-defined path for AIS (Prs3d) aspects
Add new command vfont to access font manager.
2013-11-21 17:19:33 +04:00
aba
a6eb515f9d 0024133: Development of improvement of dimensions implementation; new length, radius,diameter and angle dimensions.
Some corrections; test cases were added; coding standards in MFC samples & presentations
Request stencil buffer for Linux.
correct test cases; correct compilation errors
compilation warnings (gcc/Linux)
2013-10-31 18:02:17 +04:00
isn
b514beda8a 0024181: Text to BRep functionality
Introduce new class Font_BRepFont for conversion of font glyph in vector format into BRep representation.
New text2brep Draw Harness command.

bottle.tcl - draw text on the bottle side using new functionality.
ViewerTest - process Delete key in 3D-Viewer to delete selected presentations.
Font_FontMgr::FindFont - return correct font when font alias and not default aspect is requested.

bottle.tcl - use prism instead of pipe

TKViewerTest - add required FreeType dependency

verase - display the list of erase objects

TKViewerTest - add required FreeType dependency for projects generation
2013-10-10 14:12:29 +04:00
dbv
eb4320f2d9 0023654: Problem with displaying vertices in OCC view after closing all OCC views and opening new one
Fixed graphic structure recompute after closing view.
Removed collector and all corresponding logic and methods from AIS_InteractiveContext.
Method AIS_InteractiveContext::Erase() now hide object from viewer without deleting resources.
Erased objects now properly recomputed after closing view.
Samples update
Removed useless method AIS_InteractiveContext::EraseMode()
Documentation update
Warnings fix
Regressions fix
2013-10-03 14:12:16 +04:00
apl
4269bd1b11 0024070: OpenGL capped object-level clipping planes
Graphical clipping:
- Use "Graphic3d_ClipPlane" to defined clipping for PrsMgr_PresentableObject (local clipping), for V3d_View (global clipping).

Get rid of old implementations:
- Remove Visual3d_ClipPlane.
- Port V3d_Plane to Graphic3d_ClipPlane core.

Selection Sensitives:
- Port "Matches" method to add full set of arguments (SelectBasics_PickArgs), including min-max depth coming from selector.
- Get rid of transient data for pair Matches -> ComputeDepth.
- Extend SelectMgr_ViewerSelector::LoadResult to work with local clipping, add virtual callbacks to compute globa/local depth clipping for picking.

Capping rendering algorithm:
- Recursive rendering algorithm for OpenGl_Groups.
- Introduced Rendering filter for groups.

Clipping plane management in TKOpenGl:
- Added OpenGl_ClippingState to OpenGl_Context.

DRAWEXE commands:
- Ported "vclipplane" command for new approach.
- Added "vsettexturemode" command for changing texture details in views (enable / disable textures).

Correct DownCast syntax (compilation error)

Fix new compiler warnings

tests/bugs/vis/bug22906 migrated to the new vclipplane syntax
2013-09-20 12:09:54 +04:00
abv
498ce76bde 0024129: Eliminate remaining compiler warnings in MSVC++ 2008 32 bit with warning level 4
List of resolved warnings:

c4063: Aspect.cdl; TObj_Application.cxx; PCDM.cdl; OpenGl_Workspace_5.cxx;
c4100: XDEDRAW.cxx; ViewerTest_ViewerCommands.cxx; TopOpeBRep_FacesFiller_1.cxx; TopClass_Classifier3d.gxx; TDataStd_ReferenceArray.cxx; QABugs_19.cxx; IntPatch_ImpImpIntersection_5.gxx; HLRTopoBRep_DSFiller.cxx; HLRBRep_Data.lxx; DPrsStd_AISPresentationCommands.cxx; BRepMesh_Delaun.cxx;
c4127: BOPTools_AlgoTools2D.cxx; MAT_Mat.gxx; GeomFill_SweepSectionGenerator.cxx; BRepMesh_Delaun.cxx;
c4189: IntCurveSurface_Inter.gxx; IGESToBRep_BRepEntity.cxx; BRepMesh_Delaun.cxx; BRepAlgo_Loop.cxx; IntStart_SearchOnBoundaries_1.gxx;
c4190: Plugin_Macro.hxx;
c4389: Visual3d_View.cxx; TopOpeBRep/TopOpeBRep_vpr.cxx; TDataStd_BooleanArray.cxx; IntPatch_ALine.cxx;
c4701: BRepAlgo.cxx;
c4702: MNaming_NamingRetrievalDriver_1.cxx; MNaming_NamingRetrievalDriver_2.cxx; BRepClass3d_SolidExplorer.cxx;
c4706: TestTopOpe_BOOP.cxx;

Additional fixes:
- old-style declarations of C functions in IGES and STEP parsers
- clean-up of debug code, fixes for building in Debug mode
- in BRepFill_TrimShellCorner.cxx, lines 878-9, wrong use of assignment instead of comparison fixed
- fix for Plugin_Macro reverted; warning 4190 disabled instead
- in IntPatch_ALine.cxx, line 520, wrong comparison of boolean with index fixed
- in InterfaceGraphic_Visual3d.hxx, field IsCustomMatrix made boolean
- in TopOpeBRepBuild_ShapeSet, obsolete (unused) methods removed
2013-09-18 09:13:31 +04:00
kgv
a577aaabf9 0024131: TKOpenGL redesign GPU memory management for markers presentation
Introduce Point Sprites usage.
Graphic3d_Group - drop Marker(),MarkerSet() methods - markers should be drawn using AddPrimitiveArray.
Added new Draw Harness commands vcaps, vmarkerstest.
2013-09-05 13:23:03 +04:00
kgv
58655684c0 0024123: Create debug OpenGL context when requested (GL_ARB_debug_output)
Introduce new OpenGl_Caps class for unified graphic driver options access.
New command vgldebug to request debug OpenGL context.
OpenGl_Window  - create debug OpenGL context when requested (WGL-only).
OpenGl_Context - destroy arbTBO, arbIns members.
Workaround namespace collisions with Xlib macros
Eliminate new warning (unused argument in OpenGl_Context::debugCallbackWrap)
2013-08-29 15:46:40 +04:00
omy
1d47d8d066 0024059: Eliminate compiler warning C4701 in MSVC++ with warning level 4
Removing pPotentially uninitialized local variable
Got rid of most of warnings C4701: Potentially uninitialized local variable
Removed redundant variable definitions.
Refactored a part of AppParCurves_ResolConstraint CTOR.
Replaced 0. to Precision::Confusion for tolerance vars;
Changed values for min and max parameter vars;
Got rid of redundant variables' initialization.
2013-08-22 12:08:59 +04:00
omy
35e08fe886 0024057: Eliminate compiler warning C4100 in MSVC++ with warning level 4
Got rid of warning C4100: 'identifier' : unreferenced formal parameter
Got rid of compile errors
2013-07-18 13:09:32 +04:00
aba
446e9c14e5 0023721: Missing usage hints for vselmode command
vselmode help string was modified.
Changed error case message.
2013-02-22 14:16:58 +04:00
dbv
dc3fe572ec 0023712: Remove dependency on Aspect_GraphicDevice from Aspect_Window 2013-02-18 16:40:54 +04:00
abv
91322f44fd 0022898: IGES import fails in german environment
Added DRAW command dlocale to set and query current locale of the C subsystem
Equivalents of C functions working with conversions of strings to/from reals added in Standard_CString, providing locale-independent behavior (using always "C" locale)
In DRAW packages, calls to atof() and atoi() are replaced by direct calls to Draw::Atof() and Draw::Atoi(), respectively, instead of substituting by #define
Use of atof(), strtod(), and *scanf() involving floating point conversions in OCCT code replaced by locale-independent Atof() and Strtod()
Calls to sprintf() involving floating point in OCCT code are replaced by call to locale-independent Sprintf(), except a few places where converted strings are used immediately for display in the 3d viewer
Changes of global locale are eliminated throughout OCCT code
Proposed correction for GNU libC where v*printf_l functions are absent
Added test case (bugs xde bug22898) for data exchange operations with non-standard locale
Use xlocale on Mac OS X and within glibc
Corrected strtod_l wrapper
Generate error rather than warning
Introduce Standard_CLocaleSentry replacement for removed OSD_Localizer
Standard_CLocaleSentry - copy locale string
Standard_CLocaleSentry - use _configthreadlocale on Windows
Standard_CLocaleSentry::GetCLocale() - return locale_t rather than void*
Corrected misprint in ~Standard_CLocaleSentry()
Use French locale in bug22898 test case
Mark test case as skipped if locale is unavailable on tested system.
Use fr_FR locale for tests on Mac OS X
2013-02-01 18:41:16 +04:00
abv
1d0a9d4d46 0023664: Eliminate linker warnings on import of local symbol
Standard_IMPORT removed or replaced by 'export' where it applies to a symbol defined in the same toolkit
2013-02-01 15:42:05 +04:00
aba
128cc8df34 0023663: Removing 2D viewer library
Deleted TKV2d toolkit and CGM, MFT,FontMFT, PlotMgt, PS packages. Deleted 2d test cases.
Deleted WNT_WDriver and Xw_Driver, edited Aspect_Driver.
Deleted trailing spaces, removed WNT_FontMapEntry, WNT_FontTable, WNT_HFontTable
Deleting tests for 2D viewer
2013-01-25 18:11:16 +04:00
kgv
b8ddfc2f5d 0023634: Eliminate Polyline and Polygon usage in drawers
Polylines and polygons removed, now everything is based on PrimitiveArrays.
Added use of Graphic3d_ArrayOfSegments, some additional clean up in Graphic3d_Group.
Dead code elimination in AIS and V3d
Corrected compilation errors
Fixed grid presentation
Adding test case correction
2013-01-18 13:36:18 +04:00
dbv
aff395a36d 0023415: OSD_FontMgr can't idenify aspect for fonts with names dependant on system locale.
Added function DetectFontsAspects to Font_FontMgr class. This function uses workaround from OpenGl_FontMgr with FreeType for detecting font aspect.
Removed font name parsing from Font_FontMgr::InitFontDataBase(). Now the font name and font style we get through the FreeType.
Fixed Unix part of Font_FontMgr::InitFontDataBase() method. Font name and font style now detected through the FreeType.
Remarks fix. Added recursive default font directories scanning .
Fixed adding fonts folders recursively from configuration files.
Moved fonts aliases map from OpenGl_Display_1 to Font_FontMgr.
Moved fonts name definition from Graphic3d_NameOfFont.hxx to Font_NameOfFont.hxx.
Added new methods to Font_FontMgr: GetAvailableFontsNames, GetFont and FindFont.
Modified Font_SystemFont creation from XLFD. Added method IsEqual to Font_SystemFont.
Modified methods OpenGl_Display::FindFont, OpenGl_FontMgr::request_font in accordance to the new functionality of the Font_FontMgr.
OpenGl_FontMgr now stores only generated fonts instead of duplication of available fonts list.
Removed method OpenGl_FontMgr::requestFontList. Its function now performs Font_FontMgr::GetAvailableFontsNames.
Documentation was fixed
Adjusting testing cases for current state of OCCT
2012-12-07 13:42:37 +04:00
aba
dc9b6d23b6 0022522: Small BUG in DRAWEXE - vtrihedron command
Add condition to check if shape name is already bound
Used VDisplayAISObject() to display an object
vtrihedron - fixed parsing of arguments with Z direction definition
2012-11-15 14:35:21 +04:00
kgv
792c785cfb 0023432: Connected Interactive Objects computed without Interactive Context
Setup interactive context for reference(s) in Compute() method of classes AIS_ConnectedInteractive and AIS_MultipleConnectedInteractive
Extend vconnectsh and vconnect to process several input objects, added displaying color for result object
Fixed errors in QAGetPixelColor DRAW command
Edit QAGetPixelColor command and test case
ViewerTest::GetColorFromName() - fixed iteration bounds
QAAISGetPixelColor() - removed redundant conversions
Turn back QAGetPixelColor output syntax in case of 3 arguments
Integration of test script to new test system
2012-11-15 13:27:18 +04:00
dbv
eeaaaefb6f 0023466: Move OSD_FontMgr class outside TKernel
Created new package Font in TKService.
Classes FontMgr and SystemFont have been moved from OSD package to Font package.
2012-10-12 15:15:32 +04:00
apl
a2d5ab2e7f 0023407: Draw face outlines for XDE objects
FaceOutline aspect and flag added to AIS_Drawer, Prs3d_Drawer.cdl
FaceOutlines computed by StdPrs_ShadedShape and build upon the edge triangulation.
"vshowoutlines" draw command for testing outlines on AIS_Shapes,
"XShowOutlines" draw command for testing outlines on XCAF objects.
remarks corrected:
- FaceOutline renamed to FaceBoundary
- Graphic3d_ArrayOfSegments with edges used instead of Graphic3d_ArrayOfPolylines with bounds.
draw boundaries in separate Graphic3d_Group.
Adding test cases bugs/vis/CR23407_1 CR23407_2
2012-09-14 14:37:57 +04:00
kgv
5e27df788d 0023226: Extend OpenGl_Context to store map of shared GPU resources
OpenGl_Resource was slightly corrected and OpenGl_Element was extended
with Release method to manage GPU resources.

OpenGl_PrimitiveArray now uses new OpenGl_VertexBuffer class (requires OpenGL 1.5+).
Strange workarounds for feedback mode were removed.

OpenGl_Context now provides access to shared GPU resources
and manages resources queue for delayed release
(replaces functionality of removed OpenGl_ResourceCleaner).
Loaded GL_ARB_texture_buffer_object and GL_ARB_draw_instanced extensions.

Global maps of views, workspaces and structures
were moved to OpenGl_GraphicDriver members.
UserDrawCallback() function moved to OpenGl_GraphicDriver methods.

Aspect_GraphicCallbackStruct now holds handle of OpenGl_Context
instead of system-dependent pointers to GL context definition.

New classes NCollection_Vec2, NCollection_Vec3 and NCollection_Vec4
implements interface to low-level data (points, vertices, colors) in GLSL-style.
Removed EnableVBO argument from vdrawparray Draw Harness command
Corrected compilation errors
Fixed wrong argument in Index VBO initialization
Fixed several cases of incorrect memory management in TKV3d

Visual3d_ViewManager::Remove()
Destroy structures before last view removed for correct GPU resources management.

Graphic3d_Structure::GraphicClear()
Remove groups to avoid usage of dead OpenGl_Group pointers.

V3d_View::Remove()
Fixed mistake in #0000280 patch.
Small correction
Fixed OCC280 test command

Replace removed view within created one in ViewerTest EventManager.
ViewerTest, do not create unused 3D view

In current design NIS_View always created and used for both - NIS objects and AIS objects.
2012-07-13 15:51:16 +04:00
dbv
60be1f9b1d 0023072: Eliminate compiler warnings (level 3) on Windows / MSVC++ 2012-07-06 15:52:20 +04:00
san
3ddebf9123 0023115: Polygon offset doesn't applied in Viewer3D sample
- AIS_InteractiveObject::SetPolygonOffsets() patched to update all object's groups that has AspectFillArea3d set.
- vpolygonoffset DRAW command added.
2012-04-19 18:16:32 +04:00
kgv
208e6839be 0023065: This is desirable to add general DRAW command to estimate visualization performance
Added vfps command to estimate average frame rate of 3D Viewer
Simplified vdrawsphere command

Removed turnVbo and performance measurements from vdrawsphere.
Added vvbo command to control VBO usage flag.
2012-04-06 12:33:47 +04:00
bugmaster
b311480ed5 0023024: Update headers of OCCT files
Added appropriate copyright and license information in source files
2012-03-21 19:43:04 +04:00
kgv
f3f0842337 0022796: Possibility to display multi-line text in 3D
Changes:

Text rendering in OCCT 3D view can now display multi-line text correctly. In addition to '\n' and '\r' characters, '\t' is also treated specially, i.e. replaced by a fixed number of spaces. Other control characters (like '\b' or '\a') are simply ignored by text rendering code.

Also standard GL2PS's alignment isn't used because it's doesn't works correctly for all formats, therefore alignment is calculated manually now.
2012-03-20 18:34:29 +04:00
kgv
59f45b7cef 0022795: Make possible to display some presentable objects in overlay of others, groupped by display priority 2012-03-06 15:18:23 +04:00
AAA
ceae62f08e 0022554: Application hangs on selection 2012-03-05 19:33:08 +04:00
SAN, AAA
ac04d1012c 0012121: Optimization of existing selection classes 2012-03-05 19:31:55 +04:00
DBV
c6541a0c86 0022792: Globally defined symbol PI conflicts with VTK definition (Intel compiler) 2012-03-05 19:31:33 +04:00
AAA
329843e245 0022018: Select3D_SensitiveCircle::Matches(): DMin parameter left uninitialized 2012-03-05 19:31:07 +04:00
APL
29d43f9cba 0022368: AIS_Trihedron's highlight presentation isn't updated on trihedron relocation 2012-03-05 19:30:48 +04:00
APL
9558a87653 0022583: Graphic3d_ArrayOfPolygons is not displayed if it has both the bounds and edges 2012-03-05 19:30:16 +04:00
bugmaster
3fc5780152 0007691: Wrong hidden lines computed by HLRBRep_PolyAlgo and HLRBRep_PolyHLRToShape in OCC 5.1 Developed : IFV, VSV and APL 2012-03-05 19:30:07 +04:00
SZV
13a224570c 0022149: Strings with Japanese characters can not be displayed in 3D viewer 2012-03-05 19:29:52 +04:00
bugmaster
4952a30a49 OCC22357 Hidden face selection 2012-03-05 19:28:20 +04:00
KGV
161c447667 OCC22199 OpenGL memory leaks in TKOpenGl 2012-03-05 19:27:50 +04:00
bugmaster
7fd59977df Integration of OCCT 6.5.0 from SVN 2012-03-05 19:23:40 +04:00