PCB genesis方槽加内角槽孔实现方法
一.为什么方槽孔加内角孔
如下图,客户来的方槽或Slot槽有内角尺寸要求,通常直接钻一个Slot槽孔内角是不能满足客户要求的,这时我们做CAM的需采用小钻刀进行处理.加内角孔或内角槽的方式进行处理了.
二.为什么不建议直接在4个角加内角孔
Slot槽4个角采用加内角孔的方式处理,这样会导致如下图效果,凸起.
三.方槽加内角槽孔方式(里面加4条槽)
1.常规槽宽则计算方式:
内角槽孔宽度:(W-0.1mm)/2
如:2.0X5.0mm槽宽,内角要求最大r0.5mm 那么内角槽宽为(2-0.1)/2 =0.95mm
2.特殊情况内角槽宽(不能满足内角尺寸要求):
如:2.0X3.0mm,内角要求最大r0.4mm,如按上面常规计算内角槽宽(1-0.1)/2=0.95mm
选用0.95mm钻刀,无法满足r0.4mm内角尺寸要求,这时需选用0.8mm钻刀
3.特殊情况槽宽(无槽刀):
如:1.0X3.0mm,内角要求最大r0.3mm,如按上面常规计算内角槽宽(1-0.1)/2=0.45mm
实际没有0.45mm槽刀,那这种情况,需选0.6mm槽刀,存在短槽孔时,钻刀需减速慢钻
此计算未考虑补偿,如真实计算需将钻孔补偿考虑进来.
四.C#简易代码实现:
1.方槽加内角槽孔代码
#region 方槽 加内角孔
gLayer glayer = g.getFEATURES($"{"drl"}", g.STEP, g.JOB, "mm", true);
foreach (var item in glayer.Llist)
{
List<gL> glList = calc2.l_InnerLine(item);
addCOM.line(glList);
}
#endregion
2.计算函数
/// <summary>
/// 将线段转为内切边的4条线段
/// </summary>
/// <param name="l"></param>
/// <param name="SlotWidth">4个SLOT槽宽 当为0时,自动计算SLOT槽宽</param>
/// <param name="UpVal">单边预大值</param>
/// <returns></returns>
public List<gL> l_InnerLine(gL l, double SlotWidth = , double UpVal = )
{
List<gL> lineList = new List<gL>();
double width = l.width * 0.001;
if (SlotWidth < 0.001)
{
SlotWidth = ((width + UpVal * ) - 0.1)*0.5;
SlotWidth = ((int)(Math.Floor((SlotWidth * ) / )) * ) * 0.001; ;
}
double val = (width - SlotWidth)* 0.5 + UpVal ;
double ang_direction = p_ang(l);
double length = width + UpVal * - SlotWidth;
gL gL1 = p_val_angL(l.pe, val, ang_direction, length);
gL1.width = SlotWidth * ;
gL gL2 = p_val_angL(l.ps, val, p_ang_invert(ang_direction), length);
gL2.width = SlotWidth * ;
lineList.Add(gL1);
lineList.Add(gL2);
lineList.Add(new gL(gL1.ps, gL2.pe, gL1.width));
lineList.Add(new gL(gL1.pe, gL2.ps, gL1.width));
return lineList;
}
/// <summary>
/// 求方位角
/// </summary>
/// <param name="l"></param>
/// <returns></returns>
public double p_ang(gL l)//求方位角
{
return p_ang(l.ps, l.pe);
}
/// <summary>
/// //求增量T 线L坐标
/// </summary>
/// <param name="ps"></param>
/// <param name="val"></param>
/// <param name="ang_direction"></param>
/// <param name="length"></param>
/// <returns></returns>
public gL p_val_angL(gPoint ps, double val, double ang_direction, double length = )
{
gPoint pe = p_val_ang(ps, val, ang_direction);
gL tempL;
tempL.ps = p_val_ang(pe, length * 0.5, ang_direction + );
tempL.pe = p_val_ang(pe, length * 0.5, ang_direction - );
tempL.negative = false;
tempL.attribut = "";
tempL.symbols = "";
tempL.width = ;
return tempL;
}
/// <summary>
/// 求反方位角
/// </summary>
/// <param name="ang_direction"></param>
/// <returns></returns>
public double p_ang_invert(double ang_direction)//求反方位角
{
if (ang_direction >= )
return ang_direction - ;
else
return ang_direction + ;
}
/// <summary>
/// 求增量坐标
/// </summary>
/// <param name="ps">起点</param>
/// <param name="val">增量值</param>
/// <param name="ang_direction">角度</param>
/// <returns></returns>
public gPoint p_val_ang(gPoint ps, double val, double ang_direction)
{
gPoint pe;
pe.x = ps.x + val * Math.Cos(ang_direction * Math.PI / );
pe.y = ps.y + val * Math.Sin(ang_direction * Math.PI / );
return pe;
}
3.Point,PAD;Line数据结构
/// <summary>
/// Line 数据类型
/// </summary>
public struct gL
{
public gL(double ps_x, double ps_y, double pe_x, double pe_y, double width_)
{
this.ps = new gPoint(ps_x, ps_y);
this.pe = new gPoint(pe_x, pe_y);
this.negative = false;
this.symbols = "r";
this.attribut = string.Empty;
this.width = width_;
}
public gL(gPoint ps_, gPoint pe_, double width_)
{
this.ps = ps_;
this.pe = pe_;
this.negative = false;
this.symbols = "r";
this.attribut = string.Empty;
this.width = width_;
}
public gL(gPoint ps_, gPoint pe_, string symbols_, double width_)
{
this.ps = ps_;
this.pe = pe_;
this.negative = false;
this.symbols = symbols_;
this.attribut = string.Empty;
this.width = width_;
}
public gPoint ps;
public gPoint pe;
public bool negative;//polarity-- positive negative
public string symbols;
public string attribut;
public double width;
public static gL operator +(gL l1, gPoint move_p)
{
l1.ps += move_p;
l1.pe += move_p;
return l1;
}
public static gL operator +(gL l1, gP move_p)
{
l1.ps += move_p.p;
l1.pe += move_p.p;
return l1;
}
public static gL operator -(gL l1, gPoint move_p)
{
l1.ps -= move_p;
l1.pe -= move_p;
return l1;
}
public static gL operator -(gL l1, gP move_p)
{
l1.ps -= move_p.p;
l1.pe -= move_p.p;
return l1;
}
}
/// <summary>
/// PAD 数据类型
/// </summary>
public struct gP
{
public gP(double x_val, double y_val, double width_)
{
this.p = new gPoint(x_val, y_val);
this.negative = false;
this.angle = ;
this.mirror = false;
this.symbols = "r";
this.attribut = string.Empty;
this.width = width_;
}
public gPoint p;
public bool negative;//polarity-- positive negative
public double angle;
public bool mirror;
public string symbols;
public string attribut;
public double width;
public static gP operator +(gP p1, gP p2)
{
p1.p += p2.p;
return p1;
}
public static gP operator -(gP p1, gP p2)
{
p1.p -= p2.p;
return p1;
}
}
/// <summary>
/// 点 数据类型 (XY)
/// </summary>
public struct gPoint
{
public gPoint(gPoint p_)
{
this.x = p_.x;
this.y = p_.y;
}
public gPoint(double x_val, double y_val)
{
this.x = x_val;
this.y = y_val;
}
public double x;
public double y;
public static gPoint operator +(gPoint p1, gPoint p2)
{
p1.x += p2.x;
p1.y += p2.y;
return p1;
}
public static gPoint operator -(gPoint p1, gPoint p2)
{
p1.x -= p2.x;
p1.y -= p2.y;
return p1;
}
}
五.实现效果
PCB genesis方槽加内角槽孔实现方法的更多相关文章
- PCB Genesis 外形加内角孔实现方法
在PCB工程制作CAM时,经常会遇到外形拐角处直角的,而客户对内角是要求,比如最大内角要求R0.5mm或者不接受内角, 但成型方式为铣方式,又不是啤板成型,那怎么处理才可以达到要求效果呢,在这里介绍2 ...
- PCB genesis连孔加除毛刺孔(圆孔与槽孔)实现方法(二)
一.为什么 连孔加除毛刺孔 原因是 PCB板材中含有玻璃纤维, 毛刺产生位置在于2个孔相交位置,由于此处钻刀受力不均导致纤维切削不断形成毛刺 ,为了解决这个问题:在钻完2个连孔后,在相交处再钻一个孔, ...
- PCB genesis连孔加除毛刺孔(槽孔与槽孔)实现方法(三)
一.为什么 连孔加除毛刺孔 原因是 PCB板材中含有玻璃纤维, 毛刺产生位置在于2个孔相交位置,由于此处钻刀受力不均导致纤维切削不断形成毛刺 ,为了解决这个问题:在钻完2个连孔后,在相交处再钻一个孔, ...
- PCB Genesis拼SET画工艺边 实现方法(一)
在PCB行业中,客户提供的PCB尺寸较小,为方便PCB加工,并生产提高生产效率,通常小于80X80mm需拼板处理的, 拼板要求可能来自按户指定拼板,也有可能是由工厂自行拼板,但对于CAM来说就需将PC ...
- PCB genesis自制孔点 Font字体实现方法
一.先看genesis原有Font字体 在PCB工程CAM加孔点字体要求时,通常我们直接用Geneis软件给我们提供了2种孔点字体canned_57与canned_67,但此字体可能不能满足各个工厂个 ...
- PCB Genesis SET拼板(圆形板拼板) 实现效果(二)
越来发现Genesis采用Surface多边形数据结构的重要性了,当撑握了多边形缩放,交集, 差集,并集等算法, 想实现PCB拼板简直轻而易举了;当然借助多边形算法可以开发出更多的PCB实用的工具出来 ...
- 优化加载jQuery的方法
请看下面的一段代码: <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js" ...
- MathType给公式加三角着重号的方法
MathType是一款出色的数学公式编辑器,不仅可以兼容word,还与PPT也兼容.它也可以在PPT中编辑出非常漂亮的公式,再加上PPT本身所具有的动画.颜色.显示等功能,在演示数学公式时非常的精美. ...
- jquery加载页面的方法
jquery加载页面的方法(页面加载完成就执行),建议大家看下windows.onload与$(document).ready之间的区别. 1.$(function(){ $("#a&q ...
随机推荐
- vue的路由配置
路由,其实就是指向的意思,当我点击页面上的home按钮时,页面中就要显示home的内容,如果点击页面上的about 按钮,页面中就要显示about 的内容.Home按钮 => home 内容, ...
- 封装一个获取module.exports内容的方法
let fs = require('fs') let req = (moduleName) => { //content代表的是文件内容 let content = fs.readFileSyn ...
- UVA-1572 Self-Assembly(拓扑排序判断有向环)
题目: 给出几种正方形,每种正方形有无穷多个.在连接的时候正方形可以旋转.翻转. 正方形的每条边上都有一个大写英文字母加‘+’或‘-’.00,当字母相同符号不同时,这两条边可以相连接,00不能和任何边 ...
- Python使用Flask框架,结合Highchart,搭配数据功能模块处理csv数据
参考链接:https://www.highcharts.com.cn/docs/data-modules 1.javascript代码 var csv = document.getElementByI ...
- Liunx学习笔记(三) 文件权限
一.文件权限 1.查看文件权限 (1)文件权限 在 Linux 中对于文件有四种访问权限,列举如下: 可读取:r,Readable 可写入:w,Writable 可执行:x,Execute 无权限:- ...
- js之获取html标签的值
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- 3. Python中的分支判断、循环
本文利用的是Python 3.x版本,建议学习3.x版本 Python中的分支判断.循环 1. 分支条件判断 1.1 比较操作 以下是数之间常见的比较操作,例如5>3就是数学意义上的比较,5是大 ...
- IIS301重定向:将不带www的域名跳转到带www上
首先你的域名有这两条解析记录 进入服务器IIS,添加2个站点,如下图 第一个正常绑定你的域名:www.baidu.com 第二个绑定不带www的域名:baidu.com 然后点开ncgd-no-www ...
- 【Lqb T336】Cowboys
[链接] 我是链接,点我呀:) [题意] 出现AB就要交换一下 给你结果序列 问你原序列有多少种可能 首尾可以交换. [题解] 设 dp[i][0]表示i和i-1不交换,达到前i个字符序列的状态的方案 ...
- D. Palindromic characteristics
time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standa ...