1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-29 14:00:49 +03:00

Compare commits

..

23 Commits

Author SHA1 Message Date
kgv
2c9d55a1aa 0031373: Samples - provide sample combining OCCT and 3 viewer 2020-02-17 15:14:34 +03:00
kgv
566851816b 0031315: Visualization - marker texture is lost after multi-textured object
OpenGl_Context::BindTextures() now iterates over pair of texture sets
considering inconsistent texture unit ranges.
2020-02-17 14:35:46 +03:00
kgv
b380b06c5d 0031206: Foundation Classes, Message_PrinterSystemLog - log messages to Browser console within Emscripten
Message_PrinterOStream::SetConsoleTextColor() skips color tags in case of Emscripten.
Message_PrinterSystemLog now implements log via emscripten_log().
2020-02-17 14:35:46 +03:00
kgv
c64efd9e30 0031375: Visualization, TKOpenGl - suppress warning on WebGL 1.0
Check for WebGL version in advance.
2020-02-17 14:35:44 +03:00
kgv
cd43c08f2b 0031372: Visualization, TKOpenGl - failed to create texture on OpenGL ES 2.0 due to unknown GL_TEXTURE_BASE_LEVEL
OpenGl_Sampler::applySamplerParams() has been corrected to check for OpenGL ES 3.0
when applying GL_TEXTURE_BASE_LEVEL/GL_TEXTURE_MAX_LEVEL parameters.
2020-02-16 15:05:41 +03:00
nds
28b13b31aa 0031014: Inspectors - variables for Qt in CMake
It restores path to Qt binaries in 3RDPARTY_DLL_DIRS for correct start TInspectorEXE under VStudio.
2020-02-13 20:48:05 +03:00
sshutina
10ac040338 0031336: Modeling data - extend BRepPrimAPI_MakeBox with planar shape creation
-Create a new package BRepPreviewAPI, inherited from BRepPrimAPI to create both, valid and degenerative shapes
-Create a new class BRepPreviewAPI_MakeBox for working with a box
    Preview can be vertex, edge, rectangle or box
-BRepPrim_GWedge: in the case of non-valid data, the exception does not happen in the constructor, but at the moment of access to the shape
-BRepPrimAPI_MakeBox: myWedge is now not private, but protected, because used in  BRepPreviewAPI_MakeBox which inherits from BRepPrimAPI_MakeBox
-Add tests for checking of a creation a preview in tests/geometry/preview (vertex, edge, rectangle, box)
-Update a command "box": add new parameters
2020-02-12 18:00:37 +03:00
nds
7e1c1e4869 0030268: Inspectors - improvements in VInspector plugin
- Convert package creation. It is used to prepare some auxiliary presentations/methods to prepare variables for inspector based on occt classes.
- ViewControl package improvement:
  Classes for property view, table, table model are implemented to visualize view of properties.
  This view is filled by selection in tree if the selected object has implemented DumpJson functionality.
- TreeModel package improvements:
  Method InitColumn is implemented in TreeModel_TreeModel to fill default columns in base model. The default columns are:
    Name, Visibility, Rows. Additional columns should be added in successors.
  Container of root items is moved into the base class
- View package imrovements:
  Store preferences: display mode, fit all checked state and type of external context
  View_DisplayPreview is added to process preview for selected in tree view objects
  hide actions Clear, Multi, Single by default (as selection in tree view or Visibility state of item define which presentations should be displayed or erased)
- ShapeView plugin improvements:
  Property View content based on DumpJson (columns in tree view for properties are removed),
  Properties for TopoDS_Shape are displayed
  Explode shape action in tree view to see content of shape by selected shape type. Type of displayed shapes is only preview, it is not used in export action.
  Export shape into BREP. The previous implementation about BREP files in some directory and default view is removed.
- VInspector plugin imrovements:
  Property View content based on DumpJson (columns in tree view for properties are removed),
  Properties for AIS_InteractiveContext and AIS_InteractiveObject are displayed
  obsolete classes to provide properties are removed.
- DFBrowser plugin improvements:
  Property View content based on DumpJson is not used yet. But there is the USE_DUMPJSON macro. It's switch off by default.
  If switch ON, it creates a Property View filled with DumpJson. It's a way of DFBrowser moving on this property view.
  Init uses static variable CDF_Session::CurrentSession()->CurrentApplication to fill plugin if application in plugin is not set but OCAF application exists

- OCC_VERSION_HEX variable used for previous OCCT versions support (before 6.9.0 or 7.2.0) is removed
2020-02-12 18:00:36 +03:00
kgv
a2803f37e7 0031341: Visualization - Graphic3d_Layer::UpdateCulling() ignores Presentation range
Graphic3d_Layer::UpdateCulling() now takes into account BVH_Tree::EndPrimitive().
'vstatprofiler structs' now properly prints number of structures in case of no culling.
2020-02-11 18:42:13 +03:00
abv
18348b382e 0031364: Foundation Classes - unused enumerations in GeomAbs package
Files GeomAbs_CurveForm.hxx, GeomAbs_SurfaceForm.hxx, GeomAbs_UVSense.hxx are removed
2020-02-11 18:42:12 +03:00
abv
64e68ea690 0031363: Documentation - broken Doxygen documentation of header files in Standard package
Documentation is corrected
2020-02-11 18:42:12 +03:00
anv
bee13ef1cf 0031360: Modeling Algorithms - Removing redundant class
math_GaussPoints was removed.
2020-02-07 18:23:45 +03:00
kgv
e73ef9d219 0031356: Visualization - out of range within StdPrs_WFShape::AddEdgesOnTriangulation()
Removed unused code causing the issue.
2020-02-07 14:22:01 +03:00
anv
8b3fbdef34 0031233: Reading SAT files produces invalid shapes
Added removal of overlapping "tails" while splitting wires with a seam edge in ShapeFix_ComposeShell::SplitWire.
2020-02-06 18:01:21 +03:00
kgv
e2550e48f1 0031333: Data Exchange - RWGltf_TriangulationReader::readBuffer() fails to read interleaved buffer at the end of file
Standard_ReadBuffer has been extended with a flag for reading an interleaved data.
RWGltf_TriangulationReader::readBuffer() uses new flag for reading vertex attributes.
2020-02-06 17:45:05 +03:00
oan
62beabff7c 0025551: BRepMesh can produce internal nodes outside the face interior based on distorted BSpline surface
updated test script to see the difference on current version of OCCT
2020-02-06 17:41:07 +03:00
oan
5e06dfcb32 0028247: Effect of minSize parameter of BRepMesh_IncrementalMesh seems to be too strong Updated description of MinSize parameter of IMeshTools_Parameters 2020-02-06 17:41:06 +03:00
oan
35befde2ad 0026382: BRepMesh produces internal nodes outside the face interior
updated test script: clean up shape before meshing to see the difference
2020-02-06 17:41:06 +03:00
nds
bc73b00672 0031313: Foundation Classes - Dump improvement for classes
- Provide DumpJson for geometrical, ocaf and visualization classes;
- Change depth parameter of DumpJson (constant is not obligate here)
- Introduce a new macro for transient objects to be called as the first row in DumpJson: OCCT_DUMP_TRANSIENT_CLASS_BEGIN. We need not put the class name in the macro, using get_type_name of Standard_Transient for it.
- change implementation of OCCT_DUMP_CLASS_BEGIN and OCCT_DUMP_TRANSIENT_CLASS_BEGIN. It is not an sentry more and it does not create a new hierarchy level. It appends a new row into the output stream: "className": <className>
- OCCT_DUMP_* does not require semicolon
- class header is included first in source files of TDataStd, TDocStd, TCAFDoc
2020-01-31 17:13:40 +03:00
kgv
00ea7f2676 0031321: C# wrapper - wrap AIS_ViewController
Added missing virtual destructor for AIS_ViewController.
2020-01-31 16:54:16 +03:00
nds
fe758dbe2c 0031322: Visualization, Select3D_SensitiveEntity - method NbSubElements() should be const
Set constant state for the method NbSubElement to be able to call it from other constant methods (e.g. DumpJson of Select3D_SensitiveEntity).
2020-01-30 18:58:32 +03:00
kgv
8811d6f2aa 0031332: Data Exchange - RWGltf_CafReader ignores bufferView.byteStride within glTF 2.0
RWGltf_GltfJsonParser::gltfParseBufferView() now reads byteStride parameter within bufferView.
2020-01-30 18:55:55 +03:00
nds
1939cfd9cb 0030904: Visualization - OSD_MemInfo provide Update with parameter of computation kind
Added method OSD_MemInfo::SetActive() for disabling specific counter.
2020-01-28 18:02:35 +03:00
814 changed files with 11624 additions and 4494 deletions

View File

@@ -108,6 +108,7 @@ n BRepMesh
n BRepMeshData
n BRepOffset
n BRepOffsetAPI
n BRepPreviewAPI
n BRepPrim
n BRepPrimAPI
n BRepProj

View File

@@ -7,7 +7,8 @@ if (NOT DEFINED ${3RDPARTY_QT_DIR} AND ${3RDPARTY_QT_DIR} STREQUAL "")
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" Qt 3RDPARTY_QT_DIR_NAME)
if (NOT DEFINED ${3RDPARTY_QT_DIR_NAME} AND ${3RDPARTY_QT_DIR_NAME} STREQUAL "")
message (FATAL_ERROR "... Qt root directory was not found")
set (3RDPARTY_QT_DIR "" CACHE PATH "The directory containing qt")
message (FATAL_ERROR "Could not find used third-party product: 3RDPARTY_QT_DIR")
endif()
# Combine directory name with absolute path and show in GUI
@@ -31,4 +32,10 @@ if (NOT ${Qt5_FOUND})
#message (STATUS "Qt4 cmake configuration")
else()
#message (STATUS "Qt5 cmake configuration")
endif()
endif()
if (3RDPARTY_QT_DIR OR EXISTS "${3RDPARTY_QT_DIR}")
list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_QT_DIR}/bin")
else()
list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_QT_DLL_DIR)
endif()

View File

