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

2453 Commits

Author SHA1 Message Date
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
ifv
ba7f665dce 0030435: Improving performance of Approx_ComputeCLine
1. Approx_ComputeCLine.gxx, Approx_FitAndDivide.hxx, Approx_FitAndDivide2d.hxx, BRepFill_ComputeCLine.hxx
It is base modification, which allows improve performance of approximation with help of Approx_ComputeCLine. The main idea of improvement is using degree selection by inverse order - from maxdegree to mindegree. If tolerance for maxdegree is not reached, there is no sense to make approximation for current number of knots with lower degree, it is necessary to cut parametric interval.

2. ProjLib_ComputeApprox, ProjLib_ComputeApproxOnPolarSurface, ProjLib_ComputeApproxOnPolarSurface, ProjLib_ProjectOnPlane
It is additional modification of methods using Approx_ComputeCLine.
Mainly, modifications concern to more optimal choosing parameters for approximation algorithm.

3. BRepCheck_Face
Small improvement of method Intersect(...), which intersects two wires on face.

4. BRepTopAdaptor_FClass2d
Impovement of treatment infinitely narrow faces.

5. ChFi3d/ChFi3d_Builder_6.cxx
Small improvement, which forbids extension of singular boundary of surface.
It was TODO problem in tests/bugs/modalg_7/bug27711_3

6. IntTools_EdgeEdge.cxx
Improvement of performance for cases of searching common parts between line  and analytical curve

7. GeomliteTest_CurveCommands.cxx
Adding Draw command fitcurve. This command is analog of approxcurve, but uses Approx_FitAndDivide algorithm.
Mainly to have direct draw command for testing Approx_ComputeCLine.

8. Extrema_ExtElC.cxx

Treatment of case "infinite solutions" for extrema line-ellipse

9. Modification of some tests according to new behavior of algorithm.

10. tests/perf/moddata/bug30435
Test for new improved algorithm.

11. Implementation QAcommand OCC30435 in QABugs_20.cxx used in test bug30435
2019-04-22 14:03:45 +03:00
ifv
833034f301 0030647: Geom2dGcc_Circ2d2TanRad not giving all the solutions
Method for calculation of correct number of sampling points is added for
Adaptor2d_OffsetCurve.
Now number of sampling points correspond with similar method for
Geom2dAdaptor_Curve for curve type GeomAbs_OffsetCurve
Test case added
2019-04-16 14:07:45 +03:00
jgv
a5278fc126 0030597: BRepOffsetAPI_MakePipeShell raises Standard_RangeError
Constructor of GeomFill_SectionPlacement has been corrected: add correction of boundaries of curve to avoid mistake of LocateU in the case when the curve is BSpline.
2019-04-12 11:34:54 +03:00
emv
cea8d5c1ab 0030629: Modeling Algorithms - Invalid result of fuse operation
Plane/Torus intersection: take into account the Plane-Torus distance sign to compute the correct location of the section curve.

Test case for the issue.
2019-04-08 16:03:41 +03:00
iko
84b904bc36 0030626: Visualization - manipulator crashes when is attached with scaling mode disabled
AIS_Manipulator crashes on SetPart method when 2 inputs (AIS_ManipulatorMode, Standard_Boolean) has been fixed up.
Test case for this bug has been added.
2019-04-03 19:05:38 +03:00
gka
33defc7121 0030616: Crash on reading STEP file
Added protections to avoid exceptions for null objects.
For reading entity StepShape_ToleranceValue was added reading lower and upper bounds represented by entities "StepRepr_ReprItemAndMeasureWithUnit" or "StepRepr_MeasureRepresentationItem"
2019-04-02 21:24:57 +03:00
emv
d84b49c743 0030522: Modeling Algorithms - BRepBuilderAPI_MakeWire produces different wires depending on the order of parameters
The following improvements have been implemented in BRepLib_MakeWire class to make it more reliable:
1. Quit adding edges of a wire into result if the current edges have not been added. Return NotDone status.
2. Allow merging not only bounding vertices (connected to only one edge) but also the middle ones, so the multi-connected vertices may appear in the result.

