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

2520 Commits

Author SHA1 Message Date
ika
da7e894868 0030856: Data Exchange - Wrong colors after STEP file import
Fix processing of colors, attached to assemblies in STEP file.
2019-08-06 17:14:42 +03:00
jgv
389b9d5ca3 0030534: Regression in the tool UnifySameDomain - the shape looses faces
1. Add method TransformPCurves to ShapeUpgrade_UnifySameDomain - to rotate and translate existing pcurves instead of projecting.
2. Modify method ShapeUpgrade_UnifySameDomain::IntUnifyFaces - now it does not apply ShapeFix to new wires and new faces.
3. In the method UnifyEdges: add merging degenerated edges.
2019-08-02 15:48:00 +03:00
kgv
607e5e62e7 0029837: Visualization, Graphic3d_Camera - Fit All operation works incorrectly on flat object
Graphic3d_Camera has been revised to store camera Direction from Eye explicitly
and Distance to Center instead of auxiliary Center point.

This allows setting camera Distance to 0 (for flat objects) without side effects
like broken FitAll, wobbling on rotating.
2019-07-30 19:34:49 +03:00
kgv
a3a3ff3d33 0030850: Visualization, OpenGl_Text - text within trihedron persistence jitters when camera is far from origin
OpenGl_Text now discards (redundant) translation part from camera orientation matrix.
Text anchor point alignment to integer coordinates is now not performed for 3D-oriented text.
2019-07-19 12:23:02 +03:00
aba
2108d9a25b 0028954: Visualization - implement interactive object for camera manipulations
Added new class AIS_ViewCube implementing interactive cube
displaying orientation of the main axes of the model space in the viewer.
Each side, edge, or corner of the cube corresponds to particular orientation of the camera,
and the class provides methods to move the camera to corresponding position (with animation if needed).

AIS_InteractiveContext::LastActiveView(), added new property returning the last View processed by MoveTo() event.
AIS_InteractiveContext::BoundingBoxOfSelection(), added method returning bounding box of selected objects.
SelectMgr_EntityOwner::HandleMouseClick(), added new callback for handling
mouse clicks by owner itself without automatic highlighting and clearing previous selection.
Called by AIS_InteractiveContext::Select() method.

AIS_ViewController::ViewAnimation() has been extened with camera animation propery,
which can be bound to AIS_ViewCube for smooth embedding into event loop.

Prs3d_ToolDisk has been extended with parameters specifying angle range.
Graphic3d_MaterialAspect now initializes all coefficients to 1.0
when Graphic3d_NOM_UserDefined is passed to class constructor.
AIS_AnimationCamera::update() now sets the end camera position if animation duration is 0.
Prs3d_DatumAspect, added missing setters.

New command vviewcube has been added.
2019-07-19 12:23:01 +03:00
msv
e8dec5e171 0030790: [REGRESSION] Modeling Algorithms - Crash when loading specific step file
The problem occurred when the algorithm IntCurvesFace_Intersector was called for a face occupying zero extension along V direction. This is obviously a bad face, but we need to have the algorithm not crashing the application. So, the algorithm has been protected against such input data. At attempt to make calculations it establishes NotDone status.

Bad test case tests/de/step_3/D9 has been updated.
False memory leak detection has been suppressed in tests/bugs/fclasses/bug7287_2.
2019-07-19 12:23:00 +03:00
kgv
1c728f2d6d 0030668: Visualization - revise adding ZLayer API
V3d_Viewer::AddZLayer() has been replaced by
V3d_Viewer::InsertLayerBefore() and V3d_Viewer::InsertLayerAfter() methods
allowing to specify Layer settings and index of existing layer to insert new one before/after.
The behavior of V3d_Viewer::AddZLayer() has been adjusted to append
new Layer before Graphic3d_ZLayerId_Top
(between Graphic3d_ZLayerId_Default and Graphic3d_ZLayerId_Top).

Graphic3d_Layer now provides LayerId() property.
Graphic3d_ZLayerSettings has been extended with IsRaytracable() property;
Ray-Tracing now processes multiple layers instead of Graphic3d_ZLayerId_Default.

Moved some methods from OpenGl_View to the base class Graphic3d_CView.
2019-07-19 10:23:22 +03:00
ika
6b9b7e3c92 0030630: Visualization - wrong visualization of shape with mirrored transformation
Solids with mirror location are displayed, according to their normals.

