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 ...
随机推荐
- Word 格式优化
Word 格式优化. Word 支持 VBA 意味着,可以编程实现自己想要的格式拓展. Word 代码布局
- Codeforces Round #530 (Div. 2) (前三题题解)
总评 今天是个上分的好日子,可惜12:30修仙场并没有打... A. Snowball(小模拟) 我上来还以为直接能O(1)算出来没想到还能小于等于0的时候变成0,那么只能小模拟了.从最高的地方进行高 ...
- CentOS 6磁盘配额
可以指定用户能超过其配额限制.如果不想拒绝用户对卷的访问但想跟踪每个用户的磁盘空间使用情况,启用配额而且不限制磁盘空间的使用是非常有用的.也可指定不管用户超过配额警告级别还是超过配额限制时是否要记录事 ...
- 微信小程序开发过程中tabbar页面显示的相关问题及解决办法!
在微信小程序的开发过程中如果有使用过tabbar的同学,我相信一定会遇到一些困扰.为什么有些时候代码中明明已经在app.json里面增加了tabbar,可以页面中就是不显示呢?可不可以有些页面显示ta ...
- top Universities in Mechanical Engineering
- python爬取数据保存到Excel中
# -*- conding:utf-8 -*- # 1.两页的内容 # 2.抓取每页title和URL # 3.根据title创建文件,发送URL请求,提取数据 import requests fro ...
- spark之scala快速入门
scala和java都是在jvm之上的语言,相对来讲,scala热度比较低,其实并不是一个特别好的语言选择. 原因倒不是因为scala本身的缺点,而是使用人群不够多,论坛和社区不够活跃.这就跟社交软件 ...
- 1067 Bash游戏 V2
有一堆石子共有N个.A B两个人轮流拿,A先拿.每次只能拿1,3,4颗,拿到最后1颗石子的人获胜.假设A B都非常聪明,拿石子的过程中不会出现失误.给出N,问最后谁能赢得比赛. 例如N = 2.A只能 ...
- 为什么Linux下的环境变量要用大写而不是小写
境变量的名称通常用大写字母来定义.实际上用小写字母来定义环境变量也不会报错,只是习惯上都是用大写字母来表示的. 首先说明一下,在Windows下是不区分大小写的,所以在Windows下怎么写都能获取到 ...
- Centos7 上安装mysql遇上的问题:mysql无法正常启动
第一次在Centos上安装mysql遇到的一些问题. 第一步就遇到问题,安装mysql-server报错没有可用包. [解决方法] 先要安装mysql # wget http://repo.mysq ...