Console: rename PascalCase named methods to camelCase

This commit is contained in:
bofdahof
2025-03-30 00:50:27 +10:00
committed by Kacper Donat
parent 1dbc0638c3
commit ba2c2ca5ad
497 changed files with 2423 additions and 2425 deletions

View File

@@ -82,7 +82,7 @@ PyMOD_INIT_FUNC(TechDraw)
PyMOD_Return(nullptr);
}
PyObject* mod = TechDraw::initModule();
Base::Console().Log("Loading TechDraw module... done\n");
Base::Console().log("Loading TechDraw module... done\n");
TechDraw::DrawPage ::init();
TechDraw::DrawView ::init();

View File

@@ -211,7 +211,7 @@ private:
str += " ";
if (msg) {str += msg;}
else {str += "No OCCT Exception Message";}
Base::Console().Error("%s\n", str.c_str());
Base::Console().error("%s\n", str.c_str());
throw Py::Exception(Part::PartExceptionOCCError, str);
}
catch (const Base::Exception &e) {
@@ -227,7 +227,7 @@ private:
str += "C++ exception thrown (";
str += e.what();
str += ")";
Base::Console().Error("%s\n", str.c_str());
Base::Console().error("%s\n", str.c_str());
throw Py::RuntimeError(str);
}
}
@@ -284,7 +284,7 @@ private:
}
if (sortedWires.empty()) {
Base::Console().Warning("ATDP::edgeWalker: Wire detection failed\n");
Base::Console().warning("ATDP::edgeWalker: Wire detection failed\n");
return Py::None();
}
else {
@@ -322,7 +322,7 @@ private:
}
if (edgeList.empty()) {
Base::Console().Message("ATDP::findOuterWire: input is empty\n");
Base::Console().message("ATDP::findOuterWire: input is empty\n");
return Py::None();
}
@@ -343,7 +343,7 @@ private:
}
if(sortedWires.empty()) {
Base::Console().Warning("ATDP::findOuterWire: Outline wire detection failed\n");
Base::Console().warning("ATDP::findOuterWire: Outline wire detection failed\n");
return Py::None();
} else {
outerWire = new TopoShapeWirePy(new TopoShape(*sortedWires.begin()));
@@ -372,7 +372,7 @@ private:
TopoShapePy* pShape = static_cast<TopoShapePy*>(pcObjShape);
if (!pShape) {
Base::Console().Message("TRACE - AATDP::findShapeOutline - input shape is null\n");
Base::Console().message("TRACE - AATDP::findShapeOutline - input shape is null\n");
return Py::None();
}
@@ -408,7 +408,7 @@ private:
}
if(sortedWires.empty()) {
Base::Console().Warning("ATDP::findShapeOutline: Outline wire detection failed\n");
Base::Console().warning("ATDP::findShapeOutline: Outline wire detection failed\n");
return Py::None();
} else {
outerWire = new TopoShapeWirePy(new TopoShape(*sortedWires.begin()));
@@ -435,7 +435,7 @@ private:
dvp = static_cast<TechDraw::DrawViewPart*>(obj);
TechDraw::GeometryObjectPtr gObj = dvp->getGeometryObject();
if (!gObj) {
Base::Console().Message("TechDraw: %s has no geometry object!\n", dvp->Label.getValue());
Base::Console().message("TechDraw: %s has no geometry object!\n", dvp->Label.getValue());
return Py::String();
}
TopoDS_Shape shape = ShapeUtils::mirrorShape(gObj->getVisHard());
@@ -498,7 +498,7 @@ private:
dvp = static_cast<TechDraw::DrawViewPart*>(obj);
TechDraw::GeometryObjectPtr gObj = dvp->getGeometryObject();
if (!gObj) {
Base::Console().Message("TechDraw: %s has no geometry object!\n", dvp->Label.getValue());
Base::Console().message("TechDraw: %s has no geometry object!\n", dvp->Label.getValue());
return Py::String();
}
@@ -568,7 +568,7 @@ private:
TechDraw::GeometryObjectPtr gObj = dvp->getGeometryObject();
if (!gObj) {
// this test might be redundant here since we already checked hasGeometry.
Base::Console().Message("TechDraw: %s has no geometry object!\n", dvp->Label.getValue());
Base::Console().message("TechDraw: %s has no geometry object!\n", dvp->Label.getValue());
return;
}
TopoDS_Shape shape = ShapeUtils::mirrorShape(gObj->getVisHard());
@@ -849,7 +849,7 @@ private:
TopoShapePy* pShape = static_cast<TopoShapePy*>(pcObjShape);
if (!pShape) {
Base::Console().Error("ShapeUtils::findCentroid - input shape is null\n");
Base::Console().error("ShapeUtils::findCentroid - input shape is null\n");
return Py::None();
}
@@ -1020,7 +1020,7 @@ private:
}
Base::FileInfo fi(patFile);
if (!fi.isReadable()) {
Base::Console().Error(".pat File: %s is not readable\n", patFile.c_str());
Base::Console().error(".pat File: %s is not readable\n", patFile.c_str());
return Py::None();
}
std::vector<TechDraw::PATLineSpec> specs = TechDraw::DrawGeomHatch::getDecodedSpecsFromFile(patFile, patName);

View File

