Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Block of material from solid or surface.

Status
Not open for further replies.

Albion

Computer
Jan 29, 2003
25
Is there a way in Unigraphics to take a single 3D solid or surface model and determine what the minimum size block of material (steel, aluminum, etc...) would be needed to machine that part?

Thanks.

-al
 
Replies continue below

Recommended for you

I was looking for the same thing a few months back, the only way I found to do it was with the grip command SOLBOX (if you find another way please let me know). Here is a short grip program that I wrote to determine these dimensions, you can use it as a base and customize it to your needs (my program labels the dimensions in the modeling app so we can do a screen dump but you may want to report these dimensions some other way). You will have to compile it to a .grx then you will be able to use it in Unigraphics.


$$ PROGRAM TO LABEL OVERALL PART DIMENSIONS
$$ BASED ON GRIP COMMAND 'SOLBOX'
$$ THIS COMMAND RETURNS THE DIAGONAL CORNERS OF A BOX
$$ CONTAINING THE SPECIFIED BODY, FACE, OR EDGE
$$ AS THE DOCUMENTATION SAYS:
$$ "The box is usually close to the minimum
$$ possible size, but this is not guaranteed."

$$ DECLARATIONS
ENTITY/SOLID1,PT(5),XDIM,YDIM,ZDIM,CSYS1,OLDCSYS
NUMBER/RESP,VAL(6),COLOR,OFFSET,OLDCSIZE,OLDLYR,OLDARW
STRING/WVW(10)

COLOR=&ENTCLR $$ SAVE CURRENT COLOR TO RESET IT LATER
OLDLYR=&WLAYER $$ SAVE CURRENT WORK LAYER
OLDCSYS=&WCS $$ SAVE CURRENT CSYS
OLDCSIZE=&CSIZE $$ SAVE CURRENT CHARACTER SIZE
WVW=&WORKVW $$ SAVE CURRENT WORK VIEW
OLDARW=&ASIZE $$ SAVE ARROW SIZE

$$ MASK SELECTION FOR SOLIDS ONLY
MASK/70

$$ PROMPT FOR USER SELECTION OF SOLID
IDENT/'SELECT A SOLID FOR BOUNDING BOX ANALYSIS',SOLID1,RESP
IF/RESP<=2,JUMP/ENDPROG:

$$ PERFORM ANALYSIS
MESSG/TEMP,'CALCULATING BOUNDING BOX'
&WCS=&ABS $$ SET CSYS TO ABSOLUTE
VAL=SOLBOX/SOLID1

$$VAL(1)=MIN X
$$VAL(2)=MIN Y
$$VAL(3)=MIN Z
$$VAL(4)=MAX X
$$VAL(5)=MAX Y
$$VAL(6)=MAX Z
$$ COORDINATES ARE RETURNED IN ABSOLUTE CSYS

$$ DRAW POINTS (COLOR = YELLOW, LAYER = 99, MAKE 'SLA_DIM' LAYER CATEGORY)
&ENTCLR=&YELLOW
CAT/'SLA_DIM',99
LAYER/WORK,99
PT(1)=POINT/VAL(1),VAL(2),VAL(3)
PT(2)=POINT/VAL(4),VAL(2),VAL(3)
PT(3)=POINT/VAL(4),VAL(5),VAL(3)
PT(4)=POINT/VAL(4),VAL(5),VAL(6)
PT(5)=POINT/VAL(1),VAL(5),VAL(3)

$$ CALCULATE DIMENSION LINE OFFSET AS 20% OF MAX DIMENSION
OFFSET=0.2*MAXF((VAL(4)-VAL(1)),(VAL(5)-VAL(2)),(VAL(6)-VAL(3)))

$$ SCALE DIMENSION CHARACTER SIZE TO OFFSET VALUE
$$ SO WE HOPEFULLY GET READABLE DIMENSIONS
$$ WHEN WE PRINT TO 8-1/2&quot; x 11&quot; SHEET
&CSIZE=OFFSET/8
&ASIZE=&CSIZE

$$ CHANGE CSYS TO DRAW X DIMENSION
CSYS1=CSYS/PT(1),PT(2),PT(3)
&WCS=CSYS1
XDIM=LDIM/HORIZ,0.5*(VAL(4)-VAL(1)),-OFFSET,PT(1),PT(2)

$$ CHANGE CSYS TO DRAW Y DIMENSION
CSYS1=CSYS/PT(2),PT(3),PT(1)
&WCS=CSYS1
YDIM=LDIM/HORIZ,0.5*(VAL(5)-VAL(2)),-OFFSET,PT(2),PT(3)

$$ CHANGE CSYS TO DRAW Z DIMENSION
CSYS1=CSYS/PT(3),PT(4),PT(5)
&WCS=CSYS1
ZDIM=LDIM/HORIZ,0.5*(VAL(6)-VAL(3)),-OFFSET,PT(3),PT(4)

$$ DELETE UNNEEDED WORK POINT
DELETE/PT(5)

ENDPROG: $$ JUMP TO HERE IF USER CANCELS PROGRAM

$$ RESET SYSTEM VALUES
&ENTCLR=COLOR
&WCS=OLDCSYS
&CSIZE=OLDCSIZE
&WLAYER=OLDLYR
&ASIZE=OLDARW

HALT
 
Hello Cowski,

Would you be able to send me your grip program
compiled for winnt? I don't have a compiler license.
Just grip execute.
I too need to get block size for plastics part
for quoting purposes.

TNX
rcanlas@lakesideplastics.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor