Part Namespace Reference

AttachExtensionh, .cpp contain a extension class to derive other features from, to make them attachable. More...

Classes

class  AttachEngineException
 
class  AttachExtension
 The AttachableObject class is the thing to extend an object with that should be attachable. More...
 
class  BodyBase
 Base class of all body objects in FreeCAD A body is used, e.g. More...
 
class  Boolean
 
class  BooleanException
 
class  Box
 
class  BRepBuilderAPI_RefineModel
 
class  BRepFeatModule
 
class  BRepOffsetAPI_MakeOffsetFix
 The BRepOffsetAPI_MakeOffsetFix class This class works around a limitation of the BRepOffsetAPI_MakeOffset which returns unexpected results when an input wire has set a placement and consists of a single edge only. More...
 
class  BRepOffsetAPIModule
 
class  BSplineCurveBiArcs
 
class  Chamfer
 
class  ChFi2dModule
 
class  Circle
 
class  Common
 
class  Compound
 
class  Compound2
 Same as Part::Compound, except it marks the Shape as transient, and rebuild it during restore. More...
 
class  Cone
 
class  CrossSection
 
class  CurveNet
 
class  CustomFeature
 Base class of all custom feature classes which are almost used as base for python feature classes. More...
 
class  Cut
 
struct  cutFaces
 Find all faces cut by a line through the centre of gravity of a given face Useful for the "up to face" options to pocket or pad. More...
 
class  Cylinder
 
class  Datum
 
class  Edgecluster
 
struct  EdgePoints
 
struct  Edgesort_gp_Pnt_Less
 
class  Ellipse
 
class  Ellipsoid
 
class  Extrusion
 
class  ExtrusionHelper
 
class  Face
 
class  FaceMaker
 FaceMaker class is the base class for implementing various "smart" face making routines. More...
 
class  FaceMakerBullseye
 The FaceMakerBullseye class is a tool to make planar faces with holes, where there can be additional faces inside holes and they can have holes too and so on. More...
 
class  FaceMakerCheese
 The FaceMakerCheese class is a legacy face maker that was extracted from Part Extrude. More...
 
class  FaceMakerExtrusion
 FaceMakerExtrusion provides legacy compounding-structure-ignorant behavior of facemaker of Part Extrude. More...
 
class  FaceMakerPublic
 The FaceMakerPublic class: derive from it if you want the face maker to be listed in tools that allow choosing one. More...
 
class  FaceMakerSimple
 The FaceMakerSimple class: make plane faces from all closed wires supplied, ignoring overlaps. More...
 
class  Feature
 Base class of all shape feature classes in FreeCAD. More...
 
class  FeatureExt
 Base class of all shape feature classes in FreeCAD. More...
 
class  FeatureGeometrySet
 
class  FeatureReference
 Base class of all shape feature classes in FreeCAD. More...
 
class  Fillet
 
class  FilletBase
 
struct  FilletElement
 A property class to store hash codes and two radii for the fillet algorithm. More...
 
class  Fuse
 
class  Geom2dArcOfCircle
 
class  Geom2dArcOfConic
 
class  Geom2dArcOfEllipse
 
class  Geom2dArcOfHyperbola
 
class  Geom2dArcOfParabola
 
class  Geom2dBezierCurve
 
class  Geom2dBSplineCurve
 
class  Geom2dCircle
 
class  Geom2dConic
 
class  Geom2dCurve
 
class  Geom2dEllipse
 
class  Geom2dHyperbola
 
class  Geom2dLine
 
class  Geom2dLineSegment
 
class  Geom2dModule
 
class  Geom2dOffsetCurve
 
class  Geom2dParabola
 
class  Geom2dPoint
 
class  Geom2dTrimmedCurve
 
class  GeomArcOfCircle
 
class  GeomArcOfConic
 
class  GeomArcOfEllipse
 
class  GeomArcOfHyperbola
 
class  GeomArcOfParabola
 
class  GeomBezierCurve
 
class  GeomBezierSurface
 
class  GeomBoundedCurve
 
class  GeomBSplineCurve
 
class  GeomBSplineSurface
 
class  GeomCircle
 
class  GeomCone
 
class  GeomConic
 
class  GeomCurve
 
class  GeomCylinder
 
class  GeomEllipse
 
class  Geometry
 
class  Geometry2d
 
