如下图这是我们熟悉的内层负片散热PAD Symbols,我们CAM制作时,为了满足PCB工厂生产制作能力,,会优化散热PAD尺寸,让热PAD的尺寸符合制作规范要求,通常我们只关注散热PAD的3个指标即可(外环,内环,开口),只要将这3个参数优化到位就可以了。

常规散热PAD 尺寸规范:(在此规范中:内径与外径,是基于孔的尺寸再预大值)

一.问题来了,我们如何更改散热PAD的尺寸

因为在CAM软件中,有N种的散热PAD类型,每一种散热PAD的Symbols对应的是一串文本,如:ths5000x3000x0x4x1000, rc_ths5000x3000x0x4x1000x500xr1000, 我们关注的3个参数就藏在这个串文本中,那直接更改是不可能了。

我们要解决这个问题。我们必须弄清楚,标准散热PAD的Symbols有多少种,每一种散热PAD 3关键参数(外环,内环,开口)所在这串文本位置, 我们可以要建立个散热PAD类,将原始Symbols字符串分解,并提取3个关键参数值, 这样才可以检测这个原始散热PAD尺寸是否符合要求了,符合要求就不更改,不符合要求就更改。

二.一共有多少种散热PAD,每个散热PAD的参数是什么?

共有7种标准散热PAD Symbols

1.Symbols名示例:

1.  ths5000x3000x0x4x1000

外径 内径 角度 开口个数 开口宽度 thr ths
       2.  s_tho5000x3000x45x4x1000 外径

内径 角度 开口个数 开口宽度 s_thr s_ths s_tho
       3. s_ths5000x4000x0x4x500xr1000

外径 内径 角度 开口个数 开口宽度 外圆角半径 s_ths
      4.  sr_ths5000x3000x0x4x1000

外径 内径 角度 开口个数 开口宽度 sr_ths
      5.  rc_ths5000x3000x45x4x1000x500

外径宽 外径高 角度 开口个数 开口宽度 环宽 rc_ths rc_tho
      6.  rc_ths5000x3000x0x4x1000x500xr1000

外径宽 外径高 角度 开口个数 开口宽度 环宽 外圆角半径 rc_ths
      7.  oblong_ths5000x3000x0x4x500x500xs

外径宽 外径高 角度 开口个数 开口宽度 环宽 尾随标识 oblong_ths(*)xs oblong_ths(*)xr

2.Symbols参数图示:

三.代码实现更改散热PAD symbols尺寸

