Rhino C++ API  7.19
Public Member Functions | Public Attributes | Friends | List of all members
ON_BrepFace Class Reference

#include <opennurbs_brep.h>

Inheritance diagram for ON_BrepFace:
ON_SurfaceProxy ON_Surface ON_Geometry ON_Object

Public Member Functions

 ON_BrepFace ()
 
 ON_BrepFace (int)
 
 ~ON_BrepFace ()
 
ON_BrepBrep () const
 
bool ChangeSurface (int si)
 
bool ChangeSurface (int si, bool bTransformTrimCurves)
 
void ClearBoundingBox () override
 virtual ON_Geometry::ClearBoundingBox() override More...
 
void ClearMaterialChannelIndex () const
 
void ClearPackId ()
 
void ClearPerFaceColor () const
 
ON_COMPONENT_INDEX ComponentIndex () const override
 virtual ON_Geometry::ComponentIndex() override More...
 
ON_MeshCreateMesh (const ON_MeshParameters &mp, ON_Mesh *mesh=nullptr) const override
 surface interface More...
 
ON__UINT32 DataCRC (ON__UINT32 current_remainder) const override
 virtual ON_Object::DataCRC override More...
 
void DestroyMesh (ON::mesh_type mesh_type, bool bDeleteMesh=true)
 
void DestroyRuntimeCache (bool bDelete=true) override
 
void Dump (ON_TextLog &) const override
 for debugging More...
 
class ON_BrepFaceSideFaceSide (int dir) const
 
bool GetBBox (double *boxmin, double *boxmax, bool bGrowBox=false) const override
 virtual ON_Geometry GetBBox override
More...
 
int GetIsoCurves (int iso_dir, double iso_constant, ON_SimpleArray< ON_Curve * > &iso_curves) const
 
bool GetIsoIntervals (int iso_dir, double iso_constant, ON_SimpleArray< ON_Interval > &intervals) const
 
bool GetIsoIntervals (int iso_dir, double iso_constant, ON_SimpleArray< struct ON_BrepFaceIsoInterval > &intervals) const
 
bool GetSilhouette (const ON_SilhouetteParameters parameters, const ON_PlaneEquation *clipping_planes, size_t clipping_plane_count, ON_ClassArray< ON_SIL_EVENT > &silhouettes, ON_ProgressReporter *progress, ON_Terminator *terminator) const
 
bool IsValid (class ON_TextLog *text_log=nullptr) const override
 
ON_BrepLoopLoop (int fli) const
 
int LoopCount () const
 
int MaterialChannelIndex () const
 
const ON_MeshMesh (ON::mesh_type mesh_type) const
 
ON_BrepFaceoperator= (const ON_BrepFace &)
 
ON_BrepLoopOuterLoop () const
 
unsigned int PackId () const
 of natural surface orientation More...
 
const ON_Color PerFaceColor () const
 
unsigned int ProxyBrepSubDFaceId () const
 
bool Read (ON_BinaryArchive &) override
 
bool Reverse (int dir) override
 
bool SetDomain (int dir, double t0, double t1) override
 
bool SetDomain (ON_Interval udom, ON_Interval vdom)
 
void SetMaterialChannelIndex (int material_channel_index) const
 
bool SetMesh (ON::mesh_type, ON_Mesh *mesh)
 If true is returned, then ~ON_BrepFace will delete mesh. More...
 
void SetPackIdForExperts (unsigned int pack_id)
 
void SetPerFaceColor (ON_Color color) const
 
unsigned int SizeOf () const override
 virtual ON_Object::SizeOf override More...
 
int SurfaceIndexOf () const
 
const ON_SurfaceSurfaceOf () const
 
bool TransformTrim (const ON_Xform &xform)
 "Expert" Interface More...
 
bool Transpose () override
 
bool Write (ON_BinaryArchive &) const override
 
- Public Member Functions inherited from ON_SurfaceProxy
 ON_SurfaceProxy ()
 
 ON_SurfaceProxy (const ON_Surface *)
 
 ON_SurfaceProxy (const ON_SurfaceProxy &)
 
virtual ~ON_SurfaceProxy ()
 
ON_MeshCreateMesh (const ON_MeshParameters &mp, ON_Mesh *mesh=nullptr) const override
 ON_Surface overrides. More...
 
ON__UINT32 DataCRC (ON__UINT32 current_remainder) const override
 virtual ON_Object::DataCRC override More...
 
int Degree (int) const override
 
void DestroyRuntimeCache (bool bDelete=true) override
 virtual ON_Object::DestroyRuntimeCache override More...
 
int Dimension () const override
 ON_Geometry overrides. More...
 
ON_Interval Domain (int) const override
 
void Dump (ON_TextLog &) const override
 for debugging More...
 
ON_SurfaceDuplicateSurface () const override
 
bool Evaluate (double, double, int, int, double *, int=0, int *=0) const override
 work horse evaluator More...
 
