Geometry can not be generated with the given parameters

Geometry can not be generated with the given parameters

hyrro_velasquez
Advocate Advocate
1,773 Views
8 Replies
Message 1 of 9

Geometry can not be generated with the given parameters

hyrro_velasquez
Advocate
Advocate

Good Day Maam/Sir,

 

I need help regards to my python code, I've been trying to create a grip point on my model so I can stretch its Overall length inside Plant3D, but unfortunately I keep having the error "Geometry can not be generated with the given parameter" When I try to place it, I think the last part of my code is the problem,  "s.setLinearDimension('Length'(0, 0, 0),(0, 0, -Length))", I really don't know the right way to right the last part of my code. pls help and thanks in advance, bellow is my code.

 

from aqa.math import *

from varmain.primitiv import *

from varmain.custom import *

@Anonymous(Group="Support", TooltipShort="PSL_226_CS2020_T10 HANGER ROD", TooltipLong="PSL_226_CS2020_T10 HANGER ROD", LengthUnit="in", Ports="1")

@param(RODDIA=LENGTH, TooltipShort="RODDIA")
@param(Length=LENGTH, TooltipShort="Length")

 

def PSL_226_CS2020_T10(s, RODDIA = 16.0, Length = 500.0, **kw):

#ROD

  ROD = CYLINDER(s, R=RODDIA/2.0,H=Length,O=0).rotateX(0).translate((0.0,0.0,0.0))

#port points

#s.setPoint((0, 0, 0), (0,-1, 0))

  s.SetLinearDimension('Length'(0, 0, 0),(0, 0, -Length))

 

0 Likes
Accepted solutions (3)
1,774 Views
8 Replies
Replies (8)
Message 2 of 9

matti_laakko_12345
Participant
Participant

You are at least missing a comma between the linear parameter name and coordinates. 

 

So this:  s.SetLinearDimension('Length'(0, 0, 0),(0, 0, -Length))

should be s.SetLinearDimension('Length',(0, 0, 0),(0, 0, -Length))

 

 

Message 3 of 9

ZZikic
Advocate
Advocate
Accepted solution

Hyrro,

Please see the sections in GREEN.

 

I would suggest to remove the quotations from the Port count, add the @group("MainDimensions") line, and you forgot to define the ID = 'XXXXX' it needs to match the defined component name, in this case PSL_226_CS2020_T10

 

from aqa.math import *

from varmain.primitiv import *

from varmain.custom import *

 

 

@Anonymous(Group="Support", TooltipShort="PSL_226_CS2020_T10 HANGER ROD", TooltipLong="PSL_226_CS2020_T10 HANGER ROD", LengthUnit="in", Ports=1)

@group("MainDimensions")

@param(RODDIA=LENGTH, TooltipShort="RODDIA")
@param(Length=LENGTH, TooltipShort="Length")

def PSL_226_CS2020_T10(s, RODDIA = 16.0, Length = 500.0, ID = 'PSL_226_CS2020_T10', **kw):

#ROD

  ROD = CYLINDER(s, R=RODDIA/2.0,H=Length,O=0).rotateX(0).translate((0.0,0.0,0.0))

#port points

#s.setPoint((0, 0, 0), (0,-1, 0))

  s.SetLinearDimension('Length'(0, 0, 0),(0, 0, -Length))

 

Message 4 of 9

ZZikic
Advocate
Advocate
Accepted solution

You also need to uncomment the #s.setpoint and finish with a Return.

 

  s.setPoint((0, 0, 0), (0,-1, 0))
  s.SetLinearDimension('Length,'(0, 0, 0),(0, 0, -Length))

  Return

 

Message 5 of 9

hyrro_velasquez
Advocate
Advocate

Hi Sir Zeke, First of all thank you so much for your response, I try to apply it on my python script but unfortunately I still having an error, but right now its different error, "Can't find symbol for specified parts", if you don't mind, can please check again my python script for mistakes, I really appreciate your help. thank you so much.

 

from aqa.math import *

from varmain.primitiv import *

from varmain.custom import *

@Anonymous(Group="Support", TooltipShort="PSL_226_CS2020_T15 HANGER ROD", TooltipLong="PSL_226_CS2020_T15 HANGER ROD", LengthUnit="in", Ports=1)

@group("MainDimensions")

@param(RODDIA=LENGTH, TooltipShort="RODDIA")

@param(Length=LENGTH, TooltipShort="Length")

def PSL_226_CS2020_T15(s, RODDIA = 16.0,Length = 500.0,ID = 'PSL_226_CS2020_T15',**kw):

#ROD

  ROD = CYLINDER(s, R=RODDIA/2.0,H=Length,O=0).rotateX(0).translate((0.0,0.0,0.0))

#port points

  s.setPoint((0, 0, 0), (0,0,-1))

  s.SetLinearDimension('Length',(0, 0, 0),(0, 0, -Length))

  return

0 Likes
Message 6 of 9

hyrro_velasquez
Advocate
Advocate

Hi Sir Matti, thank you so much for your response, I tried your suggestion, but unfortunately still having an error, but right now its different, "Can't find symbol for specified parts". if you still have suggestion I really appreciate it, thank you so much.

0 Likes
Message 7 of 9

hyrro_velasquez
Advocate
Advocate

Also Sir Zeke, I try to remove the "s.SetLinearDimension('Length',(0, 0, 0),(0, 0, -Length))" in the script, and it placed on Plant3D without any error, but still the component doesent contain any grip point, does the SetLinearDimension produce a grip point on the component inside plant3D?. because that's my main objective, to make a component that contains gripPoint so I can change the Length of the component inside Plant3D after placing it with a default Length. again thank you somuch

0 Likes
Message 8 of 9

matti_laakko_12345
Participant
Participant
Accepted solution

Hi, Hyrro. One more thing I noticed, you have a capital S starting SetLinearDimension, this should start with lower case. So change your lineardimension line to:

 

s.setLinearDimension('Length', (0, 0, 0), (0, 0, -Length))

Message 9 of 9

hyrro_velasquez
Advocate
Advocate

Sir Matti, thank you so much!, all this time, That Capital "S" is the problem, that simple things I didn't pay attention to.

I'm trying to figure out this problem for so long, at last it work, also it already have a grip point inside plant3D, thank you so much for your help I really appreciate it. Again! thank you. 🙂 and GOD BLESS