1.更改散热PAD symbols类:

 public class symbolsThr
{
/// <summary>
/// 是否外形尺寸(即无外径长宽)
/// </summary>
public bool isOuterSize
{
get
{
return _isOuterSize;
}
set
{
this._isOuterSize = value;
}
}
private bool _isOuterSize = true;
/// <summary>
/// 散热PAD 外径
/// </summary>
public double OuterSize
{
get
{
return _OuterSize;
}
set
{
this._OuterSize = value;
this._OuterWidthSize = this._OuterSize;
this._OuterHeightSize = this._OuterSize;
this._isOuterSize = true;
}
}
private double _OuterSize;
/// <summary>
/// 散热PAD 外径宽
/// </summary>
public double OuterWidthSize
{
get
{
return _OuterWidthSize;
}
set
{
this._OuterWidthSize = value;
this._isOuterSize = false;
}
}
private double _OuterWidthSize;
/// <summary>
/// 散热PAD 外径高
/// </summary>
public double OuterHeightSize
{
get
{
return _OuterHeightSize;
}
set
{
this._OuterHeightSize = value;
this._isOuterSize = false;
}
}
private double _OuterHeightSize; /// <summary>
/// 散热PAD 内径 即(外径-环宽*2)
/// </summary>
public double InnerSize
{
get
{
return _InnerSize;
}
set
{
this._InnerSize = value;
this._RingWidth = (this._OuterSize - this._InnerSize) * 0.5;
}
}
private double _InnerSize; /// <summary>
/// 散热PAD 环宽
/// </summary>
public double RingWidth
{
get
{
return _RingWidth;
}
set
{
this._RingWidth = value;
this._InnerSize = this._OuterSize - this._RingWidth * ;
}
}
private double _RingWidth; /// <summary>
/// 散热PAD 开口宽
/// </summary>
public double GapWidth
{
get
{
return _GapWidth;
}
set
{
this._GapWidth = value;
}
}
private double _GapWidth; /// <summary>
/// 散热PAD 角度
/// </summary>
public double Angle { get; set; }
/// <summary>
/// 散热PAD 开口个数
/// </summary>
public double GapCount { get; set; }
/// <summary>
/// 散热PAD 外圆角半径
/// </summary>
public double OuterRoundRadius { get; set; } /// <summary>
/// 散热PAD 尾随标识
/// </summary>
public string SymbolsEndString { get; set; } = ""; private string _SymbolsStart;
/// <summary>
/// 初始化
/// </summary>
/// <param name="SymbolsName">原散热PAD symbols</param>
public symbolsThr(string SymbolsName)
{
List<string> symbolsStartList = new List<string>() { "thr", "ths", "s_thr", "s_ths", "s_tho", "sr_ths", "rc_ths", "rc_tho", "rc_ths", "oblong_ths" };
SymbolsName = SymbolsName.Trim().ToLower();
int symbolsID = symbolsStartList.FindIndex(tt => SymbolsName.StartsWith(tt));
if (symbolsID >= )
{
_SymbolsStart = symbolsStartList[symbolsID];
var MathesList = Regex.Matches(SymbolsName, "\\d+\\.?\\d*");
if (symbolsID >= )
{
this.OuterWidthSize = double.Parse(MathesList[].Value);
this.OuterHeightSize = double.Parse(MathesList[].Value);
this.Angle = double.Parse(MathesList[].Value);
this.GapCount = double.Parse(MathesList[].Value);
this.GapWidth = double.Parse(MathesList[].Value);
this.RingWidth = double.Parse(MathesList[].Value);
if (MathesList.Count == && _SymbolsStart == "rc_ths")
this.OuterRoundRadius = double.Parse(MathesList[].Value);
if (_SymbolsStart == "oblong_ths")
this.SymbolsEndString = SymbolsName.Substring(SymbolsName.Length - , ); }
else
{
this.OuterSize = double.Parse(MathesList[].Value);
this.InnerSize = double.Parse(MathesList[].Value);
this.Angle = double.Parse(MathesList[].Value);
this.GapCount = double.Parse(MathesList[].Value);
this.GapWidth = double.Parse(MathesList[].Value);
if (MathesList.Count == && _SymbolsStart == "s_ths")
this.OuterRoundRadius = double.Parse(MathesList[].Value);
}
}
} /// <summary>
/// 获取Symbols
/// </summary>
/// <returns></returns>
public string GetSymbolsThr
{
get
{
string symbolsName = "";
if (_isOuterSize)
{
symbolsName = $"{this._SymbolsStart}{this.OuterSize}x{this._InnerSize}x{this.Angle}x{this.GapCount}x{this.GapWidth}";
symbolsName += this.OuterRoundRadius < 0.01 ? "" : $"xr{this.OuterRoundRadius}";
}
else
{
symbolsName = $"{this._SymbolsStart}{this.OuterWidthSize}x{this.OuterHeightSize}x{this.Angle}x{this.GapCount}x{this.GapWidth}x{this.RingWidth}";
symbolsName += this.OuterRoundRadius < 0.01 ? "" : $"xr{this.OuterRoundRadius}";
symbolsName += string.IsNullOrEmpty(SymbolsEndString) ? "" : $"x{this.SymbolsEndString}";
}
return symbolsName;
}
}
/// <summary>
/// 更改圆形(方形)散热PAD
/// </summary>
/// <param name="OuterSize_">外形</param>
/// <param name="InnerSize_">内径</param>
/// <param name="GapWidth_">开口宽度</param>
/// <returns></returns>
public string SetThrSize(double OuterSize_, double InnerSize_, double GapWidth_)
{
this.OuterSize = (this.OuterSize < OuterSize_) ? OuterSize_ : this.OuterSize;
this.InnerSize = (this.InnerSize < InnerSize_) ? InnerSize_ : this.InnerSize;
this.GapWidth = (this.GapWidth < GapWidth_) ? GapWidth_ : this.GapWidth;
return this.GetSymbolsThr;
}
/// <summary>
/// 更改矩形散热PAD
/// </summary>
/// <param name="OuterWidthSize_">外径宽</param>
/// <param name="OuterHeightSize_">外径高</param>
/// <param name="RingWidth_">环宽</param>
/// <param name="GapWidth_">开口宽度</param>
/// <returns></returns>
public string SetThrSize(double OuterWidthSize_, double OuterHeightSize_, double RingWidth_, double GapWidth_)
{
this.OuterWidthSize = (this.OuterWidthSize < OuterWidthSize_) ? OuterWidthSize_ : this.OuterWidthSize;
this.OuterHeightSize = (this.OuterHeightSize < OuterHeightSize_) ? OuterHeightSize_ : this.OuterHeightSize;
this.RingWidth = (this.RingWidth < RingWidth_) ? RingWidth_ : this.RingWidth;
this.GapWidth = (this.GapWidth < GapWidth_) ? GapWidth_ : this.GapWidth;
return this.GetSymbolsThr;
}
}

2.调用例子:

            symbolsThr symThr = new symbolsThr("s_ths5000x4000x0x4x500xr1000");
string symbols = symThr.SetThrSize(, , ); //更改:外径 内径 开口 改后symbls为 s_ths6000x5000x0x4x1000xr1000

