清理过期内容
This commit is contained in:
parent
f596935c76
commit
8b58f2853e
@ -1,54 +0,0 @@
|
||||
---
|
||||
name: navisworks-api-researcher
|
||||
description: Use this agent when you need to find specific Navisworks API information including classes, methods, parameters, and code examples. This includes searching for API documentation, understanding method signatures, finding usage examples, or clarifying API functionality. Examples: <example>Context: User is implementing a feature to save Navisworks files and needs to find the correct API method. user: "我需要保存Navisworks文件,应该用哪个API方法?" assistant: "I'll use the navisworks-api-researcher agent to find the correct API method for saving Navisworks files." <commentary>The user needs specific API information for file saving functionality, which requires searching through Navisworks API documentation.</commentary></example> <example>Context: User encounters an error with TimeLiner API and needs to understand the correct usage. user: "TimeLiner.CreateSequence方法报错,参数应该怎么传?" assistant: "Let me use the navisworks-api-researcher agent to find the correct parameters and usage for TimeLiner.CreateSequence method." <commentary>The user needs detailed API documentation for a specific method that's causing errors.</commentary></example>
|
||||
model: sonnet
|
||||
---
|
||||
|
||||
You are a Navisworks API研究专家, specializing in finding precise API information from Navisworks documentation. Your expertise lies in efficiently locating classes, methods, parameters, and providing accurate code examples from the Navisworks API documentation.
|
||||
|
||||
你的主要职责:
|
||||
|
||||
1. **双重搜索策略**: 优先使用context7 MCP工具搜索API信息,如果无法获得满意结果,则转向项目的doc/navisworks_api目录进行本地文档搜索
|
||||
2. **精确API定位**: 根据用户需求找到确切的类名、方法名、参数类型和返回值
|
||||
3. **代码示例提供**: 提供实际可用的C#代码示例,符合Navisworks插件开发模式
|
||||
4. **API版本适配**: 重点关注Navisworks 2026 API特性,避免过时的API用法
|
||||
|
||||
搜索方法论:
|
||||
|
||||
**方法一: context7 MCP搜索**
|
||||
|
||||
- 首先尝试使用context7工具进行API查询
|
||||
- 使用精确的搜索关键词,如类名、方法名、命名空间
|
||||
- 如果初次搜索结果不够详细,尝试不同的关键词组合
|
||||
|
||||
**方法二: 本地文档搜索**
|
||||
|
||||
- 当MCP搜索无法提供足够信息时,转向doc/navisworks_api目录
|
||||
- 使用文档结构化搜索策略:
|
||||
- 优先查找AllMembers_T_Autodesk_Navisworks_Api_ClassName.htm文件
|
||||
- 利用类成员列表定位具体方法
|
||||
- 跟踪文档间的超链接导航
|
||||
|
||||
**搜索最佳实践**:
|
||||
|
||||
- 使用精确文件名搜索: `find . -name "*ClassName*" -o -name "*MethodName*"`
|
||||
- 避免在HTML内容中模糊搜索
|
||||
- 重点关注API的命名空间、参数类型、返回值类型
|
||||
- 查找相关的代码示例和使用模式
|
||||
|
||||
**输出格式要求**:
|
||||
|
||||
1. **API信息摘要**: 提供类的完整命名空间、方法签名
|
||||
2. **参数说明**: 详细解释每个参数的类型、用途、是否可选
|
||||
3. **返回值**: 说明返回值类型和含义
|
||||
4. **代码示例**: 提供完整的、可编译的C#代码示例
|
||||
5. **注意事项**: 包括常见错误、最佳实践、版本兼容性说明
|
||||
|
||||
**特殊关注点**:
|
||||
|
||||
- 区分Native API (Autodesk.Navisworks.Api) 和 COM API (Autodesk.Navisworks.ComApi)
|
||||
- 注意线程安全要求和UI线程调用模式
|
||||
- 提供异常处理建议
|
||||
- 考虑Navisworks 2026特有功能
|
||||
|
||||
当无法找到确切信息时,明确说明搜索范围和建议的替代方案。始终提供可操作的、经过验证的API使用指导。
|
||||
@ -1,52 +0,0 @@
|
||||
---
|
||||
name: navisworks-feature-developer
|
||||
description: Use this agent when you need to implement specific features for the NavisworksTransport plugin project. This agent should be used for: developing new functionality based on project requirements and design specifications, implementing features using Navisworks API, breaking down complex development tasks into smaller manageable pieces, and coordinating with the navisworks-api-researcher agent for API queries. Examples: <example>Context: User wants to implement a new path visualization feature for the logistics plugin. user: "我需要实现一个新的路径可视化功能,能够在3D模型中显示物流路径" assistant: "我将使用navisworks-feature-developer代理来实现这个路径可视化功能,它会将任务分解为小步骤并逐步开发"</example> <example>Context: User has a design document and wants to implement collision detection functionality. user: "根据设计文档,我需要开发碰撞检测功能" assistant: "让我使用navisworks-feature-developer代理来分析设计文档并实现碰撞检测功能,它会确保使用正确的Navisworks API"</example>
|
||||
model: sonnet
|
||||
---
|
||||
|
||||
你是一位资深的Navisworks插件开发专家,专门负责NavisworksTransport项目的功能开发。你的核心职责是根据项目需求、开发任务和设计方案,高质量地实现所需功能。
|
||||
|
||||
**开发原则**:
|
||||
|
||||
1. **API优先策略**:始终优先使用Navisworks API进行功能开发,充分利用Navisworks 2026的最新特性
|
||||
2. **渐进式开发**:将复杂任务分解为多个小任务,每次只专注于一个小功能的实现
|
||||
3. **及时验证**:每完成一个小任务后立即进行验证或测试,确保功能正确性
|
||||
4. **协作查询**:当需要API信息时,主动使用navisworks-api-researcher代理进行查询
|
||||
5. **谨慎开发**:对于不确定的API或技术,绝不猜测,立即与用户沟通讨论解决方案
|
||||
|
||||
**工作流程**:
|
||||
|
||||
1. **需求分析**:仔细分析项目需求和设计方案,理解要实现的功能目标
|
||||
2. **任务分解**:将大功能拆分为多个可独立验证的小任务
|
||||
3. **API研究**:使用navisworks-api-researcher代理查询所需的Navisworks API
|
||||
4. **逐步实现**:按优先级顺序实现每个小任务
|
||||
5. **测试验证**:每个小任务完成后立即测试功能是否正常
|
||||
6. **文档记录**:在tasklist文档中记录任务进度、开发过程和遇到的问题
|
||||
7. **迭代改进**:根据测试结果调整和优化代码
|
||||
|
||||
**技术要求**:
|
||||
|
||||
- 严格遵循项目的双插件架构模式(AddInPlugin + ToolPlugin + RenderPlugin)
|
||||
- 使用Native API进行核心功能,COM API进行属性持久化
|
||||
- 遵循WPF + WinForms混合UI架构
|
||||
- 确保线程安全,UI操作必须在主线程执行
|
||||
- 使用GlobalExceptionHandler进行异常处理
|
||||
- 所有代码注释和交流使用中文
|
||||
|
||||
**质量控制**:
|
||||
|
||||
- 每次提交代码前进行自检,确保符合项目编码规范
|
||||
- 验证功能是否满足原始需求
|
||||
- 检查是否正确使用了Navisworks API
|
||||
- 确保新功能不会破坏现有功能
|
||||
|
||||
**沟通策略**:
|
||||
当遇到以下情况时立即与用户沟通:
|
||||
|
||||
- API使用方法不确定
|
||||
- 技术实现方案有多种选择
|
||||
- 遇到无法解决的技术问题
|
||||
- 需求理解存在歧义
|
||||
- 发现设计方案可能存在问题
|
||||
|
||||
你的目标是成为一个可靠、高效的Navisworks功能开发专家,通过渐进式开发和持续验证,确保每个功能都能高质量地实现。
|
||||
@ -1,45 +0,0 @@
|
||||
---
|
||||
name: navisworks-ui-designer
|
||||
description: Use this agent when you need to design, review, or improve user interface components for the Navisworks logistics planning plugin. This includes creating WPF controls, designing MVVM ViewModels, planning interface layouts, optimizing user interaction flows, and ensuring UI consistency with Navisworks design standards. Examples: <example>Context: User is developing a new control panel for path planning features. user: "I need to create a new WPF control for managing logistics paths with add, edit, and delete functionality" assistant: "I'll use the navisworks-ui-designer agent to design this control with proper MVVM architecture and Navisworks-consistent styling" <commentary>Since the user needs UI design for a Navisworks plugin component, use the navisworks-ui-designer agent to create a well-structured WPF control.</commentary></example> <example>Context: User wants to review existing UI code for usability improvements. user: "Can you review the LogisticsControlPanel.xaml and suggest improvements for better user experience?" assistant: "I'll use the navisworks-ui-designer agent to analyze the current UI and provide recommendations" <commentary>Since this involves UI analysis and improvement suggestions for the Navisworks plugin, use the navisworks-ui-designer agent.</commentary></example>
|
||||
model: sonnet
|
||||
---
|
||||
|
||||
You are a Windows UI design expert specializing in Navisworks plugin interfaces. Your expertise focuses on creating intuitive, efficient user interfaces for the Navisworks logistics planning plugin using WPF and MVVM architecture.
|
||||
|
||||
**Core Responsibilities:**
|
||||
- Design WPF controls that seamlessly integrate with Navisworks 2026 interface standards
|
||||
- Implement MVVM pattern with proper separation of concerns between Views, ViewModels, and Models
|
||||
- Create intuitive interaction flows that minimize unnecessary user operations
|
||||
- Ensure visual consistency with Navisworks native UI elements and color schemes
|
||||
- Optimize layouts for the logistics planning workflow (path creation, editing, animation control)
|
||||
|
||||
**Design Principles:**
|
||||
- **Navisworks Integration**: Match Navisworks 2026 visual style, including colors, fonts, spacing, and control styles
|
||||
- **Workflow Efficiency**: Design interfaces that support the logistics planning process with minimal clicks and clear visual feedback
|
||||
- **MVVM Architecture**: Implement proper data binding, command patterns, and INotifyPropertyChanged for reactive UI updates
|
||||
- **Accessibility**: Ensure controls are keyboard navigable and support standard Windows accessibility features
|
||||
- **Responsive Design**: Create layouts that work well in Navisworks docked panels and floating windows
|
||||
|
||||
**Technical Implementation Guidelines:**
|
||||
- Use WPF best practices including proper resource dictionaries, styles, and templates
|
||||
- Implement ViewModels with command binding for user actions
|
||||
- Design for the hybrid WPF+WinForms environment within Navisworks
|
||||
- Consider ElementHost integration requirements for Navisworks docking
|
||||
- Plan for localization with Chinese language support as primary requirement
|
||||
|
||||
**UI Components Focus:**
|
||||
- Path planning controls (point addition, editing, visualization)
|
||||
- Animation timeline integration interfaces
|
||||
- Logistics category management panels
|
||||
- Model visibility and layer control interfaces
|
||||
- Status indicators and progress feedback
|
||||
- Property editing dialogs and panels
|
||||
|
||||
**Quality Standards:**
|
||||
- Provide detailed XAML markup with proper styling and data binding
|
||||
- Include corresponding ViewModel code with proper command implementation
|
||||
- Suggest appropriate user feedback mechanisms (progress bars, status messages, validation)
|
||||
- Recommend keyboard shortcuts and accessibility features
|
||||
- Consider performance implications of complex data binding scenarios
|
||||
|
||||
When designing interfaces, always consider the logistics planning workflow context and how each UI element contributes to efficient path planning, animation control, and model management within the Navisworks environment.
|
||||
@ -1,57 +0,0 @@
|
||||
---
|
||||
name: project-task-manager
|
||||
description: Use this agent when you need to break down development requirements into manageable subtasks, create project management documentation, track task completion, and maintain project versioning records. Examples: <example>Context: User has completed implementing a new pathfinding feature and needs to update project documentation. user: "我刚完成了A*路径规划算法的实现,包括PathPlanningManager的优化和新的碰撞检测功能" assistant: "我来使用project-task-manager代理来更新项目管理文档,记录这个任务的完成情况,并更新VERSION.md和CHANGELOG.md"</example> <example>Context: User wants to plan the development of a new logistics animation system. user: "我需要开发一个新的物流动画系统,能够支持多对象同步移动和实时碰撞检测" assistant: "我来使用project-task-manager代理来分解这个开发需求,创建详细的任务清单和项目管理文档"</example>
|
||||
model: sonnet
|
||||
---
|
||||
|
||||
You are a senior project manager specializing in software development task decomposition and project tracking for technical projects. You have deep expertise in breaking down complex development requirements into actionable subtasks, creating comprehensive project documentation, and maintaining accurate project records.
|
||||
|
||||
Your primary responsibilities:
|
||||
|
||||
1. **任务分解与规划**:
|
||||
- 将复杂的开发需求分解为具体的、可执行的子任务
|
||||
- 识别任务间的依赖关系和优先级
|
||||
- 估算任务复杂度和所需时间
|
||||
- 考虑技术风险和潜在阻塞点
|
||||
|
||||
2. **项目管理文档创建**:
|
||||
- 创建结构化的项目管理文档,包含任务清单、时间线、责任分配
|
||||
- 建立任务状态跟踪机制(待开始、进行中、已完成、已阻塞)
|
||||
- 记录关键里程碑和交付物
|
||||
- 维护风险评估和缓解策略
|
||||
|
||||
3. **进度跟踪与同步**:
|
||||
- 实时更新任务完成状态
|
||||
- 记录实际完成时间与预估时间的差异
|
||||
- 识别并报告项目延期风险
|
||||
- 维护项目整体进度概览
|
||||
|
||||
4. **版本管理文档维护**:
|
||||
- 根据完成的任务更新VERSION.md,遵循语义化版本控制
|
||||
- 在CHANGELOG.md中记录新功能、改进、修复和重大变更
|
||||
- 确保版本记录与实际代码变更保持一致
|
||||
- 维护发布说明的专业性和完整性
|
||||
|
||||
**工作流程**:
|
||||
|
||||
1. 分析用户提供的需求或完成情况
|
||||
2. 如果是新需求,进行任务分解并创建项目计划
|
||||
3. 如果是进度更新,更新相应的项目管理文档
|
||||
4. 根据变更情况更新VERSION.md和CHANGELOG.md
|
||||
5. 提供清晰的项目状态总结
|
||||
|
||||
**输出格式要求**:
|
||||
|
||||
- 使用中文进行所有交流和文档编写
|
||||
- 项目管理文档使用Markdown格式,结构清晰
|
||||
- 任务描述要具体、可测量、有明确的完成标准
|
||||
- 版本更新要遵循项目的现有格式和约定
|
||||
|
||||
**质量控制**:
|
||||
|
||||
- 确保任务分解的完整性,不遗漏关键步骤
|
||||
- 验证任务间依赖关系的合理性
|
||||
- 检查版本号更新的正确性
|
||||
- 确保CHANGELOG条目的准确性和完整性
|
||||
|
||||
When working with the NavisworksTransport project, pay special attention to the dual plugin architecture, Navisworks 2026 API integration patterns, and the Chinese language requirements for documentation.
|
||||
@ -1,47 +0,0 @@
|
||||
---
|
||||
name: technical-architect
|
||||
description: Use this agent when you need to design technical solutions for project requirements and tasks decomposed by project-task-manager. This agent should be used after requirements are defined and tasks are broken down, but before implementation begins. Examples: <example>Context: User has a task from project-task-manager to implement path animation in Navisworks plugin. user: 'I need to design the technical approach for implementing smooth path animation with collision detection in our Navisworks 2026 plugin' assistant: 'I'll use the technical-architect agent to analyze the requirements, research Navisworks 2026 animation APIs, and design a comprehensive technical solution.' <commentary>The user needs technical design for a specific development task, so use the technical-architect agent to create a detailed implementation plan.</commentary></example> <example>Context: User received multiple tasks from project-task-manager for logistics category management. user: 'The project-task-manager broke down the logistics categorization feature into several tasks. I need a technical design that covers all aspects.' assistant: 'Let me engage the technical-architect agent to analyze all the tasks, research the best approaches for category management in Navisworks, and create a unified technical design.' <commentary>Multiple related tasks need a cohesive technical design, perfect for the technical-architect agent.</commentary></example>
|
||||
model: sonnet
|
||||
---
|
||||
|
||||
You are a Senior Technical Architect specializing in Navisworks plugin development and logistics systems integration. Your expertise encompasses API design, system architecture, and technical solution design for complex 3D modeling applications.
|
||||
|
||||
Your primary responsibilities:
|
||||
|
||||
1. **Requirements Analysis**: Thoroughly analyze project requirements and tasks from project-task-manager. Ask clarifying questions to understand functional and non-functional requirements, performance constraints, and integration needs.
|
||||
|
||||
2. **Technical Research**: Investigate available technologies, APIs, and external resources including:
|
||||
- Navisworks 2026 API capabilities and limitations
|
||||
- Relevant GitHub projects and open-source libraries
|
||||
- Third-party integrations and dependencies
|
||||
- Performance benchmarks and best practices
|
||||
|
||||
3. **Current State Assessment**: Analyze the existing codebase structure, identify reusable components, assess technical debt, and understand architectural constraints from the NavisworksTransport project.
|
||||
|
||||
4. **Solution Design**: Create comprehensive technical designs that include:
|
||||
- Architecture diagrams and component relationships
|
||||
- API integration patterns and data flow
|
||||
- Error handling and edge case management
|
||||
- Performance optimization strategies
|
||||
- Testing and validation approaches
|
||||
|
||||
5. **Collaborative Design Process**: Engage in detailed technical discussions, present multiple solution alternatives, explain trade-offs, and iterate based on feedback to ensure the design meets all requirements.
|
||||
|
||||
6. **Design Documentation**: Produce clear, concise, and actionable technical specifications that include:
|
||||
- Implementation roadmap with milestones
|
||||
- Technical dependencies and prerequisites
|
||||
- Risk assessment and mitigation strategies
|
||||
- Version tracking and change management
|
||||
|
||||
Your design approach should:
|
||||
|
||||
- Prioritize Navisworks 2026-specific features and capabilities
|
||||
- Ensure compatibility with the existing dual-plugin architecture
|
||||
- Consider the Chinese language requirements for UI and documentation
|
||||
- Leverage the project's established patterns (WPF+WinForms hybrid, event-driven design)
|
||||
- Account for the legacy package management format
|
||||
- Integrate with existing managers (PathPlanningManager, LogisticsAnimationManager, etc.)
|
||||
|
||||
Always start by asking specific questions about the requirements and current context. Research thoroughly before proposing solutions. Present multiple options when appropriate, clearly explaining the pros and cons of each approach. Maintain version control of your designs and be prepared to iterate based on new requirements or technical discoveries.
|
||||
|
||||
Communicate primarily in Chinese when discussing with the user, but use English for technical terms and code examples where appropriate.
|
||||
@ -1,3 +0,0 @@
|
||||
{
|
||||
"primaryApiKey": "api"
|
||||
}
|
||||
@ -1,170 +0,0 @@
|
||||
{
|
||||
"permissions": {
|
||||
"allow": [
|
||||
"Bash(dotnet build)",
|
||||
"Bash(dotnet build:*)",
|
||||
"WebFetch(domain:github.com)",
|
||||
"WebFetch(domain:adndevblog.typepad.com)",
|
||||
"Bash(.compile.bat)",
|
||||
"Bash(rg:*)",
|
||||
"Bash(findstr:*)",
|
||||
"Bash(mkdir:*)",
|
||||
"Bash(compile.bat)",
|
||||
"Bash(./compile.bat)",
|
||||
"Bash(./tool/compile.bat:*)",
|
||||
"Bash(\"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe\" TransportPlugin.csproj /p:Configuration=Debug /p:Platform=AnyCPU /verbosity:minimal)",
|
||||
"Bash(\"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe\" TransportPlugin.csproj /p:Configuration=Debug /p:Platform=AnyCPU)",
|
||||
"WebFetch(domain:forums.autodesk.com)",
|
||||
"mcp__serena__search_for_pattern",
|
||||
"mcp__serena__find_symbol",
|
||||
"mcp__serena__find_referencing_symbols",
|
||||
"mcp__serena__replace_symbol_body",
|
||||
"mcp__context7__resolve-library-id",
|
||||
"mcp__serena__list_dir",
|
||||
"mcp__serena__think_about_collected_information",
|
||||
"mcp__serena__insert_after_symbol",
|
||||
"mcp__serena__get_symbols_overview",
|
||||
"Bash(dir:*)",
|
||||
"mcp__serena__check_onboarding_performed",
|
||||
"mcp__serena__onboarding",
|
||||
"mcp__serena__write_memory",
|
||||
"mcp__serena__read_memory",
|
||||
"mcp__serena__find_file",
|
||||
"mcp__serena__think_about_whether_you_are_done",
|
||||
"Bash(git mv:*)",
|
||||
"Bash(rm:*)",
|
||||
"Bash(mv:*)",
|
||||
"mcp__serena__think_about_task_adherence",
|
||||
"Bash(move:*)",
|
||||
"Bash(nuget install:*)",
|
||||
"Bash(.nuget.exe install:*)",
|
||||
"Bash(nuget.exe install:*)",
|
||||
"Bash(./nuget.exe install:*)",
|
||||
"Bash(dotnet test:*)",
|
||||
"Bash(msbuild:*)",
|
||||
"Bash(\"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe\" \"C:\\Users\\Tellme\\apps\\NavisworksTransport\\TransportPlugin.csproj\" /p:Configuration=Debug /p:Platform=AnyCPU /verbosity:minimal)",
|
||||
"Bash(grep:*)",
|
||||
"Bash(find:*)",
|
||||
"mcp__context7__get-library-docs",
|
||||
"Bash(powershell:*)",
|
||||
"mcp__serena__insert_before_symbol",
|
||||
"Bash(\"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe\" TransportPlugin.csproj /p:Configuration=Debug /p:Platform=AnyCPU /verbosity:normal)",
|
||||
"Bash(cmd:*)",
|
||||
"WebFetch(domain:twentytwo.space)",
|
||||
"Bash(git add:*)",
|
||||
"Bash(git commit:*)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Utils/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Core/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\doc\\design\\2026/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\doc\\design\\2026/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\doc\\navisworks_api\\NET\\examples\\PlugIns\\SearchComparisonPlugIn/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\doc\\navisworks_api/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\doc\\navisworks_api\\NET\\examples\\PlugIns\\ClashDetective\\SimpleUI/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\doc\\navisworks_api\\NET\\documentation\\NET API\\html/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\doc\\navisworks_api\\NET\\documentation\\NET API\\html/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\doc\\navisworks_api\\NET\\documentation\\NET API\\html/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\doc\\navisworks_api\\NET\\documentation\\NET API\\html/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\doc\\navisworks_api\\NET\\documentation\\NET API\\html/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Core\\Collision/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Core\\Collision/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\doc\\navisworks_api\\NET\\examples\\PlugIns\\ClashDetective\\SimpleUI/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Core\\Collision/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Core\\Collision/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\doc\\navisworks_api\\NET\\examples\\PlugIns\\ClashDetective\\SimpleUI/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\doc\\navisworks_api\\NET\\examples\\PlugIns\\ClashDetective\\ClashGrouper/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\doc\\navisworks_api\\NET\\examples\\PlugIns\\ClashDetective\\ClashGrouper/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\doc\\navisworks_api\\NET\\examples\\PlugIns\\ClashDetective\\ClashGrouper/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Core\\Collision/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Core\\Collision/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Core\\Collision/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Core\\Collision/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\UI\\WPF\\ViewModels/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\UI\\WPF\\ViewModels/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\UI\\WPF\\ViewModels/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Commands/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Commands/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Commands/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\UI\\WPF\\ViewModels/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\UI\\WPF\\ViewModels/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\UI\\WPF\\ViewModels/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\UI\\WPF\\ViewModels/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\UI\\WPF\\ViewModels/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\UI\\WPF\\ViewModels/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\UI\\WPF\\ViewModels/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\UI\\WPF\\ViewModels/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\UI\\WPF\\ViewModels/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\UI\\WPF\\ViewModels/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\UI\\WPF\\ViewModels/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\UI\\WPF\\ViewModels/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\UI\\WPF\\ViewModels/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\UI\\WPF\\ViewModels/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Core\\Collision/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\UI\\WPF\\ViewModels/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\UI\\WPF\\ViewModels/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\UI\\WPF\\ViewModels/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Commands/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Commands/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Commands/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Core\\Collision/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\UI\\WPF\\ViewModels/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Commands/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Commands/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Commands/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Commands/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\UI\\WPF\\ViewModels/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Core\\Collision/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Core\\Collision/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Core\\Collision/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Core\\Collision/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Core\\Collision/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Core\\Collision/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Core\\Collision/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Commands/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Commands/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Core\\Collision/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\doc\\navisworks_api\\NET\\documentation\\NET API\\html/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\doc\\navisworks_api\\NET\\examples\\PlugIns\\ClashDetective\\ClashGrouper/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Core\\Collision/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Core\\Collision/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Core\\Collision/**)",
|
||||
"Read(/C:\\Users\\Tellme\\apps\\NavisworksTransport\\src\\Core\\Collision/**)",
|
||||
"WebSearch",
|
||||
"Read(//c/Users/Tellme/apps/OpenSource/AStar-master/Roy-T.AStar/**)",
|
||||
"Read(//c/Users/Tellme/apps/OpenSource/AStar-master/**)",
|
||||
"Bash(\"./compile.bat\")",
|
||||
"Bash(xcopy:*)",
|
||||
"Read(//c/ProgramData/Autodesk/Navisworks Manage 2026/NavisworksTransport/logs/**)",
|
||||
"Bash(sed:*)",
|
||||
"Read(//c/ProgramData/Autodesk/**)",
|
||||
"Bash(cd:*)",
|
||||
"Bash(cat:*)",
|
||||
"Bash(\"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe\" NavisworksTransport.UnitTests.csproj /p:Configuration=Debug /p:Platform=AnyCPU /verbosity:minimal)",
|
||||
"Bash(\"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe\" NavisworksTransport.UnitTests.csproj /p:Configuration=Debug /p:Platform=AnyCPU)",
|
||||
"Read(//c/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin//**)",
|
||||
"Read(//c/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/Extensions/TestPlatform//**)",
|
||||
"Bash(\"/c/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin/MSBuild.exe\" NavisworksTransport.UnitTests.csproj)",
|
||||
"Bash(\"/c/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/Extensions/TestPlatform/vstest.console.exe\" bin/Debug/NavisworksTransport.UnitTests.dll --logger:console)",
|
||||
"Bash(\"/c/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/Extensions/TestPlatform/vstest.console.exe\" bin/Debug/NavisworksTransport.UnitTests.dll --TestAdapterPath:packagesMSTest.TestAdapter.3.0.4build_common --logger:console)",
|
||||
"Bash(\"/c/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/Extensions/TestPlatform/vstest.console.exe\" bin/Debug/NavisworksTransport.UnitTests.dll --TestAdapterPath:packagesMSTest.TestAdapter.3.0.4buildnet462 --logger:console)",
|
||||
"Bash(\"/c/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools/x64/ildasm.exe\" /text bin/Debug/NavisworksTransport.UnitTests.dll)",
|
||||
"Bash(\"/c/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin/MSBuild.exe\" AStarTestRunner.csproj)",
|
||||
"Bash(./AStarTestRunner.exe)",
|
||||
"Bash(\"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe\" AStarTestRunner.csproj /p:Configuration=Debug /p:Platform=AnyCPU /verbosity:minimal)",
|
||||
"Bash(\"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe\" AStarTestRunner.csproj /p:Configuration=Debug /p:Platform=AnyCPU)",
|
||||
"Bash(\"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe\" AStarTestRunner.csproj)",
|
||||
"Bash(\"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe\" NavisworksTransport.UnitTests.csproj)",
|
||||
"Bash(\"bin\\Debug\\AStarTestRunner.exe\")",
|
||||
"Bash(git restore:*)",
|
||||
"Read(//c/Program Files/Autodesk/Navisworks Manage 2026/**)",
|
||||
"Bash(where:*)",
|
||||
"Read(//c/Users/Tellme/Pictures/Screenshots/**)",
|
||||
"Bash(./deploy-plugin.bat)",
|
||||
"Read(//c/Users/Tellme/**)",
|
||||
"Bash(git push:*)",
|
||||
"Bash(ps1)"
|
||||
],
|
||||
"deny": [],
|
||||
"additionalDirectories": []
|
||||
}
|
||||
}
|
||||
584
IFLOW.md
584
IFLOW.md
@ -1,584 +0,0 @@
|
||||
# NavisworksTransport 插件项目概述
|
||||
|
||||
## 项目简介
|
||||
|
||||
NavisworksTransport 是一个用于 Autodesk Navisworks Manage 2026 的插件,专为物流路径规划和动画仿真而设计。它能够帮助用户在复杂的建筑模型中定义物流通道、规划运输路径,并生成动画来模拟设备移动过程,同时进行动态碰撞检测。
|
||||
|
||||
**当前版本**: 0.14.0
|
||||
|
||||
## 技术架构
|
||||
|
||||
- **编程语言**: C# 7.3
|
||||
- **开发环境**: .NET Framework 4.8
|
||||
- **目标平台**: x64
|
||||
- **主要依赖**:
|
||||
- Autodesk Navisworks API (2026版本)
|
||||
- Roy-T.AStar 3.0.2 (路径规划算法)
|
||||
- System.Data.SQLite 1.0.118.0 (数据存储)
|
||||
- Tomlyn 0.19.0 (TOML配置文件解析)
|
||||
- geometry4Sharp 1.0.0 (3D几何计算)
|
||||
- MSTest.TestFramework 3.0.4 (单元测试)
|
||||
- NETStandard.Library 2.0.3 (.NET Standard支持)
|
||||
|
||||
## 核心功能模块
|
||||
|
||||
### 1. 物流属性管理
|
||||
|
||||
- 为模型元素分配物流类别属性(如门、电梯、楼梯、通道、障碍物、无关项)
|
||||
- 批量处理多个选中项目
|
||||
- COM API 集成确保属性正确添加
|
||||
- 物流属性列表与3D视图选择同步
|
||||
- 支持单个模型可见性控制和属性回填
|
||||
- 严格的数据验证机制,确保数据一致性
|
||||
|
||||
### 2. 路径规划
|
||||
|
||||
#### 手动路径编辑
|
||||
|
||||
- 路径点添加、编辑、删除
|
||||
- 智能工具切换系统(十字光标导航)
|
||||
- 空格键快速切换工具状态
|
||||
- 路径点高亮和可视化
|
||||
|
||||
#### 自动路径规划
|
||||
|
||||
- **A*算法集成**: 使用Roy-T.AStar库实现高性能路径查找
|
||||
- **2.5D网格地图生成**: 基于包围盒的高效网格生成算法
|
||||
- **高度计算系统**:
|
||||
- 通道地面高度精确检测
|
||||
- 坡度分析和楼梯台阶高度处理
|
||||
- 线性和非线性坡度支持
|
||||
- **路径优化算法**:
|
||||
- 最短路径策略(Shortest)
|
||||
- 局部直线优先策略(Straightest) - 室内导航优化
|
||||
- 基于中心距离的安全优先算法
|
||||
- 斜线路径优化(台阶处保留2个路径点)
|
||||
- **多层网格系统**: 支持楼梯、楼面等复杂场景
|
||||
- **网格缓存机制**: 大幅提升路径规划速度
|
||||
- **楼层过滤系统**: 基于通道楼层属性的智能过滤
|
||||
|
||||
#### 路径分析
|
||||
|
||||
- SQLite数据库存储路径数据
|
||||
- 路径信息统计和分析
|
||||
- 路径参数持久化(物体尺寸、安全间隙、网格尺寸等)
|
||||
|
||||
### 3. 动画与仿真
|
||||
|
||||
- **动画系统**:
|
||||
- 基于路径的动画生成
|
||||
- WPF Timer机制实现流畅动画播放
|
||||
- 媒体控制功能(播放、暂停、步进、快放、反向播放)
|
||||
- 动画性能优化(单步时间从5秒降至15毫秒)
|
||||
- **TimeLiner集成**: 动画播放时自动创建运输任务
|
||||
- **动态碰撞检测**:
|
||||
- Clash Detective API集成
|
||||
- 基于动画帧的碰撞检测
|
||||
- 碰撞位置记录和恢复机制
|
||||
- 碰撞报告生成和统计
|
||||
|
||||
### 4. 可视化
|
||||
|
||||
- **3D路径点和路线渲染**:
|
||||
- 手动路径连线(黑色)
|
||||
- 自动路径连线(橙色)
|
||||
- 路径点高亮和选择反馈
|
||||
- **网格地图可视化**:
|
||||
- 空洞、障碍物、通行网格的可视化
|
||||
- 网格点大小自适应
|
||||
- 多种形状类型(圆形、正方形、立方体、点)
|
||||
- Google Material Design配色标准
|
||||
- **碰撞结果高亮显示**
|
||||
- **导航地图生成**: 导出当前路径场景为图片
|
||||
|
||||
### 5. 分层管理
|
||||
|
||||
- **智能楼层分析**: 支持按楼层和自定义属性分层
|
||||
- **分层预览功能**:
|
||||
- 1级、2级、3级、全部四种遍历深度
|
||||
- 实时预览结果(名称、对象数量、估算大小)
|
||||
- 缓存机制优化性能
|
||||
- **分层导出**:
|
||||
- 批量导出功能
|
||||
- 智能文件命名(项目名_分层名_时间戳)
|
||||
- 支持NWD导出选项配置
|
||||
- 线程安全导出机制
|
||||
- **可视化控制**:
|
||||
- 单独显示功能
|
||||
- 保存开关控制
|
||||
- 智能可见性保护算法
|
||||
- **自定义分层属性**: 支持任意Navisworks模型属性作为分层依据
|
||||
|
||||
### 6. 数据管理
|
||||
|
||||
- **SQLite数据库**: 路径数据和碰撞报告存储
|
||||
- **TOML配置文件**: 系统设置管理(default_config.toml)
|
||||
- **JSON路径文件导入**: 支持灵活的数据交换格式
|
||||
- **几何体缓存**: 提高模型加载和渲染性能
|
||||
|
||||
### 7. 系统管理
|
||||
|
||||
- **MSI安装包**: 自动化安装包生成,支持静默安装
|
||||
- **日志系统**: 完整的日志记录和查看功能
|
||||
- **配置编辑器**: 可视化配置文件编辑
|
||||
- **帮助系统**: 内置帮助文档和关于对话框
|
||||
|
||||
## 项目结构
|
||||
|
||||
```
|
||||
NavisworksTransport/
|
||||
├── src/
|
||||
│ ├── Commands/ # 命令模式实现
|
||||
│ │ ├── IPathPlanningCommand.cs
|
||||
│ │ ├── CommandBase.cs
|
||||
│ │ ├── CommandManager.cs
|
||||
│ │ ├── CommandExecutor.cs
|
||||
│ │ ├── AutoPathPlanningCommand.cs
|
||||
│ │ ├── DeletePathCommand.cs
|
||||
│ │ ├── ExportPathCommand.cs
|
||||
│ │ ├── ImportPathCommand.cs
|
||||
│ │ ├── SetLogisticsAttributeCommand.cs
|
||||
│ │ ├── StartAnimationCommand.cs
|
||||
│ │ ├── GenerateCollisionReportCommand.cs
|
||||
│ │ └── VoxelPathFindingTestCommand.cs
|
||||
│ ├── Core/ # 核心业务逻辑
|
||||
│ │ ├── Animation/ # 动画管理
|
||||
│ │ ├── Collision/ # 碰撞检测
|
||||
│ │ ├── Config/ # 配置管理
|
||||
│ │ ├── Properties/ # 属性管理
|
||||
│ │ ├── Spatial/ # 空间索引
|
||||
│ │ ├── UIUpdate/ # UI更新管理
|
||||
│ │ ├── MainPlugin.cs # 插件入口
|
||||
│ │ ├── PathPlanningManager.cs
|
||||
│ │ ├── PathDataManager.cs
|
||||
│ │ ├── PathDatabase.cs
|
||||
│ │ ├── PathAnalysisService.cs
|
||||
│ │ ├── PathCurveEngine.cs
|
||||
│ │ ├── UIStateManager.cs
|
||||
│ │ ├── IdleEventManager.cs
|
||||
│ │ ├── DocumentStateManager.cs
|
||||
│ │ ├── VirtualObjectManager.cs
|
||||
│ │ ├── ModelSplitterManager.cs
|
||||
│ │ ├── NavigationMapGenerator.cs
|
||||
│ │ ├── PathPointRenderPlugin.cs
|
||||
│ │ └── FloorAttributeManager.cs
|
||||
│ ├── PathPlanning/ # 路径规划算法
|
||||
│ │ ├── GridMap.cs
|
||||
│ │ ├── GridMapGenerator.cs
|
||||
│ │ ├── GridMapCache.cs
|
||||
│ │ ├── AutoPathFinder.cs
|
||||
│ │ ├── PathOptimizer.cs
|
||||
│ │ ├── ChannelHeightDetector.cs
|
||||
│ │ ├── SlopeAnalyzer.cs
|
||||
│ │ ├── OptimizedHeightCalculator.cs
|
||||
│ │ ├── ChannelBasedGridBuilder.cs
|
||||
│ │ ├── TimeMarkerCalculationService.cs
|
||||
│ │ ├── VoxelGrid.cs # 3D体素路径规划(实验性)
|
||||
│ │ ├── VoxelPathFinder.cs
|
||||
│ │ └── VoxelGridVisualizer.cs
|
||||
│ ├── UI/ # WPF用户界面
|
||||
│ │ └── WPF/
|
||||
│ │ ├── Views/ # 视图
|
||||
│ │ ├── ViewModels/ # 视图模型
|
||||
│ │ ├── Models/ # 数据模型
|
||||
│ │ ├── Commands/ # WPF命令
|
||||
│ │ ├── Converters/ # 值转换器
|
||||
│ │ ├── Collections/ # 线程安全集合
|
||||
│ │ ├── Services/ # UI服务
|
||||
│ │ ├── Interfaces/ # 接口定义
|
||||
│ │ └── Resources/ # 资源文件
|
||||
│ ├── Utils/ # 工具类
|
||||
│ │ ├── LogManager.cs
|
||||
│ │ ├── NavisworksApiHelper.cs
|
||||
│ │ ├── GeometryHelper.cs
|
||||
│ │ ├── BoundingBoxGeometryUtils.cs
|
||||
│ │ ├── CoordinateConverter.cs
|
||||
│ │ ├── UnitsConverter.cs
|
||||
│ │ ├── FloorDetector.cs
|
||||
│ │ ├── ModelItemAnalysisHelper.cs
|
||||
│ │ ├── VisibilityHelper.cs
|
||||
│ │ └── GeometryCacheManager.cs
|
||||
│ └── Resources/ # 资源文件
|
||||
├── UnitTests/ # 单元测试
|
||||
│ ├── Collections/
|
||||
│ ├── Commands/
|
||||
│ ├── Core/
|
||||
│ ├── Utils/
|
||||
│ └── TestHelpers/
|
||||
├── doc/ # 文档
|
||||
│ ├── architecture/ # 架构文档
|
||||
│ ├── design/ # 设计文档
|
||||
│ ├── guide/ # 使用指南
|
||||
│ ├── migration/ # 迁移文档
|
||||
│ ├── navisworks_api/ # API文档
|
||||
│ ├── requirement/ # 需求文档
|
||||
│ └── working/ # 工作文档
|
||||
├── packages/ # NuGet包
|
||||
├── resources/ # 资源文件
|
||||
├── bin/ # 编译输出
|
||||
├── obj/ # 中间文件
|
||||
├── TestResults/ # 测试结果
|
||||
├── NavisworksTransport.sln # 解决方案文件
|
||||
├── TransportPlugin.csproj # 主项目文件
|
||||
├── NavisworksTransport.UnitTests.csproj # 测试项目文件
|
||||
├── packages.config # NuGet包配置
|
||||
├── default_config.toml # 默认配置文件
|
||||
├── compile.bat # 编译脚本
|
||||
├── run-unit-tests.bat # 运行单元测试脚本
|
||||
├── deploy-plugin.bat # 部署插件脚本
|
||||
├── VERSION.md # 版本信息
|
||||
├── CHANGELOG.md # 变更日志
|
||||
└── README.md # 项目说明
|
||||
```
|
||||
|
||||
## 构建与运行
|
||||
|
||||
### 环境要求
|
||||
|
||||
- **操作系统**: Windows 10 或更高版本
|
||||
- **Navisworks**: Navisworks Manage 2026
|
||||
- **开发工具**: Visual Studio 2022 (Community或Professional)
|
||||
- **运行时**: .NET Framework 4.8
|
||||
- **测试工具**: MSTest Test Platform
|
||||
|
||||
### 构建步骤
|
||||
|
||||
#### 使用Visual Studio
|
||||
|
||||
1. 使用 Visual Studio 2022 打开 `NavisworksTransport.sln`
|
||||
2. 还原 NuGet 包(自动或手动)
|
||||
3. 选择配置: Release / x64
|
||||
4. 编译解决方案
|
||||
|
||||
#### 使用命令行
|
||||
|
||||
```batch
|
||||
# 编译插件
|
||||
compile.bat
|
||||
|
||||
# 运行单元测试
|
||||
run-unit-tests.bat
|
||||
```
|
||||
|
||||
### 部署
|
||||
|
||||
#### 自动部署
|
||||
|
||||
```batch
|
||||
# 部署插件到Navisworks插件目录
|
||||
deploy-plugin.bat
|
||||
```
|
||||
|
||||
#### 手动部署
|
||||
|
||||
1. 编译生成 `TransportPlugin.dll`
|
||||
2. 将输出目录内容复制到Navisworks插件目录:
|
||||
`[Navisworks安装路径]\Plugins\TransportPlugin\`
|
||||
3. 重启Navisworks即可使用
|
||||
|
||||
### 安装包生成
|
||||
|
||||
项目支持MSI安装包生成:
|
||||
|
||||
- 使用Visual Studio Installer Projects扩展
|
||||
- 支持自动化构建和静默安装
|
||||
- 安装包位置: `bin\x64\Release\NavisworksTransport.Setup.msi`
|
||||
|
||||
静默安装命令:
|
||||
|
||||
```batch
|
||||
msiexec /i NavisworksTransport.Setup.msi /qn /l*v install.log
|
||||
```
|
||||
|
||||
## 开发约定
|
||||
|
||||
### 代码分析方法
|
||||
|
||||
**重要教训:分析可视化功能时的错误思考方式**
|
||||
|
||||
在分析"通行空间可视化"功能时,犯了以下错误:
|
||||
|
||||
1. **错误:只看方法名,不看实现**
|
||||
- 搜索到 `UpdateGridVisualizationSettings()` 等方法名中包含"Grid",就误以为需要生成网格地图
|
||||
- 实际上这里的"网格"指的是路径规划用的网格地图,而通行空间可视化只是改变路径的渲染风格
|
||||
|
||||
2. **错误:没有深入查看渲染代码**
|
||||
- 虽然找到了 `PathPointRenderPlugin.cs`,但没有仔细看它的渲染逻辑
|
||||
- 应该先看渲染插件如何渲染路径,发现 `PathVisualizationMode.ObjectSpace` 模式
|
||||
|
||||
3. **错误:被表面信息误导**
|
||||
- 日志显示"[网格可视化] 无缓存网格地图",就以为需要生成网格地图
|
||||
- 实际上通行空间可视化不是生成新的可视化内容,而是改变现有路径的渲染方式(从圆柱体改为高高度长方体)
|
||||
|
||||
**正确的分析方法应该是**:
|
||||
|
||||
1. **先看渲染代码**:对于可视化功能,应该先看渲染插件的代码(如 `PathPointRenderPlugin.cs`)
|
||||
2. **理解本质**:问自己"这个功能是什么",而不是"怎么做"。通行空间可视化是"改变渲染风格",而不是"生成网格地图"
|
||||
3. **查看现有实现**:如果日志中已经有相关提示(如"路径可视化模式已更改: 物体通行空间"),说明功能已经存在,只需要在合适的时机调用
|
||||
4. **不要只看方法名**:方法名可能误导,要看实际实现代码
|
||||
5. **深入查看核心代码**:对于可视化、动画等功能,应该先看对应的渲染/动画管理器的代码
|
||||
|
||||
### 架构模式
|
||||
|
||||
- **MVVM模式**: WPF UI开发使用MVVM架构
|
||||
- **Command模式**: 业务逻辑通过Command模式封装
|
||||
- **依赖注入**: 使用服务接口实现松耦合
|
||||
|
||||
### 核心组件
|
||||
|
||||
- **MainPlugin**: 插件入口点,负责初始化和生命周期管理
|
||||
- **PathPlanningManager**: 路径规划核心业务逻辑管理器
|
||||
- **CategoryAttributeManager**: 物流属性管理
|
||||
- **PathPointRenderPlugin**: 3D路径可视化渲染
|
||||
- **ConfigManager**: 系统配置管理
|
||||
- **UIStateManager**: UI状态和线程安全更新管理
|
||||
- **IdleEventManager**: Idle事件管理,优化UI性能
|
||||
- **DocumentStateManager**: 文档状态管理
|
||||
- **VirtualObjectManager**: 虚拟物体管理
|
||||
- **PathAnimationManager**: 动画管理
|
||||
- **TimeLinerIntegrationManager**: TimeLiner集成
|
||||
- **ClashDetectiveIntegration**: 碰撞检测集成
|
||||
|
||||
### 代码规范
|
||||
|
||||
- **配置文件**: 使用TOML格式
|
||||
- **日志记录**: 使用内置的LogManager
|
||||
- **异常处理**: 通过GlobalExceptionHandler统一管理,不掩盖问题
|
||||
- **线程安全**: COM API调用必须在主UI线程(STA)执行
|
||||
- **单位系统**:
|
||||
- **内部计算**: 统一使用模型单位(避免频繁转换,提高性能)
|
||||
- **对外输出**: 转换为米(m)单位(用户界面、日志、数据库存储等)
|
||||
- **单位转换**: 使用 `UnitsConverter.ConvertToMeters()` 和 `UnitsConverter.ConvertFromMeters()` 进行转换
|
||||
- **向后兼容**: 不写回退和向后兼容代码,出错即抛异常
|
||||
- **代码复用**: 优先使用现有的辅助方法和工具类,避免重复代码。例如:
|
||||
- 查找物流属性模型时,使用 `CategoryAttributeManager.GetLogisticsItemsByType()` 而不是手动创建 Search 对象
|
||||
- 提取几何数据时,使用 `GeometryHelper` 中的现有方法
|
||||
- 计算距离时,使用 `GeometryHelper.CalculatePointDistance()` 等工具方法
|
||||
- **物体尺寸与XYZ轴关系** (关键约定):
|
||||
- **X轴**: 长度方向(物体前进方向,车头到车尾)
|
||||
- **Y轴**: 宽度方向(物体侧面,左右两侧)
|
||||
- **Z轴**: 高度方向(垂直方向)
|
||||
- **朝向规则**: 物体沿路径移动时,X轴(长度方向)指向路径前进方向
|
||||
- **尺寸参数**: `ObjectLength` = X轴尺寸,`ObjectWidth` = Y轴尺寸,`ObjectHeight` = Z轴尺寸
|
||||
- **通行空间计算**(路径周围的可通行区域,沿路径延伸的"管道"):
|
||||
- `passageAlongPath`: 沿路径方向的长度 = 路径本身的长度(渲染时使用)
|
||||
- `passageAcrossPath`: 垂直于路径方向的截面尺寸1
|
||||
- `passageNormalToPath`: 垂直于路径方向的截面尺寸2
|
||||
- **水平路径**(地面、空轨)截面:使用物体的**宽度**和**高度**
|
||||
- `passageAcrossPath` = 物体宽度(Y轴)+ 2×间隙
|
||||
- `passageNormalToPath` = 物体高度(Z轴)+ 间隙
|
||||
- **垂直路径**(吊装)截面:使用物体的**宽度**和**长度**
|
||||
- `passageAcrossPath` = 物体宽度(Y轴)+ 2×间隙
|
||||
- `passageNormalToPath` = 物体长度(X轴)+ 2×间隙
|
||||
- **单位系统**:
|
||||
- **内部计算**: 统一使用模型单位(避免频繁转换,提高性能)
|
||||
- **对外输出**: 转换为米(m)单位(用户界面、日志、数据库存储等)
|
||||
- **单位转换**: 使用 `UnitsConverter.ConvertToMeters()` 和 `UnitsConverter.ConvertFromMeters()` 进行转换
|
||||
- **向后兼容**: 不写回退和向后兼容代码,出错即抛异常
|
||||
- **代码复用**: 优先使用现有的辅助方法和工具类,避免重复代码。例如:
|
||||
- 查找物流属性模型时,使用 `CategoryAttributeManager.GetLogisticsItemsByType()` 而不是手动创建 Search 对象
|
||||
- 提取几何数据时,使用 `GeometryHelper` 中的现有方法
|
||||
- 计算距离时,使用 `GeometryHelper.CalculatePointDistance()` 等工具方法
|
||||
|
||||
### 测试
|
||||
|
||||
- **单元测试**: 使用MSTest框架
|
||||
- **测试覆盖**: 核心组件和关键业务逻辑
|
||||
- **测试运行**: `run-unit-tests.bat`
|
||||
- **测试结果**: 保存在TestResults目录
|
||||
|
||||
### 性能优化
|
||||
|
||||
- **空间索引**: 使用SpatialHashGrid优化碰撞检测
|
||||
- **网格缓存**: GridMapCache提升路径规划速度
|
||||
- **几何缓存**: GeometryCacheManager优化模型加载
|
||||
- **线程安全**: ThreadSafeObservableCollection确保UI更新安全
|
||||
- **Idle事件**: 使用Idle机制替代Timer,优化UI响应
|
||||
|
||||
## 快速开始
|
||||
|
||||
### 1. 插件安装
|
||||
|
||||
1. 运行MSI安装包或手动部署
|
||||
2. 启动Navisworks Manage 2026
|
||||
3. 在"附加模块"选项卡中找到"Transport Plugin"
|
||||
|
||||
### 2. 基本使用流程
|
||||
|
||||
#### 物流属性设置
|
||||
|
||||
1. 在Navisworks中选择要设置属性的模型项目
|
||||
2. 点击"Transport Plugin" → "物流属性管理"
|
||||
3. 在弹出窗口中选择物流类别(门、电梯、楼梯、通道、障碍物)
|
||||
4. 点击"应用"为选中项目添加属性
|
||||
|
||||
#### 路径规划
|
||||
|
||||
1. 点击"路径编辑"页签
|
||||
2. 选择路径策略(最短路径或直线优先)
|
||||
3. 在3D视图中点击添加路径点
|
||||
4. 点击"自动规划"生成路径
|
||||
5. 调整路径参数(物体尺寸、网格大小等)
|
||||
|
||||
#### 动画仿真
|
||||
|
||||
1. 点击"动画控制"页签
|
||||
2. 选择要播放的路径
|
||||
3. 设置动画参数(帧率、持续时间)
|
||||
4. 点击"播放"开始动画
|
||||
5. 查看碰撞检测结果
|
||||
|
||||
#### 分层管理
|
||||
|
||||
1. 点击"分层管理"页签
|
||||
2. 选择分层属性(楼层、区域等)
|
||||
3. 设置遍历深度
|
||||
4. 点击"预览"查看分层结果
|
||||
5. 选择要导出的分层,点击"导出"
|
||||
|
||||
### 3. 配置管理
|
||||
|
||||
编辑 `default_config.toml` 文件调整系统参数:
|
||||
|
||||
```toml
|
||||
[path_editing]
|
||||
cell_size_meters = 0.5
|
||||
object_length_meters = 1.0
|
||||
object_width_meters = 1.0
|
||||
object_height_meters = 2.0
|
||||
safety_margin_meters = 0.05
|
||||
|
||||
[animation]
|
||||
frame_rate = 30
|
||||
duration_seconds = 10.0
|
||||
detection_gap_meters = 0.05
|
||||
```
|
||||
|
||||
## 版本历史
|
||||
|
||||
### v0.14.0 (2025-12-01)
|
||||
|
||||
- MSI安装包制作
|
||||
- JSON路径文件导入
|
||||
- 网格点可视化系统重构
|
||||
- 空间索引优化
|
||||
- 几何体缓存优化
|
||||
|
||||
### v0.13.0 (2025-10-11)
|
||||
|
||||
- 3D路径规划系统
|
||||
- 多层网格系统
|
||||
- 路径策略算法增强
|
||||
- SQLite数据库集成
|
||||
- 网格生成优化
|
||||
|
||||
### v0.12.0 (2025-09-16)
|
||||
|
||||
- 路径规划算法优化
|
||||
- 可视化系统统一
|
||||
- 动画系统重构
|
||||
- 碰撞检测系统完善
|
||||
- UI架构现代化
|
||||
- 物流属性管理系统完善
|
||||
- 分层管理系统优化
|
||||
- 内存管理与性能优化
|
||||
|
||||
### v0.11.0 (2025-09-08)
|
||||
|
||||
- 局部直线优先路径算法
|
||||
- 路径策略选择系统
|
||||
- 网格可视化系统
|
||||
- Roy-T.AStar集成优化
|
||||
- UI架构现代化升级
|
||||
- 内存管理优化
|
||||
|
||||
### v0.10.0 (2025-09-06)
|
||||
|
||||
- 智能工具切换系统
|
||||
- 工具状态管理重构
|
||||
- ClashDetective API重构
|
||||
|
||||
### v0.9.0 (2025-09-04)
|
||||
|
||||
- SearchAPI性能优化
|
||||
- 代码架构重构
|
||||
- UI原型开发
|
||||
- 算法优化
|
||||
|
||||
### v0.8.0 (2025-08-27)
|
||||
|
||||
- 自定义分层管理系统
|
||||
- VisibilityManager重构
|
||||
- 智能文件命名系统
|
||||
|
||||
### v0.7.0 (2025-08-18)
|
||||
|
||||
- 分层管理功能完整实现
|
||||
- WPF架构重构
|
||||
- 线程安全解决方案
|
||||
|
||||
### v0.6.0 (2025-08-17)
|
||||
|
||||
- UI架构重构
|
||||
- 线程安全与稳定性提升
|
||||
|
||||
### v0.5.0 (2025-08-15)
|
||||
|
||||
- Z坐标高度计算系统
|
||||
- 楼层过滤系统
|
||||
|
||||
### v0.4.0 (2025-08-14)
|
||||
|
||||
- 单位转换系统重构
|
||||
- 2.5D路径规划实现
|
||||
|
||||
### v0.3.0 (2025-08-13)
|
||||
|
||||
- Navisworks2026迁移
|
||||
- WPF界面实现
|
||||
|
||||
### v0.2.0 (2025-07-21)
|
||||
|
||||
- 动画碰撞检测集成
|
||||
- Clash Detective集成
|
||||
|
||||
### v0.1.12 (2025-07-18)
|
||||
|
||||
- TimeLiner集成功能
|
||||
|
||||
## 技术支持
|
||||
|
||||
### 常见问题
|
||||
|
||||
1. **插件未加载**: 确保Navisworks Manage 2026已正确安装,插件目录路径正确
|
||||
2. **崩溃问题**: 查看日志文件,检查Navisworks API调用线程安全性
|
||||
3. **路径规划失败**: 检查物流属性是否正确设置,通道是否连续
|
||||
4. **碰撞检测不准确**: 调整检测间隙参数,检查物体尺寸配置
|
||||
|
||||
### 日志位置
|
||||
|
||||
日志文件位于:
|
||||
`[Navisworks安装路径]\Plugins\TransportPlugin\logs\debug.log`
|
||||
|
||||
### 文档资源
|
||||
|
||||
- **使用说明**: `doc/working/使用说明.md`
|
||||
- **开发文档**: `doc/working/`
|
||||
- **API文档**: `doc/navisworks_api/`
|
||||
- **迁移文档**: `doc/migration/`
|
||||
- **设计文档**: `doc/design/`
|
||||
- **需求文档**: `doc/requirement/`
|
||||
|
||||
## 许可与贡献
|
||||
|
||||
本项目为Navisworks插件开发项目,遵循Autodesk插件开发规范。
|
||||
|
||||
## 联系方式
|
||||
|
||||
- **项目仓库**: <http://10.0.0.99:4000/tian/NavisworksTransport.git>
|
||||
- **问题反馈**: 通过Git仓库Issue系统提交
|
||||
- **开发文档**: 参考项目doc目录下的相关文档
|
||||
|
||||
---
|
||||
|
||||
**最后更新**: 2026年1月5日
|
||||
Loading…
Reference in New Issue
Block a user