@@ -1,135 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" id="layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 511 511" style="enable-background:new 0 0 511 511;" xml:space="preserve">
<style type="text/css">
.st0{fill:#F2C529;}
.st1{fill:#AA741A;}
.st2{fill:#784B15;}
.st3{fill:#AA741A;stroke:#F2C529;stroke-miterlimit:10;}
.st4{fill-rule:evenodd;clip-rule:evenodd;fill:#F2C529;}
</style>
<g>
<path class="st0" d="M110.7,197.5c-1.8-4.2-3.2-8.5-4.2-12.9c-0.9-4.1-1.4-8.3-1.4-12.5c0-0.2-1.8-0.7-1.8-0.7
c-7.2-0.6-16.1-1.5-20.9-1.5c-18.8,0-65.9,0-65.9,0c-8,0-14.6,6.5-14.6,14.6v1.9c0,8,6.5,14.6,14.6,14.6H64
c11.9,0,47.3,8.6,74.8,31.4c1.4,1.2,2.7,2.1,3.9,2.9C127.9,224.4,116.8,211.6,110.7,197.5z"/>
<path class="st1" d="M110.7,197.5c-0.1-0.2-0.1-0.3-0.2-0.5c-19-4.5-36.3-5.8-42.4-5.8H20.5c-8,0-14.6-5.6-14.6-13.6v-2.9
c0-0.2,0-0.3,0-0.5c-2.6,2.6-4.1,6.2-4.1,10.1v1.9c0,8,6.5,14.6,14.6,14.6H64c11.9,0,47.3,8.6,74.8,31.4c1.4,1.2,2.7,2.1,3.9,2.9
C127.9,224.4,116.8,211.6,110.7,197.5z"/>
<g>
<path class="st0" d="M408.4,162.2c-21.1,8.6-46.3,9.6-61,9.6c-0.4,0-0.8,0.1-1.2,0.2h-76.6h-28.4h-79.8h-56.2
c0,4.3,0.5,8.4,1.4,12.5c0.9,4.4,2.3,8.7,4.2,12.9c6.2,14.1,17.2,27,31.9,37.7c20.7,15.1,48.5,26,80.2,30.7
c3.5,0.5,6.9,1,10.5,1.3c7.8,0.8,15.7,1.2,23.8,1.2c5.8,0,11.6-0.2,17.2-0.6c3.3-0.2,6.5-0.5,9.7-0.9c24.6-2.8,47.2-9.4,66.2-18.8
c0.3-0.2,0.6-0.3,1-0.5c1.7-0.9,3.6-1.9,5.7-3c31.9-17.8,52.2-43.9,52.2-73C409.1,168.3,408.8,165.2,408.4,162.2z"/>
<path class="st2" d="M257.1,270.3c-8,0-16-0.4-24-1.2c-3.6-0.4-7.1-0.8-10.6-1.3c-31.6-4.6-59.6-15.4-81.1-31
c-15.1-11-26.4-24.4-32.5-38.5c-1.9-4.3-3.3-8.8-4.3-13.3c-0.9-4.3-1.4-8.7-1.4-12.9l0-1.9h242.6c0.5-0.1,1-0.2,1.5-0.2
c24.6,0,44.9-3.2,60.3-9.5l2.2-0.9l0.4,2.4c0.5,3.2,0.7,6.5,0.7,9.6c0,28.7-19.4,55.9-53.1,74.7c-2.2,1.1-4.1,2.1-5.7,3l-1,0.5
c-19.5,9.7-42.6,16.2-66.8,19c-3.2,0.4-6.5,0.7-9.8,0.9C268.5,270,262.7,270.3,257.1,270.3z M107,173.9c0.1,3.4,0.6,6.8,1.3,10.3
c0.9,4.2,2.3,8.5,4,12.6c5.9,13.5,16.7,26.3,31.3,36.9c21,15.3,48.4,25.8,79.4,30.4c3.4,0.5,6.9,1,10.4,1.3
c13.3,1.3,26.6,1.6,40.7,0.5c3.2-0.2,6.5-0.5,9.6-0.9c23.8-2.7,46.5-9.2,65.6-18.6l0.9-0.5c1.6-0.9,3.6-1.9,5.7-3
c32.5-18.1,51.1-44.1,51.1-71.4c0-2.2-0.1-4.4-0.4-6.7c-15.5,5.9-35.5,8.9-59.4,8.9c-0.2,0-0.4,0-0.6,0.1l-0.6,0.1H107z"/>
</g>
<path class="st2" d="M402.5,170.7h-31.7c-2.9,0.3-5.8,0.5-8.5,0.6c-3.4,0.2-6.7,0.3-9.6,0.4c-4.1,21.3-17.2,40.1-35.9,53.6
c-1.5,1-2.9,2-4.1,2.8c-0.2,0.1-0.5,0.3-0.7,0.4c-13.6,8.7-29.7,14.9-47.3,17.5c-2.3,0.3-4.6,0.6-7,0.8c-4,0.4-8.2,0.6-12.3,0.6
c-5.8,0-11.5-0.4-17-1.1c-2.5-0.3-5-0.7-7.5-1.2c-19.8-3.8-38-13.3-54-22.5c0,0,0,0,0,0c0,0,0,0,0,0c-1-0.7-17.5-10.8-29.9-16.9
c-3.1-1.5-5.9-2.8-8.2-3.6c-6.1-2.1-12.3-3.8-18.3-5.2c0.1,0.2,0.1,0.3,0.2,0.5c6.2,14.1,17.2,27,31.9,37.7
c20.7,15.1,48.5,26,80.2,30.7c3.5,0.5,6.9,1,10.5,1.3c7.8,0.8,15.7,1.2,23.8,1.2c5.8,0,11.6-0.2,17.2-0.6c3.3-0.2,6.5-0.5,9.7-0.9
c24.6-2.8,47.2-9.4,66.2-18.8c0.3-0.2,0.6-0.3,1-0.5c1.7-0.9,3.6-1.9,5.7-3c15.8-8.8,28.7-19.6,37.8-31.9
c8.5-11.5,13.5-24.2,14.3-37.6C408.9,172,405.9,170.7,402.5,170.7z"/>
<g>
<path class="st0" d="M269.5,145.6c0-7.8-6.4-14.2-14.2-14.2s-14.2,6.4-14.2,14.2v15.6h28.4V145.6z"/>
<path class="st1" d="M271.4,163h-32.2v-17.5c0-8.9,7.2-16.1,16.1-16.1s16.1,7.2,16.1,16.1V163z M243,159.3h24.6v-13.7
c0-6.8-5.5-12.3-12.3-12.3c-6.8,0-12.3,5.5-12.3,12.3V159.3z"/>
</g>
<g>
<path class="st0" d="M469.2,144c-29.8,0-39.7,9.5-60.8,18.1c0,0,0,0,0,0c0.5,3.1,0.7,6.2,0.7,9.3c0,29.2-20.2,55.3-52.2,73
c13.9-7.1,36.6-17.1,56.6-19.6c23.5-2.9,47.7-1,55.7-1c22,0,39.9-17.9,39.9-39.9S491.3,144,469.2,144z M467.9,211.7
c-15.7,0-28.4-12.7-28.4-28.4c0-15.7,12.7-28.4,28.4-28.4s28.4,12.7,28.4,28.4C496.3,199,483.6,211.7,467.9,211.7z"/>
<path class="st1" d="M357.8,246.2l-1.8-3.3c32.5-18.1,51.2-44.1,51.2-71.4c0-2.9-0.2-6-0.7-9l-0.3-1.7l1.6-0.4
c5.2-2.1,9.6-4.3,13.9-6.3c13.3-6.4,24.7-11.9,47.5-11.9c23,0,41.8,18.7,41.8,41.8s-18.7,41.8-41.8,41.8c-1.7,0-4.2-0.1-7.3-0.2
c-11.2-0.4-29.9-1.1-48.2,1.2C393,229.3,369.8,240,357.8,246.2z M410.4,163.3c0.3,2.7,0.5,5.5,0.5,8.1c0,22.6-12,44.3-33.6,61.6
c11-4.4,23.8-8.6,35.9-10.1c18.6-2.3,37.5-1.7,48.8-1.3c3,0.1,5.5,0.2,7.2,0.2c21,0,38-17.1,38-38s-17.1-38-38-38
c-21.9,0-33,5.3-45.9,11.5C419.3,159.4,415.2,161.4,410.4,163.3z M467.9,213.5c-16.7,0-30.3-13.6-30.3-30.3s13.6-30.3,30.3-30.3
c16.7,0,30.3,13.6,30.3,30.3S484.6,213.5,467.9,213.5z M467.9,156.7c-14.6,0-26.5,11.9-26.5,26.5c0,14.6,11.9,26.5,26.5,26.5
c14.6,0,26.5-11.9,26.5-26.5C494.4,168.6,482.5,156.7,467.9,156.7z"/>
</g>
<g>
<path class="st0" d="M356.9,244.5c-2.1,1.1-4,2.1-5.7,3C353.2,246.6,355.1,245.6,356.9,244.5z"/>
<path class="st1" d="M352.1,249.2l-1.7-3.3c1.7-0.9,3.6-2,5.8-3l1.8,3.3C356,247.2,354,248.2,352.1,249.2z"/>
</g>
<path class="st0" d="M234,275.4c0.3,4.2,0.4,8.9,0.4,14.4c0,23.1-10.3,50.7-33.4,64.6c-15.6,9.4-26.2,11.6-31.4,12
c0,0-1.8,0.1-1.9,0.1c-1.1,0.2-1.9,1.1-1.9,2.2v10.9H342v-10.9c0-1.1-0.8-2-1.9-2.2c-0.1,0-1.9-0.1-1.9-0.1
c-5.2-0.4-15.8-2.6-31.4-12c-23.1-14-33.4-41.5-33.4-64.6c0-5.5,0.2-10.2,0.4-14.4c-5.9,3.4-12.6,5.3-19.9,5.3
C246.6,280.7,239.8,278.8,234,275.4z"/>
<path class="st1" d="M274.3,267.7c-5.7,0.4-11.4,0.6-17.2,0.6c-8.1,0-16-0.4-23.8-1.2c-3.5-0.4-7-0.8-10.5-1.3
c3.1,3.8,6.9,7,11.2,9.5c5.9,3.4,12.6,5.3,19.9,5.3c7.2,0,14-2,19.9-5.3c3.9-2.3,7.4-5.1,10.3-8.5
C280.9,267.2,277.6,267.5,274.3,267.7z"/>
<path class="st1" d="M422.8,176c0-5.2,30.8-25.5,32.4-30.2c1-3-27.5,9.4-25.9,6.7c-6.5,3-12.9,6.3-20.9,9.6c0,0,0,0,0,0
c-12.1,4.9-25.5,7.4-37.6,8.5h31.7c3.4,0,6.4,1.3,6.4,4.3l0,1.1c-2,27.3-21.8,51.6-52,68.4c13.9-7.1,36.6-17.1,56.6-19.6
c23.5-2.9,47.7-1,55.7-1c1.8,0,3.6-0.2,5.4-0.4C442.9,224.4,422.8,203.8,422.8,176z"/>
<path class="st2" d="M255.3,131.4c-4.6,0-8.7,2.3-11.3,5.7c1.4-0.6,2.9-0.9,4.5-0.9c6.6,0,11.9,5.3,11.9,11.9v13.1h9.1v-15.6
C269.5,137.7,263.2,131.4,255.3,131.4z"/>
<g>
<path class="st0" d="M329.2,161.1h-59.7h-28.4h-61.7c-5.9,0-18.2,4.8-18.2,10.6v0.2h79.8h28.4h76.6c0.4-0.1,0.8-0.2,1.2-0.2
C347.4,165.9,335.1,161.1,329.2,161.1z"/>
<path class="st2" d="M346.5,173.9H159.4V172c0-7.9,14.1-12.7,20-12.7h149.8c5.9,0,20,4.9,20,12.5v1.9h-1.9c-0.2,0-0.4,0-0.6,0.1
L346.5,173.9z M163.7,170.1H345c-2.2-3.6-10.8-7.1-15.8-7.1H179.4C174.5,163,165.9,166.5,163.7,170.1z"/>
</g>
<path class="st2" d="M329.2,161.1h-43.6c5.9,0,18.2,5,18.2,10.9h42.4c0.4-0.1,0.8-0.2,1.2-0.2C347.4,165.9,335.1,161.1,329.2,161.1
z"/>
<path class="st2" d="M343.9,381.5H163.8v-12.8c0-2,1.4-3.7,3.4-4.1c0.2,0,2.3-0.1,2.3-0.1c4.7-0.4,15.1-2.4,30.5-11.7
c24-14.5,32.5-43,32.5-63c0-4.6-0.1-9-0.4-13.3c-3.9-2.4-7.4-5.4-10.3-8.9c-31.3-4.7-59-15.4-80.3-30.9c-1.2-0.8-2.5-1.8-4-3
c-26.4-21.9-60.9-30.9-73.6-30.9H16.4c-9.1,0-16.4-7.4-16.4-16.4v-1.9c0-1.1,0.1-2.2,0.3-3.3c0.2-0.9,0.5-1.7,0.8-2.5
c0.1-0.2,0.1-0.4,0.2-0.5c0.8-1.9,1.9-3.6,3.4-5.1c1.5-1.6,3.2-2.8,5.2-3.6c1-0.4,1.9-0.7,2.8-0.9c0.1,0,0.3-0.1,0.4-0.1
c1.1-0.2,2.2-0.3,3.4-0.3h67.1c3.7,0,19.4,1.3,22,1.9c1.1,0.1,13.5,0.3,14.8,0.3h39.3c2-6.8,14.3-10.9,19.8-10.9h59.8v-13.7
c0-0.9,0.1-1.9,0.3-2.9c0.1-0.4,0.2-0.7,0.3-1.1l1.9,0.1l-1.8-0.5c0.1-0.4,0.2-0.8,0.4-1.2c0.2-0.6,0.5-1.1,0.7-1.7l0.3-0.6
c0.4-0.6,0.7-1.2,1.2-1.8c0.7-0.9,1.5-1.7,2.4-2.5l0.3-0.3c0.8-0.6,1.6-1.2,2.4-1.6l0.7-0.4c0.8-0.4,1.7-0.7,2.6-1
c0.4-0.1,0.6-0.2,0.8-0.3c1.3-0.3,2.4-0.4,3.6-0.4c8.9,0,16.1,7.2,16.1,16.1v13.7h57.8c5.4,0,17.7,4.1,19.7,10.6c1.2,0,2.4,0,3.7,0
c2.9-0.1,6.2-0.2,9.5-0.4c2.7-0.2,5.5-0.4,8.4-0.6c4.8-0.5,9.4-1.1,13.7-1.9c1.7-0.3,3-0.6,4.3-0.9l1.1-0.2
c1.1-0.2,2.2-0.5,3.3-0.8l1.4-0.4c1-0.3,2-0.5,3-0.8l1.5-0.4c1-0.3,2-0.6,3-1l1.4-0.5c1.4-0.5,2.9-1,4.2-1.6
c1.8-0.7,3.5-1.5,5.1-2.2l1.2-0.5c1.5-0.7,3-1.4,4.4-2l5.1-2.5c13.5-6.5,24.6-11,45.7-11c23,0,41.8,18.7,41.8,41.8
c0,20.8-15.6,38.6-36.2,41.4c-0.8,0.1-1.5,0.2-2.3,0.3c-1.1,0.1-2.2,0.2-3.3,0.2c-1.7,0-4.2-0.1-7.3-0.2
c-11.2-0.4-29.9-1.1-48.2,1.2c-20.8,2.6-44,13.3-55.9,19.4c-1.8,1-3.8,2-5.7,3l-1,0.5c-19.3,9.6-42.1,16.1-66.1,18.9
c-2.8,3.1-5.9,5.7-9.5,7.9c-0.2,4.3-0.4,8.8-0.4,13.3c0,20,8.5,48.6,32.5,63c15.5,9.3,25.8,11.4,30.6,11.7c0,0,2,0.1,2.2,0.1
c2,0.4,3.4,2.1,3.4,4.1V381.5z M167.6,377.8h172.6v-9c0-0.2-0.2-0.4-0.4-0.4c-0.2,0-1.6-0.1-1.6-0.1c-5.2-0.4-16.2-2.5-32.3-12.3
c-25.3-15.3-34.3-45.2-34.3-66.3c0-5,0.1-9.8,0.4-14.5l0.1-1l0.9-0.5c3.7-2.1,7-4.9,9.9-8.1l0.5-0.6l0.7-0.1
c23.8-2.7,46.5-9.2,65.6-18.6l0.9-0.5c1.9-1,3.8-2,5.7-3c12.3-6.3,35.9-17.2,57.3-19.8c18.6-2.3,37.5-1.7,48.8-1.3
c3,0.1,5.5,0.2,7.2,0.2c1,0,2-0.1,3-0.2c0.7-0.1,1.4-0.1,2.1-0.2c18.8-2.5,32.9-18.7,32.9-37.7c0-21-17.1-38-38-38
c-20.3,0-31,4.4-44,10.6L420,159c-1.4,0.7-2.9,1.4-4.4,2l-1.3,0.6c-1.7,0.7-3.4,1.5-5.2,2.2c-1.5,0.6-2.9,1.2-4.4,1.7l-1.4,0.5
c-1,0.3-2.1,0.7-3.1,1l-1.2,0.4c-1.4,0.4-2.4,0.7-3.4,0.9l-1.5,0.4c-1.1,0.3-2.3,0.5-3.4,0.8l-1.1,0.2c-1.4,0.3-2.8,0.6-4.1,0.8
c-4.8,0.9-9.5,1.5-14.4,2c-3,0.3-5.8,0.5-8.6,0.7c-3.4,0.2-6.7,0.3-9.7,0.4c-1.9,0-3.7,0-5.4,0h-1.9v-1.9c0-4.1-10.6-8.8-16.3-8.8
h-61.6v-17.5c0-6.8-5.5-12.3-12.3-12.3c-0.9,0-1.8,0.1-2.7,0.3l-0.6,0.2c-0.7,0.2-1.3,0.4-2,0.7l-0.3,0.2c-0.8,0.5-1.5,0.9-2,1.3
c-0.9,0.8-1.6,1.4-2.1,2.1l0,0c-0.3,0.4-0.6,0.9-0.9,1.4l-0.3,0.5c-0.2,0.4-0.4,0.8-0.6,1.3c-0.1,0.3-0.2,0.6-0.3,0.9l-0.1,0.4
c-0.1,0.2-0.1,0.5-0.2,0.7c-0.1,0.7-0.2,1.5-0.2,2.2V163h-63.6c-5.7,0-16.3,4.6-16.3,8.8v1.9l-1.9,0.2h-40.9
c-0.1,0-14.5-0.1-15.7-0.4c-2.1-0.5-17.4-1.8-21.1-1.8H16.4c-0.9,0-1.7,0.1-2.6,0.3c-0.1,0-0.2,0.1-0.3,0.1
c-0.7,0.2-1.4,0.4-2.1,0.7c-1.6,0.7-2.9,1.6-4.1,2.8c-1.1,1.2-2,2.5-2.6,4c0,0.2-0.1,0.3-0.1,0.4c-0.2,0.6-0.5,1.2-0.6,1.9
c-0.2,0.8-0.3,1.7-0.3,2.5v1.9c0,7,5.7,12.7,12.7,12.7H64c13.1,0,48.8,9.3,76,31.8c1.3,1.1,2.6,2,3.7,2.8
c21,15.3,48.5,25.8,79.4,30.4l0.7,0.1l0.5,0.6c2.9,3.6,6.5,6.7,10.6,9.1l0.9,0.5l0.1,1c0.3,4.6,0.4,9.5,0.4,14.5
c0,21-9,51-34.3,66.3c-16.1,9.7-27.1,11.9-32.3,12.3c-0.1,0-1.6,0.1-1.9,0.1c0,0-0.2,0.1-0.2,0.4V377.8z M467.9,213.5
c-16.7,0-30.3-13.6-30.3-30.3s13.6-30.3,30.3-30.3c16.7,0,30.3,13.6,30.3,30.3S484.6,213.5,467.9,213.5z M467.9,156.7
c-14.6,0-26.5,11.9-26.5,26.5c0,14.6,11.9,26.5,26.5,26.5c14.6,0,26.5-11.9,26.5-26.5C494.4,168.6,482.5,156.7,467.9,156.7z"/>
<path class="st3" d="M398.1,170.7"/>
<path class="st3" d="M328,172"/>
<g>
<path class="st2" d="M340.1,366.5c-0.1,0-1.9-0.1-1.9-0.1c-5.2-0.4-15.8-2.6-31.4-12c-23.1-14-33.4-41.5-33.4-64.6
c0-5.5,0.2-10.2,0.4-14.4c-5.9,3.4-12.6,5.3-19.9,5.3c-1.6,0-3.1-0.1-4.6-0.3c-0.1,2.9-0.2,6-0.2,9.4c0,23.1,13.1,59.2,15.9,67.9
c2.9,8.7,1.5,22-11.5,22H342v-10.9C342,367.6,341.2,366.7,340.1,366.5z"/>
<path class="st2" d="M343.9,381.5h-90.4v-3.8c3.9,0,6.7-1.3,8.6-3.8c3-4.1,2.8-10.8,1.2-15.7c-0.3-0.9-0.7-2-1.2-3.5
c-4.4-13.2-14.9-43.9-14.9-65c0-3.4,0.1-6.5,0.2-9.4l0.1-2l2,0.2c1.8,0.2,3.1,0.3,4.4,0.3c6.6,0,13.2-1.8,18.9-5.1l3-1.7l-0.2,3.5
c-0.3,4.6-0.4,9.4-0.4,14.3c0,20,8.5,48.6,32.5,63c15.5,9.3,25.8,11.4,30.6,11.7c0,0,2,0.1,2.2,0.1h0c2,0.4,3.4,2.1,3.4,4.1V381.5
z M263.7,377.8h76.5v-9c0-0.2-0.2-0.3-0.3-0.4c-0.4,0-1.7-0.1-1.7-0.1c-5.2-0.4-16.2-2.5-32.3-12.3
c-25.3-15.3-34.3-45.2-34.3-66.3c0-3.8,0.1-7.6,0.2-11.2c-5.6,2.6-11.7,4-17.8,4c-0.9,0-1.8,0-2.8-0.1c-0.1,2.3-0.1,4.7-0.1,7.3
c0,20.5,10.7,52,14.7,63.8c0.5,1.4,0.9,2.6,1.2,3.5c1.7,5.3,2.3,13.5-1.7,19C264.6,376.7,264.2,377.3,263.7,377.8z"/>
</g>
<g>
<path class="st4" d="M497.3,155.8c-15.7-15.7-41.4-15.7-57.1,0l-28.5,28.5l28.5,28.5c15.7,15.7,41.4,15.7,57.1,0
C513,197.1,513,171.5,497.3,155.8 M478.3,193.8L478.3,193.8c-5.2,5.2-13.8,5.2-19,0l-9.5-9.5l9.5-9.5c5.2-5.2,13.8-5.2,19,0
C483.6,180,483.6,188.6,478.3,193.8"/>
<path class="st1" d="M468.8,226.4c-10.8,0-21.6-4.1-29.8-12.3l-29.8-29.8l29.8-29.8c16.5-16.4,43.2-16.4,59.7,0l0,0
c7.9,7.9,12.3,18.5,12.3,29.8c0,11.3-4.4,21.9-12.3,29.8C490.4,222.3,479.6,226.4,468.8,226.4z M414.3,184.3l27.2,27.2
c15,15,39.5,15,54.5,0c7.2-7.2,11.2-16.9,11.2-27.2c0-10.3-4-20-11.2-27.2l0,0c-15-15-39.5-15-54.5,0L414.3,184.3z M468.8,199.6
c-3.9,0-7.8-1.5-10.8-4.5l-10.8-10.8l10.8-10.8c6-6,15.7-6,21.6,0c2.9,2.9,4.5,6.7,4.5,10.8c0,4.1-1.6,7.9-4.5,10.8l0,0
C476.6,198.1,472.7,199.6,468.8,199.6z M452.4,184.3l8.2,8.2c4.5,4.5,11.9,4.5,16.4,0l0,0c2.2-2.2,3.4-5.1,3.4-8.2
c0-3.1-1.2-6-3.4-8.2c-4.5-4.5-11.9-4.5-16.4,0L452.4,184.3z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -150,7 +150,8 @@ Steps to prepare dump of the object into json:
1. Create method <b>DumpJson</b>. The method should accept the output stream and the depth for the fields dump.
Depth, equal to zero means that only fields of this class should be dumped. Default value -1 means that whole tree of dump will be built recursively calling dump of all fields.
2. Put into the first row of the method <b>OCCT_DUMP_CLASS_BEGIN</b>. This macro creates a local variable, that will open Json structure on start, and close on exit from this method.
2. Put into the first row of the method <b>OCCT_DUMP_CLASS_BEGIN</b> or <b>OCCT_DUMP_TRANSIENT_CLASS_BEGIN</b> (for Standard_Transient objects).
This macro appends class name into output stream.
3. Add several macro to store field values.

View File

@@ -1888,3 +1888,7 @@ Unexpected const-ness of Aspect_Window::DoResize() method has been removed, so t
@subsection upgrade_750_rename Renaming of types
Enumeration BRepOffset_Type is renamed to ChFiDS_TypeOfConcavity.
@subsection upgrade_750_sensitiveEntity Select3D_SensitiveEntity interface change
The method Select3D_SensitiveEntity::NbSubElements() has been changed to be constant. Select3D_SensitiveEntity subclasses at application level should be updated accordingly.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -52,6 +52,14 @@ namespace
return aDevicePixelRatio;
});
/*EM_JS(void, jsSetOcctCamera, (float theFOV, float theAspect, float theNear, float theFar), {
setOcctCamera();
});*/
EM_JS(void, jsPostFrameRender, (), {
postFrameRender();
});
//! Return cavas size in pixels.
static Graphic3d_Vec2i jsCanvasSize()
{
@@ -336,7 +344,13 @@ void WasmOcctView::handleViewRedraw (const Handle(AIS_InteractiveContext)& theCt
const Handle(V3d_View)& theView)
{
myUpdateRequests = 0;
theView->Invalidate(); /// Three.js cannot be rendered properly without full redraw
glEnable (GL_POLYGON_OFFSET_FILL); /// reset defaults Graphic3d_PolygonOffset after Three.js
glPolygonOffset (1.0f, 1.0f);
AIS_ViewController::handleViewRedraw (theCtx, theView);
jsPostFrameRender();
if (myToAskNextFrame)
{
// ask more frames

View File

@@ -4,6 +4,7 @@
#include <Message.hxx>
#include <Message_Messenger.hxx>
#include <Message_PrinterSystemLog.hxx>
#include <OSD_MemInfo.hxx>
#include <OSD_Parallel.hxx>
@@ -56,6 +57,8 @@ static void onFileReadFailed (void* theOpaque)
int main()
{
Message::DefaultMessenger()->Printers().First()->SetTraceLevel (Message_Trace);
Handle(Message_PrinterSystemLog) aJSConsolePrinter = new Message_PrinterSystemLog ("webgl-sample", Message_Trace);
Message::DefaultMessenger()->AddPrinter (aJSConsolePrinter); // open JavaScript console within the Browser to see this output
Message::DefaultMessenger()->Send (TCollection_AsciiString("NbLogicalProcessors: ") + OSD_Parallel::NbLogicalProcessors(), Message_Trace);
aViewer.run();
Message::DefaultMessenger()->Send (OSD_MemInfo::PrintInfo(), Message_Trace);

View File

@@ -16,6 +16,7 @@
<div><label for="fileInput">Choose BREP file to upload: </label><input type="file" id="fileInput" accept=".brep"></div>
<h4>Console output:</h4>
<p id="output"></p>
<script src="three.min.js"></script>
<script>
//! Resize canvas to fit into window.
function updateCanvasSize()
@@ -57,6 +58,7 @@ if (!isWasmSupported())
{
var anElement = document.getElementById('output');
anElement.innerHTML += "Browser is too old - WebAssembly support is missing!<br>Please check updates or install a modern browser.<br>";
throw new Error();
}
//! Define OCCT WebGL Viewer module.
@@ -76,6 +78,44 @@ var Module =
})()
};
var aCanvas = document.getElementById ('canvas');
var aGlCtx = aCanvas.getContext ('webgl2', { alpha: false, depth: true, antialias: false, preserveDrawingBuffer: true } );
if (aGlCtx == null)
{
aGlCtx = aCanvas.getContext ('webgl', { alpha: false, depth: true, antialias: false, preserveDrawingBuffer: true } );
}
var aScene = new THREE.Scene();
var aCamera = new THREE.PerspectiveCamera (75, window.innerWidth / window.innerHeight);
//var aRenderer = new THREE.WebGLRenderer ({antialias: true});
var aRenderer = new THREE.WebGLRenderer ({antialias: false, canvas: aCanvas, context: aGlCtx});
aRenderer.autoClear = false;
aRenderer.autoClearColor = false;
aRenderer.autoClearDepth = false;
aRenderer.autoClearStencil = false;
aRenderer.setSize (window.innerWidth,window.innerHeight);
//document.body.appendChild (aRenderer.domElement);
var aGeom = new THREE.BoxGeometry (1,1,1);
var aMat = new THREE.MeshBasicMaterial ({color: 0xff0000});
var aCube = new THREE.Mesh (aGeom, aMat);
aScene.add (aCube);
aCube.position.z = -5; aCube.rotation.x = 10; aCube.rotation.y = 5;
/*aRenderer.render (aScene, aCamera);
var anAnimate = function(){
aCube.rotation.x += 0.01;
aRenderer.state.reset();
aRenderer.render (aScene, aCamera);
requestAnimationFrame (anAnimate);
}
anAnimate();*/
function postFrameRender()
{
//console.log("postFrameRender()"); ///
//aCamera.
aRenderer.state.reset();
aRenderer.render (aScene, aCamera)
}
//! Handle file uploading.
fileInput.onchange = function()
{

View File

@@ -1216,6 +1216,9 @@ public: //! @name sub-intensity management (deprecated)
//! @param theSelection an instance of the selection
void SetSelection (const Handle(AIS_Selection)& theSelection) { mySelection = theSelection; }
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
protected: //! @name internal methods
Standard_EXPORT void GetDefModes (const Handle(AIS_InteractiveObject)& anIobj, Standard_Integer& Dmode, Standard_Integer& HiMod, Standard_Integer& SelMode) const;

View File

@@ -86,3 +86,42 @@ void AIS_InteractiveContext::PolygonOffsets(
anObj->PolygonOffsets( aMode, aFactor, aUnits );
}
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void AIS_InteractiveContext::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myObjects.Size())
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, mgrSelector.get())
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myMainPM.get())
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myMainVwr.get())
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myMainSel.get())
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myLastActiveView)
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myLastPicked.get())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToHilightSelected)
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, mySelection.get())
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myFilters.get())
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myDefaultDrawer.get())
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStyles[Prs3d_TypeOfHighlight_Selected])
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStyles[Prs3d_TypeOfHighlight_Dynamic])
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStyles[Prs3d_TypeOfHighlight_LocalSelected])
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStyles[Prs3d_TypeOfHighlight_LocalDynamic])
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStyles[Prs3d_TypeOfHighlight_SubIntensity])
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDetectedSeq.Size())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myCurDetected)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myCurHighlighted)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPickingStrategy)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAutoHilight)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsAutoActivateSelMode)
}