vaspects -setBackFaceColor, added command to set backface color.
2019-07-18 11:09:08 +03:00
msv
7c08e3ac6e 0030829: BRepExtrema_ShapeProximity crashes with shape from STL/WRL
The fix makes algorithm independent on geometrical data. Only triangulation is needed for its work.
2019-07-18 11:09:08 +03:00
kgv
2fb08f0132 0030628: [REGRESSION] Data Exchange - Crash on importing STEP file
RWHeaderSection_RWFileDescription::ReadStep(), added check for an empty list.
2019-07-15 15:48:00 +03:00
asl
0d56f7433b 0030824: Visualization, PrsMgr_PresentableObject - A new flag to disable automatic selection of children
A new flag myToPropagateVisualState is introduced for PrsMgr_PresentableObject: by default it is true, it means that the visual state (display/erase/color) should be propagated to all children. If false, the visual state is not propagated.
The flag can be set via the method ToPropagateVisualState() or via Draw command: "vparent <parent> -ignoreVisu"
2019-07-04 19:36:30 +03:00
emv
b6c113d0eb 0030817: Modeling Algorithms - BRepOffsetAPI_MakePipeShell produces invalid result
BRepFill_TrimShellCorner::CheckAndOrientEdges() - When orienting next edge in a sequence take into account the Orientation of the previous edge.
Test cases for the issue.
2019-06-27 16:07:14 +03:00
emv
88c3accd1a 0030787: BRepOffsetAPI_MakePipeShell: hangs on the attached model
Protect IntTools_EdgeEdge::FindSolutions method from cases where splitting edge on parts does not give bounding box decreasing.
Use at least Epsilon from edges parameters as a step in BRepLib::FindValidRange.
Test case for the issue.
2019-06-25 19:47:09 +03:00
oan
3c1b70842d 0030780: [Regression to 7.3.0] BRepMesh fails triangulating one face of the shape
Added new parameter KeepSmallEdges to IMeshTools_Parameters allowing to compute min size for each edge locally, depending on the length of particular edge.
Parameter -smalledges now available for incmesh command.
2019-06-25 19:46:09 +03:00
aba
bbf3fcdecd 0030806: Visualization - AIS Manipulator highlighting is not affected by the view affinity
- AIS_Manipalator object view affinity is now applied to presentation for highlighting.
2019-06-25 19:44:07 +03:00
kgv
841aa8c47b 0030804: Foundation Classes - Poly_Connect crashes due to out-of-range array modification
Fixed initialization of edges array based on the wrong statement.
2019-06-25 19:41:23 +03:00
msv
64a4475285 0029679: Draw Harness - Command 2dapprox works wrong when giving points in command line
Correct the behavior of the command 2dapprox for the case of points input in the command line.
Restore the work of the command 2dinterpole (implemented in the same method as 2dapprox).
Add test cases.
Correct generation of snapshots for the tests lowalgos/2dinter/*.
2019-06-24 19:22:47 +03:00
kgv
4151c94d20 0029296: Data Exchange - implement import of mesh data from files in OBJ format
RWObj_Reader and RWObj_CafReader - added new classes reading triangulation from OBJ file.
2019-06-21 18:19:09 +03:00
kgv
0a419c51ed 0030691: Data Exchange - implement import of mesh data from files in glTF format
Added RWGltf_CafReader class implementing glTF reader.
Added readgltf Draw Harness command for reading glTF files.
2019-06-21 18:19:08 +03:00
oan
eec6e810f1 0027685: Visualization of a shape imported from IGES hangs
Adding test case
2019-06-20 15:20:52 +03:00
emv
c2a25d522b 0030785: Mesh - protect BRepMesh_IncrementalMesh::Perform from raising exception
IMeshTools_ModelAlgo and IMeshTools_ModelBuilder have been changed to provide exception protected interfaces for performing the operations.
Protect single Edge/Face discretization methods from raising exceptions to skip broken Edges/Faces and allow mesh construction on the whole model.
2019-06-20 15:20:51 +03:00
kgv
fe525c6f7c 0030777: Visualization - Incorrect selection/highlighting of clipped objects
SelectMgr_ViewerSelector::traverseObject() now handles Object clipping planes in the same way as View clipping planes.
2019-06-20 15:20:51 +03:00
ika
3b739e69c9 0030789: Data Exchange - Some names are lost during STEP import
Add importing name from PRODUCT_DEFINITION_WITH_ASSOCIATED_DOCUMENTS STEP entity.
Update test cases with files contained this entity.
2019-06-20 15:20:50 +03:00
kgv
912761ea17 0030782: Visualization, Font_FTFont - use predefined fallback fonts for extended Unicode subsets
Font_FTFont now uses fallback fonts for characters from unsupported Unicode subsets,
managed by Font_FTFont::ToUseUnicodeSubsetFallback()
and Font_FontMgr::ToUseUnicodeSubsetFallback() option, enabled by default.
The fallback list includes common font families for Chinese, Korean and Japanese languages.

Font_FTFont::RenderGlyph() now supports FT_PIXEL_MODE_MONO input format used by some CJK fonts.
OpenGl_Font::createTexture() now limits single texture size to circa 4096 glyphs.

test/testgrid now expects test scripts being in UTF-8 encoding in sync with "DRAWEXE -f script.tcl".

AIS::InitFaceLength() - fixed usage of uninitialized result.
2019-06-19 19:42:24 +03:00
emv
1bb67d3844 0030595: Oriented Bounding Box seems not optimal for some shapes
Add possibility of construction of the Optimal Oriented Bounding Box from set of points (the case of shape with triangulation).

The interface of the BRepBndLib::AddOBB method is not changed, but the option <theIsOptimal> now controls also the construction of the OBB from Set of points.
The slightly modified DiTo algorithm will be used, checking all possible axes created by the extreme points.
The performance of the construction of the Optimal OBB is lower but the quality is usually much higher (can't be worse by definition).

Test cases for the issue.
2019-06-17 09:26:54 +03:00
ika
d6b200e03a 0030779: Data Exchange - Problems with located subshapes in expand compounds
Protect Expand compounds against problems with located subshapes.
Add method XCAFDoc_ShapeTool::AddSubShape() with Boolean output parameter.
Speed up XCAFDoc_ShapeTool::Expand().
Speed up XCAFDoc_ShapeTool::FindSubShape().
2019-06-14 12:27:34 +03:00
kgv
49582f9dbf 0030507: Visualization - introduce AIS_ViewController
ViewerTest_EventManager now inherits AIS_ViewController.
Platform-dependent user input handling within ViewerTest has been revised
to process events in common way through AIS_ViewController.
The mouse navigation has been changed, so that left mouse clicked
without modifers now rotates View.
The rubber-band selection can be activated via Alt+LeftMouseButton.
Selection is now done on mouse unclick and keyboard short-cuts take effect on unclick.

Aspect_Window::SetTitle() - added new method configuring Window title.
Introduced new types Aspect_Touch, Aspect_VKey, Aspect_ScrollDelta
for processing window events in platform-independent way.
2019-06-13 18:50:12 +03:00
age
d31fb73a09 0030765: Visualization - Incorrect intersection with Select3D_SensitiveBox when clipping is turned on
SelectMgr_RectangularFrustum::Overlaps method for computing intersection of box with frustum was reworked. Now the nearest non-clipped point is calculated.
2019-06-07 15:02:39 +03:00
kgv
fc552d842e 0030692: Data Exchange - introduce base framework RWMesh for importing mesh data formats into XDE document
RWMesh_CafReader - added new interface class for common workflow for reading mesh data files into XDE document.

OSD_Path - added auxiliary methods splitting path into folder+file pair
and checking relative/absolute path semantically:
OSD_Path::FolderAndFileFromPath(), ::IsRelativePath(), ::IsAbsolutePath().

V3d_TypeOfOrientation enumeration has been extended with aliases
(like front/left) for Z-up and Y-up conventions.
V3d_View::SetProj() now accepts argument for asking Y-up instead of Z-up.

Added command vviewproj defining standard camera direction.
Commands vaxo, vleft, vright, vtop, vbottom, vfront, vbottom now redirect to vviewproj.

TCollection_AsciiString::SubString() now uses Standard_OutOfRange_Always_Raise_if() to suppress GCC warning.

Eliminated gcc 4.4 compilation errors within Standard_OutOfRange_Raise_if,Standard_RangeError_Raise_if.
2019-06-07 15:02:38 +03:00
emv
78005ffefe 0030760: Modeling Algorithms - Intersection fails in Occt 7.3.0
Use FORWARD orientation of edges and face when attaching pcurve from one edge to another.
Test case for the issue.
2019-06-05 13:35:24 +03:00
kgv
edc4ba21c4 0030756: Visualization, TKOpenGl - capping plane does not work for ZLayer with non-zero origin
OpenGl_CappingPlaneResource::updateTransform() now takes into account ZLayer origin.

Fixed VT_ProcessKeyPress() passing arbitrary input to Draw::Atoi() leading
to messages in console like "unclosed braces".
2019-05-30 18:42:32 +03:00
emv
7c1a821000 0030655: Modeling Data - Provide interfaces for selection of the elements from BVH tree
Provide the easy to use interfaces for selection of the elements from BVH tree.
The selection rules should be implemented in the selector class derived from *BVH_Traverse* or in *BVH_PairTraverse* in Reject/Accept methods.

The *BVH_Traverse* is used for selection of the elements from the tree.
The *BVH_PairTraverse* is used for selection of the pairs of elements from two BVH trees.

Auxiliary changes:
- Two methods BVH_Box::IsOut(OtherBox) and BVH_Box::IsOut(Point) have been added;
- Added methods for conversion of Bnd boxes to BVH boxes

Added new class *BVH_Tools* containing useful static methods operating on BVH points and boxes.

The classes BRepExtrema_OverlapTool and BVH_DistanceField have been rebased to use the new traverse methods.
2019-05-28 19:02:22 +03:00
kgv
e3249d8e5a 0030694: Data Exchange - support non-standard GB2312-encoded STEP files
STEPCAFControl_Reader::SourceCodePage() - added property defining text encoding
for converting names within STEPCAFControl_Reader::ReadNames() method.
Added associated "read.stepcaf.codepage" parameter,
which default value is Resource_UTF8, preserving current behavior.

Resource_FormatType enumeration has been extended by UTF8 and SystemLocale values.
Resource_Unicode - added conversion methods taking Resource_FormatType as argument.

GetName command has been corrected to NOT replace non-Latin symbols.
2019-05-24 16:59:16 +03:00
jgv
9369e98a62 0030590: Wrong result of Boolean Cut algorithm
Modification in static method BoundedArc of IntStart_SearchOnBoundaries:
    add exact intersection of canonical curve-surface (when Func is IntPatch_ArcFunction).
2019-05-24 12:11:52 +03:00
ika
7783ba1120 0030727: Data Exchange - Problems in Shape Tool
Add protection from return of not top-level shape by FindShape method.
Add protection against located roots into FindMainShape method.
Add new Draw command for FindMainShape.
Add flag findInstance to Draw command FindShape
2019-05-24 10:33:24 +03:00
emv
47cd8af2d2 0030670: Modeling Algorithms - Performance improvement of Boolean Operations algorithm
The following improvements have been made in Boolean operations algorithm:
1. Added possibility to update FaceInfo structure for many faces at once which helps to avoid nested loops.
2. Improve Point-Face classification procedure by caching the FaceExplorer for a face.
2019-05-24 10:33:23 +03:00
kgv
a9080ef924 0030717: Visualization, AIS_InteractiveContext::Erase() - selection presentation in a mode other than the default after hiding an object
AIS_InteractiveContext::EraseGlobal() now erases all object owners
(in the same way as AIS_InteractiveContext::ClearGlobal()).

Removed redundant fields AIS_InteractiveContext::myLastinMain and myWasLastMain.
2019-05-21 18:53:46 +03:00
mnv
8cf3bf84ce 0030713: Visualization, TKOpenGl - stipple line artifacts on Intel UHD Graphics 630
Added workaround for dashed line presentation on Intel UHD Graphics 630.
2019-05-20 11:19:41 +03:00
msv
4811214cc0 0030679: Attached model hangs most of OCCT common functionality
Evaluator of offset surface has been protected against evaluation at infinite parameters. Now it throws exception when evaluating such data.

The methods IsUClosed and IsVClosed of the class ShapeAnalysis_Surface have been corrected to avoid evaluation of the surface at infinite parameters (fighting with regressions "parasolid doc_3 E3" and "parasolid doc_2 A3" in products).
2019-05-16 19:46:25 +03:00
asl
52c38ce17d 0030561: Visualization, PrsMgr_PresentableObject - Keep the current transformation for child in AddChild()
New methods AddChildWithCurrentTransformation(), RemoveChildWithRestoreTransformation() are implemented to keep the current global transformation of the object (child).
In DRAW a new command vchild is provided for testing low-level connections between presentations.
2019-05-16 19:34:17 +03:00
emv
cca36b6b21 0030708: Modeling Data - Exception is raised while initializing TopoDS_Iterator with null shape
Added protection from null shapes to TopoDS_Iterator::Initialize method.
2019-05-15 20:05:31 +03:00
kgv
ab1f458034 0030690: Draw Harness - provide XDisplay command for displaying XDE document
XDisplay - added new command displaying XDE document in ViewerTest map of object:
> XDisplay Doc [label1 [label2 [...]]] [-explore {on|off}] [-docPrefix {on|off}] [-names {on|off}]
>              [-noupdate] [-dispMode Mode] [-highMode Mode]

vstate - added NULL checks.
vdisplay now prints error on attempt to specify unsupported display mode.
verase, vremove now raise Tcl exception on attempt to hide non-existing object.
verase, vremove, vdir now accept name masks like "verase b*".
vremove and vdir output is now consistent to verase command (space-separated list of removed objects).
2019-05-14 18:24:09 +03:00
nbv
858435884d 0029523: Problem with BRepOffsetAPI_MakeEvolved
The capabilities of the class BRepOffsetAPI_MakeEvolved have been extended with involving alternate algorithm of resolving the loops in the piped shape. The new option theIsVolume is added for that in the constructor.

New class BRepFill_AdvancedEvolved has been created in order to provide new OCCT-algorithm combining BRepFill_PipeShell and BOPAlgo_MakerVolume.

A change in BOPAlgo_PaveFiller.cxx has been made in order to solve a specific problem of Boolean operation.

The interface of DRAW-command "evolved" has been updated to add the new option. DRAW-command "evolvedsolid" has been deleted. Now it is replaced with DRAW-command "evolved" with the option "-solid".

Testgrid "evolved" has been created.
2019-05-07 14:20:58 +03:00
ifv
6f2411378b 0030433: Checkshape: bad solid, created by revolution, is reported as valid.
BRepPrimAPI_MakeRevol.cxx, hxx
Insert checking of self-intersecting of generated surfaces in MakeRevol

BRepTest_SweepCommands.cxx
Adjusting command revol to current behavior of MakeRevol algorithm.
2019-05-06 15:57:56 +03:00
kgv
66278500db 0030672: Visualization - AIS_InteractiveContext::SetLocation() sets invalid selection BVH flag to removed object
SelectMgr_SelectionManager::Remove() now deactivates selection before removal.
2019-04-26 16:59:35 +03:00
kgv
245cbf9441 0030669: Visualization - AIS_Manipulator ignores parent transformation
AIS_Manipulator::Transform() now considers object parent transformation.

Added new command vchild for easier testing of low-level connections between presentations.
2019-04-25 16:41:17 +03:00
azv
6fd9bdf2cc 0030645: Modeling Algorithms - B-spline segmentation produces wrong parametrization
Method Segment() of B-spline curve and surface has been extended by parameter theTolerance (theUTolerance and theVTolerance for surface), which defines the proximity between knots of a NURBS and boundaries of cutting segment. The default value of the tolerance is Precision::PConfusion().
Test cases have been added to check segmenting of B-spline surface and curves both 2D and 3D.
2019-04-23 18:17:47 +03:00
ifv
d1775ee992 0030621: Implementation of building U-periodical surfaces.
draw_test_harness.md - description of new options in Draw commands

AppDef_BSplineCompute.hxx, BRepApprox_TheComputeLineOfApprox.hxx, GeomInt_TheComputeLineOfWLApprox.hxx, Approx_BSplComputeLine.gxx - implementation of method SetPeriodic(...) and implementation periodic boundary conditions for multiline in order to get periodic multicurve.

GeomAPI_PointsToBSplineSurface.hxx, GeomAPI_PointsToBSplineSurface.cxx - adding new parameter for methods Init(...) and Interpolate(...), implementation of building periodic tangents for first and last AppDef_MultiPointConstraint of multiline for U direction of surface.

GeometryTest_APICommands.cxx - implementation of new functionality in Draw command surfapp and surfint

GeomFill_NSections.cxx
Fixing problem with bugs modalg_3 bug606_2
2019-04-23 18:12:16 +03:00
tiv
293211aee0 0030592: Draw Harness, ViewerTest - provide vbackground command unifying vsetbg, vsetbgmode, vsetgradientbg, vsetgrbgmode, vsetcolorbg
A new command vbackground is created. Old background commands are made aliases for the newly created command (including vsetdefaultbg).
Tests are modified using newly added command vbackground.
2019-04-22 19:31:24 +03:00
vro
1bbd7c793c 0030663: Visualization - synthesize italic style for a font having no italic style
Font_FTFont now defines shear transformation to synthesize italic style for fonts having no such style.
Font_FontMgr::FindFont() and command "vfont -find" have been extended with -strict option
to check whether the given font is actually registered or not.
Font_FTFont::Init() - added constructor from memory buffer.
Second Font_FTFont::Init() override has been renamed to Font_FTFont::FindAndInit()
to avoid ambiguity between two similar methods taking full font path and font name as string.
2019-04-22 19:28:11 +03:00