Skip to content

Commit

Permalink
Add Starter
Browse files Browse the repository at this point in the history
  • Loading branch information
zcstkhk committed Oct 4, 2021
1 parent f47c675 commit 60d9402
Show file tree
Hide file tree
Showing 62 changed files with 2,387 additions and 1,259 deletions.
29 changes: 14 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
[English Description](README_EN.MD)

# RhinoInside.NX

A Rhino Plug-in For Siemens NX.

# 将 NX 中的面转换为 Rhino Brep 的时候遇到一些问题,还请有相关经验的小伙伴不吝赐教。

# It's now in a very very early beta. for now, it's not recommended for any actual use.
# 目前仍然是处于非常早期的测试版本.

# Install Guide
To install this Plug-in, you must install Rhino 7 and Siemens NX 1847 or higher.

Download the latest version [Here](https://github.com/zcstkhk/RhinoInside.NX/releases/)
下载最新版本 [点击此处](https://github.com/zcstkhk/RhinoInside.NX/releases/)

The program offered is signed with NX 1872, that means if you use 1847 or other version, you must build the program by yourself then sign the program. For more detail about the signing progress, click the link below.

[Signing Process](https://docs.plm.automation.siemens.com/tdoc/nx/1847/nx_api/#uid:signing_process)

Here is the guide for install this plug-in.

>1. Install the Rhino and NX.
>2. Download the Program zip file, then copy the Program folder to any position you like, for example D:\\
>3. Create a enviroment variant, the name is UGII_USER_DIR, the value is where the position that Program folder in. For example, D:\\
>4. Create a enviroment variant, the name is UGII_RhinoInside_Dir, the value is where the position that Program folder in. For example, D:\\
>5. Start NX, you will see a ribbon named RhinoInside.
[签名过程](https://docs.plm.automation.siemens.com/tdoc/nx/1847/nx_api/#uid:signing_process)

# 使用方法
>1. 安装 Rhino 和 NX.
>2. 编译或者下载程序包并解压,比如 D:\。
>3. 创建环境变量,名称为 UGII_USER_DIR,值为刚刚解压后的目录,比如 D:\,请注意这个目录下面包含 Application 文件夹,请勿将 Application 也写到环境变量中。
>4. 创建名为 UGII_RhinoInside_Dir,值与刚才设置的 UGII_USER_DIR 相同。
>5. 启动 NX,将会看到 RhinoInside 工作区。
>2. 打开 RhinoInside.NX Starter.
>3. 根据界面提示进行选择.
>4. 点击启动.
# 编译方法
>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。
29 changes: 29 additions & 0 deletions README_EN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[English Description](README_EN.MD)

# RhinoInside.NX

A Rhino Plug-in For Siemens NX.

# 将 NX 中的面转换为 Rhino Brep 的时候遇到一些问题,还请有相关经验的小伙伴不吝赐教。

# It's now in a very very early beta. for now, it's not recommended for any actual use.

# Install Guide
To install this Plug-in, you must install Rhino 7 and Siemens NX 1847 or higher.

下载最新版本 [点击此处](https://github.com/zcstkhk/RhinoInside.NX/releases/)

The program offered is signed with NX 1872, that means if you use 1847 or other version, you must build the program by yourself then sign the program. For more detail about the signing progress, click the link below.

[签名过程](https://docs.plm.automation.siemens.com/tdoc/nx/1847/nx_api/#uid:signing_process)

# 使用方法
>1. 安装 Rhino 和 NX.
>2. 打开 RhinoInside.NX Starter.
>3. 根据界面提示进行选择.
>4. 点击启动.
# 编译方法
>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。
6 changes: 6 additions & 0 deletions RhinoInside.NX Starter/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
</configuration>
14 changes: 14 additions & 0 deletions RhinoInside.NX Starter/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Application x:Class="RhinoInside_Starter.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:RhinoInside_Starter"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Resources\ZH-CN.xaml" />
<ResourceDictionary Source="Resources\EN-US.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
17 changes: 17 additions & 0 deletions RhinoInside.NX Starter/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace RhinoInside_Starter
{
/// <summary>
/// App.xaml 的交互逻辑
/// </summary>
public partial class App : Application
{
}
}
117 changes: 117 additions & 0 deletions RhinoInside.NX Starter/MainWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<Window x:Name="MyMainWindow" x:Class="RhinoInside_Starter.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
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">
<Window.Resources>
<Style TargetType="Button">
<Setter Property="Margin" Value="2" />
<Setter Property="Content" Value="{DynamicResource browse}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border BorderThickness="1" CornerRadius="5" Background="LightBlue" Width="80">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Content="{TemplateBinding Content}"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="TextBlock">
<Setter Property="Control.VerticalAlignment" Value="Center" />
<Setter Property="Control.FontWeight" Value="Bold" />
<Setter Property="Control.Margin" Value="2" />
</Style>
<Style TargetType="TextBox">
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FontSize" Value="20" />
<Setter Property="Margin" Value="5" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TextBox">
<Grid>
<Border x:Name="textBoxBorder" Background="White" BorderBrush="Black" BorderThickness="1" />
<ScrollViewer x:Name="PART_ContentHost" Margin="5,0,0,0" VerticalAlignment="Center" />
<Label Margin="5,0,0,0" x:Name="WaterMarkLabel" Content="{TemplateBinding Tag}" VerticalAlignment="Center" Visibility="Collapsed" Foreground="Gray" FontFamily="Microsoft YaHei" FontStyle="Italic" FontSize="15" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="Text" Value="" >
<Setter Property="Visibility" TargetName="WaterMarkLabel" Value="Visible" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="Red" />
</Trigger>
<Trigger Property="Text" Value="" >
<Setter Property="BorderBrush" TargetName="textBoxBorder" Value="Red" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
<RowDefinition Height="1*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" Margin="5">
<TextBlock Text="{DynamicResource selectLanguage}" VerticalAlignment="Center"/>
<ComboBox x:Name="comboBoxSelectLanguage" Grid.Row="0" Width="200" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20,0,0,0" SelectedIndex="0" SelectionChanged="comboBoxSelectLanguage_SelectionChanged">
<ComboBoxItem Content="中文" />
<ComboBoxItem Content="English" />
</ComboBox>
</StackPanel>
<TextBlock Grid.Row="1" Text="{DynamicResource selectNxInstallPath}" />
<TextBox x:Name="textBoxNxInstallPath" Grid.Row="2" Margin="5" Tag="{DynamicResource selectNxInstallPathWatermark}" />
<Button x:Name="buttonBrowseNX" Grid.Row="2" Grid.Column="2" Click="buttonBrowseNX_Click" />
<TextBlock Text="{DynamicResource selectRhinoInsidePath}" Grid.Row="3" />
<TextBox x:Name="textBoxRhinoInsidePath" Grid.Row="4" Tag="{DynamicResource selectRhinoInsidePath}" />
<Button x:Name="buttonBrowseRhinoInside" Grid.Row="4" Grid.Column="2" Click="buttonBrowseRhinoInside_Click" />
<TextBlock Text="{DynamicResource selectRhinoPath}" Grid.Row="5" />
<TextBox x:Name="textBoxRhinoPath" Grid.Row="6" Tag="{DynamicResource selectRhinoPathWatermark}" />
<Button x:Name="buttonBrowseRhino" Grid.Row="6" Grid.Column="2" Click="buttonBrowseRhino_Click"/>
<Button x:Name="buttonStart" Grid.Column="1" Grid.Row="7" Margin="15" Content="{DynamicResource start}" Click="buttonStart_Click">
<Button.Template>
<ControlTemplate TargetType="Button">
<Border BorderThickness="1" CornerRadius="5" Width="80">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
<Border.Style>
<Style TargetType="{x:Type Border}">
<Setter Property="Background" Value="Green" />
<Setter Property="IsEnabled" Value="True" />
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=textBoxNxInstallPath, Path=Text}" Value="">
<Setter Property="Background" Value="Gray" />
<Setter Property="IsEnabled" Value="False" />
</DataTrigger>
<DataTrigger Binding="{Binding ElementName=textBoxRhinoInsidePath, Path=Text}" Value="">
<Setter Property="Background" Value="Gray" />
<Setter Property="IsEnabled" Value="False" />
</DataTrigger>
<DataTrigger Binding="{Binding ElementName=textBoxRhinoPath, Path=Text}" Value="">
<Setter Property="Background" Value="Gray" />
<Setter Property="IsEnabled" Value="False" />
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Style>
</Border>
</ControlTemplate>
</Button.Template>
</Button>
</Grid>
</Window>
Loading

0 comments on commit 60d9402

Please sign in to comment.