ANSA二次开发JSON数据写入:CAE前处理自动化实战指南
如果你正在使用ANSA进行CAE前处理可能会遇到这样的困境每次手动设置边界条件、材料属性或连接关系时重复操作不仅耗时还容易出错。特别是当需要处理大量相似模型或进行参数化分析时传统的手工操作方式显得力不从心。ANSA二次开发结合JSON数据写入正是解决这一痛点的关键技术组合。通过将模型参数、设置信息以JSON格式存储和读取可以实现CAE前处理流程的自动化、标准化和可追溯化。这不仅大幅提升工作效率更能确保分析结果的一致性和可靠性。本文将深入解析ANSA二次开发中JSON数据写入的完整实现方案从基础概念到实战应用为你提供一套可直接落地的技术方案。1. 为什么ANSA二次开发需要JSON数据集成在CAE工程领域ANSA作为领先的前处理软件其强大的几何清理、网格划分和模型装配能力备受认可。然而在实际工程项目中工程师往往需要处理复杂的参数配置和重复性设置工作。传统的手工操作存在三个核心问题首先人为操作容易引入误差影响分析结果的准确性其次项目经验难以有效沉淀和复用最后团队协作时标准不统一导致模型质量参差不齐。JSON作为一种轻量级的数据交换格式在ANSA二次开发中扮演着关键角色。它能够以结构化的方式存储各类模型参数包括材料属性、边界条件、连接关系等。通过Python脚本将JSON数据与ANSA对象模型对接可以实现参数化建模和批量处理。这种技术组合的真正价值在于它将工程师从重复性劳动中解放出来使其能够专注于更有价值的分析工作。同时JSON文件的版本管理也为项目追溯和质量控制提供了便利。2. ANSA二次开发基础与环境配置2.1 ANSA脚本开发环境搭建ANSA支持多种脚本语言其中Python是最常用的选择。要开始ANSA二次开发首先需要配置合适的开发环境# 检查ANSA Python环境 import sys print(Python路径:, sys.executable) print(ANSA模块路径:, [path for path in sys.path if ansa in path.lower()]) # 导入ANSA核心模块 try: import ansa from ansa import base, constants print(ANSA模块导入成功) except ImportError as e: print(ANSA模块导入失败:, e)ANSA通常自带Python解释器建议使用ANSA安装目录下的Python环境以确保模块兼容性。对于外部IDE配置可以将ANSA的Python解释器路径添加到PyCharm或VS Code中。2.2 JSON模块在ANSA中的使用ANSA内置的Python环境已经包含了标准的json模块但在使用时需要注意版本兼容性import json import ansa def check_json_support(): 检查JSON模块功能 test_data { material: Steel, density: 7850, youngs_modulus: 2.1e11 } # 测试JSON序列化 json_str json.dumps(test_data, indent2) print(JSON序列化测试:) print(json_str) # 测试JSON反序列化 parsed_data json.loads(json_str) print(JSON反序列化测试:, parsed_data) return True # 运行检查 check_json_support()2.3 项目目录结构规划合理的项目结构是成功实施二次开发的基础ANSA_JSON_Project/ ├── configs/ # JSON配置文件 │ ├── materials.json │ ├── boundary_conditions.json │ └── connections.json ├── scripts/ # Python脚本 │ ├── main.py │ ├── json_utils.py │ └── ansa_operations.py ├── templates/ # ANSA模板文件 └── outputs/ # 生成的模型和报告3. JSON数据结构设计与标准规范3.1 材料属性JSON结构设计材料数据是CAE分析的基础合理的JSON结构设计至关重要{ materials: [ { name: Steel_304, type: isotropic, properties: { density: 7850, youngs_modulus: 2.1e11, poissons_ratio: 0.3, yield_strength: 2.05e8 }, metadata: { source: Material Library v2.1, version: 2024.01, temperature_dependency: false } }, { name: Aluminum_6061, type: isotropic, properties: { density: 2700, youngs_modulus: 6.9e10, poissons_ratio: 0.33 } } ] }3.2 边界条件数据结构边界条件需要包含作用对象、类型和参数信息{ boundary_conditions: [ { id: BC_FixedSupport, name: 固定支撑, type: displacement, entities: [NODE_GROUP_1, NODE_GROUP_2], parameters: { tx: 0, ty: 0, tz: 0, rx: 0, ry: 0, rz: 0 }, coordinate_system: global }, { id: BC_Force, name: 集中力载荷, type: force, entities: [NODE_1001], parameters: { fx: 1000, fy: 0, fz: 0 } } ] }3.3 连接关系数据结构连接关系描述部件之间的装配关系{ connections: [ { type: spotweld, name: 焊点连接_01, source_component: Part_A, target_component: Part_B, parameters: { diameter: 5.0, material: Steel_304, pattern: uniform, spacing: 25.0 }, location_data: { method: auto_detection, tolerance: 1.0 } } ] }4. ANSA Python API核心操作详解4.1 模型对象遍历与选择在ANSA中准确选择目标对象是数据写入的前提def find_entities_by_property(entity_type, property_name, property_value): 根据属性查找实体 entities base.CollectEntities(constants.NASTRAN, None, entity_type) matched_entities [] for entity in entities: current_value base.GetEntityPropertyValue(entity, property_name) if current_value property_value: matched_entities.append(entity) return matched_entities def get_component_hierarchy(component): 获取组件层级结构 hierarchy [] current component while current: hierarchy.insert(0, base.GetName(current)) current base.GetParent(current) return hierarchy4.2 属性设置与数据写入掌握ANSA属性设置的正确方法def apply_material_from_json(material_data, target_entities): 根据JSON数据应用材料属性 results { success: [], failed: [] } for entity in target_entities: try: # 创建或获取材料 material base.GetOrCreateMaterial( material_data[name], material_data[type] ) # 设置材料属性 for prop_name, prop_value in material_data[properties].items(): base.SetEntityPropertyValue(material, prop_name, prop_value) # 将材料赋予实体 base.SetEntityPropertyValue(entity, Material, material) results[success].append(base.GetName(entity)) except Exception as e: results[failed].append({ entity: base.GetName(entity), error: str(e) }) return results4.3 批量操作与性能优化处理大规模数据时的性能考虑def batch_apply_boundary_conditions(bc_data_list, use_batch_modeTrue): 批量应用边界条件 if use_batch_mode: # 开启批量操作模式提升性能 base.BeginBatchOperation() results [] try: for bc_data in bc_data_list: result apply_single_boundary_condition(bc_data) results.append(result) if use_batch_mode: base.EndBatchOperation() except Exception as e: if use_batch_mode: base.CancelBatchOperation() raise e return results5. JSON数据读取与解析实战5.1 安全可靠的JSON文件读取import os import json from pathlib import Path def load_json_config(file_path, schema_validationTrue): 安全加载JSON配置文件 if not os.path.exists(file_path): raise FileNotFoundError(fJSON文件不存在: {file_path}) try: with open(file_path, r, encodingutf-8) as f: data json.load(f) # 基础数据验证 if not isinstance(data, dict): raise ValueError(JSON根元素必须是字典) if schema_validation: validate_json_schema(data, file_path) return data except json.JSONDecodeError as e: raise ValueError(fJSON格式错误: {e}) except Exception as e: raise RuntimeError(f读取JSON文件失败: {e}) def validate_json_schema(data, file_path): 验证JSON数据结构 filename Path(file_path).name if materials in filename: required_fields [name, type, properties] for material in data.get(materials, []): for field in required_fields: if field not in material: raise ValueError(f材料数据缺少必要字段: {field}) return True5.2 数据转换与类型处理def convert_json_to_ansa_format(raw_data, data_type): 将JSON数据转换为ANSA可识别的格式 converters { material: convert_material_data, boundary_condition: convert_bc_data, connection: convert_connection_data } converter converters.get(data_type) if not converter: raise ValueError(f不支持的数据类型: {data_type}) return converter(raw_data) def convert_material_data(material_json): 转换材料数据 converted material_json.copy() # 确保数值类型正确 properties converted.get(properties, {}) for key, value in properties.items(): if isinstance(value, (int, float)): # ANSA通常使用国际单位制 properties[key] float(value) # 添加ANSA特定属性 converted[ansa_type] MAT1 # NASTRAN材料类型 return converted6. 完整案例从JSON到ANSA模型的自动化创建6.1 项目需求分析假设我们需要实现一个钣金装配体的自动化建模流程包含以下步骤读取组件几何信息应用材料属性创建连接关系设置边界条件生成网格6.2 主流程实现def automate_model_creation(config_dir, output_dir): 自动化模型创建主流程 # 1. 加载所有配置文件 configs load_all_configs(config_dir) # 2. 验证数据完整性 validate_configs(configs) # 3. 创建新模型或清理现有模型 model initialize_model() # 4. 按顺序执行建模步骤 execution_steps [ (create_components, configs[components]), (apply_materials, configs[materials]), (create_connections, configs[connections]), (apply_boundary_conditions, configs[boundary_conditions]), (generate_mesh, configs[mesh_settings]) ] results {} for step_name, step_data in execution_steps: try: result execute_step(step_name, step_data, model) results[step_name] {status: success, data: result} except Exception as e: results[step_name] {status: failed, error: str(e)} break # 5. 保存结果和生成报告 save_results(model, output_dir, results) return results def load_all_configs(config_dir): 加载所有配置文件 config_files { components: components.json, materials: materials.json, connections: connections.json, boundary_conditions: boundary_conditions.json, mesh_settings: mesh_settings.json } configs {} for key, filename in config_files.items(): file_path os.path.join(config_dir, filename) configs[key] load_json_config(file_path) return configs6.3 组件创建与材料分配def create_components_from_json(components_data): 根据JSON数据创建组件 created_components {} for comp_data in components_data[components]: comp_name comp_data[name] # 创建新组件 new_component base.CreateComponent(comp_name) # 设置组件属性 if properties in comp_data: for prop_name, prop_value in comp_data[properties].items(): base.SetEntityPropertyValue(new_component, prop_name, prop_value) # 导入几何或创建基本形状 if geometry_file in comp_data: import_geometry(comp_data[geometry_file], new_component) elif primitive in comp_data: create_primitive_geometry(comp_data[primitive], new_component) created_components[comp_name] new_component return created_components def assign_materials_to_components(materials_data, components): 为组件分配材料属性 assignment_results {} for material_data in materials_data[materials]: material_name material_data[name] # 查找使用该材料的组件 target_components [ comp for comp_name, comp in components.items() if should_assign_material(comp_name, material_name, material_data) ] if target_components: result apply_material_to_components(material_data, target_components) assignment_results[material_name] result return assignment_results7. 错误处理与数据验证机制7.1 健壮的错误处理框架class ANSAJSONError(Exception): ANSA JSON操作基础异常 pass class JSONValidationError(ANSAJSONError): JSON数据验证异常 pass class ANSAOperationError(ANSAJSONError): ANSA操作异常 pass def safe_ansa_operation(operation_func, *args, **kwargs): 安全的ANSA操作包装器 try: return operation_func(*args, **kwargs) except Exception as e: # 记录详细错误信息 error_info { operation: operation_func.__name__, args: args, kwargs: kwargs, error_type: type(e).__name__, error_message: str(e) } # 根据错误类型采取不同处理策略 if memory in str(e).lower(): raise ANSAOperationError(内存不足请简化模型或增加内存分配) elif license in str(e).lower(): raise ANSAOperationError(许可证错误请检查ANSA许可证状态) else: raise ANSAOperationError(fANSA操作失败: {e}) def validate_json_data_structure(data, schema): 验证JSON数据结构完整性 errors [] def check_fields(obj, required_fields, path): for field in required_fields: if field not in obj: errors.append(f缺少必要字段: {path}.{field}) if materials in schema: for i, material in enumerate(data.get(materials, [])): check_fields(material, schema[materials], fmaterials[{i}]) if errors: raise JSONValidationError(\n.join(errors)) return True7.2 数据一致性检查def check_model_data_consistency(model_data): 检查模型数据一致性 consistency_issues [] # 检查材料引用 defined_materials {mat[name] for mat in model_data.get(materials, [])} used_materials set() # 从组件中收集使用的材料 for component in model_data.get(components, []): if material in component: used_materials.add(component[material]) # 找出未定义的材料 undefined_materials used_materials - defined_materials if undefined_materials: consistency_issues.append(f未定义的材料: {undefined_materials}) # 检查组件引用 defined_components {comp[name] for comp in model_data.get(components, [])} # 从连接关系中检查组件引用 for connection in model_data.get(connections, []): for ref_field in [source_component, target_component]: if ref_field in connection: comp_name connection[ref_field] if comp_name not in defined_components: consistency_issues.append( f连接关系引用了未定义的组件: {comp_name} ) return consistency_issues8. 性能优化与最佳实践8.1 大规模数据处理优化class ANSAJSONProcessor: 高性能ANSA JSON处理器 def __init__(self, batch_size100, use_compressionTrue): self.batch_size batch_size self.use_compression use_compression self.cache {} def process_large_dataset(self, json_file_path): 处理大规模JSON数据集 total_processed 0 batch_results [] # 使用流式读取处理大文件 with open(json_file_path, r, encodingutf-8) as f: # 读取整个数组或使用分页读取 data json.load(f) if isinstance(data, list): # 分批处理 for i in range(0, len(data), self.batch_size): batch data[i:i self.batch_size] result self.process_batch(batch) batch_results.append(result) total_processed len(batch) # 定期清理内存 if i % (self.batch_size * 10) 0: self.cleanup_memory() return { total_processed: total_processed, batch_results: batch_results } def process_batch(self, batch_data): 处理单批数据 base.BeginBatchOperation() try: results [] for item in batch_data: result self.process_single_item(item) results.append(result) base.EndBatchOperation() return results except Exception as e: base.CancelBatchOperation() raise e def cleanup_memory(self): 清理内存缓存 self.cache.clear() # 可选的ANSA内存清理操作 if hasattr(base, CollectGarbage): base.CollectGarbage()8.2 缓存策略与数据复用def create_material_cache(materials_data): 创建材料缓存避免重复创建 cache {} for material_data in materials_data: material_name material_data[name] # 检查是否已存在同名材料 existing_material base.GetMaterial(material_name) if existing_material: cache[material_name] existing_material else: # 创建新材料并缓存 new_material base.CreateMaterial(material_name) cache[material_name] new_material return cache def smart_component_creation(components_data, reuse_existingTrue): 智能组件创建重用现有组件 created_components {} for comp_data in components_data: comp_name comp_data[name] if reuse_existing: # 尝试查找现有组件 existing_comp base.GetComponentByName(comp_name) if existing_comp: created_components[comp_name] existing_comp continue # 创建新组件 new_comp base.CreateComponent(comp_name) created_components[comp_name] new_comp return created_components9. 实际工程应用场景与扩展9.1 参数化设计与优化循环JSON数据驱动的参数化设计为优化分析提供了基础def create_parametric_study(base_config, parameter_ranges): 创建参数化研究 studies [] for param_name, values in parameter_ranges.items(): for value in values: # 复制基础配置 study_config deepcopy(base_config) # 修改参数 modify_parameter(study_config, param_name, value) studies.append({ name: f{param_name}_{value}, config: study_config, parameter: param_name, value: value }) return studies def run_optimization_loop(study_configs, objective_function): 运行优化循环 results [] for config in study_configs: try: # 创建模型 model create_model_from_config(config[config]) # 运行分析需要相应的求解器接口 analysis_result run_analysis(model) # 计算目标函数值 objective_value objective_function(analysis_result) results.append({ config_name: config[name], objective_value: objective_value, success: True }) except Exception as e: results.append({ config_name: config[name], error: str(e), success: False }) return results9.2 团队协作与版本管理JSON配置文件的版本管理策略def create_config_version(config_data, version_metadata): 创建配置版本 versioned_config { metadata: { version: version_metadata[version], created_by: version_metadata[author], timestamp: version_metadata[timestamp], description: version_metadata.get(description, ) }, data: config_data } return versioned_config def validate_config_compatibility(current_version, new_version): 验证配置版本兼容性 compatibility_issues [] # 检查必需字段的变更 required_fields get_required_fields() for field in required_fields: if field not in new_version[data]: compatibility_issues.append(f缺少必需字段: {field}) # 检查数据类型变更 type_changes find_type_changes(current_version[data], new_version[data]) compatibility_issues.extend(type_changes) return compatibility_issues通过本文介绍的ANSA二次开发JSON数据写入技术你可以建立标准化的CAE前处理流程显著提升工作效率和模型质量。这种基于数据驱动的建模方法不仅适用于单个工程师的日常工作中更能在团队协作和复杂项目中发挥巨大价值。建议在实际项目中从小规模开始实践逐步建立适合自己工作流的JSON数据标准和Python工具库。随着经验的积累你可以进一步探索更高级的应用场景如与优化算法的集成、云端部署等充分发挥ANSA二次开发的潜力。