View File

@@ -148,11 +148,11 @@ void AIS_InteractiveObject::SetAspect(const Handle(Prs3d_BasicAspect)& theAspect
//function : DumpJson
//purpose :
//=======================================================================
void AIS_InteractiveObject::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
void AIS_InteractiveObject::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_CLASS_BEGIN (theOStream, AIS_InteractiveObject);
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, SelectMgr_SelectableObject);
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myCTXPtr);
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myOwner);
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, SelectMgr_SelectableObject)
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myCTXPtr)
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myOwner)
}

View File

@@ -119,7 +119,7 @@ public:
Standard_EXPORT void SetAspect (const Handle(Prs3d_BasicAspect)& anAspect);
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
protected:
//! The TypeOfPresention3d means that the interactive object

View File

@@ -990,3 +990,19 @@ Standard_Boolean AIS_Shape::OwnHLRDeviationAngle ( Standard_Real & anAngle,
aPreviousAngle = myDrawer->PreviousHLRDeviationAngle ();
return myDrawer->HasOwnHLRDeviationAngle();
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void AIS_Shape::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, AIS_InteractiveObject)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myshape)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBB)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myInitAng)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myCompBB)
}

View File

@@ -325,6 +325,9 @@ public:
const TopoDS_Shape& theShape,
const Handle(Prs3d_Drawer)& theDrawer);
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
protected:
TopoDS_Shape myshape; //!< shape to display

