Bsoft 2.1.4
Bernard's software package
model_plane.h File Reference

Library routines used for plane models. More...

#include "rwmodel.h"

Functions

Vector3< double > model_fit_plane (Bmodel *model)
 Fits a plane through a model. More...
 
Bmodelmodel_generate_from_plane_guide (Bmodel *guide, double separation, double sigma)
 Generates a plane model and fits a plane through it. More...
 

Detailed Description

Library routines used for plane models.

Author
Bernard Heymann
Date
Created: 20140925
Modified: 20141008

Function Documentation

◆ model_fit_plane()

Vector3< double > model_fit_plane ( Bmodel model)

Fits a plane through a model.

A plane is fit through the components and the normal calculated from:
    n•p = d
where n is the normal vector, p is a point in the plane, and d is the offset.
Only the first model is fit.
Parameters
*modelmodel structure.
Returns
Vector3<double> plane normal.

◆ model_generate_from_plane_guide()

Bmodel * model_generate_from_plane_guide ( Bmodel guide,
double  separation,
double  sigma 
)

Generates a plane model and fits a plane through it.

Parameters
*guidemodel structure.
separationseparation between components for new model.
sigmasmoothness of model.
Returns
Bmodel* new model based on input model.
The principal axes of a planar model are calculated and a new plane model
generated with the given separation between components.
The components of the new model are then adjusted to fit the guide model.