large_assembly: LODSwitchConfig/compute_lightweight_lod/auto_switch_lod → vde_render/large_assembly_render.h structural_profiles: ProfileSpec/profile_library → vde_pdm/structural_profile_catalog.h geometric_snap: live_cursor_snap/aperture → vde_ui/geometric_snap_ui.h brep_drawing: DrawingSheet/Annotation → vde_drafting/drawing_sheet.h pmi_mbd: export_3d_pdf/auto_generate_pmi → vde_drafting/pmi_export.h All modules compile. Core geometry code retained in kernel.
60 lines
1.8 KiB
C++
60 lines
1.8 KiB
C++
#pragma once
|
||
/**
|
||
* @file pmi_export.h
|
||
* @brief PMI 导出与自动生成(VDE-334)
|
||
*
|
||
* 从 brep::pmi_mbd 中拆分出的 PMI "导出 / 生成" 能力:
|
||
* - export_3d_pdf: 将 B-Rep 模型与 PMI 标注导出为 3D PDF
|
||
* - auto_generate_pmi: 从 B-Rep 模型自动生成尺寸 / GD&T / 表面粗糙度 PMI
|
||
*
|
||
* PMI 数据模型(PMIAnnotation / PMIModel / PMIView)、STEP AP242 导出
|
||
* (to_step_ap242)以及 PMI 与拓扑的关联仍保留在内核
|
||
* vde::brep::pmi_mbd 中;本头文件通过 using 复用这些内核类型。
|
||
*
|
||
* @ingroup drafting
|
||
*/
|
||
#include "vde/brep/brep.h"
|
||
#include "vde/brep/pmi_mbd.h"
|
||
#include "vde/brep/auto_dimensioning.h"
|
||
#include <vector>
|
||
#include <string>
|
||
|
||
namespace vde::drafting {
|
||
|
||
// 复用内核的 PMI / B-Rep 类型
|
||
using brep::BrepModel;
|
||
using brep::PMIModel;
|
||
using brep::PMIAnnotation;
|
||
using brep::DrawingStandard;
|
||
|
||
/**
|
||
* @brief Auto-generate PMI annotations from B-Rep model
|
||
*
|
||
* Creates dimension PMI, GD&T PMI, and surface finish annotations.
|
||
*
|
||
* @param body B-Rep model
|
||
* @param pmi_model PMI model to populate (modified in-place)
|
||
* @param standard Drawing standard for format
|
||
* @return Number of annotations generated
|
||
*/
|
||
int auto_generate_pmi(const BrepModel& body, PMIModel& pmi_model,
|
||
DrawingStandard standard = DrawingStandard::ISO);
|
||
|
||
/**
|
||
* @brief 导出 3D PDF(VDE-334)
|
||
*
|
||
* 将 B-Rep 模型及 PMI 标注导出为 3D PDF 文件。
|
||
* PDF 包含 U3D/PRC 格式的三维模型和标注信息。
|
||
*
|
||
* @param body B-Rep 模型
|
||
* @param annotations PMI 标注列表
|
||
* @param path 输出 PDF 文件路径
|
||
* @return 是否导出成功
|
||
*/
|
||
[[nodiscard]] bool export_3d_pdf(
|
||
const BrepModel& body,
|
||
const std::vector<PMIAnnotation>& annotations,
|
||
const std::string& path);
|
||
|
||
} // namespace vde::drafting
|