bool GetBBox (double *boxmin, double *boxmax, bool bGrowBox=false) const override
 virtual ON_Geometry GetBBox override
More...
 
bool GetClosestPoint (const ON_3dPoint &P, double *s, double *t, double maximum_distance=0.0, const ON_Interval *sdomain=0, const ON_Interval *tdomain=0) const override
 
bool GetLocalClosestPoint (const ON_3dPoint &, double, double, double *, double *, const ON_Interval *=nullptr, const ON_Interval *=nullptr) const override
 
bool GetNextDiscontinuity (int dir, ON::continuity c, double t0, double t1, double *t, int *hint=nullptr, int *dtype=nullptr, double cos_angle_tolerance=ON_DEFAULT_ANGLE_TOLERANCE_COSINE, double curvature_tolerance=ON_SQRT_EPSILON) const override
 
int GetNurbForm (ON_NurbsSurface &, double=0.0) const override
 
bool GetNurbFormParameterFromSurfaceParameter (double surface_s, double surface_t, double *nurbs_s, double *nurbs_t) const override
 
bool GetParameterTolerance (int, double, double *, double *) const override
 
bool GetSpanVector (int, double *) const override
 
bool GetSurfaceParameterFromNurbFormParameter (double nurbs_s, double nurbs_t, double *surface_s, double *surface_t) const override
 
bool GetSurfaceSize (double *width, double *height) const override
 
int HasNurbForm () const override
 
bool IsClosed (int) const override
 
bool IsContinuous (ON::continuity c, double s, double t, int *hint=nullptr, double point_tolerance=ON_ZERO_TOLERANCE, double d1_tolerance=ON_ZERO_TOLERANCE, double d2_tolerance=ON_ZERO_TOLERANCE, double cos_angle_tolerance=ON_DEFAULT_ANGLE_TOLERANCE_COSINE, double curvature_tolerance=ON_SQRT_EPSILON) const override
 
ON_Surface::ISO IsIsoparametric (const ON_BoundingBox &bbox) const override
 override virtual ON_Surface::IsIsoparametric More...
 
ON_Surface::ISO IsIsoparametric (const ON_Curve &curve, const ON_Interval *curve_domain=nullptr) const override
 override virtual ON_Surface::IsIsoparametric More...
 
ON_CurveIsoCurve (int dir, double c) const override
 
bool IsPeriodic (int) const override
 
bool IsPlanar (ON_Plane *plane=nullptr, double tolerance=ON_ZERO_TOLERANCE) const override
 
bool IsSingular (int) const override
 
bool IsValid (class ON_TextLog *text_log=nullptr) const override
 
ON_SurfaceOffset (double offset_distance, double tolerance, double *max_deviation=nullptr) const override
 
ON_SurfaceProxyoperator= (const ON_SurfaceProxy &)
 
const ON_SurfaceProxySurface () const
 
bool ProxySurfaceIsTransposed () const
 
ON_CurvePullback (const ON_Curve &curve_3d, double tolerance, const ON_Interval *curve_3d_subdomain=nullptr, ON_3dPoint start_uv=ON_3dPoint::UnsetPoint, ON_3dPoint end_uv=ON_3dPoint::UnsetPoint, ON_FitResult *rc=0) const override
 
ON_CurvePushup (const ON_Curve &curve_2d, double tolerance, const ON_Interval *curve_2d_subdomain=nullptr, ON_FitResult *rc=0) const override
 
bool Read (ON_BinaryArchive &) override
 
bool Reverse (int) override
 
void SetProxySurface (const ON_Surface *proxy_surface)
 
unsigned int SizeOf () const override
 ON_Object overrides. More...
 
int SpanCount (int) const override
 number of smooth spans in curve More...
 
bool Transform (const ON_Xform &) override
 
bool Transpose () override
 transpose surface parameterization (swap "s" and "t") More...
 
bool Write (ON_BinaryArchive &) const override
 
- Public Member Functions inherited from ON_Surface
 ON_Surface ()
 
 ON_Surface (const ON_Surface &)
 
virtual ~ON_Surface ()
 
bool AreaMassProperties (class ON_MassProperties &mp, bool bArea=true, bool bFirstMoments=true, bool bSecondMoments=true, bool bProductMoments=true, double rel_tol=1.0e-6, double abs_tol=1.0e-6) const
 
ON_BrepBrepForm (ON_Brep *brep=nullptr) const override
 
virtual ON_SurfaceTreeCreateSurfaceTree () const
 
void DestroySurfaceTree ()
 
bool Ev1Der (double u, double v, ON_3dPoint &point, ON_3dVector &du, ON_3dVector &dv, int quadrant=0, int *hint=0) const
 
bool Ev2Der (double u, double v, ON_3dPoint &point, ON_3dVector &du, ON_3dVector &dv, ON_3dVector &duu, ON_3dVector &duv, ON_3dVector &dvv, int quadrant=0, int *hint=0) const
 