相关新闻

国企集团eHR系统建设的底层逻辑与实践路径

国企集团eHR系统建设的底层逻辑与实践路径

当前,国有企业改革已进入攻坚期和深水区。随着国资委对国企改革三年行动成果的巩固深化,以及新一轮国企改革深化提升行动的推进,人力资源作为企业最核心的生产要素,其管理效能直接关系到改革成效与高质量发展目标的实现。在这一背…

2026/10/7 8:16:07 阅读更多 →
UE5.1增强输入系统详解:解决MetaHuman角色移动失效问题

UE5.1增强输入系统详解:解决MetaHuman角色移动失效问题

1. 项目概述:当MetaHuman遇上UE5.1的“增强输入” 如果你最近把项目从UE5.0或更早版本升级到了UE5.1,兴冲冲地拖入一个精致的MetaHuman,绑定了动画蓝图,按下WASD,却发现角色纹丝不动,或者只有动画在播放但角…

2026/10/5 23:33:50 阅读更多 →
优质睡眠的科学机制与实用提升策略

优质睡眠的科学机制与实用提升策略

1. 睡眠质量与生活状态的深度关联 那天早上醒来时,阳光透过窗帘的缝隙洒在床上,我清晰地记得自己是如何自然地睁开眼睛的——没有闹钟的刺耳声响,没有反复挣扎的困倦感,更没有那种"再睡五分钟"的拖延冲动。这种高质量的…

