Measure::Measurement Class Reference

#include <Measurement.h>

Public Member Functions

int addReference3D (App::DocumentObject *obj, const char *subName)
 add a 3D reference (obj+sub) to end of list More...
 
int addReference3D (App::DocumentObject *obj, const std::string &subName)
 Add a reference. More...
 
double angle (const Base::Vector3d &param=Base::Vector3d(0, 0, 0)) const
 
void clear ()
 
Base::Vector3d delta () const
 
virtual unsigned int getMemSize (void) const
 
virtual PyObjectgetPyObject (void)
 This method returns the Python wrapper for a C++ object. More...
 
MeasureType getType ()
 
bool has3DReferences ()
 
double length () const
 
Base::Vector3d massCenter () const
 
 Measurement ()
 
double radius () const
 
 ~Measurement ()
 
- Public Member Functions inherited from Base::BaseClass
 BaseClass ()
 Construction. More...
 
 BaseClass (const BaseClass &)=default
 
virtual PyObjectgetPyObject ()
 This method returns the Python wrapper for a C++ object. More...
 
virtual Type getTypeId () const
 
bool isDerivedFrom (const Type type) const
 
BaseClassoperator= (const BaseClass &)=default
 
virtual void setPyObject (PyObject *)
 
virtual ~BaseClass ()
 Destruction. More...
 

Public Attributes

App::PropertyLinkSubList References3D
 

Protected Member Functions

TopoDS_Shape getShape (App::DocumentObject *obj, const char *subName) const
 

Protected Attributes

MeasureType measureType
 
Py::SmartPtr PythonObject
 

Additional Inherited Members

- Static Public Member Functions inherited from Base::BaseClass
static void * create ()
 
static Type getClassTypeId ()
 
static void init ()
 
- Static Protected Member Functions inherited from Base::BaseClass
static void initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=nullptr)
 

Constructor & Destructor Documentation

◆ Measurement()

Measurement::Measurement ( )

References App::Global, and Measure::Invalid.

◆ ~Measurement()

Measurement::~Measurement ( )

Member Function Documentation

◆ addReference3D() [1/2]

int Measurement::addReference3D ( App::DocumentObject obj,
const char *  subName 
)

◆ addReference3D() [2/2]

int Measurement::addReference3D ( App::DocumentObject obj,
const std::string &  subName 
)

◆ angle()

double Measurement::angle ( const Base::Vector3d param = Base::Vector3d(0,0,0)) const

References Base::Console(), Measure::Edges, Base::ConsoleSingleton::Error(), getShape(), App::PropertyLinkSubList::getSize(), App::PropertyLinkSubList::getSubValues(), App::PropertyLinkSubList::getValues(), Measure::Invalid, measureType, and References3D.

Referenced by drafttaskpanels.task_polararray.TaskPanelPolarArray::accept(), PathScripts.PathDressupDogbone.Bone::adaptiveLength(), draftguitools.gui_rotate.Rotate::build_copy_subelements_command(), draftguitools.gui_rotate.Rotate::build_rotate_subelements_command(), DraftGui.DraftToolBar::changeAngleValue(), PathScripts.PathDressupDogbone.Bone::corner(), drafttaskpanels.task_polararray.TaskPanelPolarArray::create_object(), PathScripts.PathDressupHoldingTags.Tag::createSolidsAt(), PathScripts.PathDressupDogbone.Bone::distance(), draftguitools.gui_arcs.Arc::drawArc(), PathScripts.PathDressupRampEntry.ObjectDressup::execute(), PathScripts.PathDressupRampEntry.ObjectDressup::generateRamps(), TechDraw::DrawViewDimension::getDimValue(), PathScripts.PathArray.PathArray::getPath(), draftguitools.gui_arcs.Arc::numericRadius(), draftguitools.gui_rotate.Rotate::numericRadius(), drafttaskpanels.task_polararray.TaskPanelPolarArray::print_messages(), DraftGui.DraftToolBar::reset_ui_values(), draftguitools.gui_rotate.Rotate::rotate_object(), DraftGui.DraftToolBar::toggleAngle(), DraftGui.DraftToolBar::update_cartesian_coords(), DraftGui.DraftToolBar::update_spherical_coords(), draftguitools.gui_arcs.Arc::updateAngle(), and drafttaskpanels.task_polararray.TaskPanelPolarArray::validate_input().

◆ clear()

◆ delta()

◆ getMemSize()

unsigned int Measurement::getMemSize ( void  ) const
virtual

◆ getPyObject()

PyObject * Measurement::getPyObject ( void  )
virtual

This method returns the Python wrapper for a C++ object.

It's in the responsibility of the programmer to do the correct reference counting. Basically there are two ways how to implement that: Either always return a new Python object then reference counting is not a matter or return always the same Python object then the reference counter must be incremented by one. However, it's absolutely forbidden to return always the same Python object without incrementing the reference counter.

The default implementation returns 'None'.

Reimplemented from Base::BaseClass.

References PythonObject.

◆ getShape()

TopoDS_Shape Measurement::getShape ( App::DocumentObject obj,
const char *  subName 
) const
protected

◆ getType()

◆ has3DReferences()

◆ length()

◆ massCenter()

◆ radius()

double Measurement::radius ( ) const

References Base::Console(), Measure::Edges, Base::ConsoleSingleton::Error(), getShape(), App::PropertyLinkSubList::getSize(), App::PropertyLinkSubList::getSubValues(), App::PropertyLinkSubList::getValues(), measureType, and References3D.

Referenced by PathScripts.PathPocketBase.ObjectPocket::areaOpAreaParams(), PathScripts.PathProfile.ObjectProfile::areaOpAreaParams(), PathScripts.PathPocketBase.ObjectPocket::areaOpPathParams(), PathScripts.PathAreaOp.ObjectOp::areaOpSetDefaultValues(), DraftGui.DraftToolBar::changeRadiusValue(), PathScripts.PathDressupHoldingTags.Tag::createSolidsAt(), PathScripts.PathSurface.ObjectSurface::deleteOpVariables(), PathScripts.PathWaterline.ObjectWaterline::deleteOpVariables(), PathScripts.PathOp.ObjectOp::execute(), TechDraw::DrawViewDimension::getDimValue(), PathScripts.PathDressupAxisMap.TaskPanel::getFields(), ifc4.ifcsweptdisksolid::innerradiussize(), length(), draftguitools.gui_snapper.Snapper::off(), PathScripts.PathSurfaceSupport.ProcessSelectedFaces::preProcessModel(), DraftGui.DraftToolBar::reset_ui_values(), draftguitools.gui_snapper.Snapper::showradius(), draftguitools.gui_snapper.Snapper::snapToCrossExtensions(), draftguitools.gui_snapper.Snapper::snapToExtensions(), draftguitools.gui_snapper.Snapper::snapToGrid(), draftguitools.gui_snapper.Snapper::snapToHold(), draftguitools.gui_snapper.Snapper::snapToPolar(), PathScripts.PathDressupAxisMap.TaskPanel::updateUI(), DraftGui.DraftToolBar::validatePoint(), automotive_design.right_circular_cone::wr1(), automotive_design.conical_surface::wr1(), config_control_design.conical_surface::wr1(), automotive_design.swept_disk_solid::wr2(), and ifc2x3.ifcsweptdisksolid::wr2().

Member Data Documentation

◆ measureType

MeasureType Measure::Measurement::measureType
protected

◆ PythonObject

Py::SmartPtr Measure::Measurement::PythonObject
protected

Referenced by getPyObject().

◆ References3D


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