Methods and classes structure. OpenCASCADE Sketcher

Class Sketcher

Sketcher is a main class, witch process program commands and manage other Sketcher classes.

Public methods:

 

Private methods:

Class members:


Class Sketcher_Command

Sketcher_Command – base class of commands entering objects. This commands main function is to create objects by mouse button click handler and mouse move handler. New object store in the list of objects.

Public methods:

Virtual functions:

Class members:

 

Class Sketcher_CommandArc3P

Sketcher_CommandArc3P – Command entering arc by 3 points. Entering order: start point, point lying on arc, end point.

Private methods:

Class members:


Sketcher_CommandArcCenter2P

Sketcher_CommandArcCenter2P – Command entering arc by center & 2 points. Entering order: Center point, start point, end point.

Private methods:

Class members:


Sketcher_CommandBezierCurve

Sketcher_CommandBezierCurve – Command entering Bezier Curve by points.

Private methods:

Class members:


Class Sketcher_CommandCircle2PTan

Sketcher_CommandCircle2PTan – Command entering Circle by 2 Point & 1 tangent tcurve. Entering order: first point, second point, object of tangent.

Private methods:

void SelectCurve() – select nearest curve.

Standard_Boolean SumDistanceToCircle () – select tangent point to determine circle orientation. Return true, if that point exist.

Class members:

 

Class Sketcher_CommandCircle3P

Sketcher_CommandCircle3P – Class command, entering object by 3 points.

Class members:


Class Sketcher_CommandCircle3Tan

Sketcher_CommandCircle3Tan – Class command, entering circle by 3 tangent of objects.

Private methods:

Class members:

Class Sketcher_CommandCircleCenterRadius

Sketcher_CommandCircleCenterRadius – Class command entering circle by center point & point, lying on circle. Entering order: center point, point, lying on circle.

Class members:


Class Sketcher_CommandCircleP2Tan

Sketcher_CommandCircleP2Tan – Class command entering circle by point & 2 tangent tcurve. Entering order: point, first object of tangent, second object of tangent.

Private methods:

Class members:

 

Class Sketcher_CommandLine2P

Sketcher_CommandLine2P – Class command entering line by 2 points.

Class members:

 

Class Sketcher_CommandPoint

Sketcher_CommandPoint – Class command entering point.

Class members:


Class Sketcher_CommandTrim

Sketcher_CommandTrim – Class command editing objects. This Command allow to cut a part of object, limited with intersection of other curves. The object is breaking to some parts. Number of parts is bigger intersections by 1. Nearest part to cursor is cutting. If none intersections found, it’s completly remove. In case of cutting circle is creating arc.

Private methods:

Class members:

 

Class Sketcher_AnalyserSnap

Sketcher_AnalyserSnap – Snap manager class. Compose snap list. Take 2d point at work plane. Depending on snap type, start corresponding snap command to find new point. Als, it contain analyser snap handler. Analyzer snap automatically determine preffered snap among all possible snaps.

Public methods:

Private methods:

Class members:

Class Sketcher_Snap

Sketcher_Snap – base class of Snap. It`s main function: find a new point by means of some method. Snap type must be:

      1. SnapNothing – default
      2. SnapEnd – snap to end line or arc point.
      3. SnapMiddle – snap to middle line or arc point.
      4. SnapCenter – snap to center of circle or arc
      5. SnapNearest – snap to nearest point on object.
      6. SnapIntersection – snap to point of intersection
      7. SnapTangent – snap to tangent point.
      8. SnapParallel – snap parallelel lines
      9. SnapPerpendicular – snap perpendicular line.
      10. SnapAnalyse – analyser, select best snap from all possible snaps.

Public methods:

Virtual functions:

Protected methods:

Class members:


Class Sketcher_SnapCenter

Sketcher_SnapCenter – Class snap searching center curve/circle/arc.

Class members:


Class Sketcher_SnapIntersection

Sketcher_SnapIntersection – Class snap searching intersection point of objects.

Private methods:

Class members:


Class Sketcher_SnapEnd

Sketcher_SnapEnd – Class snap searching end point of line/arc.

Class members:

 

Class Sketcher_SnapLine

Sketcher_SnapLine – base class of snaps searching parallel/perpendicular lines.

Private methods:

Class members:


Class Sketcher_SnapLineParallel

Sketcher_SnapLineParallel – Class snap searching parallel lines. Return point projected on founded line.

Class members:


Class Sketcher_SnapLinePerpendicular

Sketcher_SnapLinePerpendicular – Class snap searching perpendicular lines. Return point projected on founded line.

Class members:


Class Sketcher_SnapMiddle

Sketcher_SnapMiddle – Class snap searching middle point of line/arc

Class members:

Class Sketcher_SnapNearest

Sketcher_SnapNearest – Class snap searching nearest point at line/circle/arc.

Class members:

Class Sketcher_SnapTangent

Sketcher_SnapTangent – Class snap searching tangent to objects. It is possible to construct tangent line to curve by first point or second point, and tangent circle to curve.

Private methods:

Class members:


Class Sketcher_Object

Sketcher_Object – Class storing geometry primitive and all it's attributes.

Public methods:

Class members:


Class Sketcher_GUI

Sketcher_GUI – abstract class for classes managing edit object classes.

Public methods:

Virtual functions:

 

Class Sketcher_QtGUI

Sketcher_QtGUI – Class, managing edit object classes. Pass object to property class. Property classes correspond to object geometry:

Public methods:

Sketcher_QtGUI (QWidget* parent) – Constructs a Sketcher_QtGUI. Pass parent window to property classes.

Class members:


Class Sketcher_Property

Sketcher_Property – base class for editing object classes. Show dialog window with object properties. Enable user to change object name, type of object, geometry properties. Color, line style, line width disable to point properties.

Public methods:

Private methods:

Virtual functions:

Class members:

 

Class Sketcher_PropertyArc

Sketcher_PropertyArc – Class editing arc. Show dialog window of arc properties. It allow to change center point, radius, parameters of start & end point. Parameters changing from 0 to1.

Class members:

 

Class Sketcher_PropertyCircle

Sketcher_PropertyCircle – Class editing circle. Show dialog window of circle properties. It allow to change center point and radius.

Class members:

Class Sketcher_PropertyLine

Sketcher_PropertyLine – Class editing edge. Show dialog window of edge properties. It allow to change first and second point coordinates.

Public methods:

Class members:

 

Class Sketcher_PropertyPoint

Sketcher_PropertyPoint – Class editing point. Show dialog window of point properties. It allow to change point coordinates.

Class members:

Handle(Geom2d_CartesianPoint) curGeom2d_Point – point.


Class Geom2d_Arc

Geom2d_Arc – Class, describing 2d arc geometry. Inherit from Geom2d_Circle. Keep information about boundary points. Check paramepers, when set it. Start parameter must be lesser than last parameter.

Public methods:


Private methods:

Class members:


Class Geom2d_Edge

Geom2d_Edge – Class, describing 2d edge geometry. Inherit from Geom2d_Line. Keep information about boundary points.

Public methods:

Class members:

OpenCASCADE Sketcher

www.laduga.com

www.laduga.ru