2026/10/5 16:31:52 阅读更多 →

最新新闻

libwebsockets Secure Streams 协议绑定机制解析:lws_protocols 回调、connect_munge 与 ss_pcols 架构

libwebsockets Secure Streams 协议绑定机制解析:lws_protocols 回调、connect_munge 与 ss_pcols 架构

人工智能AI Agent多模态语音AI 应用 【免费下载链接】ten-framework Open-source framework for conversational voice AI agents 项目地址: https://gitcode.com/TEN-framework/ten-framework 点击查看 免费下载 导读 本文深入剖析 libwebsockets(lws…

2026/10/7 8:16:05 阅读更多 →
Agent 的架构、多智能体与落地:从 Demo 到生产系统

Agent 的架构、多智能体与落地:从 Demo 到生产系统

从单 Agent 架构,到多智能体协作,再到评估体系与落地路线图,给出一个完整的生产级 Agent 路线图。一、单 Agent 架构:先给 Agent 装上“护栏”1.1 自由 Agent Loop 的问题第一篇的伪代码展示了一个最朴素的 Agent 循环&#xff1a…

2026/10/7 8:16:05 阅读更多 →
Botpress Freshdesk 集成实战:从工单生命周期事件到完整动作集的全指南

Botpress Freshdesk 集成实战:从工单生命周期事件到完整动作集的全指南

