Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update linux to 7.6.0 #95

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get -q -y install libglu1-mesa-dev libgl1-mesa-dev libxi-dev libglfw3-dev libgles2-mesa-dev

- name: "Prepare VM"
run: |
sudo rm -Rf /home/linuxbrew/
Expand Down Expand Up @@ -112,17 +112,17 @@ jobs:
fail-fast: false
matrix:
os: ['ubuntu-latest']
python-version: ['3.6', '3.7', '3.8', '3.9']
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
steps:

- name: "Install OpenGL"
run: |
sudo apt-get update
sudo apt-get -q -y install libglu1-mesa-dev libgl1-mesa-dev libxi-dev libglfw3-dev libgles2-mesa-dev

- name: "Prepare VM"
run: sudo rm -Rf /home/linuxbrew/

- name: "Clone pyOCCT"
uses: actions/checkout@v2

Expand Down Expand Up @@ -163,7 +163,7 @@ jobs:
fail-fast: false
matrix:
os: ['windows-latest']
python-version: ['3.6', '3.7', '3.8', '3.9']
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
steps:

- name: "Clone pyOCCT"
Expand Down
9 changes: 5 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
cmake_minimum_required(VERSION 3.15...3.20)
project(pyOCCT VERSION 7.5.3.0 LANGUAGES C CXX)
project(pyOCCT VERSION 7.6.0.0 LANGUAGES C CXX)


# --------------------------------------------------------------------------- #
Expand All @@ -31,8 +31,8 @@ option(ENABLE_WARNINGS "Disable warning output." OFF)
# SETTINGS
# --------------------------------------------------------------------------- #
set(pyOCCT_MAJOR_VERSION 7)
set(pyOCCT_MINOR_VERSION 5)
set(pyOCCT_PATCH_VERSION 3)
set(pyOCCT_MINOR_VERSION 6)
set(pyOCCT_PATCH_VERSION 0)
set(pyOCCT_TWEAK_VERSION 0)

if(WIN32)
Expand Down Expand Up @@ -108,6 +108,7 @@ find_package(GLEW REQUIRED)
# X11
# --------------------------------------------------------------------------- #
if(NOT WIN32 AND NOT APPLE)
add_definitions (-DHAVE_XLIB)
find_package(X11 REQUIRED)
endif()

Expand All @@ -118,7 +119,7 @@ endif()
include_directories(inc)
if(NOT DEFINED OpenCASCADE_INCLUDE_DIR OR NOT DEFINED OpenCASCADE_LIBRARY_DIR)
message(STATUS "Searching for OpenCASCADE...")
find_package(OpenCASCADE 7.5.3 REQUIRED)
find_package(OpenCASCADE 7.6.0 REQUIRED)
endif()

if(NOT EXISTS ${OpenCASCADE_INCLUDE_DIR})
Expand Down
2 changes: 1 addition & 1 deletion OCCT/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
__version__ = '7.5.3.0'
__version__ = '7.6.0.0'
53 changes: 46 additions & 7 deletions binder/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
+arg win32: -fdelayed-template-parsing
+arg linux: -D_INC_WINDOWS
+arg linux: -D__WINDOWS_H_INCLUDED
+arg linux: -DHAVE_XLIB

# Immutable types -------------------------------------------------------------
+immutable Standard_Boolean
Expand Down Expand Up @@ -40,6 +41,9 @@
-class Graphic3d_BvhCStructureSetTrsfPers
-class Graphic3d_Layer

-class Message_ProgressScope
-class Message_LazyProgressScope

-class OpenGl_GraduatedTrihedron
-class OpenGl_LayerList
-class OpenGl_RaytraceGeometry
Expand Down Expand Up @@ -111,6 +115,8 @@
-typedef OpenGl_Layer
-typedef OpenGl_ListOfStructure
-typedef OpenGl_SetterList
-typedef OpenGl_VertexBufferCompat
-typedef OpenGl_IndexBufferCompat

-typedef PCDM_BaseDriverPointer

Expand Down Expand Up @@ -504,7 +510,8 @@
-function OpenGl_Workspace::BufferDump
-function OpenGl_Workspace::ResetAppliedAspect
-function OpenGl_Group::GlStruct

-function OpenGl_DepthPeeling::DepthPeelFbosOit
-function OpenGl_DepthPeeling::FrontBackColorFbosOit
-function PCDM::FileDriverType_
-function PCDM_DOMHeaderParser::SetStartElementName
-function PCDM_DOMHeaderParser::SetEndElementName
Expand Down Expand Up @@ -551,6 +558,9 @@
-function StepData_StepReaderData::ReadEnumParam
-function StepData_UndefinedEntity::Super

