0

When we parse DXF file which related to CAD, we can see the grade rule table file and the base size DXF file which export dxf using Gerber model . The base size DXF provides some knot points which on the NURBS curve , how to grade the NURBS curve with the grading point which define in the grade rule table file ?

Is there java NURBS lib for me ?

I search for some research: we parse the point from DXF(CAD file format), the weight associate with the NURBS curve in DXF is default 1, then interpolate the knot points and get the control points, then could draw the NURBS curve , using python lib python-nurbs lib

# when deal with polyline in dxf
from geomdl.fitting import interpolate_curve
....
degree = min(pointSize - 1, 3)
curve = interpolate_curve(points, degree)   # points which on the NURBS curve
vertices = curve.evalpts   # this is knot points ,and we can get control points
Jim Green
  • 1,088
  • 3
  • 15
  • 40
  • Can you confirm that your inputs are poly-lines, that you are re-build NURBS curves that interpolate those points? Assuming yes, I understand that you then want to modify the NURBS according to the rule table file, is that correct? One nice property of NURBS is that they can be transformed (translated, rotated, scaled) by transforming their control points. So your next step would be to create the transformations corresponding to the rules and apply them to the control points. That should give your the graded NURBS. No need to change knots nor weights. – cma Dec 27 '19 at 07:02
  • how to create the transformations corresponding to the rules and apply them to the control points? But the rule table file only provide the variation on the interpolate points not the control points. – Jim Green Mar 04 '20 at 12:24

0 Answers0