View File

@@ -926,3 +926,20 @@ void AIS_Trihedron::updatePrimitives(const Handle(Prs3d_DatumAspect)& theAspect,
myPrimitives.Bind(aPart, aPrims);
}
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void AIS_Trihedron::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, AIS_InteractiveObject)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnSize)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnTextColor)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnArrowColor)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnDatumAspect)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTrihDispMode)
}

View File

@@ -219,6 +219,9 @@ protected:
Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection,
const Standard_Integer theMode) Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
protected:
//! Creates a sensitive entity for the datum part that will be used in selection owner creation.

View File

@@ -113,6 +113,15 @@ AIS_ViewController::AIS_ViewController()
myMouseGestureMap.Bind (Aspect_VKeyMouse_MiddleButton | Aspect_VKeyFlags_CTRL, AIS_MouseGesture_Pan);
}
// =======================================================================
// function : ~AIS_ViewController
// purpose :
// =======================================================================
AIS_ViewController::~AIS_ViewController()
{
//
}
// =======================================================================
// function : ResetViewInput
// purpose :

View File

@@ -51,6 +51,9 @@ public:
//! Empty constructor.
Standard_EXPORT AIS_ViewController();
//! Destructor.
Standard_EXPORT virtual ~AIS_ViewController();
//! Return input buffer.
const AIS_ViewInputBuffer& InputBuffer (AIS_ViewInputBufferType theType) const { return theType == AIS_ViewInputBufferType_UI ? myUI : myGL; }

View File

@@ -16,6 +16,7 @@
//AGV 15/10/01 : Add XmlOcaf support; add MessageDriver support
#include <AppStd_Application.hxx>
#include <Standard_Dump.hxx>
IMPLEMENT_STANDARD_RTTIEXT(AppStd_Application,TDocStd_Application)
@@ -29,3 +30,13 @@ Standard_CString AppStd_Application::ResourcesName() {
return aRes;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void AppStd_Application::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDocStd_Application)
}

View File

@@ -35,6 +35,9 @@ public:
//! resources
Standard_EXPORT Standard_CString ResourcesName() Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
DEFINE_STANDARD_RTTIEXT(AppStd_Application,TDocStd_Application)
};

View File

@@ -16,6 +16,7 @@
//AGV 15/10/01 : Add XmlOcaf support; add MessageDriver support
#include <AppStdL_Application.hxx>
#include <Standard_Dump.hxx>
IMPLEMENT_STANDARD_RTTIEXT(AppStdL_Application,TDocStd_Application)
@@ -30,3 +31,13 @@ Standard_CString AppStdL_Application::ResourcesName()
return aRes;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void AppStdL_Application::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDocStd_Application)
}

View File

@@ -34,6 +34,9 @@ public:
//! resources
Standard_EXPORT Standard_CString ResourcesName() Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
DEFINE_STANDARD_RTTIEXT(AppStdL_Application,TDocStd_Application)
};

View File

@@ -92,3 +92,16 @@ Handle(BRep_CurveRepresentation) BRep_Curve3D::Copy() const
C->SetRange(First(), Last());
return C;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_Curve3D::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_GCurve)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myCurve.get())
}

View File

@@ -54,6 +54,9 @@ public:
//! Return a copy of this representation.
Standard_EXPORT Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -147,3 +147,20 @@ Handle(BRep_CurveRepresentation) BRep_CurveOn2Surfaces::Copy() const
myContinuity);
return C;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_CurveOn2Surfaces::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_CurveRepresentation)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, mySurface.get())
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, mySurface2.get())
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myLocation2)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myContinuity)
}

View File

@@ -66,6 +66,9 @@ public:
//! Return a copy of this representation.
Standard_EXPORT Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -180,4 +180,20 @@ void BRep_CurveOnClosedSurface::Update()
BRep_CurveOnSurface::Update();
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_CurveOnClosedSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_CurveOnSurface)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPCurve2.get())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myContinuity)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myUV21)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myUV22)
}

View File

@@ -78,6 +78,9 @@ public:
//! This is called when the range is modified.
Standard_EXPORT virtual void Update() Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -146,4 +146,20 @@ void BRep_CurveOnSurface::Update()
}
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_CurveOnSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_GCurve)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myUV1)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myUV2)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPCurve.get())
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, mySurface.get())
}

View File

@@ -71,6 +71,9 @@ public:
//! This is called when the range is modified.
Standard_EXPORT virtual void Update() Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -426,3 +426,13 @@ void BRep_CurveRepresentation::Polygon2(const Handle(Poly_Polygon2D)&)
throw Standard_DomainError("BRep_CurveRepresentation");
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_CurveRepresentation::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myLocation)
}

