/Users/bernard/b20/bsoft/src/model/model_plane.cpp(3)

NAME
/Users/bernard/b20/bsoft/src/model/model_plane.cpp - Library routines used for plane models.

SYNOPSIS

#include 'model_create.h'
#include 'model_transform.h'
#include 'model_views.h'
#include 'model_util.h'
#include 'utilities.h'

  Functions
Vector3< double > model_fit_plane (Bmodel *model)
Fits a plane through a model.
double model_distance_to_guide (Vector3< double > loc, Vector3< double > vec, Bmodel *guide, double sigma2)
Calculates the distance between a location and the local guide model.
int model_adjust_to_guide (Bmodel *model, Bmodel *gmod, double sigma)
Adjusts a shell model to the faces of a polyhedral guide model.
Bmodel * model_generate_from_plane_guide (Bmodel *guide, double separation, double sigma)
Generates a plane model and fits a plane through it.

  Variables
int verbose

Detailed Description

Library routines used for plane models.

Author:
    Bernard Heymann

Date:
    Created: 20140925

    Modified: 20141008

Definition in file model_plane.cpp.

Function Documentation

  int model_adjust_to_guide (Bmodel * model, Bmodel * gmod, double sigma)

Adjusts a shell model to the faces of a polyhedral guide model.

For each component, it is determined whether it is located inside or
outside the appropriate polyhedral face, and its coordinates adjust
closer to the face by the indicated fraction.

Parameters:
    *model shell model.
    *gmod guide polyhedron model.
    sigma smoothness of model.

Returns:
    int 0.

Definition at line 136 of file model_plane.cpp.

  double model_distance_to_guide (Vector3< double > loc, Vector3< double > vec, Bmodel * guide, double sigma2)

Calculates the distance between a location and the local guide model.

Each guide component is used to calculate a distance of the location
to the guide plane and a lateral distance to the guide component.
The lateral distance is used to calculate a gaussian distributed weight
which in turn is used to calculate a weighted average of the distance
to the guide plane.

Parameters:
    loc location to be tested.
    vec direction vector associated with the location.
    *guide guide model.
    sigma2 smoothness weighting parameter.

Returns:
    Bmodel* new circle model.

Definition at line 102 of file model_plane.cpp.

  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:
    *model model structure.

Returns:
    Vector3<double> plane normal.

Definition at line 30 of file model_plane.cpp.

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

Generates a plane model and fits a plane through it.

Parameters:
    *guide model structure.
    separation separation between components for new model.
    sigma smoothness 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.

Definition at line 186 of file model_plane.cpp.

Variable Documentation

  int verbose

Author

Generated automatically by Doxygen for Bsoft from the source code.