#include <opennurbs_brep.h>
Public Member Functions | |
| ON_BrepFace () | |
| ON_BrepFace (int) | |
| ~ON_BrepFace () | |
| ON_Brep * | Brep () const |
| bool | ChangeSurface (int si) |
| bool | ChangeSurface (int si, bool bTransformTrimCurves) |
| void | ClearBoundingBox () override |
| virtual ON_Geometry::ClearBoundingBox() override More... | |
| ON_COMPONENT_INDEX | ComponentIndex () const override |
| virtual ON_Geometry::ComponentIndex() override 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_BrepFaceSide * | FaceSide (int dir) const |
| bool | GetBBox (double *boxmin, double *boxmax, bool bGrowBox=false) const override |
| virtual ON_Geometry GetBBox override More... | |
| bool | IsValid (class ON_TextLog *text_log=nullptr) const override |
| ON_BrepLoop * | Loop (int fli) const |
| int | LoopCount () const |
| const ON_Mesh * | Mesh (ON::mesh_type mesh_type) const |
| ON_BrepFace & | operator= (const ON_BrepFace &) |
| ON_BrepLoop * | OuterLoop () 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) |
| bool | SetMesh (ON::mesh_type, ON_Mesh *mesh) |
| If true is returne, then ~ON_BrepFace will delete mesh. More... | |
| unsigned int | SizeOf () const override |
| virtual ON_Object::SizeOf override More... | |
| int | SurfaceIndexOf () const |
| const ON_Surface * | SurfaceOf () 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__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 |
| ON_Surface overrides. More... | |
| void | Dump (ON_TextLog &) const override |
| for debugging More... | |
| ON_Surface * | DuplicateSurface () 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 | 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_Curve &curve, const ON_Interval *curve_domain=nullptr) const override |
| override virtual ON_Surface::IsIsoparametric More... | |
| ON_Surface::ISO | IsIsoparametric (const ON_BoundingBox &bbox) const override |
| override virtual ON_Surface::IsIsoparametric More... | |
| ON_Curve * | IsoCurve (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_SurfaceProxy & | operator= (const ON_SurfaceProxy &) |
| const ON_Surface * | ProxySurface () const |
| bool | ProxySurfaceIsTransposed () const |
| 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 () |
| ON_Brep * | BrepForm (ON_Brep *brep=nullptr) const override |
| 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 &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 | EvNormal (double u, double v, ON_3dPoint &point, ON_3dVector &du, ON_3dVector &dv, ON_3dVector &normal, int=0, int *=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 |
| surface interface More... | |
| virtual bool | GetSpanVectorIndex (int dir, double t, int side, int *span_vector_index, ON_Interval *span_interval) const |
| bool | HasBrepForm () const override |
| 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_NurbsSurface * | NurbsSurface (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_Surface & | operator= (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 |
| virtual bool | Trim (int dir, const ON_Interval &domain) |
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_BoundingBox &bbox, bool bGrowBox=false) const |
| bool | GetBoundingBox (ON_3dPoint &bbox_min, ON_3dPoint &bbox_max, 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 | MakeDeformable () |
| ON_Geometry & | operator= (const ON_Geometry &)=default |
| bool | Rotate (double sin_angle, double cos_angle, const ON_3dVector &rotation_axis, const ON_3dPoint &rotation_center) |
| bool | Rotate (double rotation_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_ComponentStatus states_to_clear) const |
| virtual unsigned int | ClearComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_clear) const |
| unsigned int | CopyUserData (const ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution) |
| void | CopyUserData (const ON_Object &source_object) |
| virtual bool | DeleteComponents (const ON_COMPONENT_INDEX *ci_list, size_t ci_count) |
| bool | DetachUserData (class ON_UserData *pUserData) |
| void | EmergencyDestroy () |
| class ON_UserData * | FirstUserData () const |
| virtual unsigned int | GetComponentsWithSetStates (ON_ComponentStatus states_filter, bool bAllEqualStates, ON_SimpleArray< ON_COMPONENT_INDEX > &components) const |
| class ON_UserData * | GetUserData (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 | IsKindOf (const ON_ClassId *pClassId) const |
| virtual void | MarkAggregateComponentStatusAsNotCurrent () const |
| virtual void | MemoryRelocate () |
| virtual ON_UUID | ModelObjectId () const |
| unsigned int | MoveUserData (ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution, bool bDeleteAllSourceItems) |
| void | MoveUserData (ON_Object &source_object) |
| ON_Object & | operator= (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) |
| 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 |
| of natural surface orientation More... | |
| 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 Attributes inherited from ON_Geometry | |
| static const ON_Geometry | Unset |
| ON_BrepFace::ON_BrepFace | ( | ) |
| ON_BrepFace::~ON_BrepFace | ( | ) |
| ON_BrepFace::ON_BrepFace | ( | int | ) |
| ON_Brep* ON_BrepFace::Brep | ( | ) | const |
Returns: Brep that the face belongs to.
| 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 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
| bool ON_BrepFace::ChangeSurface | ( | int | si, |
| bool | bTransformTrimCurves | ||
| ) |
|
overridevirtual |
virtual ON_Geometry::ClearBoundingBox() override
Reimplemented from ON_Geometry.
|
overridevirtual |
virtual ON_Geometry::ComponentIndex() override
Reimplemented from ON_Geometry.
|
overridevirtual |
virtual ON_Object::DataCRC override
Reimplemented from ON_Object.
| void ON_BrepFace::DestroyMesh | ( | ON::mesh_type | mesh_type, |
| bool | bDeleteMesh = true |
||
| ) |
Description: Destroy meshes used to render and analyze surface and polysrf 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
|
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.
|
overridevirtual |
for debugging
Reimplemented from ON_Object.
| 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.
|
overridevirtual |
virtual ON_Geometry GetBBox override
Reimplemented from ON_Geometry.
|
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: table true object is valid false object is invalid, uninitialized, etc.
Reimplemented from ON_Object.
| 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]];
| int ON_BrepFace::LoopCount | ( | ) | const |
Returns: Number of loops in this face.
| const ON_Mesh* ON_BrepFace::Mesh | ( | ON::mesh_type | mesh_type | ) | const |
| ON_BrepFace& ON_BrepFace::operator= | ( | const ON_BrepFace & | ) |
| ON_BrepLoop* ON_BrepFace::OuterLoop | ( | ) | const |
Returns: Outer boundary loop for this face.
|
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.
|
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.
|
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.
| 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.
| bool ON_BrepFace::SetMesh | ( | ON::mesh_type | , |
| ON_Mesh * | mesh | ||
| ) |
If true is returne, then ~ON_BrepFace will delete mesh.
Rendering Interface int MaterialIndex() const; ///< if -1, use parent's material definition void SetMaterialIndex(int);
|
overridevirtual |
virtual ON_Object::SizeOf override
ON_Object overrides
(Faces are purely topologicial - geometry queries should be directed at the face's 3d surface.)
Reimplemented from ON_Object.
| int ON_BrepFace::SurfaceIndexOf | ( | ) | const |
Returns: brep.m_S[] surface index of the 3d surface geometry used by this face or -1.
| const ON_Surface* ON_BrepFace::SurfaceOf | ( | ) | const |
Returns: Pointer to the surface geometry used by the face.
| bool ON_BrepFace::TransformTrim | ( | const ON_Xform & | xform | ) |
"Expert" Interface
Description: Expert user tool that tranforms 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.
|
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.
|
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.
|
friend |
int m_material_index; ///< if 0 (default), ON_Brep's object attributes ///< determine material.
| bool ON_BrepFace::m_bRev = false |
true if face orientation is opposite
| int ON_BrepFace::m_face_index = -1 |
index of face in ON_Brep.m_F[] array
| int ON_BrepFace::m_face_material_channel = 0 |
of natural surface orientation
m_face_material_channel provides a way to have individual brep faces use a rendering material that is different from the rendering material used by the parent brep. If m_face_material_channel is zero channel and m_face_material_channel.m_j is the back face materal. The default is (0,0) which indicates the face should use the parent brep's material. If "mat" is the brep's rendering material and 0 < m_material_channel.m_i < mat.m_material_channel.Count(), then this face should use the material with id mat.m_material_channel[face.m_material_channel.m_i-1].m_id. If m_material_channel.m_i or the id is invalid in any way, then the default should be used.
|
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.
| ON_UUID ON_BrepFace::m_face_uuid = ON_nil_uuid |
Persistent id for this face. Default is ON_nil_uuid.
| ON_SimpleArray<int> ON_BrepFace::m_li |
loop indices (outer loop is m_li[0])
| int ON_BrepFace::m_si = -1 |
index of surface in b-rep m_S[] array
|
mutable |