Rhino C++ API  8.14
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
ON_BendFaceConstraint Class Reference

#include <opennurbs_brep.h>

Public Member Functions

 ON_BendFaceConstraint ()
 
bool SetClosedSurfaceConstraint (ON_Surface::ISO surface_side)
 
bool SetCurveConstraint (const ON_BrepTrim *trim, const ON_Curve *curve_constraint, double tolerance)
 
bool SetPointConstraint (double s, double t, ON_3dPoint point)
 
bool SetSingularConstraint (ON_Surface::ISO surface_side, ON_3dPoint point)
 
bool SetSurfaceConstraint (const ON_BrepTrim *trim, const ON_Surface *surface_constraint, double tolerance)
 
bool SetSurfaceSeamFromEndsConstraint (ON_Surface::ISO surface_side)
 
bool SetSurfaceSideConstraint (ON_Surface::ISO surface_side, const ON_Curve *curve_constraint, double tolerance)
 
bool SetSurfaceSideConstraint (ON_Surface::ISO surface_side, const ON_Surface *surface_constraint, double tolerance)
 

Static Public Member Functions

static int CompareComponentIndex (const class ON_BendFaceConstraint *a, const class ON_BendFaceConstraint *b)
 

Public Attributes

int m_brep_trim_index
 m_brep_trim_index identifies a trim on the face being bent More...
 
unsigned int m_contraint_type
 
const ON_Curvem_curve_constraint
 
ON_3dPoint m_point
 
unsigned char m_rev_curve_constraint
 
const ON_Surfacem_surface_constraint
 
double m_surface_parameters [2]
 
double m_tolerance
 

Constructor & Destructor Documentation

◆ ON_BendFaceConstraint()

ON_BendFaceConstraint::ON_BendFaceConstraint ( )

Member Function Documentation

◆ CompareComponentIndex()

static int ON_BendFaceConstraint::CompareComponentIndex ( const class ON_BendFaceConstraint a,
const class ON_BendFaceConstraint b 
)
static

Description: Compare function for sorting and searching arrays of ON_BendFaceEdgeInformation elements. Parameters: a - [in] Must not be null. b - [in] Must not be null. Returns: -1: a < b +1: a > b 0: a == b

◆ SetClosedSurfaceConstraint()

bool ON_BendFaceConstraint::SetClosedSurfaceConstraint ( ON_Surface::ISO  surface_side)

Description: Set a constraint so the surface returned by ON_BendBrepFace will be closed along the specified side. Parameters: surface_side - [in] ON_Surface::W_iso, ON_Surface::S_iso, ON_Surface::E_iso or ON_Surface::W_iso Returns: True if the constraint was set.

◆ SetCurveConstraint()

bool ON_BendFaceConstraint::SetCurveConstraint ( const ON_BrepTrim trim,
const ON_Curve curve_constraint,
double  tolerance 
)

Description: Set a constraint based on information in an ON_BrepTrim. Parameters: trim - [in] curve_constraint - [in] tolerance - [in] Desired fitting tolerance Returns: True if the constraint was set.

◆ SetPointConstraint()

bool ON_BendFaceConstraint::SetPointConstraint ( double  s,
double  t,
ON_3dPoint  point 
)

Description: Set a surface evaluation point constraint. Parameters: s - [in] t - [in] surface evaluation parameters point - [in] Desired location. Returns: True if the constraint was set.

◆ SetSingularConstraint()

bool ON_BendFaceConstraint::SetSingularConstraint ( ON_Surface::ISO  surface_side,
ON_3dPoint  point 
)

Description: Set a singular constraint based on information in an ON_BrepTrim. Parameters: surface_side - [in] ON_Surface::W_iso, ON_Surface::S_iso, ON_Surface::E_iso or ON_Surface::W_iso point - [in] Desired location of the singularity. Returns: True if the constraint was set.

◆ SetSurfaceConstraint()

bool ON_BendFaceConstraint::SetSurfaceConstraint ( const ON_BrepTrim trim,
const ON_Surface surface_constraint,
double  tolerance 
)

Description: Set a constraint based on information in an ON_BrepTrim. Parameters: trim - [in] surface_constraint - [in] tolerance - [in] Desired fitting tolerance Returns: True if the constraint was set.

◆ SetSurfaceSeamFromEndsConstraint()

bool ON_BendFaceConstraint::SetSurfaceSeamFromEndsConstraint ( ON_Surface::ISO  surface_side)

Description: Set a constraint so the specified seam of a closed surface will be set by attenuating the changes applied to its ends by other constraints. This is a robust way to "fit" a periodic seam on a tube-like surface. Parameters: surface_side - [in] side that identifies the seam. Returns: True if the constraint was set.

◆ SetSurfaceSideConstraint() [1/2]

bool ON_BendFaceConstraint::SetSurfaceSideConstraint ( ON_Surface::ISO  surface_side,
const ON_Curve curve_constraint,
double  tolerance 
)