View File

@@ -144,6 +144,9 @@ public:
//! Return a copy of this representation.
Standard_EXPORT virtual Handle(BRep_CurveRepresentation) Copy() const = 0;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;

View File

@@ -46,3 +46,16 @@ void BRep_GCurve::Update()
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_GCurve::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_CurveRepresentation)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFirst)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLast)
}

View File

@@ -57,6 +57,9 @@ public:
//! This is called when the range is modified.
Standard_EXPORT virtual void Update();
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -80,4 +80,16 @@ void BRep_PointOnCurve::Curve(const Handle(Geom_Curve)& C)
myCurve = C;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_PointOnCurve::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_PointRepresentation)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myCurve.get())
}

View File

@@ -48,6 +48,9 @@ public:
Standard_EXPORT virtual void Curve (const Handle(Geom_Curve)& C) Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -84,4 +84,16 @@ void BRep_PointOnCurveOnSurface::PCurve(const Handle(Geom2d_Curve)& C)
myPCurve = C;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_PointOnCurveOnSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_PointRepresentation)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPCurve.get())
}

View File

@@ -50,6 +50,9 @@ public:
Standard_EXPORT virtual void PCurve (const Handle(Geom2d_Curve)& C) Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -197,4 +197,15 @@ void BRep_PointRepresentation::Surface(const Handle(Geom_Surface)& )
throw Standard_DomainError("BRep_PointRepresentation");
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_PointRepresentation::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myLocation)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myParameter)
}

View File

@@ -84,6 +84,9 @@ public:
Standard_EXPORT virtual void Surface (const Handle(Geom_Surface)& S);
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;

View File

@@ -56,4 +56,17 @@ void BRep_PointsOnSurface::Surface(const Handle(Geom_Surface)& S)
mySurface = S;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_PointsOnSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_PointRepresentation)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, mySurface.get())
}

View File

@@ -40,6 +40,9 @@ public:
Standard_EXPORT virtual void Surface (const Handle(Geom_Surface)& S) Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -76,3 +76,15 @@ Handle(BRep_CurveRepresentation) BRep_Polygon3D::Copy() const
return P;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_Polygon3D::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_CurveRepresentation)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPolygon3D.get())
}

View File

@@ -50,6 +50,9 @@ public:
//! Return a copy of this representation.
Standard_EXPORT Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -79,3 +79,16 @@ Handle(BRep_CurveRepresentation) BRep_PolygonOnClosedSurface::Copy() const
return P;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_PolygonOnClosedSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_PolygonOnSurface)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPolygon2.get())
}

View File

@@ -51,6 +51,9 @@ public:
//! Return a copy of this representation.
Standard_EXPORT virtual Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -84,3 +84,15 @@ Handle(BRep_CurveRepresentation) BRep_PolygonOnClosedTriangulation::Copy() const
return P;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_PolygonOnClosedTriangulation::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_PolygonOnTriangulation)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPolygon2.get())
}

View File

@@ -51,6 +51,9 @@ public:
//! Return a copy of this representation.
Standard_EXPORT virtual Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -102,3 +102,16 @@ Handle(BRep_CurveRepresentation) BRep_PolygonOnSurface::Copy() const
return P;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_PolygonOnSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_CurveRepresentation)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPolygon2D.get())
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, mySurface.get())
}

View File

@@ -59,6 +59,9 @@ public:
//! Return a copy of this representation.
Standard_EXPORT virtual Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -104,3 +104,17 @@ Handle(BRep_CurveRepresentation) BRep_PolygonOnTriangulation::Copy() const
return P;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_PolygonOnTriangulation::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_CurveRepresentation)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPolygon.get())
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTriangulation.get())
}

View File

@@ -58,6 +58,9 @@ public:
//! Return a copy of this representation.
Standard_EXPORT virtual Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -141,3 +141,22 @@ Handle(TopoDS_TShape) BRep_TEdge::EmptyCopy() const
return TE;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_TEdge::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TopoDS_TEdge)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTolerance)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFlags)
for (BRep_ListIteratorOfListOfCurveRepresentation itr(myCurves); itr.More(); itr.Next())
{
const Handle(BRep_CurveRepresentation)& aCurveRepresentation = itr.Value();
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aCurveRepresentation.get())
}
}

View File

@@ -81,6 +81,9 @@ public:
//! Returns a copy of the TShape with no sub-shapes.
Standard_EXPORT Handle(TopoDS_TShape) EmptyCopy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -50,3 +50,21 @@ Handle(TopoDS_TShape) BRep_TFace::EmptyCopy() const
TF->Tolerance(myTolerance);
return TF;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_TFace::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TopoDS_TFace)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, mySurface.get())
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTriangulation.get())
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myLocation)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTolerance)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myNaturalRestriction)
}

View File

@@ -88,6 +88,9 @@ public:
//! The new Face has no triangulation.
Standard_EXPORT virtual Handle(TopoDS_TShape) EmptyCopy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -47,3 +47,21 @@ Handle(TopoDS_TShape) BRep_TVertex::EmptyCopy() const
return TV;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_TVertex::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TopoDS_TVertex)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myPnt)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTolerance)
for (BRep_ListIteratorOfListOfPointRepresentation itr(myPoints); itr.More(); itr.Next())
{
const Handle(BRep_PointRepresentation)& aPointRepresentation = itr.Value();
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aPointRepresentation.get())
}
}

View File

@@ -62,6 +62,9 @@ public:
//! Returns a copy of the TShape with no sub-shapes.
Standard_EXPORT Handle(TopoDS_TShape) EmptyCopy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -0,0 +1,124 @@
// Created on: 2020-01-31
// Created by: Svetlana SHUTINA
// Copyright (c) 2020 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepPreviewAPI_MakeBox.hxx>
#include <BRep_Builder.hxx>
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
#include <BRepBuilderAPI_MakeVertex.hxx>
#include <BRepBuilderAPI_MakeWire.hxx>
#include <TopoDS_Compound.hxx>
//=======================================================================
//function : Build
//purpose :
//=======================================================================
void BRepPreviewAPI_MakeBox::Build()
{
gp_Pnt anLocation = myWedge.Axes().Location();
gp_Pnt aFirstPoint (anLocation.X(), anLocation.Y(), anLocation.Z());
gp_Pnt aSecondPoint (anLocation.X() + myWedge.GetXMax(), anLocation.Y() + myWedge.GetYMax(), anLocation.Z() + myWedge.GetZMax());
Standard_Boolean aThinOnX = Abs (aFirstPoint.X() - aSecondPoint.X()) < Precision::Confusion();
Standard_Boolean aThinOnY = Abs (aFirstPoint.Y() - aSecondPoint.Y()) < Precision::Confusion();
Standard_Boolean aThinOnZ = Abs (aFirstPoint.Z() - aSecondPoint.Z()) < Precision::Confusion();
Standard_Integer aPreviewType = (int)aThinOnX + (int)aThinOnY + (int)aThinOnZ;
if (aPreviewType == 3) // thin box in all directions is a point
{
makeVertex (aFirstPoint);
}
else if (aPreviewType == 2) // thin box in two directions is a point
{
makeEdge (aFirstPoint, aSecondPoint);
}
// thin box in only one direction is a rectangular face
else if (aPreviewType == 1)
{
gp_Pnt aPnt1, aPnt2, aPnt3, aPnt4;
if (aThinOnX)
{
aPnt1 = gp_Pnt (aFirstPoint.X(), aFirstPoint.Y(), aFirstPoint.Z());
aPnt2 = gp_Pnt (aFirstPoint.X(), aSecondPoint.Y(), aFirstPoint.Z());
aPnt3 = gp_Pnt (aFirstPoint.X(), aSecondPoint.Y(), aSecondPoint.Z());
aPnt4 = gp_Pnt (aFirstPoint.X(), aFirstPoint.Y(), aSecondPoint.Z());
}
else if (aThinOnY)
{
aPnt1 = gp_Pnt (aFirstPoint.X(), aFirstPoint.Y(), aFirstPoint.Z());
aPnt2 = gp_Pnt (aSecondPoint.X(), aFirstPoint.Y(), aFirstPoint.Z());
aPnt3 = gp_Pnt (aSecondPoint.X(), aFirstPoint.Y(), aSecondPoint.Z());
aPnt4 = gp_Pnt (aFirstPoint.X(), aFirstPoint.Y(), aSecondPoint.Z());
}
else if (aThinOnZ)
{
aPnt1 = gp_Pnt (aFirstPoint.X(), aFirstPoint.Y(), aFirstPoint.Z());
aPnt2 = gp_Pnt (aSecondPoint.X(), aFirstPoint.Y(), aFirstPoint.Z());
aPnt3 = gp_Pnt (aSecondPoint.X(), aSecondPoint.Y(), aFirstPoint.Z());
aPnt4 = gp_Pnt (aFirstPoint.X(), aSecondPoint.Y(), aFirstPoint.Z());
}
makeRectangle (aPnt1, aPnt2, aPnt3, aPnt4);
}
if (!myShape.IsNull())
{
Done();
return;
}
// box is a valid shape
Solid();
}
//=======================================================================
//function : makeVertex
//purpose :
//=======================================================================
void BRepPreviewAPI_MakeBox::makeVertex (const gp_Pnt& thePoint)
{
myShape = BRepBuilderAPI_MakeVertex (thePoint);
}
//=======================================================================
//function : makeEdge
//purpose :
//=======================================================================
void BRepPreviewAPI_MakeBox::makeEdge (const gp_Pnt& thePoint1, const gp_Pnt& thePoint2)
{
myShape = BRepBuilderAPI_MakeEdge (thePoint1, thePoint2);
}
//=======================================================================
//function : makeRectangle
//purpose :
//=======================================================================
void BRepPreviewAPI_MakeBox::makeRectangle (const gp_Pnt& thePnt1, const gp_Pnt& thePnt2,
const gp_Pnt& thePnt3, const gp_Pnt& thePnt4)
{
TopoDS_Edge anEdge1 = BRepBuilderAPI_MakeEdge (thePnt1, thePnt2);
TopoDS_Edge anEdge2 = BRepBuilderAPI_MakeEdge (thePnt2, thePnt3);
TopoDS_Edge anEdge3 = BRepBuilderAPI_MakeEdge (thePnt3, thePnt4);
TopoDS_Edge anEdge4 = BRepBuilderAPI_MakeEdge (thePnt4, thePnt1);
BRepBuilderAPI_MakeWire aWire (anEdge1, anEdge2, anEdge3, anEdge4);
BRepBuilderAPI_MakeFace aFace (aWire);
myShape = aFace.Shape();
}

View File

@@ -0,0 +1,57 @@
// Created on: 2020-01-31
// Created by: Svetlana SHUTINA
// Copyright (c) 2020 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepPreviewAPI_MakeBox_HeaderFile
#define _BRepPreviewAPI_MakeBox_HeaderFile
#include <BRepPrimAPI_MakeBox.hxx>
//! Builds a valid box, if points fulfill the conditions of a valid box.
//! And allows to build a preview, otherwise.
//! There are 4 cases:
//! 1 - preview can be a vertex if thin box in all directions is a point;
//! 2 - preview can be an edge if thin box in two directions is a point;
//! 3 - preview can be a rectangular face if thin box in only one direction is a point;
//! 4 - preview can be a valid box if point values fulfill the conditions of a valid box.
class BRepPreviewAPI_MakeBox : public BRepPrimAPI_MakeBox
{
public:
//! Constructor
BRepPreviewAPI_MakeBox() {}
//! Creates a preview depending on point values.
Standard_EXPORT virtual void Build() Standard_OVERRIDE;
private:
//! Create a vertex if thin box in all directions is a point.
void makeVertex (const gp_Pnt& thePoint);
//! Create an edge if thin box in two directions is a point.
void makeEdge (const gp_Pnt& thePoint1, const gp_Pnt& thePoint2);
//! Create a rectangular face if the box is thin in one direction only.
//! @param thePnt1 the first point for a rectangular face
//! @param thePnt2 the second point for a rectangular face
//! @param thePnt3 the third point for a rectangular face
//! @param thePnt4 the fourth point for a rectangular face
void makeRectangle (const gp_Pnt& thePnt1, const gp_Pnt& thePnt2,
const gp_Pnt& thePnt3, const gp_Pnt& thePnt4);
};
#endif

