一.为什么方槽孔加内角孔

如下图,客户来的方槽或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方槽加内角槽孔实现方法的更多相关文章

  1. PCB Genesis 外形加内角孔实现方法

    在PCB工程制作CAM时,经常会遇到外形拐角处直角的,而客户对内角是要求,比如最大内角要求R0.5mm或者不接受内角, 但成型方式为铣方式,又不是啤板成型,那怎么处理才可以达到要求效果呢,在这里介绍2 ...

  2. PCB genesis连孔加除毛刺孔(圆孔与槽孔)实现方法(二)

    一.为什么 连孔加除毛刺孔 原因是 PCB板材中含有玻璃纤维, 毛刺产生位置在于2个孔相交位置,由于此处钻刀受力不均导致纤维切削不断形成毛刺 ,为了解决这个问题:在钻完2个连孔后,在相交处再钻一个孔, ...

  3. PCB genesis连孔加除毛刺孔(槽孔与槽孔)实现方法(三)

    一.为什么 连孔加除毛刺孔 原因是 PCB板材中含有玻璃纤维, 毛刺产生位置在于2个孔相交位置,由于此处钻刀受力不均导致纤维切削不断形成毛刺 ,为了解决这个问题:在钻完2个连孔后,在相交处再钻一个孔, ...

  4. PCB Genesis拼SET画工艺边 实现方法(一)

    在PCB行业中,客户提供的PCB尺寸较小,为方便PCB加工,并生产提高生产效率,通常小于80X80mm需拼板处理的, 拼板要求可能来自按户指定拼板,也有可能是由工厂自行拼板,但对于CAM来说就需将PC ...

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

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

  6. PCB Genesis SET拼板(圆形板拼板) 实现效果(二)

    越来发现Genesis采用Surface多边形数据结构的重要性了,当撑握了多边形缩放,交集, 差集,并集等算法, 想实现PCB拼板简直轻而易举了;当然借助多边形算法可以开发出更多的PCB实用的工具出来 ...

  7. 优化加载jQuery的方法

    请看下面的一段代码: <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js" ...

  8. MathType给公式加三角着重号的方法

    MathType是一款出色的数学公式编辑器,不仅可以兼容word,还与PPT也兼容.它也可以在PPT中编辑出非常漂亮的公式,再加上PPT本身所具有的动画.颜色.显示等功能,在演示数学公式时非常的精美. ...

  9. jquery加载页面的方法

    jquery加载页面的方法(页面加载完成就执行),建议大家看下windows.onload与$(document).ready之间的区别.   1.$(function(){ $("#a&q ...

随机推荐

  1. buf.readIntBE()

    buf.readIntBE(offset, byteLength[, noAssert]) buf.readIntLE(offset, byteLength[, noAssert]) offset { ...

  2. HTML-js 压缩上传的图片方法(默认上传的是file文件)

    //压缩图片方法 function compressImg(file,callback){ var src; var fileSize = parseFloat(parseInt(file['size ...

  3. vue 安装+下载

    1. npm init -y [生成package.json文件] 2. 增加 "private": true, 3.npm install 4. npm install vue ...

  4. Springboot 添加数据源报错

    报错信息如下: Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying be ...

  5. 【Codeforces 501C】Misha and Forest

    [链接] 我是链接,点我呀:) [题意] 给你一棵树 但是每个节点只告诉你出度个数 以及所有和它相连的点的异或和. 让你还原这棵树 [题解] 叶子节点的话,他所有节点的异或和就是它那唯一的一个爸爸 因 ...

  6. tmux使用入门

    tmux是Linux中窗口管理程序,适用于终端复用,尤其适合远程连接.最近,我正苦闷与ssh自动超时退出和broken pipe,决定投入tmux怀抱. 使用tmux最直接的好处,便是可以在一个远程连 ...

  7. Linux的基本配置

    安装: vmvare .centos .SecureCRTPortable(免装版) 软件地址:http://pan.baidu.com/s/1eSBqegq 密码:p4ck 3.开始配置 1打开vm ...

  8. 记一次 Hibernate 插入数据中文乱码报错解决

    错误描述 程序运行,向表中插入数据(包含中文)报错:\xE6\xB2\x88\xE9\x9B\xAA... 但是自己另外新建一个数据库手动插入数据中文正常,同样修改数据库,表的编码之后同样不行.而且 ...

  9. RESTFUL 和SOA初探

    这篇文章是转载的,restful简单的说就是url明确的指向资源.soa还不好用自己的话解释,但明显不是这样,好吧,我自己的理解就是soa就是访问网站的一个接口.以访问一个blog list为例子,  ...

  10. 【python】蛋疼的中文乱码解决方案

    转自: http://yooooo.us/2013/python-encoding-decoding?variant=zh-cn