From nobody Thu Apr 4 08:05:18 2024 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V9Dgg1Ldjz5GWRb; Thu, 4 Apr 2024 08:05:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V9Dgf4wJcz4jjq; Thu, 4 Apr 2024 08:05:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712217918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8JNN0ChBrkO0ZuirHTXGpOylQYsWLnEHtiVWEoRAQ1Q=; b=G7JRhZGmQkaKdFJQ/QkiO7royxdUp++CwJQn8NJDTIWIpcVWgRoi1feclgzAfSGWVgjfsw mvjuvZRuSpxGhT1JtNllQBTwTNTr8GgFfjP9Er4ijf/4xf71BOgkt6WsnDEV3Gu3azkgiE +5k4+GXgCupxOWUCwYVfnd+anzBms2qkEo+2sAu49a0mjH3WjPUFCqrkLpMUhfBIoRDbaG dHqqgeK9runljwDkZDzwXQTCK1BpJiQrls320S+yQZW/UWxCaZPtCGuUdKBU7I0qlCguZ3 Y+kYAdk85B8mTSXbmua165mMAWqm4+LAwyq/XrfnA44gGz/GND4CTcthax9LKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712217918; a=rsa-sha256; cv=none; b=J3OIuMF8Csgj9OVq9nudUzqeiScxd9ef3XRa+VrmZapE+SXMIzbH9ksdzJOdwXbILfhV7N BYUyPKABeOemyjp4+rQlfvmvwTXkgsr8Mn96n8JkG18/a2n//6BInhkk3CGy0KqjxbSQt5 TsOQmbUU4+pJE517rrTVNrqzWEXAI9VoDgPNSnLHbxcrDfR+Fjsh5VRNTHKpgWL3MyqA7a SDoBgrHGWVa/cH7iURrB6If8n8oiUVVXaMDMj+yrsCrsOor/NunbgSfJIcG7RTmwFAP7mR zLTF0xjqFc+/nVl5ftYApagRv6iSp/3Z2mJFDqlia4cpyD86dsSMJs+9g/pDQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712217918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8JNN0ChBrkO0ZuirHTXGpOylQYsWLnEHtiVWEoRAQ1Q=; b=wuDvjX+fixigjPUbzgldQ1IV8Vx7qd+s8De4W5BsA38bGXA++JffCEbUpcaBzEHE/Nu0rP AhhEE0eYTu4fBEMU3I28vOdXdymtoTArAuSlr6q3T1JqhZ6oZ9wNVIG149oMtv2zHCd8b6 R0EaOA4TeqweCQJkckWIOa9isg0JiViR+4wCt6oOBBXSn8M/QFjWyF5kEWlxhhHZttMA92 mJeRtGk+mnr6Hbo0XsgGoedicuJsNjeR+2T0GZm4dx1E2JTW0VRDy2qIPKfxe34mGMJP8p 0Pe1L8MdIvrN9zyJf4v+2j1jFsOjsbz6U6ox2l+iPayZMfJ/3ZgtlzwFZkAwdQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V9Dgf4WbHz180H; Thu, 4 Apr 2024 08:05:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43485Iqi003318; Thu, 4 Apr 2024 08:05:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43485IrF003315; Thu, 4 Apr 2024 08:05:18 GMT (envelope-from git) Date: Thu, 4 Apr 2024 08:05:18 GMT Message-Id: <202404040805.43485IrF003315@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: 228664f500b9 - main - graphics/{,py-}f3d: update 2.3.1 =?utf-8?Q?=E2=86=92?= 2.4.0 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 228664f500b999a301ef1b271ea9f35f91288fbe Auto-Submitted: auto-generated The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=228664f500b999a301ef1b271ea9f35f91288fbe commit 228664f500b999a301ef1b271ea9f35f91288fbe Author: Yuri Victorovich AuthorDate: 2024-04-04 07:29:20 +0000 Commit: Yuri Victorovich CommitDate: 2024-04-04 08:05:05 +0000 graphics/{,py-}f3d: update 2.3.1 → 2.4.0 Reported by: portscout --- graphics/f3d/Makefile | 8 +- graphics/f3d/distinfo | 6 +- graphics/f3d/files/patch-external_dmon_dmon.h | 20 ++ .../f3d/files/patch-plugins_occt_CMakeLists.txt | 35 -- .../patch-plugins_occt_module_vtkF3DOCCTReader.cxx | 381 --------------------- graphics/f3d/pkg-plist | 34 +- graphics/py-f3d/Makefile | 2 +- graphics/py-f3d/distinfo | 6 +- 8 files changed, 52 insertions(+), 440 deletions(-) diff --git a/graphics/f3d/Makefile b/graphics/f3d/Makefile index c2cdec098793..bf3fc902170a 100644 --- a/graphics/f3d/Makefile +++ b/graphics/f3d/Makefile @@ -1,6 +1,6 @@ PORTNAME= f3d DISTVERSIONPREFIX= v -DISTVERSION= 2.3.1 +DISTVERSION= 2.4.0 CATEGORIES= graphics MAINTAINER= yuri@FreeBSD.org @@ -16,12 +16,14 @@ LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg4 \ libfreetype.so:print/freetype2 \ libhdf5.so:science/hdf5 \ libImath-3_1.so:math/Imath \ + libinotify.so:devel/libinotify \ libnetcdf.so:science/netcdf \ + libtbb.so:devel/onetbb \ libvtkCommonMisc-${VTK_VER}.so:math/vtk${VTK_VER:R} USES= cmake:testing compiler:c++17-lang desktop-file-utils gl \ shared-mime-info tcl tk xorg -USE_GL= gl glu +USE_GL= gl USE_XORG= ice sm x11 xt USE_LDCONFIG= yes @@ -31,6 +33,8 @@ GH_ACCOUNT= f3d-app CMAKE_OFF= F3D_STRICT_BUILD # disable -Werror CMAKE_OFF+= F3D_LINUX_APPLICATION_LINK_FILESYSTEM +LDFLAGS+= -linotify + # dependency descroptions are in https://f3d.app/doc/dev/BUILD.html OPTIONS_GROUP= MODULES PLUGINS OPTIONS_GROUP_MODULES= EXTERNAL_RENDERING RAYTRACING diff --git a/graphics/f3d/distinfo b/graphics/f3d/distinfo index 43031ac59e5d..abcfe7d9c4ad 100644 --- a/graphics/f3d/distinfo +++ b/graphics/f3d/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1711990779 -SHA256 (f3d-app-f3d-v2.3.1_GH0.tar.gz) = e6ada89851cd27c84117b5b73dd69475fa7442f05e1dbf2fa76e1dc34d2c0006 -SIZE (f3d-app-f3d-v2.3.1_GH0.tar.gz) = 40726219 +TIMESTAMP = 1712209039 +SHA256 (f3d-app-f3d-v2.4.0_GH0.tar.gz) = 3286ad1b324b995fd95818679b4ced80ebc3cc3b4bd4c8e6964695c05c934c8f +SIZE (f3d-app-f3d-v2.4.0_GH0.tar.gz) = 44886935 diff --git a/graphics/f3d/files/patch-external_dmon_dmon.h b/graphics/f3d/files/patch-external_dmon_dmon.h new file mode 100644 index 000000000000..d6239980cb57 --- /dev/null +++ b/graphics/f3d/files/patch-external_dmon_dmon.h @@ -0,0 +1,20 @@ +--- external/dmon/dmon.h.orig 2024-04-03 12:42:33 UTC ++++ external/dmon/dmon.h +@@ -137,7 +137,7 @@ DMON_API_DECL void dmon_unwatch(dmon_watch_id id); + #if defined(_WIN32) || defined(_WIN64) + # undef DMON_OS_WINDOWS + # define DMON_OS_WINDOWS 1 +-#elif defined(__linux__) ++#elif defined(__linux__) || defined(__FreeBSD__) + # undef DMON_OS_LINUX + # define DMON_OS_LINUX 1 + #elif defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) +@@ -167,7 +167,7 @@ DMON_API_DECL void dmon_unwatch(dmon_watch_id id); + # include + # include + # include +-# include ++//# include + # include + # include + # include diff --git a/graphics/f3d/files/patch-plugins_occt_CMakeLists.txt b/graphics/f3d/files/patch-plugins_occt_CMakeLists.txt deleted file mode 100644 index 922c86cde9d6..000000000000 --- a/graphics/f3d/files/patch-plugins_occt_CMakeLists.txt +++ /dev/null @@ -1,35 +0,0 @@ ---- plugins/occt/CMakeLists.txt.orig 2024-01-21 15:29:01 UTC -+++ plugins/occt/CMakeLists.txt -@@ -17,18 +17,30 @@ endif() - message(FATAL_ERROR "Plugin: OpenCASCADE: ${OpenCASCADE_VERSION} is not supported by F3D, please update your OpenCASCADE installation.") - endif() - --if((NOT TARGET "TKSTEP") AND (NOT TARGET "TKIGES") AND (NOT TARGET "TKMesh")) -+if("${OpenCASCADE_VERSION}" VERSION_LESS "7.8.0") -+ if((NOT TARGET "TKSTEP") AND (NOT TARGET "TKIGES") AND (NOT TARGET "TKMesh")) - message(FATAL_ERROR "Plugin: OpenCASCADE does not contain required modules") -+ endif() - endif() - -+if((NOT TARGET "TKDESTEP") AND (NOT TARGET "TKDEIGES") AND (NOT TARGET "TKMesh")) -+ message(FATAL_ERROR "Plugin: OpenCASCADE does not contain required modules") -+endif() -+ - message(STATUS "Plugin: OpenCASCADE ${OpenCASCADE_VERSION} found") - - option(F3D_PLUGIN_OCCT_COLORING_SUPPORT "Enable coloring support in occt plugin" ON) - mark_as_advanced(F3D_PLUGIN_OCCT_COLORING_SUPPORT) - - if(F3D_PLUGIN_OCCT_COLORING_SUPPORT) -- if (NOT (TARGET "TKXDESTEP") OR NOT (TARGET "TKXDEIGES")) -+ if("${OpenCASCADE_VERSION}" VERSION_LESS "7.8.0") -+ if (NOT (TARGET "TKXDESTEP") OR NOT (TARGET "TKXDEIGES")) - message(FATAL_ERROR "occt plugin: TKXDESTEP and TKXDEIGES OCCT modules are not found. Turn off F3D_PLUGIN_OCCT_COLORING_SUPPORT or enable them in your OpenCascade build.") -+ endif() -+ else() -+ if (NOT (TARGET "TKXSDRAWSTEP") OR NOT (TARGET "TKXSDRAWIGES")) -+ message(FATAL_ERROR "occt plugin: TKXSDRAWSTEP and TKXSDRAWIGES OCCT modules are not found. Turn off F3D_PLUGIN_OCCT_COLORING_SUPPORT or enable them in your OpenCascade build.") -+ endif() - endif() - endif() - diff --git a/graphics/f3d/files/patch-plugins_occt_module_vtkF3DOCCTReader.cxx b/graphics/f3d/files/patch-plugins_occt_module_vtkF3DOCCTReader.cxx deleted file mode 100644 index 270c6e9fd49b..000000000000 --- a/graphics/f3d/files/patch-plugins_occt_module_vtkF3DOCCTReader.cxx +++ /dev/null @@ -1,381 +0,0 @@ ---- plugins/occt/module/vtkF3DOCCTReader.cxx.orig 2024-01-21 15:29:01 UTC -+++ plugins/occt/module/vtkF3DOCCTReader.cxx -@@ -31,14 +31,17 @@ - #if F3D_PLUGIN_OCCT_XCAF - #include - #include -+#include - #include - #include - #include - #include --#include - #include - #include - #include -+#include -+#include -+#include - #endif - - #if defined(__GNUC__) -@@ -71,6 +74,10 @@ class vtkF3DOCCTReader::vtkInternals - - class vtkF3DOCCTReader::vtkInternals - { -+#if F3D_PLUGIN_OCCT_XCAF -+ using StyleMap = XCAFPrs_IndexedDataMapOfShapeStyle; -+#endif -+ - public: - //---------------------------------------------------------------------------- - explicit vtkInternals(vtkF3DOCCTReader* parent) -@@ -79,7 +86,11 @@ class vtkF3DOCCTReader::vtkInternals - } - - //---------------------------------------------------------------------------- -+#if F3D_PLUGIN_OCCT_XCAF -+ vtkSmartPointer CreateShape(const TopoDS_Shape& shape, const TDF_Label& label) -+#else - vtkSmartPointer CreateShape(const TopoDS_Shape& shape) -+#endif - { - vtkNew points; - vtkNew normals; -@@ -88,32 +99,49 @@ class vtkF3DOCCTReader::vtkInternals - vtkNew uvs; - uvs->SetNumberOfComponents(2); - uvs->SetName("UV"); -+#if F3D_PLUGIN_OCCT_XCAF - vtkNew colors; - colors->SetNumberOfComponents(3); - colors->SetName("Colors"); -+#endif - vtkNew trianglesCells; - vtkNew linesCells; - - Standard_Integer shift = 0; - -+#if F3D_PLUGIN_OCCT_XCAF -+ const StyleMap inheritedStyles = this->CollectInheritedStyles(label, shape); -+#endif -+ -+ /* Mesh the whole shape. This only affect faces, edges have to be handled separately. */ -+ BRepMesh_IncrementalMesh(shape, this->Parent->GetLinearDeflection(), -+ this->Parent->GetRelativeDeflection(), this->Parent->GetAngularDeflection(), Standard_True); -+ - if (this->Parent->GetReadWire()) - { -- // Add all edges to polydata -- for (TopExp_Explorer exEdge(shape, TopAbs_EDGE); exEdge.More(); exEdge.Next()) -+ std::vector edges; - { -- TopoDS_Edge edge = TopoDS::Edge(exEdge.Current()); -+ /* add all edges to a compound to remesh them all at once */ -+ TopoDS_Builder builder; -+ TopoDS_Compound compound; -+ builder.MakeCompound(compound); -+ for (TopExp_Explorer exEdge(shape, TopAbs_EDGE); exEdge.More(); exEdge.Next()) -+ { -+ const TopoDS_Edge edge = TopoDS::Edge(exEdge.Current()); -+ builder.Add(compound, edge); -+ edges.push_back(edge); -+ } -+ BRepMesh_IncrementalMesh(compound, this->Parent->GetLinearDeflection(), -+ this->Parent->GetRelativeDeflection(), this->Parent->GetAngularDeflection(), -+ Standard_True); -+ } - -+ // Add all edges to polydata -+ for (const TopoDS_Edge& edge : edges) -+ { - TopLoc_Location location; - const auto& poly = BRep_Tool::Polygon3D(edge, location); - -- if (poly.IsNull() || poly->Nodes().Length() <= 0) -- { -- // meshing -- BRepMesh_IncrementalMesh(edge, this->Parent->GetLinearDeflection(), -- this->Parent->GetRelativeDeflection(), this->Parent->GetAngularDeflection(), -- Standard_True); -- } -- - if (poly.IsNull()) - { - continue; -@@ -134,23 +162,29 @@ class vtkF3DOCCTReader::vtkInternals - uvs->InsertNextTypedTuple(fn); - } - -- std::vector polyline(nbV - 1); -+ std::vector polyline(nbV); - std::iota(polyline.begin(), polyline.end(), shift); - linesCells->InsertNextCell(polyline.size(), polyline.data()); - - #if F3D_PLUGIN_OCCT_XCAF -- if (this->ColorTool) -+ std::array rgb = { 0, 0, 0 }; -+ try - { -- std::array rgb = { 0, 0, 0 }; -- Quantity_Color aColor; -- if (this->ColorTool->GetColor(edge, XCAFDoc_ColorCurv, aColor)) -+ const auto& style = inheritedStyles.FindFromKey(edge); -+ if (style.IsSetColorCurv()) - { -- rgb[0] = static_cast(255.0 * aColor.Red()); -- rgb[1] = static_cast(255.0 * aColor.Green()); -- rgb[2] = static_cast(255.0 * aColor.Blue()); -+ Quantity_Color color = style.GetColorCurv(); -+ rgb[0] = static_cast(255.0 * color.Red()); -+ rgb[1] = static_cast(255.0 * color.Green()); -+ rgb[2] = static_cast(255.0 * color.Blue()); - } -- colors->InsertNextTypedTuple(rgb.data()); - } -+ catch (Standard_NoSuchObject&) -+ { -+ /* edge has no style, safe to ignore */ -+ } -+ -+ colors->InsertNextTypedTuple(rgb.data()); - #endif - - shift += nbV; -@@ -165,14 +199,6 @@ class vtkF3DOCCTReader::vtkInternals - TopLoc_Location location; - const auto& poly = BRep_Tool::Triangulation(face, location); - -- if (poly.IsNull() || poly->NbTriangles() <= 0) -- { -- // meshing -- BRepMesh_IncrementalMesh(face, this->Parent->GetLinearDeflection(), -- this->Parent->GetRelativeDeflection(), this->Parent->GetAngularDeflection(), -- Standard_True); -- } -- - if (poly.IsNull()) - { - continue; -@@ -243,23 +269,32 @@ class vtkF3DOCCTReader::vtkInternals - std::swap(cell[0], cell[2]); - } - trianglesCells->InsertNextCell(3, cell); -+ } - - #if F3D_PLUGIN_OCCT_XCAF -- if (this->ColorTool) -+ std::array rgb = { 255, 255, 255 }; -+ try -+ { -+ const auto& style = inheritedStyles.FindFromKey(face); -+ if (style.IsSetColorSurf()) - { -- std::array rgb = { 255, 255, 255 }; -- Quantity_Color aColor; -- if (this->ColorTool->GetColor(face, XCAFDoc_ColorSurf, aColor)) -- { -- rgb[0] = static_cast(255.0 * aColor.Red()); -- rgb[1] = static_cast(255.0 * aColor.Green()); -- rgb[2] = static_cast(255.0 * aColor.Blue()); -- } -- colors->InsertNextTypedTuple(rgb.data()); -+ Quantity_Color color = style.GetColorSurf(); -+ rgb[0] = static_cast(255.0 * color.Red()); -+ rgb[1] = static_cast(255.0 * color.Green()); -+ rgb[2] = static_cast(255.0 * color.Blue()); - } --#endif - } -+ catch (Standard_NoSuchObject&) -+ { -+ /* face has no style, safe to ignore */ -+ } - -+ for (int i = 1; i <= nbT; i++) -+ { -+ colors->InsertNextTypedTuple(rgb.data()); -+ } -+#endif -+ - shift += nbV; - } - -@@ -271,11 +306,7 @@ class vtkF3DOCCTReader::vtkInternals - polydata->SetLines(linesCells); - - #if F3D_PLUGIN_OCCT_XCAF -- /* colors may be left empty if this->ColorTool has not been initialized */ -- if (colors->GetSize() > 0) -- { -- polydata->GetCellData()->SetScalars(colors); -- } -+ polydata->GetCellData()->SetScalars(colors); - #endif - - polydata->Squeeze(); -@@ -283,7 +314,99 @@ class vtkF3DOCCTReader::vtkInternals - } - - #if F3D_PLUGIN_OCCT_XCAF -+ StyleMap CollectInheritedStyles(const TDF_Label& rootLabel, const TopoDS_Shape& rootShape) -+ { -+ StyleMap inheritedStyles; -+ -+ if (rootLabel.IsNull()) -+ { -+ return inheritedStyles; -+ } -+ -+ /* collect styled shapes from the document */ -+ StyleMap collectedStyles; -+ XCAFPrs::CollectStyleSettings(rootLabel, TopLoc_Location(), collectedStyles); -+ -+ /* iterate styled shapes and collect sorted by ascending shape type depth */ -+ const auto cmp = [](const TopoDS_Shape& a, const TopoDS_Shape& b) -+ { return a.ShapeType() > b.ShapeType(); }; -+ std::multimap styledShapes(cmp); -+ -+ const TopAbs_ShapeEnum leafType = this->Parent->GetReadWire() ? TopAbs_EDGE : TopAbs_FACE; -+ for (StyleMap::Iterator iter(collectedStyles); iter.More(); iter.Next()) -+ { -+ const TopoDS_Shape& shape = iter.Key(); -+ if (shape.ShapeType() <= leafType) -+ { -+ styledShapes.insert({ shape, iter.Value() }); -+ } -+ } -+ -+ /* pass down each parent style props to descendent edge/face leaves */ -+ const auto passDownToLeaves = [&](TopAbs_ShapeEnum type) -+ { -+ for (const auto& styledShape : styledShapes) -+ { -+ for (TopExp_Explorer iter(styledShape.first, type); iter.More(); iter.Next()) -+ { -+ try -+ { -+ this->PassDownStyleProps( -+ styledShape.second, inheritedStyles.ChangeFromKey(iter.Current())); -+ } -+ catch (Standard_NoSuchObject&) -+ { -+ inheritedStyles.Add(iter.Current(), styledShape.second); -+ } -+ } -+ } -+ }; -+ -+ passDownToLeaves(TopAbs_FACE); -+ -+ if (this->Parent->GetReadWire()) -+ { -+ passDownToLeaves(TopAbs_EDGE); -+ } -+ -+ /* pass down default style (if any) to all leaves */ -+ try -+ { -+ const XCAFPrs_Style& defaultStyle = collectedStyles.FindFromKey(rootShape); -+ for (StyleMap::Iterator iter(inheritedStyles); iter.More(); iter.Next()) -+ { -+ XCAFPrs_Style style = iter.Value(); -+ this->PassDownStyleProps(defaultStyle, style); -+ } -+ } -+ catch (Standard_NoSuchObject&) -+ { -+ /* root shape has no style, safe to ignore */ -+ } -+ -+ return inheritedStyles; -+ } -+ - //---------------------------------------------------------------------------- -+ void PassDownStyleProps(const XCAFPrs_Style& parent, XCAFPrs_Style& child) -+ { -+ if (!child.IsSetColorCurv() && parent.IsSetColorCurv()) -+ { -+ child.SetColorCurv(parent.GetColorCurv()); -+ } -+ -+ if (!child.IsSetColorSurf() && parent.IsSetColorSurf()) -+ { -+ child.SetColorSurf(parent.GetColorSurfRGBA()); -+ } -+ -+ if (child.Material().IsNull() && !parent.Material().IsNull()) -+ { -+ child.SetMaterial(parent.Material()); -+ } -+ }; -+ -+ //---------------------------------------------------------------------------- - void AddLabel(const TDF_Label& label, vtkMatrix4x4* position, vtkMultiBlockDataSet* mb) - { - if (this->ShapeTool->IsSimpleShape(label) && this->ShapeTool->IsTopLevel(label)) -@@ -365,7 +488,11 @@ class vtkF3DOCCTReader::vtkInternals - int GetHash(const TDF_Label& label) - { - TopoDS_Shape aShape; -+#if OCC_VERSION_HEX < 0x070800 - return this->ShapeTool->GetShape(label, aShape) ? aShape.HashCode(INT_MAX) : 0; -+#else -+ return this->ShapeTool->GetShape(label, aShape) ? std::hash{}(aShape) : 0; -+#endif - } - - //---------------------------------------------------------------------------- -@@ -401,7 +528,6 @@ class vtkF3DOCCTReader::vtkInternals - - std::unordered_map > ShapeMap; - Handle(XCAFDoc_ShapeTool) ShapeTool; -- Handle(XCAFDoc_ColorTool) ColorTool; - #endif - - vtkF3DOCCTReader* Parent; -@@ -424,7 +550,10 @@ class ProgressIndicator : public Message_ProgressIndic - class ProgressIndicator : public Message_ProgressIndicator - { - public: -- explicit ProgressIndicator(vtkF3DOCCTReader* reader) { this->Reader = reader; } -+ explicit ProgressIndicator(vtkF3DOCCTReader* reader) -+ { -+ this->Reader = reader; -+ } - - protected: - void Show(const Message_ProgressScope&, const Standard_Boolean) override -@@ -493,7 +622,12 @@ int vtkF3DOCCTReader::RequestData( - if (success) - { - output->SetNumberOfBlocks(1); -+#if F3D_PLUGIN_OCCT_XCAF -+ const vtkSmartPointer polydata = -+ this->Internals->CreateShape(shape, TDF_Label()); -+#else - const vtkSmartPointer polydata = this->Internals->CreateShape(shape); -+#endif - if (polydata && polydata->GetNumberOfCells() > 0) - { - output->SetBlock(1, polydata); -@@ -522,7 +656,6 @@ int vtkF3DOCCTReader::RequestData( - } - - this->Internals->ShapeTool = XCAFDoc_DocumentTool::ShapeTool(doc->Main()); -- this->Internals->ColorTool = XCAFDoc_DocumentTool::ColorTool(doc->Main()); - - TDF_LabelSequence topLevelShapes; - -@@ -537,9 +670,9 @@ int vtkF3DOCCTReader::RequestData( - this->Internals->ShapeTool->GetShape(label, shape); - - this->Internals->ShapeMap[this->Internals->GetHash(label)] = -- this->Internals->CreateShape(shape); -+ this->Internals->CreateShape(shape, label); - -- double progress = 0.5 + static_cast(iLabel) / topLevelShapes.Length(); -+ double progress = 0.5 + (static_cast(iLabel) / topLevelShapes.Length()) / 2; - this->InvokeEvent(vtkCommand::ProgressEvent, &progress); - } - diff --git a/graphics/f3d/pkg-plist b/graphics/f3d/pkg-plist index adc827863ddd..cfd02f534d6f 100644 --- a/graphics/f3d/pkg-plist +++ b/graphics/f3d/pkg-plist @@ -26,28 +26,32 @@ include/f3d/plugin.h include/f3d/reader.h include/f3d/types.h include/f3d/utils.h +include/f3d/vtkF3DFaceVaryingPointDispatcher.h +include/f3d/vtkextModule.h include/f3d/window.h +lib/cmake/f3d/application-config.cmake lib/cmake/f3d/f3dConfig.cmake lib/cmake/f3d/f3dConfigVersion.cmake lib/cmake/f3d/f3dEmbed.cmake -lib/cmake/f3d/f3dPlugin.cmake +lib/cmake/f3d/f3dLibraryTargets-%%CMAKE_BUILD_TYPE%%.cmake +lib/cmake/f3d/f3dLibraryTargets.cmake lib/cmake/f3d/f3dTargets-%%CMAKE_BUILD_TYPE%%.cmake lib/cmake/f3d/f3dTargets.cmake -lib/cmake/f3d/plugin.cxx.in -lib/cmake/f3d/plugin.desktop.in -lib/cmake/f3d/plugin.thumbnailer.in -lib/cmake/f3d/readerBoilerPlate.h.in -%%ALEMBIC%%lib/libVTKExtensionsAlembicReader.a -lib/libVTKExtensionsApplicative.a -%%ASSIMP%%lib/libVTKExtensionsAssimpReader.a -lib/libVTKExtensionsCore.a -%%DRACO%%lib/libVTKExtensionsDracoReader.a -%%OCCT%%lib/libVTKExtensionsOCCTReader.a -lib/libVTKExtensionsReaders.a -lib/libVTKExtensionsRendering.a +lib/cmake/f3d/library-config.cmake +lib/cmake/f3d_vtkext/f3d_vtkext-targets-%%CMAKE_BUILD_TYPE%%.cmake +lib/cmake/f3d_vtkext/f3d_vtkext-targets.cmake +lib/cmake/f3d_vtkext/f3d_vtkext-vtk-module-properties.cmake lib/libf3d.so lib/libf3d.so.2 -lib/libf3d.so.2.3 +lib/libf3d.so.2.4 +lib/libvtkext.so +lib/libvtkextAlembic.a +lib/libvtkextAssimp.a +lib/libvtkextDraco.a +lib/libvtkextNative.a +lib/libvtkextOCCT.a +lib/libvtkextPrivate.a +lib/vtk/hierarchy/f3d_vtkext/vtkext-hierarchy.txt %%ALEMBIC%%share/applications/f3d-plugin-alembic.desktop %%ASSIMP%%share/applications/f3d-plugin-assimp.desktop %%DRACO%%share/applications/f3d-plugin-draco.desktop @@ -70,12 +74,12 @@ share/icons/hicolor/48x48/apps/f3d.png share/icons/hicolor/64x64/apps/f3d.png share/icons/hicolor/scalable/apps/f3d.svg share/metainfo/app.f3d.F3D.metainfo.xml -%%EXODUS%%share/mime/packages/f3d-exodus-formats.xml share/mime/packages/f3d-3d-formats.xml share/mime/packages/f3d-3d-image-formats.xml %%ALEMBIC%%share/mime/packages/f3d-alembic-formats.xml %%ASSIMP%%share/mime/packages/f3d-assimp-formats.xml %%DRACO%%share/mime/packages/f3d-draco-formats.xml +%%EXODUS%%share/mime/packages/f3d-exodus-formats.xml %%OCCT%%share/mime/packages/f3d-occt-formats.xml share/mime/packages/f3d-vtk-formats.xml %%ALEMBIC%%share/thumbnailers/f3d-plugin-alembic.thumbnailer diff --git a/graphics/py-f3d/Makefile b/graphics/py-f3d/Makefile index 4377719512ef..80f1b98e4d37 100644 --- a/graphics/py-f3d/Makefile +++ b/graphics/py-f3d/Makefile @@ -1,6 +1,6 @@ PORTNAME= f3d DISTVERSIONPREFIX= v -DISTVERSION= 2.3.1 +DISTVERSION= 2.4.0 CATEGORIES= graphics PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} diff --git a/graphics/py-f3d/distinfo b/graphics/py-f3d/distinfo index be58a4847de1..c6533a6e941b 100644 --- a/graphics/py-f3d/distinfo +++ b/graphics/py-f3d/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1712010259 -SHA256 (f3d-app-f3d-v2.3.1_GH0.tar.gz) = e6ada89851cd27c84117b5b73dd69475fa7442f05e1dbf2fa76e1dc34d2c0006 -SIZE (f3d-app-f3d-v2.3.1_GH0.tar.gz) = 40726219 +TIMESTAMP = 1712204626 +SHA256 (f3d-app-f3d-v2.4.0_GH0.tar.gz) = 3286ad1b324b995fd95818679b4ced80ebc3cc3b4bd4c8e6964695c05c934c8f +SIZE (f3d-app-f3d-v2.4.0_GH0.tar.gz) = 44886935