2
src/BRepPreviewAPI/FILES Normal file
View File

@@ -0,0 +1,2 @@
BRepPreviewAPI_MakeBox.hxx
BRepPreviewAPI_MakeBox.cxx

View File

@@ -134,6 +134,27 @@ static void BRepPrim_Wedge_Init(Standard_Boolean& S,
F[i] = Standard_False;
}
BRepPrim_GWedge::BRepPrim_GWedge() :
XMin (0),
XMax (0),
YMin (0),
YMax (0),
ZMin (0),
ZMax (0),
Z2Min (0),
Z2Max (0),
X2Min (0),
X2Max (0)
{
for (Standard_Integer i = 0; i < NBFACES; i++)
{
myInfinite[i]=Standard_False;
}
BRepPrim_Wedge_Init (ShellBuilt,VerticesBuilt,EdgesBuilt,
WiresBuilt,FacesBuilt);
}
//=======================================================================
//function : BRepPrim_GWedge
//purpose : build a box
@@ -158,10 +179,7 @@ BRepPrim_GWedge::BRepPrim_GWedge (const BRepPrim_Builder& B,
X2Max(dx)
{
for (Standard_Integer i = 0; i < NBFACES; i++) { myInfinite[i]=Standard_False; }
if ( ( dx <= Precision::Confusion() ) ||
( dy <= Precision::Confusion() ) ||
( dz <= Precision::Confusion() ) )
throw Standard_DomainError();
BRepPrim_Wedge_Init(ShellBuilt,VerticesBuilt,EdgesBuilt,
WiresBuilt,FacesBuilt);
}
@@ -191,11 +209,7 @@ BRepPrim_GWedge::BRepPrim_GWedge (const BRepPrim_Builder& B,
X2Max(ltx)
{
for (Standard_Integer i = 0; i < NBFACES; i++) { myInfinite[i]=Standard_False; }
if ( ( dx <= Precision::Confusion() ) ||
( dy <= Precision::Confusion() ) ||
( dz <= Precision::Confusion() ) ||
( ltx < 0 ) )
throw Standard_DomainError();
BRepPrim_Wedge_Init(ShellBuilt,VerticesBuilt,EdgesBuilt,
WiresBuilt,FacesBuilt);
}
@@ -231,12 +245,7 @@ BRepPrim_GWedge::BRepPrim_GWedge (const BRepPrim_Builder& B,
X2Max(x2max)
{
for (Standard_Integer i = 0; i < NBFACES; i++) { myInfinite[i]=Standard_False; }
if ( ( XMax-XMin <= Precision::Confusion() ) ||
( YMax-YMin <= Precision::Confusion() ) ||
( ZMax-ZMin <= Precision::Confusion() ) ||
( Z2Max-Z2Min < 0 ) ||
( X2Max-X2Min < 0 ) )
throw Standard_DomainError();
BRepPrim_Wedge_Init(ShellBuilt,VerticesBuilt,EdgesBuilt,
WiresBuilt,FacesBuilt);
}
@@ -296,6 +305,9 @@ Standard_Boolean BRepPrim_GWedge::IsInfinite (const BRepPrim_Direction d1) const
//=======================================================================
const TopoDS_Shell& BRepPrim_GWedge::Shell() {
if (IsDegeneratedShape())
throw Standard_DomainError();
if (!ShellBuilt) {
myBuilder.MakeShell(myShell);
@@ -1020,3 +1032,19 @@ const TopoDS_Vertex& BRepPrim_GWedge::Vertex
}
//=======================================================================
//function : IsDegeneratedShape
//purpose :
//=======================================================================
Standard_Boolean BRepPrim_GWedge::IsDegeneratedShape()
{
if ( ( XMax-XMin <= Precision::Confusion() ) ||
( YMax-YMin <= Precision::Confusion() ) ||
( ZMax-ZMin <= Precision::Confusion() ) ||
( Z2Max-Z2Min < 0 ) ||
( X2Max-X2Min < 0 ) )
return Standard_True;
else
return Standard_False;
}

View File

@@ -70,6 +70,8 @@ public:
DEFINE_STANDARD_ALLOC
//! Default constructor
Standard_EXPORT BRepPrim_GWedge();
//! Creates a GWedge algorithm. <Axes> is the axis
//! system for the primitive.
@@ -191,7 +193,9 @@ public:
//! <d1><d2><d3> direction.
Standard_EXPORT gp_Pnt Point (const BRepPrim_Direction d1, const BRepPrim_Direction d2, const BRepPrim_Direction d3);
//! Checkes a shape on degeneracy
//! @return TRUE if a shape is degenerated
Standard_EXPORT Standard_Boolean IsDegeneratedShape();
protected:

View File

@@ -34,7 +34,9 @@ public:
DEFINE_STANDARD_ALLOC
//! Default constructor
BRepPrim_Wedge() {}
//! Creates a Wedge algorithm. <Axes> is the axis
//! system for the primitive.
//!

View File

@@ -102,6 +102,56 @@ BRepPrimAPI_MakeBox::BRepPrimAPI_MakeBox(const gp_Ax2& Axes,
{
}
//=======================================================================
//function : Init
//purpose :
//=======================================================================
void BRepPrimAPI_MakeBox::Init (const Standard_Real theDX, const Standard_Real theDY, const Standard_Real theDZ)
{
myWedge = BRepPrim_Wedge (gp_Ax2 (pmin (gp_Pnt (0, 0, 0), theDX, theDY, theDZ), gp_Dir (0, 0, 1), gp_Dir (1, 0, 0)),
Abs (theDX), Abs (theDY), Abs (theDZ));
}
//=======================================================================
//function : Init
//purpose :
//=======================================================================
void BRepPrimAPI_MakeBox::Init (const gp_Pnt& thePnt,
const Standard_Real theDX,
const Standard_Real theDY,
const Standard_Real theDZ)
{
myWedge = BRepPrim_Wedge (gp_Ax2 (pmin (thePnt, theDX, theDY, theDZ), gp_Dir (0, 0, 1), gp_Dir (1, 0, 0)),
Abs (theDX), Abs (theDY), Abs (theDZ));
}
//=======================================================================
//function : Init
//purpose :
//=======================================================================
void BRepPrimAPI_MakeBox::Init (const gp_Pnt& thePnt1, const gp_Pnt& thePnt2)
{
myWedge = BRepPrim_Wedge (gp_Ax2 (pmin (thePnt1,thePnt2), gp_Dir (0, 0, 1), gp_Dir (1, 0, 0)),
Abs (thePnt2.X() - thePnt1.X()),
Abs (thePnt2.Y() - thePnt1.Y()),
Abs (thePnt2.Z() - thePnt1.Z()));
}
//=======================================================================
//function : Init
//purpose :
//=======================================================================
void BRepPrimAPI_MakeBox::Init (const gp_Ax2& theAxes,
const Standard_Real theDX,
const Standard_Real theDY,
const Standard_Real theDZ)
{
myWedge = BRepPrim_Wedge (theAxes, theDX, theDY, theDZ);
}
//=======================================================================
//function : Wedge

View File

@@ -40,12 +40,29 @@ class TopoDS_Face;
//! - defining the construction of a box,
//! - implementing the construction algorithm, and
//! - consulting the result.
//! Constructs a box such that its sides are parallel to the axes of
//! - the global coordinate system, or
//! - the local coordinate system Axis. and
//! - with a corner at (0, 0, 0) and of size (dx, dy, dz), or
//! - with a corner at point P and of size (dx, dy, dz), or
//! - with corners at points P1 and P2.
//! Exceptions
//! Standard_DomainError if: dx, dy, dz are less than or equal to
//! Precision::Confusion(), or
//! - the vector joining the points P1 and P2 has a
//! component projected onto the global coordinate
//! system less than or equal to Precision::Confusion().
//! In these cases, the box would be flat.
class BRepPrimAPI_MakeBox : public BRepBuilderAPI_MakeShape
{
public:
DEFINE_STANDARD_ALLOC
//! Default constructor
BRepPrimAPI_MakeBox() {}
//! Make a box with a corner at 0,0,0 and the other dx,dy,dz
Standard_EXPORT BRepPrimAPI_MakeBox(const Standard_Real dx, const Standard_Real dy, const Standard_Real dz);
@@ -56,22 +73,27 @@ public:
//! Make a box with corners P1,P2.
Standard_EXPORT BRepPrimAPI_MakeBox(const gp_Pnt& P1, const gp_Pnt& P2);
//! Ax2 is the left corner and the axis.
//! Constructs a box such that its sides are parallel to the axes of
//! - the global coordinate system, or
//! - the local coordinate system Axis. and
//! - with a corner at (0, 0, 0) and of size (dx, dy, dz), or
//! - with a corner at point P and of size (dx, dy, dz), or
//! - with corners at points P1 and P2.
//! Exceptions
//! Standard_DomainError if: dx, dy, dz are less than or equal to
//! Precision::Confusion(), or
//! - the vector joining the points P1 and P2 has a
//! component projected onto the global coordinate
//! system less than or equal to Precision::Confusion().
//! In these cases, the box would be flat.
//! Make a box with Ax2 (the left corner and the axis) and size dx, dy, dz.
Standard_EXPORT BRepPrimAPI_MakeBox(const gp_Ax2& Axes, const Standard_Real dx, const Standard_Real dy, const Standard_Real dz);
//! Init a box with a corner at 0,0,0 and the other theDX, theDY, theDZ
Standard_EXPORT void Init (const Standard_Real theDX, const Standard_Real theDY, const Standard_Real theDZ);
//! Init a box with a corner at thePnt and size theDX, theDY, theDZ.
Standard_EXPORT void Init (const gp_Pnt& thePnt,
const Standard_Real theDX,
const Standard_Real theDY,
const Standard_Real theDZ);
//! Init a box with corners thePnt1, thePnt2.
Standard_EXPORT void Init (const gp_Pnt& thePnt1, const gp_Pnt& thePnt2);
//! Init a box with Ax2 (the left corner and the theAxes) and size theDX, theDY, theDZ.
Standard_EXPORT void Init (const gp_Ax2& theAxes,
const Standard_Real theDX,
const Standard_Real theDY,
const Standard_Real theDZ);
//! Returns the internal algorithm.
Standard_EXPORT BRepPrim_Wedge& Wedge();
@@ -110,6 +132,7 @@ Standard_EXPORT operator TopoDS_Solid();
protected:
BRepPrim_Wedge myWedge;
@@ -117,7 +140,6 @@ private:
BRepPrim_Wedge myWedge;
};

View File

@@ -22,6 +22,7 @@
#include <TopoDS_Solid.hxx>
#include <BRep_Builder.hxx>
#include <BRepBuilderAPI.hxx>
#include <BRepPreviewAPI_MakeBox.hxx>
#include <BRepPrimAPI_MakeBox.hxx>
#include <BRepPrimAPI_MakeWedge.hxx>
#include <BRepPrimAPI_MakeCylinder.hxx>
@@ -39,28 +40,153 @@
static Standard_Integer box(Draw_Interpretor& , Standard_Integer n, const char** a)
{
if (n < 5) return 1;
Standard_Real dx = Draw::Atof(a[n-3]);
Standard_Real dy = Draw::Atof(a[n-2]);
Standard_Real dz = Draw::Atof(a[n-1]);
gp_Pnt anOrigin;
gp_XYZ aParams;
gp_Dir aDir;
gp_Dir aXDir;
Standard_Boolean isMinMax = Standard_False;
Standard_Boolean isPreview = Standard_False;
Standard_Boolean isAxis = Standard_False;
TopoDS_Solid S;
for (Standard_Integer anArgIter = 2; anArgIter < n; ++anArgIter)
{
TCollection_AsciiString anArgCase (a[anArgIter]);
anArgCase.LowerCase();
if (anArgCase == "-min" && anArgIter + 3 <= n)
{
anOrigin.SetX (Draw::Atof(a[anArgIter + 1]));
anOrigin.SetY (Draw::Atof(a[anArgIter + 2]));
anOrigin.SetZ (Draw::Atof(a[anArgIter + 3]));
anArgIter += 3;
}
else if (anArgCase == "-max" && anArgIter + 3 <= n)
{
aParams.SetX (Draw::Atof(a[anArgIter + 1]));
aParams.SetY (Draw::Atof(a[anArgIter + 2]));
aParams.SetZ (Draw::Atof(a[anArgIter + 3]));
isMinMax = Standard_True;
anArgIter += 3;
}
else if (anArgCase == "-size" && anArgIter + 3 <= n)
{
aParams.SetX (Draw::Atof(a[anArgIter + 1]));
aParams.SetY (Draw::Atof(a[anArgIter + 2]));
aParams.SetZ (Draw::Atof(a[anArgIter + 3]));
isMinMax = Standard_False;
anArgIter += 3;
}
else if (anArgCase == "-dir" && anArgIter + 3 <= n)
{
Standard_Real aX = Draw::Atof(a[anArgIter + 1]);
Standard_Real anY = Draw::Atof(a[anArgIter + 2]);
Standard_Real aZ = Draw::Atof(a[anArgIter + 3]);
aDir.SetCoord (aX, anY, aZ);
isAxis = Standard_True;
anArgIter += 3;
}
else if (anArgCase == "-xdir" && anArgIter + 3 <= n)
{
Standard_Real aX = Draw::Atof(a[anArgIter + 1]);
Standard_Real anY = Draw::Atof(a[anArgIter + 2]);
Standard_Real aZ = Draw::Atof(a[anArgIter + 3]);
aXDir.SetCoord (aX, anY, aZ);
isAxis = Standard_True;
anArgIter += 3;
}
else if (anArgCase == "-preview")
{
isPreview = Standard_True;
}
else if (anArgIter + 5 < n || anArgIter + 2 < n)
{
Standard_Real aValue = 0.0;
Standard_Integer aCountReal = 0;
Standard_Integer anIter = anArgIter;
while (anIter < n && Draw::ParseReal(a[anIter], aValue))
{
anIter++;
aCountReal++;
}
if (n > 5) {
if (n < 8) return 1;
Standard_Real x = Draw::Atof(a[2]);
Standard_Real y = Draw::Atof(a[3]);
Standard_Real z = Draw::Atof(a[4]);
S = BRepPrimAPI_MakeBox(gp_Pnt(x,y,z),dx,dy,dz);
}
else {
S = BRepPrimAPI_MakeBox(dx,dy,dz);
if (aCountReal == 6)
{
anOrigin.SetX (Draw::Atof(a[anArgIter]));
anOrigin.SetY (Draw::Atof(a[anArgIter + 1]));
anOrigin.SetZ (Draw::Atof(a[anArgIter + 2]));
aParams.SetX (Draw::Atof(a[anArgIter + 3]));
aParams.SetY (Draw::Atof(a[anArgIter + 4]));
aParams.SetZ (Draw::Atof(a[anArgIter + 5]));
anArgIter += 5;
}
else if (aCountReal == 3)
{
aParams.SetX (Draw::Atof(a[anArgIter]));
aParams.SetY (Draw::Atof(a[anArgIter + 1]));
aParams.SetZ (Draw::Atof(a[anArgIter + 2]));
anArgIter += 2;
}
else
{
std::cout<<"Syntax error\n";
return 1;
}
}
}
DBRep::Set(a[1],S);
if (isPreview)
{
TopoDS_Shape S;
BRepPreviewAPI_MakeBox aPreview;
if (isMinMax == Standard_True)
{
aPreview.Init (anOrigin, aParams);
}
else if (isMinMax == Standard_False && isAxis == Standard_False)
{
aPreview.Init (anOrigin, aParams.X(), aParams.Y(), aParams.Z());
}
else if (isAxis)
{
gp_Ax2 anAxis (anOrigin, aDir, aXDir);
aPreview.Init (anAxis, aParams.X(), aParams.Y(), aParams.Z());
}
else
{
aPreview.Init (aParams.X(), aParams.Y(), aParams.Z());
}
S = aPreview;
DBRep::Set(a[1],S);
}
else
{
TopoDS_Solid S;
if (isMinMax == Standard_True)
{
S = BRepPrimAPI_MakeBox(anOrigin, aParams);
}
else if (isMinMax == Standard_False && isAxis == Standard_False)
{
S = BRepPrimAPI_MakeBox(anOrigin, aParams.X(), aParams.Y(), aParams.Z());
}
else if (isAxis)
{
gp_Ax2 anAxis (anOrigin, aDir, aXDir);
S = BRepPrimAPI_MakeBox(anAxis, aParams.X(), aParams.Y(), aParams.Z());
}
else
{
S = BRepPrimAPI_MakeBox(aParams.X(), aParams.Y(), aParams.Z());
}
DBRep::Set(a[1],S);
}
return 0;
}
//=======================================================================
// wedge
//=======================================================================
@@ -274,7 +400,20 @@ void BRepTest::PrimitiveCommands(Draw_Interpretor& theCommands)
const char* g = "Primitive building commands";
theCommands.Add("box","box name [x1 y1 z1] dx dy dz",__FILE__,box,g);
theCommands.Add ("box",
"box name [dx dy dz] [x y z dx dy dz]"
"\n\t\t: [-min x y z] [-size dx dy dz] [-max x y z]"
"\n\t\t: [-dir x y z -xdir x y z] [-preview]"
"\n\t\t: Construct axes-aligned box and put result into 'name' variable"
"\n\t\t: -min box lower corner, origin; (0,0,0) by default"
"\n\t\t: -size box dimensions (alternative to -max)"
"\n\t\t: -max box upper corner (alternative to -size)"
"\n\t\t: -dir main direction of coordinate system (DZ by default)"
"\n\t\t: -xdir x direction of coordinate system (DX by default)"
"\n\t\t: -preview non-solid shape will be created (vertex, edge, rectangle or box);"
"\n\t\t: otherwise, return NULL shape in case of zero box dimension.",
__FILE__,box,g);
theCommands.Add("wedge","wedge name [Ox Oy Oz Zx Zy Zz Xx Xy Xz] dx dy dz ltx / xmin zmin xmax zmax",__FILE__,wedge,g);
theCommands.Add("pcylinder","pcylinder name [plane(ax2)] R H [angle]",__FILE__,cylinder,g);

View File

@@ -18,8 +18,9 @@
#include <BVH_Constants.hxx>
#include <BVH_Types.hxx>
#include <Standard_ShortReal.hxx>
#include <Standard_Macro.hxx>
#include <Standard_Dump.hxx>
#include <Standard_ShortReal.hxx>
#include <limits>
@@ -183,11 +184,27 @@ public:
T Center (const Standard_Integer theAxis) const;
//! Dumps the content of me into the stream
void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const
void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const
{
(void)theDepth;
OCCT_DUMP_CLASS_BEGIN (theOStream, BVH_Box);
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, IsValid());
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsInited)
int n = Min (N, 3);
if (n == 1)
{
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMinPoint[0])
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMinPoint[0])
}
if (n == 2)
{
OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "MinPoint", n, myMinPoint[0], myMinPoint[1])
OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "MaxPoint", n, myMaxPoint[0], myMaxPoint[1])
}
if (n == 3)
{
OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "MinPoint", n, myMinPoint[0], myMinPoint[1], myMinPoint[2])
OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "MaxPoint", n, myMaxPoint[0], myMaxPoint[1], myMaxPoint[2])
}
}
public:

