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

3392 Commits

Author SHA1 Message Date
kgv
d01ed5fdd1 0027543: Samples - flickering when view is resized in MFC samples
Define proper window class for OpenGL window within
overridden method CView::PreCreateWindow().
2016-08-04 11:26:14 +03:00
kgv
458e3c0deb 0027728: Visualization, OpenGl_Text - handle correctly object local transformation
OpenGl_Context::ApplyWorldViewMatrix() - reset ModelWorld matrix to identity for consistency with FFP.
2016-08-04 11:24:22 +03:00
ika
c6f530b8d9 0027721: Add possibility to read STEP file with invalid shape_representation entity.
Add special parameter, which allow reading of all top level (not shared by any other entities) solids (manifold_solid_brep) and shells (shell_based_surface_model).

The examples how to use a new parameter:

DRAW:
switch on a parameter:
    param read.step.all.shapes On
update model to apply new parameter value:
    newmodel
read as usual:
    stepread test.stp res * // each top level solid or shell will be read as res_i shape.
    or
    ReadStep Doc test.stp

CXX Code:
switch on a parameter:
    Interface_Static::SetIVal("read.step.all.shapes", 1);
read as usual
2016-08-04 11:22:40 +03:00
kgv
30c1ef75af 0027727: Visualization, Graphic3d_ArrayOfPrimitives::SetVertexColor() - define opaque color for RGB input 2016-08-04 11:20:12 +03:00
nbv
990ab183dd 0027718: Class GeomPlate_CurveConstraint contains two same constructors
Two constructors have been combined to one.
2016-07-29 14:23:05 +03:00
bugmaster
a85215df86 Update test cases after integration issue 27707 2016-07-29 11:57:45 +03:00
bugmaster
79cbd2cf60 Elimination of compiler warning on VC++ 2015 after integration 27448 2016-07-29 11:39:08 +03:00
kgv
be3752526f 0027715: Visualization - turn off deprecated OpenGL fixed-function pipeline by default
OpenGl_Caps - flag ffpEnable is now initialized to false on desktop OpenGL.
OpenGl_Context::init() - now prints error if OpenGL version does not support GLSL
and switches OpenGl_Caps::ffpEnable to true.

update test cases
2016-07-28 15:14:12 +03:00
emv
66cce03ae5 0027704: Numeric inaccuracy due to huge extension of the offset faces
The max extension value of the faces in offset operation has been decreased
to 1.e+7 value to avoid the lack of precision in the calculations.

Update of test cases according to the new behavior
2016-07-28 15:00:31 +03:00
ibs
4c6b4bc75a 0027706: Foundation Classes - OSD_Path::DownTrek() crashes on empty argument
a required check added
2016-07-28 15:00:29 +03:00
isn
07ef8bdfa2 0027552: Wire creation fails depending on the order of edges
1) BRepBuilderAPI_MakeWire::Add (const TopTools_ListOfShape &L) method have been completely rewritten. The order of edges is not significant now.
2) The geometric proximity of free vertices from already existing wire and from input list of edges are also have been taken into account. If such vertices are coincident with each other then they are fused into the one. The original wire remains untouched topologically (yet the tolerances and points can be modified).
3) UBTreeFiller is used to speed up the process of picking of coincident vertices.
4) BRepLib now contains the 'new' method - BoundingVertex(..). The implemenation of this method are taken from BOPTools_AlgoTools::MakeVertex(..).
5) The '-unsorted' argument have been added to 'wire' command.

Conflicts:
	src/QABugs/QABugs_20.cxx

Add missing include.

Eliminate warning.
2016-07-28 15:00:28 +03:00
emv
01b5b3df55 0027448: BOPTools_AlgoTools::IsMicroEdge does not correspond to shape validity criteria
1. IntTools_ShrunkRange::Perform
The algorithm of building shrunk range on the edge has been redesigned to make this range as big as possible.
By new definition it has to have the length not less than Precision::Confusion().
Although, the possibility of splitting of the edge has been taken into account. If it is impossible to put
vertex on edge in such a way that the tolerance spheres of the edge's vertices do not intersect the tolerance
sphere of the putting vertex the edge cannot be split. This possibility is saved in the new field
IntTools_ShrunkRange::myIsSplittable. It can be checked by the corresponding method IntTools_ShrunkRange::IsSplittable().
It returns TRUE if the shrunk range is computed successfully and it has the length more than the value of sum of two tolerance
values of the edge (for putting vertex, as its tolerance should not be less than the tolerance value of edge) and
two Precision::Confusion() values (to make two new edges valid by Shape validity criteria).

