一区二区三区三上|欧美在线视频五区|国产午夜无码在线观看视频|亚洲国产裸体网站|无码成年人影视|亚洲AV亚洲AV|成人开心激情五月|欧美性爱内射视频|超碰人人干人人上|一区二区无码三区亚洲人区久久精品

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評(píng)論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會(huì)員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識(shí)你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示

基于PCB 板的邊倒圓角實(shí)現(xiàn)方案解析

PCB線路板打樣 ? 來(lái)源:博客園 ? 作者:pcbren ? 2021-03-02 14:11 ? 次閱讀
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

當(dāng) PCB 外形是直角時(shí), 通常工程制作外形 (鑼帶) 時(shí), 會(huì)將直角或尖角的地方倒成圓角, 主要是為了防止板邊容易劃傷板且容易扎傷人

所以當(dāng)客戶沒(méi)有特殊要求時(shí), PCB 外形是直角一般會(huì)默認(rèn)倒角 0.5mm 圓角(如下圖所示)

一。 PCB 板邊倒圓角點(diǎn)分析

原 PCB 外形 如下圖圖示: 看了這個(gè) PCB 外形, 產(chǎn)生有 2 個(gè)問(wèn)題點(diǎn)。

1. 外形中哪些點(diǎn)需倒圓角?

2. 如何怎么倒圓角?

1. 外形中哪些點(diǎn)需倒圓角?

看下圖: PCB 外形倒圓角的點(diǎn), 剛好就是我們凸包需求出的點(diǎn), 接下來(lái)我們將玩轉(zhuǎn)凸包了, 只要求出凸包, 那么就可以實(shí)現(xiàn) PCB 板邊倒圓角啦。

求凸包的算法: 我們可以借鑒算法導(dǎo)論中的查找凸包的算法(加以改進(jìn)得到新的求凸包方法, 詳見(jiàn)[方法一] 與[方法二] )

2. 如何怎么倒圓角?

在下面有說(shuō)明倒角方法。

二。 求凸點(diǎn)

方法一求凸點(diǎn):[采用多輪遍歷, 一遍一遍將凹點(diǎn)踢除, 剩于的即是凸點(diǎn)]

方法一求凸點(diǎn): 代碼

/// 《summary》

/// 求最大多邊形最大凸包 1 [采用多輪遍歷將凹點(diǎn)踢除, 剩于的即是凸點(diǎn)]

/// 《/summary》

/// 《param name=“gSur_Point_list”》《/param》

/// 《returns》《/returns》

public List《gSur_Point》 s_convex_polyon1(List《gSur_Point》 gSur_Point_list)

{

add addCOM = new add();

bool isOK = true;

List《gSur_Point》 PointList = new List《gSur_Point》();

var isCCW = s_isCCW(gSur_Point_list);

int sum = gSur_Point_list.Count() - 1;

int n = gSur_Point_list.Count();

for (int i = 0; i 《n; i++)

{

int IndexPre = (i - 1) % sum;

if (IndexPre == -1) IndexPre = sum - 1;

int IndexCurrent = i % sum;

int IndexNext = (i + 1) % sum;

if (gSur_Point_list[IndexPre].type_point》 0) continue;

if (gSur_Point_list[IndexCurrent].type_point》 0) continue;

var multiVal = multi(gSur_Point_list[IndexPre].p, gSur_Point_list[IndexCurrent].p, gSur_Point_list[IndexNext].p);

if ((isCCW && multiVal》 0) || (!isCCW && multiVal 《0))

PointList.Add(gSur_Point_list[IndexCurrent]);

else

isOK = false;

}

List《gSur_Point》 Point2List = new List《gSur_Point》(PointList);

while (!isOK)

{

isOK = true;

PointList.Clear();

PointList.AddRange(Point2List);

Point2List.Clear();

sum = PointList.Count() - 1;

n = PointList.Count();

for (int i = 0; i 《n; i++)

{

int IndexPre = (i - 1) % sum;

if (IndexPre == -1) IndexPre = sum - 1;

int IndexCurrent = i % sum;

int IndexNext = (i + 1) % sum;

var multiVal = multi(PointList[IndexPre].p, PointList[IndexCurrent].p, PointList[IndexNext].p);

if ((isCCW && multiVal》 0) || (!isCCW && multiVal 《0))

Point2List.Add(PointList[IndexCurrent]);

else

isOK = false;

}

}

return Point2List;

}

方法二求凸包:[采用一邊遍歷找出凸點(diǎn)并加入隊(duì)列, 并同時(shí)將隊(duì)列中的凸點(diǎn)隊(duì)列中找出凹點(diǎn)踢除]

方法二求凸包代碼:

/// 《summary》

/// 求最大多邊形最大凸包 2 [采用一邊遍歷找出凸點(diǎn)并加入隊(duì)列, 并同時(shí)將隊(duì)列中的凸點(diǎn)隊(duì)列中找出凹點(diǎn)踢除]

/// 《/summary》

/// 《param name=“gSur_Point_list”》《/param》

/// 《returns》《/returns》

public List《gSur_Point》 s_convex_polyon2(List《gSur_Point》 gSur_Point_list)

{

Stack《gSur_Point》 StackPoint = new Stack《gSur_Point》();

var isCCW = s_isCCW(gSur_Point_list);

int sum = gSur_Point_list.Count() - 1;

int n = gSur_Point_list.Count();

for (int i = 0; i 《n; i++)

{

int IndexPre = (i - 1) % sum;

if (IndexPre == -1) IndexPre = sum - 1;

int IndexCurrent = i % sum;

int IndexNext = (i + 1) % sum;

if (gSur_Point_list[IndexPre].type_point》 0) continue;

if (gSur_Point_list[IndexCurrent].type_point》 0) continue;

var multiVal = multi(gSur_Point_list[IndexPre].p, gSur_Point_list[IndexCurrent].p, gSur_Point_list[IndexNext].p);

if ((isCCW && multiVal》 0) || (!isCCW && multiVal 《0))

{

L1:

if (StackPoint.Count》 1)

{

var Top1Point = StackPoint.Pop();

var Top2Point = StackPoint.Peek();

multiVal = multi(Top2Point.p, Top1Point.p, gSur_Point_list[IndexCurrent].p);

if ((isCCW && multiVal》 0) || (!isCCW && multiVal 《0))

StackPoint.Push(Top1Point);

else

goto L1;

}

StackPoint.Push(gSur_Point_list[IndexCurrent]);

}

}

return StackPoint.Reverse().ToList();

}

方法三求凸包:[按算法導(dǎo)論 Graham 掃描法 各節(jié)點(diǎn)按方位角 + 距離 逆時(shí)針排序 依次檢查, 當(dāng)不屬凸點(diǎn)于則彈出]

方法三求凸包代碼

/// 《summary》

/// 求最大多邊形最大凸包 5 [按算法導(dǎo)論 Graham 掃描法 各節(jié)點(diǎn)按方位角 + 距離 逆時(shí)針排序 依次檢查, 當(dāng)不屬凸點(diǎn)于則彈出]

/// 由于把各點(diǎn)的排列順序重新排序了, 只支持折線節(jié)點(diǎn)(當(dāng)存在弧節(jié)點(diǎn)時(shí)會(huì)出異常 !?。。?/p>

/// 《/summary》

/// 《param name=“gSur_Point_list”》《/param》

/// 《returns》《/returns》

public List《gSur_Point》 s_convex_polyon3(List《gSur_Point》 gSur_Point_list)

{

var LeftBottomPoint = gSur_Point_list.OrderBy(tt =》 tt.p.y).ThenBy(tt =》 tt.p.x).FirstOrDefault();

gSur_Point_list.RemoveAt(gSur_Point_list.Count - 1);

gSur_Point_list.ForEach(tt =》

{

tt.Value = p2p_di(LeftBottomPoint.p, tt.p);

tt.Angle = p_ang(LeftBottomPoint.p, tt.p);

}

);

gSur_Point_list = gSur_Point_list.OrderBy(tt =》 tt.Angle).ThenBy(tt =》 tt.Value).ToList();

gSur_Point_list.Add(gSur_Point_list[0]);

Stack《gSur_Point》 StackPoint = new Stack《gSur_Point》();

var isCCW = true;

int sum = gSur_Point_list.Count() - 1;

int n = gSur_Point_list.Count();

for (int i = 0; i 《n; i++)

{

int IndexPre = (i - 1) % sum;

if (IndexPre == -1) IndexPre = sum - 1;

int IndexCurrent = i % sum;

int IndexNext = (i + 1) % sum;

var multiVal = multi(gSur_Point_list[IndexPre].p, gSur_Point_list[IndexCurrent].p, gSur_Point_list[IndexNext].p);

if (isCCW && multiVal》 0)

{

L1:

if (StackPoint.Count》 1)

{

var Top1Point = StackPoint.Pop();

var Top2Point = StackPoint.Peek();

multiVal = multi(Top2Point.p, Top1Point.p, gSur_Point_list[IndexCurrent].p);

if (isCCW && multiVal》 0)

StackPoint.Push(Top1Point);

else

goto L1;

}

StackPoint.Push(gSur_Point_list[IndexCurrent]);

}

}

return StackPoint.Reverse().ToList();

}

