From c69aee05aaccebe6a8ceb155f26d65fa6e7fdca2 Mon Sep 17 00:00:00 2001 From: Changsheng Date: Mon, 11 Oct 2021 21:47:11 +0800 Subject: [PATCH] finish face to brep translate --- README.md | 6 +- RhinoInside.NX Starter/MainWindow.xaml | 2 +- RhinoInside.NX Starter/MainWindow.xaml.cs | 34 +- RhinoInside.NX.Core/NX/GH_Object.cs | 82 +++ .../RhinoInside.NX.Core.csproj | 1 + .../RhinoInside.NX.GH.Loader.cs | 2 +- .../DisplayableObject/Param_NXBody.cs | 30 +- RhinoInside.NX.GH/RhinoInside.NX.GH.csproj | 3 + .../TestComponents/TestComponent.cs | 22 + RhinoInside.NX.GH/TestComponents/UDOTest.cs | 44 ++ RhinoInside.NX.GH/Types/BaseCurve/NX_Edge.cs | 8 +- RhinoInside.NX.GH/Types/NX_Body.cs | 16 + RhinoInside.NX.GH/Types/NX_Face.cs | 5 + .../Utilities/CSharpScriptComponent.cs | 2 + .../Utilities/GetBrepLogComponent.cs | 49 ++ .../Geometry/{ => Decoder}/CurveDecoder.cs | 64 ++- .../Geometry/Decoder/CurveRawDecoder.cs | 210 ++++++++ .../Geometry/Decoder/PointDecoder.cs | 47 ++ .../PointRawDecoder.cs} | 39 +- .../Geometry/Decoder/SurfaceDcoder.cs | 40 ++ .../Geometry/Decoder/SurfaceRawDecoder.cs | 509 ++++++++++++++++++ .../Geometry/GeometryDecoder.cs | 205 +------ .../Geometry/PointEncoder.cs | 8 - .../Geometry/Raw/Decoder/BrepRawDecoder.cs | 419 -------------- .../Geometry/Raw/Decoder/CurveRawDecoder.cs | 104 ---- .../Geometry/Raw/Decoder/SurfaceRawDecoder.cs | 221 -------- .../Geometry/UnitConverter.cs | 2 - .../RhinoInside.NX.Translator.csproj | 11 +- 28 files changed, 1153 insertions(+), 1032 deletions(-) create mode 100644 RhinoInside.NX.Core/NX/GH_Object.cs create mode 100644 RhinoInside.NX.GH/TestComponents/TestComponent.cs create mode 100644 RhinoInside.NX.GH/TestComponents/UDOTest.cs create mode 100644 RhinoInside.NX.GH/Utilities/GetBrepLogComponent.cs rename RhinoInside.NX.Translator/Geometry/{ => Decoder}/CurveDecoder.cs (55%) create mode 100644 RhinoInside.NX.Translator/Geometry/Decoder/CurveRawDecoder.cs create mode 100644 RhinoInside.NX.Translator/Geometry/Decoder/PointDecoder.cs rename RhinoInside.NX.Translator/Geometry/{Raw/Decoder/StructuresRawDecoder.cs => Decoder/PointRawDecoder.cs} (52%) create mode 100644 RhinoInside.NX.Translator/Geometry/Decoder/SurfaceDcoder.cs create mode 100644 RhinoInside.NX.Translator/Geometry/Decoder/SurfaceRawDecoder.cs delete mode 100644 RhinoInside.NX.Translator/Geometry/Raw/Decoder/BrepRawDecoder.cs delete mode 100644 RhinoInside.NX.Translator/Geometry/Raw/Decoder/CurveRawDecoder.cs delete mode 100644 RhinoInside.NX.Translator/Geometry/Raw/Decoder/SurfaceRawDecoder.cs diff --git a/README.md b/README.md index cee8470..cad365f 100644 --- a/README.md +++ b/README.md @@ -26,4 +26,8 @@ The program offered is signed with NX 1872, that means if you use 1847 or other # 编译方法 >1. 安装 NX 时将安装目录设置为如下形式,XXX\Siemens\NXVER,其中 XXX 为任意文件夹,注意最好不要有空格,否则可能会引发其它问题,NXVER 为 NX 的版本号,比如 NX1872、NX1953,注意 NX 和 版本号之间不要有空格。 >2. 创建环境变量 SPLM_ROOT_DIR,指向第一步安装路径中的 XXX\Siemens。 ->3. 创建环境变量 RHINO_ROOT_DIR,指向 RHINO 的安装目录,比如 C:\Programs\Rhino\7。 \ No newline at end of file +>3. 创建环境变量 RHINO_ROOT_DIR,指向 RHINO 的安装目录,比如 C:\Programs\Rhino\7。 + +#已知问题 +>1. 不能修改 Grasshopper 中组件的描述(名称),否则会卡死,原因暂时未知。 +>2. 无法正确创建被平面修剪后断面为椭圆的圆锥/圆锥面,提示 ON_Brep.m_T[1] 2d curve is not inside surface domain。 \ No newline at end of file diff --git a/RhinoInside.NX Starter/MainWindow.xaml b/RhinoInside.NX Starter/MainWindow.xaml index 5c26672..7f8d015 100644 --- a/RhinoInside.NX Starter/MainWindow.xaml +++ b/RhinoInside.NX Starter/MainWindow.xaml @@ -5,7 +5,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:RhinoInside_Starter" mc:Ignorable="d" - Title="RhinoInside 鍚姩鍣" Height="400" Width="750" WindowStyle="ToolWindow" ResizeMode="NoResize"> + Title="RhinoInside 鍚姩鍣" Height="400" Width="750" ResizeMode="NoResize">