清理临时的项目文件
This commit is contained in:
parent
2d1c835398
commit
c9cd17c24a
@ -1,31 +0,0 @@
|
||||
<!-- Core Animation System -->
|
||||
<Compile Include="src\Core\Animation\PathAnimationManager.cs" /> <Page Include="src\UI\WPF\Views\AboutDialog.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<!-- Shared Resource Dictionary -->
|
||||
<Page Include="src\UI\WPF\Resources\NavisworksStyles.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup> <Page Include="src\UI\WPF\Views\AboutDialog.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<!-- Shared Resource Dictionary -->
|
||||
<Page Include="src\UI\WPF\Resources\NavisworksStyles.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup> <Page Include="src\UI\WPF\Views\AboutDialog.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<!-- Shared Resource Dictionary -->
|
||||
<Page Include="src\UI\WPF\Resources\NavisworksStyles.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WinFX\3.0\Microsoft.WinFX.targets" Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\WinFX\3.0\Microsoft.WinFX.targets')" />
|
||||
@ -1,86 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{1A0124F6-3DEB-4153-8760-F568AD9393EE}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>NavisworksTransport</RootNamespace>
|
||||
<AssemblyName>SimpleTestPlugin</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;NAVISWORKS_2026</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NAVISWORKS_2026</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Navisworks 2026 API References -->
|
||||
<Reference Include="Autodesk.Navisworks.Api">
|
||||
<HintPath>..\..\..\..\Program Files\Autodesk\Navisworks Manage 2026\Autodesk.Navisworks.Api.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
|
||||
<!-- System References -->
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
|
||||
<!-- WPF References -->
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="System.Xaml" />
|
||||
<Reference Include="WindowsFormsIntegration" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- WPF Test Plugin -->
|
||||
<Compile Include="src\Core\SimpleWPFTestPlugin.cs" />
|
||||
<Compile Include="src\Core\SimpleWPFHelloWorldControl.cs" />
|
||||
|
||||
<!-- Assembly Info -->
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Localization Files -->
|
||||
<None Include="src\Resources\NavisworksTransport.Tian.name.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<Link>NavisworksTransport.Tian.name.txt</Link>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
|
||||
<!-- Copy output to Navisworks 2026 plugins directory -->
|
||||
<!-- <Target Name="PostBuildEvent" AfterTargets="PostBuildEvent">
|
||||
<ItemGroup>
|
||||
<OutputFiles Include="$(TargetDir)**\*.*" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(OutputFiles)" DestinationFolder="C:\Program Files\Autodesk\Navisworks Manage 2026\Plugins\SimpleTestPlugin\%(RecursiveDir)" SkipUnchangedFiles="true" />
|
||||
</Target> -->
|
||||
</Project>
|
||||
@ -1 +1 @@
|
||||
0.8.0
|
||||
0.8.0
|
||||
|
||||
23
WARP.md
23
WARP.md
@ -9,16 +9,19 @@ NavisworksTransport is a comprehensive Navisworks 2026 plugin for logistics path
|
||||
## Common Development Commands
|
||||
|
||||
### Building
|
||||
|
||||
- **Primary build command**: `./compile.bat` - Must use `./` prefix in PowerShell/CMD on Windows
|
||||
- **Alternative**: `dotnet build NavisworksTransportPlugin.csproj --configuration Debug --verbosity normal`
|
||||
- **MSBuild paths auto-detected**: VS2022 Community → Professional → VS2019 fallback
|
||||
|
||||
### Deployment
|
||||
|
||||
- **Deploy to Navisworks**: `deploy-plugin.bat` (requires Administrator privileges)
|
||||
- **Auto-deployment**: Build output automatically copies to Navisworks 2026 plugin directory
|
||||
- **Plugin location**: `C:\Program Files\Autodesk\Navisworks Manage 2026\Plugins\NavisworksTransportPlugin\`
|
||||
|
||||
### Testing & Debugging
|
||||
|
||||
- **Log viewer**: Use LogManager centralized logging - logs stored in `%CommonApplicationData%\Autodesk\Navisworks Manage 2026\NavisworksTransport\logs\debug.log`
|
||||
- **Hot reload**: Restart Navisworks required after each compilation
|
||||
- **Testing environment**: Navisworks Manage 2026 exclusively
|
||||
@ -26,6 +29,7 @@ NavisworksTransport is a comprehensive Navisworks 2026 plugin for logistics path
|
||||
## Architecture Overview
|
||||
|
||||
### Dual Plugin Architecture Pattern
|
||||
|
||||
This system implements multiple Navisworks plugin types in a single assembly:
|
||||
|
||||
- **MainPlugin.cs**: Primary AddInPlugin with ribbon UI integration and DockPanePlugin capabilities
|
||||
@ -34,6 +38,7 @@ This system implements multiple Navisworks plugin types in a single assembly:
|
||||
- **TestPlugin.cs**: Development testing plugin (separate from main functionality)
|
||||
|
||||
### Core Management Layer
|
||||
|
||||
- **PathPlanningManager.cs**: Central coordinator with A* pathfinding algorithm integration (RoyT.AStar library)
|
||||
- **LogisticsAnimationManager.cs**: Advanced animation system leveraging Navisworks 2026 native components
|
||||
- **TimeLinerIntegrationManager.cs**: Bridge between custom animations and Navisworks TimeLiner
|
||||
@ -42,6 +47,7 @@ This system implements multiple Navisworks plugin types in a single assembly:
|
||||
- **ModelSplitterManager.cs**: Model export and layer separation capabilities
|
||||
|
||||
### Data & Coordinate Systems
|
||||
|
||||
- **PathPlanningModels.cs**: Core data structures with event-driven state management
|
||||
- **PathDataManager.cs**: JSON serialization system with migration support
|
||||
- **CoordinateConverter.cs**: Complex coordinate transformation chains for 2D map overlay to 3D world mapping
|
||||
@ -49,6 +55,7 @@ This system implements multiple Navisworks plugin types in a single assembly:
|
||||
- **FloorDetector.cs**: Multi-story building automatic floor/level detection
|
||||
|
||||
### UI Architecture: Hybrid WPF + WinForms
|
||||
|
||||
- **WPF Components** (`src\UI\WPF\`): Modern MVVM-based controls
|
||||
- LogisticsControlPanel: Main docked interface panel
|
||||
- ViewModels: INotifyPropertyChanged pattern implementation
|
||||
@ -57,6 +64,7 @@ This system implements multiple Navisworks plugin types in a single assembly:
|
||||
- **Integration**: ElementHost pattern for embedding WPF in Navisworks environment
|
||||
|
||||
### Pathfinding & Animation Integration
|
||||
|
||||
- **A* Implementation**: RoyT.AStar library for optimal path calculation
|
||||
- **Animation Pipeline**: Transform-based movement with real-time collision detection
|
||||
- **TimeLiner Bridge**: Synchronization between custom path animations and Navisworks timeline
|
||||
@ -65,34 +73,41 @@ This system implements multiple Navisworks plugin types in a single assembly:
|
||||
## Technical Implementation Details
|
||||
|
||||
### Navisworks API Integration Strategy
|
||||
|
||||
- **Dual API Approach**: Native API (`Autodesk.Navisworks.Api`) for core functionality + COM API (`Autodesk.Navisworks.ComApi`) for attribute persistence and TimeLiner operations
|
||||
- **Multi-Plugin Registration**: Three distinct plugin types registered in single assembly
|
||||
- **Global Exception Handling**: `GlobalExceptionHandler` class provides application-wide error management
|
||||
- **Navisworks 2026 Exclusive**: Utilizes 2026-specific API features without backward compatibility constraints
|
||||
|
||||
### State Management Architecture
|
||||
|
||||
- **Session State**: PathEditState enum (None, AddingPoints, EditingPath) with comprehensive event callbacks
|
||||
- **Data Persistence**: JSON-based serialization with LogisticsAttributeChangedEventArgs for change tracking
|
||||
- **Coordinate Mapping**: Multi-layer coordinate system supporting 2D overlay visualization on 3D models
|
||||
|
||||
### Logistics Classification System
|
||||
|
||||
Eight predefined categories with automatic inheritance from parent to child nodes:
|
||||
|
||||
- 门 (Doors), 电梯 (Elevators), 楼梯 (Stairs), 通道 (Channels)
|
||||
- 障碍物 (Obstacles), 装卸区 (Loading Zones), 停车区 (Parking), 检查点 (Checkpoints)
|
||||
|
||||
## Development Guidelines
|
||||
|
||||
### Language Standards
|
||||
|
||||
- **Primary Language**: 中文 (Chinese) for all user interaction, code comments, and technical documentation
|
||||
- **Communication**: All development discussions and code documentation must be in Chinese
|
||||
|
||||
### Package Management (Legacy .NET Framework)
|
||||
|
||||
- **Project Format**: Old-style csproj using `<Reference Include>` with HintPath (NOT PackageReference)
|
||||
- **NuGet Management**: Manual packages.config management (do NOT use `dotnet add package`)
|
||||
- **Package Installation**: Download .nupkg files and extract to packages/ directory
|
||||
- **Assembly Path Format**: `packages\{PackageId}.{Version}\lib\{TargetFramework}\{Assembly}.dll`
|
||||
|
||||
### Plugin Registration Patterns
|
||||
|
||||
```csharp
|
||||
// Multi-plugin registration in single assembly
|
||||
[Plugin("NavisworksTransport.MainPlugin", "YourDeveloperID")]
|
||||
@ -105,12 +120,14 @@ public class PathClickToolPlugin : ToolPlugin { }
|
||||
```
|
||||
|
||||
### Critical API Usage Patterns
|
||||
|
||||
- **Navisworks API Documentation**: Always check `doc\navisworks_api\` documentation before implementing Navisworks functionality
|
||||
- **COM API for Persistence**: Use COM API for all attribute operations requiring session persistence
|
||||
- **GlobalExceptionHandler**: Must be initialized in MainPlugin constructor for application-wide error handling
|
||||
- **Thread Safety**: All UI operations must be marshaled to main thread when called from background processes
|
||||
|
||||
### Navisworks 2026 Development Focus
|
||||
|
||||
- **Exclusive 2026 Targeting**: No backward compatibility required - leverage all 2026-specific features
|
||||
- **Legacy References**: `src\Legacy\` contains reference code from 2017 version but is not actively maintained
|
||||
- **Modern Animation System**: Use Navisworks 2026 native animation components instead of manual Transform manipulation
|
||||
@ -119,17 +136,20 @@ public class PathClickToolPlugin : ToolPlugin { }
|
||||
## API Documentation Search Strategy
|
||||
|
||||
### CHM Documentation Best Practices
|
||||
|
||||
**Problem**: CHM extraction creates thousands of HTML files, making standard search tools ineffective
|
||||
|
||||
**Solution Strategies**:
|
||||
|
||||
1. **Use structural entry points**:
|
||||
|
||||
```bash
|
||||
# Priority access to class member lists
|
||||
AllMembers_T_Autodesk_Navisworks_Api_ClassName.htm
|
||||
```
|
||||
|
||||
2. **Precise filename search**:
|
||||
|
||||
```bash
|
||||
find . -name "*ClassName*" -o -name "*MethodName*"
|
||||
```
|
||||
@ -147,6 +167,7 @@ public class PathClickToolPlugin : ToolPlugin { }
|
||||
## File Structure Context
|
||||
|
||||
### Source Organization
|
||||
|
||||
```
|
||||
src/
|
||||
├── Core/ # Main plugin components
|
||||
@ -162,12 +183,14 @@ src/
|
||||
```
|
||||
|
||||
### Documentation Structure
|
||||
|
||||
- `doc/guide/`: Development guides and troubleshooting
|
||||
- `doc/migration/`: 2017→2026 migration documentation
|
||||
- `doc/requirement/`: Requirements and specifications
|
||||
- `doc/working/`: Active development documentation
|
||||
|
||||
### Build Configuration
|
||||
|
||||
- **Target Framework**: .NET Framework 4.8 (x64 platform)
|
||||
- **Navisworks Version**: 2026 exclusive with conditional compilation (`NAVISWORKS_2026`)
|
||||
- **Key Dependencies**: RoyT.AStar for pathfinding, WPF for modern UI
|
||||
|
||||
@ -1,31 +0,0 @@
|
||||
@echo off
|
||||
echo Building Simple WPF Test Plugin...
|
||||
|
||||
REM Set MSBuild path (check Community edition first)
|
||||
set MSBUILD_PATH="C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe"
|
||||
|
||||
REM Check if MSBuild exists, try alternative paths
|
||||
if not exist %MSBUILD_PATH% (
|
||||
set MSBUILD_PATH="C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\MSBuild.exe"
|
||||
)
|
||||
if not exist %MSBUILD_PATH% (
|
||||
set MSBUILD_PATH="C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\MSBuild.exe"
|
||||
)
|
||||
if not exist %MSBUILD_PATH% (
|
||||
echo MSBuild not found. Trying dotnet build...
|
||||
dotnet build NavisworksTransportPlugin.csproj --verbosity minimal
|
||||
goto :end
|
||||
)
|
||||
|
||||
echo Using MSBuild: %MSBUILD_PATH%
|
||||
|
||||
REM Build the project
|
||||
echo Building project...
|
||||
%MSBUILD_PATH% "SimpleTestPlugin.csproj" /p:Configuration=Debug /p:Platform=AnyCPU /verbosity:minimal
|
||||
|
||||
:end
|
||||
if %ERRORLEVEL% EQU 0 (
|
||||
echo Build successful!
|
||||
) else (
|
||||
echo Build failed!
|
||||
)
|
||||
@ -1,26 +0,0 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace NavisworksTransport
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for UserControl1.xaml
|
||||
/// </summary>
|
||||
public partial class SimpleWPFHelloWorldControl : UserControl
|
||||
{
|
||||
public SimpleWPFHelloWorldControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
var textBlock = new TextBlock();
|
||||
textBlock.Text = "Hello World from WPF!";
|
||||
textBlock.FontSize = 16;
|
||||
textBlock.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
|
||||
textBlock.VerticalAlignment = System.Windows.VerticalAlignment.Center;
|
||||
|
||||
this.Content = textBlock;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,26 +0,0 @@
|
||||
using System.Windows.Forms.Integration;
|
||||
using Autodesk.Navisworks.Api.Plugins;
|
||||
|
||||
namespace NavisworksTransport
|
||||
{
|
||||
[Plugin("NavisworksTransport.SimpleWPFTest", "ADSK",
|
||||
DisplayName = "SimpleWPFTestPlugin",
|
||||
ToolTip = "Basic WPF Docking Pane Plugin")]
|
||||
[DockPanePlugin(150, 200, FixedSize=false)]
|
||||
class SimpleWPFTestPlugin : DockPanePlugin
|
||||
{
|
||||
public override System.Windows.Forms.Control CreateControlPane()
|
||||
{
|
||||
ElementHost eh = new ElementHost();
|
||||
eh.AutoSize = true;
|
||||
eh.Child = new SimpleWPFHelloWorldControl();
|
||||
eh.CreateControl();
|
||||
return eh;
|
||||
}
|
||||
|
||||
public override void DestroyControlPane(System.Windows.Forms.Control pane)
|
||||
{
|
||||
pane.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,21 +0,0 @@
|
||||
@echo off
|
||||
echo 正在复制纯净WPF测试插件到Navisworks插件目录...
|
||||
|
||||
if not exist "C:\Program Files\Autodesk\Navisworks Manage 2026\Plugins\SimpleTestPlugin" (
|
||||
mkdir "C:\Program Files\Autodesk\Navisworks Manage 2026\Plugins\SimpleTestPlugin"
|
||||
)
|
||||
|
||||
echo 复制纯净WPF插件DLL...
|
||||
copy "bin\Debug\SimpleTestPlugin.dll" "C:\Program Files\Autodesk\Navisworks Manage 2026\Plugins\SimpleTestPlugin\"
|
||||
copy "bin\Debug\SimpleTestPlugin.pdb" "C:\Program Files\Autodesk\Navisworks Manage 2026\Plugins\SimpleTestPlugin\"
|
||||
|
||||
echo 文件复制完成!
|
||||
echo.
|
||||
echo 已复制纯净WPF测试插件 (按照官方例子构建):
|
||||
echo - 插件名称: SimpleWPFTestPlugin
|
||||
echo - 文件大小: 5KB (最小化版本)
|
||||
echo - 架构: 双文件结构,完全按照官方例子
|
||||
echo.
|
||||
echo 请启动Navisworks Manage 2026测试这个纯净版本
|
||||
echo.
|
||||
pause
|
||||
Loading…
Reference in New Issue
Block a user