-function StepFile_ReadData::GetArgDescription
-function StepFile_ReadData::GetRecordDescription

-function StepFEA_SymmetricTensor43d::SetFeaIsotropicSymmetricTensor43d

-function STEPSelections_Counter::POP
Expand Down Expand Up @@ -624,6 +634,9 @@
-header* glext.h
-header* NCollection_Shared.hxx

-header ProjLib: ProjLib_HCompProjectedCurve.hxx
-header ProjLib: ProjLib_HProjectedCurve.hxx

+header Aspect: xTypes.h
+header AIS: AIS_PyInteractiveObject.hxx
+header BinMXCAFDoc: BinTools_LocationSet.hxx
Expand All @@ -644,17 +657,16 @@
+header BRepBlend: math_Matrix.hxx
+header BRepBlend: gp_Lin.hxx
+header BRepBlend: Blend_Point.hxx
+header BRepBlend: Adaptor3d_HSurface.hxx
+header BRepBlend: Adaptor3d_HCurve.hxx
+header BRepBlend: Adaptor2d_HCurve2d.hxx
+header BRepBlend: gp_Ax1.hxx
+header BRepBlend: gp_Circ.hxx
+header BRepBlend: Law_Function.hxx

+header BRepBuilderAPI: gp_XY.hxx
+header BRepBuilderAPI: gp_XYZ.hxx

+header BRepCheck: bind_NCollection_Shared.hxx
+header BRepFill: TopTools_HArray1OfShape.hxx
+header BRepFill: gp_Pln.hxx

+header BRepGProp: BRepGProp_Face.hxx
+header BRepGProp: BRepGProp_Domain.hxx
Expand All @@ -665,6 +677,7 @@
+header BRepOffsetAPI: TopoDS_Edge.hxx
+header BRepOffsetAPI: TopoDS_Face.hxx
+header BRepOffsetAPI: BRepTools_ReShape.hxx
+header BlendFunc: Adaptor2d_Curve2d.hxx

+header BVH_Traverse<NumType, Dimension, BVHSetType, MetricType>: bind_BVH_BaseTraverse.hxx
+header BVH_BoxSet<NumType, Dimension, DataType>: bind_BVH_PrimitiveSet.hxx
Expand All @@ -673,20 +686,25 @@
+header BVH_ObjectSet<T, N>: bind_BVH_Set.hxx
+header BVH_PrimitiveSet<T, N>: bind_BVH_Object.hxx
+header BVH_Triangulation<T, N>: bind_BVH_PrimitiveSet.hxx

+header CPnts: Adaptor2d_Curve2d.hxx
+header Font: bind_Font_BRepFont.hxx

+header Graphic3d: bind_BVH_Set.hxx
+header Graphic3d: Precision.hxx
+header GeomLib: Geom2d_BezierCurve.hxx

+header HLRAlgo: gp_XYZ.hxx
+header HLRTopoBRep: Adaptor2d_Curve2d.hxx

+header IMeshTools: IMeshData_Face.hxx

+header IntPatch: Intf_Polygon2d.hxx

+header IntPolyh: IntPolyh_Triangle.hxx

# Already there but order is wrong?
+header IntAna: gp_Sphere.hxx

+header MMgt: Standard_Type.hxx

+header NCollection: gp_Pnt.hxx
Expand All @@ -701,13 +719,16 @@
+header PCDM: Storage_BaseDriver.hxx
+header PCDM: Standard_IStream.hxx

+header Poly: bind_NCollection_AliasedArray.hxx
+header ProjLib: Adaptor3d_Surface.hxx
+header ProjLib: Adaptor3d_Curve.hxx

+header Prs3d: Poly_PolygonOnTriangulation.hxx
+header Prs3d: Poly_Polygon3D.hxx

+header PrsMgr: PrsMgr_Presentation.hxx
+header RWGltf: bind_NCollection_Shared.hxx
+header RWGltf: bind_NCollection_IndexedMap.hxx

+header SelectMgr: bind_SelectMgr_Frustum.hxx

Expand All @@ -718,6 +739,7 @@
-header Standard: NCollection_SparseArrayBase.hxx
-header Standard: NCollection_SparseArrayBase.hxx
-header Standard: Storage_Schema.hxx
+header Standard: bind_NCollection_Shared.hxx

+header StdLPersistent: bind_StdObjMgt_Attribute.hxx

