Angle support python error

Angle support python error

csl24R6N
Enthusiast Enthusiast
515 次查看
7 条回复
1 条消息(共 8 条)

Angle support python error

csl24R6N
Enthusiast
Enthusiast

pic1.PNG

I want to make a support by connecting two anglesupport as shown in the picture.

 

The corresponding py file is this.

 

import aqa.math
import math
from varmain.divsub.cste_l import *
from varmain.primitiv import *
from varmain.var_basic import *
from varmain.custom import *

@Anonymous(Group="Support", TooltipShort="CSGE005", TooltipLong="CSGE005", LengthUnit="mm", Ports="1")
@group("MainDimensions")
@param(D=LENGTH, TooltipLong="Pipe Diameter")
@param(L=LENGTH, TooltipLong="Height")
@param(WT=LENGTH, TooltipLong="Steelshape(T)width")
@param(HT=LENGTH, TooltipLong="Steelshape(T)height")
@param(TT=LENGTH, TooltipLong="Steelshape(T)thickness")
@param(WL=LENGTH0, TooltipLong="Steelshape(L)width")
@param(HL=LENGTH0, TooltipLong="Steelshape(L)height")
@param(TL=LENGTH, TooltipLong="Steelshape(L)thickness")
@param(LL=LENGTH, TooltipLong="Steelshape(L)length")

def CSGE005(s, D=116.0, L=400.0, WT=100.0, HT=0.0, TT=8.0, WL=0.0, HL=0.0, TL=0.0, LL=200.0,ID='CSGE005', **kw):
if TL <= 0.0:
TL = TT
else:
MD = TL
if HT <= 0.0:
HT = WT
if WL <= 0.0:
WL = HT + TL
if HL <= 0.0:
HL = WL
R = D / 2.0
LT = L - R
o0 = CSTE_L(s, W=WL, H=HL, T=TL, L=LL).rotateX(-90.0).rotateZ(180).translate((TL / 2.0, LL / 2.0, -(R + HL / 2.0)))
o1 = CSTE_L(s, W=WT, H=HT, T=TT, L=LT).rotateY(180.0).rotateZ(180).translate((0.0, 0.0, -R))

o0.uniteWith(o1)
o1.erase()


s.setPoint((0, 0, 0), (-1, 0, 0))
s.setLinearDimension('L', (0, 0, 0), (0, 0, -L))

 

I've tried TESTACPSCRIPT . But it doesn't run.

 

Please help.

 

 

516 次查看
7 条回复
回复 (7)
2 条消息(共 8 条)

jabowabo
Mentor
Mentor

@csl24R6N wrote:

 

I've tried TESTACPSCRIPT . But it doesn't run. 


Can you provide some details? Is there an error message or anything in the command line showing what the problem is?

0 个赞
3 条消息(共 8 条)

csl24R6N
Enthusiast
Enthusiast

PLANTREGISTERCUSTOMSCRIPTS works without problems, but after that, TESTACPSCRIPT gives an error

0 个赞
4 条消息(共 8 条)

jabowabo
Mentor
Mentor

Help me understand why you didn't include what the error message states.

0 个赞
5 条消息(共 8 条)

csl24R6N
Enthusiast
Enthusiast

Geometry can not be generated with the given parameters.nil  / An error pops up like this

0 个赞
6 条消息(共 8 条)

plantinfo28
Contributor
Contributor

@csl24R6N correct the line as shown in image.Capture.PNG

 

 

0 个赞
7 条消息(共 8 条)

h_eger
Mentor
Mentor

was this imported variant created by you?
"from varmain.divsub.cste_l import *"
if ha please include the path, the user-defined scripts are not loaded automatically.

-

If my reply was helpful, please give a "Kudo" or click the "Accept as Solution" button below (or both).

Hartmut Eger
Senior Engineer
Anlagenplanung + Elektotechnik
XING | LinkedIn

EESignature



8 条消息(共 8 条)

ZZikic
Advocate
Advocate

Try:

from aqa.math import *

Instead of:

import aqa.math
import math

 

Also, remove the quotations from Ports="1" so it is just Ports=1

 

At the end of the script finish with: return