IntTools_ShrunkRange::myErrorStatus and IntTools_ShrunkRange::ErrorStatus() have been replaced by
the IntTools_ShrunkRange::myIsDone and IntTools_ShrunkRange::IsDone(). IntTools_ShrunkRange::IsDone() returns TRUE
if the shrunk range has been computed and it has length more than Precision::Confusion().

All computations of the parameters are performed using the GCPnts_AbscissaPoint, but if AbscissaPoint is unable to
compute the parameters the Resolution of the curve is used.

2. Boolean Operations algorithm now partially works with the edges that cannot be split or does not have the ShrunkData
at all (previously such edges have been considered as micro and just ignored). If by the result of some intersection such
edges should be split, i.e. the intersection vertex should be created, the algorithm just ignores them and no vertex is created.
But if such edges coincide with other shapes (other edges or faces) the algorithm uses them for creation of common blocks.
The information of the possibility for the edges to be split is saved in its PaveBlocks, in the new BOPDS_PaveBlock::myIsSplittable field.
It can be retrieved by the BOPDS_PaveBlock::IsSplittable() or BOPDS_PaveBlock::ShrunkData(), but these methods
make sense only after filling of the shrunk data for the pave block.

BOPTools_AlgoTools::IsMicroEdge() has an additional parameter that defines whether it is necessary to take into account
the possibility for the edge to be split or not. By default it is set to TRUE, i.e. by default the edge will be considered as micro
even if the shrunk range is computed, but it is too short for the edge to be split.

3. BOPAlgo_PaveFiller::PerformEF
To avoid creation of too close intersection vertices the intersection ranges of the edges participating in Edge/Face
intersections are reduced taking into account the common ranges computed during Edge/Edge intersections.
Thus, the Edge/Face intersection vertex is not created if it gets into a common range of the Edge/Edge intersection
between that edge and one of the face's edges. The tolerance value of Edge/Edge intersection vertex is increased
to reach the Edge/Face intersection.

4. Unification of the vertices of the section edges considered as micro edges.
If by the result of some Face/Face intersection the section edge is considered as micro edge,
the vertices of this edge will be united and the edge itself will be removed.

5. Test cases for the issues.

6. Adjusting test cases for issue CR27448.
2016-07-28 15:00:26 +03:00
msv
1aee6c8210 0027703: BinTools_ShapeSet stream read bug
Avoid out of array bounds read/write.
2016-07-28 15:00:24 +03:00
ema
056072196c 0026270: GeomFill_NSections constructor crash
Correction of code to avoid of usage of undefined associated parameters in order not to get exception in constructor.
Creation of test case for this issue
2016-07-21 12:49:08 +03:00
kgv
59ec40f804 0027684: Coding rules - drop unused declarations from Graphic3d
The following headers have been removed:
- Graphic3d_TypeOfPolygon
- Graphic3d_TypeOfPrimitive
- Graphic3d_Array1OfVector.hxx
- Graphic3d_Array1OfVertex.hxx
- Graphic3d_Array2OfVertex.hxx
- Graphic3d_CBitFields4.hxx
- Graphic3d_CBitFields8.hxx
- Graphic3d_CBitFields16.hxx
- Graphic3d_CBitFields20.hxx
- Graphic3d_CStructurePtr.hxx
- Graphic3d_CycleError.hxx
- Graphic3d_DataStructure.pxx
- Graphic3d_HSequenceOfStructure.hxx
- Graphic3d_InitialisationError.hxx
- Graphic3d_ListIteratorOfListOfShortReal.hxx
- Graphic3d_ListOfShortReal.hxx
- Graphic3d_NListOfHAsciiString.hxx
- Graphic3d_StructureManagerPtr.hxx
- Graphic3d_StructurePtr.hxx

Graphic3d_StructureManager - remove default aspects, which have been never used.

do not include non-existing header Graphic3d_Array1OfVertex.hxx from MFC sample

Graphic3d_Group::MinMaxValues() - add missing Standard_EXPORT
2016-07-21 12:47:49 +03:00
isn
0f1deae3b4 0024056: error LNK2019: unresolved external symbol
Clean out the TopOpeBRep* classes

Remove unused private fields.
2016-07-21 12:47:49 +03:00
kgv
fb66bb2892 0027682: Visualization - provide method Prs3d_Drawer::SetShaderProgram() for setting program
AIS_ColoredDrawer has been moved to dedicated file.
AIS_ColoredShape::CustomAspectsMap() - added public method for accessing aspects map.

