B-Curves and B-Surfaces   

<<< Euler Operations Chapters The Mathematical Form of B-Geometry >>>

Contents

[back to top]


25.1 Introduction

Parasolid contains fully integrated B-curves and B-surfaces. By this, we mean you can attach the curves and surfaces to edges and faces, and then apply any operation offered through the PK Interface to them, from Boolean operations to the attachment of attributes.

B-geometry is parametrically defined piecewise polynomial or rational polynomial geometry which is represented in Parasolid as B-spline (NURBS) curves and surfaces.

[back to top]


25.2 Explicit and automatic creation

B-curve and B-surface geometry may be made either explicitly or automatically in Parasolid:

B-surfaces can be combined with existing bodies by means of:

There is no concept of a 'primitive free form solid', in the way that, for example, spherical surfaces correspond to solid spheres. Therefore a sequence of modeling operations are required to produce a solid body incorporating B-curve and B-surface geometry. Useful sequences of operations are described in a later section.

[back to top]


25.3 Surfaces in Parasolid

Surfaces in Parasolid are of one of the following general types:

The first two types are implicit surfaces; they are defined as the solutions to an implicit equation of the form f( x)=0, where x is a point in space and f is a function of x. The function f actually divides space into two regions: points for which f( x) is positive, and points for which it is negative. The surface is the boundary between the two regions. It is always closed, like a sphere, or infinite like a plane or cylinder.

B-surfaces are different, in that they are only defined over a finite region of space; they have boundaries and do not necessarily divide space into distinct regions.

In a similar way, B-curves are bounded. Generated surfaces are surfaces which may be produced when sweeping or spinning. Swept surfaces are infinite in the sweep direction and spun surfaces closed in the spin direction. The form of the other direction depends on the geometry of the swept or spun curve.

[back to top]


25.4 Creating B-curve and B-surface geometry

B-curves and B-surfaces may be created in several ways:

[back to top]

25.4.1 B-spline data

A curve or surface may be created from B-spline control points and knot vectors using PK_BCURVE_create and PK_BSURF_create respectively. Both rational and non-rational B-spline curves and B-surfaces may be created this way. The diagram below shows a B-spline curve with its control polygon.

 

Figure 25-1 B-spline curve

The curve or surface can be forced to be periodic. A periodic curve must be closed and meet itself smoothly. A surface can be periodic in either u or v directions giving a "tubular" surface, or in both directions giving a "toroidal" surface.

 

Figure 25-2 A periodic surface

[back to top]

25.4.2 Piecewise data

PK_BCURVE_create_piecewise and PK_BSURF_create_piecewise create a curve or surface from piecewise data. The data may be in several forms, namely Bezier, Hermite, polynomial or Taylor series. By 'piecewise' it is meant that each segment of a curve or patch of a surface is independent of the other segments or patches (except that the curve or surface must be position (G0) continuous across adjacent segments or patches). The curve or surface can be either rational or non-rational.

 

Figure 25-3 A surface created from piecewise data

[back to top]

25.4.3 Combining B-curves

There are two functions which may be used for joining B-curves together, PK_BCURVE_combine and PK_BCURVE_join. These functions behave in essentially the same manner, they both combine a sequence of curves which meet head to tail. In general, the resultant curve is parameterized such that, where possible, joins at which the curves are G1 continuous are made C1 continuous. This property may be overridden in PK_BCURVE_join by supplying the option structure. This allows specification of knot values which may be used in preference to those computed to establish the continuity condition. The value of the snap_tolerance is used to control whether a supplied knot value is used in preference to the computed one. The resultant curve is parameterized on the interval [0, 1].

[back to top]

25.4.4 Sweeping and spinning

A previously created B-curve may be swept or spun into a B-surface using PK_BCURVE_sweep and PK_BCURVE_spin, respectively.

When a B-curve is spun, the angle of spin must not be greater than 2π or less than -2π.

 

Figure 25-4 A surface created by spinning a B-curve

[back to top]

