[cgma-dev] r1546 - cgm/trunk/geom

Jason Kraftcheck kraftche at cae.wisc.edu
Fri Jan 18 16:20:01 CST 2008


Jason Kraftcheck wrote:
> janehu at mcs.anl.gov wrote:
>> Author: janehu
>> Date: 2008-01-18 15:50:04 -0600 (Fri, 18 Jan 2008)
>> New Revision: 1546
>>
>> Modified:
>>    cgm/trunk/geom/RefFace.cpp
>> Log:
>> Adding comments for RefFace change.
>>
>> Modified: cgm/trunk/geom/RefFace.cpp
>> ===================================================================
>> --- cgm/trunk/geom/RefFace.cpp	2008-01-18 21:46:33 UTC (rev 1545)
>> +++ cgm/trunk/geom/RefFace.cpp	2008-01-18 21:50:04 UTC (rev 1546)
>> @@ -1486,6 +1486,9 @@
>>  
>>  CubitStatus RefFace::get_point_normal( CubitVector& origin, CubitVector& normal )
>>  {
>> +   // non-planar surface can calculate for point normal too. If certain
>> +   //geometry engine can't provide normal for non-planar surfaces, check 
>> +   //should be done in the geometry engine level.
>>     //if( is_planar() == CUBIT_FALSE)
>>     //   return CUBIT_FAILURE;
> 
> Yes, it is possible to return a normal for non-planar surfaces.  The
> RefFace::normal_at function is there to query that.  The above function is
> intended to query the geometric definition for a planar surface.  At what
> location on the non-planar surface do you return the normal?
> 

I don't think I explained that very well.  I'll try again:

The intended purpose of this function is to, for a surface that is planar,
get a point and vector defining the location of the plane.  For non-planar
surfaces it is possible to return the definition of some arbitrary tangent
plane, but I don't see why anyone would want that.

This function is largely redundant.  One could call is_planar() and if
that returns true, then center_point() and normal_at() to get the
definition of the plane.  However, some surfaces types (facet-based,
composite, etc.) may implement this function if the surface is
approximately planar.

- jason




More information about the cgma-dev mailing list