class  GeometryDefaultExtension
 
class  GeometryExtension
 
class  GeometryMigrationExtension
 
class  GeometryPersistenceExtension
 
class  GeomHyperbola
 
class  GeomLine
 
class  GeomLineSegment
 
class  GeomOffsetCurve
 
class  GeomOffsetSurface
 
class  GeomParabola
 
class  GeomPlane
 
class  GeomPlateModule
 
class  GeomPlateSurface
 
class  GeomPoint
 
class  GeomSphere
 
class  GeomSurface
 
class  GeomSurfaceOfExtrusion
 
class  GeomSurfaceOfRevolution
 
class  GeomToroid
 
class  GeomTrimmedCurve
 
class  GeomTrimmedSurface
 
class  Helix
 
class  HLRBRepModule
 
class  ImportBrep
 
class  ImportIges
 
class  ImportStep
 
class  Line
 
class  Loft
 
struct  MeshVertex
 
class  Mirroring
 
class  Module
 
class  MultiCommon
 
class  MultiFuse
 
class  NullShapeException
 
class  Offset
 
class  Offset2D
 
class  Part2DObject
 2D Shape This is a specialized version of the PartShape for use with flat (2D) geometry. More...
 
class  Plane
 
class  Polygon
 
class  Primitive
 
class  Prism
 
class  PrismExtension
 
class  ProgressIndicator
 
class  PropertyFilletEdges
 
class  PropertyGeometryList
 
class  PropertyPartShape
 The part shape property class. More...
 
class  PropertyShapeHistory
 
class  Refine
 
class  RegularPolygon
 
class  Reverse
 
class  Revolution
 
class  RuledSurface
 
class  Section
 
class  ShapeFixModule
 
struct  ShapeHistory
 
class  ShapeSegment
 
class  ShapeUpgradeModule
 
class  Sphere
 
class  Spiral
 
class  Spline
 
class  Sweep
 
class  TangentialArc
 
class  Thickness
 
class  Tools
 
class  TopoShape
 The representation for a CAD Shape. More...
 
class  Torus
 
class  Vertex
 
class  Wedge
 

Typedefs

typedef App::ExtensionPythonT< AttachExtensionAttachExtensionPython
 
typedef App::FeaturePythonT< CustomFeatureCustomFeaturePython
 
typedef App::FeaturePythonT< FeatureFeaturePython
 
using GeometryBoolExtension = GeometryDefaultExtension< bool >
 
using GeometryDoubleExtension = GeometryDefaultExtension< double >
 
using GeometryIntExtension = GeometryDefaultExtension< long >
 
using GeometryStringExtension = GeometryDefaultExtension< std::string >
 
typedef App::FeaturePythonT< Part2DObjectPart2DObjectPython
 
typedef std::vector< std::vector< TopoDS_Edge > > tEdgeClusterVector
 
typedef std::vector< TopoDS_Edge > tEdgeVector
 
typedef std::map< gp_Pnt, tEdgeVector, Edgesort_gp_Pnt_LesstMapPntEdge
 
typedef std::pair< gp_Pnt, tEdgeVectortMapPntEdgePair
 

Functions

std::vector< std::string > buildBOPCheckResultVector ()
 
std::vector< std::string > buildShapeEnumVector ()
 
bool checkIntersection (const TopoDS_Shape &first, const TopoDS_Shape &second, const bool quick, const bool touch_is_intersection)
 Check for intersection between the two shapes. More...
 
void closestPointsOnLines (const gp_Lin &lin1, const gp_Lin &lin2, gp_Pnt &p1, gp_Pnt &p2)
 
TopoDS_Edge create3dCurve (const TopoDS_Edge &edge)
 
GeomArcOfCirclecreateFilletGeometry (const GeomLineSegment *lineSeg1, const GeomLineSegment *lineSeg2, const Base::Vector3d &center, double radius)
 
std::string encodeFilename (std::string fn)
 
bool find2DLinesIntersection (const Base::Vector3d &orig1, const Base::Vector3d &dir1, const Base::Vector3d &orig2, const Base::Vector3d &dir2, Base::Vector3d &point)
 
bool find2DLinesIntersection (const GeomLineSegment *lineSeg1, const GeomLineSegment *lineSeg2, Base::Vector3d &point)
 