bool EvaluatePoint (const class ON_ObjRef &objref, ON_3dPoint &P) const override
 virtual ON_Geometry override More...
 
bool EvNormal (double u, double v, ON_3dPoint &point, ON_3dVector &du, ON_3dVector &dv, ON_3dVector &normal, int=0, int *=0) const
 
bool EvNormal (double u, double v, ON_3dPoint &point, ON_3dVector &normal, int quadrant=0, int *hint=0) const
 
bool EvNormal (double u, double v, ON_3dVector &normal, int quadrant=0, int *hint=0) const
 
bool EvPoint (double u, double v, ON_3dPoint &point, int quadrant=0, int *hint=0) const
 
virtual bool Extend (int dir, const ON_Interval &domain)
 
bool FrameAt (double u, double v, ON_Plane &frame) const
 
bool GetDomain (int dir, double *t0, double *t1) const
 
int GetIsoPushupDirection (const ON_Curve &curve_2d, double tolerance, const ON_Interval *curve_2d_subdomain, double *c, ON_Interval *c3_dom) const
 
bool GetSilhouette (const ON_Interval *udom, const ON_Interval *vdom, const ON_SilhouetteParameters parameters, const ON_PlaneEquation *clipping_planes, size_t clipping_plane_count, ON_ClassArray< ON_SIL_EVENT > &silhouettes, ON_ProgressReporter *progress, ON_Terminator *terminator) const
 
virtual bool GetSpanVectorIndex (int dir, double t, int side, int *span_vector_index, ON_Interval *span_interval) const
 
ON_CurveGetSurfaceParameterFromNurbFormParameter (const ON_Curve &curve3d, const ON_Curve &ns_curve2dX, double fit_tolerance) const
 
bool HasBrepForm () const override
 
int IntersectPlane (ON_PlaneEquation plane_equation, ON_ClassArray< ON_SSX_EVENT > &x, double intersection_tolerance=0.0, double overlap_tolerance=0.0, double fitting_tolerance=0.0, const ON_Interval *surface_udomain=0, const ON_Interval *surface_vdomain=0) const
 
int IntersectSurface (const ON_Surface *surfaceB, ON_ClassArray< ON_SSX_EVENT > &x, double intersection_tolerance=0.0, double overlap_tolerance=0.0, double fitting_tolerance=0.0, const ON_Interval *surfaceA_udomain=0, const ON_Interval *surfaceA_vdomain=0, const ON_Interval *surfaceB_udomain=0, const ON_Interval *surfaceB_vdomain=0) const
 
int IsAtSeam (double s, double t) const
 
bool IsAtSingularity (double s, double t, bool bExact=true) const
 
bool IsCone (ON_Cone *cone=nullptr, double tolerance=ON_ZERO_TOLERANCE) const
 
bool IsCylinder (ON_Cylinder *cylinder=nullptr, double tolerance=ON_ZERO_TOLERANCE) const
 
bool IsSolid () const
 
bool IsSphere (ON_Sphere *sphere=nullptr, double tolerance=ON_ZERO_TOLERANCE) const
 
bool IsTorus (ON_Torus *torus=nullptr, double tolerance=ON_ZERO_TOLERANCE) const
 
ON_3dVector NormalAt (double, double) const
 
ON_NurbsSurfaceNurbsSurface (ON_NurbsSurface *pNurbsSurface=nullptr, double tolerance=0.0, const ON_Interval *s_subdomain=nullptr, const ON_Interval *t_subdomain=nullptr) const
 
ON::object_type ObjectType () const override
 override ON_Object::ObjectType() - returns ON::surface_object More...
 
ON_Surfaceoperator= (const ON_Surface &)
 
ON_3dPoint PointAt (double, double) const
 simple evaluation interface - no error handling More...
 
bool SetDomain (int dir, ON_Interval domain)
 
virtual bool Split (int dir, double c, ON_Surface *&west_or_south_side, ON_Surface *&east_or_north_side) const
 
const ON_SurfaceTreeSurfaceTree () const
 
virtual bool Trim (int dir, const ON_Interval &domain)
 
bool VolumeMassProperties (class ON_MassProperties &mp, bool bVolume=true, bool bFirstMoments=true, bool bSecondMoments=true, bool bProductMoments=true, ON_3dPoint base_point=ON_3dPoint::UnsetPoint, double rel_tol=1.0e-6, double abs_tol=1.0e-6) const
 
- Public Member Functions inherited from ON_Geometry
 ON_Geometry ()=default
 
 ON_Geometry (const ON_Geometry &)=default
 
 ~ON_Geometry ()=default
 
ON_BoundingBox BoundingBox () const
 
bool GetBoundingBox (ON_3dPoint &bbox_min, ON_3dPoint &bbox_max, bool bGrowBox=false) const
 
bool GetBoundingBox (ON_BoundingBox &bbox, bool bGrowBox=false) const
 
virtual bool GetTightBoundingBox (class ON_BoundingBox &tight_bbox, bool bGrowBox=false, const class ON_Xform *xform=nullptr) const
 