公共方法與數(shù)據(jù)結(jié)構(gòu)

/// 《summary》

/// Surface 坐標(biāo)泛型集類 1

/// 《/summary》

public class gSur_Point

{

public gSur_Point()

{ }

public gSur_Point(double x_val, double y_val, byte type_point_)

{

this.p.x = x_val;

this.p.y = y_val;

this.type_point = type_point_;

}

public gSur_Point(gPoint p, byte type_point_)

{

this.p = p;

this.type_point = type_point_;

}

public gPoint p;

/// 《summary》

/// 0 為折點(diǎn) 1 為順時(shí)針 2 為逆時(shí)針

/// 《/summary》

public byte type_point { get; set; } = 0;

/// 《summary》

/// 值

/// 《/summary》

public double Value { get; set; } = 0;

/// 《summary》

/// 角度

/// 《/summary》

public double Angle { get; set; } = 0;

/// 《summary》

/// 標(biāo)記

/// 《/summary》

public bool isFalg { get; set; }

}

/// 《summary》

/// 點(diǎn) 數(shù)據(jù)類型 (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;

}

public static gPoint operator +(gPoint p1, double val)

{

p1.x += val;

p1.y += val;

return p1;

}

public static bool operator ==(gPoint p1, gPoint p2)

{

return (p1.x == p2.x && p1.y == p2.y);

}

public static bool operator !=(gPoint p1, gPoint p2)

{

return !(p1.x == p2.x && p1.y == p2.y);

}

}

/// 《summary》

/// 求叉積 判斷[點(diǎn) P 與線 L] 位置關(guān)系[小于 0] 在右邊 [大于 0] 在左邊 [等于 0] 共線

/// 《/summary》

/// 《param name=“ps”》《/param》

/// 《param name=“pe”》《/param》

/// 《param name=“p”》《/param》

/// 《returns》[小于 0] 在右邊 [大于 0] 在左邊 [等于 0] 共線《/returns》

public double multi(gPoint ps, gPoint pe, gPoint p)

{

return ((ps.x - p.x) * (pe.y - p.y) - (pe.x - p.x) * (ps.y - p.y));

}

/// 《summary》

/// 檢測(cè) Surface 是否逆時(shí)針

/// 《/summary》

/// 《param name=“gSur_Point_list”》《/param》

/// 《returns》《/returns》

public bool s_isCCW(List《gSur_Point》 gSur_Point_list)

{

double d = 0;

int n = gSur_Point_list.Count() - 1;

for (int i = 0; i 《n; i++)

{

if (gSur_Point_list.type_point》 0) continue;

int NextI = i + 1 + (gSur_Point_list[i + 1].type_point》 0 ? 1 : 0);

d += -0.5 * (gSur_Point_list[NextI].p.y + gSur_Point_list.p.y) * (gSur_Point_list[NextI].p.x - gSur_Point_list.p.x);

}

return d》 0;

}

/// 《summary》

/// 返回兩點(diǎn)之間歐氏距離

/// 《/summary》

/// 《param name=“p1”》《/param》

/// 《param name=“p2”》《/param》

/// 《returns》《/returns》

public double p2p_di(gPoint p1, gPoint p2)

{

return Math.Sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y));

}

/// 《summary》

/// 求方位角

/// 《/summary》

/// 《param name=“ps”》《/param》

/// 《param name=“pe”》《/param》

/// 《returns》《/returns》

public double p_ang(gPoint ps, gPoint pe)

{

double a_ang = Math.Atan((pe.y - ps.y) / (pe.x - ps.x)) / Math.PI * 180;

// 象限角 轉(zhuǎn)方位角 計(jì)算所屬象限 并求得方位角

if (pe.x》= ps.x && pe.y》= ps.y) //↗ 第一象限

{

return a_ang;

}

else if (!(pe.x》= ps.x) && pe.y》= ps.y) // ↖ 第二象限

{

return a_ang + 180;

}

else if (?。╬e.x》= ps.x) && ?。╬e.y》= ps.y)) //↙ 第三象限

{

return a_ang + 180;

}

else if (pe.x》= ps.x && !(pe.y》= ps.y)) // ↘ 第四象限

{

return a_ang + 360;

}

else

{

return a_ang;

}

}

View Code

三。 板邊凸點(diǎn)倒圓角方法

方法一。 也最簡(jiǎn)單的倒角方法, 我們將 PCB 板邊凸點(diǎn)找出來(lái)后, 可以直接借助 genesis 倒角功能就可以實(shí)現(xiàn)了

當(dāng)然但偶爾會(huì)報(bào)錯(cuò)的, 且當(dāng) N 個(gè)小線段組成的尖角倒角會(huì)出錯(cuò)(要實(shí)現(xiàn)完美效果只有自己寫倒角算法啦)

方法二: 自己寫倒角算法, 這個(gè)算法和加內(nèi)角孔算法類似 (這里只是介紹簡(jiǎn)單的倒角) 考慮特殊的需要擴(kuò)展

四。 凸點(diǎn)加倒圓角實(shí)現(xiàn)效果

編輯:hfy

聲明:本文內(nèi)容及配圖由入駐作者撰寫或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點(diǎn)僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場(chǎng)。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問(wèn)題,請(qǐng)聯(lián)系本站處理。 舉報(bào)投訴
  • pcb
    pcb
    +關(guān)注

    關(guān)注

    4368

    文章

    23492

    瀏覽量

    409784