@@ -142,7 +142,7 @@ void CenterLine::initialize()
TechDraw::BaseGeomPtr CenterLine::BaseGeomPtrFromVectors(Base::Vector3d pt1, Base::Vector3d pt2)
{
// Base::Console().Message("CE::CE(p1, p2)\n");
// Base::Console().message("CE::CE(p1, p2)\n");
Base::Vector3d p1 = DrawUtil::invertY(pt1);
Base::Vector3d p2 = DrawUtil::invertY(pt2);
gp_Pnt gp1(p1.x, p1.y, p1.z);
@@ -157,7 +157,7 @@ CenterLine* CenterLine::CenterLineBuilder(const DrawViewPart* partFeat,
const Mode mode,
const bool flip)
{
// Base::Console().Message("CL::CLBuilder()\n - subNames: %d\n", subNames.size());
// Base::Console().message("CL::CLBuilder()\n - subNames: %d\n", subNames.size());
std::pair<Base::Vector3d, Base::Vector3d> ends;
std::vector<std::string> faces;
std::vector<std::string> edges;
@@ -191,9 +191,9 @@ CenterLine* CenterLine::CenterLineBuilder(const DrawViewPart* partFeat,
verts = subNames;
}
if ((ends.first).IsEqual(ends.second, Precision::Confusion())) {
Base::Console().Warning("CenterLineBuilder - endpoints are equal: %s\n",
Base::Console().warning("CenterLineBuilder - endpoints are equal: %s\n",
DrawUtil::formatVector(ends.first).c_str());
Base::Console().Warning("CenterLineBuilder - check V/H/A and/or Flip parameters\n");
Base::Console().warning("CenterLineBuilder - check V/H/A and/or Flip parameters\n");
return nullptr;
}
@@ -212,7 +212,7 @@ CenterLine* CenterLine::CenterLineBuilder(const DrawViewPart* partFeat,
TechDraw::BaseGeomPtr CenterLine::scaledGeometry(const TechDraw::DrawViewPart* partFeat)
{
// Base::Console().Message("CL::scaledGeometry() - m_type: %d\n", m_type);
// Base::Console().message("CL::scaledGeometry() - m_type: %d\n", m_type);
double scale = partFeat->getScale();
double viewAngleDeg = partFeat->Rotation.getValue();
std::pair<Base::Vector3d, Base::Vector3d> ends;
@@ -220,7 +220,7 @@ TechDraw::BaseGeomPtr CenterLine::scaledGeometry(const TechDraw::DrawViewPart* p
if (m_faces.empty() &&
m_edges.empty() &&
m_verts.empty() ) {
// Base::Console().Message("CL::scaledGeometry - no geometry to scale!\n");
// Base::Console().message("CL::scaledGeometry - no geometry to scale!\n");
//CenterLine was created by points without a geometry reference,
ends = calcEndPointsNoRef(m_start, m_end, scale, m_extendBy,
m_hShift, m_vShift, m_rotate, viewAngleDeg);
@@ -245,14 +245,14 @@ TechDraw::BaseGeomPtr CenterLine::scaledGeometry(const TechDraw::DrawViewPart* p
}
catch (...) {
Base::Console().Error("CL::scaledGeometry - failed to calculate endpoints!\n");
Base::Console().error("CL::scaledGeometry - failed to calculate endpoints!\n");
return nullptr;
}
Base::Vector3d p1 = ends.first;
Base::Vector3d p2 = ends.second;
if (p1.IsEqual(p2, 0.00001)) {
Base::Console().Warning("Centerline endpoints are equal. Could not draw.\n");
Base::Console().warning("Centerline endpoints are equal. Could not draw.\n");
//what to do here? //return current geom?
return m_geometry;
}
@@ -274,7 +274,7 @@ TechDraw::BaseGeomPtr CenterLine::scaledGeometry(const TechDraw::DrawViewPart* p
TechDraw::BaseGeomPtr CenterLine::scaledAndRotatedGeometry(TechDraw::DrawViewPart* partFeat)
{
// Base::Console().Message("CL::scaledGeometry() - m_type: %d\n", m_type);
// Base::Console().message("CL::scaledGeometry() - m_type: %d\n", m_type);
double scale = partFeat->getScale();
double viewAngleDeg = partFeat->Rotation.getValue();
std::pair<Base::Vector3d, Base::Vector3d> ends;
@@ -282,7 +282,7 @@ TechDraw::BaseGeomPtr CenterLine::scaledAndRotatedGeometry(TechDraw::DrawViewPar
if (m_faces.empty() &&
m_edges.empty() &&
m_verts.empty() ) {
// Base::Console().Message("CL::scaledGeometry - no geometry to scale!\n");
// Base::Console().message("CL::scaledGeometry - no geometry to scale!\n");
//CenterLine was created by points without a geometry reference,
ends = calcEndPointsNoRef(m_start, m_end, scale, m_extendBy,
m_hShift, m_vShift, m_rotate, viewAngleDeg);
@@ -307,7 +307,7 @@ TechDraw::BaseGeomPtr CenterLine::scaledAndRotatedGeometry(TechDraw::DrawViewPar
}
catch (...) {
Base::Console().Error("CL::scaledGeometry - failed to calculate endpoints!\n");
Base::Console().error("CL::scaledGeometry - failed to calculate endpoints!\n");
return nullptr;
}
@@ -315,7 +315,7 @@ TechDraw::BaseGeomPtr CenterLine::scaledAndRotatedGeometry(TechDraw::DrawViewPar
Base::Vector3d p1 = ends.first;
Base::Vector3d p2 = ends.second;
if (p1.IsEqual(p2, 0.00001)) {
Base::Console().Warning("Centerline endpoints are equal. Could not draw.\n");
Base::Console().warning("Centerline endpoints are equal. Could not draw.\n");
//what to do here? //return current geom?
return m_geometry;
}
@@ -382,8 +382,8 @@ std::string CenterLine::toString() const
void CenterLine::dump(const char* title)
{
Base::Console().Message("CL::dump - %s \n", title);
Base::Console().Message("CL::dump - %s \n", toString().c_str());
Base::Console().message("CL::dump - %s \n", title);
Base::Console().message("CL::dump - %s \n", toString().c_str());
}
//! rotate a notional 2d vector from p1 to p2 around its midpoint by angleDeg
@@ -416,7 +416,7 @@ std::pair<Base::Vector3d, Base::Vector3d> CenterLine::calcEndPointsNoRef(const B
const double vShift,
const double rotate, const double viewAngleDeg)
{
// Base::Console().Message("CL::calcEndPointsNoRef()\n");
// Base::Console().message("CL::calcEndPointsNoRef()\n");
Base::Vector3d p1 = start;
Base::Vector3d p2 = end;
Base::Vector3d mid = (p1 + p2) / 2.0;
@@ -465,9 +465,9 @@ std::pair<Base::Vector3d, Base::Vector3d> CenterLine::calcEndPoints(const DrawVi
const double vShift,
const double rotate)
{
// Base::Console().Message("CL::calcEndPoints()\n");
// Base::Console().message("CL::calcEndPoints()\n");
if (faceNames.empty()) {
Base::Console().Warning("CL::calcEndPoints - no faces!\n");
Base::Console().warning("CL::calcEndPoints - no faces!\n");
return std::pair<Base::Vector3d, Base::Vector3d>();
}
@@ -510,7 +510,7 @@ std::pair<Base::Vector3d, Base::Vector3d> CenterLine::calcEndPoints(const DrawVi
BRepBndLib::AddOptimal(faceEdgeCompound, faceBox);
if (faceBox.IsVoid()) {
Base::Console().Error("CL::calcEndPoints - faceBox is void!\n");
Base::Console().error("CL::calcEndPoints - faceBox is void!\n");
throw Base::IndexError("CenterLine wrong number of faces.");
}
@@ -536,7 +536,7 @@ std::pair<Base::Vector3d, Base::Vector3d> CenterLine::calcEndPoints(const DrawVi
p1 = Base::Vector3d(Xmin, Ymid, 0.0);
p2 = Base::Vector3d(Xmax, Ymid, 0.0);
} else { //vert == Mode::ALIGNED //aligned, but aligned doesn't make sense for face(s) bbox
Base::Console().Message("CL::calcEndPoints - aligned is not applicable to Face center lines\n");
Base::Console().message("CL::calcEndPoints - aligned is not applicable to Face center lines\n");
p1 = Base::Vector3d(Xmid, Ymax, 0.0);
p2 = Base::Vector3d(Xmid, Ymin, 0.0);
}
@@ -591,10 +591,10 @@ std::pair<Base::Vector3d, Base::Vector3d> CenterLine::calcEndPoints2Lines(const
{
Q_UNUSED(flip)
// Base::Console().Message("CL::calc2Lines() - mode: %d flip: %d edgeNames: %d\n", mode, flip, edgeNames.size());
// Base::Console().message("CL::calc2Lines() - mode: %d flip: %d edgeNames: %d\n", mode, flip, edgeNames.size());
std::pair<Base::Vector3d, Base::Vector3d> result;
if (edgeNames.empty()) {
Base::Console().Warning("CL::calcEndPoints2Lines - no edges!\n");
Base::Console().warning("CL::calcEndPoints2Lines - no edges!\n");
return result;
}
@@ -610,11 +610,11 @@ std::pair<Base::Vector3d, Base::Vector3d> CenterLine::calcEndPoints2Lines(const
if (bg) {
edges.push_back(bg);
} else {
Base::Console().Message("CL::calcEndPoints2Lines - no geom for index: %d\n", idx);
Base::Console().message("CL::calcEndPoints2Lines - no geom for index: %d\n", idx);
}
}
if (edges.size() != 2) {
Base::Console().Message("CL::calcEndPoints2Lines - wrong number of edges: %d!\n", edges.size());
Base::Console().message("CL::calcEndPoints2Lines - wrong number of edges: %d!\n", edges.size());
throw Base::IndexError("CenterLine wrong number of edges.");
}
@@ -709,9 +709,9 @@ std::pair<Base::Vector3d, Base::Vector3d> CenterLine::calcEndPoints2Points(const
const bool flip)
{
// Base::Console().Message("CL::calc2Points() - mode: %d\n", mode);
// Base::Console().message("CL::calc2Points() - mode: %d\n", mode);
if (vertNames.empty()) {
Base::Console().Warning("CL::calcEndPoints2Points - no points!\n");
Base::Console().warning("CL::calcEndPoints2Points - no points!\n");
return std::pair<Base::Vector3d, Base::Vector3d>();
}
@@ -891,7 +891,7 @@ void CenterLine::Save(Base::Writer &writer) const
//stored geometry
if (!m_geometry) {
return Base::Console().Error("CL::Save - m_geometry is null\n");
return Base::Console().error("CL::Save - m_geometry is null\n");
}
writer.Stream() << writer.ind() << "<GeometryType value=\"" << m_geometry->getGeomType() <<"\"/>" << std::endl;
@@ -905,7 +905,7 @@ void CenterLine::Save(Base::Writer &writer) const
TechDraw::AOCPtr aoc = std::static_pointer_cast<TechDraw::AOC>(m_geometry);
aoc->Save(writer);
} else {
Base::Console().Message("CL::Save - unimplemented geomType: %d\n", static_cast<int>(m_geometry->getGeomType()));
Base::Console().message("CL::Save - unimplemented geomType: %d\n", static_cast<int>(m_geometry->getGeomType()));
}
writer.Stream() << writer.ind() << "<LineNumber value=\"" << m_format.getLineNumber() << "\"/>" << std::endl;
@@ -917,7 +917,7 @@ void CenterLine::Restore(Base::XMLReader &reader)
if (!CosmeticVertex::restoreCosmetic()) {
return;
}
// Base::Console().Message("CL::Restore - reading elements\n");
// Base::Console().message("CL::Restore - reading elements\n");
// read my Element
reader.readElement("Start");
// get the value of my Attribute
@@ -1012,7 +1012,7 @@ void CenterLine::Restore(Base::XMLReader &reader)
aoc->setOCCEdge(GeometryUtils::edgeFromCircleArc(aoc));
m_geometry = aoc;
} else {
Base::Console().Warning("CL::Restore - unimplemented geomType: %d\n", static_cast<int>(gType));
Base::Console().warning("CL::Restore - unimplemented geomType: %d\n", static_cast<int>(gType));
}
// older documents may not have the LineNumber element, so we need to check the

View File

@@ -76,7 +76,7 @@ CosmeticEdge::CosmeticEdge(const TopoDS_Edge& e) :
CosmeticEdge::CosmeticEdge(const TechDraw::BaseGeomPtr g)
{
// Base::Console().Message("CE::CE(bg)\n");
// Base::Console().message("CE::CE(bg)\n");
m_geometry = g;
//we assume input edge is already in Yinverted coordinates
permaStart = m_geometry->getStartPoint();
@@ -192,8 +192,8 @@ std::string CosmeticEdge::toString() const
void CosmeticEdge::dump(const char* title) const
{
Base::Console().Message("CE::dump - %s \n", title);
Base::Console().Message("CE::dump - %s \n", toString().c_str());
Base::Console().message("CE::dump - %s \n", title);
Base::Console().message("CE::dump - %s \n", toString().c_str());
}
// Persistence implementers
@@ -223,7 +223,7 @@ void CosmeticEdge::Save(Base::Writer &writer) const
TechDraw::AOCPtr aoc = std::static_pointer_cast<TechDraw::AOC>(m_geometry);
aoc->inverted()->Save(writer);
} else {
Base::Console().Warning("CE::Save - unimplemented geomType: %d\n", static_cast<int>(m_geometry->getGeomType()));
Base::Console().warning("CE::Save - unimplemented geomType: %d\n", static_cast<int>(m_geometry->getGeomType()));
}
writer.Stream() << writer.ind() << "<LineNumber value=\"" << m_format.getLineNumber() << "\"/>" << endl;
@@ -235,7 +235,7 @@ void CosmeticEdge::Restore(Base::XMLReader &reader)
if (!CosmeticVertex::restoreCosmetic()) {
return;
}
// Base::Console().Message("CE::Restore - reading elements\n");
// Base::Console().message("CE::Restore - reading elements\n");
reader.readElement("Style");
m_format.setStyle(reader.getAttributeAsInteger("value"));
reader.readElement("Weight");
@@ -275,7 +275,7 @@ void CosmeticEdge::Restore(Base::XMLReader &reader)
permaEnd = aoc->center;
permaRadius = aoc->radius;
} else {
Base::Console().Warning("CE::Restore - unimplemented geomType: %d\n", static_cast<int>(gType));
Base::Console().warning("CE::Restore - unimplemented geomType: %d\n", static_cast<int>(gType));
}
// older documents may not have the LineNumber element, so we need to check the
// next entry. if it is a start element, then we check if it is a start element
@@ -294,7 +294,7 @@ void CosmeticEdge::Restore(Base::XMLReader &reader)
CosmeticEdge* CosmeticEdge::clone() const
{
Base::Console().Message("CE::clone()\n");
Base::Console().message("CE::clone()\n");
CosmeticEdge* cpy = new CosmeticEdge();
cpy->m_geometry = m_geometry->copy();
cpy->m_format = m_format;
@@ -352,8 +352,8 @@ GeomFormat::~GeomFormat()
void GeomFormat::dump(const char* title) const
{
Base::Console().Message("GF::dump - %s \n", title);
Base::Console().Message("GF::dump - %s \n", toString().c_str());
Base::Console().message("GF::dump - %s \n", title);
Base::Console().message("GF::dump - %s \n", toString().c_str());
}
std::string GeomFormat::toString() const

View File

@@ -167,13 +167,13 @@ Py::String CosmeticEdgePy::getTag() const
//Py::Object CosmeticEdgePy::getGeometry(void) const
//{
//// TechDraw::BaseGeomPtr bg = getCosmeticEdgePtr()->m_geometry;
// Base::Console().Message("Not implemented yet");
// Base::Console().message("Not implemented yet");
// return Py::asObject(Py_None);
//}
//void CosmeticEdgePy::setGeometry(Py::Object arg)
//{
// Base::Console().Message("Not implemented yet");
// Base::Console().message("Not implemented yet");
// PyObject* p = arg.ptr();
// if (PyObject_TypeCheck(p, &(TechDraw::BaseGeomPy::Type))) {
// //TODO

View File

@@ -114,7 +114,7 @@ void CosmeticExtension::clearCosmeticVertexes()
/// add the cosmetic verts in the property list to view's vertex geometry list
void CosmeticExtension::addCosmeticVertexesToGeom()
{
// Base::Console().Message("CE::addCosmeticVertexesToGeom()\n");
// Base::Console().message("CE::addCosmeticVertexesToGeom()\n");
const std::vector<TechDraw::CosmeticVertex*> cVerts = CosmeticVertexes.getValues();
for (auto& cv : cVerts) {
double scale = getOwner()->getScale();
@@ -128,10 +128,10 @@ void CosmeticExtension::addCosmeticVertexesToGeom()
/// add a single cosmetic vertex in the property list to the view's vertex geometry list
int CosmeticExtension::add1CVToGV(const std::string& tag)
{
// Base::Console().Message("CE::add1CVToGV(%s)\n", tag.c_str());
// Base::Console().message("CE::add1CVToGV(%s)\n", tag.c_str());
TechDraw::CosmeticVertex* cv = getCosmeticVertex(tag);
if (!cv) {
Base::Console().Message("CE::add1CVToGV - cv %s not found\n", tag.c_str());
Base::Console().message("CE::add1CVToGV - cv %s not found\n", tag.c_str());
return 0;
}
double scale = getOwner()->getScale();
@@ -145,7 +145,7 @@ int CosmeticExtension::add1CVToGV(const std::string& tag)
/// update the parent view's vertex geometry with all the cosmetic vertices in the list property
void CosmeticExtension::refreshCVGeoms()
{
// Base::Console().Message("CE::refreshCVGeoms()\n");
// Base::Console().message("CE::refreshCVGeoms()\n");
std::vector<TechDraw::VertexPtr> gVerts = getOwner()->getVertexGeometry();
std::vector<TechDraw::VertexPtr> newGVerts;
@@ -162,7 +162,7 @@ void CosmeticExtension::refreshCVGeoms()
/// find the position of a cosmetic vertex with the given tag in the parent view's geometry list
int CosmeticExtension::getCVIndex(const std::string& tag)
{
// Base::Console().Message("CE::getCVIndex(%s)\n", tag.c_str());
// Base::Console().message("CE::getCVIndex(%s)\n", tag.c_str());
std::vector<TechDraw::VertexPtr> gVerts = getOwner()->getVertexGeometry();
std::vector<TechDraw::CosmeticVertex*> cVerts = CosmeticVertexes.getValues();
@@ -178,7 +178,7 @@ int CosmeticExtension::getCVIndex(const std::string& tag)
int base = gVerts.size();
i = 0;
for (auto& cv : cVerts) {
// Base::Console().Message("CE::getCVIndex - cv tag: %s\n",
// Base::Console().message("CE::getCVIndex - cv tag: %s\n",
// cv->getTagAsString().c_str());
if (cv->getTagAsString() == tag) {
return base + i;
@@ -186,7 +186,7 @@ int CosmeticExtension::getCVIndex(const std::string& tag)
i++;
}
// Base::Console().Message("CE::getCVIndex - returns: %d\n", result);
// Base::Console().message("CE::getCVIndex - returns: %d\n", result);
return -1;
}
@@ -196,7 +196,7 @@ int CosmeticExtension::getCVIndex(const std::string& tag)
/// invert should be set to false.
std::string CosmeticExtension::addCosmeticVertex(const Base::Vector3d& pos, bool invert)
{
// Base::Console().Message("CEx::addCosmeticVertex(%s)\n",
// Base::Console().message("CEx::addCosmeticVertex(%s)\n",
// DrawUtil::formatVector(pos).c_str());
std::vector<CosmeticVertex*> verts = CosmeticVertexes.getValues();
Base::Vector3d tempPos = pos;
@@ -212,7 +212,7 @@ std::string CosmeticExtension::addCosmeticVertex(const Base::Vector3d& pos, bool
/// retrieve a cosmetic vertex by unique id
TechDraw::CosmeticVertex* CosmeticExtension::getCosmeticVertex(const std::string& tagString) const
{
// Base::Console().Message("CEx::getCosmeticVertex(%s)\n", tagString.c_str());
// Base::Console().message("CEx::getCosmeticVertex(%s)\n", tagString.c_str());
const std::vector<TechDraw::CosmeticVertex*> verts = CosmeticVertexes.getValues();
for (auto& cv: verts) {
std::string cvTag = cv->getTagAsString();
@@ -227,7 +227,7 @@ TechDraw::CosmeticVertex* CosmeticExtension::getCosmeticVertex(const std::string
/// used when selecting
TechDraw::CosmeticVertex* CosmeticExtension::getCosmeticVertexBySelection(const std::string& name) const
{
// Base::Console().Message("CEx::getCVBySelection(%s)\n", name.c_str());
// Base::Console().message("CEx::getCVBySelection(%s)\n", name.c_str());
App::DocumentObject* extObj = const_cast<App::DocumentObject*> (getExtendedObject());
TechDraw::DrawViewPart* dvp = dynamic_cast<TechDraw::DrawViewPart*>(extObj);
if (!dvp) {
@@ -244,7 +244,7 @@ TechDraw::CosmeticVertex* CosmeticExtension::getCosmeticVertexBySelection(const
/// retrieve a cosmetic vertex by index (the 5 in Vertex5)
TechDraw::CosmeticVertex* CosmeticExtension::getCosmeticVertexBySelection(const int i) const
{
// Base::Console().Message("CEx::getCVBySelection(%d)\n", i);
// Base::Console().message("CEx::getCVBySelection(%d)\n", i);
std::stringstream ss;
ss << "Vertex" << i;
std::string vName = ss.str();
@@ -254,7 +254,7 @@ TechDraw::CosmeticVertex* CosmeticExtension::getCosmeticVertexBySelection(const
/// remove the cosmetic vertex with the given tag from the list property
void CosmeticExtension::removeCosmeticVertex(const std::string& delTag)
{
// Base::Console().Message("DVP::removeCV(%s)\n", delTag.c_str());
// Base::Console().message("DVP::removeCV(%s)\n", delTag.c_str());
std::vector<CosmeticVertex*> cVerts = CosmeticVertexes.getValues();
std::vector<CosmeticVertex*> newVerts;
for (auto& cv: cVerts) {
@@ -292,7 +292,7 @@ void CosmeticExtension::clearCosmeticEdges()
/// add the cosmetic edges to geometry edge list
void CosmeticExtension::addCosmeticEdgesToGeom()
{
// Base::Console().Message("CEx::addCosmeticEdgesToGeom()\n");
// Base::Console().message("CEx::addCosmeticEdgesToGeom()\n");
const std::vector<TechDraw::CosmeticEdge*> cEdges = CosmeticEdges.getValues();
for (auto& ce : cEdges) {
double scale = getOwner()->getScale();
@@ -308,10 +308,10 @@ void CosmeticExtension::addCosmeticEdgesToGeom()
/// add a single cosmetic edge to the geometry edge list
int CosmeticExtension::add1CEToGE(const std::string& tag)
{
// Base::Console().Message("CEx::add1CEToGE(%s) 2\n", tag.c_str());
// Base::Console().message("CEx::add1CEToGE(%s) 2\n", tag.c_str());
TechDraw::CosmeticEdge* ce = getCosmeticEdge(tag);
if (!ce) {
Base::Console().Message("CEx::add1CEToGE 2 - ce %s not found\n", tag.c_str());
Base::Console().message("CEx::add1CEToGE 2 - ce %s not found\n", tag.c_str());
return -1;
}
double scale = getOwner()->getScale();
@@ -325,7 +325,7 @@ int CosmeticExtension::add1CEToGE(const std::string& tag)
/// update Edge geometry with current CE's
void CosmeticExtension::refreshCEGeoms()
{
// Base::Console().Message("CEx::refreshCEGeoms()\n");
// Base::Console().message("CEx::refreshCEGeoms()\n");
std::vector<TechDraw::BaseGeomPtr> gEdges = getOwner()->getEdgeGeometry();
std::vector<TechDraw::BaseGeomPtr> oldGEdges;
for (auto& ge : gEdges) {
@@ -342,7 +342,7 @@ void CosmeticExtension::refreshCEGeoms()
std::string CosmeticExtension::addCosmeticEdge(Base::Vector3d start,
Base::Vector3d end)
{
// Base::Console().Message("CEx::addCosmeticEdge(s, e)\n");
// Base::Console().message("CEx::addCosmeticEdge(s, e)\n");
std::vector<CosmeticEdge*> edges = CosmeticEdges.getValues();
TechDraw::CosmeticEdge* ce = new TechDraw::CosmeticEdge(start, end);
edges.push_back(ce);
@@ -354,7 +354,7 @@ std::string CosmeticExtension::addCosmeticEdge(Base::Vector3d start,
/// returns unique CE id
std::string CosmeticExtension::addCosmeticEdge(TechDraw::BaseGeomPtr bg)
{
// Base::Console().Message("CEx::addCosmeticEdge(bg: %X)\n", bg);
// Base::Console().message("CEx::addCosmeticEdge(bg: %X)\n", bg);
std::vector<CosmeticEdge*> edges = CosmeticEdges.getValues();
TechDraw::CosmeticEdge* ce = new TechDraw::CosmeticEdge(bg);
edges.push_back(ce);
@@ -365,7 +365,7 @@ std::string CosmeticExtension::addCosmeticEdge(TechDraw::BaseGeomPtr bg)
/// retrieve a CE by unique id
TechDraw::CosmeticEdge* CosmeticExtension::getCosmeticEdge(const std::string& tagString) const
{
// Base::Console().Message("CEx::getCosmeticEdge(%s)\n", tagString.c_str());
// Base::Console().message("CEx::getCosmeticEdge(%s)\n", tagString.c_str());
const std::vector<TechDraw::CosmeticEdge*> edges = CosmeticEdges.getValues();
for (auto& ce: edges) {
std::string ceTag = ce->getTagAsString();
@@ -375,7 +375,7 @@ TechDraw::CosmeticEdge* CosmeticExtension::getCosmeticEdge(const std::string& ta
}
// None found
// Base::Console().Message("CEx::getCosmeticEdge - CE for tag: %s not found.\n", tagString.c_str());
// Base::Console().message("CEx::getCosmeticEdge - CE for tag: %s not found.\n", tagString.c_str());
return nullptr;
}
@@ -383,7 +383,7 @@ TechDraw::CosmeticEdge* CosmeticExtension::getCosmeticEdge(const std::string& ta
/// used when selecting
TechDraw::CosmeticEdge* CosmeticExtension::getCosmeticEdgeBySelection(const std::string& name) const
{
// Base::Console().Message("CEx::getCEBySelection(%s)\n", name.c_str());
// Base::Console().message("CEx::getCEBySelection(%s)\n", name.c_str());
App::DocumentObject* extObj = const_cast<App::DocumentObject*> (getExtendedObject());
TechDraw::DrawViewPart* dvp = dynamic_cast<TechDraw::DrawViewPart*>(extObj);
if (!dvp) {
@@ -401,7 +401,7 @@ TechDraw::CosmeticEdge* CosmeticExtension::getCosmeticEdgeBySelection(const std:
/// find the cosmetic edge corresponding to the input parameter (the 5 in Edge5)
TechDraw::CosmeticEdge* CosmeticExtension::getCosmeticEdgeBySelection(int i) const
{
// Base::Console().Message("CEx::getCEBySelection(%d)\n", i);
// Base::Console().message("CEx::getCEBySelection(%d)\n", i);
std::stringstream edgeName;
edgeName << "Edge" << i;
return getCosmeticEdgeBySelection(edgeName.str());
@@ -410,7 +410,7 @@ TechDraw::CosmeticEdge* CosmeticExtension::getCosmeticEdgeBySelection(int i) con
/// remove the cosmetic edge with the given tag from the list property
void CosmeticExtension::removeCosmeticEdge(const std::string& delTag)
{
// Base::Console().Message("DVP::removeCE(%s)\n", delTag.c_str());
// Base::Console().message("DVP::removeCE(%s)\n", delTag.c_str());
std::vector<CosmeticEdge*> cEdges = CosmeticEdges.getValues();
std::vector<CosmeticEdge*> newEdges;
for (auto& ce: cEdges) {
@@ -427,7 +427,7 @@ void CosmeticExtension::removeCosmeticEdge(const std::string& delTag)
/// remove the cosmetic edges with the given tags from the list property
void CosmeticExtension::removeCosmeticEdge(const std::vector<std::string>& delTags)
{
// Base::Console().Message("DVP::removeCE(%d tags)\n", delTags.size());
// Base::Console().message("DVP::removeCE(%d tags)\n", delTags.size());
std::vector<CosmeticEdge*> cEdges = CosmeticEdges.getValues();
for (auto& t: delTags) {
removeCosmeticEdge(t);
@@ -449,10 +449,10 @@ void CosmeticExtension::clearCenterLines()
int CosmeticExtension::add1CLToGE(const std::string& tag)
{
// Base::Console().Message("CEx::add1CLToGE(%s) 2\n", tag.c_str());
// Base::Console().message("CEx::add1CLToGE(%s) 2\n", tag.c_str());
TechDraw::CenterLine* cl = getCenterLine(tag);
if (!cl) {
// Base::Console().Message("CEx::add1CLToGE 2 - cl %s not found\n", tag.c_str());
// Base::Console().message("CEx::add1CLToGE 2 - cl %s not found\n", tag.c_str());
return -1;
}
TechDraw::BaseGeomPtr scaledGeom = cl->scaledAndRotatedGeometry(getOwner());
@@ -464,7 +464,7 @@ int CosmeticExtension::add1CLToGE(const std::string& tag)
//update Edge geometry with current CL's
void CosmeticExtension::refreshCLGeoms()
{
// Base::Console().Message("CE::refreshCLGeoms()\n");
// Base::Console().message("CE::refreshCLGeoms()\n");
std::vector<TechDraw::BaseGeomPtr> gEdges = getOwner()->getEdgeGeometry();
std::vector<TechDraw::BaseGeomPtr> newGEdges;
for (auto& ge : gEdges) {
@@ -479,12 +479,12 @@ void CosmeticExtension::refreshCLGeoms()
//add the center lines to geometry Edges list
void CosmeticExtension::addCenterLinesToGeom()
{
// Base::Console().Message("CE::addCenterLinesToGeom()\n");
// Base::Console().message("CE::addCenterLinesToGeom()\n");
const std::vector<TechDraw::CenterLine*> lines = CenterLines.getValues();
for (auto& cl : lines) {
TechDraw::BaseGeomPtr scaledGeom = cl->scaledAndRotatedGeometry(getOwner());
if (!scaledGeom) {
Base::Console().Error("CE::addCenterLinesToGeom - scaledGeometry is null\n");
Base::Console().error("CE::addCenterLinesToGeom - scaledGeometry is null\n");
continue;
}
// int idx =
@@ -497,7 +497,7 @@ void CosmeticExtension::addCenterLinesToGeom()
std::string CosmeticExtension::addCenterLine(Base::Vector3d start,
Base::Vector3d end)
{
// Base::Console().Message("CEx::addCenterLine(%s)\n",
// Base::Console().message("CEx::addCenterLine(%s)\n",
// DrawUtil::formatVector(start).c_str(),
// DrawUtil::formatVector(end).c_str());
std::vector<CenterLine*> cLines = CenterLines.getValues();
@@ -509,7 +509,7 @@ std::string CosmeticExtension::addCenterLine(Base::Vector3d start,
std::string CosmeticExtension::addCenterLine(TechDraw::CenterLine* cl)
{
// Base::Console().Message("CEx::addCenterLine(cl: %X)\n", cl);
// Base::Console().message("CEx::addCenterLine(cl: %X)\n", cl);
std::vector<CenterLine*> cLines = CenterLines.getValues();
cLines.push_back(cl);
CenterLines.setValues(cLines);
@@ -519,7 +519,7 @@ std::string CosmeticExtension::addCenterLine(TechDraw::CenterLine* cl)
std::string CosmeticExtension::addCenterLine(TechDraw::BaseGeomPtr bg)
{
// Base::Console().Message("CEx::addCenterLine(bg: %X)\n", bg);
// Base::Console().message("CEx::addCenterLine(bg: %X)\n", bg);
std::vector<CenterLine*> cLines = CenterLines.getValues();
TechDraw::CenterLine* cl = new TechDraw::CenterLine(bg);
cLines.push_back(cl);
@@ -530,7 +530,7 @@ std::string CosmeticExtension::addCenterLine(TechDraw::BaseGeomPtr bg)
//get CL by unique id
TechDraw::CenterLine* CosmeticExtension::getCenterLine(const std::string& tagString) const
{
// Base::Console().Message("CEx::getCenterLine(%s)\n", tagString.c_str());
// Base::Console().message("CEx::getCenterLine(%s)\n", tagString.c_str());
const std::vector<TechDraw::CenterLine*> cLines = CenterLines.getValues();
for (auto& cl: cLines) {
std::string clTag = cl->getTagAsString();
@@ -545,7 +545,7 @@ TechDraw::CenterLine* CosmeticExtension::getCenterLine(const std::string& tagStr
// used when selecting
TechDraw::CenterLine* CosmeticExtension::getCenterLineBySelection(const std::string& name) const
{
// Base::Console().Message("CEx::getCLBySelection(%s)\n", name.c_str());
// Base::Console().message("CEx::getCLBySelection(%s)\n", name.c_str());
App::DocumentObject* extObj = const_cast<App::DocumentObject*> (getExtendedObject());
TechDraw::DrawViewPart* dvp = dynamic_cast<TechDraw::DrawViewPart*>(extObj);
if (!dvp) {
@@ -562,7 +562,7 @@ TechDraw::CenterLine* CosmeticExtension::getCenterLineBySelection(const std::str
//overload for index only
TechDraw::CenterLine* CosmeticExtension::getCenterLineBySelection(int i) const
{
// Base::Console().Message("CEx::getCLBySelection(%d)\n", i);
// Base::Console().message("CEx::getCLBySelection(%d)\n", i);
std::stringstream edgeName;
edgeName << "Edge" << i;
return getCenterLineBySelection(edgeName.str());
@@ -570,7 +570,7 @@ TechDraw::CenterLine* CosmeticExtension::getCenterLineBySelection(int i) const
void CosmeticExtension::removeCenterLine(const std::string& delTag)
{
// Base::Console().Message("DVP::removeCL(%s)\n", delTag.c_str());
// Base::Console().message("DVP::removeCL(%s)\n", delTag.c_str());
std::vector<CenterLine*> cLines = CenterLines.getValues();
std::vector<CenterLine*> newLines;
for (auto& cl: cLines) {
@@ -603,7 +603,7 @@ void CosmeticExtension::clearGeomFormats()
//only adds gf to gflist property. does not add to display geometry until dvp repaints.
std::string CosmeticExtension::addGeomFormat(TechDraw::GeomFormat* gf)
{
// Base::Console().Message("CEx::addGeomFormat(gf: %X)\n", gf);
// Base::Console().message("CEx::addGeomFormat(gf: %X)\n", gf);
std::vector<GeomFormat*> formats = GeomFormats.getValues();
TechDraw::GeomFormat* newGF = new TechDraw::GeomFormat(gf);
formats.push_back(newGF);
@@ -615,7 +615,7 @@ std::string CosmeticExtension::addGeomFormat(TechDraw::GeomFormat* gf)
//get GF by unique id
TechDraw::GeomFormat* CosmeticExtension::getGeomFormat(const std::string& tagString) const
{
// Base::Console().Message("CEx::getGeomFormat(%s)\n", tagString.c_str());
// Base::Console().message("CEx::getGeomFormat(%s)\n", tagString.c_str());
const std::vector<TechDraw::GeomFormat*> formats = GeomFormats.getValues();
for (auto& gf: formats) {
std::string gfTag = gf->getTagAsString();
@@ -632,7 +632,7 @@ TechDraw::GeomFormat* CosmeticExtension::getGeomFormat(const std::string& tagStr
// used when selecting
TechDraw::GeomFormat* CosmeticExtension::getGeomFormatBySelection(const std::string& name) const
{
// Base::Console().Message("CEx::getCEBySelection(%s)\n", name.c_str());
// Base::Console().message("CEx::getCEBySelection(%s)\n", name.c_str());
App::DocumentObject* extObj = const_cast<App::DocumentObject*> (getExtendedObject());
TechDraw::DrawViewPart* dvp = dynamic_cast<TechDraw::DrawViewPart*>(extObj);
if (!dvp) {
@@ -653,7 +653,7 @@ TechDraw::GeomFormat* CosmeticExtension::getGeomFormatBySelection(const std::str
//overload for index only
TechDraw::GeomFormat* CosmeticExtension::getGeomFormatBySelection(int i) const
{
// Base::Console().Message("CEx::getCEBySelection(%d)\n", i);
// Base::Console().message("CEx::getCEBySelection(%d)\n", i);
std::stringstream edgeName;
edgeName << "Edge" << i;
return getGeomFormatBySelection(edgeName.str());
@@ -661,7 +661,7 @@ TechDraw::GeomFormat* CosmeticExtension::getGeomFormatBySelection(int i) const
void CosmeticExtension::removeGeomFormat(const std::string& delTag)
{
// Base::Console().Message("DVP::removeCE(%s)\n", delTag.c_str());
// Base::Console().message("DVP::removeCE(%s)\n", delTag.c_str());
std::vector<GeomFormat*> cFormats = GeomFormats.getValues();
std::vector<GeomFormat*> newFormats;
for (auto& gf: cFormats) {

View File

@@ -208,13 +208,13 @@ Base::Vector3d CosmeticVertex::makeCanonicalPointInverted(DrawViewPart* dvp, Bas
CosmeticVertex* CosmeticVertex::copy() const
{
// Base::Console().Message("CV::copy()\n");
// Base::Console().message("CV::copy()\n");
return new CosmeticVertex(this);
}
CosmeticVertex* CosmeticVertex::clone() const
{
// Base::Console().Message("CV::clone()\n");
// Base::Console().message("CV::clone()\n");
CosmeticVertex* cpy = this->copy();
cpy->setTag(this->getTag());
return cpy;
@@ -232,6 +232,6 @@ PyObject* CosmeticVertex::getPyObject()
// To do: make const
void CosmeticVertex::dump(const char* title)
{
Base::Console().Message("CV::dump - %s \n", title);
Base::Console().Message("CV::dump - %s \n", toString().c_str());
Base::Console().message("CV::dump - %s \n", title);
Base::Console().message("CV::dump - %s \n", toString().c_str());
}

View File

@@ -180,7 +180,7 @@ void CosmeticVertexPy::setColor(Py::Object arg)
CosmeticVertex* cv = getCosmeticVertexPtr();
cv->color = c;
} else {
Base::Console().Error("CEPI::setColor - not a tuple!\n");
Base::Console().error("CEPI::setColor - not a tuple!\n");
std::string error = std::string("type must be 'tuple', not ");
error += pTuple->ob_type->tp_name;
throw Py::TypeError(error);

View File

@@ -87,7 +87,7 @@ using DU = DrawUtil;
//! was created.
bool DimensionAutoCorrect::referencesHaveValidGeometry(std::vector<bool>& referenceState) const
{
// Base::Console().Message("DAC::referencesHaveValidGeometry()\n");
// Base::Console().message("DAC::referencesHaveValidGeometry()\n");
ReferenceVector refsAll = getDimension()->getEffectiveReferences();
const std::vector<Part::TopoShape> savedGeometry = getDimension()->SavedGeometry.getValues();
@@ -126,7 +126,7 @@ bool DimensionAutoCorrect::referencesHaveValidGeometry(std::vector<bool>& refere
bool DimensionAutoCorrect::autocorrectReferences(std::vector<bool>& referenceState,
ReferenceVector& repairedRefs) const
{
// Base::Console().Message("DAC::autocorrectReferences()\n");
// Base::Console().message("DAC::autocorrectReferences()\n");
if (!Preferences::autoCorrectDimRefs()) {
return false;
}
@@ -199,7 +199,7 @@ bool DimensionAutoCorrect::autocorrectReferences(std::vector<bool>& referenceSta
//! fix a single reference with an exact match to geomToMatch
bool DimensionAutoCorrect::fix1GeomExact(ReferenceEntry& refToFix, const TopoDS_Shape &geomToMatch) const
{
// Base::Console().Message("DAC::fix1GeomExact()\n");
// Base::Console().message("DAC::fix1GeomExact()\n");
ReferenceEntry fixedRef = refToFix;
Part::TopoShape topoShapeToMatch(geomToMatch);
bool success {false};
@@ -229,7 +229,7 @@ bool DimensionAutoCorrect::fix1GeomExact(ReferenceEntry& refToFix, const TopoDS_
//! fix a single reference with an Similar match to geomToMatch
bool DimensionAutoCorrect::fix1GeomSimilar(ReferenceEntry& refToFix, const TopoDS_Shape &geomToMatch) const
{
// Base::Console().Message("DAC::fix1GeomSimilar()\n");
// Base::Console().message("DAC::fix1GeomSimilar()\n");
Part::TopoShape topoShapeToMatch(geomToMatch);
bool success {false};
if (refToFix.is3d()) {
@@ -261,7 +261,7 @@ bool DimensionAutoCorrect::fix1GeomSimilar(ReferenceEntry& refToFix, const TopoD
bool DimensionAutoCorrect::findExactVertex2d(ReferenceEntry& refToFix,
const Part::TopoShape& refGeom) const
{
// Base::Console().Message("DAC::findExactVertex2d()\n");
// Base::Console().message("DAC::findExactVertex2d()\n");
getMatcher()->setPointTolerance(EWTOLERANCE);
auto refObj = refToFix.getObject();
auto refDvp = dynamic_cast<TechDraw::DrawViewPart*>(refObj);
@@ -281,7 +281,7 @@ bool DimensionAutoCorrect::findExactVertex2d(ReferenceEntry& refToFix,
//! and return a reference pointing to the matching edge.
bool DimensionAutoCorrect::findExactEdge2d(ReferenceEntry& refToFix, const Part::TopoShape& refGeom) const
{
// Base::Console().Message("DAC::findExactEdge2d()\n");
// Base::Console().message("DAC::findExactEdge2d()\n");
auto refObj = refToFix.getObject();
auto refDvp = dynamic_cast<TechDraw::DrawViewPart*>(refObj);
if (refDvp) {
@@ -301,7 +301,7 @@ bool DimensionAutoCorrect::findExactEdge2d(ReferenceEntry& refToFix, const Part:
bool DimensionAutoCorrect::findExactVertex3d(ReferenceEntry& refToFix,
const Part::TopoShape& refGeom) const
{
// Base::Console().Message("DAC::findExactVertex3d()\n");
// Base::Console().message("DAC::findExactVertex3d()\n");
getMatcher()->setPointTolerance(EWTOLERANCE);
// try the referenced object
@@ -331,7 +331,7 @@ bool DimensionAutoCorrect::findExactVertex3d(ReferenceEntry& refToFix,
//! and return a reference pointing to the matching edge.
bool DimensionAutoCorrect::findExactEdge3d(ReferenceEntry& refToFix, const Part::TopoShape& refGeom) const
{
// Base::Console().Message("DAC::findExactEdge3d() - cache: %d\n", m_3dObjectCache.size());
// Base::Console().message("DAC::findExactEdge3d() - cache: %d\n", m_3dObjectCache.size());
// first, try to find a match in the referenced object
auto refObj = refToFix.getObject();
if (refObj) {
@@ -367,10 +367,10 @@ bool DimensionAutoCorrect::findExactEdge3d(ReferenceEntry& refToFix, const Part:
bool DimensionAutoCorrect::findSimilarVertex2d(ReferenceEntry& refToFix,
const Part::TopoShape& refGeom) const
{
// Base::Console().Message("DAC::findSimilarVertex2d()\n");
// Base::Console().message("DAC::findSimilarVertex2d()\n");
(void)refToFix;
(void)refGeom;
// Base::Console().Message("DAC::findSimilarVertex2d is not implemented yet\n");
// Base::Console().message("DAC::findSimilarVertex2d is not implemented yet\n");
return false;
}
@@ -379,10 +379,10 @@ bool DimensionAutoCorrect::findSimilarVertex2d(ReferenceEntry& refToFix,
bool DimensionAutoCorrect::findSimilarEdge2d(ReferenceEntry& refToFix,
const Part::TopoShape& refGeom) const
{
// Base::Console().Message("DAC::findSimilarEdge2d()\n");
// Base::Console().message("DAC::findSimilarEdge2d()\n");
(void)refToFix;
(void)refGeom;
// Base::Console().Message("DAC::findSimilarEdge2d is not implemented yet\n");
// Base::Console().message("DAC::findSimilarEdge2d is not implemented yet\n");
return false;
}
@@ -392,10 +392,10 @@ bool DimensionAutoCorrect::findSimilarEdge2d(ReferenceEntry& refToFix,
bool DimensionAutoCorrect::findSimilarVertex3d(ReferenceEntry& refToFix,
const Part::TopoShape& refGeom) const
{
// Base::Console().Message("DAC::findSimilarVertex3d()\n");
// Base::Console().message("DAC::findSimilarVertex3d()\n");
(void)refToFix;
(void)refGeom;
// Base::Console().Message("DAC::findSimilarVertex3d is not implemented yet\n");
// Base::Console().message("DAC::findSimilarVertex3d is not implemented yet\n");
return false;
}
@@ -405,10 +405,10 @@ bool DimensionAutoCorrect::findSimilarVertex3d(ReferenceEntry& refToFix,
bool DimensionAutoCorrect::findSimilarEdge3d(ReferenceEntry& refToFix,
const Part::TopoShape& refGeom) const
{
// Base::Console().Message("DAC::findSimilarEdge3d(%s)\n", refToFix.getObjectName().c_str());
// Base::Console().message("DAC::findSimilarEdge3d(%s)\n", refToFix.getObjectName().c_str());
(void)refToFix;
(void)refGeom;
// Base::Console().Message("DAC::findSimilarEdge3d is not implemented yet\n");
// Base::Console().message("DAC::findSimilarEdge3d is not implemented yet\n");
return false;
}
@@ -471,7 +471,7 @@ ReferenceEntry DimensionAutoCorrect::searchViewForVert(DrawViewPart* obj,
const Part::TopoShape& refVertex,
bool exact) const
{
// Base::Console().Message("DAC::searchViewForVert()\n");
// Base::Console().message("DAC::searchViewForVert()\n");
(void)exact;
std::vector<TechDraw::VertexPtr> gVertexAll =
getDimension()->getViewPart()->getVertexGeometry();
@@ -494,7 +494,7 @@ ReferenceEntry DimensionAutoCorrect::searchViewForVert(DrawViewPart* obj,
ReferenceEntry DimensionAutoCorrect::searchViewForExactEdge(DrawViewPart* obj,
const Part::TopoShape& refEdge) const
{
// Base::Console().Message("DAC::searchViewForExactEdge()\n");
// Base::Console().message("DAC::searchViewForExactEdge()\n");
auto gEdgeAll = getDimension()->getViewPart()->getEdgeGeometry();
int iEdge {0};
for (auto& edge : gEdgeAll) {
@@ -516,10 +516,10 @@ ReferenceEntry DimensionAutoCorrect::searchViewForExactEdge(DrawViewPart* obj,
ReferenceEntry DimensionAutoCorrect::searchViewForSimilarEdge(DrawViewPart* obj,
const Part::TopoShape& refEdge) const
{
// Base::Console().Message("DAC::searchViewForSimilarEdge()\n");
// Base::Console().message("DAC::searchViewForSimilarEdge()\n");
(void)obj;
(void)refEdge;
Base::Console().Message("DAC::searchViewForSimilarEdge is not implemented yet\n");
Base::Console().message("DAC::searchViewForSimilarEdge is not implemented yet\n");
return {};
}
@@ -529,7 +529,7 @@ ReferenceEntry DimensionAutoCorrect::searchObjForEdge(App::DocumentObject* obj,
const Part::TopoShape& refEdge,
bool exact) const
{
// Base::Console().Message("DAC::searchObjForEdge(%s)\n", obj->Label.getValue());
// Base::Console().message("DAC::searchObjForEdge(%s)\n", obj->Label.getValue());
(void)exact;
auto shape3d = Part::Feature::getShape(obj);
if (shape3d.IsNull()) {
@@ -553,7 +553,7 @@ ReferenceEntry DimensionAutoCorrect::searchObjForEdge(App::DocumentObject* obj,
//! have been repaired
bool DimensionAutoCorrect::fixBrokenReferences(ReferenceVector& fixedReferences) const
{
// Base::Console().Message("DAC::fixBrokenReferences()\n");
// Base::Console().message("DAC::fixBrokenReferences()\n");
bool success {true};
const std::vector<Part::TopoShape> savedGeometry = getDimension()->SavedGeometry.getValues();
int iGeom {0};

View File

@@ -82,7 +82,7 @@ std::string DimensionFormatter::formatValue(const qreal value,
}
if (formatSpecifier.isEmpty()) {
Base::Console().Warning("Warning - no numeric format in Format Spec %s - %s\n",
Base::Console().warning("Warning - no numeric format in Format Spec %s - %s\n",
qPrintable(qFormatSpec),
m_dimension->getNameInDocument());
return qFormatSpec.toStdString();
@@ -125,7 +125,7 @@ std::string DimensionFormatter::formatValue(const qreal value,
}
if (isTooSmall(userVal, formatSpecifier)) {
Base::Console().Warning("Dimension %s value %.6f is too small for format specifier: %s\n",
Base::Console().warning("Dimension %s value %.6f is too small for format specifier: %s\n",
m_dimension->getNameInDocument(),
userVal,
qPrintable(formatSpecifier));
@@ -356,7 +356,7 @@ QStringList DimensionFormatter::getPrefixSuffixSpec(const QString& fSpec) const
result.append(formatSuffix);
result.append(match);
} else { //printf format not found!
Base::Console().Warning("Warning - no numeric format in formatSpec %s - %s\n",
Base::Console().warning("Warning - no numeric format in formatSpec %s - %s\n",
qPrintable(fSpec), m_dimension->getNameInDocument());
result.append(QString());
result.append(QString());
@@ -421,7 +421,7 @@ bool DimensionFormatter::isTooSmall(const double value, const QString& formatSpe
return true;
}
} else {
Base::Console().Warning("Failed to parse dimension format spec\n");
Base::Console().warning("Failed to parse dimension format spec\n");
}
return false;
}

View File

@@ -114,8 +114,8 @@ void pointPair::invertY()
void pointPair::dump(const std::string& text) const
{
Base::Console().Message("pointPair - %s\n", text.c_str());
Base::Console().Message("pointPair - first: %s second: %s\n",
Base::Console().message("pointPair - %s\n", text.c_str());
Base::Console().message("pointPair - first: %s second: %s\n",
DU::formatVector(first()).c_str(), DU::formatVector(second()).c_str());
}
@@ -233,10 +233,10 @@ anglePoints anglePoints::toDisplayForm(DrawViewPart* dvp) const
}
void anglePoints::dump(const std::string& text) const
{
Base::Console().Message("anglePoints - %s\n", text.c_str());
Base::Console().Message("anglePoints - ends - first: %s second: %s\n",
Base::Console().message("anglePoints - %s\n", text.c_str());
Base::Console().message("anglePoints - ends - first: %s second: %s\n",
DU::formatVector(first()).c_str(), DU::formatVector(second()).c_str());
Base::Console().Message("anglePoints - vertex: %s\n", DU::formatVector(vertex()).c_str());
Base::Console().message("anglePoints - vertex: %s\n", DU::formatVector(vertex()).c_str());
}
arcPoints::arcPoints() :
@@ -350,17 +350,17 @@ arcPoints arcPoints::toCanonicalForm(DrawViewPart* dvp) const
void arcPoints::dump(const std::string& text) const
{
Base::Console().Message("arcPoints - %s\n", text.c_str());
Base::Console().Message("arcPoints - radius: %.3f center: %s\n", radius,
Base::Console().message("arcPoints - %s\n", text.c_str());
Base::Console().message("arcPoints - radius: %.3f center: %s\n", radius,
DrawUtil::formatVector(center).c_str());
Base::Console().Message("arcPoints - isArc: %d arcCW: %d\n", isArc, arcCW);
Base::Console().Message("arcPoints - onCurve: %s %s\n",
Base::Console().message("arcPoints - isArc: %d arcCW: %d\n", isArc, arcCW);
Base::Console().message("arcPoints - onCurve: %s %s\n",
DrawUtil::formatVector(onCurve.first()).c_str(),
DrawUtil::formatVector(onCurve.second()).c_str());
Base::Console().Message("arcPoints - arcEnds: %s %s\n",
Base::Console().message("arcPoints - arcEnds: %s %s\n",
DrawUtil::formatVector(arcEnds.first()).c_str(),
DrawUtil::formatVector(arcEnds.second()).c_str());
Base::Console().Message("arcPoints - midArc: %s\n", DrawUtil::formatVector(midArc).c_str());
Base::Console().message("arcPoints - midArc: %s\n", DrawUtil::formatVector(midArc).c_str());
}
@@ -396,7 +396,7 @@ void areaPoint::invertY()
void areaPoint::dump(const std::string& text) const
{
Base::Console().Message("areaPoint - %s\n", text.c_str());
Base::Console().Message("areaPoint - area: %.3f center: %s\n", area,
Base::Console().message("areaPoint - %s\n", text.c_str());
Base::Console().message("areaPoint - area: %.3f center: %s\n", area,
DrawUtil::formatVector(center).c_str());
}

View File

@@ -150,7 +150,7 @@ TopoDS_Shape ReferenceEntry::getGeometry2d() const
}
}
catch (...) {
Base::Console().Message("RE::getGeometry2d - no shape for dimension 2d reference - gType: **%s**\n", gType.c_str());
Base::Console().message("RE::getGeometry2d - no shape for dimension 2d reference - gType: **%s**\n", gType.c_str());
}
return {};

View File

@@ -151,7 +151,7 @@ App::DocumentObjectExecReturn* DrawBrokenView::execute()
TopoDS_Shape shape = getSourceShape();
if (shape.IsNull()) {
Base::Console().Message("DBV::execute - %s - Source shape is Null.\n", getNameInDocument());
Base::Console().message("DBV::execute - %s - Source shape is Null.\n", getNameInDocument());
return DrawView::execute(); // NOLINT
}
@@ -188,7 +188,7 @@ TopoDS_Shape DrawBrokenView::apply1Break(const App::DocumentObject& breakObj, co
{
auto breakPoints = breakPointsFromObj(breakObj);
if (breakPoints.first.IsEqual(breakPoints.second, EWTOLERANCE)) {
Base::Console().Message("DBV::apply1Break - break points are equal\n");
Base::Console().message("DBV::apply1Break - break points are equal\n");
return inShape;
}
@@ -203,7 +203,7 @@ TopoDS_Shape DrawBrokenView::apply1Break(const App::DocumentObject& breakObj, co
auto halfSpace0 = makeHalfSpace(breakPoints.first, moveDir0, breakPoints.second);
FCBRepAlgoAPI_Cut mkCut0(inShape, halfSpace0);
if (!mkCut0.IsDone()) {
Base::Console().Message("DBV::apply1Break - cut0 failed\n");
Base::Console().message("DBV::apply1Break - cut0 failed\n");
}
TopoDS_Shape cut0 = mkCut0.Shape();
@@ -215,7 +215,7 @@ TopoDS_Shape DrawBrokenView::apply1Break(const App::DocumentObject& breakObj, co
auto halfSpace1 = makeHalfSpace(breakPoints.second, moveDir1, breakPoints.first);
FCBRepAlgoAPI_Cut mkCut1(inShape, halfSpace1);
if (!mkCut1.IsDone()) {
Base::Console().Message("DBV::apply1Break - cut1 failed\n");
Base::Console().message("DBV::apply1Break - cut1 failed\n");
}
TopoDS_Shape cut1 = mkCut1.Shape();
@@ -402,7 +402,7 @@ bool DrawBrokenView::isBreakObjectSketch(const App::DocumentObject& breakObj)
}
// there should be 2
if (sketchEdges.size() != 2) {
Base::Console().Message("DBV::isBreakObjectSketch - wrong number of edges\n");
Base::Console().message("DBV::isBreakObjectSketch - wrong number of edges\n");
return false;
}
// they should both have the same orientation
@@ -553,7 +553,7 @@ std::pair<Base::Vector3d, Base::Vector3d> DrawBrokenView::breakBoundsFromEdge(co
}
if (!DU::fpCompare(fabs(direction.Dot(stdY)), 1.0, EWTOLERANCE) ) {
Base::Console().Message("DBV::breakBoundsFromEdge - direction is not X or Y\n");
Base::Console().message("DBV::breakBoundsFromEdge - direction is not X or Y\n");
// TODO: throw? return nonsense?
}
@@ -596,7 +596,7 @@ double DrawBrokenView::breaklineLengthFromSketch(const App::DocumentObject& brea
if (sketchEdges.size() < 2) {
// need 2 edges
Base::Console().Message("DBV::breaklineLengthFromSketch - not enough edges\n");
Base::Console().message("DBV::breaklineLengthFromSketch - not enough edges\n");
}
std::pair<Base::Vector3d, Base::Vector3d> ends0 = SU::getEdgeEnds(sketchEdges.front());
@@ -1158,9 +1158,9 @@ bool DrawBrokenView::isDirectionReversed(Base::Vector3d direction) const
void DrawBrokenView::printBreakList(const std::string& text, const BreakList& inBreaks) const
{
Base::Console().Message("DBV - %s\n", text.c_str());
Base::Console().message("DBV - %s\n", text.c_str());
for (auto& entry : inBreaks) {
Base::Console().Message(" > label: %s > low: %.3f > high: %.3f > net: %.3f\n", entry.breakObj->Label.getValue(),
Base::Console().message(" > label: %s > low: %.3f > high: %.3f > net: %.3f\n", entry.breakObj->Label.getValue(),
entry.lowLimit, entry.highLimit, entry.netRemoved);
}
}

View File

@@ -174,7 +174,7 @@ TopoDS_Shape DrawComplexSection::makeCuttingTool(double dMax)
bool isPositionOK = validateProfilePosition(profileWire, sectionCS);
if (!isPositionOK) {
//profile is not in a good position. Result might not be right.
Base::Console().Warning("DCS::makeCuttingTool - %s - profile is outside shape box\n",
Base::Console().warning("DCS::makeCuttingTool - %s - profile is outside shape box\n",
getNameInDocument());
}
@@ -302,7 +302,7 @@ void DrawComplexSection::makeSectionCut(const TopoDS_Shape& baseShape)
waitingForAlign(true);
}
catch (...) {
Base::Console().Message("DCS::makeSectionCut - failed to make alignedPieces");
Base::Console().message("DCS::makeSectionCut - failed to make alignedPieces");
return;
}
@@ -326,7 +326,6 @@ void DrawComplexSection::onSectionCutFinished()
//for Aligned strategy, cut the rawShape by each segment of the tool
void DrawComplexSection::makeAlignedPieces(const TopoDS_Shape& rawShape)
{
if (!canBuild(getSectionCS(), CuttingToolWireObject.getValue())) {
throw Base::RuntimeError("Profile is parallel to Section Normal");
}
@@ -469,7 +468,7 @@ DrawComplexSection::findSectionPlaneIntersections(const TopoDS_Shape& shapeToInt
{
if (shapeToIntersect.IsNull()) {
// this shouldn't happen
Base::Console().Warning("DCS::findSectionPlaneInter - %s - cut shape is Null\n",
Base::Console().warning("DCS::findSectionPlaneInter - %s - cut shape is Null\n",
getNameInDocument());
return {};
}
@@ -486,7 +485,7 @@ TopoDS_Compound DrawComplexSection::singleToolIntersections(const TopoDS_Shape&
App::DocumentObject* toolObj = CuttingToolWireObject.getValue();
if (!isLinearProfile(toolObj)) {
//TODO: special handling here
// Base::Console().Message("DCS::singleToolIntersection - profile has curves\n");
// Base::Console().message("DCS::singleToolIntersection - profile has curves\n");
}
BRep_Builder builder;
@@ -526,7 +525,7 @@ TopoDS_Compound DrawComplexSection::alignedToolIntersections(const TopoDS_Shape&
App::DocumentObject* toolObj = CuttingToolWireObject.getValue();
if (!isLinearProfile(toolObj)) {
//TODO: special handling here?
// Base::Console().Message("DCS::alignedToolIntersection - profile has curves\n");
// Base::Console().message("DCS::alignedToolIntersection - profile has curves\n");
}
gp_Pln effectivePlane = getSectionPlane();
@@ -730,7 +729,7 @@ TopoDS_Wire DrawComplexSection::makeSectionLineWire()
}
else {
//probably can't happen as cut profile has been checked before this
Base::Console().Message("DCS::makeSectionLineGeometry - profile is type: %d\n",
Base::Console().message("DCS::makeSectionLineGeometry - profile is type: %d\n",
static_cast<int>(sScaled.ShapeType()));
return TopoDS_Wire();
}
@@ -817,7 +816,7 @@ bool DrawComplexSection::validateOffsetProfile(TopoDS_Wire profile, Base::Vector
if (angleRad < angleThresholdRad &&
angleRad > 0.0) {
// profile segment is slightly skewed. possible bad SectionNormal?
Base::Console().Warning("%s profile is slightly skewed. Check SectionNormal low decimal places\n",
Base::Console().warning("%s profile is slightly skewed. Check SectionNormal low decimal places\n",
getNameInDocument());
return false;
}
@@ -1419,13 +1418,13 @@ std::vector<std::pair<int, Base::Vector3d>> DrawComplexSection::getSegmentViewDi
if (!checkSectionCS()) {
// results will likely be incorrect
// this message will show for every recompute of the complex section.
Base::Console().Warning("Coordinate system for ComplexSection is invalid. Check SectionNormal, Direction or XDirection.\n");
Base::Console().warning("Coordinate system for ComplexSection is invalid. Check SectionNormal, Direction or XDirection.\n");
}
auto profileVector = Base::convertTo<Base::Vector3d>(makeProfileVector(profileWire));
auto parallelDot = profileVector.Dot(sectionNormal);
if (DU::fpCompare(std::fabs(parallelDot), 1, EWTOLERANCE)) {
Base::Console().Warning("Section normal is parallel to profile vector. Results may be incorrect.\n");
Base::Console().warning("Section normal is parallel to profile vector. Results may be incorrect.\n");
}
auto profilePlanWire = closeProfile(profileWire, sectionNormal, m_shapeSize);

View File

@@ -81,7 +81,7 @@ DrawViewDimension* DrawDimHelper::makeExtentDim(DrawViewPart* dvp,
DrawViewDimension* DrawDimHelper::makeExtentDim(DrawViewPart* dvp, std::vector<std::string> edgeNames,
int direction)
{
// Base::Console().Message("DDH::makeExtentDim() - dvp: %s edgeNames: %d\n",
// Base::Console().message("DDH::makeExtentDim() - dvp: %s edgeNames: %d\n",
// dvp->Label.getValue(), edgeNames.size());
if (!dvp) {
return nullptr;
@@ -147,7 +147,7 @@ void DrawDimHelper::makeExtentDim3d(DrawViewPart* dvp, const std::string& dimTyp
void DrawDimHelper::makeExtentDim3d(DrawViewPart* dvp, ReferenceVector references, int direction)
{
// Base::Console().Message("DDH::makeExtentDim3d() - dvp: %s references: %d\n",
// Base::Console().message("DDH::makeExtentDim3d() - dvp: %s references: %d\n",
// dvp->Label.getValue(), references.size());
if (!dvp) {
return;
@@ -205,7 +205,7 @@ void DrawDimHelper::makeExtentDim3d(DrawViewPart* dvp, ReferenceVector reference
std::pair<Base::Vector3d, Base::Vector3d>
DrawDimHelper::minMax(DrawViewPart* dvp, std::vector<std::string> edgeNames, int direction)
{
// Base::Console().Message("DDH::minMax() - edgeName: %d\n", edgeNames.size());
// Base::Console().message("DDH::minMax() - edgeName: %d\n", edgeNames.size());
std::pair<Base::Vector3d, Base::Vector3d> result;
Base::Vector3d refMin;
Base::Vector3d refMax;
@@ -297,7 +297,7 @@ DrawDimHelper::minMax(DrawViewPart* dvp, std::vector<std::string> edgeNames, int
//computation intensive for a cosmetic result.
gp_Pnt DrawDimHelper::findClosestPoint(std::vector<TopoDS_Edge> inEdges, TopoDS_Edge& boundary)
{
// Base::Console().Message("DDH::findClosestPoint() - edges: %d\n", inEdges.size());
// Base::Console().message("DDH::findClosestPoint() - edges: %d\n", inEdges.size());
//
//find an extent point that is actually on one of the curves
double minDistance(std::numeric_limits<float>::max());
@@ -305,12 +305,12 @@ gp_Pnt DrawDimHelper::findClosestPoint(std::vector<TopoDS_Edge> inEdges, TopoDS_
for (auto& edge : inEdges) {
BRepExtrema_DistShapeShape extss(edge, boundary);
if (!extss.IsDone()) {
Base::Console().Warning(
Base::Console().warning(
"DDH::findClosestPoint - BRepExtrema_DistShapeShape failed - 1\n");
continue;
}
if (extss.NbSolution() == 0) {
Base::Console().Warning(
Base::Console().warning(
"DDH::findClosestPoint - BRepExtrema_DistShapeShape failed - 2\n");
continue;
}
@@ -325,7 +325,7 @@ gp_Pnt DrawDimHelper::findClosestPoint(std::vector<TopoDS_Edge> inEdges, TopoDS_
std::pair<Base::Vector3d, Base::Vector3d>
DrawDimHelper::minMax3d(DrawViewPart* dvp, ReferenceVector references, int direction)
{
// Base::Console().Message("DDH::minMax3d() - references: %d\n", references.size());
// Base::Console().message("DDH::minMax3d() - references: %d\n", references.size());
std::pair<Base::Vector3d, Base::Vector3d> result;
Base::Vector3d refMin;
Base::Vector3d refMax;
@@ -420,7 +420,7 @@ DrawDimHelper::makeDistDim(DrawViewPart* dvp, std::string dimType,
Base::Vector3d inMax,//expects scaled from makeExtentDim
bool extent)
{
// Base::Console().Message("DDH::makeDistDim() - inMin: %s inMax: %s\n",
// Base::Console().message("DDH::makeDistDim() - inMin: %s inMax: %s\n",
// DrawUtil::formatVector(inMin).c_str(),
// DrawUtil::formatVector(inMax).c_str());
TechDraw::DrawPage* page = dvp->findParentPage();

View File

@@ -126,7 +126,7 @@ void DrawGeomHatch::onChanged(const App::Property* prop)
App::DocumentObjectExecReturn *DrawGeomHatch::execute()
{
// Base::Console().Message("DGH::execute()\n");
// Base::Console().message("DGH::execute()\n");
//does execute even need to exist? Its all about the property value changes
DrawViewPart* parent = getSourceView();
if (parent) {
@@ -145,7 +145,7 @@ void DrawGeomHatch::onDocumentRestored()
void DrawGeomHatch::replacePatIncluded(std::string newHatchFileName)
{
// Base::Console().Message("DGH::replaceFileIncluded(%s)\n", newHatchFileName.c_str());
// Base::Console().message("DGH::replaceFileIncluded(%s)\n", newHatchFileName.c_str());
if (newHatchFileName.empty()) {
return;
}
@@ -160,13 +160,13 @@ void DrawGeomHatch::replacePatIncluded(std::string newHatchFileName)
void DrawGeomHatch::setupObject()
{
// Base::Console().Message("DGH::setupObject()\n");
// Base::Console().message("DGH::setupObject()\n");
replacePatIncluded(FilePattern.getValue());
}
void DrawGeomHatch::unsetupObject()
{
// Base::Console().Message("DGH::unsetupObject() - status: %lu removing: %d \n", getStatus(), isRemoving());
// Base::Console().message("DGH::unsetupObject() - status: %lu removing: %d \n", getStatus(), isRemoving());
App::DocumentObject* source = Source.getValue();
DrawView* dv = freecad_cast<DrawView*>(source);
if (dv) {
@@ -179,7 +179,7 @@ void DrawGeomHatch::unsetupObject()
void DrawGeomHatch::makeLineSets()
{
// Base::Console().Message("DGH::makeLineSets()\n");
// Base::Console().message("DGH::makeLineSets()\n");
if (!PatIncluded.isEmpty() &&
!NamePattern.isEmpty()) {
m_lineSets.clear();
@@ -229,7 +229,7 @@ std::vector<PATLineSpec> DrawGeomHatch::getDecodedSpecsFromFile(std::string file
{
Base::FileInfo fi(fileSpec);
if (!fi.isReadable()) {
Base::Console().Error("DrawGeomHatch::getDecodedSpecsFromFile not able to open %s!\n", fileSpec.c_str());
Base::Console().error("DrawGeomHatch::getDecodedSpecsFromFile not able to open %s!\n", fileSpec.c_str());
return std::vector<PATLineSpec>();
}
return PATLineSpec::getSpecsForPattern(fileSpec, myPattern);
@@ -307,7 +307,7 @@ std::vector<LineSet> DrawGeomHatch::getTrimmedLines(DrawViewPart* source,
double hatchRotation,
Base::Vector3d hatchOffset)
{
// Base::Console().Message("DGH::getTrimmedLines() - rotation: %.3f hatchOffset: %s\n", hatchRotation, DrawUtil::formatVector(hatchOffset).c_str());
// Base::Console().message("DGH::getTrimmedLines() - rotation: %.3f hatchOffset: %s\n", hatchRotation, DrawUtil::formatVector(hatchOffset).c_str());
(void)source;
std::vector<LineSet> result;
@@ -444,7 +444,7 @@ std::vector<TopoDS_Edge> DrawGeomHatch::makeEdgeOverlay(PATLineSpec hatchLine, B
// we handle hatch as a set of parallel lines made of dashes, here we loop on each line
for (int i = firstRepeatIndex ; i <= lastRepeatIndex ; ++i) {
Base::Vector3d currentOrigin = origin + static_cast<double>(i) * hatchIntervalAndOffset;
int firstDashIndex, lastDashIndex;
if (std::abs(hatchDirection.x) > std::abs(hatchDirection.y)) { // we compute intersections with minX and maxX
firstDashIndex = (hatchDirection.x > 0.)
@@ -499,7 +499,7 @@ TopoDS_Edge DrawGeomHatch::makeLine(const Base::Vector3d& s, const Base::Vector3
//! these will be clipped to shape on the gui side
std::vector<LineSet> DrawGeomHatch::getFaceOverlay(int iFace)
{
// Base::Console().Message("TRACE - DGH::getFaceOverlay(%d)\n", iFace);
// Base::Console().message("TRACE - DGH::getFaceOverlay(%d)\n", iFace);
std::vector<LineSet> result;
DrawViewPart* source = getSourceView();
if (!source ||

View File

@@ -126,7 +126,7 @@ bool DrawHatch::affectsFace(int i)
//remove a subElement(Face) from Source PropertyLinkSub
bool DrawHatch::removeSub(std::string toRemove)
{
// Base::Console().Message("DH::removeSub(%s)\n", toRemove.c_str());
// Base::Console().message("DH::removeSub(%s)\n", toRemove.c_str());
bool removed = false;
const std::vector<std::string> &sourceNames = Source.getSubValues();
std::vector<std::string> newList;
@@ -146,7 +146,7 @@ bool DrawHatch::removeSub(std::string toRemove)
bool DrawHatch::removeSub(int i)
{
// Base::Console().Message("DH::removeSub(%d)\n", i);
// Base::Console().message("DH::removeSub(%d)\n", i);
std::stringstream ss;
ss << "Face" << i;
return removeSub(ss.str());
@@ -160,7 +160,7 @@ bool DrawHatch::empty(void)
void DrawHatch::replaceFileIncluded(std::string newHatchFileName)
{
// Base::Console().Message("DH::replaceFileIncluded(%s)\n", newHatchFileName.c_str());
// Base::Console().message("DH::replaceFileIncluded(%s)\n", newHatchFileName.c_str());
if (newHatchFileName.empty()) {
return;
}
@@ -175,13 +175,13 @@ void DrawHatch::replaceFileIncluded(std::string newHatchFileName)
void DrawHatch::setupObject()
{
// Base::Console().Message("DH::setupObject()\n");
// Base::Console().message("DH::setupObject()\n");
replaceFileIncluded(HatchPattern.getValue());
}
void DrawHatch::unsetupObject(void)
{
// Base::Console().Message("DH::unsetupObject() - status: %lu removing: %d \n", getStatus(), isRemoving());
// Base::Console().message("DH::unsetupObject() - status: %lu removing: %d \n", getStatus(), isRemoving());
App::DocumentObject* source = Source.getValue();
DrawView* dv = freecad_cast<DrawView*>(source);
if (dv) {

View File

@@ -130,7 +130,7 @@ short DrawLeaderLine::mustExecute() const
App::DocumentObjectExecReturn *DrawLeaderLine::execute()
{
// Base::Console().Message("DLL::execute()\n");
// Base::Console().message("DLL::execute()\n");
if (!keepUpdated()) {
return App::DocumentObject::StdReturn;
}
@@ -166,7 +166,7 @@ bool DrawLeaderLine::keepUpdated()
double DrawLeaderLine::getBaseScale() const
{
// Base::Console().Message("DLL::getBaseScale()\n");
// Base::Console().message("DLL::getBaseScale()\n");
DrawView* parent = getBaseView();
if (!parent) {
return 1.0;
@@ -176,7 +176,7 @@ double DrawLeaderLine::getBaseScale() const
double DrawLeaderLine::getScale() const
{
// Base::Console().Message("DLL::getScale()\n");
// Base::Console().message("DLL::getScale()\n");
if (!Scalable.getValue()) {
return 1.0;
}
@@ -296,9 +296,9 @@ Base::Vector3d DrawLeaderLine::lastSegmentDirection() const
//! pagePoints are in mm from bottom left of page.
DrawLeaderLine* DrawLeaderLine::makeLeader(DrawViewPart* parent, std::vector<Base::Vector3d> pagePoints, int iStartSymbol, int iEndSymbol)
{
Base::Console().Message("DLL::makeLeader(%s, %d, %d, %d)\n", parent->getNameInDocument(), pagePoints.size(), iStartSymbol, iEndSymbol);
Base::Console().message("DLL::makeLeader(%s, %d, %d, %d)\n", parent->getNameInDocument(), pagePoints.size(), iStartSymbol, iEndSymbol);
if (pagePoints.size() < 2) {
Base::Console().Message("DLL::makeLeader - not enough pagePoints\n");
Base::Console().message("DLL::makeLeader - not enough pagePoints\n");
return {};
}
@@ -364,7 +364,7 @@ std::vector<Base::Vector3d> DrawLeaderLine::getScaledAndRotatedPoints(bool doSc
auto dvp = getBaseView();
if (!dvp) {
// document is restoring?
// Base::Console().Message("DLL::getScaledAndRotatedPoints - no DV\n");
// Base::Console().message("DLL::getScaledAndRotatedPoints - no DV\n");
return {};
}
@@ -455,7 +455,7 @@ bool DrawLeaderLine::isParentReady() const
if (!parent || (dvp && !dvp->hasGeometry())) {
// still restoring or
// we are attached to a dvp that has no geometry, so don't bother trying to draw yet
Base::Console().Message("DLL:: - no parent or geometry\n");
Base::Console().message("DLL:: - no parent or geometry\n");
return false;
}
return true;
@@ -468,9 +468,9 @@ bool DrawLeaderLine::getDefAuto() const
void DrawLeaderLine::dumpWaypoints(const std::vector<Base::Vector3d> &points, const std::string &label)
{
Base::Console().Message("DLL::dumpWaypoints - %s\n", label.c_str());
Base::Console().message("DLL::dumpWaypoints - %s\n", label.c_str());
for (auto& p : points) {
Base::Console().Message(">>>> a point: %s\n", DU::formatVector(p).c_str());
Base::Console().message(">>>> a point: %s\n", DU::formatVector(p).c_str());
}
}

View File

@@ -99,7 +99,7 @@ void DrawPage::onChanged(const App::Property* prop)
if (prop == &KeepUpdated && KeepUpdated.getValue()) {
if (!isRestoring() && !isUnsetting()) {
//would be nice if this message was displayed immediately instead of after the recomputeFeature
Base::Console().Message("Rebuilding Views for: %s/%s\n", getNameInDocument(),
Base::Console().message("Rebuilding Views for: %s/%s\n", getNameInDocument(),
Label.getValue());
updateAllViews();
purgeTouched();
@@ -270,7 +270,7 @@ int DrawPage::addView(App::DocumentObject* docObj, bool setPosition)
//check if View fits on Page
if (!view->checkFit(this)) {
Base::Console().Warning("%s is larger than page. Will be scaled.\n",
Base::Console().warning("%s is larger than page. Will be scaled.\n",
view->getNameInDocument());
view->ScaleType.setValue("Automatic");
}
@@ -325,7 +325,7 @@ void DrawPage::onDocumentRestored()
void DrawPage::redrawCommand()
{
// Base::Console().Message("DP::redrawCommand()\n");
// Base::Console().message("DP::redrawCommand()\n");
forceRedraw(true);
updateAllViews();
forceRedraw(false);
@@ -333,7 +333,7 @@ void DrawPage::redrawCommand()
void DrawPage::updateAllViews()
{
// Base::Console().Message("DP::updateAllViews()\n");
// Base::Console().message("DP::updateAllViews()\n");
//unordered list of views within page
std::vector<App::DocumentObject*> featViews = getAllViews();
@@ -374,7 +374,7 @@ std::vector<App::DocumentObject*> DrawPage::getViews() const
v = static_cast<App::Link*>(v)->getLinkedObject();
addChildren = true;
}
if (!v->isDerivedFrom<DrawView>()) {
continue;
}
@@ -441,7 +441,7 @@ void DrawPage::unsetupObject()
Views.setValues(emptyViews);
}
catch (...) {
Base::Console().Warning("DP::unsetupObject - %s - error while deleting children\n",
Base::Console().warning("DP::unsetupObject - %s - error while deleting children\n",
getNameInDocument());
}

View File

@@ -92,7 +92,7 @@ DrawProjGroup::DrawProjGroup()
//TODO: this duplicates code in DVP
std::vector<App::DocumentObject*> DrawProjGroup::getAllSources() const
{
// Base::Console().Message("DPG::getAllSources()\n");
// Base::Console().message("DPG::getAllSources()\n");
const std::vector<App::DocumentObject*> links = Source.getValues();
std::vector<DocumentObject*> xLinks;
XSource.getLinks(xLinks);
@@ -169,7 +169,7 @@ void DrawProjGroup::onChanged(const App::Property* prop)
App::DocumentObjectExecReturn* DrawProjGroup::execute()
{
// Base::Console().Message("DPG::execute() - %s - waitingForChildren: %d\n",
// Base::Console().message("DPG::execute() - %s - waitingForChildren: %d\n",
// getNameInDocument(), waitingForChildren());
if (!keepUpdated())
return App::DocumentObject::StdReturn;
@@ -227,7 +227,7 @@ short DrawProjGroup::mustExecute() const
void DrawProjGroup::reportReady()
{
// Base::Console().Message("DPG::reportReady - waitingForChildren: %d\n", waitingForChildren());
// Base::Console().message("DPG::reportReady - waitingForChildren: %d\n", waitingForChildren());
if (waitingForChildren()) {
//not ready yet
return;
@@ -255,7 +255,7 @@ TechDraw::DrawPage* DrawProjGroup::getPage() const { return findParentPage(); }
//does the unscaled DPG fit on the page?
bool DrawProjGroup::checkFit() const
{
// Base::Console().Message("DPG::checkFit() - %s\n", getNameInDocument());
// Base::Console().message("DPG::checkFit() - %s\n", getNameInDocument());
if (waitingForChildren()) {
//assume everything fits since we don't know what size the children are
return true;
@@ -268,7 +268,7 @@ bool DrawProjGroup::checkFit() const
bool DrawProjGroup::checkFit(DrawPage* page) const
{
// Base::Console().Message("DPG::checkFit(page) - %s\n", getNameInDocument());
// Base::Console().message("DPG::checkFit(page) - %s\n", getNameInDocument());
if (waitingForChildren()) {
return true;
}
@@ -283,7 +283,7 @@ bool DrawProjGroup::checkFit(DrawPage* page) const
//calculate a scale that fits all views on page
double DrawProjGroup::autoScale() const
{
// Base::Console().Message("DPG::autoScale() - %s\n", getNameInDocument());
// Base::Console().message("DPG::autoScale() - %s\n", getNameInDocument());
auto page = findParentPage();
if (!page) {
throw Base::RuntimeError("No page is assigned to this feature");
@@ -293,7 +293,7 @@ double DrawProjGroup::autoScale() const
double DrawProjGroup::autoScale(double w, double h) const
{
// Base::Console().Message("DPG::autoScale(%.3f, %.3f) - %s\n", w, h, getNameInDocument());
// Base::Console().message("DPG::autoScale(%.3f, %.3f) - %s\n", w, h, getNameInDocument());
//get the space used by views + white space at 1:1 scale
QRectF bigBox = getRect(false);//unscaled box
@@ -309,7 +309,7 @@ QRectF DrawProjGroup::getRect() const { return getRect(true); }
QRectF DrawProjGroup::getRect(bool scaled) const
{
// Base::Console().Message("DPG::getRect - views: %d\n", Views.getValues().size());
// Base::Console().message("DPG::getRect - views: %d\n", Views.getValues().size());
std::array<DrawProjGroupItem*, MAXPROJECTIONCOUNT> viewPtrs;
arrangeViewPointers(viewPtrs);
double totalWidth, totalHeight;
@@ -359,7 +359,7 @@ App::DocumentObject* DrawProjGroup::getProjObj(const char* viewProjType) const
auto projPtr(freecad_cast<DrawProjGroupItem*>(it));
if (!projPtr) {
//if an element in Views is not a DPGI, something really bad has happened somewhere
Base::Console().Error("PROBLEM - DPG::getProjObj - non DPGI entry in Views! %s / %s\n",
Base::Console().error("PROBLEM - DPG::getProjObj - non DPGI entry in Views! %s / %s\n",
getNameInDocument(), viewProjType);
throw Base::TypeError("Error: projection in DPG list is not a DPGI!");
}
@@ -377,7 +377,7 @@ DrawProjGroupItem* DrawProjGroup::getProjItem(const char* viewProjType) const
auto result(dynamic_cast<TechDraw::DrawProjGroupItem*>(docObj));
if (!result && docObj) {
//should never have a item in DPG that is not a DPGI.
Base::Console().Error("PROBLEM - DPG::getProjItem finds non-DPGI in Group %s / %s\n",
Base::Console().error("PROBLEM - DPG::getProjItem finds non-DPGI in Group %s / %s\n",
getNameInDocument(), viewProjType);
throw Base::TypeError("Error: projection in DPG list is not a DPGI!");
}
@@ -409,7 +409,7 @@ bool DrawProjGroup::hasProjection(const char* viewProjType) const
auto view(dynamic_cast<TechDraw::DrawProjGroupItem*>(it));
if (!view) {
//should never have a item in DPG that is not a DPGI.
Base::Console().Error("PROBLEM - DPG::hasProjection finds non-DPGI in Group %s / %s\n",
Base::Console().error("PROBLEM - DPG::hasProjection finds non-DPGI in Group %s / %s\n",
getNameInDocument(), viewProjType);
throw Base::TypeError("Error: projection in DPG list is not a DPGI!");
}
@@ -423,12 +423,12 @@ bool DrawProjGroup::hasProjection(const char* viewProjType) const
bool DrawProjGroup::canDelete(const char* viewProjType) const
{
// Base::Console().Message("DPG::canDelete(%s)\n", viewProjType);
// Base::Console().message("DPG::canDelete(%s)\n", viewProjType);
for (const auto it : Views.getValues()) {
auto view(dynamic_cast<TechDraw::DrawProjGroupItem*>(it));
if (!view) {
//should never have a item in DPG that is not a DPGI.
Base::Console().Error("PROBLEM - DPG::hasProjection finds non-DPGI in Group %s / %s\n",
Base::Console().error("PROBLEM - DPG::hasProjection finds non-DPGI in Group %s / %s\n",
getNameInDocument(), viewProjType);
throw Base::TypeError("Error: projection in DPG list is not a DPGI!");
}
@@ -453,13 +453,13 @@ bool DrawProjGroup::canDelete(const char* viewProjType) const
App::DocumentObject* DrawProjGroup::addProjection(const char* viewProjType)
{
// Base::Console().Message("DPG::addProjection(%s)\n", viewProjType ? viewProjType : "null");
// Base::Console().message("DPG::addProjection(%s)\n", viewProjType ? viewProjType : "null");
DrawProjGroupItem* view(nullptr);
std::pair<Base::Vector3d, Base::Vector3d> vecs;
DrawPage* dp = findParentPage();
if (!dp)
Base::Console().Error("DPG:addProjection - %s - DPG is not on a page!\n",
Base::Console().error("DPG:addProjection - %s - DPG is not on a page!\n",
getNameInDocument());
if (checkViewProjType(viewProjType) && !hasProjection(viewProjType)) {
@@ -467,7 +467,7 @@ App::DocumentObject* DrawProjGroup::addProjection(const char* viewProjType)
view = getDocument()->addObject<TechDraw::DrawProjGroupItem>(FeatName.c_str());
if (!view) {
//should never happen that we create a DPGI that isn't a DPGI!!
Base::Console().Error("PROBLEM - DPG::addProjection - created a non DPGI! %s / %s\n",
Base::Console().error("PROBLEM - DPG::addProjection - created a non DPGI! %s / %s\n",
getNameInDocument(), viewProjType);
throw Base::TypeError("Error: new projection is not a DPGI!");
}
@@ -523,7 +523,7 @@ int DrawProjGroup::removeProjection(const char* viewProjType)
}
else {
//if an element in Views is not a DPGI, something really bad has happened somewhere
Base::Console().Error(
Base::Console().error(
"PROBLEM - DPG::removeProjection - tries to remove non DPGI! %s / %s\n",
getNameInDocument(), viewProjType);
throw Base::TypeError("Error: projection in DPG list is not a DPGI!");
@@ -547,7 +547,7 @@ int DrawProjGroup::purgeProjections()
}
else {
//if an element in Views is not a DPGI, something really bad has happened somewhere
Base::Console().Error("PROBLEM - DPG::purgeProjection - tries to remove non DPGI! %s\n",
Base::Console().error("PROBLEM - DPG::purgeProjection - tries to remove non DPGI! %s\n",
getNameInDocument());
throw Base::TypeError("Error: projection in DPG list is not a DPGI!");
}
@@ -568,13 +568,13 @@ std::pair<Base::Vector3d, Base::Vector3d> DrawProjGroup::getDirsFromFront(DrawPr
std::pair<Base::Vector3d, Base::Vector3d> DrawProjGroup::getDirsFromFront(ProjDirection viewType)
{
// Base::Console().Message("DPG::getDirsFromFront(%s)\n", viewType.c_str());
// Base::Console().message("DPG::getDirsFromFront(%s)\n", viewType.c_str());
std::pair<Base::Vector3d, Base::Vector3d> result;
Base::Vector3d projDir, rotVec;
DrawProjGroupItem* anch = getAnchor();
if (!anch) {
Base::Console().Warning("DPG::getDirsFromFront - %s - No Anchor!\n", Label.getValue());
Base::Console().warning("DPG::getDirsFromFront - %s - No Anchor!\n", Label.getValue());
throw Base::RuntimeError("Project Group missing Anchor projection item");
}
@@ -594,7 +594,7 @@ gp_Dir DrawProjGroup::vec2dir(Base::Vector3d v)
//this can be improved. this implementation positions views too far apart.
Base::Vector3d DrawProjGroup::getXYPosition(const char* viewTypeCStr)
{
// Base::Console().Message("DPG::getXYPosition(%s)\n", Label.getValue());
// Base::Console().message("DPG::getXYPosition(%s)\n", Label.getValue());
// Third Angle: FTL T FTRight 0 1 2
// L F Right Rear 3 4 5 6
// FBL B FBRight 7 8 9
@@ -761,7 +761,7 @@ int DrawProjGroup::getViewIndex(const char* viewTypeCStr) const
projType = dp->ProjectionType.getValueAsString();
}
else {
Base::Console().Warning(
Base::Console().warning(
"DPG: %s - can not find parent page. Using default Projection Type. (1)\n",
getNameInDocument());
int projConv = getDefProjConv();
@@ -835,9 +835,9 @@ void DrawProjGroup::arrangeViewPointers(
projType = dp->ProjectionType.getValueAsString();
}
else {
Base::Console().Error("DPG:arrangeViewPointers - %s - DPG is not on a page!\n",
Base::Console().error("DPG:arrangeViewPointers - %s - DPG is not on a page!\n",
getNameInDocument());
Base::Console().Warning(
Base::Console().warning(
"DPG:arrangeViewPointers - using system default Projection Type\n",
getNameInDocument());
int projConv = getDefProjConv();
@@ -850,7 +850,7 @@ void DrawProjGroup::arrangeViewPointers(
// Iterate through views and populate viewPtrs
if (strcmp(projType, "Third Angle") != 0 && strcmp(projType, "First Angle") != 0) {
Base::Console().Warning("DPG: %s - unknown Projection convention: %s\n",
Base::Console().warning("DPG: %s - unknown Projection convention: %s\n",
getNameInDocument(), projType);
throw Base::ValueError(
"Unknown Projection convention in DrawProjGroup::arrangeViewPointers");
@@ -869,7 +869,7 @@ void DrawProjGroup::arrangeViewPointers(
auto oView(freecad_cast<DrawProjGroupItem*>(it));
if (!oView) {
//if an element in Views is not a DPGI, something really bad has happened somewhere
Base::Console().Error(
Base::Console().error(
"PROBLEM - DPG::arrangeViewPointers - non DPGI in Views! %s\n",
getNameInDocument());
throw Base::TypeError("Error: projection in DPG list is not a DPGI!");
@@ -908,7 +908,7 @@ void DrawProjGroup::arrangeViewPointers(
viewPtrs[thirdAngle ? 9 : 0] = oView;
}
else {
Base::Console().Warning("DPG: %s - unknown view type: %s. \n",
Base::Console().warning("DPG: %s - unknown view type: %s. \n",
getNameInDocument(), viewTypeCStr);
throw Base::TypeError(
"Unknown view type in DrawProjGroup::arrangeViewPointers.");
@@ -942,7 +942,7 @@ void DrawProjGroup::makeViewBbs(std::array<DrawProjGroupItem*, MAXPROJECTIONCOUN
void DrawProjGroup::recomputeChildren()
{
// Base::Console().Message("DPG::recomputeChildren() - waiting: %d\n", waitingForChildren());
// Base::Console().message("DPG::recomputeChildren() - waiting: %d\n", waitingForChildren());
for (const auto it : Views.getValues()) {
auto view(freecad_cast<DrawProjGroupItem*>(it));
if (!view) {
@@ -956,7 +956,7 @@ void DrawProjGroup::recomputeChildren()
void DrawProjGroup::autoPositionChildren()
{
// Base::Console().Message("DPG::autoPositionChildren() - %s - waiting: %d\n",
// Base::Console().message("DPG::autoPositionChildren() - %s - waiting: %d\n",
// getNameInDocument(), waitingForChildren());
for (const auto it : Views.getValues()) {
auto view(freecad_cast<DrawProjGroupItem*>(it));
@@ -975,7 +975,7 @@ void DrawProjGroup::autoPositionChildren()
*/
void DrawProjGroup::updateChildrenScale()
{
// Base::Console().Message("DPG::updateChildrenScale() - waiting: %d\n", waitingForChildren());
// Base::Console().message("DPG::updateChildrenScale() - waiting: %d\n", waitingForChildren());
for (const auto it : Views.getValues()) {
auto view(freecad_cast<DrawProjGroupItem*>(it));
if (!view) {
@@ -998,7 +998,7 @@ void DrawProjGroup::updateChildrenSource()
auto view(freecad_cast<DrawProjGroupItem*>(it));
if (!view) {
//if an element in Views is not a DPGI, something really bad has happened somewhere
Base::Console().Error(
Base::Console().error(
"PROBLEM - DPG::updateChildrenSource - non DPGI entry in Views! %s\n",
getNameInDocument());
throw Base::TypeError("Error: projection in DPG list is not a DPGI!");
@@ -1022,7 +1022,7 @@ void DrawProjGroup::updateChildrenLock()
auto view(freecad_cast<DrawProjGroupItem*>(it));
if (!view) {
//if an element in Views is not a DPGI, something really bad has happened somewhere
Base::Console().Error(
Base::Console().error(
"PROBLEM - DPG::updateChildrenLock - non DPGI entry in Views! %s\n",
getNameInDocument());
throw Base::TypeError("Error: projection in DPG list is not a DPGI!");
@@ -1037,7 +1037,7 @@ void DrawProjGroup::updateChildrenEnforce(void)
auto view(freecad_cast<DrawProjGroupItem*>(it));
if (!view) {
//if an element in Views is not a DPGI, something really bad has happened somewhere
Base::Console().Error(
Base::Console().error(
"PROBLEM - DPG::updateChildrenEnforce - non DPGI entry in Views! %s\n",
getNameInDocument());
throw Base::TypeError("Error: projection in DPG list is not a DPGI!");
@@ -1183,7 +1183,7 @@ int DrawProjGroup::getDefProjConv() const { return Preferences::projectionAngle(
*/
void DrawProjGroup::dumpISO(const char* title)
{
Base::Console().Message("DPG ISO: %s\n", title);
Base::Console().message("DPG ISO: %s\n", title);
for (auto& docObj : Views.getValues()) {
Base::Vector3d dir;
Base::Vector3d axis;
@@ -1192,7 +1192,7 @@ void DrawProjGroup::dumpISO(const char* title)
dir = v->Direction.getValue();
axis = v->getXDirection();
Base::Console().Message("%s: %s/%s\n", t.c_str(), DrawUtil::formatVector(dir).c_str(),
Base::Console().message("%s: %s/%s\n", t.c_str(), DrawUtil::formatVector(dir).c_str(),
DrawUtil::formatVector(axis).c_str());
}
}

View File

@@ -108,7 +108,7 @@ bool DrawProjGroupItem::showLock() const
App::DocumentObjectExecReturn *DrawProjGroupItem::execute()
{
// Base::Console().Message("DPGI::execute() - %s / %s\n", getNameInDocument(), Label.getValue());
// Base::Console().message("DPGI::execute() - %s / %s\n", getNameInDocument(), Label.getValue());
if (!keepUpdated()) {
return DrawView::execute();
}
@@ -135,7 +135,7 @@ App::DocumentObjectExecReturn *DrawProjGroupItem::execute()
void DrawProjGroupItem::postHlrTasks()
{
// Base::Console().Message("DPGI::postHlrTasks() - %s\n", getNameInDocument());
// Base::Console().message("DPGI::postHlrTasks() - %s\n", getNameInDocument());
DrawViewPart::postHlrTasks();
DrawProjGroup* pGroup = getPGroup();
@@ -154,7 +154,7 @@ void DrawProjGroupItem::autoPosition()
if (!pGroup) {
return;
}
// Base::Console().Message("DPGI::autoPosition(%s)\n", Label.getValue());
// Base::Console().message("DPGI::autoPosition(%s)\n", Label.getValue());
if (LockPosition.getValue()) {
return;
}
@@ -171,7 +171,7 @@ void DrawProjGroupItem::autoPosition()
void DrawProjGroupItem::onDocumentRestored()
{
// Base::Console().Message("DPGI::onDocumentRestored() - %s\n", getNameInDocument());
// Base::Console().message("DPGI::onDocumentRestored() - %s\n", getNameInDocument());
DrawView::onDocumentRestored();
App::DocumentObjectExecReturn* rc = DrawProjGroupItem::execute();
if (rc) {
@@ -191,7 +191,7 @@ bool DrawProjGroupItem::isAnchor() const
Base::Vector3d DrawProjGroupItem::getXDirection() const
{
// Base::Console().Message("DPGI::getXDirection() - %s\n", Label.getValue());
// Base::Console().message("DPGI::getXDirection() - %s\n", Label.getValue());
Base::Vector3d result(1.0, 0.0, 0.0); //default X
App::Property* prop = getPropertyByName("XDirection");
if (prop) {
@@ -210,14 +210,14 @@ Base::Vector3d DrawProjGroupItem::getXDirection() const
}
}
else { //not sure this branch can actually happen
Base::Console().Message("DPGI::getXDirection - unexpected branch taken!\n");
Base::Console().message("DPGI::getXDirection - unexpected branch taken!\n");
prop = getPropertyByName("RotationVector");
if (prop) {
result = RotationVector.getValue();
}
else {
Base::Console().Message("DPGI::getXDirection - missing RotationVector and XDirection\n");
Base::Console().message("DPGI::getXDirection - missing RotationVector and XDirection\n");
}
}
return result;
@@ -227,7 +227,7 @@ Base::Vector3d DrawProjGroupItem::getLegacyX(const Base::Vector3d& pt,
const Base::Vector3d& axis,
const bool flip) const
{
// Base::Console().Message("DPGI::getLegacyX() - %s\n", Label.getValue());
// Base::Console().message("DPGI::getLegacyX() - %s\n", Label.getValue());
App::Property* prop = getPropertyByName("RotationVector");
if (prop) {
Base::Vector3d result = RotationVector.getValue();
@@ -312,7 +312,7 @@ void DrawProjGroupItem::unsetupObject()
}
if (getPGroup()->getAnchor() == this && !getPGroup()->isUnsetting()) {
Base::Console().Warning("Warning - DPG (%s/%s) may be corrupt - Anchor deleted\n",
Base::Console().warning("Warning - DPG (%s/%s) may be corrupt - Anchor deleted\n",
getPGroup()->getNameInDocument(), getPGroup()->Label.getValue());
getPGroup()->Anchor.setValue(nullptr); //this catches situation where DPGI is deleted w/o DPG::removeProjection
}

View File

@@ -98,7 +98,7 @@ std::vector<TopoDS_Edge> DrawProjectSplit::getEdgesForWalker(TopoDS_Shape shape,
if (!DrawUtil::isZeroEdge(e, 2.0 * EWTOLERANCE)) {
nonZero.push_back(e);
} else {
Base::Console().Message("DPS::getEdgesForWalker found ZeroEdge!\n");
Base::Console().message("DPS::getEdgesForWalker found ZeroEdge!\n");
}
}
@@ -140,7 +140,7 @@ bool DrawProjectSplit::isOnEdge(TopoDS_Edge e, TopoDS_Vertex v, double& param, b
double dist = DrawUtil::simpleMinDist(v, e);
if (dist < 0.0) {
Base::Console().Error("DPS::isOnEdge - simpleMinDist failed: %.3f\n", dist);
Base::Console().error("DPS::isOnEdge - simpleMinDist failed: %.3f\n", dist);
return false;
} else if (dist < Precision::Confusion()) {
const gp_Pnt pt = BRep_Tool::Pnt(v); //have to duplicate method 3 to get param
@@ -222,7 +222,7 @@ std::vector<TopoDS_Edge> DrawProjectSplit::split1Edge(TopoDS_Edge e, std::vector
double last = BRepLProp_CurveTool::LastParameter(adapt);
if (first > last) {
//TODO parms.reverse();
Base::Console().Message("DPS::split1Edge - edge is backwards!\n");
Base::Console().message("DPS::split1Edge - edge is backwards!\n");
return result;
}
std::vector<double> parms;
@@ -245,7 +245,7 @@ std::vector<TopoDS_Edge> DrawProjectSplit::split1Edge(TopoDS_Edge e, std::vector
}
}
catch (Standard_Failure&) {
Base::Console().Message("DPS::split1Edge failed building edge segment\n");
Base::Console().message("DPS::split1Edge failed building edge segment\n");
}
}
return result;
@@ -322,7 +322,7 @@ std::vector<TopoDS_Edge> DrawProjectSplit::removeDuplicateEdges(std::vector<Topo
if (e.idx < inEdges.size()) {
result.push_back(inEdges.at(e.idx));
} else {
Base::Console().Message("ERROR - DPS::removeDuplicateEdges - access: %d inEdges: %d\n", e.idx, inEdges.size());
Base::Console().message("ERROR - DPS::removeDuplicateEdges - access: %d inEdges: %d\n", e.idx, inEdges.size());
//TODO: throw index error
}
}
@@ -401,7 +401,7 @@ std::string edgeSortItem::dump()
std::vector<TopoDS_Edge> DrawProjectSplit::scrubEdges(const std::vector<TechDraw::BaseGeomPtr>& origEdges,
std::vector<TopoDS_Edge> &closedEdges)
{
// Base::Console().Message("DPS::scrubEdges() - BaseGeom in: %d\n", origEdges.size());
// Base::Console().message("DPS::scrubEdges() - BaseGeom in: %d\n", origEdges.size());
//make a copy of the input edges so the loose tolerances of face finding are
//not applied to the real edge geometry. See TopoDS_Shape::TShape().
std::vector<TopoDS_Edge> copyEdges;
@@ -420,7 +420,7 @@ std::vector<TopoDS_Edge> DrawProjectSplit::scrubEdges(const std::vector<TechDraw
std::vector<TopoDS_Edge> DrawProjectSplit::scrubEdges(std::vector<TopoDS_Edge>& origEdges,
std::vector<TopoDS_Edge> &closedEdges)
{
// Base::Console().Message("DPS::scrubEdges() - TopoDS_Edges in: %d\n", origEdges.size());
// Base::Console().message("DPS::scrubEdges() - TopoDS_Edges in: %d\n", origEdges.size());
std::vector<TopoDS_Edge> openEdges;
// We must have at least 2 edges to perform the General Fuse operation
@@ -428,7 +428,7 @@ std::vector<TopoDS_Edge> DrawProjectSplit::scrubEdges(std::vector<TopoDS_Edge>&
if (origEdges.empty()) {
//how did this happen? if Scale is zero, all the edges will be zero length,
//but Scale property has constraint, so this shouldn't happen!
//Base::Console().Message("DPS::scrubEdges(2) - origEdges is empty\n");
//Base::Console().message("DPS::scrubEdges(2) - origEdges is empty\n");
}
else {
TopoDS_Edge &edge = origEdges.front();
@@ -466,7 +466,7 @@ std::vector<TopoDS_Edge> DrawProjectSplit::scrubEdges(std::vector<TopoDS_Edge>&
Standard_SStream errorStream;
bopBuilder.DumpErrors(errorStream);
const std::string &errorStr = errorStream.str();
Base::Console().Error("DrawProjectSplit::scrubEdges - OCC fuse failed with error(s):\n%s\n", errorStr.c_str());
Base::Console().error("DrawProjectSplit::scrubEdges - OCC fuse failed with error(s):\n%s\n", errorStr.c_str());
return std::vector<TopoDS_Edge>();
}
@@ -474,7 +474,7 @@ std::vector<TopoDS_Edge> DrawProjectSplit::scrubEdges(std::vector<TopoDS_Edge>&
Standard_SStream warnStream;
bopBuilder.DumpWarnings(warnStream);
const std::string &warnStr = warnStream.str();
Base::Console().Warning("DrawProjectSplit::scrubEdges - OCC fuse raised warning(s):\n%s\n", warnStr.c_str());
Base::Console().warning("DrawProjectSplit::scrubEdges - OCC fuse raised warning(s):\n%s\n", warnStr.c_str());
}
const TopoDS_Shape &bopResult = bopBuilder.Shape();
@@ -529,7 +529,7 @@ vertexMap DrawProjectSplit::getUniqueVertexes(std::vector<TopoDS_Edge> inEdges)
std::vector<TopoDS_Edge> DrawProjectSplit::pruneUnconnected(vertexMap verts,
std::vector<TopoDS_Edge> edges)
{
// Base::Console().Message("DPS::pruneUnconnected() - edges in: %d\n", edges.size());
// Base::Console().message("DPS::pruneUnconnected() - edges in: %d\n", edges.size());
//check if edge ends are used at least twice => edge is joined to another edge
std::vector<TopoDS_Edge> newPile;
std::vector<TopoDS_Edge> deadEnds;
@@ -589,7 +589,7 @@ bool DrawProjectSplit::sameEndPoints(const TopoDS_Edge &e1, const TopoDS_Edge &e
//eliminate edges that overlap another edge
std::vector<TopoDS_Edge> DrawProjectSplit::removeOverlapEdges(const std::vector<TopoDS_Edge> &inEdges)
{
// Base::Console().Message("DPS::removeOverlapEdges() - %d edges in\n", inEdges.size());
// Base::Console().message("DPS::removeOverlapEdges() - %d edges in\n", inEdges.size());
std::vector<TopoDS_Edge> outEdges;
std::vector<TopoDS_Edge> overlapEdges;
std::vector<bool> skipThisEdge(inEdges.size(), false);
@@ -634,7 +634,7 @@ std::vector<TopoDS_Edge> DrawProjectSplit::removeOverlapEdges(const std::vector<
outEdges.insert(outEdges.end(), overlapEdges.begin(), overlapEdges.end());
}
// Base::Console().Message("DPS::removeOverlapEdges() - %d edges out\n", outEdges.size());
// Base::Console().message("DPS::removeOverlapEdges() - %d edges out\n", outEdges.size());
return outEdges;
}
@@ -720,10 +720,10 @@ bool DrawProjectSplit::boxesIntersect(const TopoDS_Edge &edge0, const TopoDS_Edg
//this is an aid to debugging and isn't used in normal processing.
void DrawProjectSplit::dumpVertexMap(vertexMap verts)
{
Base::Console().Message("DPS::dumpVertexMap - %d verts\n", verts.size());
Base::Console().message("DPS::dumpVertexMap - %d verts\n", verts.size());
int iVert = 0;
for (auto& item : verts) {
Base::Console().Message("%d: %s - %d\n",iVert,
Base::Console().message("%d: %s - %d\n",iVert,
DrawUtil::formatVector(item.first).c_str(), item.second);
iVert++;
}

View File

@@ -78,7 +78,7 @@ short DrawRichAnno::mustExecute() const
App::DocumentObjectExecReturn *DrawRichAnno::execute()
{
// Base::Console().Message("DRA::execute() - @ (%.3f, %.3f)\n", X.getValue(), Y.getValue());
// Base::Console().message("DRA::execute() - @ (%.3f, %.3f)\n", X.getValue(), Y.getValue());
if (!keepUpdated()) {
return App::DocumentObject::StdReturn;
}
@@ -97,7 +97,7 @@ DrawView* DrawRichAnno::getBaseView() const
//more than 1 DrawPage claims a DrawRichAnno.
DrawPage* DrawRichAnno::findParentPage() const
{
// Base::Console().Message("DRA::findParentPage()\n");
// Base::Console().message("DRA::findParentPage()\n");
if (!AnnoParent.getValue()) {
return DrawView::findParentPage();
}

View File

@@ -102,7 +102,7 @@ void DrawSVGTemplate::onSettingDocument()
//? should this check for creation of a template or a page?
void DrawSVGTemplate::slotCreatedObject(const App::DocumentObject& obj)
{
// Base::Console().Message("DSVGT::slotCreatedObject()\n");
// Base::Console().message("DSVGT::slotCreatedObject()\n");
if (!obj.isDerivedFrom<TechDraw::DrawPage>()) {
// we don't care
return;
@@ -112,7 +112,7 @@ void DrawSVGTemplate::slotCreatedObject(const App::DocumentObject& obj)
void DrawSVGTemplate::slotDeletedObject(const App::DocumentObject& obj)
{
// Base::Console().Message("DSVGT::slotDeletedObject()\n");
// Base::Console().message("DSVGT::slotDeletedObject()\n");
if (!obj.isDerivedFrom<TechDraw::DrawPage>()) {
// we don't care
return;
@@ -206,12 +206,12 @@ bool DrawSVGTemplate::getTemplateDocument(std::string sourceFile, QDomDocument&
}
QFile templateFile(QString::fromStdString(sourceFile));
if (!templateFile.open(QIODevice::ReadOnly)) {
Base::Console().Error("DrawSVGTemplate::processTemplate can't read embedded template %s!\n", PageResult.getValue());
Base::Console().error("DrawSVGTemplate::processTemplate can't read embedded template %s!\n", PageResult.getValue());
return false;
}
if (!templateDocument.setContent(&templateFile)) {
Base::Console().Error("DrawSVGTemplate::processTemplate - failed to parse file: %s\n",
Base::Console().error("DrawSVGTemplate::processTemplate - failed to parse file: %s\n",
PageResult.getValue());
return false;
}

View File

@@ -69,7 +69,7 @@ short DrawTile::mustExecute() const
App::DocumentObjectExecReturn *DrawTile::execute()
{
// Base::Console().Message("DT::execute()\n");
// Base::Console().message("DT::execute()\n");
return DocumentObject::execute();
}

View File

@@ -78,7 +78,7 @@ void DrawTileWeld::onChanged(const App::Property* prop)
void DrawTileWeld::replaceFileIncluded(std::string newSymbolFile)
{
// Base::Console().Message("DTW::replaceFileIncluded(%s)\n", newSymbolFile.c_str());
// Base::Console().message("DTW::replaceFileIncluded(%s)\n", newSymbolFile.c_str());
if (newSymbolFile.empty()) {
return;
}

View File

@@ -78,7 +78,7 @@ using namespace TechDraw;
/*static*/ int DrawUtil::getIndexFromName(const std::string& geomName)
{
// Base::Console().Message("DU::getIndexFromName(%s)\n", geomName.c_str());
// Base::Console().message("DU::getIndexFromName(%s)\n", geomName.c_str());
boost::regex re("\\d+$");// one of more digits at end of string
boost::match_results<std::string::const_iterator> what;
boost::match_flag_type flags = boost::match_default;
@@ -189,7 +189,7 @@ double DrawUtil::simpleMinDist(TopoDS_Shape s1, TopoDS_Shape s2)
{
BRepExtrema_DistShapeShape extss(s1, s2);
if (!extss.IsDone()) {
Base::Console().Message("DU::simpleMinDist - BRepExtrema_DistShapeShape failed");
Base::Console().message("DU::simpleMinDist - BRepExtrema_DistShapeShape failed");
return -1;
}
int count = extss.NbSolution();
@@ -245,7 +245,7 @@ double DrawUtil::angleWithX(TopoDS_Edge e, TopoDS_Vertex v, double tolerance)
param = adapt.LastParameter();
} else {
//TARFU
Base::Console().Message("Error: DU::angleWithX - v is neither first nor last \n");
Base::Console().message("Error: DU::angleWithX - v is neither first nor last \n");
}
gp_Pnt paramPoint;
gp_Vec derivative;
@@ -284,7 +284,7 @@ double DrawUtil::incidenceAngleAtVertex(TopoDS_Edge e, TopoDS_Vertex v, double t
offsetPoint = Base::Vector3d(gOffsetPoint.X(), gOffsetPoint.Y(), gOffsetPoint.Z());
} else {
//TARFU
// Base::Console().Message("DU::incidenceAngle - v is neither first nor last \n");
// Base::Console().message("DU::incidenceAngle - v is neither first nor last \n");
}
incidenceVec = anglePoint - offsetPoint;
incidenceAngle = atan2(incidenceVec.y, incidenceVec.x);
@@ -434,7 +434,7 @@ bool DrawUtil::apparentIntersection(TopoDS_Edge& edge0, TopoDS_Edge& edge1, gp_P
gp_Vec D(gStart1.XYZ());
gp_Vec e(gEnd0.XYZ() - gStart0.XYZ());//direction of line0
gp_Vec f(gEnd1.XYZ() - gStart1.XYZ());//direction of line1
Base::Console().Message(
Base::Console().message(
"DU::apparentInter - e: %s f: %s\n", formatVector(e).c_str(), formatVector(f).c_str());
//check for cases the algorithm doesn't handle well
@@ -450,7 +450,7 @@ bool DrawUtil::apparentIntersection(TopoDS_Edge& edge0, TopoDS_Edge& edge1, gp_P
}
gp_Vec g(D - C);//between a point on each line
Base::Console().Message("DU::apparentInter - C: %s D: %s g: %s\n",
Base::Console().message("DU::apparentInter - C: %s D: %s g: %s\n",
formatVector(C).c_str(),
formatVector(D).c_str(),
formatVector(g).c_str());
@@ -459,7 +459,7 @@ bool DrawUtil::apparentIntersection(TopoDS_Edge& edge0, TopoDS_Edge& edge1, gp_P
double h = fxg.Magnitude();
gp_Vec fxe = f.Crossed(e);
double k = fxe.Magnitude();
Base::Console().Message("DU::apparentInter - h: %.3f k: %.3f\n", h, k);
Base::Console().message("DU::apparentInter - h: %.3f k: %.3f\n", h, k);
if (fpCompare(k, 0.0)) {
//no intersection
return false;
@@ -492,7 +492,7 @@ bool DrawUtil::intersect2Lines3d(Base::Vector3d point0, Base::Vector3d dir0, Bas
dir1n.Normalize();
if (fabs(dir0n.Dot(dir1n)) == 1.0) {
//parallel lines, no intersection
Base::Console().Message("DU::intersect2 - parallel lines, no intersection\n");
Base::Console().message("DU::intersect2 - parallel lines, no intersection\n");
return false;
}
@@ -857,7 +857,7 @@ double DrawUtil::getWidthInDirection(gp_Dir direction, TopoDS_Shape& shape)
if (shapeBox.IsVoid()) {
//this really shouldn't happen here as null shapes should have been caught
//long before this
Base::Console().Error("DU::getWidthInDirection - shapeBox is void\n");
Base::Console().error("DU::getWidthInDirection - shapeBox is void\n");
return 0.0;
}
shapeBox.Get(xMin, yMin, zMin, xMax, yMax, zMax);
@@ -894,7 +894,7 @@ gp_Vec DrawUtil::maskDirection(gp_Vec inVec, gp_Dir directionToMask)
return {inVec.X(), inVec.Y(), 0.0};
}
Base::Console().Message("DU:maskDirection - directionToMask is not cardinal\n");
Base::Console().message("DU:maskDirection - directionToMask is not cardinal\n");
return {};
}
@@ -989,7 +989,7 @@ Base::Vector3d DrawUtil::Intersect2d(Base::Vector3d p1, Base::Vector3d d1, Base:
double det = A1 * B2 - A2 * B1;
if (fpCompare(det, 0.0, Precision::Confusion())) {
Base::Console().Message("Lines are parallel\n");
Base::Console().message("Lines are parallel\n");
return Base::Vector3d(0.0, 0.0, 0.0);
}
@@ -1013,7 +1013,7 @@ Base::Vector2d DrawUtil::Intersect2d(Base::Vector2d p1, Base::Vector2d d1, Base:
double det = A1 * B2 - A2 * B1;
if (fpCompare(det, 0.0, Precision::Confusion())) {
Base::Console().Message("Lines are parallel\n");
Base::Console().message("Lines are parallel\n");
return Base::Vector2d(0.0, 0.0);
}
@@ -1055,7 +1055,7 @@ QPointF DrawUtil::invertY(QPointF v)
//! Note: the centering operation is not considered here
Base::Vector3d DrawUtil::toAppSpace(const DrawViewPart& dvp, const Base::Vector3d &qtPoint)
{
// Base::Console().Message("DGU::toPaperSpace(%s)\n", formatVector(qtPoint).c_str());
// Base::Console().message("DGU::toPaperSpace(%s)\n", formatVector(qtPoint).c_str());
// From Y+ is down to Y+ is up
Base::Vector3d appPoint = invertY(qtPoint);
@@ -1081,7 +1081,7 @@ Base::Vector3d DrawUtil::toAppSpace(const DrawViewPart& dvp, const QPointF& qtP
//obs? was used in CSV prototype of Cosmetics
std::vector<std::string> DrawUtil::split(std::string csvLine)
{
// Base::Console().Message("DU::split - csvLine: %s\n", csvLine.c_str());
// Base::Console().message("DU::split - csvLine: %s\n", csvLine.c_str());
std::vector<std::string> result;
std::stringstream lineStream(csvLine);
std::string cell;
@@ -1095,7 +1095,7 @@ std::vector<std::string> DrawUtil::split(std::string csvLine)
//obs? was used in CSV prototype of Cosmetics
std::vector<std::string> DrawUtil::tokenize(std::string csvLine, std::string delimiter)
{
// Base::Console().Message("DU::tokenize - csvLine: %s delimit: %s\n", csvLine.c_str(), delimiter.c_str());
// Base::Console().message("DU::tokenize - csvLine: %s delimit: %s\n", csvLine.c_str(), delimiter.c_str());
std::string s(csvLine);
size_t pos = 0;
std::vector<std::string> tokens;
@@ -1111,7 +1111,7 @@ std::vector<std::string> DrawUtil::tokenize(std::string csvLine, std::string del
Base::Color DrawUtil::pyTupleToColor(PyObject* pColor)
{
// Base::Console().Message("DU::pyTupleToColor()\n");
// Base::Console().message("DU::pyTupleToColor()\n");
double red = 0.0, green = 0.0, blue = 0.0, alpha = 0.0;
if (!PyTuple_Check(pColor)) {
return Base::Color(red, green, blue, alpha);
@@ -1135,7 +1135,7 @@ Base::Color DrawUtil::pyTupleToColor(PyObject* pColor)
PyObject* DrawUtil::colorToPyTuple(Base::Color color)
{
// Base::Console().Message("DU::pyTupleToColor()\n");
// Base::Console().message("DU::pyTupleToColor()\n");
PyObject* pTuple = PyTuple_New(4);
PyObject* pRed = PyFloat_FromDouble(color.r);
PyObject* pGreen = PyFloat_FromDouble(color.g);
@@ -1197,7 +1197,7 @@ bool DrawUtil::isCrazy(TopoDS_Edge e)
}
}
// Base::Console().Message("DU::isCrazy - returns: %d ratio: %.3f\n", false, ratio);
// Base::Console().message("DU::isCrazy - returns: %d ratio: %.3f\n", false, ratio);
return false;
}
@@ -1831,7 +1831,7 @@ void DrawUtil::findCircularArcRectangleIntersections(const Base::Vector2d& circl
//create empty outSpec file if inSpec
void DrawUtil::copyFile(std::string inSpec, std::string outSpec)
{
// Base::Console().Message("DU::copyFile(%s, %s)\n", inSpec.c_str(), outSpec.c_str());
// Base::Console().message("DU::copyFile(%s, %s)\n", inSpec.c_str(), outSpec.c_str());
if (inSpec.empty()) {
// create an empty file
Base::FileInfo fi(outSpec);
@@ -1844,7 +1844,7 @@ void DrawUtil::copyFile(std::string inSpec, std::string outSpec)
}
bool rc = fi.copyTo(outSpec.c_str());
if (!rc) {
Base::Console().Message(
Base::Console().message(
"DU::copyFile - failed - in: %s out:%s\n", inSpec.c_str(), outSpec.c_str());
}
}
@@ -1883,12 +1883,12 @@ bool DrawUtil::isGuiUp()
// various debugging routines.
void DrawUtil::dumpVertexes(const char* text, const TopoDS_Shape& s)
{
Base::Console().Message("DUMP - %s\n", text);
Base::Console().message("DUMP - %s\n", text);
TopExp_Explorer expl(s, TopAbs_VERTEX);
for (int i = 1; expl.More(); expl.Next(), i++) {
const TopoDS_Vertex& v = TopoDS::Vertex(expl.Current());
gp_Pnt pnt = BRep_Tool::Pnt(v);
Base::Console().Message("v%d: (%.3f, %.3f, %.3f)\n", i, pnt.X(), pnt.Y(), pnt.Z());
Base::Console().message("v%d: (%.3f, %.3f, %.3f)\n", i, pnt.X(), pnt.Y(), pnt.Z());
}
}
@@ -1897,7 +1897,7 @@ void DrawUtil::countFaces(const char* text, const TopoDS_Shape& s)
TopTools_IndexedMapOfShape mapOfFaces;
TopExp::MapShapes(s, TopAbs_FACE, mapOfFaces);
int num = mapOfFaces.Extent();
Base::Console().Message("COUNT - %s has %d Faces\n", text, num);
Base::Console().message("COUNT - %s has %d Faces\n", text, num);
}
//count # of unique Wires in shape.
@@ -1906,7 +1906,7 @@ void DrawUtil::countWires(const char* text, const TopoDS_Shape& s)
TopTools_IndexedMapOfShape mapOfWires;
TopExp::MapShapes(s, TopAbs_WIRE, mapOfWires);
int num = mapOfWires.Extent();
Base::Console().Message("COUNT - %s has %d wires\n", text, num);
Base::Console().message("COUNT - %s has %d wires\n", text, num);
}
void DrawUtil::countEdges(const char* text, const TopoDS_Shape& s)
@@ -1914,12 +1914,12 @@ void DrawUtil::countEdges(const char* text, const TopoDS_Shape& s)
TopTools_IndexedMapOfShape mapOfEdges;
TopExp::MapShapes(s, TopAbs_EDGE, mapOfEdges);
int num = mapOfEdges.Extent();
Base::Console().Message("COUNT - %s has %d edges\n", text, num);
Base::Console().message("COUNT - %s has %d edges\n", text, num);
}
void DrawUtil::dumpEdges(const char* text, const TopoDS_Shape& s)
{
Base::Console().Message("DUMP - %s\n", text);
Base::Console().message("DUMP - %s\n", text);
TopExp_Explorer expl(s, TopAbs_EDGE);
for (int i = 1; expl.More(); expl.Next(), i++) {
const TopoDS_Edge& e = TopoDS::Edge(expl.Current());
@@ -1929,9 +1929,9 @@ void DrawUtil::dumpEdges(const char* text, const TopoDS_Shape& s)
void DrawUtil::dump1Vertex(const char* text, const TopoDS_Vertex& v)
{
// Base::Console().Message("DUMP - dump1Vertex - %s\n",text);
// Base::Console().message("DUMP - dump1Vertex - %s\n",text);
gp_Pnt pnt = BRep_Tool::Pnt(v);
Base::Console().Message("%s: (%.3f, %.3f, %.3f)\n", text, pnt.X(), pnt.Y(), pnt.Z());
Base::Console().message("%s: (%.3f, %.3f, %.3f)\n", text, pnt.X(), pnt.Y(), pnt.Z());
}
void DrawUtil::dumpEdge(const char* label, int i, TopoDS_Edge e)
@@ -1943,9 +1943,9 @@ void DrawUtil::dumpEdge(const char* label, int i, TopoDS_Edge e)
const gp_Pnt& vStart = propStart.Value();
BRepLProp_CLProps propEnd(adapt, end, 0, Precision::Confusion());
const gp_Pnt& vEnd = propEnd.Value();
//Base::Console().Message("%s edge:%d start:(%.3f, %.3f, %.3f)/%0.3f end:(%.2f, %.3f, %.3f)/%.3f\n", label, i,
//Base::Console().message("%s edge:%d start:(%.3f, %.3f, %.3f)/%0.3f end:(%.2f, %.3f, %.3f)/%.3f\n", label, i,
// vStart.X(), vStart.Y(), vStart.Z(), start, vEnd.X(), vEnd.Y(), vEnd.Z(), end);
Base::Console().Message(
Base::Console().message(
"%s edge:%d start:(%.3f, %.3f, %.3f) end:(%.2f, %.3f, %.3f) Orient: %d\n",
label,
i,
@@ -1957,7 +1957,7 @@ void DrawUtil::dumpEdge(const char* label, int i, TopoDS_Edge e)
vEnd.Z(),
static_cast<int>(e.Orientation()));
double edgeLength = GCPnts_AbscissaPoint::Length(adapt, Precision::Confusion());
Base::Console().Message(">>>>>>> length: %.3f distance: %.3f ratio: %.3f type: %d\n",
Base::Console().message(">>>>>>> length: %.3f distance: %.3f ratio: %.3f type: %d\n",
edgeLength,
vStart.Distance(vEnd),
edgeLength / vStart.Distance(vEnd),
@@ -1991,7 +1991,7 @@ void DrawUtil::dumpCS(const char* text, const gp_Ax2& CS)
gp_Dir baseX = CS.XDirection();
gp_Dir baseY = CS.YDirection();
gp_Pnt baseOrg = CS.Location();
Base::Console().Message("DU::dumpCS - %s Loc: %s Axis: %s X: %s Y: %s\n",
Base::Console().message("DU::dumpCS - %s Loc: %s Axis: %s X: %s Y: %s\n",
text,
DrawUtil::formatVector(baseOrg).c_str(),
DrawUtil::formatVector(baseAxis).c_str(),
@@ -2005,7 +2005,7 @@ void DrawUtil::dumpCS3(const char* text, const gp_Ax3& CS)
gp_Dir baseX = CS.XDirection();
gp_Dir baseY = CS.YDirection();
gp_Pnt baseOrg = CS.Location();
Base::Console().Message("DU::dumpCS3 - %s Loc: %s Axis: %s X: %s Y: %s\n",
Base::Console().message("DU::dumpCS3 - %s Loc: %s Axis: %s X: %s Y: %s\n",
text,
DrawUtil::formatVector(baseOrg).c_str(),
DrawUtil::formatVector(baseAxis).c_str(),

View File

@@ -115,7 +115,7 @@ DrawView::~DrawView()
App::DocumentObjectExecReturn *DrawView::execute()
{
// Base::Console().Message("DV::execute() - %s touched: %d\n", getNameInDocument(), isTouched());
// Base::Console().message("DV::execute() - %s touched: %d\n", getNameInDocument(), isTouched());
if (!findParentPage()) {
return App::DocumentObject::execute();
}
@@ -470,7 +470,7 @@ double DrawView::autoScale() const
//compare 1:1 rect of view to pagesize(pw, h)
double DrawView::autoScale(double pw, double ph) const
{
// Base::Console().Message("DV::autoScale(Page: %.3f, %.3f) - %s\n", pw, ph, getNameInDocument());
// Base::Console().message("DV::autoScale(Page: %.3f, %.3f) - %s\n", pw, ph, getNameInDocument());
QRectF viewBox = getRect(); //getRect is scaled (ie current actual size)
if (!viewBox.isValid()) {
return 1.0;
@@ -487,7 +487,7 @@ double DrawView::autoScale(double pw, double ph) const
bool DrawView::checkFit() const
{
// Base::Console().Message("DV::checkFit() - %s\n", getNameInDocument());
// Base::Console().message("DV::checkFit() - %s\n", getNameInDocument());
auto page = findParentPage();
return checkFit(page);
}
@@ -495,7 +495,7 @@ bool DrawView::checkFit() const
//!check if View is too big for page
bool DrawView::checkFit(TechDraw::DrawPage* p) const
{
// Base::Console().Message("DV::checkFit(page) - %s\n", getNameInDocument());
// Base::Console().message("DV::checkFit(page) - %s\n", getNameInDocument());
bool result = true;
double width = 0.0;
@@ -516,7 +516,7 @@ bool DrawView::checkFit(TechDraw::DrawPage* p) const
void DrawView::setPosition(double x, double y, bool force)
{
// Base::Console().Message("DV::setPosition(%.3f, %.3f) - \n", x,y, getNameInDocument());
// Base::Console().message("DV::setPosition(%.3f, %.3f) - \n", x,y, getNameInDocument());
if ( (!isLocked()) ||
(force) ) {
double currX = X.getValue();
@@ -633,7 +633,7 @@ void DrawView::handleChangedPropertyType(Base::XMLReader &reader, const char * T
bool DrawView::keepUpdated()
{
// Base::Console().Message("DV::keepUpdated() - %s\n", getNameInDocument());
// Base::Console().message("DV::keepUpdated() - %s\n", getNameInDocument());
if (overrideKeepUpdated()) {
return true;
}
@@ -688,7 +688,7 @@ double DrawView::prefScale()
void DrawView::requestPaint()
{
// Base::Console().Message("DV::requestPaint() - %s\n", getNameInDocument());
// Base::Console().message("DV::requestPaint() - %s\n", getNameInDocument());
signalGuiPaint(this);
}
@@ -703,11 +703,11 @@ void DrawView::showProgressMessage(std::string featureName, std::string text)
//! the unique name within the document (ex ActiveView001), and use it to update the Label property.
void DrawView::translateLabel(std::string context, std::string baseName, std::string uniqueName)
{
// Base::Console().Message("DV::translateLabel - context: %s baseName: %s uniqueName: %s\n",
// Base::Console().message("DV::translateLabel - context: %s baseName: %s uniqueName: %s\n",
// context.c_str(), baseName.c_str(), uniqueName.c_str());
Label.setValue(DU::translateArbitrary(context, baseName, uniqueName));
// Base::Console().Message("DV::translateLabel - new label: %s\n", Label.getValue());
// Base::Console().message("DV::translateLabel - new label: %s\n", Label.getValue());
}
PyObject *DrawView::getPyObject(void)

View File

@@ -101,7 +101,7 @@ App::DocumentObjectExecReturn *DrawViewArch::execute()
//if (sourceObj is not ArchSection) return
App::Property* proxy = sourceObj->getPropertyByName("Proxy");
if (!proxy) {
Base::Console().Error("DVA::execute - %s is not an ArchSection\n", sourceObj->Label.getValue());
Base::Console().error("DVA::execute - %s is not an ArchSection\n", sourceObj->Label.getValue());
//this is definitely not an ArchSection
return DrawView::execute();
}

View File

@@ -104,7 +104,7 @@ DrawViewDetail::~DrawViewDetail()
{
//don't delete this object while it still has dependent tasks running
if (m_detailFuture.isRunning()) {
Base::Console().Message("%s is waiting for detail cut to finish\n", Label.getValue());
Base::Console().message("%s is waiting for detail cut to finish\n", Label.getValue());
m_detailFuture.waitForFinished();
}
}
@@ -268,13 +268,13 @@ void DrawViewDetail::makeDetailShape(const TopoDS_Shape& shape3d, DrawViewPart*
BRepBuilderAPI_MakeFace mkFace(gpln, -radius, radius, -radius, radius);
extrusionFace = mkFace.Face();
if (extrusionFace.IsNull()) {
Base::Console().Warning("DVD::makeDetailShape - %s - failed to create tool base face\n",
Base::Console().warning("DVD::makeDetailShape - %s - failed to create tool base face\n",
getNameInDocument());
return;
}
tool = BRepPrimAPI_MakePrism(extrusionFace, extrudeDir, false, true).Shape();
if (tool.IsNull()) {
Base::Console().Warning("DVD::makeDetailShape - %s - failed to create tool (prism)\n",
Base::Console().warning("DVD::makeDetailShape - %s - failed to create tool (prism)\n",
getNameInDocument());
return;
}
@@ -285,7 +285,7 @@ void DrawViewDetail::makeDetailShape(const TopoDS_Shape& shape3d, DrawViewPart*
BRepPrimAPI_MakeCylinder mkTool(cs, radius, extrudeLength);
tool = mkTool.Shape();
if (tool.IsNull()) {
Base::Console().Warning("DVD::detailExec - %s - failed to create tool (cylinder)\n",
Base::Console().warning("DVD::detailExec - %s - failed to create tool (cylinder)\n",
getNameInDocument());
return;
}

View File

@@ -64,7 +64,7 @@ DrawViewDimExtent::DrawViewDimExtent(void)
App::DocumentObjectExecReturn *DrawViewDimExtent::execute(void)
{
// Base::Console().Message("DVDE::execute() - %s\n", getNameInDocument());
// Base::Console().message("DVDE::execute() - %s\n", getNameInDocument());
if (!keepUpdated()) {
return App::DocumentObject::StdReturn;
}
@@ -94,7 +94,7 @@ App::DocumentObjectExecReturn *DrawViewDimExtent::execute(void)
//! validate 2D references - only checks if the target exists
bool DrawViewDimExtent::checkReferences2D() const
{
// Base::Console().Message("DVDE::checkReferences2d() - %s\n", getNameInDocument());
// Base::Console().message("DVDE::checkReferences2d() - %s\n", getNameInDocument());
const std::vector<App::DocumentObject*> &objects = References2D.getValues();
if (objects.empty()) {
return false;
@@ -111,7 +111,7 @@ bool DrawViewDimExtent::checkReferences2D() const
}
pointPair DrawViewDimExtent::getPointsExtent(ReferenceVector references)
{
// Base::Console().Message("DVD::getPointsExtent() - %s\n", getNameInDocument());
// Base::Console().message("DVD::getPointsExtent() - %s\n", getNameInDocument());
App::DocumentObject* refObject = references.front().getObject();
int direction = DirExtent.getValue();
if (refObject->isDerivedFrom<TechDraw::DrawViewPart>()) {

View File

@@ -481,7 +481,7 @@ App::DocumentObjectExecReturn* DrawViewDimension::execute()
}
if (!m_referencesCorrect) {
// this test needs Phase 2 of auto correct to be useful
Base::Console().Log("The references for %s have changed and autocorrect could not match the geometry\n", Label.getValue());
Base::Console().log("The references for %s have changed and autocorrect could not match the geometry\n", Label.getValue());
}
resetLinear();
@@ -549,26 +549,26 @@ bool DrawViewDimension::okToProceed()
// TODO: translate these messages and figure out how to present them to
// the user since we can't pop up a message box here.
// this case is probably temporary during restore
// Base::Console().Message("DVD::okToProceed - no view for dimension\n");
// Base::Console().message("DVD::okToProceed - no view for dimension\n");
return false;
}
if (!(has2DReferences() || has3DReferences())) {
// no references, can't do anything
// Base::Console().Message("DVD::okToProceed - Dimension object has no valid references\n");
// Base::Console().message("DVD::okToProceed - Dimension object has no valid references\n");
return false;
}
if (!getViewPart()->hasGeometry()) {
// can't do anything until Source has geometry
// Base::Console().Message("DVD::okToProceed - Dimension object has no geometry\n");
// Base::Console().message("DVD::okToProceed - Dimension object has no geometry\n");
return false;
}
// is this check still relevant or is it replaced by the autocorrect and
// validate methods?
if (References3D.getValues().empty() && !checkReferences2D()) {
// Base::Console().Warning("%s has invalid 2D References\n", getNameInDocument());
// Base::Console().warning("%s has invalid 2D References\n", getNameInDocument());
return false;
}
return validateReferenceForm();
@@ -667,7 +667,7 @@ double DrawViewDimension::getDimValue()
if (MeasureType.isValue("True")) {
// True Values
if (!measurement->has3DReferences()) {
Base::Console().Warning("%s - True dimension has no 3D References\n",
Base::Console().warning("%s - True dimension has no 3D References\n",
getNameInDocument());
return result;
}
@@ -676,7 +676,7 @@ double DrawViewDimension::getDimValue()
else {
// Projected Values
if (!checkReferences2D()) {
Base::Console().Warning("DVD::getDimValue - %s - 2D references are corrupt (5)\n",
Base::Console().warning("DVD::getDimValue - %s - 2D references are corrupt (5)\n",
getNameInDocument());
return result;
}
@@ -1094,7 +1094,7 @@ arcPoints DrawViewDimension::arcPointsFromBaseGeom(TechDraw::BaseGeomPtr base)
else {
// fubar - can't have non-circular spline as target of Diameter dimension, but this is
// already checked, so something has gone badly wrong.
Base::Console().Error("%s: can not make a Circle from this B-spline edge\n",
Base::Console().error("%s: can not make a Circle from this B-spline edge\n",
getNameInDocument());
throw Base::RuntimeError("Bad B-spline geometry for arc dimension");
}
@@ -1535,7 +1535,7 @@ RefType DrawViewDimension::getRefType() const
if (subNames.empty()) {
// something went wrong, there were no subNames.
Base::Console().Message("DVD::getRefType - %s - there are no subNames.\n",
Base::Console().message("DVD::getRefType - %s - there are no subNames.\n",
getNameInDocument());
return RefType::invalidRef;
}
@@ -1927,14 +1927,14 @@ void DrawViewDimension::clear3DMeasurements()
void DrawViewDimension::dumpRefs2D(const char* text) const
{
Base::Console().Message("DUMP - %s\n", text);
Base::Console().message("DUMP - %s\n", text);
const std::vector<App::DocumentObject*>& objects = References2D.getValues();
const std::vector<std::string>& subElements = References2D.getSubValues();
auto objIt = objects.begin();
auto subIt = subElements.begin();
int i = 0;
for (; objIt != objects.end(); objIt++, subIt++, i++) {
Base::Console().Message("DUMP - ref: %d object: %s subElement: %s\n",
Base::Console().message("DUMP - ref: %d object: %s subElement: %s\n",
i,
(*objIt)->getNameInDocument(),
(*subIt).c_str());
@@ -2142,7 +2142,7 @@ Base::BoundBox3d DrawViewDimension::getSavedBox()
if (bbxCorners.empty()) {
// need to advise caller if BoxCorners not filled in yet. zero length
// diagonal?
Base::Console().Message("DVD::getSavedBox - no corners!\n");
Base::Console().message("DVD::getSavedBox - no corners!\n");
return Base::BoundBox3d();
}
return Base::BoundBox3d(bbxCorners.front().x,

View File

@@ -79,7 +79,7 @@ short DrawViewDraft::mustExecute() const
App::DocumentObjectExecReturn *DrawViewDraft::execute()
{
// Base::Console().Message("DVDr::execute() \n");
// Base::Console().message("DVDr::execute() \n");
if (!keepUpdated()) {
return App::DocumentObject::StdReturn;
}

View File

@@ -88,7 +88,7 @@ QRectF DrawViewImage::getRect() const { return {0.0, 0.0, Width.getValue(), Heig
void DrawViewImage::replaceImageIncluded(std::string newImageFile)
{
// Base::Console().Message("DVI::replaceImageIncluded(%s)\n", newImageFile.c_str());
// Base::Console().message("DVI::replaceImageIncluded(%s)\n", newImageFile.c_str());
if (newImageFile.empty()) {
return;
}
@@ -104,7 +104,7 @@ void DrawViewImage::replaceImageIncluded(std::string newImageFile)
void DrawViewImage::setupObject()
{
// Base::Console().Message("DVI::setupObject()\n");
// Base::Console().message("DVI::setupObject()\n");
replaceImageIncluded(ImageFile.getValue());
}

View File

@@ -76,7 +76,7 @@ short DrawViewMulti::mustExecute() const
void DrawViewMulti::onChanged(const App::Property* prop)
{
if (!isRestoring()) {
//Base::Console().Message("TRACE - DVM::onChanged(%s) - %s\n", prop->getName(), Label.getValue());
//Base::Console().message("TRACE - DVM::onChanged(%s) - %s\n", prop->getName(), Label.getValue());
if (prop == &Sources) {
const std::vector<App::DocumentObject*>& links = Sources.getValues();
if (!links.empty()) {
@@ -96,7 +96,7 @@ App::DocumentObjectExecReturn *DrawViewMulti::execute()
const std::vector<App::DocumentObject*>& links = Sources.getValues();
if (links.empty()) {
Base::Console().Log("INFO - DVM::execute - No Sources - creation?\n");
Base::Console().log("INFO - DVM::execute - No Sources - creation?\n");
return DrawView::execute();
}

View File

@@ -158,11 +158,11 @@ DrawViewPart::~DrawViewPart()
{
//don't delete this object while it still has dependent threads running
if (m_hlrFuture.isRunning()) {
Base::Console().Message("%s is waiting for HLR to finish\n", Label.getValue());
Base::Console().message("%s is waiting for HLR to finish\n", Label.getValue());
m_hlrFuture.waitForFinished();
}
if (m_faceFuture.isRunning()) {
Base::Console().Message("%s is waiting for face finding to finish\n", Label.getValue());
Base::Console().message("%s is waiting for face finding to finish\n", Label.getValue());
m_faceFuture.waitForFinished();
}
removeAllReferencesFromGeom();
@@ -172,7 +172,7 @@ DrawViewPart::~DrawViewPart()
//! XSource property lists
TopoDS_Shape DrawViewPart::getSourceShape(bool fuse, bool allow2d) const
{
// Base::Console().Message("DVP::getSourceShape()\n");
// Base::Console().message("DVP::getSourceShape()\n");
const std::vector<App::DocumentObject*>& links = getAllSources();
if (links.empty()) {
return {};
@@ -194,7 +194,7 @@ TopoDS_Shape DrawViewPart::getShapeForDetail() const
//! combine the regular links and xlinks into a single list
std::vector<App::DocumentObject*> DrawViewPart::getAllSources() const
{
// Base::Console().Message("DVP::getAllSources()\n");
// Base::Console().message("DVP::getAllSources()\n");
std::vector<App::DocumentObject*> links = Source.getValues();
std::vector<App::DocumentObject*> xLinks = XSource.getValues();
@@ -209,7 +209,7 @@ std::vector<App::DocumentObject*> DrawViewPart::getAllSources() const
//! add them directly to the geometry without going through HLR
void DrawViewPart::addPoints()
{
// Base::Console().Message("DVP::addPoints()\n");
// Base::Console().message("DVP::addPoints()\n");
// get all the 2d shapes in the sources, then pick through them for vertices.
std::vector<TopoDS_Shape> shapesAll = ShapeExtractor::getShapes2d(getAllSources());
for (auto& shape : shapesAll) {
@@ -227,7 +227,7 @@ void DrawViewPart::addPoints()
App::DocumentObjectExecReturn* DrawViewPart::execute()
{
// Base::Console().Message("DVP::execute() - %s\n", getNameInDocument());
// Base::Console().message("DVP::execute() - %s\n", getNameInDocument());
if (!keepUpdated()) {
return DrawView::execute();
}
@@ -238,7 +238,7 @@ App::DocumentObjectExecReturn* DrawViewPart::execute()
TopoDS_Shape shape = getSourceShape();
if (shape.IsNull()) {
Base::Console().Message("DVP::execute - %s - Source shape is Null.\n", getNameInDocument());
Base::Console().message("DVP::execute - %s - Source shape is Null.\n", getNameInDocument());
return DrawView::execute();
}
@@ -278,12 +278,12 @@ void DrawViewPart::onChanged(const App::Property* prop)
// Otherwise bad things will happen because there'll be a normalization for direction calculations later.
Base::Vector3d dir = Direction.getValue();
if (DrawUtil::fpCompare(dir.Length(), 0.0)) {
Base::Console().Warning("%s Direction is null. Using (0, -1, 0).\n", Label.getValue());
Base::Console().warning("%s Direction is null. Using (0, -1, 0).\n", Label.getValue());
Direction.setValue(Base::Vector3d(0.0, -1.0, 0.0));
}
Base::Vector3d xdir = XDirection.getValue();
if (DrawUtil::fpCompare(xdir.Length(), 0.0)) {
Base::Console().Warning("%s XDirection is null. Using (1, 0, 0).\n", Label.getValue());
Base::Console().warning("%s XDirection is null. Using (1, 0, 0).\n", Label.getValue());
XDirection.setValue(Base::Vector3d(1.0, 0.0, 0.0));
}
@@ -399,7 +399,7 @@ void DrawViewPart::onHlrFinished()
}
if (!hasGeometry()) {
Base::Console().Error("TechDraw did not retrieve any geometry for %s/%s\n",
Base::Console().error("TechDraw did not retrieve any geometry for %s/%s\n",
getNameInDocument(), Label.getValue());
}
@@ -437,7 +437,7 @@ void DrawViewPart::onHlrFinished()
}
catch (Standard_Failure& e) {
waitingForFaces(false);
Base::Console().Error("DVP::partExec - %s - extractFaces failed - %s **\n",
Base::Console().error("DVP::partExec - %s - extractFaces failed - %s **\n",
getNameInDocument(), e.GetMessageString());
throw Base::RuntimeError("DVP::onHlrFinished - error extracting faces");
}
@@ -511,7 +511,7 @@ void DrawViewPart::extractFaces()
geometryObject->getVisibleFaceEdges(SmoothVisible.getValue(), SeamVisible.getValue());
if (goEdges.empty()) {
// Base::Console().Message("DVP::extractFaces - %s - no face edges available!\n", getNameInDocument()); //debug
// Base::Console().message("DVP::extractFaces - %s - no face edges available!\n", getNameInDocument()); //debug
return;
}
@@ -530,7 +530,7 @@ void DrawViewPart::findFacesNew(const std::vector<BaseGeomPtr> &goEdges)
if (cleanEdges.empty() && closedEdges.empty()) {
//how does this happen? something wrong somewhere
// Base::Console().Message("DVP::findFacesNew - no clean or closed wires\n"); //debug
// Base::Console().message("DVP::findFacesNew - no clean or closed wires\n"); //debug
return;
}
@@ -561,7 +561,7 @@ void DrawViewPart::findFacesNew(const std::vector<BaseGeomPtr> &goEdges)
}
if (sortedWires.empty()) {
Base::Console().Warning(
Base::Console().warning(
"DVP::findFacesNew - %s - Can't make faces from projected edges\n",
getNameInDocument());
}
@@ -684,7 +684,7 @@ void DrawViewPart::findFacesOld(const std::vector<BaseGeomPtr> &goEdges)
EdgeWalker eWalker;
sortedWires = eWalker.execute(newEdges);
if (sortedWires.empty()) {
Base::Console().Warning(
Base::Console().warning(
"DVP::findFacesOld - %s -Can't make faces from projected edges\n",
getNameInDocument());
return;
@@ -707,7 +707,7 @@ void DrawViewPart::findFacesOld(const std::vector<BaseGeomPtr> &goEdges)
//continue processing after extractFaces thread completes
void DrawViewPart::onFacesFinished()
{
// Base::Console().Message("DVP::onFacesFinished() - %s\n", getNameInDocument());
// Base::Console().message("DVP::onFacesFinished() - %s\n", getNameInDocument());
waitingForFaces(false);
QObject::disconnect(connectFaceWatcher);
showProgressMessage(getNameInDocument(), "has finished extracting faces");
@@ -794,7 +794,7 @@ const std::vector<TechDraw::VertexPtr> DrawViewPart::getVertexGeometry() const
//! TechDraw vertex names run from 0 to n-1
TechDraw::VertexPtr DrawViewPart::getVertex(std::string vertexName) const
{
// Base::Console().Message("DVP::getVertex(%s)\n", vertexName.c_str());
// Base::Console().message("DVP::getVertex(%s)\n", vertexName.c_str());
auto vertexIndex = DrawUtil::getIndexFromName(vertexName);
auto vertex = getProjVertexByIndex(vertexIndex);
return vertex;
@@ -949,7 +949,7 @@ double DrawViewPart::getBoxY() const
QRectF DrawViewPart::getRect() const
{
// Base::Console().Message("DVP::getRect() - %s\n", getNameInDocument());
// Base::Console().message("DVP::getRect() - %s\n", getNameInDocument());
double x = getBoxX();
double y = getBoxY();
return QRectF(0.0, 0.0, x, y);
@@ -987,7 +987,7 @@ TopoDS_Shape DrawViewPart::getEdgeCompound() const
// used in calculating the length of a section line
double DrawViewPart::getSizeAlongVector(Base::Vector3d alignmentVector)
{
// Base::Console().Message("DVP::GetSizeAlongVector(%s)\n", DrawUtil::formatVector(alignmentVector).c_str());
// Base::Console().message("DVP::GetSizeAlongVector(%s)\n", DrawUtil::formatVector(alignmentVector).c_str());
double alignmentAngle = atan2(alignmentVector.y, alignmentVector.x) * -1.0;
gp_Ax2 OXYZ;//shape has already been projected and we will rotate around Z
if (getEdgeCompound().IsNull()) {
@@ -1006,7 +1006,7 @@ double DrawViewPart::getSizeAlongVector(Base::Vector3d alignmentVector)
//used to project a pt (ex SectionOrigin) onto paper plane
Base::Vector3d DrawViewPart::projectPoint(const Base::Vector3d& pt, bool invert) const
{
// Base::Console().Message("DVP::projectPoint(%s, %d\n",
// Base::Console().message("DVP::projectPoint(%s, %d\n",
// DrawUtil::formatVector(pt).c_str(), invert);
Base::Vector3d stdOrg(0.0, 0.0, 0.0);
gp_Ax2 viewAxis = getProjectionCS(stdOrg);
@@ -1064,7 +1064,7 @@ bool DrawViewPart::hasGeometry() const
//in the derived view.
gp_Ax2 DrawViewPart::localVectorToCS(const Base::Vector3d localUnit) const
{
// Base::Console().Message("DVP::localVectorToCS(%s)\n", DU::formatVector((localUnit)).c_str());
// Base::Console().message("DVP::localVectorToCS(%s)\n", DU::formatVector((localUnit)).c_str());
double angle = atan2(localUnit.y, localUnit.x);//radians
gp_Ax1 rotateAxisDir(gp_Pnt(0.0, 0.0, 0.0), getProjectionCS().Direction());
gp_Vec gOldX = getProjectionCS().XDirection();
@@ -1084,14 +1084,14 @@ gp_Ax2 DrawViewPart::localVectorToCS(const Base::Vector3d localUnit) const
Base::Vector3d DrawViewPart::localVectorToDirection(const Base::Vector3d localUnit) const
{
// Base::Console().Message("DVP::localVectorToDirection() - localUnit: %s\n", DrawUtil::formatVector(localUnit).c_str());
// Base::Console().message("DVP::localVectorToDirection() - localUnit: %s\n", DrawUtil::formatVector(localUnit).c_str());
gp_Ax2 cs = localVectorToCS(localUnit);
return Base::convertTo<Base::Vector3d>(cs.Direction());
}
gp_Ax2 DrawViewPart::getProjectionCS(const Base::Vector3d pt) const
{
// Base::Console().Message("DVP::getProjectionCS() - %s - %s\n", getNameInDocument(), Label.getValue());
// Base::Console().message("DVP::getProjectionCS() - %s - %s\n", getNameInDocument(), Label.getValue());
Base::Vector3d direction = Direction.getValue();
gp_Dir gDir(direction.x, direction.y, direction.z);
Base::Vector3d xDir = getXDirection();
@@ -1102,14 +1102,14 @@ gp_Ax2 DrawViewPart::getProjectionCS(const Base::Vector3d pt) const
viewAxis = gp_Ax2(gOrg, gDir, gXDir);
}
catch (...) {
Base::Console().Warning("DVP - %s - failed to create projection CS\n", getNameInDocument());
Base::Console().warning("DVP - %s - failed to create projection CS\n", getNameInDocument());
}
return viewAxis;
}
gp_Ax2 DrawViewPart::getRotatedCS(const Base::Vector3d basePoint) const
{
// Base::Console().Message("DVP::getRotatedCS() - %s - %s\n", getNameInDocument(), Label.getValue());
// Base::Console().message("DVP::getRotatedCS() - %s - %s\n", getNameInDocument(), Label.getValue());
gp_Ax2 unrotated = getProjectionCS(basePoint);
gp_Ax1 rotationAxis(Base::convertTo<gp_Pnt>(basePoint), unrotated.Direction());
double angleRad = Base::toRadians(Rotation.getValue());
@@ -1122,7 +1122,7 @@ gp_Ax2 DrawViewPart::getViewAxis(const Base::Vector3d& pt, const Base::Vector3d&
{
(void)direction;
(void)flip;
Base::Console().Message("DVP::getViewAxis - deprecated. Use getProjectionCS.\n");
Base::Console().message("DVP::getViewAxis - deprecated. Use getProjectionCS.\n");
return getProjectionCS(pt);
}
@@ -1198,7 +1198,7 @@ bool DrawViewPart::newFaceFinder()
//! hatches, geomhatches, dimensions, ...
void DrawViewPart::unsetupObject()
{
// Base::Console().Message("DVP::unsetupObject()\n");
// Base::Console().message("DVP::unsetupObject()\n");
nowUnsetting = true;
App::Document* doc = getDocument();
std::string docName = doc->getName();
@@ -1256,7 +1256,7 @@ void DrawViewPart::unsetupObject()
bool DrawViewPart::checkXDirection() const
{
// Base::Console().Message("DVP::checkXDirection()\n");
// Base::Console().message("DVP::checkXDirection()\n");
Base::Vector3d xDir = XDirection.getValue();
if (DrawUtil::fpCompare(xDir.Length(), 0.0)) {
return false;
@@ -1266,7 +1266,7 @@ bool DrawViewPart::checkXDirection() const
Base::Vector3d DrawViewPart::getXDirection() const
{
// Base::Console().Message("DVP::getXDirection() - %s\n", Label.getValue());
// Base::Console().message("DVP::getXDirection() - %s\n", Label.getValue());
Base::Vector3d result(1.0, 0.0, 0.0);//default X
App::Property* prop = getPropertyByName("XDirection");
if (prop) {//have an XDirection property
@@ -1329,7 +1329,7 @@ void DrawViewPart::spin(double angle)
std::pair<Base::Vector3d, Base::Vector3d> DrawViewPart::getDirsFromFront(ProjDirection viewType)
{
// Base::Console().Message("DVP::getDirsFromFront(%s)\n", viewType.c_str());
// Base::Console().message("DVP::getDirsFromFront(%s)\n", viewType.c_str());
std::pair<Base::Vector3d, Base::Vector3d> result;
Base::Vector3d projDir, rotVec;
@@ -1461,7 +1461,7 @@ void DrawViewPart::removeReferenceVertex(std::string tag)
//! remove reference vertexes from the view geometry
void DrawViewPart::removeAllReferencesFromGeom()
{
// Base::Console().Message("DVP::removeAllReferencesFromGeom()\n");
// Base::Console().message("DVP::removeAllReferencesFromGeom()\n");
if (!m_referenceVerts.empty()) {
std::vector<TechDraw::VertexPtr> gVerts = getVertexGeometry();
std::vector<TechDraw::VertexPtr> newVerts;
@@ -1476,7 +1476,7 @@ void DrawViewPart::removeAllReferencesFromGeom()
void DrawViewPart::resetReferenceVerts()
{
// Base::Console().Message("DVP::resetReferenceVerts() %s\n", getNameInDocument());
// Base::Console().message("DVP::resetReferenceVerts() %s\n", getNameInDocument());
removeAllReferencesFromGeom();
addReferencesToGeom();
}
@@ -1544,11 +1544,11 @@ bool DrawViewPart::isCenterLine(const std::string& element)
void DrawViewPart::dumpVerts(std::string text)
{
if (!geometryObject) {
Base::Console().Message("no verts to dump yet\n");
Base::Console().message("no verts to dump yet\n");
return;
}
std::vector<TechDraw::VertexPtr> gVerts = getVertexGeometry();
Base::Console().Message("%s - dumping %d vertGeoms\n", text.c_str(), gVerts.size());
Base::Console().message("%s - dumping %d vertGeoms\n", text.c_str(), gVerts.size());
for (auto& gv : gVerts) {
gv->dump();
}
@@ -1557,7 +1557,7 @@ void DrawViewPart::dumpVerts(std::string text)
void DrawViewPart::dumpCosVerts(std::string text)
{
std::vector<TechDraw::CosmeticVertex*> cVerts = CosmeticVertexes.getValues();
Base::Console().Message("%s - dumping %d CosmeticVertexes\n", text.c_str(), cVerts.size());
Base::Console().message("%s - dumping %d CosmeticVertexes\n", text.c_str(), cVerts.size());
for (auto& cv : cVerts) {
cv->dump("a CV");
}
@@ -1566,7 +1566,7 @@ void DrawViewPart::dumpCosVerts(std::string text)
void DrawViewPart::dumpCosEdges(std::string text)
{
std::vector<TechDraw::CosmeticEdge*> cEdges = CosmeticEdges.getValues();
Base::Console().Message("%s - dumping %d CosmeticEdge\n", text.c_str(), cEdges.size());
Base::Console().message("%s - dumping %d CosmeticEdge\n", text.c_str(), cEdges.size());
for (auto& ce : cEdges) {
ce->dump("a CE");
}

View File

@@ -620,7 +620,7 @@ PyObject* DrawViewPartPy::getCosmeticEdge(PyObject *args)
PyObject* DrawViewPartPy::getCosmeticEdgeBySelection(PyObject *args)
{
// Base::Console().Message("DVPPI::getCosmeticEdgeBySelection()\n");
// Base::Console().message("DVPPI::getCosmeticEdgeBySelection()\n");
char* name;
if (!PyArg_ParseTuple(args, "s", &name)) {
return nullptr;
@@ -640,7 +640,7 @@ PyObject* DrawViewPartPy::getCosmeticEdgeBySelection(PyObject *args)
PyObject* DrawViewPartPy::removeCosmeticEdge(PyObject *args)
{
// Base::Console().Message("DVPPI::removeCosmeticEdge()\n");
// Base::Console().message("DVPPI::removeCosmeticEdge()\n");
char* tag;
if (!PyArg_ParseTuple(args, "s", &tag)) {
return nullptr;
@@ -656,7 +656,7 @@ PyObject* DrawViewPartPy::removeCosmeticEdge(PyObject *args)
PyObject* DrawViewPartPy::makeCenterLine(PyObject *args)
{
// Base::Console().Message("DVPPI::makeCenterLine()\n");
// Base::Console().message("DVPPI::makeCenterLine()\n");
PyObject* pSubs;
CenterLine::Mode mode = CenterLine::Mode::VERTICAL;
std::vector<std::string> subs;
@@ -719,7 +719,7 @@ PyObject* DrawViewPartPy::getCenterLine(PyObject *args)
PyObject* DrawViewPartPy::getCenterLineBySelection(PyObject *args)
{
// Base::Console().Message("DVPPI::getCenterLineBySelection()\n");
// Base::Console().message("DVPPI::getCenterLineBySelection()\n");
char* tag;
if (!PyArg_ParseTuple(args, "s", &tag)) {
return nullptr;
@@ -738,7 +738,7 @@ PyObject* DrawViewPartPy::getCenterLineBySelection(PyObject *args)
PyObject* DrawViewPartPy::removeCenterLine(PyObject *args)
{
// Base::Console().Message("DVPPI::removeCenterLine()\n");
// Base::Console().message("DVPPI::removeCenterLine()\n");
char* tag;
if (!PyArg_ParseTuple(args, "s", &tag)) {
return nullptr;
@@ -754,7 +754,7 @@ PyObject* DrawViewPartPy::removeCenterLine(PyObject *args)
PyObject* DrawViewPartPy::formatGeometricEdge(PyObject *args)
{
// Base::Console().Message("DVPPI::formatGeometricEdge()\n");
// Base::Console().message("DVPPI::formatGeometricEdge()\n");
int idx = -1;
int style = Qt::SolidLine;
Base::Color color = LineFormat::getDefEdgeColor();

View File

@@ -389,7 +389,7 @@ TopoDS_Shape DrawViewSection::getShapeToCut()
}
}
else {
Base::Console().Message("DVS::getShapeToCut - base is weird\n");
Base::Console().message("DVS::getShapeToCut - base is weird\n");
return {};
}
return shapeToCut;
@@ -427,7 +427,7 @@ App::DocumentObjectExecReturn* DrawViewSection::execute()
Base::Vector3d orgPnt = SectionOrigin.getValue();
if (!isReallyInBox(gp_Pnt(orgPnt.x, orgPnt.y, orgPnt.z), centerBox)) {
Base::Console().Warning("DVS: SectionOrigin doesn't intersect part in %s\n",
Base::Console().warning("DVS: SectionOrigin doesn't intersect part in %s\n",
getNameInDocument());
}
@@ -496,7 +496,7 @@ void DrawViewSection::sectionExec(TopoDS_Shape& baseShape)
waitingForCut(true);
}
catch (...) {
Base::Console().Message("DVS::sectionExec - failed to make section cut");
Base::Console().message("DVS::sectionExec - failed to make section cut");
return;
}
}
@@ -528,7 +528,7 @@ void DrawViewSection::makeSectionCut(const TopoDS_Shape& baseShape)
const TopoDS_Solid& s = TopoDS::Solid(expl.Current());
FCBRepAlgoAPI_Cut mkCut(s, m_cuttingTool);
if (!mkCut.IsDone()) {
Base::Console().Warning("DVS: Section cut has failed in %s\n", getNameInDocument());
Base::Console().warning("DVS: Section cut has failed in %s\n", getNameInDocument());
continue;
}
builder.Add(cutPieces, mkCut.Shape());
@@ -558,7 +558,7 @@ void DrawViewSection::makeSectionCut(const TopoDS_Shape& baseShape)
testBox.SetGap(0.0);
if (testBox.IsVoid()) {// prism & input don't intersect. rawShape is
// garbage, don't bother.
Base::Console().Warning("DVS::makeSectionCut - prism & input don't intersect - %s\n",
Base::Console().warning("DVS::makeSectionCut - prism & input don't intersect - %s\n",
Label.getValue());
return;
}
@@ -599,7 +599,7 @@ TopoDS_Shape DrawViewSection::prepareShape(const TopoDS_Shape& rawShape, double
}
}
catch (Standard_Failure& e1) {
Base::Console().Warning("DVS::prepareShape - failed to build shape %s - %s **\n",
Base::Console().warning("DVS::prepareShape - failed to build shape %s - %s **\n",
getNameInDocument(),
e1.GetMessageString());
}
@@ -724,7 +724,7 @@ TopoDS_Compound DrawViewSection::findSectionPlaneIntersections(const TopoDS_Shap
{
if (shape.IsNull()) {
// this shouldn't happen
Base::Console().Warning(
Base::Console().warning(
"DrawViewSection::findSectionPlaneInter - %s - input shape is Null\n",
getNameInDocument());
return {};
@@ -786,7 +786,7 @@ TopoDS_Compound DrawViewSection::mapToPage(const TopoDS_Shape& shapeToAlign)
// stdZ);
// project the faces in the shapeToAlign, build new faces from the resulting
// wires and combine everything into a compound of faces
// Base::Console().Message("DVS::mapToPage() - shapeToAlign.null: %d\n",
// Base::Console().message("DVS::mapToPage() - shapeToAlign.null: %d\n",
// shapeToAlign.IsNull());
if (debugSection()) {
BRepTools::Write(shapeToAlign, "DVSShapeToAlign.brep");// debug
@@ -849,7 +849,7 @@ TopoDS_Compound DrawViewSection::mapToPage(const TopoDS_Shape& shapeToAlign)
// this may or may not be significant. In the offset or noparallel
// strategies, a profile segment that is parallel to the SectionNormal
// will not generate a face.
Base::Console().Log("DVS::mapToPage - %s - section face has no valid wires.\n",
Base::Console().log("DVS::mapToPage - %s - section face has no valid wires.\n",
getNameInDocument());
continue;
}
@@ -900,7 +900,7 @@ TopoDS_Shape DrawViewSection::makeFaceFromWires(std::vector<TopoDS_Wire>& inWire
}
if (!mkFace.IsDone()) {
Base::Console().Warning("DVS::makeFaceFromWires - %s - failed to make section face.\n",
Base::Console().warning("DVS::makeFaceFromWires - %s - failed to make section face.\n",
getNameInDocument());
return {};
}
@@ -918,7 +918,7 @@ TopoDS_Shape DrawViewSection::makeFaceFromWires(std::vector<TopoDS_Wire>& inWire
// turn OCC section faces into TD geometry
std::vector<TechDraw::FacePtr> DrawViewSection::makeTDSectionFaces(const TopoDS_Compound& topoDSFaces)
{
// Base::Console().Message("DVS::makeTDSectionFaces()\n");
// Base::Console().message("DVS::makeTDSectionFaces()\n");
std::vector<TechDraw::FacePtr> tdSectionFaces;
TopExp_Explorer sectionExpl(topoDSFaces, TopAbs_FACE);
for (; sectionExpl.More(); sectionExpl.Next()) {
@@ -976,7 +976,7 @@ Base::Vector3d DrawViewSection::getSectionDirectionOnBaseView()
// find the points and directions to make the change point marks.
ChangePointVector DrawViewSection::getChangePointsFromSectionLine()
{
// Base::Console().Message("Dvs::getChangePointsFromSectionLine()\n");
// Base::Console().message("Dvs::getChangePointsFromSectionLine()\n");
ChangePointVector result;
std::vector<gp_Pnt> allPoints;
auto* baseDvp = freecad_cast<DrawViewPart*>(BaseView.getValue());
@@ -1151,7 +1151,7 @@ gp_Ax2 DrawViewSection::getSectionCS() const
sectionCS = gp_Ax2(gOrigin, gNormal, gXDir);
}
catch (...) {
Base::Console().Error("DVS::getSectionCS - %s - failed to create section CS\n",
Base::Console().error("DVS::getSectionCS - %s - failed to create section CS\n",
getNameInDocument());
}
return sectionCS;
@@ -1291,7 +1291,7 @@ void DrawViewSection::makeLineSets()
std::string fileSpec = PatIncluded.getValue();
Base::FileInfo fi(fileSpec);
if (!fi.isReadable()) {
Base::Console().Message("%s can not read hatch file: %s\n",
Base::Console().message("%s can not read hatch file: %s\n",
getNameInDocument(),
fileSpec.c_str());
return;

View File

@@ -163,7 +163,7 @@ std::string DrawViewSpreadsheet::getSheetImage()
std::string sColStart, sColEnd;
if (boost::regex_search(scellstart, what, re)) {
if (what.size() < 3) {
Base::Console().Error("%s - start cell (%s) is invalid\n", getNameInDocument(),
Base::Console().error("%s - start cell (%s) is invalid\n", getNameInDocument(),
CellStart.getValue());
return std::string();
}
@@ -175,7 +175,7 @@ std::string DrawViewSpreadsheet::getSheetImage()
iRowStart = std::stoi(rowPart);
}
catch (...) {
Base::Console().Error("%s - start cell (%s) invalid row\n",
Base::Console().error("%s - start cell (%s) invalid row\n",
getNameInDocument(), rowPart.c_str());
return std::string();
}
@@ -183,7 +183,7 @@ std::string DrawViewSpreadsheet::getSheetImage()
if (boost::regex_search(scellend, what, re)) {
if (what.size() < 3) {
Base::Console().Error("%s - end cell (%s) is invalid\n", getNameInDocument(), CellEnd.getValue());
Base::Console().error("%s - end cell (%s) is invalid\n", getNameInDocument(), CellEnd.getValue());
} else {
colPart = what[1];
sColEnd = colPart;
@@ -192,7 +192,7 @@ std::string DrawViewSpreadsheet::getSheetImage()
iRowEnd = std::stoi(rowPart);
}
catch (...) {
Base::Console().Error("%s - end cell (%s) invalid row\n",
Base::Console().error("%s - end cell (%s) invalid row\n",
getNameInDocument(), rowPart.c_str());
return std::string();
}
@@ -204,7 +204,7 @@ std::string DrawViewSpreadsheet::getSheetImage()
//validate range start column in sheet's available columns
int iAvailColStart = colInList(availcolumns, sColStart);
if (iAvailColStart < 0) { //not found range start column in availcolumns list
Base::Console().Error("DVS - %s - start Column (%s) is invalid\n",
Base::Console().error("DVS - %s - start Column (%s) is invalid\n",
getNameInDocument(), sColStart.c_str());
return std::string();
}
@@ -212,7 +212,7 @@ std::string DrawViewSpreadsheet::getSheetImage()
//validate range end column in sheet's available columns
int iAvailColEnd = colInList(availcolumns, sColEnd);
if (iAvailColEnd < 0) {
Base::Console().Error("DVS - %s - end Column (%s) is invalid\n",
Base::Console().error("DVS - %s - end Column (%s) is invalid\n",
getNameInDocument(), sColEnd.c_str());
return std::string();
}
@@ -220,7 +220,7 @@ std::string DrawViewSpreadsheet::getSheetImage()
//check for logical range
if ( (iAvailColStart > iAvailColEnd) ||
(iRowStart > iRowEnd) ) {
Base::Console().Error("%s - cell range is illogical\n", getNameInDocument());
Base::Console().error("%s - cell range is illogical\n", getNameInDocument());
return std::string();
}
@@ -286,7 +286,7 @@ std::string DrawViewSpreadsheet::getSheetImage()
DrawUtil::encodeXmlSpecialChars(temp);
field << temp;
} else {
Base::Console().Error("DVSS: Unknown property type\n");
Base::Console().error("DVSS: Unknown property type\n");
}
celltext = field.str();
}

View File

@@ -196,9 +196,9 @@ bool DrawViewSymbol::loadQDomDocument(QDomDocument& symbolDocument)
bool rc = symbolDocument.setContent(qba, nsProcess, &errorMsg, &errorLine, &errorCol);
if (!rc) {
//invalid SVG message
Base::Console().Warning("DrawViewSymbol - %s - SVG for Symbol is not valid. See log.\n",
Base::Console().warning("DrawViewSymbol - %s - SVG for Symbol is not valid. See log.\n",
getNameInDocument());
Base::Console().Log("DrawViewSymbol - %s - len: %d rc: %d error: %s line: %d col: %d\n",
Base::Console().log("DrawViewSymbol - %s - len: %d rc: %d error: %s line: %d col: %d\n",
getNameInDocument(), strlen(symbol), rc, qPrintable(errorMsg),
errorLine, errorCol);
}
@@ -207,9 +207,9 @@ bool DrawViewSymbol::loadQDomDocument(QDomDocument& symbolDocument)
QDomDocument::ParseResult rc = symbolDocument.setContent(qba); // Use the default ParseOptions
if (!rc) {
//invalid SVG message
Base::Console().Warning("DrawViewSymbol - %s - SVG for Symbol is not valid. See log.\n",
Base::Console().warning("DrawViewSymbol - %s - SVG for Symbol is not valid. See log.\n",
getNameInDocument());
Base::Console().Log("DrawViewSymbol - %s - len: %d error: %s line: %d col: %d\n",
Base::Console().log("DrawViewSymbol - %s - len: %d error: %s line: %d col: %d\n",
getNameInDocument(), strlen(symbol), qPrintable(rc.errorMessage),
rc.errorLine, rc.errorColumn);
}

View File

@@ -62,11 +62,11 @@ DrawWeldSymbol::DrawWeldSymbol()
//but if this is a restore of an existing DWS, the tiles will loaded elsewhere
void DrawWeldSymbol::onSettingDocument()
{
// Base::Console().Message("DWS::onSettingDocument() - doc: %s\n", getDocument()->getName());
// Base::Console().message("DWS::onSettingDocument() - doc: %s\n", getDocument()->getName());
App::Document* doc = getDocument();
if (doc->testStatus(App::Document::Status::Restoring)) {
// Base::Console().Message("DWS::onSettingDocument() - restoring!\n");
// Base::Console().message("DWS::onSettingDocument() - restoring!\n");
return;
}
@@ -113,7 +113,7 @@ short DrawWeldSymbol::mustExecute() const
App::DocumentObjectExecReturn *DrawWeldSymbol::execute()
{
// Base::Console().Message("DWS::execute()\n");
// Base::Console().message("DWS::execute()\n");
if (!keepUpdated()) {
return DrawView::execute();
}
@@ -124,7 +124,7 @@ App::DocumentObjectExecReturn *DrawWeldSymbol::execute()
std::vector<DrawTileWeld*> DrawWeldSymbol::getTiles() const
{
// Base::Console().Message("DWS::getTiles()\n");
// Base::Console().message("DWS::getTiles()\n");
std::vector<DrawTileWeld*> result;
std::vector<App::DocumentObject*> tiles = getInList();

View File

@@ -68,13 +68,13 @@ void edgeVisitor::next_edge(Edge e)
void edgeVisitor::begin_face()
{
// Base::Console().Message("EV::begin_face()\n");
// Base::Console().message("EV::begin_face()\n");
wireEdges.clear();
}
void edgeVisitor::end_face()
{
// Base::Console().Message("EV::end_face()\n");
// Base::Console().message("EV::end_face()\n");
graphWires.push_back(wireEdges);
}
@@ -103,7 +103,7 @@ EdgeWalker::~EdgeWalker()
//loads a list of unique edges into the traversal mechanism
bool EdgeWalker::loadEdges(std::vector<TechDraw::WalkerEdge>& edges)
{
// Base::Console().Message("EW::loadEdges(we) - WEdgesIn: %d\n", edges.size());
// Base::Console().message("EW::loadEdges(we) - WEdgesIn: %d\n", edges.size());
int idx = 0;
for (auto& e: edges) {
std::pair<edge_t, bool> p;
@@ -119,7 +119,7 @@ bool EdgeWalker::loadEdges(std::vector<TechDraw::WalkerEdge>& edges)
bool EdgeWalker::loadEdges(std::vector<TopoDS_Edge> edges)
{
// Base::Console().Message("EW::loadEdges(TopoDS) - edges: %d\n", edges.size());
// Base::Console().message("EW::loadEdges(TopoDS) - edges: %d\n", edges.size());
if (edges.empty()) {
throw Base::ValueError("EdgeWalker has no edges to load\n");
}
@@ -146,7 +146,7 @@ bool EdgeWalker::setSize(std::size_t size)
bool EdgeWalker::prepare()
{
//Base::Console().Message("TRACE - EW::prepare()\n");
//Base::Console().message("TRACE - EW::prepare()\n");
// Initialize the interior edge index
property_map<TechDraw::graph, edge_index_t>::type e_index = get(edge_index, m_g);
graph_traits<TechDraw::graph>::edges_size_type edge_count = 0;
@@ -183,14 +183,14 @@ std::vector<TopoDS_Wire> EdgeWalker::execute(std::vector<TopoDS_Edge> edgeList,
ewWireList EdgeWalker::getResult()
{
//Base::Console().Message("TRACE - EW::getResult()\n");
//Base::Console().message("TRACE - EW::getResult()\n");
// Return value is a list of many wires each of which is a list of many WE
return m_eV.getResult();
}
std::vector<TopoDS_Wire> EdgeWalker::getResultWires()
{
//Base::Console().Message("TRACE - EW::getResultWires()\n");
//Base::Console().message("TRACE - EW::getResultWires()\n");
std::vector<TopoDS_Wire> fw;
ewWireList result = m_eV.getResult();
if (result.wires.empty()) {
@@ -213,7 +213,7 @@ std::vector<TopoDS_Wire> EdgeWalker::getResultWires()
std::vector<TopoDS_Wire> EdgeWalker::getResultNoDups()
{
//Base::Console().Message("TRACE - EW::getResultNoDups()\n");
//Base::Console().message("TRACE - EW::getResultNoDups()\n");
std::vector<TopoDS_Wire> fw;
ewWireList result = m_eV.getResult();
if (result.wires.empty()) {
@@ -240,7 +240,7 @@ std::vector<TopoDS_Wire> EdgeWalker::getResultNoDups()
//! make a clean wire with sorted, oriented, connected, etc edges
TopoDS_Wire EdgeWalker::makeCleanWire(std::vector<TopoDS_Edge> edges, double tol)
{
//Base::Console().Message("TRACE - EW::makeCleanWire()\n");
//Base::Console().message("TRACE - EW::makeCleanWire()\n");
TopoDS_Wire result;
BRepBuilderAPI_MakeWire mkWire;
ShapeFix_ShapeTolerance sTol;
@@ -269,7 +269,7 @@ TopoDS_Wire EdgeWalker::makeCleanWire(std::vector<TopoDS_Edge> edges, double tol
std::vector<TopoDS_Vertex> EdgeWalker:: makeUniqueVList(std::vector<TopoDS_Edge> edges)
{
// Base::Console().Message("TRACE - EW::makeUniqueVList() - edgesIn: %d\n", edges.size());
// Base::Console().message("TRACE - EW::makeUniqueVList() - edgesIn: %d\n", edges.size());
std::vector<TopoDS_Vertex> uniqueVert;
for(auto& e:edges) {
Base::Vector3d v1 = DrawUtil::vertex2Vector(TopExp::FirstVertex(e));
@@ -293,7 +293,7 @@ std::vector<TopoDS_Vertex> EdgeWalker:: makeUniqueVList(std::vector<TopoDS_Edge>
uniqueVert.push_back(TopExp::LastVertex(e));
}
}
// Base::Console().Message("EW::makeUniqueVList - verts out: %d\n", uniqueVert.size());
// Base::Console().message("EW::makeUniqueVList - verts out: %d\n", uniqueVert.size());
return uniqueVert;
}
@@ -301,7 +301,7 @@ std::vector<TopoDS_Vertex> EdgeWalker:: makeUniqueVList(std::vector<TopoDS_Edge>
std::vector<WalkerEdge> EdgeWalker::makeWalkerEdges(std::vector<TopoDS_Edge> edges,
std::vector<TopoDS_Vertex> verts)
{
// Base::Console().Message("TRACE - EW::makeWalkerEdges() - edges: %d verts: %d\n", edges.size(), verts.size());
// Base::Console().message("TRACE - EW::makeWalkerEdges() - edges: %d verts: %d\n", edges.size(), verts.size());
m_saveInEdges = edges;
std::vector<WalkerEdge> walkerEdges;
for (const auto& e:edges) {
@@ -323,13 +323,13 @@ std::vector<WalkerEdge> EdgeWalker::makeWalkerEdges(std::vector<TopoDS_Edge> edg
walkerEdges.push_back(we);
}
//Base::Console().Message("TRACE - EW::makeWalkerEdges - returns we: %d\n", walkerEdges.size());
//Base::Console().message("TRACE - EW::makeWalkerEdges - returns we: %d\n", walkerEdges.size());
return walkerEdges;
}
size_t EdgeWalker::findUniqueVert(TopoDS_Vertex vx, std::vector<TopoDS_Vertex> &uniqueVert)
{
// Base::Console().Message("TRACE - EW::findUniqueVert()\n");
// Base::Console().message("TRACE - EW::findUniqueVert()\n");
std::size_t idx = 0;
Base::Vector3d vx3d = DrawUtil::vertex2Vector(vx);
for(auto& v : uniqueVert) {
@@ -352,7 +352,7 @@ std::vector<TopoDS_Wire> EdgeWalker::sortStrip(std::vector<TopoDS_Wire> fw, bool
}
std::vector<TopoDS_Wire> sortedWires = sortWiresBySize(closedWires, false); //biggest 1st
if (sortedWires.empty()) {
Base::Console().Message("EW::sortStrip - no sorted Wires!\n");
Base::Console().message("EW::sortStrip - no sorted Wires!\n");
return sortedWires;
}
@@ -366,7 +366,7 @@ std::vector<TopoDS_Wire> EdgeWalker::sortStrip(std::vector<TopoDS_Wire> fw, bool
// sort (closed) wires in order of enclosed area
std::vector<TopoDS_Wire> EdgeWalker::sortWiresBySize(std::vector<TopoDS_Wire>& w, bool ascend)
{
//Base::Console().Message("TRACE - EW::sortWiresBySize()\n");
//Base::Console().message("TRACE - EW::sortWiresBySize()\n");
std::vector<TopoDS_Wire> wires = w;
std::sort(wires.begin(), wires.end(), EdgeWalker::wireCompare);
if (ascend) {
@@ -386,7 +386,7 @@ std::vector<TopoDS_Wire> EdgeWalker::sortWiresBySize(std::vector<TopoDS_Wire>& w
std::vector<embedItem> EdgeWalker::makeEmbedding(const std::vector<TopoDS_Edge> edges,
const std::vector<TopoDS_Vertex> uniqueVList)
{
// Base::Console().Message("TRACE - EW::makeEmbedding(edges: %d, verts: %d)\n",
// Base::Console().message("TRACE - EW::makeEmbedding(edges: %d, verts: %d)\n",
// edges.size(), uniqueVList.size());
std::vector<embedItem> result;
@@ -425,7 +425,7 @@ std::vector<embedItem> EdgeWalker::makeEmbedding(const std::vector<TopoDS_Edge>
//! get incidence row as edge indices for v'th vertex
std::vector<int> EdgeWalker::getEmbeddingRowIx(int v)
{
// //Base::Console().Message("TRACE - EW::getEmbeddingRowIx(%d)\n", v);
// //Base::Console().message("TRACE - EW::getEmbeddingRowIx(%d)\n", v);
std::vector<int> result;
embedItem ei = m_embedding[v];
for (auto& ii: ei.incidenceList) {
@@ -437,7 +437,7 @@ std::vector<int> EdgeWalker::getEmbeddingRowIx(int v)
//! get incidence row as edgeDescriptors for v'th vertex
std::vector<edge_t> EdgeWalker::getEmbeddingRow(int v)
{
// //Base::Console().Message("TRACE - EW::getEmbeddingRow(%d)\n", v);
// //Base::Console().message("TRACE - EW::getEmbeddingRow(%d)\n", v);
std::vector<edge_t> result;
embedItem ei = m_embedding[v];
for (auto& ii: ei.incidenceList) {
@@ -564,7 +564,7 @@ std::string embedItem::dump()
std::vector<incidenceItem> embedItem::sortIncidenceList (std::vector<incidenceItem> &list, bool ascend)
{
//Base::Console().Message("TRACE - eI::sortIncidenceList()\n");
//Base::Console().message("TRACE - eI::sortIncidenceList()\n");
std::vector< incidenceItem > tempList = list;
std::sort(tempList.begin(), tempList.end(), incidenceItem::iiCompare);
if (ascend) {

View File

@@ -292,7 +292,7 @@ std::vector<Base::Vector3d> BaseGeom::findEndPoints()
result.emplace_back(p.X(), p.Y(), p.Z());
} else {
//TODO: this should throw something
Base::Console().Message("Geometry::findEndPoints - OCC edge not found\n");
Base::Console().message("Geometry::findEndPoints - OCC edge not found\n");
throw Base::RuntimeError("no OCC edge in Geometry::findEndPoints");
}
return result;
@@ -306,7 +306,7 @@ Base::Vector3d BaseGeom::getStartPoint()
return verts[0];
} else {
//TODO: this should throw something
Base::Console().Message("Geometry::getStartPoint - start point not found!\n");
Base::Console().message("Geometry::getStartPoint - start point not found!\n");
Base::Vector3d badResult(0.0, 0.0, 0.0);
return badResult;
}
@@ -319,7 +319,7 @@ Base::Vector3d BaseGeom::getEndPoint()
if (verts.size() != 2) {
//TODO: this should throw something
Base::Console().Message("Geometry::getEndPoint - end point not found!\n");
Base::Console().message("Geometry::getEndPoint - end point not found!\n");
Base::Vector3d badResult(0.0, 0.0, 0.0);
return badResult;
}
@@ -433,7 +433,7 @@ bool BaseGeom::closed()
// return a BaseGeom similar to this, but inverted with respect to Y axis
BaseGeomPtr BaseGeom::inverted()
{
// Base::Console().Message("BG::inverted()\n");
// Base::Console().message("BG::inverted()\n");
TopoDS_Shape invertedShape = ShapeUtils::invertGeometry(occEdge);
TopoDS_Edge invertedEdge = TopoDS::Edge(invertedShape);
return baseFactory(invertedEdge);
@@ -462,7 +462,7 @@ std::string BaseGeom::geomTypeName()
BaseGeomPtr BaseGeom::baseFactory(TopoDS_Edge edge, bool isCosmetic)
{
if (edge.IsNull()) {
Base::Console().Message("BG::baseFactory - input edge is NULL \n");
Base::Console().message("BG::baseFactory - input edge is NULL \n");
}
//weed out rubbish edges before making geometry
if (!isCosmetic && !validateEdge(edge)) {
@@ -529,18 +529,18 @@ BaseGeomPtr BaseGeom::baseFactory(TopoDS_Edge edge, bool isCosmetic)
}
}
} else {
// Base::Console().Message("Geom::baseFactory - circEdge is Null\n");
// Base::Console().message("Geom::baseFactory - circEdge is Null\n");
result = bspline;
}
break;
}
catch (const Standard_Failure& e) {
Base::Console().Log("Geom::baseFactory - OCC error - %s - while making spline\n",
Base::Console().log("Geom::baseFactory - OCC error - %s - while making spline\n",
e.GetMessageString());
break;
}
catch (...) {
Base::Console().Log("Geom::baseFactory - unknown error occurred while making spline\n");
Base::Console().log("Geom::baseFactory - unknown error occurred while making spline\n");
break;
} break;
} // end bspline case
@@ -577,7 +577,7 @@ TopoDS_Edge BaseGeom::completeEdge(const TopoDS_Edge &edge) {
}
}
catch (Standard_Failure &e) {
Base::Console().Error("BaseGeom::completeEdge OCC error: %s\n", e.GetMessageString());
Base::Console().error("BaseGeom::completeEdge OCC error: %s\n", e.GetMessageString());
}
return TopoDS_Edge();
@@ -621,7 +621,7 @@ std::vector<Base::Vector3d> BaseGeom::intersection(TechDraw::BaseGeomPtr geom2)
TopoShape BaseGeom::asTopoShape(double scale)
{
// Base::Console().Message("BG::asTopoShape(%.3f) - dump: %s\n", scale, dump().c_str());
// Base::Console().message("BG::asTopoShape(%.3f) - dump: %s\n", scale, dump().c_str());
TopoDS_Shape unscaledShape = ShapeUtils::scaleShape(getOCCEdge(), 1.0 / scale);
TopoDS_Edge unscaledEdge = TopoDS::Edge(unscaledShape);
return unscaledEdge;
@@ -655,7 +655,7 @@ Ellipse::Ellipse(Base::Vector3d c, double mnr, double mjr)
GC_MakeEllipse me(gp_Ax2(gp_Pnt(c.x, c.y, c.z), gp_Dir(0.0, 0.0, 1.0)),
major, minor);
if (!me.IsDone()) {
Base::Console().Message("G:Ellipse - failed to make Ellipse\n");
Base::Console().message("G:Ellipse - failed to make Ellipse\n");
}
const Handle(Geom_Ellipse) gEllipse = me.Value();
BRepBuilderAPI_MakeEdge mkEdge(gEllipse, 0.0, 2 * std::numbers::pi);
@@ -683,7 +683,7 @@ AOE::AOE(const TopoDS_Edge &e) : Ellipse(e)
a = v3.DotCross(v1, v2);
}
catch (const Standard_Failure& e) {
Base::Console().Error("Geom::AOE::AOE - OCC error - %s - while making AOE in ctor\n",
Base::Console().error("Geom::AOE::AOE - OCC error - %s - while making AOE in ctor\n",
e.GetMessageString());
}
@@ -1298,7 +1298,7 @@ Vertex::Vertex(double x, double y)
Vertex::Vertex(Base::Vector3d v) : Vertex(v.x, v.y)
{
// Base::Console().Message("V::V(%s)\n",
// Base::Console().message("V::V(%s)\n",
// DrawUtil::formatVector(v).c_str());
}
@@ -1372,7 +1372,7 @@ void Vertex::Restore(Base::XMLReader &reader)
void Vertex::dump(const char* title)
{
Base::Console().Message("TD::Vertex - %s - point: %s vis: %d cosmetic: %d cosLink: %d cosTag: %s\n",
Base::Console().message("TD::Vertex - %s - point: %s vis: %d cosmetic: %d cosLink: %d cosTag: %s\n",
title, DrawUtil::formatVector(pnt).c_str(), hlrVisible, cosmetic, cosmeticLink,
cosmeticTag.c_str());
}
@@ -1452,7 +1452,7 @@ BaseGeomPtrVector GeometryUtils::chainGeoms(BaseGeomPtrVector geoms)
TopoDS_Edge GeometryUtils::edgeFromGeneric(TechDraw::GenericPtr g)
{
// Base::Console().Message("GU::edgeFromGeneric()\n");
// Base::Console().message("GU::edgeFromGeneric()\n");
//TODO: note that this isn't quite right as g can be a polyline!
//sb points.first, points.last
//and intermediates should be added to Point
@@ -1571,7 +1571,7 @@ bool GeometryUtils::getCircleParms(const TopoDS_Edge& occEdge, double& radius, B
return true;
}
catch (Standard_Failure& err) {
Base::Console().Message("Geo::getCircleParms - failed to make a circle\n");
Base::Console().message("Geo::getCircleParms - failed to make a circle\n");
}
return false;
@@ -1756,7 +1756,7 @@ TopoDS_Face GeometryUtils::makePerforatedFace(FacePtr bigCheese, const std::vec
faceShape = Part::FaceMakerCheese::makeFace(cheeseIngredients);
}
catch (const Standard_Failure&) {
Base::Console().Warning("Area - could not make holes in face\n");
Base::Console().warning("Area - could not make holes in face\n");
return flippedFace;
}

View File

@@ -160,7 +160,7 @@ bool GeometryMatcher::compareLines(const TopoDS_Edge& edge1, const TopoDS_Edge&
// how does the edge that was NOT null in compareEdges become null here?
// should not happen, but does!
if (edge1.IsNull() || edge2.IsNull()) {
// Base::Console().Message("GM::compareLine - an input edge is null\n");
// Base::Console().message("GM::compareLine - an input edge is null\n");
return false;
}
return compareEndPoints(edge1, edge2);
@@ -232,7 +232,7 @@ bool GeometryMatcher::compareBSplines(const TopoDS_Edge& edge1, const TopoDS_Edg
circleEdge2 = GeometryUtils::asCircle(edge2, isArc2);
}
catch (Base::RuntimeError&) {
Base::Console().Error("GeometryMatcher failed to make circles from splines\n");
Base::Console().error("GeometryMatcher failed to make circles from splines\n");
return false;
}
if (!isArc1 && !isArc2) {

View File

@@ -162,7 +162,7 @@ void GeometryObject::projectShape(const TopoDS_Shape& inShape, const gp_Ax2& vie
brep_hlr->Hide();
}
catch (const Standard_Failure& e) {
Base::Console().Error("GO::projectShape - OCC error - %s - while projecting shape\n",
Base::Console().error("GO::projectShape - OCC error - %s - while projecting shape\n",
e.GetMessageString());
throw Base::RuntimeError("GeometryObject::projectShape - OCC error");
}
@@ -250,7 +250,7 @@ void GeometryObject::projectShape(const TopoDS_Shape& inShape, const gp_Ax2& vie
//convert the hlr output into TD Geometry
void GeometryObject::makeTDGeometry()
{
// Base::Console().Message("GO::makeTDGeometry()\n");
// Base::Console().message("GO::makeTDGeometry()\n");
extractGeometry(EdgeClass::HARD, //always show the hard&outline visible lines
true);
extractGeometry(EdgeClass::OUTLINE,
@@ -289,7 +289,7 @@ void GeometryObject::makeTDGeometry()
//!set up a hidden line remover and project a shape with it
void GeometryObject::projectShapeWithPolygonAlgo(const TopoDS_Shape& input, const gp_Ax2& viewAxis)
{
// Base::Console().Message("GO::projectShapeWithPolygonAlgo()\n");
// Base::Console().message("GO::projectShapeWithPolygonAlgo()\n");
// Clear previous Geometry
clear();
@@ -329,7 +329,7 @@ void GeometryObject::projectShapeWithPolygonAlgo(const TopoDS_Shape& input, cons
brep_hlrPoly->Update();
}
catch (const Standard_Failure& e) {
Base::Console().Error(
Base::Console().error(
"GO::projectShapeWithPolygonAlgo - OCC error - %s - while projecting shape\n",
e.GetMessageString());
throw Base::RuntimeError("GeometryObject::projectShapeWithPolygonAlgo - OCC error");
@@ -377,7 +377,7 @@ void GeometryObject::projectShapeWithPolygonAlgo(const TopoDS_Shape& input, cons
hidOutline =ShapeUtils::invertGeometry(hidOutline);
}
catch (const Standard_Failure& e) {
Base::Console().Error(
Base::Console().error(
"GO::projectShapeWithPolygonAlgo - OCC error - %s - while extracting edges\n",
e.GetMessageString());
throw Base::RuntimeError("GeometryObject::projectShapeWithPolygonAlgo - OCC error occurred "
@@ -397,7 +397,7 @@ void GeometryObject::projectShapeWithPolygonAlgo(const TopoDS_Shape& input, cons
//TODO: allow use of perspective projector
TopoDS_Shape GeometryObject::projectSimpleShape(const TopoDS_Shape& shape, const gp_Ax2& CS)
{
// Base::Console().Message("GO::()\n");
// Base::Console().message("GO::()\n");
if (shape.IsNull()) {
throw Base::ValueError("GO::projectSimpleShape - input shape is NULL");
}
@@ -431,7 +431,7 @@ TopoDS_Shape GeometryObject::simpleProjection(const TopoDS_Shape& shape, const g
TopoDS_Shape GeometryObject::projectFace(const TopoDS_Shape& face, const gp_Ax2& CS)
{
// Base::Console().Message("GO::projectFace()\n");
// Base::Console().message("GO::projectFace()\n");
if (face.IsNull()) {
throw Base::ValueError("GO::projectFace - input Face is NULL");
}
@@ -454,7 +454,7 @@ TopoDS_Shape GeometryObject::projectFace(const TopoDS_Shape& face, const gp_Ax2&
//!add edges meeting filter criteria for category, visibility
void GeometryObject::extractGeometry(EdgeClass category, bool hlrVisible)
{
// Base::Console().Message("GO::extractGeometry(%d, %d)\n", category, hlrVisible);
// Base::Console().message("GO::extractGeometry(%d, %d)\n", category, hlrVisible);
TopoDS_Shape filtEdges;
if (hlrVisible) {
switch (category) {
@@ -474,7 +474,7 @@ void GeometryObject::extractGeometry(EdgeClass category, bool hlrVisible)
filtEdges = visIso;
break;
default:
Base::Console().Warning(
Base::Console().warning(
"GeometryObject::ExtractGeometry - unsupported hlrVisible EdgeClass: %d\n",
static_cast<int>(category));
return;
@@ -498,7 +498,7 @@ void GeometryObject::extractGeometry(EdgeClass category, bool hlrVisible)
filtEdges = hidIso;
break;
default:
Base::Console().Warning(
Base::Console().warning(
"GeometryObject::ExtractGeometry - unsupported hidden EdgeClass: %d\n",
static_cast<int>(category));
return;
@@ -512,7 +512,7 @@ void GeometryObject::extractGeometry(EdgeClass category, bool hlrVisible)
void GeometryObject::addGeomFromCompound(TopoDS_Shape edgeCompound, EdgeClass category,
bool hlrVisible)
{
// Base::Console().Message("GO::addGeomFromCompound(%d, %d)\n", category, hlrVisible);
// Base::Console().message("GO::addGeomFromCompound(%d, %d)\n", category, hlrVisible);
if (edgeCompound.IsNull()) {
return; // There is no OpenCascade Geometry to be calculated
}
@@ -669,7 +669,7 @@ int GeometryObject::addCosmeticVertex(Base::Vector3d pos, std::string tagString)
// insertGeomForCE(ce)
int GeometryObject::addCosmeticEdge(CosmeticEdge* ce)
{
// Base::Console().Message("GO::addCosmeticEdge(%X) 0\n", ce);
// Base::Console().message("GO::addCosmeticEdge(%X) 0\n", ce);
double scale = m_parent->getScale();
TechDraw::BaseGeomPtr e = ce->scaledGeometry(scale);
e->setCosmetic(true);
@@ -684,7 +684,7 @@ int GeometryObject::addCosmeticEdge(CosmeticEdge* ce)
//this should be made obsolete and the variant with tag used instead
int GeometryObject::addCosmeticEdge(Base::Vector3d start, Base::Vector3d end)
{
// Base::Console().Message("GO::addCosmeticEdge() 1 - deprec?\n");
// Base::Console().message("GO::addCosmeticEdge() 1 - deprec?\n");
gp_Pnt gp1(start.x, start.y, start.z);
gp_Pnt gp2(end.x, end.y, end.z);
TopoDS_Edge occEdge = BRepBuilderAPI_MakeEdge(gp1, gp2);
@@ -700,7 +700,7 @@ int GeometryObject::addCosmeticEdge(Base::Vector3d start, Base::Vector3d end)
int GeometryObject::addCosmeticEdge(Base::Vector3d start, Base::Vector3d end, std::string tagString)
{
// Base::Console().Message("GO::addCosmeticEdge() 2\n");
// Base::Console().message("GO::addCosmeticEdge() 2\n");
gp_Pnt gp1(start.x, start.y, start.z);
gp_Pnt gp2(end.x, end.y, end.z);
TopoDS_Edge occEdge = BRepBuilderAPI_MakeEdge(gp1, gp2);
@@ -716,7 +716,7 @@ int GeometryObject::addCosmeticEdge(Base::Vector3d start, Base::Vector3d end, st
int GeometryObject::addCosmeticEdge(TechDraw::BaseGeomPtr base, std::string tagString)
{
// Base::Console().Message("GO::addCosmeticEdge(%X, %s) 3\n", base, tagString.c_str());
// Base::Console().message("GO::addCosmeticEdge(%X, %s) 3\n", base, tagString.c_str());
base->setCosmetic(true);
base->setHlrVisible(true);
base->source(SourceType::COSMETICEDGE);
@@ -730,7 +730,7 @@ int GeometryObject::addCosmeticEdge(TechDraw::BaseGeomPtr base, std::string tagS
int GeometryObject::addCenterLine(TechDraw::BaseGeomPtr base, std::string tag)
// int s, int si)
{
// Base::Console().Message("GO::addCenterLine()\n");
// Base::Console().message("GO::addCenterLine()\n");
base->setCosmetic(true);
base->setCosmeticTag(tag);
base->source(SourceType::CENTERLINE);
@@ -802,7 +802,7 @@ bool GeometryObject::isWithinArc(double theta, double first, double last, bool c
//note bbx is scaled
Base::BoundBox3d GeometryObject::calcBoundingBox() const
{
// Base::Console().Message("GO::calcBoundingBox() - edges: %d\n", edgeGeom.size());
// Base::Console().message("GO::calcBoundingBox() - edges: %d\n", edgeGeom.size());
Bnd_Box testBox;
testBox.SetGap(0.0);
if (!edgeGeom.empty()) {

View File

@@ -230,7 +230,7 @@ void PATLineSpec::load(std::string& lineSpec)
{
std::vector<double> values = split(lineSpec);
if (values.size() < 5) {
Base::Console().Message( "PATLineSpec::load(%s) invalid entry in pattern\n", lineSpec.c_str() );
Base::Console().message( "PATLineSpec::load(%s) invalid entry in pattern\n", lineSpec.c_str() );
return;
}
m_angle = values[0];
@@ -256,7 +256,7 @@ std::vector<double> PATLineSpec::split(std::string line)
result.push_back(std::stod(cell));
}
catch (const std::invalid_argument& ia) {
Base::Console().Warning("Invalid number in cell: %s (%s) \n", cell.c_str(), ia.what());
Base::Console().warning("Invalid number in cell: %s (%s) \n", cell.c_str(), ia.what());
result.push_back(0.0);
}
}
@@ -265,17 +265,17 @@ std::vector<double> PATLineSpec::split(std::string line)
void PATLineSpec::dump(const char* title)
{
Base::Console().Message( "DUMP: %s\n", title);
Base::Console().Message( "Angle: %.3f\n", m_angle);
Base::Console().Message( "Origin: %s\n", DrawUtil::formatVector(m_origin).c_str());
Base::Console().Message( "Offset: %.3f\n", m_offset);
Base::Console().Message( "Interval: %.3f\n", m_interval);
Base::Console().message( "DUMP: %s\n", title);
Base::Console().message( "Angle: %.3f\n", m_angle);
Base::Console().message( "Origin: %s\n", DrawUtil::formatVector(m_origin).c_str());
Base::Console().message( "Offset: %.3f\n", m_offset);
Base::Console().message( "Interval: %.3f\n", m_interval);
// std::stringstream ss;
// for (auto& d: m_dashParms) {
// ss << d << ", ";
// }
// ss << "end";
// Base::Console().Message( "DashSpec: %s\n", ss.str().c_str());
// Base::Console().message( "DashSpec: %s\n", ss.str().c_str());
m_dashParms.dump("dashspec");
}
@@ -287,7 +287,7 @@ std::vector<PATLineSpec> PATLineSpec::getSpecsForPattern(std::string& parmFile,
Base::ifstream inFile;
inFile.open(fi, std::ifstream::in);
if(!inFile.is_open()) {
Base::Console().Message("Cannot open input file.\n");
Base::Console().message("Cannot open input file.\n");
return std::vector<PATLineSpec>();
}
@@ -309,7 +309,7 @@ std::vector<PATLineSpec> PATLineSpec::getSpecsForPattern(std::string& parmFile,
bool PATLineSpec::findPatternStart(std::ifstream& inFile, std::string& parmName)
{
// Base::Console().Message("HL::findPatternStart() - parmName: %s\n", parmName.c_str());
// Base::Console().message("HL::findPatternStart() - parmName: %s\n", parmName.c_str());
while (inFile.good() ){
std::string line;
std::getline(inFile, line);
@@ -364,7 +364,7 @@ std::vector<std::string> PATLineSpec::getPatternList(std::string& parmFile)
Base::ifstream inFile;
inFile.open (fi, std::ifstream::in);
if(!inFile.is_open()) {
Base::Console().Message( "Cannot open input file.\n");
Base::Console().message( "Cannot open input file.\n");
return result;
}
@@ -457,7 +457,7 @@ void DashSpec::dump(const char* title)
for (auto& p: m_parms) {
ss << p << ", ";
}
Base::Console().Message("DUMP - DashSpec - %s\n", ss.str().c_str());
Base::Console().message("DUMP - DashSpec - %s\n", ss.str().c_str());
}

View File

@@ -87,7 +87,7 @@ short LandmarkDimension::mustExecute() const
App::DocumentObjectExecReturn *LandmarkDimension::execute()
{
// Base::Console().Message("LD::execute() - %s\n", getNameInDocument());
// Base::Console().message("LD::execute() - %s\n", getNameInDocument());
if (!okToProceed()) {
return App::DocumentObject::StdReturn;
}
@@ -96,7 +96,7 @@ App::DocumentObjectExecReturn *LandmarkDimension::execute()
References2D.setValue(dvp);
std::vector<DocumentObject*> features = References3D.getValues();
// Base::Console().Message("LD::execute - features: %d\n", features.size());
// Base::Console().message("LD::execute - features: %d\n", features.size());
//if distance, required size = 2
//if angle, required size = 3; //not implemented yet
unsigned int requiredSize = 2;
@@ -127,7 +127,7 @@ App::DocumentObjectExecReturn *LandmarkDimension::execute()
index++;
}
}
// Base::Console().Message("LD::execute - front: %s back: %s\n",
// Base::Console().message("LD::execute - front: %s back: %s\n",
// DrawUtil::formatVector(points.front()).c_str(),
// DrawUtil::formatVector(points.back()).c_str());
setLinearPoints(points.front(), points.back());

View File

@@ -84,8 +84,8 @@ LineFormat::LineFormat(const int style,
void LineFormat::dump(const char* title)
{
Base::Console().Message("LF::dump - %s \n", title);
Base::Console().Message("LF::dump - %s \n", toString().c_str());
Base::Console().message("LF::dump - %s \n", title);
Base::Console().message("LF::dump - %s \n", toString().c_str());
}
std::string LineFormat::toString() const

View File

@@ -90,7 +90,7 @@ QPen LineGenerator::getBestPen(size_t isoNumber, Qt::PenStyle qtStyle, double wi
//! 1-15 and ANSI lines are 1-4(?) The line width is the nominal width in mm.
QPen LineGenerator::getLinePen(size_t lineNumber, double nominalLineWidth)
{
// Base::Console().Message("LG::getLinePen(%d, %.3f)\n",
// Base::Console().message("LG::getLinePen(%d, %.3f)\n",
// lineNumber, nominalLineWidth);
QPen linePen;
linePen.setWidthF(nominalLineWidth);
@@ -219,7 +219,7 @@ std::map<std::string, int> LineGenerator::loadElements()
Base::FileInfo fi(parmFile);
Base::ifstream inFile(fi, std::ifstream::in);
if(!inFile.is_open()) {
Base::Console().Message( "Cannot open line element def file: %s\n", parmFile.c_str());
Base::Console().message( "Cannot open line element def file: %s\n", parmFile.c_str());
return result;
}
std::string line;
@@ -245,7 +245,7 @@ std::vector< std::vector<std::string> > LineGenerator::getLineDefinitions()
Base::FileInfo fi(Preferences::currentLineDefFile());
Base::ifstream inFile(fi, std::ifstream::in);
if(!inFile.is_open()) {
Base::Console().Message( "Cannot open line def file: %s\n", fi.filePath().c_str());
Base::Console().message( "Cannot open line def file: %s\n", fi.filePath().c_str());
return lineDefs;
}
@@ -309,7 +309,7 @@ std::vector<std::string> LineGenerator::getLineDescriptions()
Base::FileInfo fi(Preferences::currentLineDefFile());
Base::ifstream inFile(fi, std::ifstream::in);
if(!inFile.is_open()) {
Base::Console().Message( "Cannot open line def file: %s\n", fi.filePath().c_str());
Base::Console().message( "Cannot open line def file: %s\n", fi.filePath().c_str());
return lineDescs;
}

View File

@@ -93,12 +93,12 @@ void LineGroup::setWeight(std::string s, double weight)
void LineGroup::dump(const char* title)
{
Base::Console().Message( "DUMP: %s\n", title);
Base::Console().Message( "Name: %s\n", m_name.c_str());
Base::Console().Message( "Thin: %.3f\n", m_thin);
Base::Console().Message( "Graphic: %.3f\n", m_graphic);
Base::Console().Message( "Thick: %.3f\n", m_thick);
Base::Console().Message( "Extra: %.3f\n", m_extra);
Base::Console().message( "DUMP: %s\n", title);
Base::Console().message( "Name: %s\n", m_name.c_str());
Base::Console().message( "Thin: %.3f\n", m_thin);
Base::Console().message( "Graphic: %.3f\n", m_graphic);
Base::Console().message( "Thick: %.3f\n", m_thick);
Base::Console().message( "Extra: %.3f\n", m_extra);
}
//static support function: split comma separated string of values into vector of numbers
@@ -119,7 +119,7 @@ std::vector<double> LineGroup::split(std::string line)
result.push_back(std::stod(cell));
}
catch (const std::invalid_argument& ia) {
Base::Console().Warning("Invalid number in cell: %s (%s) \n", cell.c_str(), ia.what());
Base::Console().warning("Invalid number in cell: %s (%s) \n", cell.c_str(), ia.what());
result.push_back(0.0);
}
}
@@ -133,7 +133,7 @@ std::string LineGroup::getRecordFromFile(std::string parmFile, int groupNumber)
Base::FileInfo fi(parmFile);
Base::ifstream inFile(fi, std::ifstream::in);
if(!inFile.is_open()) {
Base::Console().Message( "Cannot open LineGroup file: %s\n", parmFile.c_str());
Base::Console().message( "Cannot open LineGroup file: %s\n", parmFile.c_str());
return record;
}
// parse file to get the groupNumber'th line
@@ -151,7 +151,7 @@ std::string LineGroup::getRecordFromFile(std::string parmFile, int groupNumber)
}
} //endwhile
// nothing was found
Base::Console().Error("LineGroup: the LineGroup file has only %s entries but entry number %s is set\n"
Base::Console().error("LineGroup: the LineGroup file has only %s entries but entry number %s is set\n"
, std::to_string(counter).c_str()
, std::to_string(groupNumber).c_str());
return std::string(); // return an empty string
@@ -168,7 +168,7 @@ LineGroup* LineGroup::lineGroupFactory(int groupNumber)
std::vector<double> values = LineGroup::split(lgRecord);
if (values.size() < 4) {
Base::Console().Error( "LineGroup::invalid entry in %s\n", lgFileName.c_str() );
Base::Console().error( "LineGroup::invalid entry in %s\n", lgFileName.c_str() );
} else {
lg->setWeight("Thin", values[0]);
lg->setWeight("Graphic", values[1]);
@@ -204,7 +204,7 @@ std::string LineGroup::getGroupNamesFromFile(std::string FileName)
Base::FileInfo fi(FileName);
Base::ifstream inFile(fi, std::ifstream::in);
if (!inFile.is_open()) {
Base::Console().Message("Cannot open LineGroup file: %s\n", FileName.c_str());
Base::Console().message("Cannot open LineGroup file: %s\n", FileName.c_str());
return record;
}
// parse the file
@@ -223,7 +223,7 @@ std::string LineGroup::getGroupNamesFromFile(std::string FileName)
}
} //endwhile
if (record.empty()) {
Base::Console().Message("LineGroup error: no group found in file %s\n", FileName.c_str());
Base::Console().message("LineGroup error: no group found in file %s\n", FileName.c_str());
}
return record;
}

View File

@@ -203,7 +203,7 @@ QString Preferences::defaultTemplate()
QString templateFileName = QString::fromStdString(prefFileName);
Base::FileInfo fi(prefFileName);
if (!fi.isReadable()) {
Base::Console().Warning("Template File: %s is not readable\n", prefFileName.c_str());
Base::Console().warning("Template File: %s is not readable\n", prefFileName.c_str());
templateFileName = QString::fromStdString(defaultFileName);
}
return templateFileName;
@@ -219,7 +219,7 @@ QString Preferences::defaultTemplateDir()
QString templateDir = QString::fromStdString(prefTemplateDir);
Base::FileInfo fi(prefTemplateDir);
if (!fi.isReadable()) {
Base::Console().Warning("Template Directory: %s is not readable\n",
Base::Console().warning("Template Directory: %s is not readable\n",
prefTemplateDir.c_str());
templateDir = QString::fromStdString(defaultDir);
}
@@ -236,7 +236,7 @@ std::string Preferences::lineGroupFile()
}
Base::FileInfo fi(lgFileName);
if (!fi.isReadable()) {
Base::Console().Warning("Line Group File: %s is not readable\n", lgFileName.c_str());
Base::Console().warning("Line Group File: %s is not readable\n", lgFileName.c_str());
lgFileName = defaultFileName;
}
return lgFileName;
@@ -278,7 +278,7 @@ QString Preferences::defaultSymbolDir()
QString symbolDir = QString::fromStdString(prefSymbolDir);
Base::FileInfo fi(prefSymbolDir);
if (!fi.isReadable()) {
Base::Console().Warning("Symbol Directory: %s is not readable\n",
Base::Console().warning("Symbol Directory: %s is not readable\n",
prefSymbolDir.c_str());
symbolDir = QString::fromStdString(defaultDir);
}
@@ -295,7 +295,7 @@ std::string Preferences::svgFile()
}
Base::FileInfo fi(prefHatchFile);
if (!fi.isReadable()) {
Base::Console().Warning("Svg Hatch File: %s is not readable\n", prefHatchFile.c_str());
Base::Console().warning("Svg Hatch File: %s is not readable\n", prefHatchFile.c_str());
prefHatchFile = defaultFileName;
}
return prefHatchFile;
@@ -311,7 +311,7 @@ std::string Preferences::patFile()
}
Base::FileInfo fi(prefHatchFile);
if (!fi.isReadable()) {
Base::Console().Warning("Pat Hatch File: %s is not readable\n", prefHatchFile.c_str());
Base::Console().warning("Pat Hatch File: %s is not readable\n", prefHatchFile.c_str());
prefHatchFile = defaultFileName;
}
@@ -328,7 +328,7 @@ std::string Preferences::bitmapFill()
}
Base::FileInfo fi(prefBitmapFile);
if (!fi.isReadable()) {
Base::Console().Warning("Bitmap Fill File: %s is not readable\n", prefBitmapFile.c_str());
Base::Console().warning("Bitmap Fill File: %s is not readable\n", prefBitmapFile.c_str());
prefBitmapFile = defaultFileName;
}
return prefBitmapFile;
@@ -373,7 +373,7 @@ bool Preferences::monochrome()
//! set monochrome display on/off
void Preferences::monochrome(bool state)
{
Base::Console().Message("Pref::useLightText - set to %d\n", state);
Base::Console().message("Pref::useLightText - set to %d\n", state);
getPreferenceGroup("Colors")->SetBool("Monochrome", state);
}
@@ -465,7 +465,7 @@ int Preferences::lineStandard()
// this message will appear many times if the parameter is invalid.
int parameterValue = getPreferenceGroup("Standards")->GetInt("LineStandard", 1);
if (parameterValue < 0) {
Base::Console().Warning(qPrintable(QApplication::translate(
Base::Console().warning(qPrintable(QApplication::translate(
"Preferences", "The LineStandard parameter is invalid. Using zero instead.", nullptr)));
return 0;
}

View File

@@ -157,7 +157,7 @@ void PropertyCenterLineList::Restore(Base::XMLReader &reader)
newG->Restore(reader);
if(reader.testStatus(Base::XMLReader::ReaderStatus::PartialRestoreInObject)) {
Base::Console().Error("CenterLine \"%s\" within a PropertyCenterLineList was subject to a partial restore.\n", reader.localName());
Base::Console().error("CenterLine \"%s\" within a PropertyCenterLineList was subject to a partial restore.\n", reader.localName());
if(isOrderRelevant()) {
// Pushes the best try by the CenterLine class
values.push_back(newG);

View File

@@ -67,7 +67,7 @@ int PropertyCosmeticEdgeList::getSize() const
//_lValueList is not const. so why do we pass a const parameter?
void PropertyCosmeticEdgeList::setValue(CosmeticEdge* lValue)
{
// Base::Console().Message("PCEL::setValue() - current values: %d lValue: %s\n", _lValueList.size(), lValue ? "valid" : "null");
// Base::Console().message("PCEL::setValue() - current values: %d lValue: %s\n", _lValueList.size(), lValue ? "valid" : "null");
if (lValue) {
aboutToSetValue();
_lValueList.resize(1);
@@ -78,7 +78,7 @@ void PropertyCosmeticEdgeList::setValue(CosmeticEdge* lValue)
void PropertyCosmeticEdgeList::setValues(const std::vector<CosmeticEdge*>& lValue)
{
// Base::Console().Message("PCEL::seValues() - in values: %d current values: %d\n", lValue.size(), _lValueList.size());
// Base::Console().message("PCEL::seValues() - in values: %d current values: %d\n", lValue.size(), _lValueList.size());
aboutToSetValue();
_lValueList.resize(lValue.size());
if (!lValue.empty()) {
@@ -161,7 +161,7 @@ void PropertyCosmeticEdgeList::Restore(Base::XMLReader &reader)
newG->Restore(reader);
if(reader.testStatus(Base::XMLReader::ReaderStatus::PartialRestoreInObject)) {
Base::Console().Error("CosmeticEdge \"%s\" within a PropertyCosmeticEdgeList was subject to a partial restore.\n", reader.localName());
Base::Console().error("CosmeticEdge \"%s\" within a PropertyCosmeticEdgeList was subject to a partial restore.\n", reader.localName());
if(isOrderRelevant()) {
// Pushes the best try by the CosmeticEdge class
values.push_back(newG);

View File

@@ -159,7 +159,7 @@ void PropertyCosmeticVertexList::Restore(Base::XMLReader &reader)
newG->Restore(reader);
if(reader.testStatus(Base::XMLReader::ReaderStatus::PartialRestoreInObject)) {
Base::Console().Error("CosmeticVertex \"%s\" within a PropertyCosmeticVertexList was subject to a partial restore.\n", reader.localName());
Base::Console().error("CosmeticVertex \"%s\" within a PropertyCosmeticVertexList was subject to a partial restore.\n", reader.localName());
if(isOrderRelevant()) {
// Pushes the best try by the CosmeticVertex class
values.push_back(newG);

View File

@@ -171,7 +171,7 @@ void PropertyGeomFormatList::Restore(Base::XMLReader &reader)
newG->Restore(reader);
if(reader.testStatus(Base::XMLReader::ReaderStatus::PartialRestoreInObject)) {
Base::Console().Error("GeomFormat \"%s\" within a PropertyGeomFormatList was subject to a partial restore.\n", reader.localName());
Base::Console().error("GeomFormat \"%s\" within a PropertyGeomFormatList was subject to a partial restore.\n", reader.localName());
if(isOrderRelevant()) {
// Pushes the best try by the GeomFormat class
values.push_back(newG);

View File

@@ -248,7 +248,7 @@ std::vector<TopoDS_Shape> ShapeExtractor::getXShapes(const App::Link* xLink)
}
xSourceShapes.push_back(shape);
} else {
Base::Console().Message("SE::getXShapes - no shape from getXShape\n");
Base::Console().message("SE::getXShapes - no shape from getXShape\n");
}
}
} else {
@@ -297,7 +297,7 @@ TopoDS_Shape ShapeExtractor::getShapeFromXLink(const App::Link* xLink)
}
}
catch (...) {
Base::Console().Error("ShapeExtractor failed to retrieve shape from %s\n", xLink->getNameInDocument());
Base::Console().error("ShapeExtractor failed to retrieve shape from %s\n", xLink->getNameInDocument());
return TopoDS_Shape();
}
if (checkShape(linkedObject, ts.getShape())) {
@@ -361,7 +361,7 @@ TopoDS_Shape ShapeExtractor::getShapesFused(const std::vector<App::DocumentObjec
FCBRepAlgoAPI_Fuse mkFuse(fusedShape, aChild);
// Let's check if the fusion has been successful
if (!mkFuse.IsDone()) {
Base::Console().Error("SE - Fusion failed\n");
Base::Console().error("SE - Fusion failed\n");
return baseShape;
}
fusedShape = mkFuse.Shape();
@@ -496,7 +496,7 @@ bool ShapeExtractor::checkShape(const App::DocumentObject* shapeObj, TopoDS_Shap
}
// this is ok for devs, but there must be a better way to inform the user from somewhere deep in the
// call stack. notification area from App?
Base::Console().Warning(
Base::Console().warning(
"ShapeExtractor found a problem shape in %s. Results may be incorrect.\n",
shapeObj->getNameInDocument());
return false;

View File

@@ -83,7 +83,7 @@ using DU = DrawUtil;
gp_Ax2 ShapeUtils::getViewAxis(const Base::Vector3d origin, const Base::Vector3d& direction,
const bool flip)
{
// Base::Console().Message("GO::getViewAxis() - 1 - use only with getLegacyX\n");
// Base::Console().message("GO::getViewAxis() - 1 - use only with getLegacyX\n");
(void)flip;
gp_Ax2 viewAxis;
gp_Pnt inputCenter(origin.x, origin.y, origin.z);
@@ -113,7 +113,7 @@ gp_Ax2 ShapeUtils::getViewAxis(const Base::Vector3d origin, const Base::Vector3d
gp_Ax2 ShapeUtils::getViewAxis(const Base::Vector3d origin, const Base::Vector3d& direction,
const Base::Vector3d& xAxis, const bool flip)
{
// Base::Console().Message("GO::getViewAxis() - 2\n");
// Base::Console().message("GO::getViewAxis() - 2\n");
(void)flip;
gp_Pnt inputCenter(origin.x, origin.y, origin.z);
return gp_Ax2(inputCenter,
@@ -126,7 +126,7 @@ gp_Ax2 ShapeUtils::getViewAxis(const Base::Vector3d origin, const Base::Vector3d
gp_Ax2 ShapeUtils::legacyViewAxis1(const Base::Vector3d origin, const Base::Vector3d& direction,
const bool flip)
{
// Base::Console().Message("GO::legacyViewAxis1()\n");
// Base::Console().message("GO::legacyViewAxis1()\n");
gp_Pnt inputCenter(origin.x, origin.y, origin.z);
Base::Vector3d stdZ(0.0, 0.0, 1.0);
Base::Vector3d stdOrg(0.0, 0.0, 0.0);
@@ -180,7 +180,7 @@ gp_Pnt ShapeUtils::findCentroid(const TopoDS_Shape& shape)
//! Returns the centroid of shape, as viewed according to direction
gp_Pnt ShapeUtils::findCentroid(const TopoDS_Shape& shape, const Base::Vector3d& direction)
{
// Base::Console().Message("GO::findCentroid() - 1\n");
// Base::Console().message("GO::findCentroid() - 1\n");
Base::Vector3d origin(0.0, 0.0, 0.0);
gp_Ax2 viewAxis = getViewAxis(origin, direction);
return findCentroid(shape, viewAxis);
@@ -189,7 +189,7 @@ gp_Pnt ShapeUtils::findCentroid(const TopoDS_Shape& shape, const Base::Vector3d&
//! Returns the centroid of shape, as viewed according to direction
gp_Pnt ShapeUtils::findCentroid(const TopoDS_Shape& shape, const gp_Ax2& viewAxis)
{
// Base::Console().Message("GO::findCentroid() - 2\n");
// Base::Console().message("GO::findCentroid() - 2\n");
gp_Trsf tempTransform;
tempTransform.SetTransformation(viewAxis);
@@ -212,14 +212,14 @@ gp_Pnt ShapeUtils::findCentroid(const TopoDS_Shape& shape, const gp_Ax2& viewAxi
Base::Vector3d ShapeUtils::findCentroidVec(const TopoDS_Shape& shape, const Base::Vector3d& direction)
{
// Base::Console().Message("GO::findCentroidVec() - 1\n");
// Base::Console().message("GO::findCentroidVec() - 1\n");
gp_Pnt p = ShapeUtils::findCentroid(shape, direction);
return Base::Vector3d(p.X(), p.Y(), p.Z());
}
Base::Vector3d ShapeUtils::findCentroidVec(const TopoDS_Shape& shape, const gp_Ax2& cs)
{
// Base::Console().Message("GO::findCentroidVec() - 2\n");
// Base::Console().message("GO::findCentroidVec() - 2\n");
gp_Pnt p = ShapeUtils::findCentroid(shape, cs);
return Base::Vector3d(p.X(), p.Y(), p.Z());
}