Namespaces | |
namespace | GeometryMode |
namespace | InternalType |
Classes | |
class | Constraint |
struct | Constraint_Equal |
struct | ConstraintIds |
class | ExternalGeometryExtension |
class | ExternalGeometryFacade |
class | GeoElementId |
Struct for storing a {GeoId, PointPos} pair. More... | |
class | GeoListModel |
Class for managing internal and external geometry as a single object. More... | |
class | GeometryFacade |
This class is a Facade to handle geometry and sketcher geometry extensions with a single sketcher specific interface. More... | |
class | GeometryTypedFacade |
It provides all the funcionality of GeometryFacade (derives from it), but in addition allows to indicate the type of a Part::Geometry derived class. More... | |
class | ISketchExternalGeometryExtension |
class | ISketchGeometryExtension |
class | Module |
class | PropertyConstraintList |
class | PythonConverter |
Class for generating python code. More... | |
class | Sketch |
class | SketchAnalysis |
class | SketchGeometryExtension |
class | SketchObject |
class | SketchObjectSF |
class | SolverGeometryExtension |
Typedefs | |
using | GeoList = GeoListModel< GeometryPtr > |
using | GeoListFacade = GeoListModel< GeometryFacadeUniquePtr > |
using | GeometryFacadeUniquePtr = std::unique_ptr< const Sketcher::GeometryFacade > |
using | GeometryPtr = Part::Geometry * |
typedef App::FeaturePythonT< SketchObject > | SketchObjectPython |
Enumerations | |
enum | ConstraintType : int { } |
enum | GeoEnum { RtPnt = -1 , HAxis = -1 , VAxis = -2 , RefExt = -3 , GeoUndef = -2000 } |
Sketcher Geometry is identified with an index called GeoId. More... | |
enum | InternalAlignmentType { Undef = 0 , EllipseMajorDiameter = 1 , EllipseMinorDiameter = 2 , EllipseFocus1 = 3 , EllipseFocus2 = 4 , HyperbolaMajor = 5 , HyperbolaMinor = 6 , HyperbolaFocus = 7 , ParabolaFocus = 8 , BSplineControlPoint = 9 , BSplineKnotPoint = 10 , NumInternalAlignmentType } |
enum class | PointPos : int { none = 0 , start = 1 , end = 2 , mid = 3 } |
PointPos lets us refer to different aspects of a piece of geometry. More... | |
Functions | |
GeoListFacade | getGeoListFacade (const GeoList &geolist) |
PyObject * | initModule () |
using Sketcher::GeoList = typedef GeoListModel<GeometryPtr> |
using Sketcher::GeoListFacade = typedef GeoListModel<GeometryFacadeUniquePtr> |
using Sketcher::GeometryFacadeUniquePtr = typedef std::unique_ptr<const Sketcher::GeometryFacade> |
using Sketcher::GeometryPtr = typedef Part::Geometry * |
enum Sketcher::ConstraintType : int |
Important note: New constraint types must be always added at the end but before 'NumConstraintTypes'. This is mandatory in order to keep the handling of constraint types upward compatible which means that this program version ignores later introduced constraint types when reading them from a project file.
enum Sketcher::GeoEnum |
Sketcher Geometry is identified with an index called GeoId.
GeoId >= 0 are normal geometry elements GeoId = -1 and -2 are the Horizontal and Vertical axes and the root point GeoId <= -2 are external geometry elements GeoId = -2000 is an undefined or unused geometry id
GeoEnum struct provides convenience labels for these GeoIds.
However, GeoEnum is not enough to define an element of a Geometry. The most straightforward example is the RootPoint and the Horizontal Axis. Both have the same GeoId (= -1).
The same happens for elements of a given geometry. For example, a line has a starting point, an endpoint and an edge. All these share the same GeoId, as the GeoId identifies a geometry and not an element of a geometry.
The elements of a given geometry are identified by the PointPos enum. In the case of the root point, it is considered to be the start point of the Horizontal Axis, this is a convention.
Therefore, a geometry element (GeoElementId) is univocally defined by the combination of a GeoId and a PointPos.
Geometry shapes having more or different elements than those supported by the PointPos struct, such as conics, in particular an arc of ellipse, are called complex geometries. The extra elements of complex geometries are actual separate geometries (focus of an ellipse, line defining the major axis of an ellipse, circle representing the weight of a BSpline), and they are call InternalAlignment geometries.
For Geometry lists, refer to GeoListModel template.
Enumerator | |
---|---|
RtPnt | |
HAxis | |
VAxis | |
RefExt | |
GeoUndef |
|
strong |
PointPos lets us refer to different aspects of a piece of geometry.
sketcher::none refers to an edge itself (eg., for a Perpendicular constraint on two lines). sketcher::start and sketcher::end denote the endpoints of lines or bounded curves. Sketcher::mid denotes geometries with geometrical centers (eg., circle, ellipse). Bare points use 'start'. More complex geometries like parabola focus or b-spline knots use InternalAlignment constraints in addition to PointPos.
Enumerator | |
---|---|
none | |
start | |
end | |
mid |
GeoListFacade Sketcher::getGeoListFacade | ( | const GeoList & | geolist | ) |
PyObject * Sketcher::initModule | ( | ) |