Hello to All!
I am trying to create some custom equipment scripts that for my company would be useful but I got stuck at the point where you define the setpoints where the connection grips of the equipment should be.
My code is:
from varmain.primitiv import *
from varmain.custom import *
from math import *
@activate(Group="Vessel", TooltipShort="Skirt", TooltipLong="A skirt with base", LengthUnit="mm", Ports="1")
@group("MainDimensions")
@param(A=LENGTH, TooltipShort="Height")
@param(B=LENGTH, TooltipShort="Width")
@param(C=LENGTH, TooltipShort="Frame")
@param(C1=LENGTH, TooltipShort="Framethck")
@param(L1=LENGTH, TooltipShort="Length")
@param(L2=LENGTH, TooltipLong="HeightofLongitudeFrame")
def AIRSLIDE(s,A=500,B=300,C=40,L1=1100,C1=5,L2=100,**kw):
o4=BOX(s,L=L1,H=B+2*C,W=2*C1).translate((0,0,-(A/2)+C1+L2))
o2=BOX(s,L=C1,H=B+2*C,W=A+2*C).translate((0,-(L1/2)+C1/2,0))
o3=BOX(s,L=C1,H=B+2*C,W=A+2*C).translate((0,L1/2-C1/2,0))
o1=BOX(s,L=L1,H=B,W=A)
o1.uniteWith(o3)
o3.erase()
o1.uniteWith(o2)
o2.erase()
o1.uniteWith(o4)
o4.erase()
s=setPoint((0,0,0),(0,-1,0))
If i remove the last line I have no problem, but if I keep it there, I have a "Geometry can not be generated with the given parameters." error.
Solved! Go to Solution.
Solved by jabowabo. Go to Solution.
Change your setPoint line to read:
s.setPoint((0, 0, 0), (0, -1, 0))
Can't find what you're looking for? Ask the community or share your knowledge.