是德科技
直播中

赵文隽

7年用户 131经验值
私信 关注
[问答]

通过ael脚本添加一个引脚怎么实现角度计算的ael算法

我试图通过ADS中的脚本脚本添加一个引脚。
一个问题是关于角度计算。
如果通过内置图标添加引脚,ADS将自动计算角度,并确保引脚与引脚连接的边缘之间成90度角。
所以我想知道是否有一些可以实现角度计算的ael算法。
有人可以帮帮我吗?
谢谢!

以上来自于谷歌翻译


     以下为原文

  i am trying to add a pin though ael script in ADS. one problem is about the angle calculation.  

if you add a pin through the built-in icon, ADS will calculate the angle automatically and make sure 90 degree angle between the pin and edge which the pin is attached.  

so i am wondering if there is some ael algorithm that can implement the angle calculation.

anyone can help me?

thanks!   
附件

回帖(3)

杨涛

2018-11-26 09:18:23
您尝试使用AEL功能添加引脚?
如果您始终希望销钉相对于其所在边缘以90度连接,则无需计算销钉角度。
只要已经绘制了形状,销的x,y位置就在边缘上,并且在AEL中没有指定销角度来创建销,那么它将自动捕捉到所需的90度角。

以上来自于谷歌翻译


     以下为原文

  What AEL functions have you tryed to use to add the pin?

You do not need to calculate the pin angle if you always want the pin to connect at 90 degrees relative to the edge at which it is placed. As long as the shape has already been drawn, the x,y location of the pin is on an edge and the pin angle is not specified in the AEL creating the pin then it will automatically snap to the desired 90 degree angle.
举报

赵文隽

2018-11-26 09:29:47
引用: 411easdd*** 发表于 2018-11-26 19:53
您尝试使用AEL功能添加引脚?
如果您始终希望销钉相对于其所在边缘以90度连接,则无需计算销钉角度。
只要已经绘制了形状,销的x,y位置就在边缘上,并且在AEL中没有指定销角度来创建销,那么它将自动捕捉到所需的90度角。

我使用db_create_pin添加引脚。
函数定义如下:decl newPin = db_create_pin(context,x,y [,angle,layerId,termNum,termName,termType]);
在我的例子中,参数设置如下:db_create_pin(context,x,y,NULL,layerId,NULL,termName);
我认为角度是90度。
但事实证明,如果我将角度指定为NULL,则引脚角度计算过于简单。
db_create_pin行为与内置插入引脚工具略有不同。

以上来自于谷歌翻译


     以下为原文

  i use db_create_pin to add the pin.

the function definition is as follows:
decl newPin = db_create_pin(context, x, y [, angle, layerId, termNum, termName, termType] );

in my case, the parameter settings are like this:
db_create_pin(context, x, y, NULL, layerId, NULL, termName);

i thought the angle would be 90 degree. but it turns out the pin angle calculation is too simple if i specify angle to NULL.

the db_create_pin behaviors slight differently from the built-in insert pin tools.
举报

李桂荣

2018-11-26 09:40:38
引用: chenliang513 发表于 2018-11-26 20:05
我使用db_create_pin添加引脚。
函数定义如下:decl newPin = db_create_pin(context,x,y [,angle,layerId,termNum,termName,termType]);
在我的例子中,参数设置如下:db_create_pin(context,x,y,NULL,layerId,NULL,termName);

这取决于具体情况。
创建自己的组件图稿时,需要AEL函数+ db_create_pin +来定义组件的引脚。
尽管这些组件引脚在布局中显示为“菱形”,但它们已经具有内置方向,可用于连接到组件引脚的任何东西。
我认为这是你迷路的地方:在艺术品代码中设置正确的引脚方向。
这是一个例子。
引脚1的引脚方向为-90引脚2的引脚方向为-90引脚3的引脚方向为+90您没有看到上图中的引脚方向,因为引脚没有连接。
但如果您手动添加Momentum引脚/端口,将会看到引脚方向的影响。
这些将使用编码到组件的图稿中的引脚方向!
希望这可以帮助?
最好的问候Volker

以上来自于谷歌翻译


     以下为原文

  It depends on the context. 
When you create your own component artwork, AEL function +db_create_pin+ is required to define pins for the component. Although these component pins appear as "diamonds" in the layout, they already have a built-in direction for anything that will be attached to the component pin. I think this is where you got lost: setting the proper pin direction in the artwork code already.
Here is an example. 
Pin direction for pin 1 is -90
Pin direction for pin 2 is -90
Pin direction for pin 3 is +90
  You don't see the pin direction in the artwork above, because nothing is connected to the pins. But will will see the effect of the pin direction if you manually add Momentum pins/ports. These will use the pin direction coded into the component's artwork! 


Hope this helps?

Best regards
Volker
举报

更多回帖

发帖
×
20
完善资料,
赚取积分