完善 PNVO001 与 PNRP17 前端图标及端口交互

按 AMESim 参考样式重绘孔板与气动活塞图标,调整端口锚点和旋转后的连接方向,并补充组件图标及接触连接回归测试。
This commit is contained in:
ljz committed 2026-08-03 09:49:55 +08:00
1 parent 1f4027573f
commit 11093613c5
5 files changed
+202 -72

No files matched your search

+76 -42
View File
@@ -7,6 +7,9 @@ import {
} from "./primitives";
const MECHANICAL_LINE_WIDTH = 1.8;
const PNRP17_STROKE = "#8b134f";
const PNRP17_FILL = "#cf9db6";
const PNRP17_LIGHT_FILL = "#f5ebf0";
const mechanicalStroke = {
fill: "none",
@@ -220,50 +223,81 @@ export function AmesimPnrp17Symbol() {
return (
<SymbolSvg className="component-symbol-amesim-pnrp17" domain="mechanical">
<path
d="M2 24h17M2 10h11M2 38h11M51 10h11M51 38h11"
{...mechanicalStroke}
/>
<path
d="M7 6v8h6M7 34v8h6M57 6v8h-6M57 34v8h-6"
{...mechanicalStroke}
/>
<rect
fill={SYMBOL_FILL}
height="34"
rx="1"
stroke={SYMBOL_STROKE}
strokeWidth="2"
width="32"
x="18"
y="7"
/>
<path d="M38 8v32M38 24h12" {...mechanicalStroke} />
<path
d="M22 18h12M28 14l6 4-6 4"
fill="none"
stroke={SYMBOL_ACCENT}
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="1.8"
/>
<path
d="M4 21v6M7 20v8M10 21v6"
fill="none"
stroke={SYMBOL_ACCENT}
d="M13.4 1.1H51.4V3h4.1v2.9h-4.1v1.9H18.2v13.8h-10V7h5.2V5.9H9.3V3h4.1Z"
fill={PNRP17_FILL}
stroke={PNRP17_STROKE}
strokeLinejoin="miter"
strokeWidth="1.2"
/>
<text
dominantBaseline="central"
fill={SYMBOL_STROKE}
fontFamily="Arial, sans-serif"
fontSize="8"
fontWeight="600"
textAnchor="middle"
x="28"
y="32"
>
P
</text>
<path
d="M8.2 26.7h12.7v13.8h2v6.7H8.2Z"
fill={PNRP17_FILL}
stroke={PNRP17_STROKE}
strokeLinejoin="miter"
strokeWidth="1.2"
/>
<path
d="M28 40.5h28.5v6.7H28Z"
fill={PNRP17_FILL}
stroke={PNRP17_STROKE}
strokeLinejoin="miter"
strokeWidth="1.2"
/>
<rect
fill={PNRP17_LIGHT_FILL}
height="34"
stroke={PNRP17_STROKE}
strokeWidth="1.2"
width="7.7"
x="40.8"
y="7.2"
/>
<rect fill={PNRP17_STROKE} height="34" width="1.8" x="38.8" y="7.2" />
<rect
fill={PNRP17_LIGHT_FILL}
height="2.8"
stroke={PNRP17_STROKE}
strokeWidth="1.2"
width="31.5"
x="9.3"
y="22.7"
/>
<rect
fill={PNRP17_LIGHT_FILL}
height="2.8"
stroke={PNRP17_STROKE}
strokeWidth="1.2"
width="7.7"
x="47.8"
y="22.7"
/>
<path
d="M2 4.4h7.3m46.2 0H62M2 24.1h7.3m46.2 0H62M25.5 43.4V48"
stroke={PNRP17_STROKE}
strokeLinecap="butt"
strokeWidth="1.2"
/>
{[15.3, 33].map((centerY) => (
<g
fill="none"
key={centerY}
stroke={PNRP17_STROKE}
strokeLinecap="butt"
strokeLinejoin="miter"
strokeWidth="1.1"
>
<path d={`M28.8 ${centerY}h-3.4`} />
<path
d={`M25.4 ${centerY - 2.5} 21.5 ${centerY}l3.9 2.5Z`}
fill="#ffffff"
/>
<path d={`M30.9 ${centerY}h3.4`} />
<path
d={`M34.3 ${centerY - 2.5} 38.3 ${centerY} 34.3 ${centerY + 2.5}Z`}
fill="#ffffff"
/>
</g>
))}
</SymbolSvg>
);
}