⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 shape_push.il

📁 skill语言在Cadence平台二次开发中大量使用
💻 IL
📖 第 1 页 / 共 2 页
字号:
                        axlClearSelSet( )
                        _CSS_Shape_DBID = nil
                        axlFormClose(_CSS_Form_Ptr)
                        axlCancelEnterFun()
                        _CSS_Cancel()
                )
        )
);
;===================================================================
;+
;NAME:
;       _CSS_CreatShape
;SYNOPSIS:
;       _CSS_CreatShape(shape_ptr class_data subclass_data)
;
;Description
;       This function call the required functions to construct a shape
;       from a selected shape. This function requires three parameters.
;       the first is the selected shape pointer, the second is parameter
;       is a test string for the class name. The third parameter is a
;       test string for the subclass name.
;
;       For further information see:
;       _CSS_BuildShapePath, _CSS_AddShape
;-
;=====================================================================
defun( _CSS_CreatShape (shape_ptr class_data subclass_data)
 let( (segment_list shape_path )
        segment_list =car( shape_ptr )->segments
        shape_path = _CSS_BuildShapePath( segment_list )
        _CSS_AddShape( shape_path shape_ptr class_data subclass_data)
        _CSS_Shape_DBID = nil
));
 
 
;===================================================================
;+
;NAME:
;       _CSS_SelectShape
;
;SYNOPSIS:
;       shape_dbid = _CSS_SelectShape()
;
;Description:
;       This function creates a form pointer id for input of
;       class/subclass data. This function takes no parameters. This
;       function returns the form pointer. This function requires a
;       form file named "mv_shape.form" located in the form search
;       directory.
;       For Further information see:
;       axlFormCreate
;
;-
;===================================================================
defun( _CSS_SelectShape ()
prog( ()
let( ( sel_shape_id )
        axlClearSelSet()
        axlSetFindFilter(
                ?enabled '("NOALL" "SHAPES")
                ?onButtons '("SHAPES")
        )
        axlMsgPut("Select Shape.")
        sel_shape_id = axlGetSelSet(axlSingleSelectPoint())
        when(sel_shape_id != nil axlHighlightObject( sel_shape_id ))
        return( sel_shape_id )
)));end - defun
 
 
;===================================================================
;+
;NAME:
;       _CSS_AddShape
;
;SYNOPSIS:
;        _CSS_AddShape( shape_path shape_id class_data subclass_data)
;
;Description:
;       This function creates a new shape from the segments of the
;       input shape_path. The selected shape dbid (shape_id ) is passed
;       to get net and fill data for the shape. The shape Class and Subclass names
;       are passed as string variables. This function reqiures that all
;       three parameters are entered. If all three parameters are nil
;       this function returns a nil. If this function is successful, it
;       will return a 't'.
;       For Further information see:
;       axlDBCreateShape
;
;-
;===================================================================
defun( _CSS_AddShape ( shape_path shape_dbid class_data subclass_data)
let( (fill_type net_name clss_sbclss)
        sprintf( clss_sbclss "%s/%s" class_data subclass_data)
        if( car(shape_dbid)->layer == "ROUTE KEEPIN/ALL" && class_data == "ETCH" then
                fill_type = t
                net_name = axlUIPrompt(" Enter New Net Name" "")
        else
                fill_type = car(shape_dbid)->fill
                net_name = car(shape_dbid)->net->name
        )
        axlDBCreateCloseShape(
                axlDBCreateOpenShape( shape_path
                        fill_type
                        clss_sbclss
                        net_name
                        nil
                )
        )
));end-defun
;===============================================================================
;+
; NAME:   _CSS_BuildShapePath
;
; SYNOPSIS: shape_path = _CSS_BuildShapePath( segment_list )
;
; Description:
;       This function creates a path list required for creating a Shape outline
;       for the SKILL axlDB-Shape commands. This function requires a list of
;       segments as the input parameter.
;       this function will return the path list.
;
;       For further information see:
;       axlPathStart, axlPathLine, axlPathArcCenter
;
;-
;===============================================================================
defun( _CSS_BuildShapePath ( segment_list)
prog( ()
let( ( return_path coord_number)
   coordinate_number = nil
   if(coordinate_number == nil then
       foreach(seg segment_list
          when(seg->objType == "line"
            if(coordinate_number == nil then
                coord = car(seg->startEnd)
                return_path = axlPathStart( list(coord)  seg->width)
                return_path = axlPathLine( return_path seg->width car( cdr(seg->startEnd)) )
                coordinate_number = t
            else
                return_path = axlPathLine(return_path seg->width car( cdr(seg->startEnd)) )
            );endif
          );endwhen
          when(seg->objType == "arc"
             if(coordinate_number == nil then
                 coord = car(seg->startEnd)
                 return_path = axlPathStart( list(coord)  seg->width)
                 return_path = axlPathArcCenter( return_path  seg->width car( cdr(seg->startEnd))
                                seg->isClockwise seg->xy)
                 coordinate_number = t
             else
                 return_path = axlPathArcCenter( return_path seg->width car( cdr(seg->startEnd))
                                                seg->isClockwise seg->xy )
             );endif
          );endwhen
       );endforeach
   )
   return( return_path )
)));end-defun _CSS_BuildShapePath
 
;===================================================================
;+
;NAME:
;       _CSS_RunInit
;
;SYNOPSIS:
;        _CSS_RunInit( )
;
;Description:
;       This function calls all function required to execute the copy
;       shape commands.
;       For Further information see:
;       axlDBCreateShape
;
;-
;===================================================================
defun( _CSS_RunInit ()
        Canceled = nil
        _CSS_Form_Ptr = nil
        _CSS_Shape_DBID = nil
        when( axlOKToProceed()
                axlMsgPut("Push Shape Command")
                axlUIPopupSet( nil )
                while( _CSS_Shape_DBID == nil && Canceled == nil
                        axlUIPopupSet( _CSS_Popup_Form())
                        _CSS_Shape_DBID = _CSS_SelectShape()
                        when( _CSS_Shape_DBID == nil && Canceled == nil
                                axlMsgPut(" No Shape Selected.")
                                axlMsgPut("Select again.")
                        );endwhen
                        axlUIPopupSet( nil )
                );endwhile
                when( Canceled == nil
                _CSS_Form_Ptr = _CSS_Form_Create()
                axlFormDisplay(_CSS_Form_Ptr)
                )
        )
);
 
;===================================================================
;+
;NAME:
;       _CSS_Cancel
;
;SYNOPSIS:
;        _CSS_Cancel( )
;
;Description:
;       This function deletes  all temporary disk files ,closes the
;       form if it is open, and exits the SKILL command.
;       For Further information see:
;       axlFormClose,axlCancelEnterFun,axlMsgPut
;
;-
;===================================================================
defun( _CSS_Cancel ()
        Canceled = t
        when( _CSS_Form_Ptr != nil axlFormClose( _CSS_Form_Ptr))
        when( isFile("ex_layer_data_temp.txt") deleteFile("ex_layer_data_temp.txt"))
        when( isFile("ex_tmp_file.txt") deleteFile("ex_tmp_file.txt"))
        when( isFile("mv_shape.form") deleteFile("mv_shape.form"))
        when( isFile("extract.log") deleteFile("extract.log"))
        axlCancelEnterFun()
        axlMsgPut("Done")
)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -