The opennurbs_evaluate_nurbs.h and .cpp

I am confused the two files.
How to use them?That is I wonder the function of them.
What’s the exact meaning of the word “evaluate”?

Evaluate means to compute a point on a curve or surface, given the parameter(s) for that point. The nurbs function is then evaluated at the parameter(s), giving xyz coordinate off the point.

OK,thank you menno.Your answer solved my question efficiently.
I have two other questions about the class ON_Geometry need your help.

At first, given the explaining in the openNURBS, what shows that all of openNURBS geometry classes are derived from the ON_Geometry class.But I found some classes being not included by the ON_Geometry.Such as the ON_Point,the ON_BezierCurve and the ON_NurbsCurve etc. How to understand it?

Secondly, I could not master the main meaning of the function BoundingBox() in the ON_Geometry.This is the expaining,
// Description:
// Get object’s 3d axis aligned bounding box.
// Returns:
// 3d bounding box.
// Remarks:
// Uses virtual GetBBox() function to calculate the result.
ON_BoundingBox BoundingBox() const;

How to understand it correctly?


I don’t understand the question. Please explain the problem you are trying to solve.

class ON_CLASS ON_Curve : public ON_Geometry
class ON_CLASS ON_Surface : public ON_Geometry
class ON_CLASS ON_Point : public ON_Geometry and etc.

Like these classes are derived from the class ON_Geometry.

class ON_CLASS ON_Plane
class ON_CLASS ON_Line
class ON_CLASS ON_Sphere
class ON_CLASS ON_NurbsCurve : public ON_Curve and etc.

However, these classes do not derived from the class ON_Geometry.
In my opinion, I think these classes belongs to the class ON_Geometry.

Classes such as ON_Plane, ON_Line, and ON_Sphere are intentionally designed to be fast, light weight utility classes that do not have all of the virtual functions required by classes derived from ON_Geometry.

How to use the function cast() and the dump().

I wonder the function of the two functions.

Cast is for ‘casting’ a base class to a derived class. For example:

const ON_Geometry* geometry = ...;
const ON_Curve* curve = ON_Curve::Cast(geometry);
if (curve)
    // todo...

Dump writes debug information to an ON_TextLog object. See opennurbs_textlog.h for details.

I have write a trimmed nurbs,like this

but the trimming algorithm in the example_write.cpp just trims the nurbssurface in its parametric domain.I want to obtain the trimming boundry in the nurbssurface.
That is , how to get the information of the trimming loop on the nurbssurface.

Some developers find this diagram helpful.

Loop information is stored on ON_Brep::m_L. See opennurbs_brep.h for details.


What does the “curveproxy” mean? Does it mean one curve is 2d in a plane?
I knew the edge is 3d curve in the space.But the class ON_BrepEdge is derived from the class ON_CurveProxy.If my hypothesis is correct , I think this is a bug in opennurbs.

My goal is to write a curve that is from the trimmed NURBS’ edge.

By definition, a proxy is a person authorized to act for another

In openNURBS, an ON_CurveProxy is a reference, or proxy, to an ON_Curve. Note, the underlying curve cannot be modified through the curve proxy.


No, this is not a bug.