AIS_InteractiveObject::SynchronizeAspects() - added method for synchronizing
all primitive aspects at low-level (TKOpenGl) after their modification.
2016-07-21 12:47:48 +03:00
ifv
c65f82013b 0027679: Wrong offset: overlapping edges
Method BRepFill_OffsetWire::UpdateDetromp(...) is modified for correct treatment of closed bisectors.

Test case for issue #27679
2016-07-21 11:20:34 +03:00
isn
56091b56ac 0027199: Unifysamedomain regression issue in OCCT 7
Allow to process the compounds in UnifySameDomain algorithm. Earlier only faces from shells were allowed to be unified.

Test case for issue #27199
2016-07-21 11:16:35 +03:00
azv
758bacbb66 0027677: Incorrect CUT of a solid by semi-infinite solid
The problem of incorrect CUT is wrong Pcurve after projection onto cylinder of a small edge orthogonal to cylinder's axis. The result of projection is a line along V direction, but it should be along U.

ProjLib_Cylinder has no specific functionality to build projection in most common case, so it should return "not done" flag to start projection based on curve approximation.

Following changes are done:
1. ProjLib_Cylinder returns isDone=false in the following cases:
  * the projected line is not parallel to cylinder's axis
  * the plane of projected circle is not orthogonal to cylinder's axis
2. Test case added

Minor correction of test case
2016-07-21 11:14:57 +03:00
kgv
ce0594b85e 0027675: Foundation Classes - handle Unicode path to CSF_UnitsLexicon and CSF_UnitsDefinition on Windows
Units package now uses Unicode-aware functions OSD_OpenStream
and OSD_FileStatCTime (introduced for fetching file timestamp).
2016-07-21 11:07:03 +03:00
isn
4aa09e317f 0027264: Weird difference between two BRepTools::Write() overloads
Assume that the brep file contains DBRep_DrawableShape variable if the file header is absent

test cases
2016-07-21 11:05:39 +03:00
kgv
b2fbf11a4f Remove overloaded method Graphic3d_AspectFillArea3d::SetTextureMap(bool) 2016-07-14 14:55:42 +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
apn
28cab3768f 0027638: Optimisation of testdiff command
Added functionality to compare image, memory and CPU differences separately.
2016-07-14 13:23:11 +03:00
ski
536a3cb80c 0027525: Coding - eliminate warnings on Windows for OCCT with static type of libraries
Useless *.cxx files were removed to eliminate linker warning LNK4221.

Package TopOpeBRepDS was cleaned up from old debugging routines.

Merged OSD_signal_WNT.cxx into OSD_signal.cxx

Class Standard_ErrorHandlerCallback was moved into the Standard_ErrorHandler class as nested class Callback

Eliminated warning about unused variable.
2016-07-14 13:21:33 +03:00
kgv
593dfe97ea 0027632: Visualization, XCAFPrs_AISObject - provide method for assigning new Label in the document 2016-07-14 13:16:35 +03:00
kgv
60adbe67f2 0025576: Visualization - implement AIS_ConnectedInteractive::AcceptDisplayMode()
by redirecting to myReference->AcceptDisplayMode().
2016-07-14 13:15:12 +03:00
nbv
f7991731de 0027664: Incomplete intersection curve from the attached shapes
Computation of correct offset values in order to make correspondence (with adjusting to periods) between Domain of WLine and surface domain.

Creation of test cases for this issue.

Small correction in the test case.
2016-07-14 13:05:15 +03:00
ssv
a7cc4fdd0d 0027671: Basic IVtk tools do not allow easy sub-classing
Add missing Standard_EXPORT, change private with protected in shape data source.
2016-07-14 13:03:45 +03:00
kgv
c4684140fb 0027668: Visualization, TKD3DHost - fix accessing function list within Core Profile 2016-07-14 13:02:09 +03:00
bugmaster
693c4bbe60 0027127: Implementation of compilation of OCCT Products samples on all platforms under support in Jenkins test system.
Removing old VC environment
2016-07-12 15:44:10 +03:00
msv
6482df8152 0027362: Meshing performance
Remove warning on VS2015
2016-07-11 11:52:35 +03:00
kgv
fd59283a7b 0027633: Visualization, TKOpenGl - point sprites are inconsistent within Core and Compatible Profiles
OpenGl_ShaderManager::pointSpriteAlphaSrc() now does not return alpha from Red channel
for RGBA marker texture in Core profile.
OpenGl_ShaderManager::prepareStdProgramFlat() - restored code for drawing points without texture.

Built-in GLSL programs now flip .y in shaders instead of
relying on GL_POINT_SPRITE_COORD_ORIGIN unavailable on OpenGL ES.

Added sample markers.tcl (moved from test cases).
Sample now includes marker_kr.png for testing marker orientation.
2016-07-07 15:15:50 +03:00
isk
1d92133e83 0026641: Visualization, TKOpenGl - handle correctly transformation persistence within perspective projection.
Add a new method AIS_InteractiveContext::SetTransformPersistence, which sets transform persistence to object and selection.
Add a new method SelectMgr_SelectionManager::UpdateSelection, which re-adds selectable object in BVHs in all viewer selectors.
Add a new method SelectMgr_ViewerSelector::MoveSelectableObject, which moves object from set of not transform persistence objects to set of transform persistence objects (or vice versa).
Add a new method Graphic3d_TransformUtils::Convert, which converts gp_Trsf to Graphic3d_Mat4.
Remove the method PrsMgr_PresentableObject::SetTransformPersistence(flag, point).
2016-07-07 14:30:18 +03:00
apn
fbad941bd4 0026372: Meshing of surface of revolution fails in debug mode
Added test case bugs/mesh/bug26372
2016-07-07 14:27:17 +03:00
msv
8109385697 0027362: Meshing performance
1) BRepMesh_FastDiscretFace.cxx:
- exclude planes from procedure of inserting internal points.
- localize declaration of the container aNewVertices in each method where it is needed.
- correct the logic of the method insertInternalVerticesOther, so that to separate the processes of removing extra points and addition of new points in different cycles, thus making the code more clear and in addition stable.
- insert useful output of intermediate mesh to a file in control() method for debug purposes (with definition DEBUG_MESH).

2) Add global functions MeshTest_DrawTriangles and MeshTest_DrawLinks to draw mesh data in debug session.

3) BRepMesh_FastDiscret:
- in the method Add calculations of deflections have been simplified for non-relative mode.
- replace the attribute MinDist with Deflection in EdgeAttributes structure. Correct its computation so that later to store this value as deflection of the polygon.

4) Make protection against exception in the method BRepMesh_Delaun::addTriangle() when an added triangle creates a third connection of a mesh edge.

5) BRepMesh_EdgeTessellator.cxx, BRepMesh_EdgeTessellationExtractor.cxx: use Geom2dAdaptor_Curve in order to use b-spline cache while computing value on a curve.

6) In BndLib_Box2dCurve::PerformBSpline, avoid creating new b-spline in case of requested parameter range differ from natural bounds insignificantly.

7) In GeomAdaptor classes, postpone building of cache till the time of its actual usage. So, creation of an adapter to compute intervals of continuity does not lead to creation of internal cache.

8) In the methods BRepAdaptor_Curve::Bezier and BSpline do not call Transformed() if transformation is identity.

9) In the classes Geom_BSplineCurve, Geom_BSplineSurface, Geom_BezierCurve, Geom_BezierSurface, Geom2d_BSplineCurve, Geom2d_BezierCurve change the method Pole() to return the point by const reference.

10) In CPnts_AbscissaPoint.cxx, compute derivative by D1 instead of DN to make use of b-spline cache.

11) Change test cases to actual state:
  - Number of triangles/nodes can grow due to more accurate work with deflection of edges. Now the edge is tessellated using its own tolerance instead of maximal tolerance of all shapes in the face.
  - Accept new numbers of mesh errors (free links, free nodes) for really bad shapes.
  - Correct the test "bugs/mesh/bug25612" to produce stable result.
  - Disable redundant checks in test cases bug25378* (lower limit for computation time).

- Speed up iso-lines computation for offset of bspline surfaces. For that use adaptor instead of original surface in evaluator of approximation.
- Add output of polylines for debug of insertInternalVerticesOther().

Reference data in test case bugs\moddata_2\bug453_3 have been changed to be close to expected theoretical values. This makes the test give stable result on different platforms.
2016-07-07 14:24:39 +03:00
isk
4f51d9d704 0027621: Highlighting with color remains visible when shape is erased. 2016-07-07 14:16:23 +03:00
isk
dcc1741921 0027655: Visualization - AIS_Triangulation disappears after setting non-zero transparency
Add a new methods in AIS_Triangulation: SetTransparency, UnsetTransparency, HasVertexColor, updatePresentation.
Add a new methods in Graphic3d_ArrayOfPrimitives: AddVertex(gp_Pnt, Graphic3d_Vec4ub) and SetVertexColor(Standard_Integer, Graphic3d_Vec4ub).
Type of color of array in AIS_Triangulation is Graphic3d_Vec4ub now.
2016-07-07 14:13:52 +03:00
bugmaster
caee72a96e 0027127: Implementation of compilation of OCCT Products samples on all platforms under support in Jenkins test system.
Update mfc samples for current state of OCCT

