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

42 Commits

Author SHA1 Message Date
kgv
decbff0dfd 0032161: Coding Rules - deprecate obsolete alias PrsMgr_PresentationManager3d 2021-02-26 10:56:31 +03:00
kgv
d6c489212b 0028990: Coding Rules - deprecate redundant class Prs3d_Root
Prs3d_Root usage has been replaced by direct calls to Prs3d_Presentation methods.
2020-08-30 19:04:53 +03:00
kgv
a87b1b3738 0031501: Foundation Classes, Message_Printer - remove theToPutEndl argument -- use shortcuts
Message::DefaultMessenger()->Send() have been replaced by shortcuts Message::Send().
2020-05-09 17:22:15 +03:00
kgv
7f24b768c3 0031458: Visualization - refine classes across Prs3d and StdPrs packages
Prs3d::GetDeflection() has been moved to StdPrs_ToolTriangulatedShape::GetDeflection().
Prs3d_ShapeTool has been moved to StdPrs_ShapeTool.
Code collecting free edges on Poly_Triangulation
has been moved out from StdPrs_WFShape to Prs3d::AddFreeEdges().
StdPrs_BndBox has been moved to Prs3d_BndBox.
Geom_Transformation has been replaced by TopLoc_Datum3D within visualization classes.

Select3D_SensitiveCircle constructor now takes gp_Circ instead of Geom_Circle.
StdSelect_ViewerSelector3d has been moved to SelectMgr_ViewerSelector3d.
Methods ::GetPoint3d() and ::ArrayBounds() has been moved
from subclass Select3D_SensitiveCircle to the base class Select3D_SensitiveCurve.
StdSelect_ViewerSelector3d::computeSensitivePrs() has been moved to SelectMgr::ComputeSensitivePrs().

Removed unused declarations StdSelect_Prs, StdSelect_DisplayMode,
StdSelect_SensitivityMode, StdSelect_TypeOfResult, SelectMgr_SOPtr, TColQuantity.

Package Graphic3d has been moved from TKV3d to TKService.
2020-03-27 17:58:02 +03:00
kgv
7dd7c146e8 0030675: Visualization - remove redundant proxy classes in hierarchy of PrsMgr_Presentation
Removed redundant proxy class Prs3d_Presentation - Graphic3d_Structure now should be used directly.
Removed auxiliary class PrsMgr_ModedPresentation holding Structure and Display Mode index (field has been moved to Structure itself),
so that PrsMgr_Presentations (AIS_InteractiveObject::Presentations()) now holds Structures directly.
PrsMgr_Prs proxy class has been removed, and PrsMgr_Presentation now inherits Graphic3d_Structure.

Graphic3d_Structure, maps declarations have been corrected to use class instead of void*, which allowed to avoid redundant casts.
Several methods have been also modified to avoid creating Handle from this pointer.
AIS package headers have been cleaned up from forward declaration of Prs3d_Presentation class.

Fixed dereference of destroyed presentations within connected and HLR computed objects:
- AIS_InteractiveContext::Disconnect() now erases connected presentation.
- Graphic3d_CView::Clear() now removes destructed structures from Computed list.

- fix inaccessibility of PrsMgr_Presentation methods
2019-05-06 15:57:56 +03:00
kgv
a738b534ca 0030611: Coding Rules - eliminate GCC compiler warnings -Wcatch-value
Add missing const& to catch statements.
2019-03-31 23:39:50 +03:00
kgv
bf5f0ca20a 0029570: Visualization, Graphic3d_Aspect - merge Graphic3d_Group aspects
Graphic3d_AspectFillArea3d, Graphic3d_AspectLine3d, Graphic3d_AspectMarker3d
and Graphic3d_AspectText3d have been merged into new class Graphic3d_Aspects.
The old classes are preserved as dummy sub-classes of Graphic3d_Aspects
preserving different per-aspect defaults.

Methods IsGroupPrimitivesAspectSet(), GroupPrimitivesAspect(), FillAreaAspect(),
LineAspect() and MarkerAspect() have been removed from Graphic3d_Group.
Instead, a new method Graphic3d_Group::ReplaceAspects() has been introduced
for replacing existing group aspects.

AIS_Shape now uses new method AIS_InteractiveObject::replaceAspects()
for updating computed groups with new aspects without presentation recomputation
in places where SynchronizeAspects() is not applicable.

OpenGl_AspectFace, OpenGl_AspectLine, OpenGl_AspectMarker
and OpenGl_AspectText have been merged into new class OpenGl_Aspects.

