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

#include <opennurbs_plus_sections.h>

Public Member Functions

 ON_SectionAnalysisPlane ()
 
bool GetPlaneEquation (int plane_index, ON_PlaneEquation &plane_equation) const
 
bool GetPlaneIndices (ON_BoundingBox bbox, double tolerance, int *plane_index0, int *plane_index1) const
 
bool operator!= (const ON_SectionAnalysisPlane &other) const
 Compares all field values except m_section_plane_id and m_section_plane_mark. More...
 
bool operator== (const ON_SectionAnalysisPlane &other) const
 Compares all field values except m_section_plane_id and m_section_plane_mark. More...
 

Public Attributes

unsigned char m_class_version
 constructor sets m_class_version = 0; More...
 
int m_max_plane_count
 
double m_plane_delta
 
int m_plane_delta_limits [2]
 
ON_PlaneEquation m_plane_equation
 
ON_UUID m_section_appearance_id
 
ON_UUID m_section_plane_id
 
ON__UINT64 m_section_plane_mark
 

Static Public Attributes

static const ON_SectionAnalysisPlane Default
 

Detailed Description

Copyright (c) 1993-2022 Robert McNeel & Associates. All rights reserved. OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert McNeel & Associates.

THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.

For complete openNURBS copyright information see http://www.opennurbs.org. The class ON_SectionAnalysisPlanes defines a set of parallel planes that are commonly used to analyze the geometry of a surface by viewing the intersections and sometimes the sectional curvature of the sections.

Constructor & Destructor Documentation

◆ ON_SectionAnalysisPlane()

ON_SectionAnalysisPlane::ON_SectionAnalysisPlane ( )

Member Function Documentation

◆ GetPlaneEquation()

bool ON_SectionAnalysisPlane::GetPlaneEquation ( int  plane_index,
ON_PlaneEquation plane_equation 
) const

◆ GetPlaneIndices()

bool ON_SectionAnalysisPlane::GetPlaneIndices ( ON_BoundingBox  bbox,
double  tolerance,
int *  plane_index0,
int *  plane_index1 
) const

Description: This function gets the plane indices for planes in this set of sectional analysis planes that will intersect the input bounding box.

Example: int plane_index0 = 0; int plane_index1 = 0; GetPlaneIndices(bbox,tolerance,&plane_index0,&plane_index1); for ( int i = plane_index0; i < plane_index1; i++ ) { ON_PlaneEquation pe(m_plane_equation); pe.d += i*m_plane_delta; }

◆ operator!=()

bool ON_SectionAnalysisPlane::operator!= ( const ON_SectionAnalysisPlane other) const

Compares all field values except m_section_plane_id and m_section_plane_mark.

◆ operator==()

bool ON_SectionAnalysisPlane::operator== ( const ON_SectionAnalysisPlane other) const

Compares all field values except m_section_plane_id and m_section_plane_mark.

Member Data Documentation

◆ Default

const ON_SectionAnalysisPlane ON_SectionAnalysisPlane::Default
static

◆ m_class_version

unsigned char ON_SectionAnalysisPlane::m_class_version

constructor sets m_class_version = 0;

Fields may be be added to this class during the V5 lifecycle. If that happens, then m_class_version will be incremented.

◆ m_max_plane_count

int ON_SectionAnalysisPlane::m_max_plane_count

◆ m_plane_delta

double ON_SectionAnalysisPlane::m_plane_delta

◆ m_plane_delta_limits

int ON_SectionAnalysisPlane::m_plane_delta_limits[2]

◆ m_plane_equation

ON_PlaneEquation ON_SectionAnalysisPlane::m_plane_equation

The "base plane" equation is stored in m_plane_equation.

If m_offset_spacing != 0, then sections are calculated at the planes a*x + b*y + c*z + (d - n*m_plane_delta), where n is an integer value. (The value n*m_plane_delta is subtracted so that positive values of n*m_plane_delta move the plane in the direction of the plane's normal vector and programmers who are not familiar with translating plane equations are more likely to get what they expect.)

If m_plane_delta_limits[0] < m_plane_delta_limits[1], then n is restricted to the range, m_plane_delta_limits[0] <= n < m_plane_delta_limits[1].
Otherwise all values of n are used and m_max_plane_count is used to limit the maximum number of section planes.

Observe that m_plane_delta is a 3d distance between the planes only when (x,y,z) is a unit vector.

If m_plane_delta_limits[0] <= m_plane_delta_limits[1] and m_plane_delta > 0, then m_max_plane_count is used to limit the number of section planes. If m_max_plane_count = 0, then at most 100 section planes will be calculated for any one object. If m_max_plane_count > 0, then the value of m_max_plane_count will be used to limit the number of section planes for any one object.

Use ON_SectionAnalysisPlane::GetPlaneIndices() to easily get a finite list of section planes that intersect a bounding box.

◆ m_section_appearance_id

ON_UUID ON_SectionAnalysisPlane::m_section_appearance_id

The appearance of the contours in the Rhino user interface is controlled by the values in a CRhinoSectionAnalysisAppearanceSettings with matching id.

◆ m_section_plane_id

ON_UUID ON_SectionAnalysisPlane::m_section_plane_id

The default copy constructor, operator=, and destructor work fine. Applications can use m_section_plane_id to track section plane appearance settings. The default constructor sets m_section_plane_id = ON_nil_id and nothing in opennurbs changes this value.

Rhino uses this value to detect when ON_PlanarSection information needs to be updated.

◆ m_section_plane_mark

ON__UINT64 ON_SectionAnalysisPlane::m_section_plane_mark

Applications can use m_section_plane_mark for any purpose. The default constructor sets this value to 0 and nothing in opennurbs changes this value.

Rhino saves a time() value in m_section_plane_mark and uses it to detect when ON_PlanarSection information needs to be updated.