AutoCAD Plant 3D Forum
Welcome to Autodesk’s AutoCAD Plant 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Plant 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

"Geometry can not be generated with the given parameters"

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Anonymous
1035 Views, 3 Replies

"Geometry can not be generated with the given parameters"

I am attempting to create a custom pipe support.  I followed the guides I found here and here (yeah, I know it's old, but it had all the different primitive shapes and their arguments). Code is included at the bottom of this post.

 

I am able to view the part in the spec editor, and add it to a pipe support spec.  However, when trying to place the component, I got the following errors:

> Geometry can not be generated with the given parameters.

> Can't find symbol for specified part.

 

I tried looking this issue up, and found these answers.  I attempted these solutions, but it did not solve the problem.

 

Additionally, I can't seem to figure out how to allow my pipers to change individual values after placing the component, while still having a default value.  Specifically, L3 and H5 (below) should have default values (24 and 48 respectively), but be able to be changed by the drafter after placing the support.  I haven't tried to implement this yet because I couldn't get the static object to work, but I'm not sure how to go about it either, so suggestions would be awesome!

 

BaseSupport001_640.png

 

 

 

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

@activate(Group="Support,Base Support", FirstPortEndtypes="Undefined_ET",
TooltipShort="Base Pipe Support", TooltipLong="Base Pipe Support by DB and SD", LengthUnit="in", Ports="1")
@group("MainDimensions")
@param(H6=LENGTH, TooltipLong="Support Pipe A height")
@param(D6=LENGTH, TooltipLong="Support Pipe A diameter")
@param(H5=LENGTH, TooltipLong="Support Pipe B height")
@param(D5=LENGTH, TooltipLong="Support Pipe B diameter")
@param(L2=LENGTH, TooltipLong="Plate C side length")
@param(H2=LENGTH, TooltipLong="Plate C thickness")
@param(L1=LENGTH, TooltipLong="Plate D side length")
@param(H1=LENGTH, TooltipLong="Plate D thickness")
@param(W3=LENGTH, TooltipLong="Angle E width")
@param(H3=LENGTH, TooltipLong="Angle E thickness")
@param(PD=LENGTH, TooltipLong="Pipe Outer Diameter")


def BaseSupport001(s, L1=10.0, H1=0.5, L2=6.0, H2=0.5, L3=24.0, W3=2.5,
H3=0.25, D5=2.375, H5=36.0, D6=1.875, H6=9.0, PD=4.5, **kw):
# define sizes
W1=L1
W2=L2
R5=D5/2
R6=D6/2
O5=R5/2
O6=R6/2
TH=H1+H2+H3+H5+H6+PD/2

# define the shapes
b1 = BOX(s, L1, W1, H1).translate(0.0, 0.0, H1/2)
b2 = BOX(s, L2, W2, H2).translate(0.0, 0.0, H1+H2/2)
b3 = BOX(s, L3, W3, H3).translate(0.0, 0.0, H1+H2+H5+H6+H3/2)
b4 = BOX(s, L3, W3, H3).translate(0.0, W3/2, H1+H2+H5+H6+H3/2-W3/2).rotateX(90.0)
c1 = CYLINDER(s, R5, H5, O5).translate(0.0, 0.0, H1+H2)
c2 = CYLINDER(s, R6, H6, O6).transalte(0.0, 0.0, H1+H2+H5)

# combine all objects
b1.uniteWith(b2)
b2.erase()
b1.uniteWith(c1)
c1.erase()
b1.uniteWith(c2)
c2.erase()
b1.uniteWith(b3)
b3.erase()
b1.uniteWith(b4)
b4.erase()

#Connection points
s.setPoint((0, 0, TH), (0, -1, 0))

(if it matters, the O1=R1/2 and O2=R2/2 lines are just there to ensure that O is always positive and non-zero.  We don't care about the inside of this pipe, just the outside)

3 REPLIES 3
Message 2 of 4
jabowabo
in reply to: Anonymous

See comments below. You've got some geometry locations to fix but this will generate the items.

 

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

@activate(Group="Support,Base Support", FirstPortEndtypes="Undefined_ET", TooltipShort="Base Pipe Support", TooltipLong="Base Pipe Support by DB and SD", LengthUnit="in", Ports="1")
@group("MainDimensions")
@param(H6=LENGTH, TooltipLong="Support Pipe A height")
@param(D6=LENGTH, TooltipLong="Support Pipe A diameter")
@param(H5=LENGTH, TooltipLong="Support Pipe B height")
@param(D5=LENGTH, TooltipLong="Support Pipe B diameter")
@param(L2=LENGTH, TooltipLong="Plate C side length")
@param(H2=LENGTH, TooltipLong="Plate C thickness")
@param(L1=LENGTH, TooltipLong="Plate D side length")
@param(L3=LENGTH, TooltipLong="???????????????????")# You left this one out
@param(H1=LENGTH, TooltipLong="Plate D thickness")
@param(W3=LENGTH, TooltipLong="Angle E width")
@param(H3=LENGTH, TooltipLong="Angle E thickness")
@param(PD=LENGTH, TooltipLong="Pipe Outer Diameter")


def zzTest01(s, L1=10.0, H1=0.5, L2=6.0, H2=0.5, L3=24.0, W3=2.5, H3=0.25, D5=2.375, H5=36.0, D6=1.875, H6=9.0, PD=4.5, **kw):
    # define sizes
    W1=L1
    W2=L2
    R5=D5/2
    R6=D6/2
    O5=R5/2
    O6=R6/2
    TH=H1+H2+H3+H5+H6+PD/2

    # define the shapes
    # b0 = BOX(s, L=1, W=1, H=1) <-------- mind dim data format for BOX
    b1 = BOX(s, L=L1, W=W1, H=H1).translate((0.0, 0.0, H1/2)) # Translate requires double parentheses
    b2 = BOX(s, L=L2, W=W2, H=H2).translate((0.0, 0.0, H1+H2/2))
    b3 = BOX(s, L=L3, W=W3, H=H3).translate((0.0, 0.0, H1+H2+H5+H6+H3/2))
    b4 = BOX(s, L=L3, W=W3, H=H3).translate((0.0, W3/2, H1+H2+H5+H6+H3/2-W3/2)).rotateX(90.0)
        
    # b0 = CYLINDER(s, R=1, H=1, O=1) <-------- mind dim data format for CYLINDER
    c1 = CYLINDER(s, R=R5, H=H5, O=O5).translate((0.0, 0.0, H1+H2))
    c2 = CYLINDER(s, R=R6, H=H6, O=O6).translate((0.0, 0.0, H1+H2+H5)) # misspelled translate here
    
    # combine all objects
    b1.uniteWith(b2)
    b2.erase()
    b1.uniteWith(c1)
    c1.erase()
    b1.uniteWith(c2)
    c2.erase()
    b1.uniteWith(b3)
    b3.erase()
    b1.uniteWith(b4)
    b4.erase()

    #Connection points
    s.setPoint((0, 0, TH), (0, -1, 0))
Message 3 of 4
Anonymous
in reply to: jabowabo

Thanks!  That did it.  It now loads and I was able to play with the geometry and make it work.

 

Do you know how to make grip points that I can use to change the shape length?  According to the guide I was using, setting a variable to a negative number would work, but that leads to the same error I had before.

Message 4 of 4
jabowabo
in reply to: Anonymous

 

#### Stretch Points:
# - sets value of @param variables only
####
# - 'MyDim' = param value to set
# - first (<coords>) = start position
# - second (<coords>) = end position (grip location) s.setLinearDimension('MyDim', (0, 0, 0), (0, 0, MyDim))

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report