Eval on curves and surfaces
Types
Fields
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Functions
Detailed Description
- group a3d_evaluate
Type Documentation
-
enum A3DEAnalyticType
Tells what kind of curve has been created.
- Version
5.0
Values:
-
enumerator kA3DAnalyticNone
No Curve.
-
enumerator kA3DAnalyticCircle
Changed to circle.
-
enumerator kA3DAnalyticAlreadyCircle
Kept as a circle.
-
enumerator kA3DAnalyticLine
Changed to Line.
-
enumerator kA3DAnalyticAlreadyLine
Kept as a line.
-
enumerator kA3DAnalyticCone
Changed to Cone.
-
enumerator kA3DAnalyticAlreadyCone
Kept as a cone.
-
enumerator kA3DAnalyticCylinder
Changed to Cylinder.
-
enumerator kA3DAnalyticAlreadyCylinder
Kept as a cylinder.
-
enumerator kA3DAnalyticPlane
Changed to Plane.
-
enumerator kA3DAnalyticAlreadyPlane
Kept as a plane.
-
enumerator kA3DAnalyticSphere
Changed to Sphere.
-
enumerator kA3DAnalyticAlreadySphere
Kept as a sphere.
-
enumerator kA3DAnalyticTorus
Changed to Torus.
-
enumerator kA3DAnalyticAlreadyTorus
Kept as a torus.
Function Documentation
-
A3DStatus A3DCrvGetInterval(const A3DCrvBase *pCrv, A3DIntervalData *pInterval)
Function to get a curve parametric interval.
- Return values:
A3D_SUCCESS –
- Returns:
A3D_SUCCESS
on success, or an error code on failure
-
A3DStatus A3DCrvEvaluate(const A3DCrvBase *pCrv, A3DDouble dParameter, A3DUns32 uiNbDerivatives, A3DVector3dData *pPointAndDerivatives)
Function to evaluate a point and the derivatives of a curve at a parameter.
Derivatives are stored in the following order:
pPointAndDerivatives size must be equal to (uiNbDerivatives+1):\li With uiNbDerivatives = 0: Point \li With uiNbDerivatives = 1: Point, First Derivative \li With uiNbDerivatives = 2: Point, First Derivative, Second Derivative
size = 1 if uiNbDerivatives=0
size = 2 if uiNbDerivatives=1;
size = 3 if uiNbDerivatives=2;
- Version
4.0
Warning
The number of derivatives must be less than or equal to 2.
- Return values:
A3D_SUCCESS –
A3D_ERROR –
- Returns:
A3D_SUCCESS
on success, or an error code on failure
-
A3DStatus A3DCrvEvaluatePointAndNormal(A3DCrvBase const *psCrv, A3DDouble dParameter, A3DUns32 uiNbSurfaces, A3DSurfBase **ppsSurfaces, A3DUns32 uiNbDerivatives, A3DVector3dData *psPointAndDerivatives, A3DVector3dData *psNormal)
Function to evaluate a point and the derivatives of a curve at a parameter, then the normal of this point to each of the given surfaces.
Derivatives are stored in the following order:
psPointAndDerivatives size must be equal to (uiNbDerivatives+1):\li With uiNbDerivatives = 0: Point \li With uiNbDerivatives = 1: Point, First Derivative \li With uiNbDerivatives = 2: Point, First Derivative, Second Derivative
size = 1 if uiNbDerivatives=0
size = 2 if uiNbDerivatives=1;
size = 3 if uiNbDerivatives=2; psNormal size must be equal to the uiNbSurfaces, the number of given surfaces. Life time of psPointAndDerivatives and psNormal must be handled by the user.
- Version
8.2
Warning
The number of derivatives must be less than or equal to 2.
- Return values:
A3D_SUCCESS –
A3D_ERROR –
- Returns:
A3D_SUCCESS
on success, or an error code on failure
-
A3DStatus A3DCrvIsPeriodic(const A3DCrvBase *pCrv, A3DBool *pbIsPeriodic)
Function to determine if a curve is periodic.
- Version
10.1
- Parameters:
pCrv – [in] The input curve.
pbIsPeriodic – [out] The returned value.
- Return values:
A3D_SUCCESS –
A3D_ERROR –
A3D_INVALID_ENTITY_NULL –
A3D_INVALID_ENTITY_TYPE –
- Returns:
A3D_SUCCESS
on success, or an error code on failure
-
A3DStatus A3DSurfGetDomain(const A3DSurfBase *pSrf, A3DDomainData *pDomain)
Function to get a surface parametric domain.
- Return values:
A3D_SUCCESS –
- Returns:
A3D_SUCCESS
on success, or an error code on failure
-
A3DStatus A3DSurfEvaluate(const A3DSurfBase *pSurf, const A3DVector2dData *pUVParameter, A3DUns32 uiNbDerivatives, A3DVector3dData *pPointAndDerivatives)
Evaluate a point and its derivative on a surface.
This function evaluates the point and its derivatives (1st and 2nd) on the surface
pSurf
given thepUVParameter
coordinates.- Version
4.0
Reading the Result
If the function successfully evaluates
pUVParameter
onpSurf
, the memory atpPointAndDerivatives
is filled with a row-major 2D array representing the derivatives in the order of u and v.u
v
Content
Description
uiNbDerivatives
0
0
Point
The evaluated point at
pUVParameter
0
1
V
First derivative with respect to v
>= 1
0
2
V2
Second derivative with respect to v
== 2
1
0
U
First derivative with respect to u
>= 1
1
1
UV
Mixed first derivates (u and v)
== 2
1
2
U2
Second derivative with respect to u
== 2
To retrieve the value in the table given the partial derivative orders
u
andv
use:pPointAndDerivatives[u * (uiNbDerivatives+1) + v]
When
uiNbDerivatives
is 0, the table contains a single element:0
0
Point
When
uiNbDerivatives
is 1, the array has 2 rows and 2 columns:0
1
0
Point
V
1
U
When
uiNbDerivatives
is 2, the table has 3 rows and 3 columns:0
1
2
0
Point
V
V2
1
U
UV
2
U2
Memory Layout
As a 2D array expressed in a C-style array, the memory layout for
pPointAndDerivatives
depends on the value ofuiNbDerivatives
:The memory layout for
pPointAndDerivatives
is as follows:uiNbDerivatives
0
1
2
3
4
5
6
7
8
0
Point
1
Point
V
U
2
Point
V
V2
U
UV
U2
The values left blank in this table correspond to uninitialized data. Dereferencing them is unsupported behavior.
Memory Management
The pointer
pPointAndDerivatives
must reference an already initialized array of A3DVector3dData. The allocated memory should be sufficient to store all results, and the required size depends on the value ofuiNbDerivatives
:uiNbDerivates
= 0: 1 element.uiNbDerivates
= 1: 4 elements.uiNbDerivates
= 2: 9 elements.
pPointAndDerivatives
must point to an allocated memory ofsizeof(A3DVector3dData * (uiNbDerivates + 1) * (uiNbDerivates + 1))
.A3DSurfEvaluate does not perform bound checking. Therefore, it is the caller’s responsibility to ensure that the allocated memory is sufficient.
- Parameters:
pSurf – The surface on which the point will be evaluated.
pUVParameter – The coordinates of the point to evaluate, expressed in UV parameeters on
pSurf
.uiNbDerivatives – The number of derivatives to evaluate. This value cannot exceed 2.
pPointAndDerivatives – The resulting evaluation, stored in this pointer.
- Return values:
A3D_SUCCESS –
A3D_ERROR – if
uiNbDerivatives
> 2A3D_ERROR – if
pSurf
is 0A3D_ERROR – if
pUVParameter
is 0A3D_ERROR – if
pPointAndDerivatives
is 0A3D_ERROR – if evaluation is not possible.
- Returns:
A3D_SUCCESS
on success, or an error code on failure
-
A3DStatus A3DSurfIsDegenerated(const A3DSurfBase *pSurf, const A3DVector2dData *pUVParameter, A3DDouble dTolerance, A3DBool *pbIsDegenerated, A3DBool *pbUDirection)
Function to determine if a surface is degenerated at a point.
- Version
9.0
- Parameters:
pSurf – [in] The input surface.
pUVParameter – [in] The coordinates of the point.
dTolerance – [in] The tolerance of the test.
pbIsDegenerated – [out] The returned value.
pbUDirection – [out] The direction of the degeneracy if a degeneracy is detected (true = U direction, and false = V direction).
- Return values:
A3D_SUCCESS –
A3D_ERROR –
- Returns:
A3D_SUCCESS
on success, or an error code on failure
-
A3DStatus A3DSurfIsPeriodic(const A3DSurfBase *pSrf, A3DBool *pbUIsPeriodic, A3DBool *pbVIsPeriodic)
Function to determine if a surface is periodic.
- Version
10.1
- Parameters:
pSrf – [in] The input surface.
pbUIsPeriodic – [out] The returned value for u direction.
pbVIsPeriodic – [out] The returned value for v direction.
- Return values:
A3D_SUCCESS –
A3D_ERROR –
A3D_INVALID_ENTITY_NULL –
A3D_INVALID_ENTITY_TYPE –
- Returns:
A3D_SUCCESS
on success, or an error code on failure
-
A3DStatus A3DSurfIsG1Continuous(const A3DSurfBase *pSurf, const A3DVector2dData *pUVParameter, A3DDouble dAngleTolerance, A3DBool *pbUG1Continuous, A3DBool *pbVG1Continuous)
Function to determine if a surface is G1 discontinuous at a point.
- Version
9.0
- Parameters:
pSurf – [in] The input surface.
pUVParameter – [in] The coordinates of the point.
dAngleTolerance – [in] The derivative angle tolerance.
pbUG1Continuous – [out] The returned value for u direction.
pbVG1Continuous – [out] The returned value for v direction.
- Return values:
A3D_SUCCESS –
A3D_ERROR –
- Returns:
A3D_SUCCESS
on success, or an error code on failure
-
A3DStatus A3DSimplifyCurveWithAnalytics(const A3DCrvBase *pCurve, A3DDouble dTol, A3DUns32 uNbRecognizedType, A3DEEntityType const *pOptRecognizedType, A3DCrvBase **pAnalyticCurve, A3DEAnalyticType *peAnalyticType)
Function to get curves as analytic (line or circle) according to a certain tolerance.
Use A3DEntityDelete to delete the analytic curve after using it. Recognized curve type are: Linear Curve Circular Curve If uNbRecognizedType and pOptRecognizedType are defined, A3DSimplifyCurveWithAnalytics recognizes only given types.
- Version
7.0
Warning
must be deleted by the user.
- Parameters:
pCurve – [inout] The input curve.
dTol – [in] The tolerance.
uNbRecognizedType – [in] Size of array pOptRecognizedType.
pOptRecognizedType – [in] Optional type of curve we want to recognize.
pAnalyticCurve – [out] The new analytic curve.
peAnalyticType – [out] The type of analytic curve.
- Return values:
A3D_SUCCESS – if an analytic has been created
A3D_ERROR –
- Returns:
A3D_SUCCESS
on success, or an error code on failure
-
A3DStatus A3DSimplifyCurveWithAnalyticsFromCoEdge(const A3DTopoCoEdge *pCoEdge, A3DDouble dTol, A3DUns32 uNbRecognizedType, A3DEEntityType const *pOptRecognizedType, A3DCrvBase **pAnalyticCurve, A3DEAnalyticType *peAnalyticType)
Function to get curves as analytic (line or circle) according to a certain tolerance Try to use 3D curves from Edges if exist, otherwise use UV Curves on CoEdge.
Use A3DEntityDelete to delete the analytic curve after using it. Recognize curve type are: Linear Curve Circular Curve If uNbRecognizedType and pOptRecognizedType are defined, A3DSimplifyCurveWithAnalytics recognizes only given types.
- Version
7.0
Warning
must be deleted by the user.
- Parameters:
pCoEdge – [in] The input coEdge.
dTol – [in] The tolerance.
uNbRecognizedType – [in] Size of array pOptRecognizedType.
pOptRecognizedType – [in] Optional type of curve we want to recognize.
pAnalyticCurve – [out] The new analytic curve.
peAnalyticType – [out] The type of analytic curve.
- Return values:
A3D_SUCCESS – if an analytic has been created
A3D_ERROR –
- Returns:
A3D_SUCCESS
on success, or an error code on failure
-
A3DStatus A3DSimplifySurfaceWithAnalytics(A3DSurfBase const *pSrf, A3DDouble dTol, A3DUns32 uNbRecognizedType, A3DEEntityType const *pOptRecognizedType, A3DSurfBase **pAnalyticSurface, A3DEAnalyticType *peAnalyticType)
Function to get surface as analytic according to a certain tolerance.
Use A3DEntityDelete to delete the analytic surface after using it. Recognized surface type are Conic Surface Cylindrical Surface Plane Surface Spherical Surface Toric Surface If uNbRecognizedType and pOptRecognizedType are defined, A3DSimplifySurfaceWithAnalytics recognizes only given types.
- Version
7.0
Warning
must be deleted by the user.
- Parameters:
pSrf – [in] The input surface.
dTol – [in] Tolerance.
uNbRecognizedType – [in] Size of array pOptRecognizedType.
pOptRecognizedType – [in] Optional type of surface we want to recognize.
pAnalyticSurface – [out] The new analytic surface.
peAnalyticType – [out] The type of analytic surface.
- Return values:
A3D_SUCCESS –
A3D_INVALID_ENTITY_NULL –
A3D_INVALID_ENTITY_TYPE –
A3D_ERROR –
- Returns:
A3D_SUCCESS
on success, or an error code on failure
-
A3DStatus A3DSurfEvaluateNormal(const A3DSurfBase *pSurf, const A3DVector2dData *pUVParameter, A3DVector3dData *pNormal)
Function to evaluate a normal on a surface.
- Parameters:
pSurf – [in] The input surface.
pUVParameter – [in] The input UV point to evaluate the normal of the surface.
pNormal – [out] The normal of the surface at the UV parameter.
- Return values:
A3D_SUCCESS –
A3D_INVALID_DATA_STRUCT_NULL –
A3D_INVALID_DATA_STRUCT_SIZE –
A3D_INVALID_ENTITY_TYPE –
A3D_ERROR –
- Returns:
A3D_SUCCESS
on success, or an error code on failure
-
A3DStatus deprecated_A3DGetCurveAsAnalytic(const A3DCrvBase *pCurve, double dTol, A3DCrvBase **pAnalyticCurve, A3DEAnalyticType *peAnalyticType)
Function to get curves as analytic (line or circle) according to a certain tolerance.
Use A3DEntityDelete to delete the analytic curve after using it.
- Deprecated:
Use A3DSimplifyCurveWithAnalytics instead. This will be removed in version 2026.1.0.
- Version
5.0
- Return values:
A3D_SUCCESS – if an analytic has been created
A3D_ERROR –
- Returns:
A3D_SUCCESS
on success, or an error code on failure
-
A3DStatus deprecated_A3DGetCurveAsAnalyticFromCoEdge(const A3DTopoCoEdge *pCoEdge, double dTol, A3DCrvBase **pAnalyticCurve, A3DEAnalyticType *peAnalyticType)
Function to get curves as analytic (line or circle) according to a certain tolerance Try to use UV curves from Edges if exist, otherwise use 3D Curves.
Use A3DEntityDelete to delete the analytic curve after using it.
- Deprecated:
use A3DSimplifyCurveWithAnalyticsFromCoEdge instead. This will be removed in version 2026.1.0.
- Version
5.0
- Return values:
A3D_SUCCESS – if an analytic has been created
A3D_ERROR –
- Returns:
A3D_SUCCESS
on success, or an error code on failure
-
A3DStatus deprecated_A3DGetSurfaceAsAnalytic(A3DSurfBase const *pSrf, double dTol, A3DSurfBase **pAnalyticSurface, A3DEAnalyticType *peAnalyticType)
Function to get surface as analytic according to a certain tolerance.
Use A3DEntityDelete to delete the analytic surface after using it. Recognized surface type are: Conic Surface Cylindrical Surface Plane Surface Spherical Surface Toric Surface
- Deprecated:
use A3DSimplifySurfaceWithAnalytics instead. This will be removed in version 2026.1.0.
- Version
5.0
Warning
must be deleted by the user
- Parameters:
pSrf – [in] The input surface
dTol – [in] Tolerance
pAnalyticSurface – [out] The new analytic surface.
peAnalyticType – [out] The type of analytic surface
- Return values:
A3D_SUCCESS –
A3D_INVALID_ENTITY_NULL –
A3D_INVALID_ENTITY_TYPE –
A3D_ERROR –
- Returns:
A3D_SUCCESS
on success, or an error code on failure