#include <GeometryObject.h>
Public Member Functions | |
int | addCenterLine (TechDraw::BaseGeomPtr bg, std::string tag) |
int | addCosmeticEdge (Base::Vector3d start, Base::Vector3d end) |
int | addCosmeticEdge (Base::Vector3d start, Base::Vector3d end, std::string tagString) |
int | addCosmeticEdge (CosmeticEdge *ce) |
int | addCosmeticEdge (TechDraw::BaseGeomPtr base, std::string tagString) |
int | addCosmeticVertex (Base::Vector3d pos) |
int | addCosmeticVertex (Base::Vector3d pos, std::string tagString) |
int | addCosmeticVertex (CosmeticVertex *cv) |
void | addEdge (TechDraw::BaseGeomPtr bg) |
void | addFaceGeom (FacePtr f) |
add a Face to Face Geometry More... | |
void | addVertex (TechDraw::VertexPtr v) |
Base::BoundBox3d | calcBoundingBox () const |
Returns 2D bounding box. More... | |
void | clear () |
void | clearFaceGeom () |
empty Face geometry More... | |
void | extractGeometry (edgeClass category, bool visible) |
add edges meeting filter criteria for category, visibility More... | |
GeometryObject (const std::string &parent, TechDraw::DrawView *parentObj) | |
Constructor. More... | |
const BaseGeomPtrVector & | getEdgeGeometry () const |
const std::vector< FacePtr > & | getFaceGeometry () const |
double | getFocus (void) |
TopoDS_Shape | getHidHard (void) |
TopoDS_Shape | getHidIso (void) |
TopoDS_Shape | getHidOutline (void) |
TopoDS_Shape | getHidSeam (void) |
TopoDS_Shape | getHidSmooth (void) |
const std::vector< VertexPtr > & | getVertexGeometry () const |
TopoDS_Shape | getVisHard (void) |
const BaseGeomPtrVector | getVisibleFaceEdges (bool smooth, bool seam) const |
TopoDS_Shape | getVisIso (void) |
TopoDS_Shape | getVisOutline (void) |
TopoDS_Shape | getVisSeam (void) |
TopoDS_Shape | getVisSmooth (void) |
void | isPerspective (bool b) |
bool | isPerspective (void) |
TopoDS_Shape | projectFace (const TopoDS_Shape &face, const gp_Ax2 &CS) |
void | projectShape (const TopoDS_Shape &input, const gp_Ax2 &viewAxis) |
set up a hidden line remover and project a shape with it More... | |
void | projectShapeWithPolygonAlgo (const TopoDS_Shape &input, const gp_Ax2 &viewAxis) |
set up a hidden line remover and project a shape with it More... | |
void | pruneVertexGeom (Base::Vector3d center, double radius) |
void | setEdgeGeometry (BaseGeomPtrVector newGeoms) |
void | setFocus (double f) |
void | setIsoCount (int i) |
void | setParentName (std::string n) |
void | setVertexGeometry (std::vector< VertexPtr > newVerts) |
void | usePolygonHLR (bool b) |
bool | usePolygonHLR (void) const |
virtual | ~GeometryObject () |
Static Public Member Functions | |
static TopoDS_Shape | invertGeometry (const TopoDS_Shape s) |
Protected Member Functions | |
void | addGeomFromCompound (TopoDS_Shape edgeCompound, edgeClass category, bool visible) |
update edgeGeom and vertexGeom from Compound of edges More... | |
bool | findVertex (Base::Vector3d v) |
does this GeometryObject already have this vertex More... | |
TechDraw::DrawViewDetail * | isParentDetail (void) |
bool | isWithinArc (double theta, double first, double last, bool cw) const |
Protected Attributes | |
BaseGeomPtrVector | edgeGeom |
std::vector< FacePtr > | faceGeom |
TopoDS_Shape | hidHard |
TopoDS_Shape | hidIso |
TopoDS_Shape | hidOutline |
TopoDS_Shape | hidSeam |
TopoDS_Shape | hidSmooth |
double | m_focus |
int | m_isoCount |
bool | m_isPersp |
TechDraw::DrawView * | m_parent |
std::string | m_parentName |
bool | m_usePolygonHLR |
std::vector< VertexPtr > | vertexGeom |
TopoDS_Shape | visHard |
TopoDS_Shape | visIso |
TopoDS_Shape | visOutline |
TopoDS_Shape | visSeam |
TopoDS_Shape | visSmooth |
GeometryObject::GeometryObject | ( | const std::string & | parent, |
TechDraw::DrawView * | parentObj | ||
) |
Constructor.
|
virtual |
References clear().
int GeometryObject::addCenterLine | ( | TechDraw::BaseGeomPtr | bg, |
std::string | tag | ||
) |
References edgeGeom.
Referenced by TechDraw::DrawViewPart::add1CLToGE(), and TechDraw::DrawViewPart::addCenterLinesToGeom().
int GeometryObject::addCosmeticEdge | ( | Base::Vector3d | start, |
Base::Vector3d | end | ||
) |
References TechDraw::BaseGeom::baseFactory(), and edgeGeom.
int GeometryObject::addCosmeticEdge | ( | Base::Vector3d | start, |
Base::Vector3d | end, | ||
std::string | tagString | ||
) |
References TechDraw::BaseGeom::baseFactory(), and edgeGeom.
int GeometryObject::addCosmeticEdge | ( | CosmeticEdge * | ce | ) |
int GeometryObject::addCosmeticEdge | ( | TechDraw::BaseGeomPtr | base, |
std::string | tagString | ||
) |
References edgeGeom.
int GeometryObject::addCosmeticVertex | ( | Base::Vector3d | pos | ) |
References Base::Console(), Base::ConsoleSingleton::Message(), and vertexGeom.
int GeometryObject::addCosmeticVertex | ( | Base::Vector3d | pos, |
std::string | tagString | ||
) |
References vertexGeom.
int GeometryObject::addCosmeticVertex | ( | CosmeticVertex * | cv | ) |
void GeometryObject::addEdge | ( | TechDraw::BaseGeomPtr | bg | ) |
References edgeGeom.
Referenced by PathScripts.PathDressupHoldingTags.MapWireToTag::add().
void GeometryObject::addFaceGeom | ( | FacePtr | f | ) |
References faceGeom.
Referenced by TechDraw::DrawViewPart::extractFaces().
|
protected |
update edgeGeom and vertexGeom from Compound of edges
References TechDraw::BaseGeom::baseFactory(), Base::Console(), edgeGeom, TechDraw::DrawUtil::isCrazy(), TechDraw::DrawUtil::isZeroEdge(), Base::ConsoleSingleton::Log(), and vertexGeom.
Referenced by extractGeometry().
void GeometryObject::addVertex | ( | TechDraw::VertexPtr | v | ) |
References vertexGeom.
Referenced by TechDraw::DrawViewPart::addShapes2d().
Base::BoundBox3d GeometryObject::calcBoundingBox | ( | ) | const |
Returns 2D bounding box.
References Base::Console(), edgeGeom, and Base::ConsoleSingleton::Log().
Referenced by TechDraw::DrawViewPart::buildGeometryObject().
void GeometryObject::clear | ( | void | ) |
References edgeGeom, faceGeom, and vertexGeom.
Referenced by projectShape(), projectShapeWithPolygonAlgo(), and ~GeometryObject().
void GeometryObject::clearFaceGeom | ( | ) |
add edges meeting filter criteria for category, visibility
References addGeomFromCompound(), Base::Console(), TechDraw::ecHARD, TechDraw::ecOUTLINE, TechDraw::ecSEAM, TechDraw::ecSMOOTH, TechDraw::ecUVISO, hidHard, hidIso, hidOutline, hidSeam, hidSmooth, visHard, visIso, visOutline, visSeam, visSmooth, and Base::ConsoleSingleton::Warning().
Referenced by TechDraw::DrawProjectSplit::buildGeometryObject(), and TechDraw::DrawViewPart::buildGeometryObject().
|
protected |
does this GeometryObject already have this vertex
References DraftVecUtils::dist(), and vertexGeom.
const BaseGeomPtrVector & TechDraw::GeometryObject::getEdgeGeometry | ( | ) | const |
const std::vector< FacePtr > & TechDraw::GeometryObject::getFaceGeometry | ( | ) | const |
Referenced by TechDraw::DrawViewPart::getFaceGeometry().
double TechDraw::GeometryObject::getFocus | ( | void | ) |
TopoDS_Shape TechDraw::GeometryObject::getHidHard | ( | void | ) |
TopoDS_Shape TechDraw::GeometryObject::getHidIso | ( | void | ) |
TopoDS_Shape TechDraw::GeometryObject::getHidOutline | ( | void | ) |
TopoDS_Shape TechDraw::GeometryObject::getHidSeam | ( | void | ) |
TopoDS_Shape TechDraw::GeometryObject::getHidSmooth | ( | void | ) |
const std::vector< VertexPtr > & TechDraw::GeometryObject::getVertexGeometry | ( | ) | const |
Referenced by TechDraw::DrawViewPart::getVertexGeometry(), and pruneVertexGeom().
TopoDS_Shape TechDraw::GeometryObject::getVisHard | ( | void | ) |
const BaseGeomPtrVector GeometryObject::getVisibleFaceEdges | ( | bool | smooth, |
bool | seam | ||
) | const |
TopoDS_Shape TechDraw::GeometryObject::getVisIso | ( | void | ) |
TopoDS_Shape TechDraw::GeometryObject::getVisOutline | ( | void | ) |
TopoDS_Shape TechDraw::GeometryObject::getVisSeam | ( | void | ) |
TopoDS_Shape TechDraw::GeometryObject::getVisSmooth | ( | void | ) |
|
static |
|
protected |
References m_parent.
void TechDraw::GeometryObject::isPerspective | ( | bool | b | ) |
Referenced by TechDraw::DrawViewPart::buildGeometryObject().
bool TechDraw::GeometryObject::isPerspective | ( | void | ) |
|
protected |
Returns true iff angle theta is in [first, last], where the arc goes clockwise (cw=true) or counterclockwise (cw=false) from first to last.
TopoDS_Shape GeometryObject::projectFace | ( | const TopoDS_Shape & | face, |
const gp_Ax2 & | CS | ||
) |
References invertGeometry().
Referenced by ArchVRM.Renderer::reorient().
void GeometryObject::projectShape | ( | const TopoDS_Shape & | input, |
const gp_Ax2 & | viewAxis | ||
) |
set up a hidden line remover and project a shape with it
References clear(), Base::Console(), Base::ConsoleSingleton::Error(), hidHard, hidIso, hidOutline, hidSeam, hidSmooth, invertGeometry(), Base::ConsoleSingleton::Log(), m_focus, m_isoCount, m_isPersp, m_parentName, visHard, visIso, visOutline, visSeam, and visSmooth.
Referenced by TechDraw::DrawProjectSplit::buildGeometryObject(), and TechDraw::DrawViewPart::buildGeometryObject().
void GeometryObject::projectShapeWithPolygonAlgo | ( | const TopoDS_Shape & | input, |
const gp_Ax2 & | viewAxis | ||
) |
set up a hidden line remover and project a shape with it
References clear(), Base::Console(), Base::ConsoleSingleton::Error(), TechDraw::findCentroid(), hidHard, hidOutline, hidSeam, hidSmooth, invertGeometry(), Base::ConsoleSingleton::Log(), m_focus, m_isPersp, m_parentName, TechDraw::moveShape(), visHard, visOutline, visSeam, and visSmooth.
Referenced by TechDraw::DrawProjectSplit::buildGeometryObject(), and TechDraw::DrawViewPart::buildGeometryObject().
void GeometryObject::pruneVertexGeom | ( | Base::Vector3d | center, |
double | radius | ||
) |
References getVertexGeometry(), and vertexGeom.
Referenced by TechDraw::DrawViewDetail::detailExec().
void TechDraw::GeometryObject::setEdgeGeometry | ( | BaseGeomPtrVector | newGeoms | ) |
Referenced by TechDraw::DrawViewPart::refreshCEGeoms(), and TechDraw::DrawViewPart::refreshCLGeoms().
void TechDraw::GeometryObject::setFocus | ( | double | f | ) |
void TechDraw::GeometryObject::setIsoCount | ( | int | i | ) |
Referenced by TechDraw::DrawViewPart::buildGeometryObject().
void TechDraw::GeometryObject::setParentName | ( | std::string | n | ) |
void TechDraw::GeometryObject::setVertexGeometry | ( | std::vector< VertexPtr > | newVerts | ) |
void TechDraw::GeometryObject::usePolygonHLR | ( | bool | b | ) |
bool TechDraw::GeometryObject::usePolygonHLR | ( | void | ) | const |
|
protected |
Referenced by addCenterLine(), addCosmeticEdge(), addEdge(), addGeomFromCompound(), calcBoundingBox(), clear(), and getVisibleFaceEdges().
|
protected |
Referenced by addFaceGeom(), clear(), and clearFaceGeom().
|
protected |
Referenced by extractGeometry(), projectShape(), and projectShapeWithPolygonAlgo().
|
protected |
Referenced by extractGeometry(), and projectShape().
|
protected |
Referenced by extractGeometry(), projectShape(), and projectShapeWithPolygonAlgo().
|
protected |
Referenced by extractGeometry(), projectShape(), and projectShapeWithPolygonAlgo().
|
protected |
Referenced by extractGeometry(), projectShape(), and projectShapeWithPolygonAlgo().
|
protected |
Referenced by projectShape(), and projectShapeWithPolygonAlgo().
|
protected |
Referenced by projectShape().
|
protected |
Referenced by projectShape(), and projectShapeWithPolygonAlgo().
|
protected |
Referenced by addCosmeticEdge(), addCosmeticVertex(), and isParentDetail().
|
protected |
Referenced by projectShape(), and projectShapeWithPolygonAlgo().
|
protected |
|
protected |
Referenced by addCosmeticVertex(), addGeomFromCompound(), addVertex(), clear(), findVertex(), and pruneVertexGeom().
|
protected |
Referenced by extractGeometry(), projectShape(), and projectShapeWithPolygonAlgo().
|
protected |
Referenced by extractGeometry(), and projectShape().
|
protected |
Referenced by extractGeometry(), projectShape(), and projectShapeWithPolygonAlgo().
|
protected |
Referenced by extractGeometry(), projectShape(), and projectShapeWithPolygonAlgo().
|
protected |
Referenced by extractGeometry(), projectShape(), and projectShapeWithPolygonAlgo().