AI 应用后端 【免费下载链接】botpress The open-source hub to build & deploy GPT/LLM Agents ⚡️ 项目地址: https://gitcode.com/gh_mirrors/bo/botpress 点击查看 免费下载 Botpress Freshdesk 集成(hub.md,当前版本 0.1.1&#x…

2026/10/7 8:16:05 阅读更多 →
落地页转化率优化教程:5 个细节从 0 到 1 落地

落地页转化率优化教程:5 个细节从 0 到 1 落地

很多新手做落地页,框架搭得挺像样,转化率就是上不去。问题往往不在大方向,而在 5 个小细节。这篇是手把手教程,每一步都写清楚“怎么做、做到什么程度算合格”。 准备工作:先装一个数据看板 给落地页接上统计工具&…

2026/10/7 8:16:05 阅读更多 →
基于Zynq的高精度多通道数据采集卡完整解决方案(工业振动/高速采集/边缘传输)

基于Zynq的高精度多通道数据采集卡完整解决方案(工业振动/高速采集/边缘传输)

摘要:在工业高速数据采集、设备状态监测、振动分析、精密测控等场景中,传统纯FPGA采集卡运维拓展弱、纯ARM采集卡实时性差的痛点愈发突出。本文基于Xilinx Zynq 7000异构SoC,推出一套软硬件协同的高精度数据采集卡解决方案,依托PL…