virtual bool IsDeformable () const
 
virtual bool IsMorphable () const
 
virtual bool MakeDeformable ()
 
virtual bool Morph (const class ON_SpaceMorph &morph)
 
ON_Geometryoperator= (const ON_Geometry &)=default
 
bool Rotate (double rotation_angle, const ON_3dVector &rotation_axis, const ON_3dPoint &rotation_center)
 
bool Rotate (double sin_angle, double cos_angle, const ON_3dVector &rotation_axis, const ON_3dPoint &rotation_center)
 
bool Scale (double scale_factor)
 
virtual bool SwapCoordinates (int i, int j)
 
bool Translate (const ON_3dVector &translation_vector)
 
- Public Member Functions inherited from ON_Object
 ON_Object () ON_NOEXCEPT
 
 ON_Object (const ON_Object &)
 
virtual ~ON_Object ()
 
virtual ON_AggregateComponentStatus AggregateComponentStatus () const
 
bool AttachUserData (class ON_UserData *pUserData)
 
unsigned int ClearAllComponentStates () const
 
virtual unsigned int ClearComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_clear) const
 
virtual unsigned int ClearComponentStates (ON_ComponentStatus states_to_clear) const
 
void CopyUserData (const ON_Object &source_object)
 
unsigned int CopyUserData (const ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution)
 
virtual bool DeleteComponents (const ON_COMPONENT_INDEX *ci_list, size_t ci_count)
 
bool DetachUserData (class ON_UserData *pUserData)
 
void EmergencyDestroy ()
 
class ON_UserDataFirstUserData () const
 
virtual unsigned int GetComponentsWithSetStates (ON_ComponentStatus states_filter, bool bAllEqualStates, ON_SimpleArray< ON_COMPONENT_INDEX > &components) const
 
class ON_UserDataGetUserData (const ON_UUID &userdata_uuid) const
 
bool GetUserString (const wchar_t *key, ON_wString &string_value) const
 
int GetUserStringKeys (ON_ClassArray< ON_wString > &user_string_keys) const
 
int GetUserStrings (ON_ClassArray< ON_UserString > &user_strings) const
 
bool IsCorrupt (bool bRepair, bool bSilentError, class ON_TextLog *text_log) const
 
bool IsKindOf (const ON_ClassId *pClassId) const
 
virtual void MarkAggregateComponentStatusAsNotCurrent () const
 
virtual void MemoryRelocate ()
 
virtual ON_UUID ModelObjectId () const
 
void MoveUserData (ON_Object &source_object)
 
unsigned int MoveUserData (ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution, bool bDeleteAllSourceItems)
 
ON_Objectoperator= (const ON_Object &)
 
void PurgeUserData ()
 
virtual unsigned int SetComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_set) const
 
virtual unsigned int SetComponentStatus (ON_COMPONENT_INDEX component_index, ON_ComponentStatus status_to_copy) const
 
bool SetUserString (const wchar_t *key, const wchar_t *string_value)
 
int SetUserStrings (int count, const ON_UserString *user_strings, bool bReplace)
 
bool ThisIsNullptr (bool bSilentError) const
 
void TransformUserData (const class ON_Xform &xform)
 
virtual bool UpdateReferencedComponents (const class ON_ComponentManifest &source_manifest, const class ON_ComponentManifest &destination_manifest, const class ON_ManifestMap &manifest_map)
 
int UserStringCount () const
 

Public Attributes

bool m_bRev = false
 
int m_face_index = -1
 index of face in ON_Brep.m_F[] array More...
 
int m_face_material_channel = 0
 
ON_U m_face_user
 
ON_UUID m_face_uuid = ON_nil_uuid
 Persistent id for this face. Default is ON_nil_uuid. More...
 
ON_SimpleArray< int > m_li
 loop indices (outer loop is m_li[0]) More...
 
int m_si = -1
 index of surface in b-rep m_S[] array More...
 
ON_ComponentStatus m_status = ON_ComponentStatus::NoneSet
 

Friends

class ON_Brep
 

Additional Inherited Members

- Public Types inherited from ON_Surface
enum  ISO {
  not_iso = 0, x_iso = 1, y_iso = 2, W_iso = 3,
  S_iso = 4, E_iso = 5, N_iso = 6, iso_count = 7
}
 pure virtual class for surface objects More...
 
- Public Types inherited from ON_Object
enum  UserDataConflictResolution : unsigned char {
  UserDataConflictResolution::destination_object = 0, UserDataConflictResolution::source_object = 1, UserDataConflictResolution::source_copycount_gt = 2, UserDataConflictResolution::source_copycount_ge = 3,
  UserDataConflictResolution::destination_copycount_gt = 4, UserDataConflictResolution::destination_copycount_ge = 5, UserDataConflictResolution::delete_item = 6
}
 
- Static Public Member Functions inherited from ON_Surface
static class ON_NurbsSurfaceCreateCubicLoft (int curve_count, const ON_Curve *const *curve_list, double k, int is_closed=0, ON::cubic_loft_end_condition start_shape=ON::cubic_loft_ec_quadratic, ON::cubic_loft_end_condition end_shape=ON::cubic_loft_ec_quadratic, class ON_NurbsSurface *nurbs_surface=0)
 
static class ON_NurbsSurfaceCreateLinearLoft (int curve_count, const ON_Curve *const *curve_list, double k, int is_closed=0, class ON_NurbsSurface *nurbs_surface=0)
 
- Static Public Attributes inherited from ON_Geometry
const static ON_Geometry Unset
 
- Protected Member Functions inherited from ON_Surface
ON_CurvePullbackCurveProxy (const ON_CurveProxy &curveproxy_3d, double tolerance, const ON_Interval *curve_3d_subdomain, ON_3dPoint start_uv, ON_3dPoint end_uv, ON_FitResult *rc) const
 Helper for ON_Surface::Pullback overrides that handles "real" curve issues. More...
 
ON_CurvePullbackPolyCurve (const ON_PolyCurve &polycurve_3d, double tolerance, const ON_Interval *curve_3d_subdomain, ON_3dPoint start_uv, ON_3dPoint end_uv, ON_FitResult *rc) const
 
ON_CurvePushupCurveProxy (const ON_CurveProxy &curveproxy_2d, double tolerance, const ON_Interval *curve_2d_subdomain, ON_FitResult *rc) const
 Helper for ON_Surface::Pushup overrides that handles "real" curve issues. More...
 
ON_CurvePushupPolyCurve (const ON_PolyCurve &polycurve_2d, double tolerance, const ON_Interval *curve_2d_subdomain, ON_FitResult *rc) const
 

Constructor & Destructor Documentation

◆ ON_BrepFace() [1/2]

ON_BrepFace::ON_BrepFace ( )

◆ ~ON_BrepFace()

ON_BrepFace::~ON_BrepFace ( )

◆ ON_BrepFace() [2/2]

ON_BrepFace::ON_BrepFace ( int  )

Member Function Documentation

◆ Brep()

ON_Brep* ON_BrepFace::Brep ( ) const

Returns: Brep that the face belongs to.

◆ ChangeSurface() [1/2]

bool ON_BrepFace::ChangeSurface ( int  si)

Description: Expert user tool that replaces the 3d surface geometry use by the face. Parameters; si - [in] brep surface index of new surface bTransformTrimCurves - [in] If unsure, then pass true. If the surface's domain has not changed and you are certain its parameterization still jibes with the trim curve locations, then pass false. Returns: True if successful. Example:

      ON_Surface* pSurface = ...;
      int si = brep.AddSurface(pSurface);
      face.ChangeSurface(si);

Remarks: If the face had a surface and new surface has a different shape, then you probably want to call something like ON_Brep::RebuildEdges() to move the 3d edge curves so they will lie on the new surface. This doesn't delete the old surface; call ON_Brep::CullUnusedSurfaces() or ON_Brep::Compact to remove unused surfaces. See Also: ON_Brep::RebuildEdges ON_Brep::CullUnusedSurfaces

◆ ChangeSurface() [2/2]

bool ON_BrepFace::ChangeSurface ( int  si,
bool  bTransformTrimCurves 
)

◆ ClearBoundingBox()

void ON_BrepFace::ClearBoundingBox ( )
overridevirtual

virtual ON_Geometry::ClearBoundingBox() override

Reimplemented from ON_Geometry.

◆ ClearMaterialChannelIndex()

void ON_BrepFace::ClearMaterialChannelIndex ( ) const

Description: Remove per face rendering material channel index setting. The face will use the material assigned to the brep object.

◆ ClearPackId()

void ON_BrepFace::ClearPackId ( )

Description: Sets PackId() to zero.

◆ ClearPerFaceColor()

void ON_BrepFace::ClearPerFaceColor ( ) const

Description: Remove per face color setting. The face will use the color assigned to the brep object.

◆ ComponentIndex()

ON_COMPONENT_INDEX ON_BrepFace::ComponentIndex ( ) const
overridevirtual

virtual ON_Geometry::ComponentIndex() override

Reimplemented from ON_Geometry.

◆ CreateMesh()

ON_Mesh* ON_BrepFace::CreateMesh ( const ON_MeshParameters mp,
ON_Mesh mesh = nullptr 
) const
overridevirtual

surface interface

Description: Computes a polygon mesh approximation of the surface.
Parameters: mp - [in] meshing parameters mesh - [in] if not nullptr, the surface mesh will be put into this mesh. Returns: A polygon mesh of the surface. Remarks: This virtual function works in the openNURBS that is part of the Rhino SDK. The source code for this functionallity is not provided in the free openNURBS toolkit.

Reimplemented from ON_Surface.

◆ DataCRC()

ON__UINT32 ON_BrepFace::DataCRC ( ON__UINT32  current_remainder) const
overridevirtual