25.4.5 Conic conversion

PK_CURVE_make_bcurve produces an exact B-curve representation of a portion of the input curve if possible, otherwise it produces an approximation.

Similarly PK_SURF_make_bsurf produces an exact B-surface representation of a portion of the input surface if possible, otherwise it produces an approximation.

[back to top]

25.4.6 Splining

A B-curve can be created by interpolating a set of points using PK_BCURVE_create_splinewise, similarly a B-surface may be created by interpolating a mesh of points using PK_BSURF_create_splinewise. In general, Parasolid fits a piecewise cubic curve or surface through the points which are continuous in slope and curvature. This is called splining. The points are at the ends of the segments of the curve or the corners of the patches of a surface.

 

Figure 25-5 A B-curve created by interpolating a set of points

Various controls can be placed on the splining operation to define the shape of the curve or surface. These are:

 

Figure 25-6 A periodic surface in either the u or v directions

 

Figure 25-7 A curve with natural end conditions - zero curvature

 

Figure 25-8 A curve with specified tangents at the ends

 

Figure 25-9 A surface clamped along a boundary by specifying the first derivatives

 

Figure 25-10 A curve with its shape changed by supplying a knot vector

[back to top]

25.4.7 Curve fitting

One or more B-curves can be created simultaneously by tolerantly fitting to sets of points and tangents using PK_BCURVE_create_by_fitting. Parasolid fits piecewise cubic curves such that they lie within the supplied distance, and optionally angular, tolerance of the sample data, and are continuous in their first derivatives. Sample data for the curves is provided by the internal Parasolid Chain-of-curves evaluator.

 

Figure 25-11 A B-curve created by tolerantly fitting a set of points

Various controls can be placed on the curve fitting operation. These are:

 

Figure 25-12 A B-curve fitted using break-parameters

 

Figure 25-13 A B-curve fitted to a chain of curves

[back to top]

25.4.8 Lofting

A B-surface can be created by interpolating a set of pre-defined B-curves using PK_BCURVE_make_bsurf_lofted. This is called lofting.

The surface is continuous up to second order in the loft direction and each curve lies along a constant v parameter line.

 

Figure 25-14 A B-surface created by lofting

Various controls can be put on the lofting to alter the shape of the lofted surface. Some of these are mutually exclusive. For example, asking for both clamped and periodic end conditions is invalid. The controls are:

 

Figure 25-15 A lofted surface that is degenerate at both ends

 

Figure 25-16 Curves with and without amalgamation

 

Figure 25-17 A degenerate segment added to a curve

[back to top]

25.4.9 Constant parameter curves

A constant parameter B-curve can be extracted from a B-surface in its U or V direction using PK_BSURF_make_bcurve_u_isoparam or PK_BSURF_make_bcurve_v_isoparam.

PK_SURF_make_curve_u_isoparam and PK_SURF_make_curve_v_isoparam can also be used to extract constant U or V parameter curves from a surface (including B-surface types). These try to simplify the extracted constant parameter curve to be in the form of an analytic curve.

[back to top]

25.4.10 Re-parameterizing curves

PK_CURVE_make_approx creates a re-parameterized approximation of a curve. You can use this function to clean up a badly-parameterized curve without changing the curve's position in 3-space, as shown in Figure 25-18. Two types of parameterization are possible:

 

Figure 25-18 Re-parameterizing a badly parameterized curve

Whenever possible, PK_CURVE_make_approx uses the same type of geometry in the new curve as was used in the original curve. For example, re-parameterizing a straight line or a circular interval creates a new line or circle, respectively. If it is not possible to use the same type of geometry, then a b-curve is used to approximate the original.

PK_CURVE_make_approx takes a curve, an interval of that curve for which an approximation is to be created, and a set of options. It returns a new curve, a new interval, and a boolean that indicates whether or not the new curve uses the same geometry as the original.

The options that can be set are:

 

Option Description

approx_type