std::vector< cutFacesfindAllFacesCutBy (const TopoDS_Shape &shape, const TopoDS_Shape &face, const gp_Dir &dir)
 
bool findFilletCenter (const GeomLineSegment *lineSeg1, const GeomLineSegment *lineSeg2, double radius, Base::Vector3d &center)
 
bool findFilletCenter (const GeomLineSegment *lineSeg1, const GeomLineSegment *lineSeg2, double radius, const Base::Vector3d &refPnt1, const Base::Vector3d &refPnt2, Base::Vector3d &center)
 
std::vector< TopoShapegetPyShapes (PyObject *obj)
 
void getPyShapes (PyObject *obj, std::vector< TopoShape > &shapes)
 
int ImportIgesParts (App::Document *pcDoc, const char *Name)
 
int ImportStepParts (App::Document *pcDoc, const char *Name)
 The part shape property. More...
 
PyObjectinitModule ()
 
bool intersect (const gp_Pln &pln1, const gp_Pln &pln2, gp_Lin &lin)
 
std::unique_ptr< GeomCurvemakeFromCurve (const Handle(Geom_Curve)&c)
 
std::unique_ptr< Geom2dCurvemakeFromCurve2d (Handle(Geom2d_Curve) curve)
 
std::unique_ptr< GeomCurvemakeFromCurveAdaptor (const Adaptor3d_Curve &adapt)
 
std::unique_ptr< Geom2dCurvemakeFromCurveAdaptor2d (const Adaptor2d_Curve2d &adapt)
 
std::unique_ptr< GeomSurfacemakeFromSurface (const Handle(Geom_Surface)&s)
 
std::unique_ptr< GeomCurvemakeFromTrimmedCurve (const Handle(Geom_Curve)&c, double f, double l)
 
std::unique_ptr< Geom2dCurvemakeFromTrimmedCurve2d (const Handle(Geom2d_Curve)&c, double f, double l)
 
const Py::Object makeGeometryCurvePy (const Handle(Geom_Curve)&c)
 
const Py::Object makeTrimmedCurvePy (const Handle(Geom_Curve)&c, double f, double l)
 
const std::map< PyTypeObject *, TopAbs_ShapeEnum > mapTypeShape (vecTypeShape.begin(), vecTypeShape.end())
 
bool ReadColors (const Handle(XSControl_WorkSession) &WS, std::map< int, Quantity_Color > &hash_col)
 
bool ReadNames (const Handle(XSControl_WorkSession) &WS)
 
Py::Object shape2pyshape (const TopoDS_Shape &shape)
 
Py::Object shape2pyshape (const TopoShape &shape)
 
static TopAbs_ShapeEnum ShapeTypeFromPyType (PyTypeObject *pyType)
 
std::list< TopoDS_Edge > sort_Edges (double tol3d, std::list< TopoDS_Edge > &edges)
 
double suggestFilletRadius (const GeomLineSegment *lineSeg1, const GeomLineSegment *lineSeg2, const Base::Vector3d &refPnt1, const Base::Vector3d &refPnt2)
 
std::list< std::string > supportedSTEPSchemes ()
 
bool tangentialArc (const gp_Pnt &p0, const gp_Vec &v0, const gp_Pnt &p1, gp_Pnt &c, gp_Dir &axis)
 

Variables

const App::PropertyQuantityConstraint::Constraints angleRangeU = {0.0, 360.0, 1.0}
 
const App::PropertyQuantityConstraint::Constraints angleRangeV = {-90.0, 90.0, 1.0}
 
const App::PropertyQuantityConstraint::Constraints apexRange = {-90.0, 90.0, 0.1}
 
PyObjectPartExceptionOCCConstructionError
 
PyObjectPartExceptionOCCDimensionError
 
PyObjectPartExceptionOCCDomainError
 
PyObjectPartExceptionOCCError
 
PyObjectPartExceptionOCCRangeError
 
const App::PropertyQuantityConstraint::Constraints quantityRange = {0.0, FLT_MAX, 0.1}
 
const App::PropertyQuantityConstraint::Constraints torusRangeV = {-180.0, 180.0, 1.0}
 
const std::vector< std::pair< PyTypeObject *, TopAbs_ShapeEnum > > vecTypeShape
 

Detailed Description

AttachExtensionh, .cpp contain a extension class to derive other features from, to make them attachable.

Typedef Documentation

◆ AttachExtensionPython

◆ CustomFeaturePython

◆ FeaturePython

◆ GeometryBoolExtension

◆ GeometryDoubleExtension

◆ GeometryIntExtension

◆ GeometryStringExtension

◆ Part2DObjectPython

◆ tEdgeClusterVector

typedef std::vector<std::vector<TopoDS_Edge> > Part::tEdgeClusterVector

◆ tEdgeVector

typedef std::vector<TopoDS_Edge> Part::tEdgeVector

◆ tMapPntEdge

◆ tMapPntEdgePair

typedef std::pair<gp_Pnt,tEdgeVector> Part::tMapPntEdgePair

Function Documentation

◆ buildBOPCheckResultVector()

std::vector< std::string > Part::buildBOPCheckResultVector ( )

◆ buildShapeEnumVector()

std::vector< std::string > Part::buildShapeEnumVector ( )

◆ checkIntersection()

bool Part::checkIntersection ( const TopoDS_Shape &  first,
const TopoDS_Shape &  second,
const bool  quick,
const bool  touch_is_intersection 
)

Check for intersection between the two shapes.

Only solids are guaranteed to work properly There are two modes:

  1. Bounding box check only - quick but inaccurate
  2. Bounding box check plus (if necessary) boolean operation - costly but accurate Return true if the shapes intersect, false if they don't The flag touch_is_intersection decides whether shapes touching at distance zero are regarded as intersecting or not
  1. If set to true, a true check result means that a boolean fuse operation between the two shapes will return a single solid
  2. If set to false, a true check result means that a boolean common operation will return a valid solid If there is any error in the boolean operations, the check always returns false

◆ closestPointsOnLines()

void Part::closestPointsOnLines ( const gp_Lin &  lin1,
const gp_Lin &  lin2,
gp_Pnt &  p1,
gp_Pnt &  p2 
)

References draftgeoutils.general::v1().

Referenced by tangentialArc().

◆ create3dCurve()

TopoDS_Edge Part::create3dCurve ( const TopoDS_Edge &  edge)

◆ createFilletGeometry()

◆ encodeFilename()

◆ find2DLinesIntersection() [1/2]

bool Part::find2DLinesIntersection ( const Base::Vector3d orig1,
const Base::Vector3d dir1,
const Base::Vector3d orig2,
const Base::Vector3d dir2,
Base::Vector3d point 
)

◆ find2DLinesIntersection() [2/2]

bool Part::find2DLinesIntersection ( const GeomLineSegment lineSeg1,
const GeomLineSegment lineSeg2,
Base::Vector3d point 
)

◆ findAllFacesCutBy()

std::vector< Part::cutFaces > Part::findAllFacesCutBy ( const TopoDS_Shape &  shape,
const TopoDS_Shape &  face,
const gp_Dir &  dir 
)

◆ findFilletCenter() [1/2]

bool Part::findFilletCenter ( const GeomLineSegment lineSeg1,
const GeomLineSegment lineSeg2,
double  radius,
Base::Vector3d center 
)

◆ findFilletCenter() [2/2]

◆ getPyShapes() [1/2]

std::vector< TopoShape > Part::getPyShapes ( PyObject obj)

References getPyShapes().

◆ getPyShapes() [2/2]

void Part::getPyShapes ( PyObject obj,
std::vector< TopoShape > &  shapes 
)

Referenced by getPyShapes().

◆ ImportIgesParts()

◆ ImportStepParts()

◆ initModule()

PyObject * Part::initModule ( )

◆ intersect()

bool Part::intersect ( const gp_Pln &  pln1,
const gp_Pln &  pln2,
gp_Lin &  lin 
)

Referenced by tangentialArc().

◆ makeFromCurve()

std::unique_ptr< GeomCurve > Part::makeFromCurve ( const Handle(Geom_Curve)&  c)

References makeFromTrimmedCurve().

Referenced by makeGeometryCurvePy().

◆ makeFromCurve2d()

std::unique_ptr< Geom2dCurve > Part::makeFromCurve2d ( Handle(Geom2d_Curve)  curve)

◆ makeFromCurveAdaptor()

std::unique_ptr< GeomCurve > Part::makeFromCurveAdaptor ( const Adaptor3d_Curve adapt)

◆ makeFromCurveAdaptor2d()

std::unique_ptr< Geom2dCurve > Part::makeFromCurveAdaptor2d ( const Adaptor2d_Curve2d adapt)

◆ makeFromSurface()

std::unique_ptr< GeomSurface > Part::makeFromSurface ( const Handle(Geom_Surface)&  s)

◆ makeFromTrimmedCurve()

std::unique_ptr< GeomCurve > Part::makeFromTrimmedCurve ( const Handle(Geom_Curve)&  c,
double  f,
double  l 
)

◆ makeFromTrimmedCurve2d()

std::unique_ptr< Geom2dCurve > Part::makeFromTrimmedCurve2d ( const Handle(Geom2d_Curve)&  c,
double  f,
double  l 
)

◆ makeGeometryCurvePy()

const Py::Object Part::makeGeometryCurvePy ( const Handle(Geom_Curve)&  c)

References makeFromCurve().

◆ makeTrimmedCurvePy()

const Py::Object Part::makeTrimmedCurvePy ( const Handle(Geom_Curve)&  c,
double  f,
double  l 
)

◆ mapTypeShape()

const std::map< PyTypeObject *, TopAbs_ShapeEnum > Part::mapTypeShape ( vecTypeShape.  begin(),
vecTypeShape.  end() 
)

◆ ReadColors()

bool Part::ReadColors ( const Handle(XSControl_WorkSession) &  WS,
std::map< int, Quantity_Color > &  hash_col 
)

◆ ReadNames()

bool Part::ReadNames ( const Handle(XSControl_WorkSession) &  WS)

◆ shape2pyshape() [1/2]

◆ shape2pyshape() [2/2]

Py::Object Part::shape2pyshape ( const TopoShape shape)

◆ ShapeTypeFromPyType()

static TopAbs_ShapeEnum Part::ShapeTypeFromPyType ( PyTypeObject *  pyType)
static

References vecTypeShape.

◆ sort_Edges()

std::list< TopoDS_Edge > Part::sort_Edges ( double  tol3d,
std::list< TopoDS_Edge > &  edges 
)

◆ suggestFilletRadius()

◆ supportedSTEPSchemes()

std::list< std::string > Part::supportedSTEPSchemes ( )

◆ tangentialArc()

bool Part::tangentialArc ( const gp_Pnt &  p0,
const gp_Vec &  v0,
const gp_Pnt &  p1,
gp_Pnt &  c,
gp_Dir &  axis 
)

Variable Documentation

◆ angleRangeU

◆ angleRangeV

const App::PropertyQuantityConstraint::Constraints Part::angleRangeV = {-90.0, 90.0, 1.0}

◆ apexRange

const App::PropertyQuantityConstraint::Constraints Part::apexRange = {-90.0, 90.0, 0.1}

Referenced by Part::Helix::Helix().

◆ PartExceptionOCCConstructionError

PyObject * Part::PartExceptionOCCConstructionError
extern

◆ PartExceptionOCCDimensionError

PyObject * Part::PartExceptionOCCDimensionError
extern

◆ PartExceptionOCCDomainError

PyObject * Part::PartExceptionOCCDomainError
extern

◆ PartExceptionOCCError

PyObject * Part::PartExceptionOCCError
extern

◆ PartExceptionOCCRangeError

PyObject * Part::PartExceptionOCCRangeError
extern

◆ quantityRange

◆ torusRangeV

const App::PropertyQuantityConstraint::Constraints Part::torusRangeV = {-180.0, 180.0, 1.0}

Referenced by Part::Torus::Torus().

◆ vecTypeShape

const std::vector<std::pair<PyTypeObject*, TopAbs_ShapeEnum> > Part::vecTypeShape
Initial value:
= {
{&TopoShapeCompoundPy::Type, TopAbs_COMPOUND},
{&TopoShapeCompSolidPy::Type, TopAbs_COMPSOLID},
{&TopoShapeSolidPy::Type, TopAbs_SOLID},
{&TopoShapeShellPy::Type, TopAbs_SHELL},
{&TopoShapeFacePy::Type, TopAbs_FACE},
{&TopoShapeWirePy::Type, TopAbs_WIRE},
{&TopoShapeEdgePy::Type, TopAbs_EDGE},
{&TopoShapeVertexPy::Type, TopAbs_VERTEX},
{&TopoShapePy::Type, TopAbs_SHAPE}
}

Referenced by ShapeTypeFromPyType().