2026/10/7 8:16:05 阅读更多 →
NAS部署Octopus:构建个人AI工作流中枢

NAS部署Octopus:构建个人AI工作流中枢

1. 项目概述:为什么一个NAS上的Octopus,能真正解决AI玩家的“API疲劳症”你有没有过这样的体验:早上用DeepSeek写技术方案,中午切到Qwen做会议纪要,下午调Kimi润色文案,晚上又得切回GLM跑数据分析——每个模…

2026/10/7 8:15:05 阅读更多 →

日新闻

ROS2机械臂仿真与运动控制:从URDF建模到Gazebo实战全解析

ROS2机械臂仿真与运动控制:从URDF建模到Gazebo实战全解析

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/7 1:01:58 阅读更多 →
用浏览器直接改ESP32的WiFi密码:NVS键值配置工具设计与实现

用浏览器直接改ESP32的WiFi密码:NVS键值配置工具设计与实现

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/7 1:02:00 阅读更多 →
芯片封装缺陷检测:扫描声学显微镜(SAT)原理与实操指南

芯片封装缺陷检测:扫描声学显微镜(SAT)原理与实操指南

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/7 1:02:00 阅读更多 →

周新闻

KT148A语音芯片外挂8002D功放的工程实践指南

KT148A语音芯片外挂8002D功放的工程实践指南

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/6 7:15:40 阅读更多 →
LLC谐振变换器增益公式推导:从FHA等效到完整归一化表达式

LLC谐振变换器增益公式推导:从FHA等效到完整归一化表达式

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/6 5:29:09 阅读更多 →
ARM架构深度解析:从RISC设计理念到交叉编译实战

ARM架构深度解析:从RISC设计理念到交叉编译实战

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/6 6:26:51 阅读更多 →

月新闻

我发现了一个新思路:用 Remotion + Claude Code 像写代码一样自动化生成短视频

我发现了一个新思路:用 Remotion + Claude Code 像写代码一样自动化生成短视频

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/6 8:21:32 阅读更多 →
Windows下 Codex 中 Chrome 和 Computer Use 插件不可用问题排查及解决参考方式:TaoToken 统一 Key 配置与验证

Windows下 Codex 中 Chrome 和 Computer Use 插件不可用问题排查及解决参考方式:TaoToken 统一 Key 配置与验证

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/6 4:21:51 阅读更多 →
黑夜航拍船只数据集训练YOLOV5模型全流程解析

黑夜航拍船只数据集训练YOLOV5模型全流程解析

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/6 1:18:13 阅读更多 →