Home
Reply
Contributor
allyoop
Posts: 6

Extend a spline surface

Hi, all.
 
I used the function api_mk_fa_spl_ctrlpts to create a FACE representing the spline surface. Then, I attemped to extend this FACE along the u or v direction. Is there any way to achieve this surface extension? The class of blend_spl_sur is likely to be the solution but I do not know how to use it.
Spatial Employee
Brian
Posts: 20

Re: Extend a spline surface

Hi,
 
Let's say you have a FACE* my_face, and you want to make a new FACE with an extended surface, and the desired extended surface parameter range is stored in the SPApar_box my_parbox. The steps are:
 
1. Copy the surface of the face.
2. Extend the surface in place using the function extend_face in the header file surextnd.hxx. This function is not documented. It can possibly return a smaller parameter range than requested, for example, if the requested extension was found to be self-intersecting.
3. Make a new face from the extended surface.
 
Code snippet:
1. surface* new_surf = my_face->geometry()->equation().make_copy();
2. SPApar_box achieved_parbox = extend_surface(*new_surf,my_parbox);
3. FACE* new_face = NULL;
   outcome out = api_make_face_from_surface(new_surf,new_face);
   check_outcome(out);
 
You will retain ownership of new_surf, and you must call ACIS_DELETE on it (new_face will own a copy of new_surf; the copy is cheap as it is use-counted).
 
Hope this helps,
Brian
 
jqs Spatial Employee
Spatial Employee
jqs
Posts: 3

Re: Extend a spline surface

Just to avoid possible confusions with step 2. This step should read as:

 

"2. Extend the surface in place using the function extend_surface in the header file surextend.hxx. …"

 

The code snippet is using the correct function though.

 

Thanks

Jakob

Contributor
allyoop
Posts: 6

Re: Extend a spline surface

Hi,
 
Thanks for your answer. The function "extend_surface" in the ACIS version (R12) which I use is a method in class "blend_sql_sur." According to the help document, it can be used in this way.
 
public virtual void extend_surface(SPAinterval new_v_range)
 
However, I still cannot figure out how to construct a object of "blend_sql_sur" and then use its function "extend_surface" to achieve the extension of a FACE.
Spatial Employee
John_S
Posts: 91

Re: Extend a spline surface

Hi Allyoop,
 
  The class "blend_spl_sur" is a derived class (from spl_sur) which implements the geometry associated with the surfaces particular to blending operations.  The method blend_spl_sur::extend_surface() is used to allow these surfaces to be extended, NOT to extend general surfaces.  The global function (NOT method) "extend_surfaces" that Brian and jqs mention is the one that should be used to extend surfaces - if the surface happens to be a blend, it will eventually call the blend_spl_sur::extend_surface() method under the covers; if it happens to be a B-spline (as is the case for your surface), it will call the appropriate B-spline extension routine.  So you should follow the procedure that Brian described in his post to extend the face corresponding to your surface.
 
  Hope that helps!
John