Script for Curvature Calculation

 From:  Karsten (KMRQUS)
6634.7 In reply to 6634.6 
Hi Brian,

maybe we're talking about different things. The script don't create planes in the geometry database and intersect them there. Also it calculates not the curvature of one single point. (The easiest way to do this, is to draw an arc given by 3points an the secelct it or snap to the center) It calculates the curvature of all samplepoints and displays the "flow" of the curvature as a visualisation of "spikes" with an envelope curve. The curve is not limited to 2D. I don't know if it is possible to adjust a cplane in script, nevertheless you have to calculate the orientation (the third plane!). Because the script calculates the center complete in a mathematical way, a flat curve in the xy-plane will be automatic reduced to a 2D problem. The planes are given as:

A1x+B1y+C1z+D1=0
A2x+B2y+C2z+D2=0
A3x+B3y+C3z+D3=0

for a curve in xy-plane-> z=0->
with C1z=0; C2z=0;A3x=0;B3y=0;D3=0 ->
so you get a linear equation system like that:

A1x+B1y+D=0
A2x+B2y+D=0

a 2D dimensional problem!
Ok in this special configuration it makes some useless calculations, but the atvantage is the general formulation.
The function of the script is to analyse continuity of curves (G2-Stuff). You can find problems of swinging curves, continuity, changes in curvature direction. I used such a feature (with some other) in CATIA V4/V5 and UG NX to analyse, design/reconstuct and repair CLASS A surfaces. And I missed it in Moi. The script is tested with Moi V3 Beta. It doesn't work with V2. It seems there is a problem in the HTML-Call
<moi:NumericInput id="scalefactor" default="0.1" style="persist:true">

Have an nice day!

Kind regards
Karsten
Image Attachments:
Size: 198.6 KB, Downloaded: 243 times, Dimensions: 1366x768px