Home > Community > Forums > PCB SKILL > Getting the number of vertice on a CLINE

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Getting the number of vertice on a CLINE 

Last post Mon, Jan 8 2007 1:38 PM by archive. 3 replies.
Started by archive 08 Jan 2007 01:38 PM. Topic has 3 replies and 1554 views
Page 1 of 1 (4 items)
Sort Posts:
  • Mon, Jan 8 2007 1:38 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    Getting the number of vertice on a CLINE Reply

    Once in a while we get a CLINE that has a number of vertice in a straight line.  Sometimes they're wirebonds.  I'm trying to write some code that will determine the number of vertice on a cline. 
    I already have the code to grab the clines that I want, I just need help working my way through them to find which ones have more than a beginning and an end point.
    Also, when it finds one that meets the criteria, is there a "merge" command that will merge all of the segments into one long segment?  I could delete and replace the cline, but most of the time the cline has properties on it already.

     

    Thanks,

    Mark


    Originally posted in cdnusers.org by MarkG
    • Post Points: 0
  • Mon, Jan 8 2007 2:27 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Getting the number of vertice on a CLINE Reply

    Mark, the following is an excerpt from a routine I put together to draw a circle at every vertice on a CLINE, specifically for package design where CLINES may have jogs at very small angles making them very difficult to locate. You should be able to adopt it to your needs. If you would like to full program please send an E-mail directly to djs@cadence.com.
    ; Add the figures to the Jog_Check subclass
    Design=axlDBGetDesign()
    foreach(Net Design->nets
    foreach(Branch Net->branches
    foreach(Child Branch->children
    if(
    Child->objType=="path"
    &&
    Child->layer==sprintf(dummy "ETCH/%s" Check_Layer)
    ||
    Child->layer==sprintf(dummy "CONDUCTOR/%s" Check_Layer) then
    foreach(Segment Child->segments
    if(Segment->isEtch==t then
    Start_End=car(Segment->startEnd)
    axlDBCreateCircle(list(car(Start_End):car(cdr(Start_End)) Figure_Diameter), 0, "manufacturing/jog_check")
    Start_End=car(cdr(Segment->startEnd))
    axlDBCreateCircle(list(car(Start_End):car(cdr(Start_End)) Figure_Diameter), 0, "manufacturing/jog_check")
    ); end if Segment...
    ); end foreach Segment...
    ); end if Child...
    ); end foreach Child...
    ); end foreach Branch...
    ); end foreach Net...
    ); end when
    ); end Show


    Originally posted in cdnusers.org by djs
    • Post Points: 0
  • Mon, Jan 8 2007 2:29 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Getting the number of vertice on a CLINE Reply

    Thanks djs,
    I'll mess around with it.

    Mark


    Originally posted in cdnusers.org by MarkG
    • Post Points: 0
  • Tue, Jan 16 2007 1:18 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Getting the number of vertice on a CLINE Reply

    Hi djs,
    I've been messing around with SKILL and found something cool that is simple and helps in my situation.  The variable WB_Obj is the selected wire bond object. 

    numofsegs=(WB_Obj->nSegs-1)

    So in my code, I have:

    if(WB_Obj->nSegs > 1
       then....

    Take care,
    Mark


    Originally posted in cdnusers.org by MarkG
    • Post Points: 0
Page 1 of 1 (4 items)
Sort Posts:
Started by archive at 08 Jan 2007 01:38 PM. Topic has 3 replies.