Test case for the issue.
2019-03-22 17:21:01 +03:00
ifv
afb3647b34 0030489: Modeling Algorithms - BRepBuilderAPI_GTransform hangs
Approx_ComputeCLine.gxx - criterium to stop interval cutting is increased.
ProjLib_ProjectedCurve.cxx - fix regression for bugs modalg_5 bug25886
Other tests are modified according to current state of algorithm
2019-03-22 17:21:00 +03:00
kgv
85831628d6 0027316: Draw Harness - access violation on passing non-existing shape to XAddShape
Add NULL check to XAddShape command.
Removed broken test case bugs/step/bug27316.
2019-03-21 13:15:15 +03:00
kgv
de07af824b 0030594: Data Exchange - access violation within IGESGeom_BSplineCurve constructor
Added NULL check.
2019-03-20 18:11:41 +03:00
kgv
cb6cad7df1 0023838: Modeling Data - Standard_OutOfRange in Geom_OffsetSurface::LocalDN (called by BRepFill_PipeShell)
Fixed incorrect array allocation within GeomEvaluator_OffsetSurface::CalculateDN()
and protection against assigning out-of-range values in case of non-square
number of U and V derivatives on surface.
2019-03-20 11:25:06 +03:00
vro
43c8661e5e 0030536: Foundation Classes - TCollection_ExtendedString::StartsWith() and EndsWith() have a mistake
Draw-commands StartsWith and EndsWith are renamed to QAStartsWith and QAEndsWith.
The test script bug30536 was corrected.
2019-03-18 19:46:00 +03:00
abv
404504b234 0030544: Data Exchange - IGES import fails on specific file
Method IGESToBRep_BRepEntity::TransferEdge() is fixed to record result even if it is wire rather than edge.
This allows translation of EdgeLoop entities referring to CompositeCurve items in EdgeList entities.
Curves that fail to translate are recorded in result as Null shapes (rather than skipping them) to keep indexation of curves in EdgeList valid for remaining ones.

Method IGESToBRep_BRepEntity::TransferLoop() is improved to skip failed edges thus avoiding exception and allowing translation to complete for transferable entities.

Warning messages are corrected to be more meaningful.
Added test bugs iges bug30544
2019-03-18 19:45:07 +03:00
kgv
6b121e2b48 0030584: Modeling Algorithms, BRepFill_OffsetWire - access violation on Face having no boundaries
Added missing NULL and empty result checks.
Updated test cases using offset_wire_092.brep shape containing all Edges
with TopAbs_INTERNAL orientation (hense no boundary to make offset).
2019-03-18 19:42:47 +03:00
kgv
737e9a8da4 0030571: Visualization, TKOpenGl - mapped texture is ignored while drawing points
OpenGl_AspectsTextureSet now appends Sprite texture to the end of texture set.
OpenGl_Context::init() - fixed usage of GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS on too old GL context.

Default sampler names occSampler0, occActiveSampler and occSamplerBaseColor
are now excluded from header with common declarations for build-in GLSL programs.

OpenGl_ShaderObject::LoadAndCompile() and OpenGl_ShaderProgram::Link()
now includes program Id within error log.

OpenGl_ShaderManager now supports mapping texture onto point primitive within built-in programs
(texture transformation is ignored).
2019-03-16 16:48:21 +03:00
oan
ad4b04291f 0030511: Mesh - too long meshing of assembly containing single solid (shared)
Added test case.
2019-03-16 16:46:53 +03:00
kgv
f2b42160f4 0030575: Tests - v3d/materials unstable image screenshots of alpha-blending on GeForce with MSAA
testdiff now looks for "IMAGE_COLOR_TOLERANCE: Tol" statements in log
to execute diffimage with -toleranceOfColor Tol parameter.

Image difference is first performed with 0 tolerance and then optionally with non-zero tolerance,
so that the log always includes information that some images are different,
but with two different messages:
- "IMAGE differs" for images failed comparison;
- "IMAGE is similar" for images passed comparison only with non-zero tolerance.

v3d/materials - disabled MSAA and removed duplicate.
demo/samples/materials - compare screenshots with 0.8% color tolerance (2/255).
2019-03-16 16:46:52 +03:00