Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

meanline in UG

Status
Not open for further replies.

sztomek

Aerospace
Nov 30, 2006
2
Hello,
Is there any way to create meanlin between two splines in UG.
 
Replies continue below

Recommended for you

Sztomek,
Not that I know of... Do you have GRIP? If so, then you can compile the following. If not, then drop me a line at spambasket@roadrunner.com and I'll send you the compiled version... In either case, this routine works fairly well... most of the time... but of course, your milage may vary. :p

$$START PROLOG
$$ ********************************************************************
$$
$$ PROGRAM NAME: MEANS
$$
$$ ********************************************************************
$$
$$
$$ VERY SIMPLE VERSION OF MEANONE
$$ AVERAGES CX & CV PTS AND PASSES A SPLINE THRU THEM
$$
$$ TCP WINSTON-SALEM,N.C. AUTHOR: MIKE THOMPSON
$$
$$ CREATION DATE: 1/30/2004
$$
$$ REVISION HISTORY: UPDATE VERSION OF MEANY.GRS
$$
$$ PURPOSE : ANALYSE AIRFOIL GEOMETRY.
$$
$$ INPUT: AIRFOIL SPLINES (CX & CC) ON ONE LAYER
$$ AND WITH ADDITIONAL SECTIONS ON SEQUENTIAL LAYERS IF DESIRED.
$$
$$ OUTPUT: LAYER OF SECTION, SECTION HEIGHT, INLET EDGE RAD., INLET EDGE DIA.
$$ INLET METAL ANGLE, INLET INCLUDED ANGLE, EXIT EDGE RAD.,
$$ EXIT EDGE DIA., EXIT METAL ANGLE, EXIT INCLUDED ANGLE
$$
$$
$$ RESTRICTIONS: TOP VIEW AND RIGHT HAND AIRFOIL SECTION ONLY
$$
$$ ERROR INDICATIONS: IF AN ERROR OCCURS, CONTINUE USING ENTRY COMPLETE
$$
$$END PROLOG
$$
$$
$$ -DECLARATIONS-

NUMBER/RSP1,$ $$ RESPONSE VARIABLE
RSP2,$ $$ RESPONSE VARIABLE
RSP3,$ $$ RESPONSE VARIABLE
RSP4,$ $$ RESPONSE VARIABLE
N,$ $$ MEANCAMBER POINT COUNTER
I,$ $$ CONVEX SPLINE START NUMBER
J,$ $$ CONVEX SPLINE END NUMBER
K,$ $$ COUNTER
LAY,$ $$ LAYER COUNTER
EP(3),SP(3),$ $$ START & END OF SPLINE
X1,Y1,Z1,X2,Y2,Z2,$ $$ POSITION VARIABLES
XYZ(3),XYZ1(3),XYZ2(3),$ $$ X,Y,Z DATA OF POINT
V(3),$ $$ SPLINE VECTOR
TN,$ $$ ACCURACY NUMBER
PN,$ $$ PITCH CENTER POINT NUMBER
R,$ $$ TEMPORARY RADIUS FOR COMPARISON
CR,$ $$ PITCH RADIUS
RT,$ $$ TEMPORARY RADIUS FOR COMPARISON
ECLR,$ $$ ENTITY COLOR
TANG,$ $$ EXIT ANGLE
LANG,$ $$ INLET ANGLE
TIANG(3),$ $$ TRAIL INCLUDED ANGLE
LIANG(3) $$ INLET INCLUDED ANGLE
$$
ENTITY/OP(500),$ $$ CONVEX SPLINE POINTS
IP(500),$ $$ CONVCAVE SPLINE POINTS
OLDWCS,$ $$ ORIGNIAL WCS LOCATION
P(99),$ $$ TEMPORARY POINTS
PT(500),$ $$ KNOT POINTS FOR DESIRED SPLINE
SP1,$ $$ OUTER SPLINE
SP2,$ $$ INNER SPLINE
SPF,$ $$ GENERATED SPLINE
LN,$ $$ TEMPORARY LINE
LM,$ $$ TEMPORARY LINE
LS,$ $$ STARTING LINE
LE,$ $$ ENDING LINE
FIL,$ $$ TEMPORARY FILLET
TC1,$ $$ LEAD EDGE CIRCLE
TC2,$ $$ TRIAL EDGE CIRCLE
L,$ $$ LEAD ANGLE LINE
T,$ $$ TRAIL ANGLE LINE
LL(2),$ $$ LEAD CONSTRUCTION LINES
TL(2),$ $$ TRAIL CONSTRUCTION LINES
C $$ PITCH CIRCLE