View File

@@ -29,10 +29,10 @@ protected:
BVH_TreeBaseTransient() {}
//! Dumps the content of me into the stream
virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const { (void)theOStream; (void)theDepth; }
virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const { (void)theOStream; (void)theDepth; }
//! Dumps the content of me into the stream
virtual void DumpNode (const int theNodeIndex, Standard_OStream& theOStream, const Standard_Integer theDepth) const
virtual void DumpNode (const int theNodeIndex, Standard_OStream& theOStream, Standard_Integer theDepth) const
{ (void)theNodeIndex; (void)theOStream; (void)theDepth; }
};
@@ -186,11 +186,11 @@ public: //! @name methods for accessing serialized tree data
}
//! Dumps the content of me into the stream
virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE
virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE
{
OCCT_DUMP_CLASS_BEGIN (theOStream, BVH_TreeBase);
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDepth);
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Length());
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDepth)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Length())
for (Standard_Integer aNodeIdx = 0; aNodeIdx < Length(); ++aNodeIdx)
{
@@ -199,20 +199,20 @@ public: //! @name methods for accessing serialized tree data
}
//! Dumps the content of node into the stream
virtual void DumpNode (const int theNodeIndex, Standard_OStream& theOStream, const Standard_Integer theDepth) const Standard_OVERRIDE
virtual void DumpNode (const int theNodeIndex, Standard_OStream& theOStream, Standard_Integer theDepth) const Standard_OVERRIDE
{
OCCT_DUMP_CLASS_BEGIN (theOStream, BVH_TreeNode);
OCCT_DUMP_CLASS_BEGIN (theOStream, BVH_TreeNode)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, theNodeIndex);
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, theNodeIndex)
Bnd_Box aBndBox = BVH::ToBndBox (MinPoint (theNodeIndex), MaxPoint (theNodeIndex));
Bnd_Box* aPointer = &aBndBox;
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aPointer);
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aPointer)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, BegPrimitive (theNodeIndex));
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, EndPrimitive (theNodeIndex));
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Level (theNodeIndex));
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, IsOuter (theNodeIndex));
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, BegPrimitive (theNodeIndex))
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, EndPrimitive (theNodeIndex))
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Level (theNodeIndex))
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, IsOuter (theNodeIndex))
}
public: //! @name protected fields

View File

@@ -975,13 +975,11 @@ void Bnd_Box::Dump () const
//function : DumpJson
//purpose :
//=======================================================================
void Bnd_Box::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
void Bnd_Box::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
{
OCCT_DUMP_CLASS_BEGIN (theOStream, Bnd_Box);
OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "CornerMin", 3, Xmin, Ymin, Zmin)
OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "CornerMax", 3, Xmax, Ymax, Zmax)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Gap);
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Flags);
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Gap)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Flags)
}

View File

@@ -303,7 +303,7 @@ public:
}
//! Dumps the content of me into the stream
Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
protected:

View File

@@ -1027,17 +1027,17 @@ void Bnd_OBB::Add(const Bnd_OBB& theOther)
//function : DumpJson
//purpose :
//=======================================================================
void Bnd_OBB::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
void Bnd_OBB::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_CLASS_BEGIN (theOStream, Bnd_OBB);
OCCT_DUMP_CLASS_BEGIN (theOStream, Bnd_OBB)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myCenter);
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myAxes[0]);
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myAxes[1]);
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myAxes[2]);
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myCenter)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myAxes[0])
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myAxes[1])
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myAxes[2])
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHDims[0]);
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHDims[1]);
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHDims[2]);
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsAABox);
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHDims[0])
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHDims[1])
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHDims[2])
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsAABox)
}

View File

@@ -283,7 +283,7 @@ public:
Standard_EXPORT void Add(const gp_Pnt& theP);
//! Dumps the content of me into the stream
Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
protected:

View File

@@ -181,10 +181,10 @@ void Bnd_Range::Split(const Standard_Real theVal,
// function : DumpJson
// purpose :
// =======================================================================
void Bnd_Range::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
void Bnd_Range::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
{
OCCT_DUMP_CLASS_BEGIN (theOStream, Bnd_Range);
OCCT_DUMP_CLASS_BEGIN (theOStream, Bnd_Range)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFirst);
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLast);
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFirst)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLast)
}

View File

@@ -257,7 +257,7 @@ public:
}
//! Dumps the content of me into the stream
Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
private:

View File

@@ -20,6 +20,7 @@
#include <CDM_MetaData.hxx>
#include <CDM_Reference.hxx>
#include <Resource_Manager.hxx>
#include <Standard_Dump.hxx>
#include <Standard_Type.hxx>
#include <TCollection_ExtendedString.hxx>
#include <Message.hxx>
@@ -126,3 +127,12 @@ TCollection_AsciiString CDM_Application::Version() const
// Default: empty
return TCollection_AsciiString();
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void CDM_Application::DumpJson (Standard_OStream& theOStream, Standard_Integer /*theDepth*/) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
}

View File

@@ -66,6 +66,9 @@ public:
//! Returns the application version.
Standard_EXPORT virtual TCollection_AsciiString Version() const;
//! Dumps the content of me into the stream
Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
friend class CDM_Reference;
friend class CDM_MetaData;

View File

@@ -28,6 +28,7 @@
#include <CDM_ReferenceIterator.hxx>
#include <Resource_Manager.hxx>
#include <Standard_DomainError.hxx>
#include <Standard_Dump.hxx>
#include <Standard_Failure.hxx>
#include <Standard_GUID.hxx>
#include <Standard_NoSuchObject.hxx>
@@ -1284,3 +1285,54 @@ void CDM_Document::ChangeStorageFormatVersion(const Standard_Integer theVersion)
{
myStorageFormatVersion = theVersion;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void CDM_Document::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
for (TColStd_SequenceOfExtendedString::Iterator aCommentIt (myComments); aCommentIt.More(); aCommentIt.Next())
{
const TCollection_ExtendedString& aComment = aCommentIt.Value();
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aComment)
}
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myPresentation)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myValidPresentation)
for (CDM_ListOfReferences::Iterator aFromReferenceIt (myFromReferences); aFromReferenceIt.More(); aFromReferenceIt.Next())
{
const Handle(CDM_Reference)& aFromReference = aFromReferenceIt.Value().get();
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aFromReference.get())
}
for (CDM_ListOfReferences::Iterator aToReferenceIt (myToReferences); aToReferenceIt.More(); aToReferenceIt.Next())
{
const Handle(CDM_Reference)& aToReference = aToReferenceIt.Value().get();
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aToReference.get())
}
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myVersion)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myActualReferenceIdentifier)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myStorageVersion)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myMetaData.get())
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myRequestedComment)
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myRequestedFolder)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myRequestedFolderIsDefined)
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myRequestedName)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myRequestedNameIsDefined)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myRequestedPreviousVersionIsDefined)
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myRequestedPreviousVersion)
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myFileExtension)
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myDescription)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFileExtensionWasFound)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDescriptionWasFound)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myApplication.get())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myStorageFormatVersion)
}

View File

@@ -349,6 +349,9 @@ Standard_OStream& operator << (Standard_OStream& anOStream);
//! Sets <theVersion> of the format to be used to store the document
Standard_EXPORT void ChangeStorageFormatVersion(const Standard_Integer theVersion);
//! Dumps the content of me into the stream
Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
friend class CDM_Reference;
friend class CDM_ReferenceIterator;
friend class CDM_Application;

View File

@@ -20,6 +20,7 @@
#include <CDM_MetaData.hxx>
#include <CDM_MetaDataLookUpTable.hxx>
#include <CDM_Reference.hxx>
#include <Standard_Dump.hxx>
#include <Standard_NoSuchObject.hxx>
#include <Standard_Type.hxx>
#include <TCollection_ExtendedString.hxx>
@@ -144,3 +145,24 @@ void CDM_MetaData::SetIsReadOnly() {
void CDM_MetaData::UnsetIsReadOnly() {
myIsReadOnly=Standard_False;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void CDM_MetaData::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsRetrieved)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myDocument)
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myFolder)
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myName)
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myVersion)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasVersion)
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myFileName)
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myPath)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDocumentVersion)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsReadOnly)
}

View File

@@ -84,6 +84,9 @@ Standard_OStream& operator << (Standard_OStream& anOStream);
Standard_EXPORT void SetIsReadOnly();
Standard_EXPORT void UnsetIsReadOnly();
//! Dumps the content of me into the stream
Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
friend class CDM_Reference;

View File

@@ -19,6 +19,7 @@
#include <CDM_Document.hxx>
#include <CDM_MetaData.hxx>
#include <CDM_Reference.hxx>
#include <Standard_Dump.hxx>
#include <Standard_Type.hxx>
IMPLEMENT_STANDARD_RTTIEXT(CDM_Reference,Standard_Transient)
@@ -120,3 +121,23 @@ Standard_Boolean CDM_Reference::IsInSession() const {
Standard_Boolean CDM_Reference::IsStored() const {
return !myMetaData.IsNull();
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void CDM_Reference::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myToDocument.get())
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myFromDocument)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myReferenceIdentifier)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myApplication.get())
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myMetaData.get())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDocumentVersion)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myUseStorageConfiguration)
}

View File

@@ -48,6 +48,9 @@ public:
Standard_EXPORT Standard_Integer DocumentVersion() const;
Standard_EXPORT Standard_Boolean IsReadOnly() const;
//! Dumps the content of me into the stream
Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
friend class CDM_Document;

View File

@@ -778,50 +778,64 @@ static int dmeminfo (Draw_Interpretor& theDI,
Standard_Integer theArgNb,
const char** theArgVec)
{
OSD_MemInfo aMemInfo;
if (theArgNb <= 1)
{
OSD_MemInfo aMemInfo;
theDI << aMemInfo.ToString();
return 0;
}
NCollection_Map<OSD_MemInfo::Counter> aCounters;
for (Standard_Integer anIter = 1; anIter < theArgNb; ++anIter)
{
TCollection_AsciiString anArg (theArgVec[anIter]);
anArg.LowerCase();
if (anArg == "virt" || anArg == "v")
{
theDI << Standard_Real (aMemInfo.Value (OSD_MemInfo::MemVirtual)) << " ";
aCounters.Add (OSD_MemInfo::MemVirtual);
}
else if (anArg == "heap" || anArg == "h")
{
theDI << Standard_Real (aMemInfo.Value (OSD_MemInfo::MemHeapUsage)) << " ";
aCounters.Add (OSD_MemInfo::MemHeapUsage);
}
else if (anArg == "wset" || anArg == "w")
{
theDI << Standard_Real (aMemInfo.Value (OSD_MemInfo::MemWorkingSet)) << " ";
aCounters.Add (OSD_MemInfo::MemWorkingSet);
}
else if (anArg == "wsetpeak")
{
theDI << Standard_Real (aMemInfo.Value (OSD_MemInfo::MemWorkingSetPeak)) << " ";
aCounters.Add (OSD_MemInfo::MemWorkingSetPeak);
}
else if (anArg == "swap")
{
theDI << Standard_Real (aMemInfo.Value (OSD_MemInfo::MemSwapUsage)) << " ";
aCounters.Add (OSD_MemInfo::MemSwapUsage);
}
else if (anArg == "swappeak")
{
theDI << Standard_Real (aMemInfo.Value (OSD_MemInfo::MemSwapUsagePeak)) << " ";
aCounters.Add (OSD_MemInfo::MemSwapUsagePeak);
}
else if (anArg == "private")
{
theDI << Standard_Real (aMemInfo.Value (OSD_MemInfo::MemPrivate)) << " ";
aCounters.Add (OSD_MemInfo::MemPrivate);
}
else
{
std::cerr << "Unknown argument '" << theArgVec[anIter] << "'!\n";
}
}
OSD_MemInfo aMemInfo (Standard_False);
aMemInfo.SetActive (Standard_False);
for (NCollection_Map<OSD_MemInfo::Counter>::Iterator aCountersIt (aCounters); aCountersIt.More(); aCountersIt.Next())
{
aMemInfo.SetActive (aCountersIt.Value(), Standard_True);
}
aMemInfo.Update();
for (NCollection_Map<OSD_MemInfo::Counter>::Iterator aCountersIt (aCounters); aCountersIt.More(); aCountersIt.Next())
{
theDI << Standard_Real (aMemInfo.Value (aCountersIt.Value())) << " ";
}
theDI << "\n";
return 0;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -16,6 +16,7 @@
#define _Font_Rect_H__
#include <NCollection_Vec2.hxx>
#include <Standard_Dump.hxx>
//! Auxiliary POD structure - 2D rectangle definition.
struct Font_Rect
@@ -76,6 +77,16 @@ struct Font_Rect
return Top - Bottom;
}
//! Dumps the content of me into the stream
void DumpJson (Standard_OStream& theOStream, Standard_Integer) const
{
OCCT_DUMP_CLASS_BEGIN (theOStream, Font_Rect)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Left)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Right)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Top)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Bottom)
}
};
#endif // _Font_Rect_H__

View File

@@ -1120,3 +1120,33 @@ void Geom_BSplineCurve::PeriodicNormalization(Standard_Real& Parameter) const
}
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void Geom_BSplineCurve::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_BoundedCurve)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, rational)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, periodic)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, knotSet)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, smooth)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, deg)
if (!poles.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, poles->Size())
if (!weights.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, weights->Size())
if (!flatknots.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, flatknots->Size())
if (!knots.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, knots->Size())
if (!mults.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mults->Size())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, maxderivinv)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, maxderivinvok)
}

View File

@@ -786,6 +786,9 @@ public:
//! Comapare two Bspline curve on identity;
Standard_EXPORT Standard_Boolean IsEqual (const Handle(Geom_BSplineCurve)& theOther, const Standard_Real thePreci) const;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -1272,3 +1272,46 @@ void Geom_BSplineSurface::SetWeightRow
Rational(Weights, urational, vrational);
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void Geom_BSplineSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_BoundedSurface)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, urational)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vrational)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, uperiodic)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vperiodic)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, uknotSet)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vknotSet)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Usmooth)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Vsmooth)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, udeg)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vdeg)
if (!poles.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, poles->Size())
if (!weights.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, weights->Size())
if (!ufknots.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, ufknots->Size())
if (!vfknots.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vfknots->Size())
if (!uknots.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, uknots->Size())
if (!vknots.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vknots->Size())
if (!umults.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, umults->Size())
if (!vmults.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vmults->Size())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, umaxderivinv)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vmaxderivinv)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, maxderivinvok)
}

View File

@@ -1189,6 +1189,9 @@ public:
//! Creates a new object which is a copy of this BSpline surface.
Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -812,3 +812,24 @@ void Geom_BezierCurve::Init
weights.Nullify();
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void Geom_BezierCurve::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_BoundedCurve)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, rational)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, closed)
if (!poles.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, poles->Size())
if (!weights.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, weights->Size())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, maxderivinv)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, maxderivinvok)
}

View File

@@ -333,6 +333,9 @@ public:
//! Creates a new object which is a copy of this Bezier curve.
Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -1937,3 +1937,23 @@ void Geom_BezierSurface::Init
weights.Nullify();
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void Geom_BezierSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_BoundedSurface)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, urational)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vrational)
if (!poles.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, poles->Size())
if (!weights.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, weights->Size())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, umaxderivinv)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vmaxderivinv)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, maxderivinvok)
}

View File

@@ -583,6 +583,9 @@ public:
//! Creates a new object which is a copy of this Bezier surface.
Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -19,4 +19,15 @@
#include <gp_Pnt.hxx>
#include <Standard_Type.hxx>
IMPLEMENT_STANDARD_RTTIEXT(Geom_BoundedCurve,Geom_Curve)
IMPLEMENT_STANDARD_RTTIEXT(Geom_BoundedCurve,Geom_Curve)
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void Geom_BoundedCurve::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Curve)
}

View File

@@ -54,6 +54,9 @@ public:
//! Returns the start point of the curve.
Standard_EXPORT virtual gp_Pnt StartPoint() const = 0;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

Some files were not shown because too many files have changed in this diff Show More