Gui::ManualAlignment Class Reference

#include <ManualAlignment.h>

Classes

class  Private
 

Public Member Functions

void align ()
 
void alignObject (App::DocumentObject *)
 This method performs the actual alignment of view pView. More...
 
bool canAlign () const
 
void cancel ()
 Cancels the process and closes the windows without performing an alignment. More...
 
void clearAll ()
 
void finish ()
 Terminates the process and closes the windows. More...
 
const Base::PlacementgetTransform () const
 
void setFixedGroup (const FixedGroup &)
 
void setMinPoints (int minPoints)
 
void setModel (const MovableGroupModel &)
 
void setViewingDirections (const Base::Vector3d &view1, const Base::Vector3d &up1, const Base::Vector3d &view2, const Base::Vector3d &up2)
 
void slotDeletedDocument (const Gui::Document &Doc)
 Checks if the given object is about to be removed. More...
 
void slotDeletedObject (const Gui::ViewProvider &Obj)
 Checks if the given document is about to be closed. More...
 
void startAlignment (Base::Type mousemodel)
 Performs the alignment for the specified aligned and non-aligned views specified by setModel() and setFixedGroup(). More...
 

Static Public Member Functions

static void destruct ()
 Destructs the one and only instance of this class. More...
 
static bool hasInstance ()
 Checks whether the one instance exists. More...
 
static ManualAlignmentinstance ()
 Creates the one and only instance of this class. More...
 

Protected Member Functions

bool computeAlignment (const std::vector< PickedPoint > &movPts, const std::vector< PickedPoint > &fixPts)
 This method computes the alignment. More...
 
void continueAlignment ()
 If still one view needs to be aligned then it is shown in the first window. More...
 
 ManualAlignment ()
 Construction. More...
 
void showInstructions ()
 
 ~ManualAlignment ()
 Destruction. More...
 

Probe picking

bool applyPickedProbe (Gui::ViewProviderDocumentObject *, const SoPickedPoint *pnt)
 This method stores the picked point pnt from the view provider prov. More...
 
static void probePickedCallback (void *ud, SoEventCallback *n)
 
void reset ()
 Make all views unpickable and resets internal data. More...
 
void onAlign ()
 
void onRemoveLastPointMoveable ()
 
void onRemoveLastPointFixed ()
 
void onClear ()
 
void onCancel ()
 
void emitCanceled ()
 
void emitFinished ()
 

Detailed Description

Author
Werner Mayer

Constructor & Destructor Documentation

◆ ManualAlignment()

◆ ~ManualAlignment()

ManualAlignment::~ManualAlignment ( )
protected

Destruction.

Member Function Documentation

◆ align()

◆ alignObject()

void ManualAlignment::alignObject ( App::DocumentObject obj)

This method performs the actual alignment of view pView.

References Base::Persistence::getClassTypeId(), and App::GeoFeature::transformPlacement().

Referenced by align().

◆ applyPickedProbe()

bool ManualAlignment::applyPickedProbe ( Gui::ViewProviderDocumentObject prov,
const SoPickedPoint *  pnt 
)
protected

◆ canAlign()

bool ManualAlignment::canAlign ( ) const

◆ cancel()

void ManualAlignment::cancel ( void  )

◆ clearAll()

void ManualAlignment::clearAll ( )

◆ computeAlignment()

bool ManualAlignment::computeAlignment ( const std::vector< PickedPoint > &  movPts,
const std::vector< PickedPoint > &  fixPts 
)
protected

This method computes the alignment.

For the calculation of the alignment the picked points of both views are taken. If the alignment fails false is returned, true otherwise.

References Base::Vector3< _Precision >::Normalize(), Base::Placement::setPosition(), Gui::ManualAlignment::Private::transformation2x2(), and Gui::ManualAlignment::Private::transformation3x3().

Referenced by align().

◆ continueAlignment()

void ManualAlignment::continueAlignment ( )
protected