PCB 内层负片散热PAD Symbols尺寸更改方法的更多相关文章

  1. PCB genesis短槽加引导孔实现方法

    一.何为短槽 短槽通常定义:槽长小于2倍槽宽      如:槽长1.8mm,槽宽1.0mm 二.为什么要加短槽加引孔呢 短槽孔在钻孔时孔易偏斜导致槽长偏短, 当槽长宽比越小,则受力越不均匀,在钻第2个 ...

  2. WCF X.b 操作引用了已经从 Y.b 操作导出的消息元素 [http://tempuri.org/:b]。可以通过更改方法名称或使用 OperationContractAttribute 的 Name 属性更改其中一个操作的名称...

    详细错误如下: 很可能由 IncludeExceptionDetailInFaults=true 创建的 ExceptionDetail,其值为: System.InvalidOperationExc ...

  3. Chem 3D模型的参数值更改方法

    在化学绘图软件ChemOffice 15.1中有个专门用于绘制三维结构的组件,就是Chem 3D.通过这个组件用户可以绘制3D模型并可以通过这个组件来计算一些化学数据.在使用Chem 3D组件过程中, ...

  4. Thinkphp自定义生成缩略图尺寸的方法

    Thinkphp自定义生成缩略图尺寸的方法,本实例中生成两张不同尺寸的图片:第一张是大图350*350,第二张 50*50的缩略图 Image类是Thinkphp系统自带的,可以研究下,这个缩略图类很 ...

  5. MFC exe文件生成的图标更改方法

    MFC exe文件生成的图标更改方法 https://blog.csdn.net/txwtech/article/details/92980545

  6. Python镜像源集合——镜像源更改方法

    python在线安装库时会较慢,那是因为python的默认镜像源在国外,因此会慢:而国内有很多可以用的python镜像源,将python镜像源更改为国内的,则可以大大加快python库的安装速度. 1 ...

  7. Allegro PCB -内层分割,比如电源层需要分割几种电源

    内层分割,比如电源层需要分割几种电源. (1).点击Display -> Assign Color 在Option中,先取一种颜色作为高亮显示的颜色. (2).在Find中,选Net,点击mor ...

  8. IOS 获取网络图像尺寸 更改 图像色彩值 什么一套方法灰色

    直接在代码 头文件 // 图片处理 0 半灰色 1 灰度 2 深棕色 3 反色 +(UIImage*)imageWithImage:(UIImage*)image grayLevelType:(UII ...

  9. PCB genesis自制孔点 Font字体实现方法

    一.先看genesis原有Font字体 在PCB工程CAM加孔点字体要求时,通常我们直接用Geneis软件给我们提供了2种孔点字体canned_57与canned_67,但此字体可能不能满足各个工厂个 ...

随机推荐

  1. 我的第一个随笔——MarkDown的简单用法!

    目录 我的第一个笔记 1. 学习简单的markdown语法 1.1 标题 1.2 引用 1.3 倾斜与加粗 1.4无序列表 1.5有序列表 1.6图片和网页 1.7分割线 1.8代码块 1.9结尾 2 ...

  2. [Luogu] P4254 [JSOI2008]Blue Mary开公司

    题目背景 Blue Mary 最近在筹备开一家自己的网络公司.由于他缺乏经济头脑,所以先后聘请了若干个金融顾问为他设计经营方案. 题目描述 万事开头难,经营公司更是如此.开始的收益往往是很低的,不过随 ...

  3. <MyBatis>入门六 动态sql

    package org.maple.mapper; import org.apache.ibatis.annotations.Param; import org.maple.pojo.Employee ...

  4. 一篇入门Express

    目录 1.安装 2.Hello World 3.基础路由设置 4.高级路由设置 5.静态文件 6.中间件 7.生成器 1.安装 Express 是一个 基于 Node.js 的简洁灵活的 Web 应用 ...

  5. exists关键词和case表达式

    首先声明一下,exist和case没有必然联系,这里只是为了一起整理个笔记. EXIST谓词 如果存在对应的记录,返回TRUE.否则,返回FALSE.*实际使用中,即使不适用exist,基本也可以使用 ...

  6. linux设置系统时间与各种阻塞

    前阵子做了一个P2P的通信系统,发现开机的时候和中间运行的时候会莫名报错,这个问题找了好久,后来从日志中看出来,所有节点上阻塞的操作同时超时. 而在超时左右,有新节点自动加入系统. 在新节点加入系统的 ...

  7. Python基础(八)装饰器

    今天我们来介绍一下可以提升python代码逼格的东西——装饰器.在学习装饰器之前我们先来复习一下函数的几个小点,方便更好的理解装饰器的含义. 一.知识点复习 1, 在函数中f1和f1()有什么不同,f ...

  8. MySQL 乐观锁和悲观锁

    前言 1)在数据库的锁机制中介绍过,数据库管理系统(DBMS)中的并发控制的任务是确保在多个事务同时存取数据库中同一数据时不破坏事务的隔离性和一致性以及数据库的一致性. 2)加锁是为了解决更新丢失问题 ...

  9. 【Chrome】Chrome浏览器怎么查看版本信息

    第一步,打开Chrome浏览器 第二步,弹出浏览器主界面 第三步,点击右上按钮(三横杠) 第四步,下拉中选择“关于” 第五步,弹出窗口,可以看到版本信息 第二种方法: 第六步,也可以通过地址栏里输入命 ...

  10. SfM环境的搭建windows8.1+vs2010

    SfM即Structure form Motion,这个算法的实现,作者Noah Snavely给出了一个具体的实现. 目前最新下载https://github.com/snavely/bundler ...