Expand Down Expand Up @@ -759,13 +781,17 @@
# Python names ----------------------------------------------------------------
+pname AIS_PointCloud::DisplayMode-->enumDisplayMode
+pname NCollection_Lerp<gp_Trsf>-->gp_TrsfNLerp
+pname GCPnts_TCurveTypes<Adaptor3d_Curve>-->GCPnts_TCurveTypes3d
+pname GCPnts_TCurveTypes<Adaptor2d_Curve2d>-->GCPnts_TCurveTypes2d

# nodelete option -------------------------------------------------------------
+nodelete TDF_LabelNode
+nodelete Poly_CoherentTriPtr
+nodelete NCollection_SeqNode
+nodelete NCollection_ListNode



# Excluded base classes -------------------------------------------------------
-base BRepExtrema_OverlapTool: BVH_PairTraverse<Standard_Real, 3>
-base LDOM_OSStream: Standard_OStream
Expand Down Expand Up @@ -815,6 +841,7 @@
-field VrmlData_InBuffer::Input

# Excluded imports ------------------------------------------------------------
-import Aspect: WNT
-import AIS: WNT
-import Geom: GeomEvaluator
-import Geom2d: Geom2dEvaluator
Expand All @@ -831,6 +858,7 @@
# Import guards ---------------------------------------------------------------
+iguard AIS: PrsDim
+iguard Aspect: Graphic3d
+iguard CDM: PCDM
+iguard Font: Graphic3d
+iguard Font: StdPrs
+iguard Graphic3d: Select3D
Expand All @@ -839,6 +867,7 @@
+iguard LDOMParser: LDOM
+iguard Media: Graphic3d
+iguard SelectBasics: Select3D
+iguard SelectBasics: SelectMgr
+iguard SelectMgr: StdSelect
+iguard Standard: TCollection
+iguard Standard: NCollection
Expand Down Expand Up @@ -926,9 +955,14 @@

+before_type Graphic3d_BvhCStructureSetTrsfPers-->bind_BVH_Set<Standard_Real, 3>(mod, "BVH_Set_Standard_Real3", py::module_local());


+before_type RWGltf_GltfSceneNodeMap-->bind_NCollection_IndexedMap<XCAFPrs_DocumentNode, XCAFPrs_DocumentNode>(mod, "XCAFPrs_DocumentNode_IndexedMap", py::module_local());

+before_type OpenGl_BVHClipPrimitiveTrsfPersSet-->bind_BVH_Set<Standard_Real, 3>(mod, "BVH_Set_Standard_Real3", py::module_local());
+before_type OpenGl_RaytraceGeometry-->bind_BVH_Geometry<Standard_ShortReal, 3>(mod, "BVH_Geometry_Standard_ShortReal3", py::module_local());

+before_type Poly_ArrayOfNodes-->bind_NCollection_AliasedArray<16>(mod, "NCollection_AliasedArray16", py::module_local());

+before_type SelectMgr_RectangularFrustum-->bind_SelectMgr_Frustum<4>(mod, "Select_Mgr_Frustum4", py::module_local());
+before_type SelectMgr_TriangularFrustum-->bind_SelectMgr_Frustum<3>(mod, "Select_Mgr_Frustum3", py::module_local());

Expand Down Expand Up @@ -958,7 +992,7 @@
+after_type BRepAlgoAPI_Algo-->cls_BRepAlgoAPI_Algo.def("HasWarning", [](BRepAlgoAPI_Algo &self, Handle(Standard_Type) &theType) { return self.HasWarning(theType); }, "Returns true if algorithm has generated warning of specified type", py::arg("theType"));
+after_type BRepAlgoAPI_Algo-->cls_BRepAlgoAPI_Algo.def("ClearWarnings", [](BRepAlgoAPI_Algo &self) { self.ClearWarnings(); }, "Clears the warnings of the algorithm");
+after_type BRepAlgoAPI_Algo-->cls_BRepAlgoAPI_Algo.def("GetReport", [](BRepAlgoAPI_Algo &self) { const Handle(Message_Report) r = self.GetReport(); return r; }, "Returns report collecting all errors and warnings");
+after_type BRepAlgoAPI_Algo-->cls_BRepAlgoAPI_Algo.def("SetProgressIndicator", [](BRepAlgoAPI_Algo &self, const Message_ProgressScope &pi) {return self.SetProgressIndicator(pi); }, "Set the Progress Indicator object.", py::arg("theObj"));
#+after_type BRepAlgoAPI_Algo-->cls_BRepAlgoAPI_Algo.def("SetProgressIndicator", [](BRepAlgoAPI_Algo &self, const Message_ProgressScope &pi) {return self.SetProgressIndicator(pi); }, "Set the Progress Indicator object.", py::arg("theObj"));

+after_type Geom_Surface-->cls_Geom_Surface.def("U1", [](Geom_Surface &self) { Standard_Real U1; Standard_Real U2; Standard_Real V1; Standard_Real V2; self.Bounds(U1, U2, V1, V2); return U1; }, "Returns the parametric bound U1.");
+after_type Geom_Surface-->cls_Geom_Surface.def("U2", [](Geom_Surface &self) { Standard_Real U1; Standard_Real U2; Standard_Real V1; Standard_Real V2; self.Bounds(U1, U2, V1, V2); return U2; }, "Returns the parametric bound U2.");
Expand All @@ -976,6 +1010,7 @@
+after_type TopoDS_Shape-->cls_TopoDS_Shape.def("__hash__", [](TopoDS_Shape &self) {return self.HashCode(999999); });

+after_type XCAFDoc_ShapeTool-->cls_XCAFDoc_ShapeTool.def("FindSubShape", [](XCAFDoc_ShapeTool &self, const TDF_Label &shapeL, const TopoDS_Shape &sub) { TDF_Label L; Standard_Boolean status = self.FindSubShape(shapeL, sub, L); return std::tuple<Standard_Boolean, TDF_Label>(status, L); }, "Finds a label for subshape of shape stored on label shapeL Returns Null label if it is not found", py::arg("shapeL"), py::arg("sub"));
+after_type XCAFDoc_VisMaterial-->bind_NCollection_DataMap<opencascade::handle<XCAFDoc_VisMaterial>, opencascade::handle<XCAFDoc_VisMaterial>, NCollection_DefaultHasher<opencascade::handle<Standard_Transient>> >(mod, "XCAFDoc_VisMaterialDataMap", py::module_local(false));

# Add exception translator
+after_type Standard_Failure-->py::register_exception_translator([](std::exception_ptr p) {try {if (p) std::rethrow_exception(p);} catch (const Standard_Failure &e) { PyErr_SetString(PyExc_RuntimeError, e.GetMessageString());}});
Expand All @@ -990,6 +1025,7 @@
+patch bind_BVH_BaseBox: template <typename T, int N>-->template <typename T, int N, template <class /*T*/, int /*N*/> class TheDerivedBox>
+patch bind_BVH_BaseBox: BVH_BaseBox<T, N>-->BVH_BaseBox<T, N, TheDerivedBox>
+patch bind_BVH_Traverse: (const int &)-->(const opencascade::handle<BVH_Tree <NumType, Dimension>>&)
+patch bind_SelectMgr_Frustum: cls_SelectMgr_Frustum.def(py::init<>());-->//cls_SelectMgr_Frustum.def(py::init<>());

+patch Geom: (const TColStd_Array2OfReal * (Geom_BSplineSurface::*)() const) &Geom_BSplineSurface::Weights-->[](Geom_BSplineSurface& self) -> py::object {return self.Weights() ? py::cast(*self.Weights()) : py::none(); }

Expand All @@ -1015,6 +1051,9 @@
# Inject trampoline
+patch AIS: py::class_<AIS_InteractiveObject, opencascade-->py::class_<AIS_InteractiveObject, AIS_PyInteractiveObject, opencascade

# Disable
+patch OSD: bind_OSD_StreamBuffer-->// bind_OSD_StreamBuffer

# Split modules
+split Graphic3d
+split OpenGl
+split OpenGl
3 changes: 2 additions & 1 deletion binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ dependencies:
- python=3.7
- clangdev
- python-clang
- occt=7.5.3
- occt=7.6.0
- tbb-devel
- rapidjson
2 changes: 1 addition & 1 deletion binder/pyOCCT_binder
2 changes: 2 additions & 0 deletions binder/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ def find_include_path(name, path):
:return: The full path to the directory of the given header file.
"""
for root, dirs, files in os.walk(path):
if "pkgs" in root:
continue # Skip conda's cached package downloads
if name in files:
return root

Expand Down
6 changes: 3 additions & 3 deletions ci/conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package:
name: pyocct
version: 7.5.3.0
version: 7.6.0.0

source:
path: ../..
Expand All @@ -20,12 +20,12 @@ requirements:
host:
- python
- pybind11
- occt ==7.5.3
- occt ==7.6.0
- tbb-devel

run:
- python
- occt ==7.5.3
- occt ==7.6.0

test:
source_files:
Expand Down
1 change: 1 addition & 0 deletions cmake/OCCT_Modules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ LIST(APPEND OCCT_MODULES
StepFEA
StepFile
StepGeom
StepKinematics
StepRepr
StepSelect
STEPSelections
Expand Down
Loading