Files
envi-code/SourceCode/Code2026/CoreCommand/pcf.h
T
gjm 164968b62e chore
把非utf8-bom编码的cpp/h文件改为 utf8 bom 编码, msvc识别utf8编码时,如果不是bom格式的,会使用当前cp_oem来解码.
2026-10-04 00:04:20 +08:00

32 lines
1.7 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#pragma once
// PCF (Piping Component File) 导出。
// 当前阶段:按“管道系统”收集 管道/管件/设备 并输出 PCF 中间文件,
// 供 Isogen / 自研 isoAlgo / 第三方软件生成 ISO 图使用。
class PCF
{
public:
// 按管道系统(PIPE_PSYSTEM)导出 PCF 文件。
// pszFile : 输出的 .pcf 文件完整路径
// pszSystem : 管道系统名,对应实体专业数据里的 PIPE_SYS;
// 传入空(NULL 或空串)时自动选取图纸中的第一个管道系统。
static bool makePCF(LPCTSTR pszFile, LPCTSTR pszSystem);
// 自动分图:把一个管道系统拆成多张 ISO 图,每张图导出一个 PCF 文件。
//
// 拆分规则(按专业出图惯例):
// 1) 先按"管号"分组,同一管号归一组(管号取不到时整系统作为一组);
// 2) 组内按管道连通性(接口相接)再拆成若干连通子网;
// 3) 子网若仍超过 nMaxNodes 个组件、或空间跨度超过 dMaxSpan,
// 沿管线走向累加组件,超限时回退到最近的"优先切点"再切:
// 优先切点 = 法兰面(eFlange) > 现场焊缝(两管件焊接相连) > 普通接口
// 只在组件之间的接口处切,因此绝不会切在弯头/三通内部;
// 4) 每个切点两侧互相写入"接图纸 <对方图号>"的接续标识,便于施工拼图。
//
// pszDir : 输出目录,空时用图纸所在目录
// pszSystem : 管道系统名,空时取图纸中第一个管道系统
// nMaxNodes : 单张图最大组件数,<=0 表示不限制
// dMaxSpan : 单张图最大空间跨度(图纸单位),<=0 表示不限制
static bool makePCFSplit(LPCTSTR pszDir, LPCTSTR pszSystem, int nMaxNodes, double dMaxSpan);
};