$$ -INTERACTIVE STATEMENTS-
LAY=&WLAYER
L0:
MASK/8
&FONT=6
ECLR=1
LN1: IDENT/'CHOOSE SUCTION SPLINE',SP1,RSP1
JUMP/TERM:,TERM:,,,RSP1
ECLR=&COLOR(SP1)
$$ &COLOR(SP1) = &SYSCLR
XYZ=&SPOINT(SP1)

LN2: IDENT/'CHOOSE PRESSURE SPLINE',SP2,RSP2
JUMP/TERM:,TERM:,,,RSP2
$$ &COLOR(SP2) = &SYSCLR

DRAW/OFF
MASK/ALL
&ENTCLR=ECLR
$$ ****** LEAD AND TRAIL ANGLE LINES *******
L1:
$$ ** SET WCS **
OLDWCS=&WCS
&WCS=CSYS/1
EP=&SPOINT(SP1)
P(99)=POINT/0,0,EP(3)
&WCS=CSYS/&WCS,ORIGIN,P(99)
$$
$$ DEFINE POINTS TO BE USED FOR MEANCAMBER SPLINE
$$
CPSET/EARCL,SP1,100,OP
CPSET/EARCL,SP2,100,IP
$$
DO/L10:,I,1,100
XYZ = &POINT(OP(I))
XYZ1 = &POINT(IP(I))
XYZ2(1)=(XYZ(1)+XYZ1(1))/2
XYZ2(2)=(XYZ(2)+XYZ1(2))/2
XYZ2(3)=(XYZ(3)+XYZ1(3))/2
PT(I) = POINT/XYZ2
L10:

$$ CONSTRUCT MEAN CAMBER SPLINE

DRAW/ON
SPF=SPLINE/PT(1..100)
DELETE/PT,OP,IP,P
$$
&FONT=1
&WCS=OLDWCS
$$
TERM:
HALT


Regards,
SS
CAD should pay for itself, shouldn't it?
 
Thanks Shadowspawn, your grip working very good.

 
Another way to do this would be to first create a ruled-surface between the 2 splines (if they are both lying on the same plane, make sure that your Modeling Preference for Free-Form results is set to B-Surface) and then do an Edit -> Surface -> Isoparametric Trim/Divide (Divide works better), select the appropriate direction (U or V) and using a 'Division Value' of 50%, this will result in a surface edge that represents the 'meanline' of the 2 splines. If you actually need a curve, you can Extract the edge, or you can use the edge as curve reference in your next operation. And if you're willing to have a couple of blanked or hidden sheet bodies in your part file, the results are associative so that editing either one or both of the splines will result in an updated 'curve'.


John R. Baker, P.E.
Product "Evangelist"
NX Product Line
UGS Corp
Cypress, CA
 
John,

After making the Ruled Surface, would extracting 3 iso-curves in the appropriate UV direction give the same result as the Iso Trim/Divide by 50% and extracting an edge curve? Granted, there's no associativity with iso curves, but maybe fewer mouse clicks.

And speaking of iso curves...do you feel that an ER for an option to create associative extracted iso curves would be something that development might seriously consider?

Tim Flater
Senior Designer
Enkei America, Inc.
 
Actually it turns out that despite what it appears in NX 4, the resulting Isoparametric Divide features are not as 'associative' as one would expect. Note that I've already opened a PR to this effect, but it seems that the development manager thinks that it's working as designed. Just from my point of view, the results are useless in this age of parametric edits and updates.


John R. Baker, P.E.
Product "Evangelist"
NX Product Line
UGS Corp
Cypress, CA
 
So would extracting the 3 Iso Curves in the proper U/V direction and using the middle curve be sufficient if associativity weren't an issue?

I ask only because I want to be sure that there wouldn't be a major difference between an Iso Curve and an Edge.

Tim Flater
Senior Designer
Enkei America, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor