The representation for a CAD Shape. More...
#include <TopoShape.h>
Public Member Functions | |
unsigned long | countSubShapes (const char *Type) const |
PyObject * | getPySubShape (const char *Type) const |
get the Topo"sub"Shape with the given name | |
TopoDS_Shape | getSubShape (const char *Type) const |
get the Topo"sub"Shape with the given name | |
virtual Base::Type | getTypeId (void) const |
void | operator= (const TopoShape &) |
TopoShape (const TopoShape &) | |
TopoShape (const TopoDS_Shape &) | |
TopoShape () | |
~TopoShape () | |
Query | |
bool | analyze (std::ostream &) const |
bool | isClosed () const |
bool | isNull () const |
bool | isValid () const |
Boolean operation | |
TopoDS_Shape | common (TopoDS_Shape) const |
TopoDS_Shape | cut (TopoDS_Shape) const |
TopoDS_Shape | fuse (TopoDS_Shape) const |
TopoDS_Shape | oldFuse (TopoDS_Shape) const |
TopoDS_Shape | section (TopoDS_Shape) const |
std::list< TopoDS_Wire > | slice (const Base::Vector3d &, double) const |
TopoDS_Compound | slices (const Base::Vector3d &, const std::vector< double > &) const |
Subelement management | |
virtual unsigned long | countSubElements (const char *Type) const |
virtual std::vector< const char * > | getElementTypes (void) const |
Sub type list List of different subelement types it is NOT a list of the subelements itself. | |
virtual void | getFacesFromSubelement (const Data::Segment *, std::vector< Base::Vector3d > &Points, std::vector< Base::Vector3d > &PointNormals, std::vector< Facet > &faces) const |
Get faces from segment. | |
virtual void | getLinesFromSubelement (const Data::Segment *, std::vector< Base::Vector3d > &Points, std::vector< Line > &lines) const |
Get lines from segment. | |
virtual Data::Segment * | getSubElement (const char *Type, unsigned long) const |
get the subelement by type and number | |
Input/Output | |
void | exportBrep (const char *FileName) const |
void | exportFaceSet (double, double, std::ostream &) const |
void | exportIges (const char *FileName) const |
void | exportLineSet (std::ostream &) const |
void | exportStep (const char *FileName) const |
void | exportStl (const char *FileName) const |
void | importBrep (const char *FileName) |
void | importIges (const char *FileName) |
void | importStep (const char *FileName) |
void | read (const char *FileName) |
void | write (const char *FileName) const |
Manipulation | |
bool | fix (double, double, double) |
TopoDS_Shape | mirror (const gp_Ax2 &) const |
bool | removeInternalWires (double) |
TopoDS_Shape | removeShape (const std::vector< TopoDS_Shape > &s) const |
TopoDS_Shape | replaceShape (const std::vector< std::pair< TopoDS_Shape, TopoDS_Shape > > &s) const |
void | sewShape () |
TopoDS_Shape | toNurbs () const |
void | transformGeometry (const Base::Matrix4D &rclMat) |
Applies a transformation on the real geometric data type. | |
TopoDS_Shape | transformGShape (const Base::Matrix4D &) const |
void | transformShape (const Base::Matrix4D &) |
Placement control | |
Base::BoundBox3d | getBoundBox (void) const |
Bound box from the CasCade shape. | |
Base::Matrix4D | getTransform (void) const |
get the transformation of the CasCade Shape | |
void | setTransform (const Base::Matrix4D &rclTrf) |
set the transformation of the CasCade Shape | |
Getting basic geometric entities | |
void | getFaces (std::vector< Base::Vector3d > &Points, std::vector< Facet > &faces, float Accuracy, uint16_t flags=0) const |
Get faces from object with given accuracy. | |
void | setFaces (const std::vector< Base::Vector3d > &Points, const std::vector< Facet > &faces, float Accuracy=1.0e-06) |
Save/restore | |
unsigned int | getMemSize (void) const |
This method is used to get the size of objects It is not meant to have the exact size, it is more or less an estimation which runs fast! Is it two bytes or a GB? | |
void | Restore (Base::XMLReader &reader) |
This method is used to restore properties from an XML document. | |
void | RestoreDocFile (Base::Reader &reader) |
This method is used to restore large amounts of data from a file In this method you simply stream in your with SaveDocFile() saved data. | |
void | Save (Base::Writer &writer) const |
This method is used to save properties to an XML document. | |
void | SaveDocFile (Base::Writer &writer) const |
This method is used to save large amounts of data to a binary file. | |
TopoDS_Shape | makeHelix (Standard_Real pitch, Standard_Real height, Standard_Real radius, Standard_Real angle=0) const |
TopoDS_Shape | makeLoft (const TopTools_ListOfShape &profiles, Standard_Boolean isSolid, Standard_Boolean isRuled) const |
TopoDS_Shape | makeOffset (double offset, double tol, bool intersection=false, bool selfInter=false, short offsetMode=0, short join=0) |
TopoDS_Shape | makePipe (const TopoDS_Shape &profile) const |
Sweeping. | |
TopoDS_Shape | makePipeShell (const TopTools_ListOfShape &profiles, const Standard_Boolean make_solid, const Standard_Boolean isFrenet=Standard_False) const |
TopoDS_Shape | makePrism (const gp_Vec &) const |
TopoDS_Shape | makeSweep (const TopoDS_Shape &profile, double, int) const |
TopoDS_Shape | makeThickSolid (const TopTools_ListOfShape &remFace, Standard_Real offset, Standard_Real tolerance) const |
TopoDS_Shape | makeTube () const |
TopoDS_Shape | makeTube (double radius, double tol) const |
TopoDS_Shape | revolve (const gp_Ax1 &, double d) const |
Static Public Member Functions | |
static void * | create (void) |
static Base::Type | getClassTypeId (void) |
static void | init (void) |
Public Attributes | |
TopoDS_Shape | _Shape |
The representation for a CAD Shape.
Definition at line 95 of file TopoShape.h.
TopoShape::TopoShape | ( | ) |
Definition at line 194 of file TopoShape.cpp.
Referenced by getPySubShape().
TopoShape::TopoShape | ( | const TopoDS_Shape & | shape | ) |
Definition at line 202 of file TopoShape.cpp.
TopoShape::TopoShape | ( | const TopoShape & | shape | ) |
Definition at line 207 of file TopoShape.cpp.
TopoShape::~TopoShape | ( | ) |
Definition at line 198 of file TopoShape.cpp.
bool TopoShape::analyze | ( | std::ostream & | str | ) | const |
Definition at line 1031 of file TopoShape.cpp.
References _Shape, and result.
Referenced by Part::TopoShapePy::check().
TopoDS_Shape TopoShape::common | ( | TopoDS_Shape | shape | ) | const |
Definition at line 1220 of file TopoShape.cpp.
References _Shape.
Referenced by Part::TopoShapePy::common().
unsigned long TopoShape::countSubElements | ( | const char * | Type | ) | const [virtual] |
Implements Data::ComplexGeoData.
Definition at line 222 of file TopoShape.cpp.
References countSubShapes().
unsigned long TopoShape::countSubShapes | ( | const char * | Type | ) | const |
void * Part::TopoShape::create | ( | void | ) | [static] |
Reimplemented from Data::ComplexGeoData.
Definition at line 192 of file TopoShape.cpp.
TopoDS_Shape TopoShape::cut | ( | TopoDS_Shape | shape | ) | const |
Definition at line 1214 of file TopoShape.cpp.
References _Shape.
Referenced by Part::TopoShapePy::cut().
void TopoShape::exportBrep | ( | const char * | FileName | ) | const |
Definition at line 676 of file TopoShape.cpp.
References _Shape.
Referenced by Part::TopoShapePy::exportBrep(), and write().
void TopoShape::exportFaceSet | ( | double | dev, | |
double | ca, | |||
std::ostream & | str | |||
) | const |
Definition at line 690 of file TopoShape.cpp.
References _Shape, Base::InventorBuilder::addIndexedFaceSet(), and Handle().
Referenced by Part::TopoShapePy::writeInventor().
void TopoShape::exportIges | ( | const char * | FileName | ) | const |
Definition at line 626 of file TopoShape.cpp.
References _Shape, and Handle().
Referenced by Part::TopoShapePy::exportIges(), and write().
void TopoShape::exportLineSet | ( | std::ostream & | str | ) | const |
Definition at line 764 of file TopoShape.cpp.
References _Shape, Base::InventorBuilder::addLineSet(), Handle(), and RobotExample::pos.
Referenced by Part::TopoShapePy::writeInventor().
void TopoShape::exportStep | ( | const char * | FileName | ) | const |
Definition at line 645 of file TopoShape.cpp.
References Handle().
Referenced by Part::TopoShapePy::exportStep(), and write().
void TopoShape::exportStl | ( | const char * | FileName | ) | const |
Definition at line 682 of file TopoShape.cpp.
References _Shape.
Referenced by Part::TopoShapePy::exportStl(), and write().
bool TopoShape::fix | ( | double | precision, | |
double | mintol, | |||
double | maxtol | |||
) |
Definition at line 1671 of file TopoShape.cpp.
References _Shape, isValid(), and Py::type().
Referenced by removeInternalWires().
TopoDS_Shape TopoShape::fuse | ( | TopoDS_Shape | shape | ) | const |
Definition at line 1226 of file TopoShape.cpp.
References _Shape.
Referenced by Part::FeatureGeometrySet::execute(), Part::TopoShapePy::fuse(), Part::TopoShapePy::PyInit(), and Sketcher::Sketch::toShape().
Base::BoundBox3d TopoShape::getBoundBox | ( | void | ) | const [virtual] |
Bound box from the CasCade shape.
Implements Data::ComplexGeoData.
Definition at line 844 of file TopoShape.cpp.
References _Shape, KDL::Add(), Base::BoundBox3< _Precision >::MaxX, Base::BoundBox3< _Precision >::MaxY, Base::BoundBox3< _Precision >::MaxZ, Base::BoundBox3< _Precision >::MinX, Base::BoundBox3< _Precision >::MinY, and Base::BoundBox3< _Precision >::MinZ.
Referenced by Inspection::InspectActualShape::InspectActualShape().
Base::Type Part::TopoShape::getClassTypeId | ( | void | ) | [static] |
Reimplemented from Data::ComplexGeoData.
Definition at line 192 of file TopoShape.cpp.
Referenced by getFacesFromSubelement().
std::vector< const char * > TopoShape::getElementTypes | ( | void | ) | const [virtual] |
Sub type list List of different subelement types it is NOT a list of the subelements itself.
Implements Data::ComplexGeoData.
Definition at line 212 of file TopoShape.cpp.
void TopoShape::getFaces | ( | std::vector< Base::Vector3d > & | Points, | |
std::vector< Facet > & | faces, | |||
float | Accuracy, | |||
uint16_t | flags = 0 | |||
) | const [virtual] |
Get faces from object with given accuracy.
Reimplemented from Data::ComplexGeoData.
Definition at line 1762 of file TopoShape.cpp.
References _Shape, Handle(), Part::MeshVertex::i, Data::ComplexGeoData::Facet::I1, Data::ComplexGeoData::Facet::I2, Data::ComplexGeoData::Facet::I3, draftTools::p, boost::numeric::bindings::atlas::swap(), and draftlibs::fcgeo::v1().
Referenced by Part::PropertyPartShape::getFaces(), Inspection::InspectActualShape::InspectActualShape(), and Part::TopoShapePy::tessellate().
void TopoShape::getFacesFromSubelement | ( | const Data::Segment * | element, | |
std::vector< Base::Vector3d > & | Points, | |||
std::vector< Base::Vector3d > & | PointNormals, | |||
std::vector< Facet > & | faces | |||
) | const [virtual] |
Get faces from segment.
Reimplemented from Data::ComplexGeoData.
Definition at line 241 of file TopoShape.cpp.
References getClassTypeId(), Data::Segment::getTypeId(), Handle(), Base::Vector3< _Precision >::Normalize(), DrawingExample::Shape, and draftlibs::fcgeo::v1().
void TopoShape::getLinesFromSubelement | ( | const Data::Segment * | element, | |
std::vector< Base::Vector3d > & | Points, | |||
std::vector< Line > & | lines | |||
) | const [virtual] |
Get lines from segment.
Reimplemented from Data::ComplexGeoData.
Definition at line 235 of file TopoShape.cpp.
unsigned int TopoShape::getMemSize | ( | void | ) | const [virtual] |
This method is used to get the size of objects It is not meant to have the exact size, it is more or less an estimation which runs fast! Is it two bytes or a GB?
Implements Base::Persistence.
Definition at line 896 of file TopoShape.cpp.
References _Shape, Handle(), and TopoShape_RefCountShapes().
Referenced by Part::PropertyPartShape::getMemSize().
PyObject * TopoShape::getPySubShape | ( | const char * | Type | ) | const |
get the Topo"sub"Shape with the given name
Definition at line 400 of file TopoShape.cpp.
References getSubShape(), DrawingExample::Shape, and TopoShape().
Referenced by Part::Feature::getPySubObjects().
Data::Segment * TopoShape::getSubElement | ( | const char * | Type, | |
unsigned long | n | |||
) | const [virtual] |
get the subelement by type and number
Implements Data::ComplexGeoData.
Definition at line 227 of file TopoShape.cpp.
References getSubShape().
TopoDS_Shape TopoShape::getSubShape | ( | const char * | Type | ) | const |
get the Topo"sub"Shape with the given name
Definition at line 352 of file TopoShape.cpp.
References _Shape.
Referenced by CmdSketcherMapSketch::activated(), CmdSketcherNewSketch::activated(), CmdPartRuledSurface::activated(), Part::RuledSurface::execute(), PartDesign::Fillet::execute(), Robot::Edge2TracObject::execute(), getPySubShape(), and getSubElement().
Base::Matrix4D TopoShape::getTransform | ( | void | ) | const [virtual] |
get the transformation of the CasCade Shape
Implements Data::ComplexGeoData.
Definition at line 435 of file TopoShape.cpp.
References _Shape, FemExample::m, draftTools::p, and scale.
Referenced by Part::Feature::onChanged().
Base::Type Part::TopoShape::getTypeId | ( | void | ) | const [virtual] |
Reimplemented from Data::ComplexGeoData.
Definition at line 192 of file TopoShape.cpp.
void TopoShape::importBrep | ( | const char * | FileName | ) |
Definition at line 579 of file TopoShape.cpp.
References _Shape, and Handle().
Referenced by Part::ImportBrep::execute(), and read().
void TopoShape::importIges | ( | const char * | FileName | ) |
Example code to get the labels for each face in an IGES file.
#include <Handle_XSControl_WorkSession.hxx> #include <Handle_XSControl_TransferReader.hxx> #include <XSControl_WorkSession.hxx> #include <XSControl_TransferReader.hxx> #include <Handle_IGESData_IGESModel.hxx> #include <IGESData_IGESModel.hxx> #include <IGESData_IGESEntity.hxx> IGESControl_Reader aReader; ... // Gets the labels of all face items if defined in the IGES file Handle_XSControl_WorkSession ws = aReader.WS(); Handle_XSControl_TransferReader tr = ws->TransferReader(); std::string name; Handle(IGESData_IGESModel) aModel = aReader.IGESModel(); Standard_Integer all = aModel->NbEntities(); TopExp_Explorer ex; for (ex.Init(this->_Shape, TopAbs_FACE); ex.More(); ex.Next()) { const TopoDS_Face& aFace = TopoDS::Face(ex.Current()); Handle_Standard_Transient ent = tr->EntityFromShapeResult(aFace, 1); if (!ent.IsNull()) { int i = aModel->Number(ent); if (i > 0) { Handle_IGESData_IGESEntity ie = aModel->Entity(i); if (ie->HasShortLabel()) name = ie->ShortLabel()->ToCString(); } } }
Definition at line 526 of file TopoShape.cpp.
References _Shape, and Handle().
Referenced by Part::ImportIges::execute(), and read().
void TopoShape::importStep | ( | const char * | FileName | ) |
Definition at line 555 of file TopoShape.cpp.
References _Shape, and Handle().
Referenced by Part::ImportStep::execute(), and read().
void Part::TopoShape::init | ( | void | ) | [static] |
Reimplemented from Data::ComplexGeoData.
Definition at line 192 of file TopoShape.cpp.
Referenced by initPart().
bool TopoShape::isClosed | ( | ) | const |
Definition at line 1209 of file TopoShape.cpp.
References _Shape.
bool TopoShape::isNull | ( | void | ) | const |
Definition at line 1020 of file TopoShape.cpp.
References _Shape.
Referenced by Part::TopoShapePy::isNull().
bool TopoShape::isValid | ( | void | ) | const |
TopoDS_Shape TopoShape::makeHelix | ( | Standard_Real | pitch, | |
Standard_Real | height, | |||
Standard_Real | radius, | |||
Standard_Real | angle = 0 | |||
) | const |
Definition at line 1447 of file TopoShape.cpp.
References Sketcher::end, Handle(), KDL::PI, KDL::sqrt(), and Base::toRadians().
Referenced by Part::Helix::execute(), and makeHelix().
TopoDS_Shape TopoShape::makeLoft | ( | const TopTools_ListOfShape & | profiles, | |
Standard_Boolean | isSolid, | |||
Standard_Boolean | isRuled | |||
) | const |
Definition at line 1486 of file TopoShape.cpp.
Referenced by Part::Loft::execute(), and makeLoft().
TopoDS_Shape TopoShape::makeOffset | ( | double | offset, | |
double | tol, | |||
bool | intersection = false , |
|||
bool | selfInter = false , |
|||
short | offsetMode = 0 , |
|||
short | join = 0 | |||
) |
Definition at line 1540 of file TopoShape.cpp.
References _Shape.
Referenced by Part::TopoShapePy::makeOffsetShape().
TopoDS_Shape TopoShape::makePipe | ( | const TopoDS_Shape & | profile | ) | const |
Sweeping.
Definition at line 1274 of file TopoShape.cpp.
References _Shape.
Referenced by Part::TopoShapeWirePy::makePipe().
TopoDS_Shape TopoShape::makePipeShell | ( | const TopTools_ListOfShape & | profiles, | |
const Standard_Boolean | make_solid, | |||
const Standard_Boolean | isFrenet = Standard_False | |||
) | const |
Definition at line 1286 of file TopoShape.cpp.
References _Shape.
Referenced by Part::TopoShapeWirePy::makePipeShell().
TopoDS_Shape TopoShape::makePrism | ( | const gp_Vec & | vec | ) | const |
Definition at line 1519 of file TopoShape.cpp.
References _Shape.
Referenced by Part::Extrusion::execute(), and Part::TopoShapePy::extrude().
TopoDS_Shape TopoShape::makeSweep | ( | const TopoDS_Shape & | profile, | |
double | tol, | |||
int | fillMode | |||
) | const |
TopoDS_Shape TopoShape::makeThickSolid | ( | const TopTools_ListOfShape & | remFace, | |
Standard_Real | offset, | |||
Standard_Real | tolerance | |||
) | const |
Definition at line 1533 of file TopoShape.cpp.
References _Shape.
Referenced by Part::TopoShapePy::makeThickness().
TopoDS_Shape TopoShape::makeTube | ( | ) | const |
Definition at line 1353 of file TopoShape.cpp.
References _Shape, Handle(), and draftlibs::fcgeo::v1().
TopoDS_Shape TopoShape::makeTube | ( | double | radius, | |
double | tol | |||
) | const |
Definition at line 1310 of file TopoShape.cpp.
References _Shape, and draftlibs::fcgeo::v1().
Referenced by makeTube().
TopoDS_Shape TopoShape::mirror | ( | const gp_Ax2 & | ax2 | ) | const |
Definition at line 1625 of file TopoShape.cpp.
References _Shape.
Referenced by Part::Mirroring::execute(), and Part::TopoShapePy::mirror().
TopoDS_Shape TopoShape::oldFuse | ( | TopoDS_Shape | shape | ) | const |
Definition at line 1232 of file TopoShape.cpp.
References _Shape.
Referenced by Part::TopoShapePy::oldFuse().
void TopoShape::operator= | ( | const TopoShape & | sh | ) |
void TopoShape::read | ( | const char * | FileName | ) |
Definition at line 465 of file TopoShape.cpp.
References Base::FileInfo::filePath(), Base::FileInfo::hasExtension(), importBrep(), importIges(), importStep(), and Base::FileInfo::isReadable().
Referenced by Part::CurveNet::execute(), insert(), open(), Part::TopoShapePy::read(), and read().
bool TopoShape::removeInternalWires | ( | double | minArea | ) |
Definition at line 1711 of file TopoShape.cpp.
Referenced by Part::TopoShapePy::removeInternalWires().
TopoDS_Shape TopoShape::removeShape | ( | const std::vector< TopoDS_Shape > & | s | ) | const |
Definition at line 1651 of file TopoShape.cpp.
References _Shape.
Referenced by Part::TopoShapePy::removeShape().
TopoDS_Shape TopoShape::replaceShape | ( | const std::vector< std::pair< TopoDS_Shape, TopoDS_Shape > > & | s | ) | const |
Definition at line 1642 of file TopoShape.cpp.
References _Shape.
Referenced by Part::TopoShapePy::replaceShape().
void TopoShape::Restore | ( | Base::XMLReader & | ) | [virtual] |
This method is used to restore properties from an XML document.
It uses the XMLReader class, which bases on SAX, to read the in Save() written information. Again the Vector as an example:
void PropertyVector::Restore(Base::XMLReader &reader) { // read my Element reader.readElement("PropertyVector"); // get the value of my Attribute _cVec.x = (float)reader.getAttributeAsFloat("valueX"); _cVec.y = (float)reader.getAttributeAsFloat("valueY"); _cVec.z = (float)reader.getAttributeAsFloat("valueZ"); }
Implements Base::Persistence.
Definition at line 872 of file TopoShape.cpp.
void TopoShape::RestoreDocFile | ( | Base::Reader & | ) | [virtual] |
This method is used to restore large amounts of data from a file In this method you simply stream in your with SaveDocFile() saved data.
Again you have to apply for the call of this method in the Restore() call:
void PropertyMeshKernel::Restore(Base::XMLReader &reader) { reader.readElement("Mesh"); std::string file (reader.getAttribute("file") ); if(file == "") { // read XML MeshCore::MeshDocXML restorer(*_pcMesh); restorer.Restore(reader); }else{ // initate a file read reader.addFile(file.c_str(),this); } }
After you issued the reader.addFile() your RestoreDocFile() is called:
void PropertyMeshKernel::RestoreDocFile(Base::Reader &reader) { _pcMesh->Read( reader ); }
Reimplemented from Base::Persistence.
Definition at line 880 of file TopoShape.cpp.
TopoDS_Shape TopoShape::revolve | ( | const gp_Ax1 & | axis, | |
double | d | |||
) | const |
Definition at line 1526 of file TopoShape.cpp.
References _Shape.
Referenced by Part::Revolution::execute(), and Part::TopoShapePy::revolve().
void TopoShape::Save | ( | Base::Writer & | ) | const [virtual] |
This method is used to save properties to an XML document.
A good example you'll find in PropertyStandard.cpp, e.g. the vector:
void PropertyVector::Save (Writer &writer) const { writer << writer.ind() << "<PropertyVector valueX=\"" << _cVec.x << "\" valueY=\"" << _cVec.y << "\" valueZ=\"" << _cVec.z <<"\"/>" << endl; }
The writer.ind() expression writes the indention, just for pretty printing of the XML. As you see, the writing of the XML document is not done with a DOM implementation because of performance reasons. Therefore the programmer has to take care that a valid XML document is written. This means closing tags and writing UTF-8.
Implements Base::Persistence.
Definition at line 868 of file TopoShape.cpp.
void TopoShape::SaveDocFile | ( | Base::Writer & | ) | const [virtual] |
This method is used to save large amounts of data to a binary file.
Sometimes it makes no sense to write property data as XML. In case the amount of data is too big or the data type has a more effective way to save itself. In this cases it is possible to write the data in a seperate file inside the document archive. In case you want do so you have to re-implement SaveDocFile(). First, you have to inform the framework in Save() that you want do so. Here an example from the Mesh module which can save a (pontetionaly big) triangle mesh:
void PropertyMeshKernel::Save (Base::Writer &writer) const { if (writer.isForceXML()) { writer << writer.ind() << "<Mesh>" << std::endl; MeshCore::MeshDocXML saver(*_pcMesh); saver.Save(writer); }else{ writer << writer.ind() << "<Mesh file=\"" << writer.addFile("MeshKernel.bms", this) << "\"/>" << std::endl; }
The writer.isForceXML() is an indication to force you to write XML. Regardless of size and effectivness. The second part informs the Base::writer through writer.addFile("MeshKernel.bms", this) that this object wants to write a file with the given name. The method addFile() returns a unique name that then is written in the XML stream. This allows your RestoreDocFile() method to identify and read the file again. Later your SaveDocFile() method is called as many times as you issued the addFile() call:
void PropertyMeshKernel::SaveDocFile (Base::Writer &writer) const { _pcMesh->Write( writer ); }
In this method you can simply stream your content to the file (Base::Writer inheriting from ostream).
Reimplemented from Base::Persistence.
Definition at line 876 of file TopoShape.cpp.
TopoDS_Shape TopoShape::section | ( | TopoDS_Shape | shape | ) | const |
Definition at line 1238 of file TopoShape.cpp.
References _Shape.
Referenced by Part::TopoShapePy::section().
void TopoShape::setFaces | ( | const std::vector< Base::Vector3d > & | Points, | |
const std::vector< Facet > & | faces, | |||
float | Accuracy = 1.0e-06 | |||
) |
Definition at line 1939 of file TopoShape.cpp.
References _Shape.
Referenced by Part::TopoShapePy::makeShapeFromMesh().
void TopoShape::setTransform | ( | const Base::Matrix4D & | rclTrf | ) | [virtual] |
set the transformation of the CasCade Shape
Implements Data::ComplexGeoData.
Definition at line 424 of file TopoShape.cpp.
References _Shape.
Referenced by Part::Feature::onChanged().
void TopoShape::sewShape | ( | ) |
Definition at line 1659 of file TopoShape.cpp.
References _Shape.
Referenced by Part::TopoShapePy::sewShape().
std::list< TopoDS_Wire > TopoShape::slice | ( | const Base::Vector3d & | dir, | |
double | d | |||
) | const |
Definition at line 1244 of file TopoShape.cpp.
References Part::CrossSection::section(), Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
Referenced by Part::TopoShapePy::slice().
TopoDS_Compound TopoShape::slices | ( | const Base::Vector3d & | dir, | |
const std::vector< double > & | d | |||
) | const |
Definition at line 1250 of file TopoShape.cpp.
References Part::CrossSection::section(), RobotExample::w, Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
Referenced by Part::TopoShapePy::slices().
TopoDS_Shape TopoShape::toNurbs | ( | ) | const |
Definition at line 1636 of file TopoShape.cpp.
References _Shape.
Referenced by Part::TopoShapePy::toNurbs().
void TopoShape::transformGeometry | ( | const Base::Matrix4D & | rclMat | ) | [virtual] |
Applies a transformation on the real geometric data type.
Implements Data::ComplexGeoData.
Definition at line 1550 of file TopoShape.cpp.
References _Shape, and transformGShape().
Referenced by Part::PropertyPartShape::transformGeometry().
TopoDS_Shape TopoShape::transformGShape | ( | const Base::Matrix4D & | rclTrf | ) | const |
Definition at line 1555 of file TopoShape.cpp.
References _Shape, and Base::Matrix4D::determinant().
Referenced by Part::TopoShapePy::transformGeometry(), and transformGeometry().
void TopoShape::transformShape | ( | const Base::Matrix4D & | rclTrf | ) |
Definition at line 1602 of file TopoShape.cpp.
References _Shape, and Base::Matrix4D::determinant().
Referenced by Part::TopoShapePy::transformShape().
void TopoShape::write | ( | const char * | FileName | ) | const |
Definition at line 602 of file TopoShape.cpp.
References exportBrep(), exportIges(), exportStep(), exportStl(), Base::FileInfo::filePath(), and Base::FileInfo::hasExtension().
Referenced by exporter().
TopoDS_Shape Part::TopoShape::_Shape |
Definition at line 232 of file TopoShape.h.
Referenced by CmdPartRuledSurface::activated(), Part::TopoShapeShellPy::add(), Part::TopoShapeCompSolidPy::add(), Part::TopoShapeCompoundPy::add(), analyze(), best_fit_coarse(), best_fit_complete(), best_fit_test(), cast_to_shape(), Part::TopoShapePy::common(), common(), Part::TopoShapePy::complement(), Part::TopoShapePy::copy(), Part::PropertyPartShape::Copy(), countSubShapes(), Part::TopoShapePy::cut(), cut(), Part::RuledSurface::execute(), Part::FeatureGeometrySet::execute(), PartDesign::Fillet::execute(), exportBrep(), exportFaceSet(), exportIges(), exportLineSet(), exportStl(), fit_iter(), fix(), fromPythonOCC(), Part::TopoShapePy::fuse(), fuse(), getBoundBox(), Part::PropertyPartShape::getBoundingBox(), getFaces(), getMemSize(), Part::TopoShapePy::getOrientation(), Part::TopoShapeSolidPy::getOuterShell(), Part::PropertyPartShape::getPyObject(), Part::TopoShapePy::getShapeType(), getSubShape(), getTransform(), Part::PropertyPartShape::getValue(), Part::TopoShapeFacePy::getWire(), Part::TopoShapePy::hashCode(), importBrep(), importIges(), importStep(), isClosed(), Part::TopoShapePy::isEqual(), Part::TopoShapePy::isInside(), isNull(), Part::TopoShapePy::isSame(), isValid(), Part::TopoShapePy::makeChamfer(), Part::TopoShapePy::makeFillet(), Part::TopoShapeWirePy::makeHomogenousWires(), makeOffset(), Part::TopoShapeWirePy::makePipe(), makePipe(), Part::TopoShapeWirePy::makePipeShell(), makePipeShell(), makePrism(), makeSweep(), Part::TopoShapePy::makeThickness(), makeThickSolid(), makeTube(), mirror(), Part::TopoShapePy::nullify(), offset(), Part::TopoShapePy::oldFuse(), oldFuse(), operator=(), Part::TopoShapePy::project(), project(), projectEx(), projectToDXF(), projectToSVG(), Part::TopoShapeWirePy::PyInit(), Part::TopoShapeVertexPy::PyInit(), Part::TopoShapeSolidPy::PyInit(), Part::TopoShapeShellPy::PyInit(), Part::TopoShapePy::PyInit(), Part::TopoShapeFacePy::PyInit(), Part::TopoShapeEdgePy::PyInit(), Part::TopoShapeCompSolidPy::PyInit(), Part::TopoShapeCompoundPy::PyInit(), removeInternalWires(), Part::TopoShapePy::removeShape(), removeShape(), Part::TopoShapePy::replaceShape(), replaceShape(), Part::TopoShapePy::reverse(), Part::TopoShapePy::revolve(), revolve(), Part::TopoShapePy::rotate(), Part::PropertyPartShape::SaveDocFile(), Part::TopoShapePy::scale(), Part::TopoShapePy::section(), section(), setFaces(), Part::TopoShapePy::setOrientation(), setTransform(), Part::PropertyPartShape::setValue(), sewShape(), shape2orig(), show(), spring_back(), tess_shape(), tesselateShape(), toNurbs(), Sketcher::Sketch::toShape(), transformGeometry(), transformGShape(), transformShape(), and Part::TopoShapePy::translate().