ViewerTest::parseColor() - fix uninitialized alpha component.
Graphic3d_AspectText3d/Prs3d_TextAspect - removed unused properties Space, ExpansionFactor, Angle.
Remove getters Values() deprecated since OCCT 7.1.0.
2019-03-07 18:08:36 +03:00
kgv
a6dee93dfa 0028811: Visualization - merge texturing support into AIS_Shape class and get rid of AIS_TexturedShape
AIS_Shape and AIS_ColoredShape now computes Shaded presentation
with UV coordinates if texture mapping is enabled in Drawer.

OpenGl_Context::SetTextureMatrix() - fixed inconsistent handling
of texture cooridnates translation vector.

vtexture command has been extended to handle new arguments:
* -trsfTrans, -trsfScale, -trsfAngle defining transformation matrix
* -setFilter, -setAnisoFilter to setup texture filtering
2017-07-21 12:10:37 +03:00
kgv
ede89abcb9 0027916: Visualization - access violation occurs within AIS_ColoredShape::Compute() for NULL shape
AIS_ColoredShape::Compute() - add NULL shape check.
AIS presentations - removed redundant clearance within ::Compute()
which is always done in advance within PrsMgr_PresentationManager::Update().
2016-10-06 12:16:28 +03:00
san
6887652ac6 0027717: Visualization - drop broken Prs3d_Drawer::ShadingAspectGlobal() flag 2016-08-04 11:41:28 +03:00
kgv
b647266461 0027670: Visualization - avoid duplication of structures defining primitive array presentation aspects
Quantity_ColorRGBA has been introduced as convenient structure holding Vec4 for OpenGL.
Graphic3d_PolygonOffset has been added as replacement for TEL_POFFSET_PARAM.

Duplicating definition of Hatch Styles TEL_HS_*** has been removed;
Aspect_HatchStyle enum now follows values of TEL_HS_*** for compatibility.
TelCullMode enum has been removed.

Aspect_AspectLine has been merged into Graphic3d_AspectLine3d.
Aspect_AspectMarker has been merged into Graphic3d_AspectMarker3d.
Aspect_AspectFillArea has been merged into Graphic3d_AspectFillArea3d.
Graphic3d_CAspectFillArea have been removed.

OpenGl_AspectLine now stores Graphic3d_AspectLine3d as class field.
OpenGl_AspectMarker now stores Graphic3d_AspectMarker3d as class field.
OpenGl_AspectText now stores Graphic3d_AspectText3d as class field.
OpenGl_AspectFace now stores Graphic3d_AspectFillArea3d as class field.

Graphic3d_AspectFillArea3d - back face culling is now enabled by default.
TKOpenGl now relies on Graphic3d_Group::IsClosed() flag to disable face culling.
StdPrs_ShadedShape now does not modify aspect for different culling modes.

Headers InterfaceGraphic_Graphic3d.hxx, InterfaceGraphic_telem.hxx, InterfaceGraphic_tgl_all.hxx
defining obsolete structures CALL_DEF_COLOR, CALL_DEF_POINT,
CALL_DEF_MATERIAL, CALL_DEF_TRANSFORM_PERSISTENCE, TEL_POINT, TEL_COLOUR
have been removed.

Useless and broken test case bugs/vis/buc60821 has been removed.

OpenGl_Workspace::myAspectFaceApplied and myAspectMarkerApplied have been replaced
from OpenGl_AspectFace*/OpenGl_AspectMarker*
to Handle(Graphic3d_AspectFillArea3d)/Handle(Graphic3d_AspectMarker3d).
This eliminates reading from freed memory
(e.g. when OpenGl_AspectFace is allocated on stack like in OpenGl_Trihedron).

OpenGl_PrimitiveArray::drawEdges() - fix drawing non-indexed array from VBO (access violation due to NULL handle).

AIS_Dimension::DrawArrow() - added missing initialization of 3D arrow aspect.
AIS_Manipulator::Compute() now creates dedicated Face Aspect for each axis.
V3d_CircularGrid, V3d_RectangularGrid now create dedicated line aspects with different color.
AIS_InteractiveObject::SetMaterial() - do not modify global ShadingAspect.
2016-07-14 13:24:40 +03:00
kgv
2831708b17 0026885: Visualization - drop redundant aspects from structure level
Graphic3d_CStructure and OpenGl_Structure do not store structure aspects anymore.
Graphic3d_Structure, Prs3d_Presentation - structure aspect methods have been removed.

AIS_InteractiveObject::SetAspect() - globalChange argument has been removed.