The type of approximation to be used on the new curve. This can have two values:

  • PK_CURVE_approx_arclength_c - create a curve with arclength approximation (default)
  • PK_CURVE_approx_even_c - create a curve with even approximation

tolerance

The tolerance within which a new curve is created. Default: 0.00001.

This tolerance represents the fit through a series of sample points on the original curve. Values smaller than the default may create an excessive number of vertices on the resulting curve.

[back to top]

25.4.11 Isocline curves and isocline surfaces

Isocline curves and isocline surfaces are represented in Parasolid by existing geometric entities. This means that, in the general case, Parasolid's representation is approximate and therefore a tolerance argument is used with the functions described in this section. The tolerance is the maximum 3-space deviation allowed between mathematical isocline geometry and the representation.

Isocline curves are normally be represented by SP-curves. The basis surface for the SP-curve is the supplied surface on which isocline curves are sought.

Isocline curves

Parasolid has adopted a boundary definition of an isocline curve. The direction in which the curve parameter along an isocline curve increases is defined as:

Hold the surface with its normal pointing upwards and move along the isocline curve in the direction from the start to the end, then the surface is steep on the right and not steep on the left.

 

Note: A position on a surface where any surface tangent makes an angle greater than or equal to zero, and less than the draft angle, with the draw direction is said to be steep.

To create isocline curves use PK_SURF_make_cus_isocline which, in addition to its primary task of creation, also returns whether or not the surface is steep.

Figure 25-19 illustrates contour-map style diagrams where families of isocline curves have been generated for an arithmetic progression of draft angles and scribed onto their relevant faces.

 

Figure 25-19 Contour-map style diagrams

Isocline surfaces

Through any curve there are, in general, two isocline surfaces, which are distinguished as follows:

If you walk along the curve in the direction from the start parameter to end parameter with your head pointing in the draw direction, then there are two isocline surfaces below you: one to your left and one to your right. These surfaces are called the left surface and the right surface.

To create an isocline surface that passes through a given curve use PK_CURVE_make_surf_isocline.

Isocline surfaces are defined by the envelope of a conical cutter whose axis is the draw direction tracing out the reference curve being drafted through at its tip. There are two such resultant surfaces, see Figure 25-20 for which Parasolid has adopted the previous convention to choose between the two solutions.

 

Figure 25-20 Two isocline surfaces and a cutter

Though it is possible to control the range of the isocline surface along the draw direction, the function automatically trims this range back in order to prevent the surface becoming degenerate, see Figure 25-21 This trimming process attempts to ensure that the surface does not locally self-intersect.

 

Figure 25-21 Trimmed isocline surface

If no surface exists which can satisfy the conditions, e.g. the given curve is steep, then there is no solution and the value PK_ENTITY_null is returned.

[back to top]


25.5 Modifying B-curves and B-surfaces

A parameter or parameter line can be added to a curve or surface using PK_BCURVE_add_knot or PK_BSURF_add_u_knot/PK_BSURF_add_v_knot. This has the effect of increasing the number of segments on a curve or the number of rows or columns of a surface.

A curve or surface may be negated using PK_BODY_reverse_orientation. This has the effect of reversing the curve direction or surface normal.

[back to top]


25.6 Entering curves and surfaces into Parasolid

There are a few restrictions placed on curves and surfaces created using these methods. These are to ensure that the curve or surface does not self-intersect or have a cusp. Any function which requires a surface that has been checked performs these checks. These checks are only be performed once, with the result being stored in the data structure. PK_GEOM_check can be used to test if the surface is acceptable to Parasolid for modeling purposes. Full details of the restrictions on parametric curves and surfaces are given in a later section.

For reasons of performance it is recommended that any rational curve or surface whose weights are all identical be entered as non-rational and the weights ignored.

[back to top]

25.6.1 Creating sheet bodies from B-curves and B-surfaces

A B-curve or B-surface, or a portion of one, can be made into a wire or sheet body by PK_CURVE_make_wire_body_2 and PK_SURF_make_sheet_body. The form of the resulting body is dependent on whether or not the B-curve or B-surface passes the composite geometry checks. When it does not pass the composite geometry checks Parasolid splits it as required in order to produce the minimum number of edges/faces possible.