Removing vc8 and vc9 from environment

Update qt samples for compilation with QT5

Update OCCT qt pro files system

Removing from projects files FWOSPlugin.lib.
2016-07-07 10:45:05 +03:00
ski
3eabbe1b4e 0027639: Add possibility to build OCCT 7X without TCL/TK
draw.bat/sh files will not be generated/installed to binary/install directories if DRAWEXE toolkit is excluded from build.
2016-07-05 11:26:25 +03:00
ifv
3ba87fdb66 0027352: Optimal axis-aligned bounding box for a shape
Add method for exact calculation of bounding boxes

Modifications made according to remarks.

Small correction of test case for issue CR27352

Small correction of test cases for issue CR27352

Avoid warning on VS2015
2016-07-01 12:40:40 +03:00
msv
745c138678 0027245: DRAW command to test binary persistence for shapes
- Added new static methods Read and Write in BinTools class to store/retrieve a shape in binary format.
- Added new draw commands "binsave" and "binrestore"
- Added test cases to test the new methods.
- Updated documantation with desription of the new BinTools class methods and corresponding BRepTools class methods.
2016-07-01 12:28:43 +03:00
oan
782467fd42 0027595: Mesh - faces without triangulations due to gp_VectorWithNullMagnitude exception
Zero magnitude check has been added before gp::Vec::Angle() usage
2016-07-01 12:28:39 +03:00
kgv
576e306647 0027643: Coding rules - eliminate GCC warning -Wmaybe-uninitialized 2016-07-01 12:28:34 +03:00
isk
04be500328 0027629: Visualization - apply a correct model-world matrix to normals in fixed function pipeline with enabled zoom persistence.
Small correction of test case for issue CR27629
2016-06-30 13:56:33 +03:00
isn
8009d0702c 0027357: Geom2dGcc_Circ2d2TanOn: check status of sub-algorithms to avoid exceptions
Additional checks for underlying algorithms have been added

test case

get rid of the warning
2016-06-30 13:49:20 +03:00
kgv
d52651755e 0027401: Configuration, Plugin - allow using statically linked plugins
CMake script now defines OCCT_NO_PLUGINS for static builds,
so that linking with OCAF plugins does not lead to duplicated symbols.
2016-06-23 19:15:11 +03:00
abv
6fe96f8416 0025812: Replace dynamic loading mechanism of OCAF persistence with dynamic-link one
Fields to store cached instances of reader and writer drivers for each format are added in CDF_Application.
Method DefineFormat() is added in TDocStd_Application, allowing defining format completely by single call, including drivers to be used for persistence.
All OCAF driver packages provide static method DefineFormat() that defines standard OCAF persistence format supported by corresponding package; these methods are called in DRAW to enable all persistence by default.

DRAW commands (except TObj-specific ones) now use single instance of OCAF Application, returned by DDocStd::GetApplication(). Other instances are eliminated, as well as method DDocStd::Find(const Handle(TDocStd_Application)&).
Method MessageDriver() and relevant field are moved to TDocStd_Application from its descendants.

Method CDF_Application::ReaderFromFormat() is made virtual to allow its redefinition in descendants.
Creation of storage driver is moved from PCDM::StorageDriver() to new virtual method CDF_Application::WriterFromFormat().
The code loading driver as plugin is retained in both these methods for compatibility.

Test command OCC24925 is converted to use virtual methods instead of defining plugin resource.

Migration table for old OCAF types is hard-coded in Storage_Schema::CheckTypeMigration().

Removed obsolete and unused items:
- FWOSPlugin library (driver is created directly)
- Methods in classes CDM_Document dealing with unused parameters of format
- DRAW command OCC23010 for testing non-reproducible issue #23010
- Methods PCDM::StorageDriver(), PCDM::FindStorageDriver()
- Method Formats() from CDF_Application and descendants
- Methods LoadExtensions and SchemaName from PCDM_StorageDriver
- Method Plugin::AdditionalPluginMap()
- Method BinLDrivers_DocumentStorageDriver::SchemaName()
- Method CDF_Application::DefaultExtension(), Reader(), FindReader(), FindReaderFromFormat()
- Method CDF_Store::Check()
2016-06-23 19:14:31 +03:00
Timo Roth
8072aba1ae 0027610: Some spelling mistakes in documentation of "Building with CMake"
Spelling corrected in documentation of "Building with CMake"
2016-06-23 18:15:17 +03:00