Description: Set a constraint so the specified side of the surface returned by ON_BendBrepFace will match curve_constraint. Parameters: trim - [in] curve_constraint - [in] 3d curve tolerance - [in] Desired fitting tolerance Returns: True if the constraint was set.

◆ SetSurfaceSideConstraint() [2/2]

bool ON_BendFaceConstraint::SetSurfaceSideConstraint ( ON_Surface::ISO  surface_side,
const ON_Surface surface_constraint,
double  tolerance 
)

Description: Set a constraint so the specified side of the surface returned by ON_BendBrepFace will match the same side surface_constraint. Parameters: trim - [in] surface_constraint - [in] 3d surface whose side should be matched. tolerance - [in] Desired fitting tolerance Returns: True if the constraint was set.

Member Data Documentation

◆ m_brep_trim_index

int ON_BendFaceConstraint::m_brep_trim_index

m_brep_trim_index identifies a trim on the face being bent

◆ m_contraint_type

unsigned int ON_BendFaceConstraint::m_contraint_type

The value m_contraint_type determines what type of constraint to apply.

0: Ignore this constraint.

1: m_brep_trim_index identifies a brep trim. The surface along the trim will will be constrained to m_curve_constraint. m_curve_constraint must be oriented to take the trim's m_bRev3d flag into account.

2: m_brep_trim_index identifies a brep trim. The surface along the trim will will be constrained to location of m_surface_constraint along the trim.

3 - 6: Surface Singularity These constraints specify the surface returned by ON_BendBrepFace will have a singularity on the side identified by the constraint value at the location specified by the value in m_point. The values of m_brep_trim_index, m_curve_constraint and m_surface_constraint are ignored. 3: west side singularity. 4: south side singularity. 5: east side singularity. 6: north side singularity.

7 - 8: Closed surface These constraints specify the surface returned by ON_BendBrepFace will be closed in the parameter direction identified by the constraint value. The knot vector on the surface passed to ON_BendBrepFace determines if the the closure is clamped or periodic. The values of m_brep_trim_index, m_curve_constraint and m_surface_constraint are ignored. 7: Closed surface the first parameter direction. (west = east) 8: Closed surface in the second parameter direction. (south = north)

13 - 16: Constrain a surface side to a curve. The specified side of the surface is constrained to the curve specified by m_curve_constraint. The domain and parameterization of m_curve_constaint must be set to agree with the portion of the side of the surface that is being constrained. The values of m_brep_trim_index and m_surface_constraint are ignored. 13: west side lies on m_curve_constraint. 14: south side lies on m_curve_constraint. 15: east side lies on m_curve_constraint. 16: north side lies on m_curve_constraint.

23 - 26: Constrain a surface side to match another surface side. The specified side of the surface is constrained to match the same side of m_surface_constraint. The domain and parameterization of m_surface_constraint must be set to agree with the the side of the surface that is being constrained. The values of m_brep_trim_index and m_curve_constraint are ignored. 23: west side matches west side of m_surface_constraint. 24: south side matches west side of m_surface_constraint. 25: east side matches west side of m_surface_constraint. 26: north side matches west side of m_surface_constraint.

27: Point constraint m_surface_parameters[2] = surface evaluation parameters m_point = 3d point.

28: Set east-west seam from fixed north and south sides.
29: Set south-north seam from fixed west and east sides.

◆ m_curve_constraint

const ON_Curve* ON_BendFaceConstraint::m_curve_constraint

◆ m_point

ON_3dPoint ON_BendFaceConstraint::m_point

If the value of m_action is 3 through 6, then m_point is a 3d location of the singular side. If the value of m_action is 27, then m_point is the 3d location of the point constraint.

◆ m_rev_curve_constraint

unsigned char ON_BendFaceConstraint::m_rev_curve_constraint

If m_rev_curve_constraint is 0, the curve will be evaluated as it is oriented. If m_rev_curve_constraint is 1, the curve will be evaluated in a reverse orientation. In both cases, the trim's m_bRev3d settings into account. That is, the evaluated points on the curve with m_rev_curve_constraint taken into account, must run in the direction indicated by by the trim's m_bRev3d value.

◆ m_surface_constraint

const ON_Surface* ON_BendFaceConstraint::m_surface_constraint

If the value of m_action is 2 or 23 - 26, then this surface is used.

◆ m_surface_parameters

double ON_BendFaceConstraint::m_surface_parameters[2]

If the value of m_action is 27, then a m_surface_parameters[] specifies the evaluation parameters for the point constraint.

◆ m_tolerance

double ON_BendFaceConstraint::m_tolerance

If the surface is being constrained to pass through m_curve_constraint or m_surface_constraint, then m_tolerance is the desired edge tolerance. If the boundary conditions or tolerance are unreasonable, then the fit may exceed this tolerance.