Undocumented test methods V3d::DrawSphere(), ::SetPlane(), ::PickGrid() have been removed.
2016-06-23 18:14:58 +03:00
kgv
83b0f13a58 0027555: Visualization, AIS_Shape - own deviation coefficient change is not considered by Wireframe presentation mode 2016-06-09 12:18:49 +03:00
abv
92efcf78a6 0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- automatic
Automatic restore of IMPLEMENT_STANDARD_RTTIEXT macro (upgrade -rtti)
2015-12-04 14:15:06 +03:00
vpa
5ad8c033aa 0025300: Visualization - Build wireframe representation consistent with the shape's triangulation
1) Remove duplicating presentation algorithms for shapes StdPrs_WFShape, StdPrs_WFDeflectionShape.
2) Rewrite Prs3d_WFShape to use deflection for non-triangulated shapes and rename it to StdPrs_WFShape.
3) Revise and correct references in code.
4) Rename StdPrs_ToolShadedShape to StdPrs_ToolTriangulatedShape (reused in StdPrs_WFShape, StdPrs_ShadedShape).
5) Add StdPrs_BndBox for drawing bounding box presentation.
6) Implemented on-triangulation isoline builder.
7) Add option -isoontriangulation to vaspects command to enable on-triangulation isoline builder for shape.
8) Drawer's maximum UV parameter value is taken into account in isolines calculation correctly.
9) Add option -setMaxParamValue to vaspects command to change drawer's maximum UV parameter value.
2015-08-20 16:45:54 +03:00
abv
ec357c5cbb 0024947: Redesign OCCT legacy type system -- automatic
Automatic upgrade with command "occt_upgdare . -rtti"
2015-07-11 11:06:11 +03:00
kgv
124ee9c962 0026027: Visualization, AIS_TexturedShape - back face culling option should not be overridden by texturing aspect 2015-04-16 10:27:16 +03:00
osa
4c5133866b 0023200: Visualization - prevent multiple triangulating of a shape that already has been triangulated
Add new flag IsAutoTriangulated to Prs3d_Drawer. It is True by default.
If this flag is True automatic re-triangulation with deflection-check logic will be applied.
Else this feature will be disable and triangulation is expected to be computed by application itself.

Change the syntax of vdefalts command.
Add new parameter -autoTriang for check of AutoTriangulated functionality.

Adjust camera position in test case bugs/xde/bug23969
2015-03-05 14:49:32 +03:00
osa
6262338c4b 0025773: Visualization - remove AIS_Drawer class and transfer its Link() logic to Prs3d_Drawer 2015-03-05 13:25:18 +03:00
abv
0797d9d30a 0025418: Debug output to be limited to OCC development environment
Macros ending on "DEB" are replaced by OCCT_DEBUG across OCCT code; new macros described in documentation.
Macros starting with DEB are changed to start with "OCCT_DEBUG_".
Some code cleaned.
2014-11-05 16:55:24 +03:00
dbv
63c629aa3a 0025266: Debug statements in the source are getting flushed on to the console
Output to cout activated previously in Debug mode by #ifdef DEB is suppressed by using macro <PACKAGE>_DEB instead of DEB
2014-10-16 16:44:56 +04:00
san
50b830a09b 0025142: Visualization breaks triangulation on shared solids in composite solid model
Test case for 0025142: Visualization breaks triangulation on shared solids in composite solid model

Do not clean the triangulation in StdPrs_ShadedShape::Tessellate() and
let the triangulation tool process the sub-shapes properly.
Treat triangulation consistently in all AIS classes (AIS_Shape, AIS_TexturedShape).

Test cases for issue CR25142
2014-10-09 13:39:25 +04:00
dbp
735dc1d26e 0024930: Visualization - SetMaterial/UnsetMaterial/UnsetColor are not implemented for AIS_TexturedShape
Correction of test case for issue CR24930
2014-10-02 14:06:07 +04:00
apl
d33222c108 0025129: Visualization - add interactive object for Points Cloud objects
New class AIS_PointCloud for displaying point sets.
Update Graphic3d_ArrayOfPoints, OpenGl_PrimitiveArray and OpenGl_VertexBuffer classes to be able to use normals for points.

Add Draw Harness command vpointcloud.
Add test case v3d/point_cloud/sphere.

Move protected method AIS_Shape::DisplayBox() to public function StdPrs_WFDeflectionRestrictedFace::AddBox().

Small correction of grids.list for v3d tests
2014-09-25 15:58:15 +04:00
dbp
7389f96df0 0023804: Visualization - unexpected color modulation during texture mapping
AIS_TexturedShape - use material set to the Drawer, not default undefined one

Test case for issue CR23804
2014-05-08 11:27:28 +04:00
apl
d399d3c36b 0024725: AIS_TexturedShape - flag switching texture modulation mode does not work
- Missing code restored
- "vtexture" command improved to support texture modulation option