virtual ON_Object::DataCRC override

Reimplemented from ON_Object.

◆ DestroyMesh()

void ON_BrepFace::DestroyMesh ( ON::mesh_type  mesh_type,
bool  bDeleteMesh = true 
)

Description: Destroy meshes used to render and analyze surface and polysurface objects. Parameters: mesh_type - [in] type of mesh to destroy bDeleteMesh - [in] if true, cached mesh is deleted. If false, pointer to cached mesh is just set to nullptr. See Also: CRhinoObject::GetMeshes CRhinoObject::MeshCount CRhinoObject::IsMeshable

◆ DestroyRuntimeCache()

void ON_BrepFace::DestroyRuntimeCache ( bool  bDelete = true)
overridevirtual

Expert interface Description: Expert user function. If you are using openNURBS in its default configuration to read and write 3dm archives, you never need to call this function. Many objects employ lazy creation of (runtime) caches that save information to help speed geometric calculations. This function will destroy all runtime information. Parameters: bDelete - [in] if true, any cached information is properly deleted. If false, any cached information is simply discarded. This is useful when the cached information may be in alternate memory pools that are managed in nonstandard ways.

Reimplemented from ON_Object.

◆ Dump()

void ON_BrepFace::Dump ( ON_TextLog ) const
overridevirtual

for debugging

Reimplemented from ON_Object.

◆ FaceSide()

class ON_BrepFaceSide* ON_BrepFace::FaceSide ( int  dir) const

Parameters: dir 1: side with underlying surface normal pointing into the topology region -1: side with underlying surface normal pointing out of the topology region Returns: Brep region topology face side. If the region topology has not be created by calling ON_Brep::RegionToplogy(), then nullptr is returned.

◆ GetBBox()

bool ON_BrepFace::GetBBox ( double *  boxmin,
double *  boxmax,
bool  bGrowBox = false 
) const
overridevirtual

virtual ON_Geometry GetBBox override

Reimplemented from ON_Geometry.

◆ GetIsoCurves()

int ON_BrepFace::GetIsoCurves ( int  iso_dir,
double  iso_constant,
ON_SimpleArray< ON_Curve * > &  iso_curves 
) const

Description: Get isocurves Parameters: iso_dir - [in] 0: intervals are "u" intervals, c = constant "v" value 1: intervals are "v" intervals, c = constant "u" value iso_constant - [in] constant "c" above isocurves - [out] isocurves are appended to this list. Returns: number of curves appended to iso_curves[]. Remarks: The returned curves are on the heap and the caller is responsible for deleting them when they are no longer needed.

◆ GetIsoIntervals() [1/2]

bool ON_BrepFace::GetIsoIntervals ( int  iso_dir,
double  iso_constant,
ON_SimpleArray< ON_Interval > &  intervals 
) const

Description: Get intervals where isocurve exists. Parameters: iso_dir - [in] 0: intervals are "u" intervals, c = constant "v" value 1: intervals are "v" intervals, c = constant "u" value iso_constant - [in] constant "c" above intervals - [out] intervals are append to this list The isocurve(s) exist on the domain of the intervals. Returns: true if reliable information is returned. false if the input parameters or the brep is corrupt and the calculation could not be performed.

◆ GetIsoIntervals() [2/2]

bool ON_BrepFace::GetIsoIntervals ( int  iso_dir,
double  iso_constant,
ON_SimpleArray< struct ON_BrepFaceIsoInterval > &  intervals 
) const

◆ GetSilhouette()

bool ON_BrepFace::GetSilhouette ( const ON_SilhouetteParameters  parameters,
const ON_PlaneEquation clipping_planes,
size_t  clipping_plane_count,
ON_ClassArray< ON_SIL_EVENT > &  silhouettes,
ON_ProgressReporter progress,
ON_Terminator terminator 
) const

◆ IsValid()

bool ON_BrepFace::IsValid ( class ON_TextLog text_log = nullptr) const
overridevirtual

Description: Tests an object to see if its data members are correctly initialized. Parameters: text_log - [in] if the object is not valid and text_log is not nullptr, then a brief englis description of the reason the object is not valid is appened to the log. The information appended to text_log is suitable for low-level debugging purposes by programmers and is not intended to be useful as a high level user interface tool. Returns: @untitled table true object is valid false object is invalid, uninitialized, etc.

Reimplemented from ON_Object.

◆ Loop()

ON_BrepLoop* ON_BrepFace::Loop ( int  fli) const

Parameters: fli - [in] index into the face's m_li[] array. Returns: The loop brep.m_L[face.m_li[fli]];

◆ LoopCount()

int ON_BrepFace::LoopCount ( ) const

Returns: Number of loops in this face.

◆ MaterialChannelIndex()

int ON_BrepFace::MaterialChannelIndex ( ) const

Returns: This face's rendering material channel index.

Remarks: If base_material is the ON_Material assigned to render this subd, MaterialChannelIndex() > 0, and ON_UUID face_material_id = base_material.MaterialChannelIdFromIndex( face.MaterialChannelIndex() ) is not nil, then face_material_id identifies an override rendering material for this face. Otherwise base_material is used to render this face.

◆ Mesh()

const ON_Mesh* ON_BrepFace::Mesh ( ON::mesh_type  mesh_type) const

◆ operator=()

ON_BrepFace& ON_BrepFace::operator= ( const ON_BrepFace )

◆ OuterLoop()

ON_BrepLoop* ON_BrepFace::OuterLoop ( ) const

Returns: Outer boundary loop for this face.

◆ PackId()

unsigned int ON_BrepFace::PackId ( ) const

of natural surface orientation

Returns: 0: unset pack id.

0: set pack id.

Remarks: PackId values assigned to brep faces are inheritied from the PackId values assigned to subd faces when a subd is converted into a brep. These faces are "trivially trimmed" which means the boundary of the face is identical to the boundary of the underlying surface. There are two types of face packs in a subd, quad grid packs and singleton packs. A subd quad grid pack is a set of subd quads that form a rectangular grid. A subd singleton pack is a single face, quad or n-gon, that is not part of a quad grid pack. There are three types of face packs in a brep created from a subd, grid packs, star packs and singleton packs. A brep "grid pack" comes from a rectangular grid of subd quads. A grid pack of brep faces can be converted into a single larger trivially trimmed brep face. A brep "star pack" of brep faces comes from a singel subd n-gon (n = 3, 5 or more). The star pack will have n faces with a star center vertex and shared edges radiating from the star center. A brep "singleton" pack comes from a single subd quad that could not be grouped into a larger subd quad grid pack.

◆ PerFaceColor()

const ON_Color ON_BrepFace::PerFaceColor ( ) const

Returns: Per face color. A value of ON_Color::UnsetColor indicates the face uses the color assigned to the brep object.

◆ ProxyBrepSubDFaceId()

unsigned int ON_BrepFace::ProxyBrepSubDFaceId ( ) const

Returns: If this face is part of a brep created by ON_SubD::ProxyBrep(), then the subd component id of the corresponding SubD face is returned. Otherwise 0 is returned.

◆ Read()

bool ON_BrepFace::Read ( ON_BinaryArchive binary_archive)
overridevirtual

Description: Low level archive writing tool used by ON_BinaryArchive::ReadObject(). Parameters: binary_archive - archive to read from Returns: Returns true if the read is successful. Remarks: Use ON_BinaryArchive::ReadObject() to read objects. This Read() function should read the objects definition back into its data members.

The default implementation of this virtual function returns false and does nothing.

Reimplemented from ON_Object.

◆ Reverse()

bool ON_BrepFace::Reverse ( int  dir)
overridevirtual

Description: This is an override of the virtual ON_Surface::Reverse function. It toggles the face's m_bRev flag so the abstract orientation of the face does not change. Parameters: dir - [in] 0 = reverse "s" parameter, 1 = reverse "t" parameter The domain changes from [a,b] to [-a,-b] Returns: True if successful. Remarks: The range of the face's trimming curves and the orientation direction of then loops are changed so that the resulting face is still valid.

Implements ON_Surface.

◆ SetDomain() [1/2]

bool ON_BrepFace::SetDomain ( int  dir,
double  t0,
double  t1 
)
overridevirtual

Description: This is an override of the virtual ON_Surface::SetDomain function. Parameters: dir - [in] 0 = set "u" domain, 1 = set "v" domain. t0 - [in] t1 - [in] t0 < t1 The new domain is the interval (t0,t1) Returns: True if successful.

Reimplemented from ON_Surface.

◆ SetDomain() [2/2]

bool ON_BrepFace::SetDomain ( ON_Interval  udom,
ON_Interval  vdom 
)

//////// / Change the domain of a face / This changes the parameterization of the face's surface and transforms / the "u" and "v" coordinates of all the face's parameter space trimming / curves. The locus of the face is not changed.

◆ SetMaterialChannelIndex()

void ON_BrepFace::SetMaterialChannelIndex ( int  material_channel_index) const

Description: Set this face's rendering material channel index.

Parameters: material_channel_index - [in] A value between 0 and ON_Material::MaximumMaterialChannelIndex, inclusive. This value is typically 0 or the value returned from ON_Material::MaterialChannelIndexFromId().

Remarks: If base_material is the ON_Material assigned to render this brep and ON_UUID face_material_id = base_material.MaterialChannelIdFromIndex( material_channel_index ) is not nil, then face_material_id identifies an override rendering material for this face. Otherwise base_material is used to render this face.

◆ SetMesh()

bool ON_BrepFace::SetMesh ( ON::mesh_type  ,
ON_Mesh mesh 
)

If true is returned, then ~ON_BrepFace will delete mesh.

Rendering Interface int MaterialIndex() const; ///< if -1, use parent's material definition void SetMaterialIndex(int);

