#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 ¶m=Base::Vector3d(0, 0, 0)) const |
void | clear () |
Base::Vector3d | delta () const |
virtual unsigned int | getMemSize (void) const |
virtual PyObject * | getPyObject (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 PyObject * | getPyObject () |
This method returns the Python wrapper for a C++ object. More... | |
virtual Type | getTypeId () const |
bool | isDerivedFrom (const Type type) const |
BaseClass & | operator= (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) |
Measurement::Measurement | ( | ) |
References App::Global, and Measure::Invalid.
Measurement::~Measurement | ( | ) |
int Measurement::addReference3D | ( | App::DocumentObject * | obj, |
const char * | subName | ||
) |
add a 3D reference (obj+sub) to end of list
References App::PropertyLinkSubList::getSize(), App::PropertyLinkSubList::getSubValues(), getType(), App::PropertyLinkSubList::getValues(), measureType, References3D, and App::PropertyLinkSubList::setValues().
int Measurement::addReference3D | ( | App::DocumentObject * | obj, |
const std::string & | subName | ||
) |
Add a reference.
References addReference3D().
Referenced by addReference3D(), and TechDraw::DrawViewDimension::setAll3DMeasurement().
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().
void Measurement::clear | ( | ) |
References Measure::Invalid, measureType, References3D, and App::PropertyLinkSubList::setValues().
Referenced by TechDraw::DrawViewDimension::clear3DMeasurements(), and TechDraw::DrawViewDimension::setAll3DMeasurement().
Base::Vector3d Measurement::delta | ( | ) | const |
References Base::Console(), Measure::Edges, Base::ConsoleSingleton::Error(), getShape(), App::PropertyLinkSubList::getSize(), App::PropertyLinkSubList::getSubValues(), App::PropertyLinkSubList::getValues(), Measure::Invalid, measureType, Measure::PointToEdge, Measure::PointToSurface, and References3D.
Referenced by draftguitools.gui_scale.Scale::build_copy_subelements_command(), draftguitools.gui_scale.Scale::build_scale_subelements_command(), length(), draftguitools.gui_scale.Scale::scale_object(), draftguitools.gui_scale.Scale::scale_with_clone(), Mod.Test.UnitTests.UnitBasicCases::testEnergy(), Mod.Test.UnitTests.UnitBasicCases::testImperial(), Mod.Test.UnitTests.UnitBasicCases::testSchemes(), and Mod.Test.UnitTests.UnitBasicCases::testVoltage().
|
virtual |
|
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.
|
protected |
References Part::Feature::getShape().
Referenced by angle(), delta(), length(), massCenter(), and radius().
MeasureType Measurement::getType | ( | void | ) |
References Measure::Edges, Part::Feature::getShape(), App::PropertyLinkSubList::getSubValues(), App::PropertyLinkSubList::getValues(), Measure::Invalid, Measure::Points, Measure::PointToEdge, Measure::PointToSurface, References3D, Measure::Surfaces, and Measure::Volumes.
Referenced by addReference3D(), PathScripts.PathToolEdit.ToolEditor::updateToolType(), and PathScripts.PathToolEdit.ToolEditor::updateUI().
bool Measurement::has3DReferences | ( | ) |
References App::PropertyLinkSubList::getSize(), and References3D.
Referenced by TechDraw::DrawViewDimension::getDimValue(), and TechDraw::DrawViewDimension::onChanged().
double Measurement::length | ( | ) | const |
References Base::Console(), delta(), Measure::Edges, Base::ConsoleSingleton::Error(), getShape(), App::PropertyLinkSubList::getSize(), App::PropertyLinkSubList::getSubValues(), App::PropertyLinkSubList::getValues(), Measure::Invalid, measureType, Measure::PointToEdge, Measure::PointToSurface, radius(), and References3D.
Referenced by PathScripts.PathStock.StockFromBase::execute(), PathScripts.PathDressupDogbone.ObjectDressup::execute(), TechDraw::DrawViewDimension::getDimValue(), PathScripts.PathFeatureExtensions.Extension::getSubLink(), PathScripts.PathFeatureExtensions.Extension::getWire(), and Mod.PartDesign.Scripts.FilletArc.Vector::norm().
Base::Vector3d Measurement::massCenter | ( | ) | const |
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().
|
protected |
Referenced by addReference3D(), angle(), clear(), delta(), length(), massCenter(), and radius().
|
protected |
Referenced by getPyObject().
App::PropertyLinkSubList Measure::Measurement::References3D |
Referenced by addReference3D(), angle(), clear(), delta(), getType(), has3DReferences(), length(), massCenter(), and radius().