remarks from kgv
2014-03-20 13:47:23 +04:00
kgv
8e3ebc7a63 0024672: Visualization - AIS_TexturedShape does not activate back face culling aspect 2014-03-06 15:48:04 +04:00
apl
f376ac72de 0024622: Add method to AIS_TexturedShape class to assign texture data directly from byte stream
Added methods to specify Image_PixMap as texture source to AIS_TexturedShape and Graphic3d_TextureRoot.
Modified internal class MeshVS_ImageTexture2D, originally used for the purpose of sourcing texture as Image_PixMap.

AIS_TexturedShape class:
- Get rid from cdl declaration.
- Remove unused and uninitialized field myDeflection / method Deflection().
- Improve class documentation.
- Use Graphic3d_NOT_2D_UNKNOWN instead of -1.
- Use myIsCustomOrigin and myToScale flags to use/ignore custom values.
2014-03-06 15:48:03 +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
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
Pawel
bbf847ad1b 0023501: Redundant triangulation cleaning/generation (1) in AIS_Shape.cxx
Cleaning triangulation only if the AIS_Shape has either (1) OwnDeviationAngle and
the values 'newangle' and 'prevangle' are different or (2) OwnDeviationCoefficient and the values 'newcoeff' and 'prevcoeff' are different
Found similar problems in further code portions and corrected them.
The same faulty condition found in XCAFPrs_AISObject.cxx
2013-06-06 10:13:30 +04:00
kgv
bf75be9867 0023544: Texture management in TKOpenGl should be redesigned
Structures Graphic3d_CView, Graphic3d_CStructure, Graphic3d_CGroup become classes and their definitions moved from InterfaceGraphic to Graphic3d.
Introduced new class OpenGl_Texture as replacement for OpenGl_ResourceTexture class and static functions in OpenGl_TextureBox.
Graphic3d_TextureRoot now no more communicate within Graphic3d_GraphicalDriver.
Instead class returns image through GetImage() method.
OpenGl_AspectFace - avoid possible NULL-dereference
OpenGl_Texture::Init() - check gluBuild2DMipmaps() return value
OpenGl_Texture - check GL_BGRA_EXT for compatibility
OpenGl_Texture - scale NPOT image when required
Added more description to Graphic3d_TextureRoot class
OpenGl_Texture - added missing break statement for ImgBGR32 case
OpenGl_Workspace::setTextureParams() - fixed local variable aFilterMin overrides visibility of early declared variable
OpenGl_Workspace::DisableTexture() - reset texture matrix
FTGL do not reset texture matrix and corrupt text could be rendered if custom texture has not identity texture matrix.
2012-12-07 13:58:30 +04:00
san
6318e884de 0023385: Bug in AIS_TexturedShape::Compute()
Mistake in AIS_TexturedShape::Compute() occurred in the patch for issue 22971 corrected
2012-08-24 14:13:44 +04:00
dbv
60be1f9b1d 0023072: Eliminate compiler warnings (level 3) on Windows / MSVC++ 2012-07-06 15:52:20 +04:00
san
6076110592 0023115: Polygon offset doesn't applied in Viewer3D sample
Graphic3d_AspectFillArea3d: use Aspect_POM_Fill polygon offset mode by default

Graphic3d_Group: disable texture mapping if invalid texture ID is specified

AIS_InteractiveObject: remove Fill() method, polygon offset parameters
should be applied explicitly in Compute() method or by SetPolygonOffsets()

AIS_TexturedShape: Compute() now takes polygon offsets into account
2012-04-21 13:41:42 +04:00
kgv
2bd4c032a3 0022971: TKOpenGl clean up obsolete functionality
Added native handles to OpenGl_Context
Removed unused and unimplemented PolygonHoles
Removed unimplemented Polygon functions
Removed unused QuadrangleMesh functions
Removed unused TriangleMesh functions
Removed dead Bezier function declarations
Redirect Graphic3d_Group::Polyline() to primitives array

Move Prs3d_ShadedShape template code to StdPrs_ShadedShape
where it is only used before.

Remove TriangleSet usage from AIS_TexturedShape

Texture coordinates functionality added StdPrs_ShadedShape
to eliminate code duplication.

Eliminated usage of TriangleSet from  QABugs_PresentableObject
Eliminated usage of TriangleMesh from StdPrs_ShadedSurface

Removed TriangleMesh and TriangleSet support
OpenGl_PrimitiveArray - render Edges only for primitives > GL_LINE_STRIP
Added vgrid command to show grid in 3D Viewer
2012-03-30 17:25:28 +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
YSN
0d9695538c 0022312: Translation of french commentaries in OCCT files 2012-03-05 19:30:59 +04:00
bugmaster
ab943560bd Merge OCC22357, OCC22199 and replacing french comments by englih one 2012-03-05 19:28:26 +04:00
bugmaster
81bba7173e Replacing french comments by english one 2012-03-05 19:28:25 +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