◆ SetPackIdForExperts()

void ON_BrepFace::SetPackIdForExperts ( unsigned int  pack_id)

Description: Used by ON_SubD functions that create breps to transmit the subd face ON_SubDFace.PackId() value to the brep face or faces generated from the subd face. Unless you are an expert and doing something very carefully and very fancy, to not call this function. Remarks: PackId values assigned to brep faces are inheritied from the PackId values assigned to subd faces when a subd is converted into a brep. These faces are "trivially trimmed" which means the boundary of the face is identical to the boundary of the underlying surface. There are two types of face packs in a subd, quad grid packs and singleton packs. A subd quad grid pack is a set of subd quads that form a rectangular grid. A subd singleton pack is a single face, quad or n-gon, that is not part of a quad grid pack. There are three types of face packs in a brep created from a subd, grid packs, star packs and singleton packs. A brep "grid pack" comes from a rectangular grid of subd quads. A grid pack of brep faces can be converted into a single larger trivially trimmed brep face. A brep "star pack" of brep faces comes from a singel subd n-gon (n = 3, 5 or more). The star pack will have n faces with a star center vertex and shared edges radiating from the star center. A brep "singleton" pack comes from a single subd quad that could not be grouped into a larger subd quad grid pack.

◆ SetPerFaceColor()

void ON_BrepFace::SetPerFaceColor ( ON_Color  color) const

Description: Set per face color.

Parameters: color - [in]

◆ SizeOf()

unsigned int ON_BrepFace::SizeOf ( ) const
overridevirtual

virtual ON_Object::SizeOf override

ON_Object overrides

(Faces are purely topological - geometry queries should be directed at the face's 3d surface.)

Reimplemented from ON_Object.

◆ SurfaceIndexOf()

int ON_BrepFace::SurfaceIndexOf ( ) const

Returns: brep.m_S[] surface index of the 3d surface geometry used by this face or -1.

◆ SurfaceOf()

const ON_Surface* ON_BrepFace::SurfaceOf ( ) const

Returns: Pointer to the surface geometry used by the face.

◆ TransformTrim()

bool ON_BrepFace::TransformTrim ( const ON_Xform xform)

"Expert" Interface

Description: Expert user tool that transforms all the parameter space (2d) trimming curves on this face. Only 2d curve geometry is changed. The caller is responsible for reversing loops, toggle m_bRev, flags, etc. Parameters: xform - [in] Transformation applied to 2d curve geometry. Returns True if successful. If false is returned, the brep may be invalid.

◆ Transpose()

bool ON_BrepFace::Transpose ( )
overridevirtual

Description: This is an override of the virtual ON_Surface::Transpose function. It toggles the face's m_bRev flag so the abstract orientation of the face does not change. Returns: True if successful. Remarks: The range of the face's trimming curves and the orientation direction of then loops are changed so that the resulting face is still valid.

Implements ON_Surface.

◆ Write()

bool ON_BrepFace::Write ( ON_BinaryArchive binary_archive) const
overridevirtual

Description: Low level archive writing tool used by ON_BinaryArchive::WriteObject(). Parameters: binary_archive - archive to write to Returns: Returns true if the write is successful. Remarks: Use ON_BinaryArchive::WriteObject() to write objects. This Write() function should just write the specific definition of this object. It should not write and any chunk typecode or length information.

The default implementation of this virtual function returns false and does nothing.

Reimplemented from ON_Object.

Friends And Related Function Documentation

◆ ON_Brep

friend class ON_Brep
friend

int m_material_index; ///< if 0 (default), ON_Brep's object attributes ///< determine material.

Member Data Documentation

◆ m_bRev

bool ON_BrepFace::m_bRev = false

true if face orientation is opposite

◆ m_face_index

int ON_BrepFace::m_face_index = -1

index of face in ON_Brep.m_F[] array

◆ m_face_material_channel

int ON_BrepFace::m_face_material_channel = 0

The application specifies a base ON_Material used to render the brep this face belongs to. If m_material_channel_index > 0 AND face_material_id = base.MaterialChannelIdFromIndex(m_material_channel_index) is not nil, then face_material_id identifies an override rendering material for this face. Otherwise base will be used to render this face.

◆ m_face_user

ON_U ON_BrepFace::m_face_user
mutable

Union available for application use. The constructor zeros m_face_user. The value is of m_face_user is not saved in 3DM archives and may be changed by some computations.

◆ m_face_uuid

ON_UUID ON_BrepFace::m_face_uuid = ON_nil_uuid

Persistent id for this face. Default is ON_nil_uuid.

◆ m_li

ON_SimpleArray<int> ON_BrepFace::m_li

loop indices (outer loop is m_li[0])

◆ m_si

int ON_BrepFace::m_si = -1

index of surface in b-rep m_S[] array

◆ m_status

ON_ComponentStatus ON_BrepFace::m_status = ON_ComponentStatus::NoneSet
mutable