### Rhino C++ Brep API Documentation Source: https://mcneel.github.io/rhino-cpp-api-docs/api/cpp/class_o_n___brep Comprehensive documentation for ON_Brep class methods, covering trim management, surface operations, and edge splitting. Includes method signatures, parameter details, return values, and brief descriptions. ```APIDOC ON_Brep Methods: SetTrimBoundingBox(ON_BrepTrim &trim, bool bLazy=false) - Sets the bounding box for a specific Brep trim. - Parameters: - trim: The ON_BrepTrim object to set the bounding box for. - bLazy: If true, the bounding box calculation might be deferred. - Returns: True if the bounding box was successfully set, false otherwise. SetTrimBoundingBoxes(bool bLazy=false) - Sets bounding boxes for all trims within the Brep. - Parameters: - bLazy: If true, the bounding box calculation might be deferred. - Returns: True if bounding boxes were successfully set for all trims, false otherwise. SetTrimBoundingBoxes(ON_BrepFace &face, bool bLazy=false) - Sets bounding boxes for all trims associated with a specific Brep face. - Parameters: - face: The ON_BrepFace object whose trims' bounding boxes will be set. - bLazy: If true, the bounding box calculation might be deferred. - Returns: True if bounding boxes were successfully set for the face's trims, false otherwise. SetTrimBoundingBoxes(ON_BrepLoop &loop, bool bLazy=false) - Sets bounding boxes for all trims associated with a specific Brep loop. - Parameters: - loop: The ON_BrepLoop object whose trims' bounding boxes will be set. - bLazy: If true, the bounding box calculation might be deferred. - Returns: True if bounding boxes were successfully set for the loop's trims, false otherwise. SetTrimCurve(ON_BrepTrim &trim, int c2_index, const ON_Interval *sub_domain=nullptr) - Sets the curve for a Brep trim. - Parameters: - trim: The ON_BrepTrim object to modify. - c2_index: The index of the curve in the Brep's curve list. - sub_domain: Optional interval defining a sub-domain for the trim curve. - Returns: True if the trim curve was successfully set, false otherwise. SetTrimDomain(int, const ON_Interval &) - Sets the domain for a trim. (Specific trim index not explicitly named in signature). - Parameters: - int: Index or identifier for the trim. - ON_Interval&: The interval to set as the trim's domain. - Returns: True if the trim domain was successfully set, false otherwise. SetTrimIsoFlags() - Sets all trim iso flags. This is a general call affecting all trims. - Returns: True if flags were successfully set, false otherwise. SetTrimIsoFlags(ON_BrepFace &face) - Sets iso flags for trims associated with a specific Brep face. - Parameters: - face: The ON_BrepFace object. - Returns: True if flags were successfully set for the face's trims, false otherwise. SetTrimIsoFlags(ON_BrepLoop &loop) - Sets iso flags for trims associated with a specific Brep loop. - Parameters: - loop: The ON_BrepLoop object. - Returns: True if flags were successfully set for the loop's trims, false otherwise. SetTrimIsoFlags(ON_BrepTrim &trim) - Sets iso flags for a specific Brep trim. - Parameters: - trim: The ON_BrepTrim object. - Returns: True if flags were successfully set for the trim, false otherwise. SetTrimTolerance(ON_BrepTrim &trim, bool bLazy=false) const - Sets the tolerance for a specific Brep trim. - Parameters: - trim: The ON_BrepTrim object to set the tolerance for. - bLazy: If true, tolerance calculation might be deferred. - Returns: True if the tolerance was successfully set, false otherwise. SetTrimTolerances(bool bLazy=false) - Sets tolerances for all trims within the Brep. - Parameters: - bLazy: If true, tolerance calculation might be deferred. - Returns: True if tolerances were successfully set for all trims, false otherwise. SetTrimTypeFlags(bool bLazy=false) - Sets all trim type flags. This is a general call affecting all trims. - Returns: True if flags were successfully set, false otherwise. SetTrimTypeFlags(ON_BrepFace &, bool bLazy=false) - Sets trim type flags for trims associated with a specific Brep face. - Parameters: - ON_BrepFace&: The Brep face. - bLazy: If true, flag calculation might be deferred. - Returns: True if flags were successfully set for the face's trims, false otherwise. SetTrimTypeFlags(ON_BrepLoop &, bool bLazy=false) - Sets trim type flags for trims associated with a specific Brep loop. - Parameters: - ON_BrepLoop&: The Brep loop. - bLazy: If true, flag calculation might be deferred. - Returns: True if flags were successfully set for the loop's trims, false otherwise. SetTrimTypeFlags(ON_BrepTrim &, bool bLazy=false) - Sets trim type flags for a specific Brep trim. - Parameters: - ON_BrepTrim&: The Brep trim. - bLazy: If true, flag calculation might be deferred. - Returns: True if flags were successfully set for the trim, false otherwise. SetVertexTolerance(ON_BrepVertex &vertex, bool bLazy=false) const - Sets the tolerance for a specific Brep vertex. - Parameters: - vertex: The ON_BrepVertex object to set the tolerance for. - bLazy: If true, tolerance calculation might be deferred. - Returns: True if the tolerance was successfully set, false otherwise. SetVertexTolerances(bool bLazy=false) - Sets tolerances for all vertices within the Brep. - Parameters: - bLazy: If true, tolerance calculation might be deferred. - Returns: True if tolerances were successfully set for all vertices, false otherwise. SetVertices(void) - Sets or updates vertices in the Brep. The exact behavior depends on internal state. ShrinkSurface(ON_BrepFace &face, int DisableSide=0) - Shrinks a specific Brep face. - Parameters: - face: The ON_BrepFace object to shrink. - DisableSide: Integer flag to control shrinking behavior on sides. - Returns: True if the surface was successfully shrunk, false otherwise. ShrinkSurfaces() - Shrinks all surfaces within the Brep. - Returns: True if all surfaces were successfully shrunk, false otherwise. SimplifyEdge(int edge_index, double tolerance) - Simplifies a specific edge of the Brep. - Parameters: - edge_index: The index of the edge to simplify. - tolerance: The tolerance for simplification. - Returns: True if the edge was successfully simplified, false otherwise. SizeOf() const override - Returns the size in bytes of the ON_Brep object. - Returns: The size of the object. SolidOrientation() const - Determines and returns the solid orientation of the Brep. - Returns: An integer representing the orientation (e.g., 1 for outward, -1 for inward, 0 for indeterminate). SortFaceLoops(ON_BrepFace &face) const - Sorts the loops of a specific Brep face. - Parameters: - face: The ON_BrepFace object whose loops will be sorted. - Returns: True if the loops were successfully sorted, false otherwise. SplitBipolarFaces() - Splits bipolar faces within the Brep. - Returns: True if splitting was successful, false otherwise. SplitBipolarFaces(bool bShrinkInSplitDirection) - Splits bipolar faces, with an option to shrink in the split direction. - Parameters: - bShrinkInSplitDirection: If true, shrinking occurs in the split direction. - Returns: True if splitting was successful, false otherwise. SplitClosedFaces(int min_degree, bool bShrinkInSplitDirection) - Splits closed faces based on a minimum degree and an option for shrinking. - Parameters: - min_degree: The minimum degree for splitting. - bShrinkInSplitDirection: If true, shrinking occurs in the split direction. - Returns: True if splitting was successful, false otherwise. SplitClosedFaces(int min_degree=0) - Splits closed faces based on a minimum degree. - Parameters: - min_degree: The minimum degree for splitting (defaults to 0). - Returns: True if splitting was successful, false otherwise. SplitEdge(int edge_index, double edge_t, const ON_SimpleArray< double > &trim_t, int vertex_index=-1, bool bSetTrimBoxesAndFlags=true) - Splits an edge at a specified parameter. - Parameters: - edge_index: The index of the edge to split. - edge_t: The parameter along the edge where the split occurs. - trim_t: An array of parameters along the trims associated with the edge. - vertex_index: Optional index for the new vertex created by the split. - bSetTrimBoxesAndFlags: If true, bounding boxes and flags are updated for new trims. - Returns: True if the edge was successfully split, false otherwise. SplitEdgeAtParameters(int edge_index, int edge_t_count, const double *edge_t) - Splits an edge at multiple specified parameters. - Parameters: - edge_index: The index of the edge to split. - edge_t_count: The number of parameters to split at. - edge_t: An array of parameters along the edge where splits occur. - Returns: The number of new edges created by the splits. ``` -------------------------------- ### PreGet Method Source: https://mcneel.github.io/rhino-cpp-api-docs/api/cpp/class_c_rhino_get_string Protected method called before getting input. It performs necessary setup operations. ```APIDOC void PreGet() ``` -------------------------------- ### ON_SurfaceProxy API Methods Source: https://mcneel.github.io/rhino-cpp-api-docs/api/cpp/class_o_n___brep_face Comprehensive documentation for ON_SurfaceProxy methods, including their signatures, parameters, return values, and descriptions. These methods provide access to surface properties, transformations, and geometric queries within the Rhino C++ SDK. ```APIDOC ON_SurfaceProxy API Methods: GetNextDiscontinuity 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 - Finds the next discontinuity in a specified direction. - Parameters: - dir: The direction (0 for U, 1 for V). - c: The type of continuity to check. - t0: The starting parameter value. - t1: The ending parameter value. - t: Output parameter for the location of the discontinuity. - hint: Optional hint for optimization. - dtype: Optional output for the type of discontinuity. - cos_angle_tolerance: Tolerance for angle checks. - curvature_tolerance: Tolerance for curvature checks. - Returns: true if a discontinuity is found, false otherwise. GetNurbForm int GetNurbForm(ON_NurbsSurface &, double = 0.0) const override - Gets the NURBS form of the surface. - Parameters: - ON_NurbsSurface &: Output parameter for the NURBS surface. - double: Optional tolerance. - Returns: 1 if successful, 0 if the surface is not a NURBS surface, -1 if an error occurred. GetNurbFormParameterFromSurfaceParameter bool GetNurbFormParameterFromSurfaceParameter(double surface_s, double surface_t, double *nurbs_s, double *nurbs_t) const override - Converts surface parameters to NURBS form parameters. - Parameters: - surface_s: The S parameter on the surface. - surface_t: The T parameter on the surface. - nurbs_s: Output parameter for the NURBS S parameter. - nurbs_t: Output parameter for the NURBS T parameter. - Returns: true if conversion is successful, false otherwise. GetParameterTolerance bool GetParameterTolerance(int, double, double *, double *) const override - Gets parameter tolerances for the surface. - Parameters: - int: The direction (0 for U, 1 for V). - double: The parameter value. - double *: Output parameter for the tolerance. - double *: Output parameter for the tolerance. - Returns: true if tolerances are obtained, false otherwise. GetSpanVector bool GetSpanVector(int, double *) const override - Gets the span vector of the surface. - Parameters: - int: The direction (0 for U, 1 for V). - double *: Output parameter for the span vector. - Returns: true if the span vector is obtained, false otherwise. GetSurfaceParameterFromNurbFormParameter bool GetSurfaceParameterFromNurbFormParameter(double nurbs_s, double nurbs_t, double *surface_s, double *surface_t) const override - Converts NURBS form parameters to surface parameters. - Parameters: - nurbs_s: The S parameter in NURBS form. - nurbs_t: The T parameter in NURBS form. - surface_s: Output parameter for the S parameter on the surface. - surface_t: Output parameter for the T parameter on the surface. - Returns: true if conversion is successful, false otherwise. GetSurfaceSize bool GetSurfaceSize(double *width, double *height) const override - Gets the size (width and height) of the surface in its parameter space. - Parameters: - width: Output parameter for the surface width. - height: Output parameter for the surface height. - Returns: true if the size is obtained, false otherwise. HasNurbForm int HasNurbForm() const override - Checks if the surface has a NURBS form. - Returns: 1 if it has a NURBS form, 0 otherwise. IsClosed bool IsClosed(int) const override - Checks if the surface is closed in a given direction. - Parameters: - int: The direction (0 for U, 1 for V). - Returns: true if closed, false otherwise. IsContinuous 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 - Checks for continuity at a given point on the surface. - Parameters: - c: The type of continuity to check. - s: The S parameter. - t: The T parameter. - hint: Optional hint for optimization. - point_tolerance: Tolerance for point comparison. - d1_tolerance: Tolerance for first derivative comparison. - d2_tolerance: Tolerance for second derivative comparison. - cos_angle_tolerance: Tolerance for angle checks. - curvature_tolerance: Tolerance for curvature checks. - Returns: true if the surface is continuous as specified, false otherwise. IsIsoparametric (bbox) ON_Surface::ISO IsIsoparametric(const ON_BoundingBox &bbox) const override - Checks if the surface is isoparametric with respect to a bounding box. - Parameters: - bbox: The bounding box to check against. - Returns: The isoparametric type (e.g., ON_Surface::ISO::none, ON_Surface::ISO::U, ON_Surface::ISO::V). IsIsoparametric (curve) ON_Surface::ISO IsIsoparametric(const ON_Curve &curve, const ON_Interval *curve_domain = nullptr) const override - Checks if the surface is isoparametric with respect to a curve. - Parameters: - curve: The curve to check against. - curve_domain: Optional domain of the curve. - Returns: The isoparametric type (e.g., ON_Surface::ISO::none, ON_Surface::ISO::U, ON_Surface::ISO::V). IsoCurve ON_Curve * IsoCurve(int dir, double c) const override - Creates an isoparametric curve on the surface. - Parameters: - dir: The direction (0 for U, 1 for V). - c: The parameter value for the isoparametric curve. - Returns: A pointer to the generated ON_Curve, or nullptr if an error occurs. IsPeriodic bool IsPeriodic(int) const override - Checks if the surface is periodic in a given direction. - Parameters: - int: The direction (0 for U, 1 for V). - Returns: true if periodic, false otherwise. IsPlanar bool IsPlanar(ON_Plane *plane = nullptr, double tolerance = ON_ZERO_TOLERANCE) const override - Checks if the surface is planar. - Parameters: - plane: Optional output parameter for the plane if the surface is planar. - tolerance: The tolerance for the planarity check. - Returns: true if planar, false otherwise. IsSingular bool IsSingular(int) const override - Checks if the surface is singular in a given direction. - Parameters: - int: The direction (0 for U, 1 for V). - Returns: true if singular, false otherwise. IsValid bool IsValid(class ON_TextLog *text_log = nullptr) const override - Checks if the surface is valid. - Parameters: - text_log: Optional text log for detailed error messages. - Returns: true if valid, false otherwise. Offset ON_Surface * Offset(double offset_distance, double tolerance, double *max_deviation = nullptr) const override - Creates an offset surface. - Parameters: - offset_distance: The distance to offset the surface. - tolerance: The tolerance for the offset operation. - max_deviation: Optional output parameter for the maximum deviation. - Returns: A pointer to the offset ON_Surface, or nullptr if an error occurs. operator= ON_SurfaceProxy & operator=(const ON_SurfaceProxy &) - Assignment operator for ON_SurfaceProxy. ProxySurface const ON_Surface * ProxySurface() const - Returns a pointer to the underlying ON_Surface object. - Returns: A const pointer to the ON_Surface. ``` -------------------------------- ### Get Line - RhinoGetLine C++ API Source: https://mcneel.github.io/rhino-cpp-api-docs/api/cpp/group___rhino_get This function interactively gets a line from the user. It uses CArgsRhinoGetLine for input options like prompts and fixed starting points. The line is returned as an ON_Line object. History support can be provided by passing a CRhinoHistory pointer. ```APIDOC RhinoGetLine(CArgsRhinoGetLine &args, ON_Line &line, CRhinoHistory *history = NULL) - Use RhinoGetLine() to interactively get an ON_Line. - The Rhino "Line" command uses RhinoGetLine. - Use CArgsRhinoGetLine to specify input options like prompts, fixed starting points, and so on. - The line is returned as the second argument. - If providing history support, pass a pointer to a CRhinoHistory class as the third argument. ``` -------------------------------- ### RhinoGetCircle: Get Circle (C++) Source: https://mcneel.github.io/rhino-cpp-api-docs/api/cpp/group___rhino_get A global utility function to interactively get a Circle. It starts in Center/Radius mode and switches methods based on user options. This function is used by the main circle command and takes arguments via CArgsRhinoGetCircle, outputting an ON_Circle. ```C++ CRhinoCommand::result RhinoGetCircle( CArgsRhinoGetCircle & args, ON_Circle & output_circle ) ``` -------------------------------- ### Rhino C++ API: ON_SurfaceProxy and ON_Geometry Bounding Box Methods Source: https://mcneel.github.io/rhino-cpp-api-docs/api/cpp/class_o_n___brep_face-members Documentation for methods related to bounding boxes for ON_SurfaceProxy and ON_Geometry classes. Includes methods to get bounding boxes in different formats. ```APIDOC Bounding Box Methods: ON_SurfaceProxy::GetClosestPoint(...) - (See ON_SurfaceProxy Methods section for details) ON_SurfaceProxy::DuplicateSurface() const override - Creates a duplicate of the surface. - Returns: A pointer to the duplicated surface. ON_Geometry::GetBoundingBox(ON_BoundingBox &bbox, bool bGrowBox=false) const - Gets the bounding box of the geometry in ON_BoundingBox format. - Parameters: - bbox: Output parameter for the bounding box. - bGrowBox: If true, expands the existing bounding box. - Returns: True if the bounding box was successfully computed. ON_Geometry::GetBoundingBox(ON_3dPoint &bbox_min, ON_3dPoint &bbox_max, bool bGrowBox=false) const - Gets the bounding box of the geometry using min and max points. - Parameters: - bbox_min: Output parameter for the minimum corner of the bounding box. - bbox_max: Output parameter for the maximum corner of the bounding box. - bGrowBox: If true, expands the existing bounding box. - Returns: True if the bounding box was successfully computed. ON_BrepFace::GetBBox(double *boxmin, double *boxmax, bool bGrowBox=false) const override - Gets the bounding box of the BrepFace in array format. - Parameters: - boxmin: Pointer to an array for the minimum corner coordinates. - boxmax: Pointer to an array for the maximum corner coordinates. - bGrowBox: If true, expands the existing bounding box. - Returns: True if the bounding box was successfully computed. ``` -------------------------------- ### ON_BrepTrim Constructors Source: https://mcneel.github.io/rhino-cpp-api-docs/api/cpp/class_o_n___brep_trim Documentation for the constructors of the ON_BrepTrim class. It is generally recommended to use ON_Brep::NewTrim instead of direct instantiation. ```APIDOC ON_BrepTrim::ON_BrepTrim(): Description: Default constructor. Generally, you should not directly create ON_BrepTrim classes. Use ON_Brep::NewTrim instead. ON_BrepTrim::ON_BrepTrim(int): Description: Constructor that takes an integer, likely for initializing the trim index. ``` -------------------------------- ### CRhinoDoc::GetFirstViewPosition Source: https://mcneel.github.io/rhino-cpp-api-docs/api/cpp/class_c_rhino_doc Gets the starting position for iterating through the views in the Rhino document. This is typically used in conjunction with GetNextView to traverse all views. ```cpp POSITION CRhinoDoc::GetFirstViewPosition() const ``` -------------------------------- ### Get Stereo Render Context for CDisplayPipelineAttributes Source: https://mcneel.github.io/rhino-cpp-api-docs/api/cpp/class_c_display_pipeline_attributes Retrieves the stereo rendering context associated with the display pipeline attributes. This is used for stereoscopic display setups. ```APIDOC CDisplayPipelineAttributes::GetStereoRenderContext ( void ) const - Retrieves the stereo render context. - Returns: StereoRenderContext object. ``` -------------------------------- ### ON_BrepTrim Methods Source: https://mcneel.github.io/rhino-cpp-api-docs/api/cpp/class_o_n___brep_trim Documentation for core methods of the ON_BrepTrim class, covering geometry manipulation, index retrieval, and debugging. ```APIDOC ChangeTrimCurve() Signature: bool ON_BrepTrim::ChangeTrimCurve(int c2i) Description: Expert user tool that replaces the 2d curve geometry of a trim. Parameters: c2i - [in] brep 2d curve index of new curve Returns: True if successful. Remarks: Sets m_c2i, calls SetProxyCurve, cleans runtime caches, and updates m_pbox. Example: ```cpp ON_Curve* pCurve = ...; int c2i = brep.AddTrimCurve(pCurve); trim.ChangeTrimCurve(c2i); ``` ``` ```APIDOC ComponentIndex() Signature: ON_COMPONENT_INDEX ON_BrepTrim::ComponentIndex() const override virtual Description: Reimplemented from ON_Geometry. Returns: The component index of the trim. ``` ```APIDOC DestroyPspaceInformation() Signature: void ON_BrepTrim::DestroyPspaceInformation() Description: Destroy parameter space information. Currently, this involves destroying m_pline and m_pbox. Parameter space information should be destroyed when the location of a trim curve is changed. ``` ```APIDOC DestroyRuntimeCache() Signature: void ON_BrepTrim::DestroyRuntimeCache(bool bDelete = true) override virtual Description: Expert user function. Destroys all runtime information caches. Useful when cached information is in non-standard memory pools. Parameters: bDelete - [in] if true, any cached information is properly deleted. If false, any cached information is simply discarded. Remarks: If you are using openNURBS in its default configuration to read and write 3dm archives, you never need to call this function. ``` ```APIDOC Dump() Signature: void ON_BrepTrim::Dump(ON_TextLog &) const override virtual Description: For debugging. Parameters: An ON_TextLog object to write the dump information to. ``` ```APIDOC Edge() Signature: ON_BrepEdge* ON_BrepTrim::Edge() const Description: Returns the Brep edge this trim uses or belongs to. Returns: A pointer to the ON_BrepEdge, or nullptr for singular trims. ``` ```APIDOC EdgeCurveIndexOf() Signature: int ON_BrepTrim::EdgeCurveIndexOf() const Description: Returns the index of the 3D curve geometry used by this trim within the brep's m_C3 array. Returns: The index in brep.m_C3[], or -1 if not found. ``` ```APIDOC EdgeCurveOf() Signature: const ON_Curve* ON_BrepTrim::EdgeCurveOf() const Description: Returns the 3D curve geometry used by this trim. Returns: A pointer to the ON_Curve, or nullptr if no curve is associated. ``` ```APIDOC Face() Signature: ON_BrepFace* ON_BrepTrim::Face() const Description: Returns the Brep face this trim belongs to. Returns: A pointer to the ON_BrepFace. ``` ```APIDOC FaceIndexOf() Signature: int ON_BrepTrim::FaceIndexOf() const Description: Returns the index of the face used by this trim within the brep's m_F array. Returns: The index in brep.m_F[], or -1 if not found. ``` -------------------------------- ### CRhinoGetPoint Usage Example Source: https://mcneel.github.io/rhino-cpp-api-docs/api/cpp/class_c_rhino_get_point An example demonstrating how to use CRhinoGetPoint to get a point from the user, allowing for custom prompts, default values, and options like specifying a radius. It handles different user inputs such as canceling, accepting defaults, specifying options, or picking a point. ```cpp CRhinoCommand::result my_center_radius_getter( ON_3dPoint& my_center, double* my_radius ) { double radius = 1.0; ON_3dPoint center(0,0,0); CRhinoGetPoint gp; gp.SetCommandPrompt( L"Center point" ); gp.SetCommandPromptDefault( L"(0,0,0)" ); gp.AddCommandOptionNumber( L"radius", &radius, "New radius", false, ON_ZERO_TOLERANCE); gp.AcceptNothing(true); for (;;) { gp.GetPoint(); switch (gp.Result()) { case CRhinoGet::cancel: return CRhinoCommand::cancel; break; case CRhinoGet::nothing: // user pressed enter - use default center value break; case CRhinoGet::option: // user changed radius value - radius automatically updated continue; break; case CRhinoGet::point: center = gp.Point(); break; default: continue; break; } break; } my_center = center; my_radius = radius; return CRhinoCommand::success; } ``` -------------------------------- ### ON_BrepFaceSide API Documentation Source: https://mcneel.github.io/rhino-cpp-api-docs/api/cpp/class_o_n___brep_face_side Comprehensive documentation for the ON_BrepFaceSide class, including its methods for archive I/O, property accessors, and member data. ```APIDOC ON_BrepFaceSide::operator= ( const ON_BrepFaceSide & other ) - Assignment operator for ON_BrepFaceSide. ON_BrepFaceSide::Read ( ON_BinaryArchive & binary_archive ) - Low level archive reading 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. ON_BrepFaceSide::Region ( ) const - Returns: - Region the face side belongs to. - Returns: - const ON_BrepRegion* ON_BrepFaceSide::RegionTopology ( ) const - Returns: - Region topology this face side belongs to. - Returns: - const ON_BrepRegionTopology* ON_BrepFaceSide::SurfaceNormalDirection ( ) const - Returns: - +1: underlying geometric surface normal points into region. - -1: underlying geometric surface normal points out of region. - Returns: - int ON_BrepFaceSide::Write ( ON_BinaryArchive & binary_archive ) const - 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. ON_BrepFaceSide::m_faceside_index - int ON_BrepFaceSide::m_faceside_index - index of face side in ON_BrepRegionTopology.m_FS[] array ON_BrepFaceSide::m_faceside_user - ON_U ON_BrepFaceSide::m_faceside_user - mutable - Union available for application use. The constructor zeros m_faceside_user. The value is of m_faceside_user is not saved in 3DM archives and may be changed by some computations. ON_BrepFaceSide::m_fi - int ON_BrepFaceSide::m_fi - face index ON_BrepFaceSide::m_ri - int ON_BrepFaceSide::m_ri - region index m_ri = -1 indicates this face side overlaps another face side. Generally this is a flaw in an ON_Brep. ``` -------------------------------- ### CRhinoDoc::GetPageViewNumber Source: https://mcneel.github.io/rhino-cpp-api-docs/api/cpp/class_c_rhino_doc Gets the page number of a given CRhinoPageView within the document. Returns the page number (starting at 0) on success, or -1 on failure. ```cpp int CRhinoDoc::GetPageViewNumber(const class CRhinoPageView & pageView) const ``` -------------------------------- ### Rhino C++ API: ON_SurfaceProxy Dimension and Domain Methods Source: https://mcneel.github.io/rhino-cpp-api-docs/api/cpp/class_o_n___brep_face-members Documentation for methods related to surface dimensions and domains for ON_SurfaceProxy objects. ```APIDOC ON_SurfaceProxy Dimension and Domain Methods: Dimension() const override - Returns the dimension of the surface (typically 2 for NURBS surfaces). - Returns: The dimension of the surface. Domain(int) const override - Retrieves the domain of the surface in a specified direction. - Parameters: - 0 or 1: The direction (0 for U, 1 for V). - Returns: An ON_Interval representing the domain for the specified direction. ``` -------------------------------- ### ON_BrepStarFacePack Class Members Source: https://mcneel.github.io/rhino-cpp-api-docs/api/cpp/class_o_n___brep_star_face_pack Details the constructors, member functions, static member functions, and attributes of the ON_BrepStarFacePack class. ```APIDOC ON_BrepStarFacePack Class Reference #include Class Summary: Represents a pack of star faces associated with an ON_Brep. Constructors & Destructor: ◆ ON_BrepStarFacePack() [1/2] Default constructor. ◆ ON_BrepStarFacePack(const ON_BrepStarFacePack&) [2/2] Copy constructor. ◆ ~ON_BrepStarFacePack() Destructor. Member Functions: ◆ ON_Brep* Brep() const Returns a pointer to the associated ON_Brep. ◆ ON_BrepVertex* Center() const Returns a pointer to the center vertex of the star face pack. ◆ unsigned FaceCount() const Returns the number of faces in this pack. ◆ bool IsEmpty() const Checks if the pack is empty. ◆ bool IsNotEmpty() const Checks if the pack is not empty. ◆ ON_BrepStarFacePack& operator=(const ON_BrepStarFacePack&) Assignment operator. Static Member Functions: ◆ static const ON_BrepStarFacePack* GetPack(const ON_BrepFace* face, unsigned int pack_id) Retrieves a specific star face pack for a given ON_BrepFace. Parameters: face: Pointer to the ON_BrepFace. pack_id: The identifier of the star face pack. Returns: Pointer to the ON_BrepStarFacePack or nullptr if not found. ◆ static const ON_BrepStarFacePack* GetPackTagged(const ON_BrepFace* face, unsigned count) Retrieves a star face pack based on a count of faces. Parameters: face: Pointer to the ON_BrepFace. count: The number of faces to match. Returns: Pointer to the ON_BrepStarFacePack or nullptr if not found. Member Attributes: ◆ unsigned m_size = 0U The size of the star face pack. ◆ ON_BrepQuadFacePackSide m_start {} Information about the starting side of the quad face pack. Static Member Attributes: ◆ static const ON_BrepStarFacePack Empty A static constant representing an empty ON_BrepStarFacePack. ``` -------------------------------- ### Get Elevator Height Source: https://mcneel.github.io/rhino-cpp-api-docs/api/cpp/class_c_rhino_viewport Calculates the height of an 'elevator' based on a world line, base point, axis, and grid snap settings. Useful for construction planes or guides. ```APIDOC GetElevatorHeight: bool GetElevatorHeight(const ON_Line &world_line, const ON_3dPoint &elevator_basepoint, const ON_3dVector &elevator_axis, BOOL32 bGridSnap, double grid_snap_spacing, double *elevator_height) const - Calculates the height of an elevator. - Parameters: - world_line: The line defining the elevator's extent in world space. - elevator_basepoint: The base point of the elevator. - elevator_axis: The axis vector of the elevator. - bGridSnap: Boolean indicating if grid snapping should be applied. - grid_snap_spacing: The spacing for grid snapping. - elevator_height: Pointer to a double where the calculated height will be stored. - Returns: true if the height was successfully calculated, false otherwise. ``` -------------------------------- ### SubdivisionPoint() Method (With Arg) Source: https://mcneel.github.io/rhino-cpp-api-docs/api/cpp/class_o_n___sub_d_edge_ptr Gets the location of the edge's subdivision vertex. The subdivision_count parameter specifies how many subdivisions to perform, starting from 1. ```cpp const ON_3dPoint ON_SubDEdgePtr::SubdivisionPoint(unsigned subdivision_count) const ``` -------------------------------- ### ON_BrepFace API Documentation Source: https://mcneel.github.io/rhino-cpp-api-docs/api/cpp/class_o_n___brep_face Comprehensive documentation for ON_BrepFace methods, detailing signatures, parameters, return values, and usage notes. ```APIDOC SetPerFaceColor(ON_Color *color) const - Sets the per-face color. - Parameters: - color: [in] The ON_Color object to set. ``` ```APIDOC SharedMesh(ON::mesh_type mesh_type) const - Returns a shared pointer to the constant ON_Mesh associated with the face. - Internal storage is now a std::shared_ptr to const ON_Mesh, allowing it to be set and accessed as such. - Parameters: - mesh_type: The type of mesh to retrieve. - Returns: A const shared pointer to the ON_Mesh. ``` ```APIDOC SizeOf() const overridevirtual - Returns the size of the ON_BrepFace object. - Remarks: Faces are purely topological; geometry queries should be directed at the face's 3d surface. - Reimplemented from ON_Object::SizeOf. - Returns: The size of the object in bytes. ``` ```APIDOC SurfaceIndexOf() const - Returns the index of the 3D surface geometry used by this face within the brep's surface array. - Parameters: None - Returns: The surface index, or -1 if not found. ``` ```APIDOC SurfaceOf() const - Returns a pointer to the surface geometry used by the face. - Parameters: None - Returns: A const pointer to the ON_Surface object. ``` ```APIDOC TransformTrim(const ON_Xform &xform) - 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, toggling m_bRev, flags, etc. - Parameters: - xform: [in] The transformation applied to the 2D curve geometry. - Returns: True if successful. If false is returned, the brep may be invalid. ``` ```APIDOC Transpose() overridevirtual - Toggles the face's m_bRev flag to transpose the surface parameterization (swap "s" and "t"). - This is an override of the virtual ON_Surface::Transpose function. - Remarks: The range of the face's trimming curves and the orientation direction of the loops are changed so that the resulting face is still valid. - Implements ON_Surface::Transpose. - Returns: True if successful. ``` ```APIDOC UniqueMesh(ON::mesh_type mesh_type) - Returns a shared pointer to a unique ON_Mesh. - Note that while this function returns a std::shared_ptr, the ON_Mesh is guaranteed unique and can be modified. - Parameters: - mesh_type: The type of mesh to retrieve. - Returns: A shared pointer to the unique ON_Mesh. ``` ```APIDOC Write(ON_BinaryArchive &binary_archive) const overridevirtual - Low-level archive writing tool used by ON_BinaryArchive::WriteObject(). - This function should only write the specific definition of this object, not chunk typecode or length information. - The default implementation returns false and does nothing. - Reimplemented from ON_Object::Write. - Parameters: - binary_archive: The archive to write to. - Returns: True if the write is successful. ``` -------------------------------- ### ON_SubDQuadFacePack Class API Documentation Source: https://mcneel.github.io/rhino-cpp-api-docs/api/cpp/class_o_n___sub_d_quad_face_pack Provides comprehensive API documentation for the ON_SubDQuadFacePack class, detailing its constructors, member functions, and attributes. This includes method signatures, parameter descriptions, return values, and usage context within the Rhino C++ API. ```APIDOC ON_SubDQuadFacePack Class Reference #include Class Summary: Represents a pack of quad faces for SubD geometry in the Rhino C++ API. Constructors & Destructor: ON_SubDQuadFacePack() [1/2] Default constructor. ~ON_SubDQuadFacePack() Default destructor. ON_SubDQuadFacePack(const ON_SubDQuadFacePack&) [2/2] Copy constructor (default). Member Functions: unsigned FaceCount() const Returns the number of faces in the pack. static const ON_SubDQuadFacePack& GetPack(unsigned int pack_seed_size, ON_SubDFace* face, unsigned int pack_id) Attempts to retrieve a quad pack. Parameters: pack_seed_size [in] >= 0: The minimum size quad grid that will be returned is pack_seed_size X pack_seed_size. face [in]: The quad pack will be grown around this face. pack_id [in]: If a quad pack is found, this is the id that will be assigned to each ON_SubDFace.m_pack_id in the quad pack. Returns: If a pack is found, ON_SubDQuadFacePack has details. Otherwise, ON_SubDQuadFacePack::Empty is returned. operator=(const ON_SubDQuadFacePack&) [default] Assignment operator (default). Member Attributes: ON_SubDQuadFacePackSide m_corners[4] = { ON_SubDQuadFacePackSide::Null, ON_SubDQuadFacePackSide::Null, ON_SubDQuadFacePackSide::Null, ON_SubDQuadFacePackSide::Null } Array storing information about the corners of the quad pack. ON_2udex m_size = ON_2udex::Zero Represents the size of the quad pack. Static Member Attributes: static const ON_SubDQuadFacePack Empty A static constant representing an empty ON_SubDQuadFacePack. ```