[back to top]


25.7 Modeling with B-curve and B-surface geometry

This section describes some of the ways of building models incorporating B-geometry. It assumes that the user has already created B-curves or B-surfaces, and input them to Parasolid as wires or sheets.

[back to top]

25.7.1 Sweeping and spinning

All wires and sheets, except for foreign geometry, can be swept or spun using PK_BODY_spin and PK_BODY_sweep, in the same way as any other wire or sheet.

A wire is swept or spun into a sheet, and a sheet into a solid. It is also possible to make a profile by scribing B-curves onto a face until a closed loop is formed, then sweeping or spinning the profile to make a solid body.

Examples

Example 1:

Sheet body made by spinning a composite B-curve wire

 

Figure 25-22 A sheet body created by spinning a composite B-curve wire

Example 2:

Solid body made by sweeping a planar profile made up of B-curves and straight lines

 

Figure 25-23 A solid body created by sweeping a planar profile

Example 3:

Solid body made by spinning a B-surface sheet

 

Figure 25-24 A solid body created by spinning a B-surface sheet

[back to top]

25.7.2 Tweaking

The tweak operation, supported by PK_FACE_replace_surfs, can be used to replace the surface of a face by a B-surface. It automatically extends or reduces the adjacent faces, if possible, to meet the B-surface within a specified tolerance, provided this does not change the topology.

Top face of cylinder tweaked to a B-surface:

 

Figure 25-25 Tweaking the top face of a cylinder to a B-surface

[back to top]

25.7.3 Capping

If a sheet created from a B-surface is closed in one direction, it is often possible to make a solid body by 'capping' the holes in the body. This requires the edge loops surrounding the holes to be simple enough to be fitted by a single surface - for example, if the edges are coplanar then a plane is used to cover the hole. If a wire body is spun about an axis through a full rotation, the edge loops are always coplanar. The function which supports capping is PK_FACE_make_solid_bodies.

A special case is when the surface sheet is already closed through being degenerate: (like a lemon), or because it is closed in both directions (like a torus). In this case, there are no holes to cover, and PK_FACE_make_solid_bodies automatically creates a solid from the closed sheet.

Solid made from the faces of the spun sheet body seen earlier, with the ends capped with planar surfaces:

 

Figure 25-26 Solid created by capping the ends of the sheet body in Fig. 10-18

Non-circular torus made from a closed sheet body whose only surface is a doubly periodic B-surface:

 

Figure 25-27 Non-circular torus created from a closed sheet body

[back to top]

25.7.4 Subtracting sheet from solid

The most useful and reliable way of introducing B-surfaces to a solid model is by using the subtract operation, supported by PK_BODY_section_with_sheet or PK_BODY_boolean. This can be performed between a solid body and a B-surface sheet body. The sheet body must be sufficiently large to cut through the solid completely, otherwise the function fails. It may be necessary to extend the sheet body to cut the solid in the required manner; PK_FACE_delete, with the PK_FACE_heal_grow_from_parent_c option, or PK_BODY_sweep, can be used to do this. Examples of the use of each of these sequences are shown below.

Block sectioned by subtracting a B-surface sheet body. Resulting bodies moved apart.

 

Figure 25-28 Sectioning a block by subtracting a B-surface sheet body

In this example the solid needs to be extended before the sheet can be subtracted.

 

Figure 25-29 Tweaking a solid body to a B-surface

The first method is to remove the top planar face using PK_FACE_delete with the grow option, and then subtract the sheet to produce this:

 

Figure 25-30 Deleting the top face using the grow option

The second method is to sweep the top face before subtracting, which produces this:

 

Figure 25-31 Sweeping the top face

[back to top]

25.7.5 Sewing

Sewing is the final method for building B-surface sheets into solids. For further information on this see Chapter 36, "Sheet Sewing".

[back to top]