收藏 人收藏
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

    評(píng)論

    相關(guān)推薦
    熱點(diǎn)推薦

    PCBA加工必知!工藝預(yù)留的原因、方式與重要性全解析

    一站式PCBA加工廠家今天為大家講講PCBA加工中為什么要預(yù)留工藝?預(yù)留工藝的方式及重要性。在PCBA加工過(guò)程中,預(yù)留工藝是一個(gè)至關(guān)重要的環(huán)節(jié)。許多客戶在設(shè)計(jì)電路時(shí)可能會(huì)忽略這
    的頭像 發(fā)表于 06-24 09:15 ?168次閱讀

    芯片內(nèi)嵌式PCB封裝技術(shù)方案解析"七部曲" | 第二曲:市場(chǎng)主流玩家與技術(shù)方案解讀

    以下完整內(nèi)容發(fā)表在「SysPro電力電子技術(shù)」知識(shí)星球-《芯片內(nèi)嵌式PCB封裝技術(shù)方案全面解析的七部曲》系列文章-SysPro原創(chuàng)文章,僅用于SysPro內(nèi)部使用-本篇為節(jié)選,完整內(nèi)容會(huì)在知識(shí)星球
    的頭像 發(fā)表于 06-13 06:48 ?408次閱讀
    芯片內(nèi)嵌式<b class='flag-5'>PCB</b>封裝技術(shù)<b class='flag-5'>方案</b><b class='flag-5'>解析</b>&amp;quot;七部曲&amp;quot; | 第二曲:市場(chǎng)主流玩家與技術(shù)<b class='flag-5'>方案</b>解讀

    一文讀懂:?jiǎn)螌?、多層、特殊材質(zhì) PCB 加工方式全解析

    一站式PCBA加工廠家今天為大家講講單層、多層及特殊材質(zhì)PCB的加工方式有哪些?單層、多層及特殊材質(zhì)PCB加工方式。在電子產(chǎn)品制造過(guò)程中,PCB
    的頭像 發(fā)表于 05-06 08:59 ?266次閱讀

    PCBA設(shè)計(jì)工藝:提升生產(chǎn)效率與精度的關(guān)鍵

    緣的尺寸、形狀、過(guò)孔、切割方式等多方面的考慮。雖然在許多設(shè)計(jì)中,板材的內(nèi)部結(jié)構(gòu)可能會(huì)得到更多的關(guān)注,但工藝的設(shè)計(jì)同樣是至關(guān)重要的,因?yàn)樗苯佑绊懙秸麄€(gè)PCB的制造、組裝、性能以及可靠性。 什么是PCBA設(shè)計(jì)工藝? PCBA設(shè)
    的頭像 發(fā)表于 04-23 09:24 ?251次閱讀

    PCB芯片加固方案

    PCB芯片加固方案PCB芯片加固工藝是確保電子設(shè)備性能和可靠性的重要環(huán)節(jié)。以下是一些常見(jiàn)的PCB
    的頭像 發(fā)表于 03-06 15:37 ?532次閱讀
    <b class='flag-5'>PCB</b><b class='flag-5'>板</b>芯片加固<b class='flag-5'>方案</b>

    深度解析:雙面PCB與單面PCB的制造差異

    一站式PCBA智造廠家今天為大家講講雙面PCB與單面PCB制造工藝有什么差異?雙面PCB
    的頭像 發(fā)表于 02-05 10:00 ?687次閱讀

    必看!PCB幾層設(shè)計(jì)的決定要素全解析

    一站式PCBA智造廠家今天為大家講講PCB幾層的決定因素是什么?PCB設(shè)計(jì)成幾層的決定因素。PCB作為電子產(chǎn)品中的關(guān)鍵組成部分,其層數(shù)設(shè)
    的頭像 發(fā)表于 12-14 11:38 ?738次閱讀

    PCB厚度對(duì)信號(hào)傳輸?shù)挠绊?/a>

    PCB的厚度對(duì)其信號(hào)傳輸性能有著顯著的影響。以下是詳細(xì)分析: 1、信號(hào)傳輸速度 PCB的厚度會(huì)影響信號(hào)傳輸?shù)乃俣?。一般?lái)說(shuō),較薄的PCB
    的頭像 發(fā)表于 12-06 17:24 ?1173次閱讀

    了解雙面和多層pcb的優(yōu)缺點(diǎn)

    在現(xiàn)代電子設(shè)備的設(shè)計(jì)和制造中,印刷電路PCB)是不可或缺的組件。PCB不僅提供了電子元件的物理支撐,還實(shí)現(xiàn)了電子元件之間的電氣連接或電絕緣。隨著技術(shù)的發(fā)展,
    的頭像 發(fā)表于 11-04 13:57 ?811次閱讀

    中低頻pcb與高頻pcb區(qū)別

    隨著電子技術(shù)的飛速發(fā)展,對(duì)PCB的性能要求也越來(lái)越高。在不同的應(yīng)用場(chǎng)景中,如通信、雷達(dá)、衛(wèi)星等,高頻信號(hào)的處理變得越來(lái)越重要。 中低頻PCB 中低頻
    的頭像 發(fā)表于 11-04 13:48 ?1065次閱讀

    精科??破?pcb板材全解析

    PCB
    雨後陽(yáng)光
    發(fā)布于 :2024年09月27日 10:40:40

    pcb沒(méi)有工藝怎么貼片

    當(dāng)PCB沒(méi)有工藝時(shí),進(jìn)行貼片加工需要特別注意以下幾點(diǎn),以確保貼片過(guò)程的順利進(jìn)行和最終產(chǎn)品的質(zhì)量。 一、了解工藝的作用 工藝PCB
    的頭像 發(fā)表于 08-15 09:45 ?1800次閱讀

    PCB設(shè)計(jì)與PCB的緊密關(guān)系

    一站式PCBA智造廠家今天為大家講講PCB設(shè)計(jì)與PCB有什么關(guān)系?PCB設(shè)計(jì)與PCB的關(guān)
    的頭像 發(fā)表于 08-12 10:04 ?1103次閱讀

    PCB如何收費(fèi)?pcb收費(fèi)標(biāo)準(zhǔn)

    一站式PCBA智造廠家今天為大家講講PCB加工費(fèi)是如何收取的?PCB收費(fèi)方法和價(jià)格因素。PCB
    的頭像 發(fā)表于 08-07 09:24 ?2477次閱讀

    PCB多層PCB單層有什么區(qū)別

    PCB多層PCB單層在多個(gè)方面存在顯著的區(qū)別,這些區(qū)別主要體現(xiàn)在結(jié)構(gòu)、性能、應(yīng)用范圍、成本以及設(shè)計(jì)復(fù)雜性等方面。
    的頭像 發(fā)表于 08-05 16:56 ?2506次閱讀