◆ destruct()

void ManualAlignment::destruct ( void  )
static

Destructs the one and only instance of this class.

◆ emitCanceled

void Gui::ManualAlignment::emitCanceled ( )
signal

Referenced by cancel().

◆ emitFinished

void Gui::ManualAlignment::emitFinished ( )
signal

Referenced by finish().

◆ finish()

void ManualAlignment::finish ( )

Terminates the process and closes the windows.

References emitFinished(), Gui::Document::getDocument(), Gui::getMainWindow(), App::Document::recompute(), reset(), and Gui::MainWindow::showMessage().

Referenced by drafttaskpanels.task_circulararray.TaskPanelCircularArray::accept(), drafttaskpanels.task_orthoarray.TaskPanelOrthoArray::accept(), drafttaskpanels.task_polararray.TaskPanelPolarArray::accept(), draftguitools.gui_arcs.Arc::action(), draftguitools.gui_beziers.BezCurve::action(), draftguitools.gui_beziers.CubicBezCurve::action(), draftguitools.gui_dimensions.Dimension::action(), draftguitools.gui_ellipses.Ellipse::action(), draftguitools.gui_fillets.Fillet::action(), draftguitools.gui_labels.Label::action(), draftguitools.gui_lines.Line::action(), draftguitools.gui_mirror.Mirror::action(), draftguitools.gui_move.Move::action(), draftguitools.gui_offset.Offset::action(), draftguitools.gui_polygons.Polygon::action(), draftguitools.gui_rectangles.Rectangle::action(), draftguitools.gui_rotate.Rotate::action(), draftguitools.gui_scale.Scale::action(), draftguitools.gui_selectplane.Draft_SelectPlane::action(), draftguitools.gui_shapestrings.ShapeString::action(), draftguitools.gui_splines.BSpline::action(), draftguitools.gui_split.Split::action(), draftguitools.gui_stretch.Stretch::action(), draftguitools.gui_texts.Text::action(), draftguitools.gui_trimex.Trimex::action(), draftguitools.gui_subelements.SubelementHighlight::action(), draftguitools.gui_clone.Clone::Activated(), draftguitools.gui_dimensions.Dimension::Activated(), draftguitools.gui_downgrade.Downgrade::Activated(), draftguitools.gui_draft2sketch.Draft2Sketch::Activated(), draftguitools.gui_edit.Edit::Activated(), draftguitools.gui_facebinders.Facebinder::Activated(), draftguitools.gui_join.Join::Activated(), draftguitools.gui_shape2dview.Shape2DView::Activated(), draftguitools.gui_subelements.SubelementHighlight::Activated(), draftguitools.gui_upgrade.Upgrade::Activated(), draftguitools.gui_wire2spline.WireToBSpline::Activated(), align(), draftguitools.gui_selectplane.Draft_SelectPlane::checkSelection(), DraftGui.DraftToolBar::checkSpecialChars(), draftguitools.gui_points.Point::click(), continueAlignment(), draftguitools.gui_labels.Label::create(), draftguitools.gui_ellipses.Ellipse::createObject(), draftguitools.gui_rectangles.Rectangle::createObject(), draftguitools.gui_shapestrings.ShapeString::createObject(), draftguitools.gui_texts.Text::createObject(), draftviewproviders.view_text.ViewProviderText::createObject(), draftguitools.gui_stretch.Stretch::doStretch(), draftguitools.gui_arcs.Arc::drawArc(), draftguitools.gui_polygons.Polygon::drawPolygon(), DraftGui.DraftToolBar::escape(), draftguitools.gui_move.Move::get_object_selection(), draftguitools.gui_rotate.Rotate::get_object_selection(), draftguitools.gui_scale.Scale::get_object_selection(), draftguitools.gui_arcs.Arc_3Points::getPoint(), draftguitools.gui_edit.Edit::keyPressed(), draftguitools.gui_dimensions.Dimension::numericInput(), draftguitools.gui_trimex.Trimex::numericRadius(), draftguitools.gui_fillets.Fillet::numericRadius(), draftguitools.gui_offset.Offset::numericRadius(), draftguitools.gui_rotate.Rotate::numericRadius(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickAlign(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickAuto(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickCenter(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickFront(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickMove(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickPrevious(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickSide(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickTop(), draftguitools.gui_array_simple.Array::proceed(), draftguitools.gui_clone.Clone::proceed(), draftguitools.gui_downgrade.Downgrade::proceed(), draftguitools.gui_draft2sketch.Draft2Sketch::proceed(), draftguitools.gui_edit.Edit::proceed(), draftguitools.gui_facebinders.Facebinder::proceed(), draftguitools.gui_join.Join::proceed(), draftguitools.gui_patharray.PathArray::proceed(), draftguitools.gui_pathtwistedarray.PathTwistedArray::proceed(), draftguitools.gui_pointarray.PointArray::proceed(), draftguitools.gui_shape2dview.Shape2DView::proceed(), draftguitools.gui_subelements.SubelementHighlight::proceed(), draftguitools.gui_trimex.Trimex::proceed(), draftguitools.gui_upgrade.Upgrade::proceed(), draftguitools.gui_split.Split::proceed(), draftguitools.gui_selectplane.Draft_SelectPlane::reject(), drafttaskpanels.task_circulararray.TaskPanelCircularArray::reject(), drafttaskpanels.task_orthoarray.TaskPanelOrthoArray::reject(), drafttaskpanels.task_polararray.TaskPanelPolarArray::reject(), and draftguitools.gui_edit.Edit::setTrackers().

◆ getTransform()

const Base::Placement & Gui::ManualAlignment::getTransform ( void  ) const

◆ hasInstance()

bool ManualAlignment::hasInstance ( )
static

Checks whether the one instance exists.

◆ instance()

ManualAlignment * ManualAlignment::instance ( void  )
static

Creates the one and only instance of this class.

References ManualAlignment().

Referenced by probePickedCallback().

◆ onAlign

void ManualAlignment::onAlign ( )
protectedslot

References align().

Referenced by probePickedCallback().

◆ onCancel

void ManualAlignment::onCancel ( )
protectedslot

References cancel().

Referenced by probePickedCallback().

◆ onClear

◆ onRemoveLastPointFixed

void ManualAlignment::onRemoveLastPointFixed ( )
protectedslot

◆ onRemoveLastPointMoveable

◆ probePickedCallback()

◆ reset

◆ setFixedGroup()

void ManualAlignment::setFixedGroup ( const FixedGroup fixed)

◆ setMinPoints()

void ManualAlignment::setMinPoints ( int  minPoints)

◆ setModel()

void ManualAlignment::setModel ( const MovableGroupModel model)

◆ setViewingDirections()

void ManualAlignment::setViewingDirections ( const Base::Vector3d view1,
const Base::Vector3d up1,
const Base::Vector3d view2,
const Base::Vector3d up2 
)

◆ showInstructions()

◆ slotDeletedDocument()

void ManualAlignment::slotDeletedDocument ( const Gui::Document Doc)

Checks if the given object is about to be removed.

Handle if the current document is about to being closed.

References reset().

Referenced by ManualAlignment().

◆ slotDeletedObject()

void ManualAlignment::slotDeletedObject ( const Gui::ViewProvider Obj)

Checks if the given document is about to be closed.

Handle if the a view provider is about to being destroyed.

References Gui::MovableGroupModel::activeGroup(), cancel(), Base::Persistence::getClassTypeId(), Base::Persistence::getTypeId(), Gui::AlignmentGroup::hasView(), and Base::Type::isDerivedFrom().

Referenced by startAlignment().

◆ startAlignment()


The documentation for this class was generated from the following files: