+ rework BoundingBox class and its Python binding
This commit is contained in:
@@ -77,6 +77,8 @@
|
||||
#include "OpenCascadeAll.h"
|
||||
|
||||
#elif defined(FC_OS_WIN32)
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define NOMINMAX
|
||||
#include <windows.h>
|
||||
#endif //_PreComp_
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ CrossSections::CrossSections(const Base::BoundBox3d& bb, QWidget* parent, Qt::WF
|
||||
ui->distance->setDecimals(Base::UnitsApi::getDecimals());
|
||||
vp = new ViewProviderCrossSections();
|
||||
|
||||
Base::Vector3d c = bbox.CalcCenter();
|
||||
Base::Vector3d c = bbox.GetCenter();
|
||||
calcPlane(CrossSections::XY, c.z);
|
||||
ui->position->setValue(c.z);
|
||||
|
||||
@@ -269,7 +269,7 @@ void CrossSections::apply()
|
||||
|
||||
void CrossSections::on_xyPlane_clicked()
|
||||
{
|
||||
Base::Vector3d c = bbox.CalcCenter();
|
||||
Base::Vector3d c = bbox.GetCenter();
|
||||
ui->position->setValue(c.z);
|
||||
if (!ui->sectionsBox->isChecked()) {
|
||||
calcPlane(CrossSections::XY, c.z);
|
||||
@@ -285,7 +285,7 @@ void CrossSections::on_xyPlane_clicked()
|
||||
|
||||
void CrossSections::on_xzPlane_clicked()
|
||||
{
|
||||
Base::Vector3d c = bbox.CalcCenter();
|
||||
Base::Vector3d c = bbox.GetCenter();
|
||||
ui->position->setValue(c.y);
|
||||
if (!ui->sectionsBox->isChecked()) {
|
||||
calcPlane(CrossSections::XZ, c.y);
|
||||
@@ -301,7 +301,7 @@ void CrossSections::on_xzPlane_clicked()
|
||||
|
||||
void CrossSections::on_yzPlane_clicked()
|
||||
{
|
||||
Base::Vector3d c = bbox.CalcCenter();
|
||||
Base::Vector3d c = bbox.GetCenter();
|
||||
ui->position->setValue(c.x);
|
||||
if (!ui->sectionsBox->isChecked()) {
|
||||
calcPlane(CrossSections::YZ, c.x);
|
||||
@@ -332,7 +332,7 @@ void CrossSections::on_sectionsBox_toggled(bool b)
|
||||
}
|
||||
else {
|
||||
CrossSections::Plane type = plane();
|
||||
Base::Vector3d c = bbox.CalcCenter();
|
||||
Base::Vector3d c = bbox.GetCenter();
|
||||
double value = 0;
|
||||
switch (type) {
|
||||
case CrossSections::XY:
|
||||
|
||||
@@ -35,6 +35,11 @@
|
||||
# define PartGuiExport
|
||||
#endif
|
||||
|
||||
#ifdef FC_OS_WIN32
|
||||
# define NOMINMAX
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _PreComp_
|
||||
// here get the warnings of too long specifiers disabled (needed for VC6)
|
||||
#ifdef _MSC_VER
|
||||
@@ -43,9 +48,6 @@
|
||||
# pragma warning( disable : 4786 ) // specifier longer then 255 chars
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
// standard
|
||||
#include <iostream>
|
||||
//#include <stdio.h>
|
||||
|
||||
@@ -88,7 +88,7 @@ bool ViewProviderMirror::setEdit(int ModNum)
|
||||
float len = (float)bbox.CalcDiagonalLength();
|
||||
Base::Vector3d base = mf->Base.getValue();
|
||||
Base::Vector3d norm = mf->Normal.getValue();
|
||||
Base::Vector3d cent = bbox.CalcCenter();
|
||||
Base::Vector3d cent = bbox.GetCenter();
|
||||
base = cent.ProjToPlane(base, norm);
|
||||
|
||||
// setup the graph for editing the mirror plane
|
||||
|
||||
Reference in New Issue
Block a user