25.7.6 Restrictions on B-curves and B-surfaces

There are a number of restrictions on the shape of B-curves and B-surfaces which can be made into wires or sheets. Some, such as the restriction on self-intersection, are designed to prevent the creation of invalid bodies. Others are designed to limit the complexity of curves and surfaces.

Curve restrictions

The following restrictions apply to B-curves:

In addition, if a B-curve is to be attached to an edge:

If the B-curve does not obey these restrictions then PK_CURVE_make_wire_body_2 splits it into two or more curves.

Surface restrictions

The restrictions on surfaces are divided into two groups - those on the shape of the composite surface and restrictions on surface degeneracies. Degenerate (i.e. two or three sided) B-surfaces are allowed, as are surfaces with partially degenerate boundaries, but only in certain configurations.

Restrictions on B-surface shape

The following restrictions apply to the shape of a B-surface:

In addition if a B-surface is to be attached to a face the following composite geometry restrictions apply:

If the B-surface does not obey these restrictions then PK_SURF_make_sheet_body splits it into two or more surfaces.

Restrictions on degeneracies

Degenerate B-surfaces are allowed, but only in certain situations. A degeneracy is a place where a region of the parameter space of the surface reduces to a single point of Cartesian space. In this region one or both first partial derivatives are zero. The restrictions on such degeneracies are:

[back to top]

25.7.7 Restrictions on use

The restrictions on the use of B-surfaces arise mainly from the property that the surfaces are bounded. This implies that any operation which requires a surface to be extended beyond its boundaries may not be possible. A face on a surface patch often has boundaries inside the patch boundaries; if so, the face may be extended to the patch boundary, but no further.

 

Figure 25-32 Extending a face to the patch boundary

An example of the manifestations of this restriction is that you cannot transform the side of this block outwards, because it is limited by the boundary of the B-surface on the top face.

Coincident regions

Parasolid does not support regions of coincidence. Therefore when these occur an error message is returned from the relevant boolean and intersection functions.

 

Figure 25-33 Coincident regions

[back to top]


25.8 Offset surfaces

For the purpose of Parasolid an offset surface is defined as a smooth, G1 continuous surface, from any point of which the minimum distance to the underlying surface is exactly equal to the required offset distance.

An offset surface may be introduced into a solid body by:

 

Figure 25-34 Using an offset surface to split a solid

 

Figure 25-35 Offsetting faces by tweaking

Offset surfaces can only be created provided the result contains no:

As it is not possible to model with self intersecting surfaces Parasolid checks the geometry of the underlying surface to ensure that the resulting surface is not self intersecting before creating the offset surface from any surface other than a B-surface. This check is completed regardless of whether PK_SESSION_set_check_self_int has been called.

If the surface to be offset is a B-surface, then its offset may only be created if it is capable of passing the composite geometry checks outlined in PK_GEOM_check, however checks for self intersection are not made. The created offset surface may be checked for self intersection by explicitly calling PK_SESSION_set_check_self_int and PK_GEOM_check.

Wherever possible the surface created are not explicitly of type offset surface but of one of the simple analytic types. For example, a plane always offsets to a plane. This rule also applies where a simple type includes all of the proper offset surface, but extends beyond the region where the offset surface would be meaningful. An example of this is a cone offset outwards. Although the offset surface strictly only extends to a truncated cone, PK_OFFSET_create returns the cone surface type, as that includes all of the desired surface.

Therefore it is only the following underlying surface types that lead to an offset surface type:

If a sequence of offset operations results in the original surface being recreated, Parasolid automatically discards all the offset surface data and uses the original surface data.

[back to top]

25.8.1 Creating an offset surface

Their are two offsetting functions available through the PK interface:

[back to top]

25.8.2 Introducing offset surfaces into a model

There are three methods of introducing offset surfaces into a model. These are:

Restrictions on offset surfaces

The following restrictions apply to offset surfaces

 

[back to top]

<<< Euler Operations Chapters The Mathematical Form of B-Geometry >>>