Namespace CADability
Classes
- ActionStack
A stack of actions. The top entry is the active action, the bottom entry usually is the SelectObjectsAction.
- ActiveFrame
This class provides access to the current active frame (IFrame) object. It is typically the one and only SingleDocumentFrame in the application but may be different in future, when there will be a MultiDocumenFrame.
- AnimatedView
A view in which mechanical dependencies of objects can be defined and animated.
- ArrayColumn<T>
Convert a column of a 2 dimensional array to a one dimensional array (without copying the data)
- ArrayLinear<T>
Convert a 2 dimensional array to a one dimensional array (without copying the data)
- ArrayRow<T>
Convert a row of a 2 dimensional array to a one dimensional array (without copying the data)
- AxisDrive
Describes a rotation around an axis.
- BRepItem
An entry of the OctTree<T> which BRepOperation uses to find the intersections of two shells: it wraps a Vertex, an Edge or a Face of one of the shells (Type tells which) and implements the extent and hit tests of IOctTreeInsertable for it, so that only edges and faces whose cubes overlap are intersected. A vertex item may also be an intersection vertex produced by intersecting an edge with a face; then isIntersection is set and edge and face refer to the edge and the face which created it. Internal helper of the boolean operations, not an entry point of the API.
- BRepOperation
The boolean operations on BRep shells: union, intersection and difference of two closed shells, splitting a shell by a plane or a face, clipping a face by a shell and connecting a set of intersecting faces to shells. It is an OctTree<T> of BRepItems: the vertices, edges and faces of both shells are inserted so that only nearby edge/face pairs are intersected; the intersection edges split the faces, the parts are classified as inside or outside the other shell and recombined to the resulting shells according to the BRepOperation.Operation passed to the constructor. Create one with the two shells and the operation and call Result() for the resulting shells. Applications usually call it through Unite(Solid, Solid), Intersect(Solid, Solid), Subtract(Solid, Solid) and the static methods SplitByPlane(Shell, Plane), SplitByFace(Shell, Face), RoundEdges(Shell, Edge[], double), ChamferEdges(Face, Edge[], double, double) and ClipFace(Face, Shell).
- BoxedSurfaceExtension
Experimental numerical algorithms based on the MathNet optimizers (Newton, Levenberg-Marquardt, trust region): positions of points on surfaces, intersections of curves and surfaces and fitting of planes, lines, cones, tori, cylinders and quadrics to points. Most of them are alternatives to the methods of GaussNewtonMinimizer and are only kept for comparison; ConeFit(IArray<GeoPoint>, GeoPoint, GeoVector, double, double, out ConicalSurface) is used when a shell is reconstructed from a triangulation. Internal helper, not an entry point of the API.
- CollisionDetection
Preliminary
- ColorSetting
ColorSetting is intended for objects to be used in Settings. It provides a Color with the IShowProperty interface.
- CombinedEnumerable<T>
Enumerates several enumerables one after the other as one sequence without copying them; created by Combine<T>(params IEnumerable<T>[]). It is both the enumerable and its enumerator, so it can only be enumerated once at a time. Internal helper, not an entry point of the API.
- CoordSysException
Exception thrown by constructors of CoordSys indication a failure
- CurveDrive
Describes a movement along a curve (which may be any path or simple curve like a line)
- CurveMovement
An IMovement which follows a 2d curve on a surface: for each parameter u the moving coordinate system is placed at the point of the 2d curve on the surface with its x-axis along the curve and its z-axis along the surface normal, so that a moved object stays aligned with the surface. The path of a point is a GeneralCurve evaluated from the movement.
- DebuggerContainer
A container for the debugger visualizer that shows several things (points, vectors, curves, faces and other GeoObjects) together in one view. To look at an array of displayable objects on the fly, enter
??DebuggerContainer.Show(array)in the immediate window of the debugger.
- DisplayChangeArg
Parameter declaration for DisplayChangedEvent.
- DriveList
The list of the IDrives of a Model (see AllDrives), which move objects in the AnimatedView. Drives are added with Add(IDrive) and removed with Remove(IDrive); the list is serialized together with the model.
- DualCurveDrive
A drive (see IDrive) defined by two CurveDrives: the objects are moved by the rigid motion (with Stretch also scaled) which maps the start points of the two curve drives onto their current positions, like a rod whose ends run along two curves. It has no position of its own, it only follows its two drives. It is also the property entry which shows the drive in the control center.
- DualSurfaceCurve
Default implementation of IDualSurfaceCurve, which simply holds a 3d curve, the two surfaces and the two 2d curves; the surfaces create it when they compute their intersection with another surface or a plane. When the 3d curve is an InterpolatedDualSurfaceCurve, the 2d curves are taken from it when the curve is split or the surfaces are swapped.
- Edge
Edge is a abstract description of an egde on a Face. An Edge may belong to one or two faces. Edges don't exist without faces (use IGeoObject and ICurvederived classes for simple 3d curves). The Edge is defined in several ways, which are overdetermined and therfore must always be in a consistent state: It is the pur 3-dimensional curve, an ICurve, and on each Face the edge is defined as a 2-dimensional curve on the surface (see Surface), which has a 2-dimensional (u/v) coordinate system (parametric space). The Edge may be an outer or an inner edge on each face or some curve on the inside of a face (typically an outlining curve for a certain Projection). The edge may not be outside of a face.
- ExplicitPCurve2D
Curve defined by 3 polynomials in one veriable ("u"), or by 4 polynoms with an additional "w" component (homogenuous coordinates). the curve may be defined piecewise: the knots array defines the intervalls for the u parameter while the polynom arrays define the curves for each intervall
- ExplicitPCurve3D
Curve defined by 3 polynomials in one veriable ("u"), or by 4 polynoms with an additional "w" component (homogenuous coordinates). the curve may be defined piecewise: the knots array defines the intervalls for the u parameter while the polynom arrays define the curves for each intervall
- ExportStep
Writes the active model of a project to a STEP file (ISO 10303-21, AP214). Solids are written as
MANIFOLD_SOLID_BREP, open shells asSHELL_BASED_SURFACE_MODEL, curves asGEOMETRIC_CURVE_SET, blocks as assemblies of their contents; the colours of the objects becomeSTYLED_ITEMs and the names of solids and blocks are kept. Objects that do not implement IExportStep (e.g. text and dimensions) are skipped. Export(string, string) with the format "step" uses this class.
- ExportToThreeJs
Converts a Model into a JSON description for a three.js based viewer: solids, shells and faces become triangle meshes, curves become polylines (approximated with the given precision), text objects keep their font, position and string, and the contents of blocks are merged into one entity. Colours come from the IColorDef of the objects, and the primitive entries of UserData are included. Create an instance with the model, set ExportEdges and ExportUserData as needed and call ToJSON(bool).
- ExportToThreeJsException
Thrown by ToJSON(bool) when an object of the model could not be converted, e.g. because its triangulation failed. GeoObject is the object in question.
- ExportToWebGl
Export a Model as a WebGl based html file.
- Extension
Extension methods used by BRepOperation; currently only ContainsSameFace(Dictionary<Face, HashSet<Face>>, Face, double), which tests whether a face is completely covered by the overlapping faces of the other shell stored in a dictionary. Internal helper of the boolean operations, not an entry point of the API.
- Extensions
Small general purpose helpers used throughout CADability: combining and mapping enumerables (Combine<T>(params IEnumerable<T>[]), LookUp<T>(IEnumerable<T>, Dictionary<T, T>)), building MathNet matrices from GeoVectors, validity checks for matrices and vectors and some LINQ like extension methods (MinBy<TSource, TKey>(IEnumerable<TSource>, Func<TSource, TKey>), AddIfNotNull<T>(ICollection<T>, T)). Internal helper, not an entry point of the API.
- FindPathThroughForbiddenArea
Class to find a polyline between two points that does not cross the forbidden area
- FindPathThroughForbiddenArea.Impossible
Thrown by FindPath(GeoPoint2D, GeoPoint2D, double) when no path exists, because the forbidden rectangles separate the start point from the end point.
- FinishDeserialization
[Deprecated], Container for objects that need a callback after deserialization. These objects must implement IFinishDeserialization
- FontFace
A face of a font family (e.g. "Arial Bold") as a FontProvider provides it. Metrics are in font units, widths and kerning in units of the em height, and the glyph outlines are Bezier curves, so that all providers produce the same exact geometry.
- FontProvider
Provides the fonts for Text and dimensions: the names of the font families, their metrics and the outlines of the glyphs. The kernel gets all fonts from Current, which works without any user interface. The default is a ManagedFontProvider, which reads the TrueType font files of the system itself and therefore works on every platform. CADability.Forms contains a provider based on GDI (GdiFontProvider), which gives the fonts exactly as CADability showed them on Windows before; as soon as CADability.Forms is used, it makes that provider the default, unless the application has set Current itself.
- FrameImpl
A standard implementation of the IFrame interface, used by CadFrame and the old SingleDocumentFrame
- GDI2DView
A 2d view of a Model that is painted with GDI (see PrintToGDI) instead of OpenGL, always looking from the top onto the x/y plane. It paints the objects in the order of the model, optionally sorted by the DisplayOrder of their layers (UseDisplayOrder), can show a paper of a given size with the area outside the paper in black (ShowPaper) and can print its contents as a single page (PrintSinglePage(PrintDocument)). Like the ModelView it handles actions, so the user can select and construct objects in it. Create it with GDI2DView(Project, Model, IFrame), add it to the frame (AddView(IView)) and make it the ActiveView; the menu command "MenuId.View.NewGDIView" does this. The view is saved with the project.
- GaussNewtonMinimizer
A Gauss-Newton solver for non-linear least squares problems: given an GaussNewtonMinimizer.ErrorFunction, which computes the residuals for a set of parameters, and its GaussNewtonMinimizer.JacobiFunction, Solve(double[], int, double, double, out double, out int, out double[]) iterates from start parameters to the parameters which minimize the sum of the squared residuals. The static methods use it to fit geometric primitives to points (LineFit(IArray<GeoPoint>, double, out GeoPoint, out GeoVector), CircleFit(IArray<GeoPoint>, GeoPoint, double, double, out Ellipse), PlaneFit(IArray<GeoPoint>, double, out Plane), CylinderFit(IArray<GeoPoint>, GeoPoint, GeoVector, double, double, out CylindricalSurface), ConeFit(IArray<GeoPoint>, GeoPoint, GeoVector, double, double, out ConicalSurface), SphereFit(IArray<GeoPoint>, GeoPoint, double, double, out SphericalSurface), TorusFit(IArray<GeoPoint>, GeoPoint, GeoVector, double, double, out ToroidalSurface), QuadricFit(IArray<GeoPoint>)) and to compute extrema and intersections of curves and surfaces, e.g. when a shell is reconstructed from a triangulation. Internal numerical helper, not an entry point of the API.
- Gdi
P/Invoke declarations of the Windows GDI functions (gdi32.dll) with the related constants and structures which the OpenGL display and the text rendering need: choosing and setting the pixel format of a device context, creating fonts and querying character widths and kerning pairs. Only usable on Windows. Internal helper, not an entry point of the API.
- GeneralSweptCurve
A general surface defined by a curve "toSweep", which is swept along a curve "along" The u parameter moves along the curve "toSweep", the v parameter moves along the curve "along" The curve "along" must implement IOrientation: the coordinate system is defined by the direction of "along" at parameter u, which is the z-axis, while the OrientationAt(u) is the x-axis
- GeneralSweptCurve.FixedUCurve
The parameter curve of a GeneralSweptCurve surface for a fixed u, i.e. the path which the point of the swept curve at u takes along the sweep (the v direction) between vmin and vmax; returned by FixedU(double, double, double). Cloning and some other operations are not implemented.
- GeoPoint2D.CompareCloseTo
Comparer that orders GeoPoint2D objects by their distance to a fixed reference point, the closest first. Used to sort e.g. intersection points by their distance to a given position:
points.Sort(new GeoPoint2D.CompareCloseTo(position)).
- GeoPoint2D.GeoPoint2DICompareX
Comparer that orders GeoPoint2D objects by their x-component only; points with equal x-components are considered equal regardless of y. Use with Sort(IComparer<T>). CompareX is the non-generic counterpart.
- GeoPoint2DList
Collects 2d points and removes near duplicates: GetReduced(double) returns only those points which are not closer than the given precision to a point already kept, using a QuadTree<T> to find the neighbours. Internal helper, currently not used by the kernel.
- GeoVectorException
ApplicationException thrown by some GeoVector operations.
- Geometry
The class Geometry only contains static methods to solve some basic geometric tasks.
- Geometry.GeometryException
ApplicationException derived exception class for methods in class Geometry.
- Gl
OpenGL wrapper methods and constants. See OpenGL documentation for more information.
- Glu
The OpenGL utility library (GLU) functions and constants CADability uses, as P/Invoke declarations into glu32.dll, taken from the Tao framework. Documented in the OpenGL reference.
- Grid
The Grid settings, used only in class Projection.
- IArrayImpl<T>
General implementation of IArray<T> providing enumerators and first and last properties.
- ImplicitPSurface
A surface, defined by a polynom in 3 variables. The surface is defined as P(x,y,z)==0.
- ImportCondor4Exception
Exception of the import of Condor 4 files (the predecessor of CADability). The import itself is no longer part of the library; only this exception class remains and it is not thrown anywhere.
- ImportSTL
Reads STL files, ASCII or binary, and returns their triangles as Shells of planar triangular faces. Adjacent triangles are connected, so every set of connected triangles becomes one shell. A shell without open edges can be turned into a solid with MakeSolid(Shell), which ReadFromFile(string, string) with the format "stl" does.
- ImportSVG
Reads simple SVG files and converts their elements (lines, rectangles, circles, ellipses, polylines, polygons and paths with Bézier and elliptical arc segments) into IGeoObjects. The transformations of nested elements are accumulated on a stack of ModOp2Ds; the virtual CreateXxx methods may be overridden in a derived class to customize the objects that are created. Use Import(string) to import a file.
- ImportStep
CImport and conversion of STEP files into CADability objects. there are some global settings, which influence the import:
- StepImport.Parallel: uses multi-threading during import
- StepImport.CombineFaces: adjacent faces with the same surface may be combined to a single face
- ImportStep.SyntaxError
Thrown while Read(string) parses the file when it does not follow the ISO 10303-21 syntax, e.g. when an expected delimiter is missing. Read(string) catches it and reports the message in Problems; the message names the offending line.
- InfoReader
Encapsulates the SerializationInfo.GetInfo function
- InterpolatedDualSurfaceCurve
The intersection curve of two surfaces for which no exact analytic description exists, typically the 3d curve of an Edge between two faces. It is defined by the two surfaces and an array of base points, each given in 3d and in the 2d parameter space of both surfaces; between the base points the curve is interpolated and, where needed, refined by intersecting the surfaces again. The 2d curves on the two surfaces are provided by the nested InterpolatedDualSurfaceCurve.ProjectedCurve class.
- InterpolatedDualSurfaceCurve.ProjectedCurve
The 2d curve of an InterpolatedDualSurfaceCurve in the parameter space of one of its two surfaces, returned by CurveOnSurface1 and CurveOnSurface2. It has no geometry of its own but is evaluated from the base points and surfaces of the 3d curve, so it always stays consistent with it; it serves as the 2d curve of an Edge on the faces of the intersected surfaces.
- JsonSerialize
CADability's own JSON serializer, which writes and reads graphs of IJsonSerialize objects (a Project with all its models, objects and attributes) to and from a stream: ToStream(Stream, object, bool) writes, FromStream(Stream) reads. Each object is written once and referenced afterwards, so shared objects and cycles are preserved; types are stored by name and resolved when reading, where the ResolveType event lets an application map renamed types. ReadFromFile(string) and WriteToFile(string) use it for the ".cdb" project files.
- JsonVersion
Attribute for classes and structs serialized by JsonSerialize: version is the format version of the type, which is available as Version when the object is read, so that SetObjectData(IJsonReadData) can handle data written by older versions; serializeAsStruct makes the object be written inline as a sequence of values (the type then needs a constructor taking an IJsonReadStruct) instead of as a referenced object.
- Kernel
P/Invoke declarations of the kernel32 functions and structures CADability uses (memory and system information). Taken from the Tao framework; the members are documented in the Windows API reference.
- Layout
A Layout defines the placement of one or more patches on a paper. A patch is the projection of a model into the two dimensional space with respect to scaling, projection direction, visibility of layers etc. A Layout can be viewed with the LayoutView and can be printed.
- LayoutView
A view that shows a Layout, i.e. the arrangement of one or more patches (projections of a model) on a sheet of paper, as it will be printed. The paper can be zoomed and scrolled; the paper size and the patches are shown as properties in the property page, and the context menu allows to add patches, to rename or remove the layout and to print it with the print settings of the project.
- LinearMovement
An IMovement which translates in the direction from a start point to an end point; the parameter u is the distance moved and the path of a point is a Line.
- ListToIArray<T>
Adapter which exposes a List<T> as an IArray<T> without copying it, so that a list can be passed to methods which take an IArray<T>, e.g. the fitting methods of GaussNewtonMinimizer. Reading and writing by index goes straight through to the list. Internal helper, not an entry point of the API.
- LookedUpEnumerable<T>
Enumerates a sequence and replaces each element by its value in a dictionary when the dictionary contains it, otherwise yields the element unchanged; used e.g. to map faces of a shell to the corresponding faces of a clone. Created by LookUp<T>(IEnumerable<T>, Dictionary<T, T>). Internal helper, not an entry point of the API.
- ManagedFontProvider
The default FontProvider: reads TrueType and OpenType font files (.ttf, .ttc, .otf, .otc) itself, so it needs neither GDI nor any other part of the operating system and works on Windows, Linux, macOS and in the browser. By default it uses the font directories of the system; more files or directories can be added. The named instances of a variable font (TrueType with "gvar" or OpenType with "CFF2") are faces of their own, with family names as GDI makes them, e.g. "Bahnschrift Light Condensed". Bitmap fonts are left out. A bold or italic face that a family does not have is synthesized from the closest face, as GDI+ does it (see CADability.SyntheticFontFace).
- ModOpException
Exception class for modification operations
- Model
A model is the container for the geometric objects (IGeoObject) of a Project. It owns the objects (see IGeoObjectOwner), keeps track of their extent, raises events when objects are added, removed or modified, maintains the display lists used by the views and knows the units of its world coordinate system. A project may contain several models; each ModelView shows one of them with a certain Projection.
- ModifiedMovement
An IMovement which applies a fixed transformation after another movement, i.e. the original movement seen in a transformed coordinate system. Nested modifications are collapsed into a single transformation.
- MultipleChoiceSetting
Wrappes an int value. The value represents a choice of severel predefined choices. It represents a setting defined by a name and a value. This setting can be displayed and modified in the control center. It is represented as a combo box. The label left of the combo box is given by the resourceId GetString(string), the values are
- MyExtensions
Extension methods used by the numerical fitting code: element-wise addition of double arrays and views of (two dimensional) arrays as IArray<T> (Row<T>(T[,], int), Column<T>(T[,], int), Linear<T>(T[,]), ToIArray<T>(T[])). Internal helper, not an entry point of the API.
- NameAlreadyExistsException
Thrown when the name of an object (e.g. a layer or a colour) is changed and the list that holds the object (e.g. the LayerList), in which names must be unique, already contains an object with that name. The user interface catches this exception when a name is edited and restores the old name.
- OctTree<T>
Generic class to provide fast access to IOctTreeInsertable implementing objects.
- OctTree<T>.Node<TT>
Definition of a node of this octtree.
- OpenGlCustomize
This class defines static events that can be used to customize the OpenGL implementation
- PageSetup
The page settings of a Project or a Layout for printing: the paper, its orientation, the margins and the printer. This is what project files contain instead of the GDI+
PageSettings, so that they can be written and read on every platform (issue #412). All lengths are in millimeters.
- PaintBuffer
Remnant of the former GDI based display implementation. Originally this class held one bitmap per PaintBuffer.DrawingAspect (background, drawing, selection, active objects), accumulated the invalid rectangles of each aspect via the InvalidateXxx methods and composed the bitmaps into the window on the paint event, raising a repaint event for each aspect whose invalid area was not empty. Today only the PaintBuffer.DrawingAspect enumeration (used by the views to invalidate and to register paint handlers for a specific aspect) and the static rectangle helpers Union(Rectangle, Rectangle) and RectangleFromPoints(params Point[]) are still in use; the invalidation and scrolling methods have no effect on the display.
- PaintTo3D
Some static helper methods
- PaintTo3DOutOfMemory
Exception which is thrown when the is not egnough memory for the 3D display driver
- PaintToSTL
An IPaintTo3D implementation which writes the triangles it is given to an ASCII STL file instead of displaying them: the faces are triangulated with the precision passed to the constructor and each triangle is written with its normal; curves, points and text are ignored. Used by ExportToSTL(string); dispose it to close the file.
- ParallelHelper
Helper for code running in parallel: LockMultipleObjects(params object[]) acquires the monitors of several objects and releases them when the returned object is disposed. All callers must pass the objects in the same order (e.g. sorted by an id), because the locks are taken in the given order and no deadlock avoidance is done. Used when the faces of a STEP file are built in parallel. Internal helper, not an entry point of the API.
- Parametric
Modifies a shell according to different operations. The operations are OffsetFaces, MoveFaces, ModifyRadius, ModifyFilletRadius (and more to come). The modification takes two steps: first applying the operation to the surfaces of the faces, second recalculating the egdes and vertices. This pair of steps may be repeated with different operations. Finally you get the result by calling Result(). If the modification is not possible, the result bwill be null.
The parametric must preserve the "topology" of the Shell: each face, edge, vertex in the provided shell must exactely correspond to a face, edge, vertex in the modified shell. And the modification must be possible, i.e. holes must be inside the shell, no self intersection of the shell and more constraints. The individual operations may yield invalid shells, while the result of several such operations may be valid.
- ParametricCenterProperty
Parametric property of a shell which keeps a set of faces (e.g. a hole or a boss) centered between or onto other objects of the shell: two vertices, edges or faces, or a single axis of a face of revolution. The Value is the ratio of the division (0.5 for the center). When it changes, the faces are translated by the vector computed by GetTranslationForCentering(IEnumerable<Face>, object, IEnumerable<object>, double) and the shell is recalculated. Instances are created by ParametricsCenterAction.
- ParametricDistanceProperty
Parametric property of a shell which keeps the distance between two sets of faces editable, e.g. the thickness of a plate or the depth of a pocket. The distance is measured between two reference objects (points, vertices, edges or faces, one on each side). When the value changes, the faces to move are translated along the measured direction by the difference (both sets by half of it in symmetric mode) and the shell is recalculated by a Parametric. Instances are created by ParametricsDistanceAction (and by
ParametricsExtrudeAction, which is not part of the build yet) and added to the shell with AddParametricProperty(ParametricProperty).
- ParametricProperty
The ParametricProperty is the base class for all parametric properties of a shell. The different derived classes know which parts of the shell (Faces, Edges, Vertices) define the property and what to do, when the value of that property changes. For the Execute(Parametric) and GetResult(Parametric) we need a Parametric object, which can handle succesive parametric modifications on a clone of the shell. The derived classes (ParametricXxxProperty) are typically created by an Action (ParametricXxxAction), which allows to specify faces, Edges and Vertices of the shell and other data.
- ParametricRadiusProperty
Parametric property of a shell which keeps the radius (or the diameter) of one or more faces with a radius (cylinders, spheres, tori, fillets; see ISurfaceWithRadius) editable, e.g. the diameter of a hole. When the value changes, the surfaces of the faces are replaced by surfaces with the new radius and the shell is recalculated by ModifyRadius(IEnumerable<Face>, double). Instances are created by
ParametricsRadiusAction, which is not part of the build yet.
- ParametricRotationProperty
Parametric property of a shell which keeps the angle between two sets of faces editable. The rotation axis is currently given by an edge whose two faces belong one to the backward and one to the forward faces (an axis defined by faces with an axis or a normal is planned). When the value changes, the forward faces are rotated about the axis by the difference (in symmetric mode both sets by half of it in opposite directions) and the shell is recalculated by RotateFaces(Dictionary<Face, ModOp>, Axis, bool). Intended to be created by ParametricsAngleAction; the implementation is not complete yet.
- ParametricsDistanceActionOld
Should be replaced by ParametricsDistanceAction Action to modify the distance between two objects. The objects may be faces or edges or vertices (also a mix of types). First we calculate the offset vector: vertex->face: perpendicular foot point, vertex->edge: perpendicular foot point, vertex->vertex: connection edge->edge: minimum distance, edge->face: minimum distance, face->face: parallel or minimum distance. (objects with axis should also offer their axis for distance)
- PerformanceTick
Simple class used for performance timing
- PerformanceTimer
Summary description for PerformanceTimer.
- PlaneException
Exception thrown by Plane when a plane cannot be constructed (e.g. from collinear points or parallel direction vectors) or when an intersection does not exist (e.g. a line parallel to the plane). ExceptionType tells which of the two happened.
- PlaneRef
A reference to a plane. The Plane is implemented as a struct, i.e. a value type. Sometimes it is necessary to have a parameter or member, which designates a plane but may be null (when the plane is not yet computed or not valid). This class works as an object replacement of the struct Plane.
- PolygonRegion
Turns a set of closed polygons that may intersect themselves and each other into non intersecting outline/hole groups, which is what a constrained (Delaunay) triangulation needs. The input follows the usual convention: counterclockwise loops are outlines, clockwise loops are holes; the region described by the input is the set of points with a winding number of 1 or more.
Such polygons appear when the outline of a Face is approximated by polylines: two curves that touch tangentially (or a hole that comes very close to the outline) are approximated with different points, so their polygons cross each other even though the curves do not. The crossings are small and unavoidable, but they make the input invalid for a constrained triangulation.
The implementation computes the planar arrangement of all segments: all segments are split at their mutual intersections, the resulting graph is traversed face by face and each face gets its winding number. The boundary of the faces with a winding number of 1 or more is the result. Everything is done with line segments only, no Border, SimpleShape or CompoundShape is involved.
- Polynom
A Polynom in multiple variables, often named x,y,z, but may be any dimension. e.g. ax³ + bx²y + cxy² +dy³ + ex² + fxy + gy² + hx + iy + j (deg(ree)==3, dim(ension)==2: (x,y))
- Precision
Precision specifies the order of size of a typical model. For example two points are considered geometrically equal if their distance is less than Precision.eps. Default value for Precision.eps is 1e-6. Precision.epsa is the angular precision. Two directions are considered equal if their angular difference is less than Precision.epsa.
- PrecisionOverride
Use this class to temporary override the values for the precision. The best way to use this class is the C# using statement. The constructor of this class overrides the values of Precision for the current thread, other threads keep their values. The Dispose() method restores the previous values, it must be called on the same thread (so there must be no await inside the using statement), otherwise it throws an InvalidOperationException. A value that is not positive keeps the value that is valid when the override is made.
- PrintToGDI
An IPaintTo3D implementation which draws with GDI+ (System.Drawing) instead of OpenGL: it collects the paint calls as print items in a QuadTree<T>, determines their visibility and draws them to a Graphics object. It is used to print a LayoutView or a GDI2DView (PrintSinglePage(Project, string, bool, PrintDocument), OnPrintPage(object, PrintPageEventArgs)), to render a model into a Bitmap (PrintToBitmap(Model, Projection, Layer[], bool, bool)) and for the display of the GDI2DView. Not available in the WebAssembly build.
- Project
A Project is the database CADability works on. A Project is serializable and contains one or more Models (which contain GeoObjects) lists of attributes, views and UserData. A Project is usually saved in a file.
- ProjectException
Exception thrown by methods of Project when they are called with invalid arguments, e.g. SetActiveModel(int) with an index that is out of range. ExceptionType tells the reason.
- ProjectSerializationException
Exception for errors when a project file is read, e.g. a file written by a newer version of CADability. ResourceId names the entry of the StringTable with the message for the user. ReadFromFile(string) catches it and returns null. The current code does not throw it itself, it remains for projects or deserialization constructors of user objects that do.
- ProjectedCurve
A 2d curve as a projection of a 3d curve onto a surface. Sometimes it is easier to calculate points in 3d than in 2d. Then we use this as a more exact for of the curve than we get, when we approximate the curve in 2d.
- ProjectedModel
The projection of a Model with a certain Projection for the display in a ModelView. It keeps display lists of the model's objects per layer, the set of visible layers and the 2d extent of the projected model, and it follows changes of the model so that the display lists are updated. It also provides the hit testing and the intersection queries (e.g. for trimming and extending curves) that the actions need on the projected objects.
- Projection
A parallel or perspective projection which is used to convert the 3-dimensional world coordinate system to a 2-dimensional screen coordinate system or to a normalized 3-dimensional cube for the paint or rendering interface (IPaintTo3D). Contains also additional hints for the paint interface and the drawing plane.
- Projection.PickArea
Class defining the span or scope in the world coordinate space defined by a axis aligned rectangle in a view or on the screen. The area defined by this object is either a rectangular prism of infinite length in the direction of the view (in case of the parallel view) or a frustum (in case of a perspective view). The pickarea is created by the GetPickSpace(Rectangle), GetPickSpace(RectangleF) or GetPickSpace(BoundingRect).
- QuadTree
A QuadTree of 2-dimensional objects that implement IQuadTreeInsertable. This Class might change in future, so the use of this class is deprecated
- QuadTree<T>
A quadtree of 2d objects which implement IQuadTreeInsertable: the plane is recursively divided into quadrants so that the objects at a position or in a rectangle can be found without testing all of them (GetObjectsFromRect(BoundingRect), GetObjectsCloseTo(T), ObjectsFromRect(BoundingRect)...). Objects are added with AddObject(T); a leaf is split when it holds more than MaxListLen objects, down to a depth of MaxDeepth. Used e.g. for picking in 2d, for the triangulation of faces and for intersecting 2d curves. This generic version supersedes the older non-generic QuadTree.
- RemoveFillet
Removes fillets (rounded edges) from a shell: given the fillet faces (faces whose surface is the extrusion of an arc, i.e. cylindrical or toroidal rounding faces, and the spherical faces where fillets meet), the faces which the fillets connect are extended again until they intersect and the fillet faces are removed. The shell is cloned in the constructor; Result() returns the modified clone, or null when the fillets could not be removed consistently. Used by the context menu of a selected fillet face.
- RemovingFromListEventArgs
Used as a parameter in the event RemovingFromListDelegate. When handling an appropriate event, you can prevent the object beeing removed from the list.
- ReversibleChange
This class contains the information to undo a change in the project database. Undoing a change is done by reflection. So we need an object, the name of a method or a property and the parameters to use in the call. This information must be provided in the constructor. The method or property must have public access.
- RotationMovement
An IMovement which rotates about an Axis; the parameter u is the angle in radians and the path of a point is a circular arc (Ellipse). The movement is periodic.
- RuledSurface
Surface definition of a surface defined by two curves. Both curves use the standard parameter interval from 0.0 to 1.0 The u-direction is provided by a combination of the two curves. The v parameter is defined by a line starting on the first curve and ending on the second curve. It is the surface described by a wire or rubber band synchronously moving along the two curves. the default parameter space is 0.0 to 1.0 on u and v.
- Schedule
A time table for an animation in the AnimatedView: for each IDrive of the model's DriveList it stores positions at points in time (AddPosition(IDrive, double, double)), and while the animation runs it sets each drive to the position linearly interpolated between the neighbouring times. It is also the property entry which shows and edits the time table in the control center. The schedules of a model are kept in AllSchedules.
- ScheduleList
The list of the Schedules of a Model (see AllSchedules). Schedules are added with Add(Schedule), removed with Remove(Schedule) and found by name with Find(string); the list is serialized together with the model.
- Settings
This class is used to give access and store information that influences global behavior of the CADability system. There is a static variable GlobalSettings. This is the only use of settings in CADability. This class behaves as a hierarchical dictionary. The keys are strings, which may have the form "mainkey.subkey" The values are objects, i.e. any kind of data. If the objects implement the IShowProperty interface they are displayed in the global setting tab of the controlcenter. There are some classes like ColorSetting, IntegerProperty, DoubleProperty, StringProperty which can be used as a setting value. If you instead simply use a double or string value the setting will be only available to programming code but not to the user in the ControlCenter.
- SettingsException
Exception thrown by the methods of the Settings class, e.g. when a setting is accessed with an invalid name.
- SettingsGlobalFileName
Lets the application control where the global settings (GlobalSettings) are stored: attach a handler to GetGlobalSettingsFileName before the settings are first used to provide the file name, set neverSaveGlobalSettings to suppress saving, or set neverLoadGlobalSettings to start with default settings instead of reading the file, e.g. when the application stores the settings itself. Without a handler the file "CADability.GlobalSettings.json" in the current directory is used if it exists there and the directory is writable, otherwise the same file in the local application data folder (or in "My Documents" if that is not available).
- ShapeMiddelLine
Computes the middle lines (center lines) of a CompoundShape, in particular of the outline of a text glyph: the shape is rasterized with several families of hatch lines, the midpoints of opposite sections of the outline are connected to polylines, and these are merged and cleaned up. Used by Text to produce single stroke center lines of characters, e.g. for engraving.
- ShortConnection
Tries to find a good solution for the (metric) "travelling salesman problem". This is still prliminary and may change in future.
- StringHelper
String utilities: RemoveExtraStrings(string, string) removes repeated occurrences of a substring, used when a typed number contains the decimal separator more than once. Internal helper, not an entry point of the API.
- SweptArc
A GeneralSweptCurve surface which sweeps an elliptical or circular arc along a curve; Debug(ICurve) creates a test instance with a semicircle. Experimental, not used by the kernel.
- Symmetry2D
Finds the mirror axes of a set of 2d points or of a Path2D. The axes all pass through the centroid, which is where a mirror axis of a symmetric figure has to lie.
- ToIArray<T>
Convert a simple one dimensional array to an IArray Use someArray.ToIArray()
- UndoFrameException
Exception class for the UndoFrame class
- UndoRedoSystem
The undo/redo sytem usually exists as a member in the Project and is accessed via Undo. The project handles the menu commands "MenuId.Edit.Undo" and ""MenuId.Edit.Redo" and calls UndoLastStep() rsp. RedoLastStep(). To add a step to the undo system call AddUndoStep(ReversibleChange)
- UndoStep
Collects ReversibleChange objects that belong to one undo step, to be undone together with Perform(). The UndoRedoSystem groups the changes with its own frames and does not use this class.
- User
The user32 functions CADability needs for OpenGL: getting and releasing the device context of a window.
- UserData
A table, that associates names with objects. Its purpose is to attach any kind of (user) information to existing CADability objects. Many objects of the CADability namespace provide a UserData property, by means of which you can connect any object to it. If the object is serializable, it will be serialized together with the CADability object. If it implements IClonable it will be cloned when the containing object is cloned. If it implements IShowProperty it will be displayed together with the object in the ControlCenter. If it implements IMultiObjectUserData it will be displayed as a common property when multiple objects are displayed in the ControlCenter
- Vertex
Describes a vertex of an Edge. A vertex is the start or endpoint of an edge. It connects at least two edges but can belong to any number of edges.
- VoxelTree
Describes a 3d object (curve or face) in a voxel representation at a dynamic resolution.
- Wgl
The wgl functions and constants of opengl32.dll that connect OpenGL to a Windows device context (rendering contexts, pixel formats, font outlines), as P/Invoke declarations taken from the Tao framework.
- monom
A single term of the polynom
Structs
- Angle
An angle defined in radians. The value of the angle is a double which is greater or equal to 0 and less than (and not equal) 2*pi. Via cast operators the angle seamlessly operates as a double.
- Axis
An axis given by a location and a direction. There is no orientation for an x-direction or y-direction. If you need that use CoordSys
Keep in mind that this is a value type. Passing a value type as a (non ref) parameter and changing it's value inside the invoked method leaves the original unchanged.
- BoundingCube
Represents a bounding cuboid, that is an extent in 3 dimensions
- BoundingRect
BoundingRect is an axis oriented rectangle or a 2-dimensional bounding box. It is implemented as a "struct" (value type) so assignements always make a copy.
- ClipRect
An axis aligned 2d rectangle (Left, Right, Bottom, Top) which provides primitive clipping functions: classification of points by outcodes (Cohen-Sutherland), clipping of line segments and fast hit tests of line segments against the rectangle. Used by the 2d curves and borders for hit testing.
- CoordSys
normalized, right handed coordinate system
- Gdi.ABC
Managed image of the Windows ABC structure: the width of a character as returned by GetCharABCWidths(nint, uint, uint, ABC[]), where abcA is the space before the glyph, abcB the width of the glyph itself and abcC the space after it.
- Gdi.GLYPHMETRICSFLOAT
Managed image of the Windows GLYPHMETRICSFLOAT structure, which describes the bounding box, origin and advance of a glyph of an outline font as returned by wglUseFontOutlines.
- Gdi.KERNINGPAIR
Managed image of the Windows KERNINGPAIR structure: the kerning amount for a pair of characters of a font, as returned by GetKerningPairs(nint, int, KERNINGPAIR[]) and used by the text rendering to place the glyphs.
- Gdi.PIXELFORMATDESCRIPTOR
Managed image of the Windows PIXELFORMATDESCRIPTOR structure, which describes the pixel format of a drawing surface (color and depth buffer bits, double buffering, OpenGL support); used with ChoosePixelFormat(nint, ref PIXELFORMATDESCRIPTOR) and SetPixelFormat(nint, int, ref PIXELFORMATDESCRIPTOR) when an OpenGL rendering context is created.
- Gdi.POINTFLOAT
Managed image of the Windows POINTFLOAT structure: a point with single precision coordinates, used in Gdi.GLYPHMETRICSFLOAT.
- GeoPoint
A 3-dimensional point with double components. The components are directly accesible to achieve maximum speed.
note
Keep in mind that this is a value type. Passing a value type as a (non ref) parameter and changing it's value inside the invoked method leaves the original unchanged.
- GeoPoint2D
A 2-dimensional point with double x and y components.
Keep in mind that this is a value type. Passing a value type as a (non ref) parameter and changing it's value inside the invoked method leaves the original unchanged.
- GeoVector
A 3-dimensional vector with double x,y and z components. The vector is not necessary normalized.
Keep in mind that this is a value type. Passing a value type as a (non ref) parameter and changing it's value inside the invoked method leaves the original unchanged.
- GeoVector2D
A two dimensional vector with double x and y components.
Keep in mind that this is a value type. Passing a value type as a (non ref) parameter and changing it's value inside the invoked method leaves the original unchanged.
- Glu.GLUnurbs
Handle of a GLU NURBS renderer (
GLUnurbs*in the C API), created by gluNewNurbsRenderer() and passed to thegluNurbs...functions.
- ImportSVG.Vector2
A 2d point or vector in SVG user coordinates (single precision), as passed to the path related CreateXxx methods. Addition and subtraction are provided for the relative path commands.
- Kernel.MEMORYSTATUS
The MEMORYSTATUS structure contains information about the current state of both physical and virtual memory.
The GlobalMemoryStatus(out MEMORYSTATUS) function stores information in a MEMORYSTATUS structure.
- Kernel.SYSTEM_INFO
The SYSTEM_INFO structure contains information about the current computer system. This includes the architecture and type of the processor, the number of processors in the system, the page size, and other such information.
- Kernel.SYSTEM_INFO_UNION
Union for the OemId, ProcessorArchitecture, and Reserved fields of the Kernel.SYSTEM_INFO structure.
- Matrix4
Homogenuos matrix for 3 dimensions, i.e. 4x4 matrix. Mainly used for perspective views.
- ModOp
A 3-dimensional modification operation implemented as a homogenous matrix 4*3. You can apply such a modification to GeoPoints or GeoVectors or you can use it for GeoObjects Modify(ModOp). If you want to move, rotate, scale reflect or generally modify a GeoObject you will need this class. Use the static methods to create ModOps that do a required modification (like Rotate(GeoVector, SweepAngle), Translate(GeoVector) etc.
- ModOp2D
A 2-dimensional modification operation implemented as a homogenous matix 3*2. You can apply such modificaion to GeoVector2D and GeoPoint2D points or to ICurve2D implementing objects.
- Plane
A simple plane as a value type. Is used e.g. as a drawing plane, an intersection plane etc. It also serves as a coordinate system (see CoordSys).
- SweepAngle
A sweep angle. Typically the value of this object is between -2pi and +2pi. Used for rotation operations etc.
- WebGLData
A triangle mesh with a single colour, as IConvertForWebGL objects provide it to ExportToWebGl.
Interfaces
- IArray<T>
Interface to access a collections as an array. Mainly used for twodimensional array to access rows or columns as simple array without copying the contents. Or access a twodimensional array as a one dimensional array.
- ICanvas
Interface must be implemented by a view, which is hosted in a CadCanvas
- IConvertForWebGL
Implemented by IGeoObjects that are not among the types ExportToWebGl handles itself and want to take part in the export: the exporter first asks for Data and uses the meshes when there are any, otherwise it exports Conversion in place of the object.
- IDisplayHotSpots
Implemented by property entries (typically the property entry of a selected object) which display hotspots: draggable handles in the drawing area which represent properties of the object, e.g. a point or a length. The SelectedObjectsProperty of the SelectObjectsAction subscribes to HotspotChangedEvent to learn when hotspots are to be shown, hidden, selected or moved. The hotspots themselves implement IHotSpot.
- IDrive
Methods and properties common to all drive objects
- IDualSurfaceCurve
A curve which lies on two surfaces, typically the intersection curve of two surfaces: it provides the 3d curve (Curve3D), the two surfaces and the 2d curve in the parameter space of each surface. Surfaces return such curves from GetPlaneIntersection(PlaneSurface, double, double, double, double, double) and GetDualSurfaceCurves(BoundingRect, ISurface, BoundingRect, List<GeoPoint>, List<Tuple<double, double, double, double>>); the boolean operations use them to build the Edges between the intersected faces.
- IExplicitPCurve2D
Implemented by 2d curves which can be represented piecewise by polynomials in their parameter (currently BSpline2D): GetExplicitPCurve2D() returns that representation as an ExplicitPCurve2D. Internal helper of the 2d intersection algorithms.
- IExplicitPCurve3D
Implemented by 3d curves which can be represented piecewise by polynomials in their parameter (currently BSpline): GetExplicitPCurve3D() returns that representation as an ExplicitPCurve3D, which is used for intersections with implicit polynomial surfaces (IImplicitPSurface) and for finding the position of a point on the curve. Internal helper of the intersection algorithms.
- IExportStep
Implemented by the objects (solids, shells, faces, curves, blocks...) and the surfaces that can be written to a STEP file by ExportStep.
- IFinishDeserialization
[Deprecated], Implement this interface to receive the "DeserializationDone" callback after the object is deserialized. To receive this callback you also hav to add your object to the appropriate list by doing the following on the Constructor (SerializationInfo info, StreamingContext context):
FinishDeserialization fd = context.Context as FinishDeserialization; if (fd!=null) fd.Add(this);
- IFrame
The application frame: the central object that holds the open Project, its views, the stack of running actions, the control center (properties explorer) and the user interface services, and that routes menu commands and settings. Actions, views and property entries reach the rest of the application through this interface. The kernel provides the implementation FrameImpl, from which the concrete application derives (e.g.
CadFramein CADability.Forms). The current frame is also available as MainFrame.
- IHotSpot
Interface implemented by HotSpots.
- IImplicitPSurface
Implemented by surfaces which can be described by an implicit polynomial equation P(x,y,z)=0 (currently ToroidalSurface): GetImplicitPSurface() returns that polynomial as an ImplicitPSurface. Substituting a polynomial curve (IExplicitPCurve3D) into it yields a polynomial in one variable whose roots are the parameters of the intersection points, which is how the intersections of such surfaces with splines are computed. Internal helper of the intersection algorithms.
- IJsonProgress
Receives the progress of FromStream(Stream, IJsonProgress) and ToStream(Stream, object, IJsonProgress, bool). The progress runs from 0 to 100 percent in phases: each phase sets the size of its steps with SetStepIncrement(double) and then reports the steps it has done with DoStep(int). Reading parses the text (15 percent, a step per character), calls OnDeserialization (5 percent) and SerializationDone (80 percent); writing does a step per IGeoObject, so the caller sets the step size before writing.
- IJsonReadData
The data an object receives in SetObjectData(IJsonReadData): typed access by name to the properties which GetObjectData(IJsonWriteData) wrote. Reading a missing property throws, unless HasProperty(string), TryGetProperty<T>(string, out T) or GetPropertyOrDefault<T>(string) is used; Version is the JsonVersion of the type with which the data was written. Referenced objects may not be completely read yet when they are returned, see IJsonSerializeDone.
- IJsonReadStruct
The data passed to the constructor of a type which is serialized inline as a sequence of values (see serializeAsStruct, e.g. ModOp or CoordSys): each call of GetValue<T>() returns the next value in the order in which AddValue(object) or AddValues(params object[]) wrote them.
- IJsonSerialize
Implemented by all objects which can be saved to and loaded from CADability's JSON based ".cdb" files by JsonSerialize: GetObjectData(IJsonWriteData) writes the properties of the object to the provided IJsonWriteData, SetObjectData(IJsonReadData) reads them back. The type needs a parameterless constructor (it may be non-public), which is called before SetObjectData(IJsonReadData); objects which need a second pass after all objects have been read also implement IJsonSerializeDone.
- IJsonSerializeDone
Implement this interface if your object needs a callback after the first pass of the serialisation/deserialisation. To ensure this interface of your object is called, you must call CADability.JsonSerialize.RegisterForSerializationDoneCallback(CADability.IJsonSerializeDone), in the implementation of GetObjectData(IJsonWriteData) or SetObjectData(IJsonReadData). When the object is beeing read, the properties might be empty objects in the first pass. When SerializationDone(JsonSerialize) is called all properties had their first pass, i.e. SetObjectData(IJsonReadData) has been called on those objects. When the object is beeing written, this mechanism provides the opportunity to modify the object in GetObjectData(IJsonWriteData) and restore it in SerializationDone(JsonSerialize)
- IJsonVersion
Intended for types which provide their assembly name and format version by code instead of by the JsonVersion attribute. Not evaluated by JsonSerialize, currently unused.
- IJsonWriteData
The sink an object writes to in GetObjectData(IJsonWriteData): named properties (AddProperty(string, object)) for ordinary objects, or a sequence of unnamed values (AddValue(object), AddValues(params object[])) for types serialized inline (see serializeAsStruct). Values may be primitive values, strings, arrays and lists of them and other IJsonSerialize objects.
- IMovement
A movement in space parameterized by u: GetPosition(double) returns the rigid transformation for parameter u, GetCurve(GeoPoint, double, double) the path a point takes between two parameters, StartDirection the direction of the movement at its start. Implemented by LinearMovement, RotationMovement, CurveMovement and ModifiedMovement, intended for defining swept surfaces by moving a curve. Experimental, not used by the kernel yet.
- IMultiObjectUserData
Implement this interface on your UserData objects if you want your UserData to be displayed as a common property of multiple selected objects.
- INamedAttribute
All Attributes for IGeoObject objects (e.g. Layer) are identified by name. They all implement this interface
- INotifyModification
Objects implementing this interface raise the DidModifyEvent (a DidModifyDelegate) whenever they are modified in a relevant way.
- IOctTreeInsertable
Implemented by objects which can be stored in an OctTree<T>: the tree asks the object for its extent and whether it is hit by a cube when it sorts the object into its nodes, and whether it is hit by a projected rectangle or a line when the tree is searched by a pick rectangle or a ray. All GeoObjects implement it (IGeoObject extends it), as do Face, Edge, Vertex and various internal helper objects.
- IPaintTo3D
Interface to paint on a OpenGL, DirectX, GDI or some other output device. This interface may still change in future it is provided for informational purposes only.
- IPaintTo3DFlatText
Optional extension of IPaintTo3D: implementations that render triangulated faces with scene lighting can render text glyphs flat (unlit, in the plain current color) while FlatTextMode is set. The font cache sets this mode when tesselating characters, so text keeps exactly the color of its ColorDef instead of being brightened or darkened by the lighting like a 3D surface.
- IPaintTo3DList
A display list of an IPaintTo3D implementation: a recorded sequence of paint calls which can be painted again quickly with List(IPaintTo3DList) or SelectedList(IPaintTo3DList, int). It is created by recording the calls between OpenList(string) and CloseList() or by combining lists with MakeList(List<IPaintTo3DList>); the model keeps one list per layer for its faces and one for its curves. Dispose it when it is no longer needed to free the resources of the graphics system.
- IQuadTreeInsertable
Interface for objects which can be inserted into a QuadTree. The quadtree can thus hold not only IGeoObjects but any objects that implement this interface, e.g. 2d curves or borders: an object has to provide its 2d extent and a hit test against a rectangle.
- ISchedule
Sets the positions of the drives of an animation for a point in time: StartAnimation(ISchedule, double, double, double) calls SetDrivePositions(double, AnimatedView) for each frame. Implemented by Schedule, which interpolates between stored time/position pairs; an application may provide its own implementation to control the drives by code.
- ISettingChanged
Implemented by objects that can be values of a Settings object and can be changed interactively, e.g. BooleanProperty, ColorSetting, MultipleChoiceSetting and Settings itself (for sub settings). The containing Settings object subscribes to the event to notice changes of its values and forwards them as its own SettingChangedEvent.
- IView
Interface of a view that shows a Model (or, in case of the LayoutView, a Layout) and is hosted in an ICanvas. The canvas forwards the paint, mouse, scroll and drag and drop messages of the framework to the view, and the view uses the canvas to invalidate the display and to set the cursor. The actions (Action) use the view to pick and snap objects, to register paint handlers for their feedback and to convert between screen and world coordinates via its Projection. The implementations are ModelView (the normal 3d view), GDI2DView, LayoutView and AnimatedView; the view that currently receives the input is ActiveView.
- QuadTree<T>.IIterateQuadTreeLists
Callback for walking the tree node by node: Iterate(ref BoundingRect, HashSet<T>, bool) is called with the rectangle and the objects of each node and decides with the returned QuadTree<T>.IterateAction whether and how to continue below that node. Used internally by the GDI printing (PrintToGDI) to resolve the visibility of the print items.
Enums
- BRepItem.ItemType
The kind of topological object a BRepItem stands for: Vertex (the vertex field is set, for an intersection vertex also edge and face), Edge (edge is set) or Face (face is set).
- BRepOperation.Operation
Selects what a BRepOperation computes: union (the hull of both shells, see Unite(Solid, Solid)), intersection (the common part, see Intersect(Solid, Solid)), difference (the first shell minus the second, see Subtract(Solid, Solid)), clip (a face is clipped by a shell, see ClipFace(Face, Shell)), connectMultiple (a set of faces is intersected and connected to shells, see BRepOperation(IEnumerable<Face>)) and testonly (stop at the first intersection found; used to test whether two shells collide).
- BoundingRect.Position
The location of a point relative to a bounding rectangle
- CoordSysException.tExceptionType
Enumeration of different causes of this exception
- DisplayChangeArg.DraggingModes
While dragging the scrollbarbutton Dragging is on
- DisplayChangeArg.Reasons
Reason
- GeoVectorException.tExceptionType
Type of exception.
- Grid.Appearance
How the grid is displayed in a view: dots (a dot at each grid point), marks (a small cross at each grid point), lines (horizontal and vertical lines through the grid points) or fields (the grid cells shaded like a checkerboard).
- HotspotChangeMode
What happened to a hotspot, as reported by HotspotChangedDelegate: Visible and Invisible when the hotspot is to be shown or hidden (e.g. the property entry it belongs to was opened or closed), Selected and Deselected when its selection state changed, Moved when its position changed.
- Layout.HorizontalCenter
Horizontal positioning
- Layout.VerticalCenter
Vertical positioning
- ModOp.ModificationMode
Kind of operation
- ModOpException.tExceptionType
ExceptionType
- Model.Units
Units
- ModelView.BackgroungTaskHandled
Which background paint tasks were handled by the PrePaintBackground event (flags, combine with "|")
- OctTree<T>.Side
Enumeration of the 6 sides of a cube.
- PaintBuffer.DrawingAspect
The layers of the display of a view, which are painted on top of each other and can be invalidated separately: Background (background color and grid), Drawing (the model), Select (the marks of the selected objects), Active (the feedback of the running action) and All (all of them). Used with Invalidate(DrawingAspect, Rectangle) and SetPaintHandler(DrawingAspect, PaintView).
- PaintCapabilities
Capabilities of the paint interface
- PaintTo3D.PaintMode
Selects what PaintFaces(PaintMode) paints: FacesOnly (the triangulated faces, with a small depth offset to the back), CurvesOnly (curves and edges, with a small depth offset to the front) or All (both).
- ParametricDistanceProperty.Mode
Flags which control how the distance is measured and how the faces are moved when the value changes.
- ParametricRotationProperty.Mode
Flags which control how the faces are rotated when the value changes.
- PickMode
How objects are selected or picked
- Plane.StandardPlane
Enumeration of the standard planes
- PlaneException.tExceptionType
The kind of failure:
ConstructorFailedwhen a plane could not be constructed from the given data (collinear points, parallel or null direction vectors),IntersectionFailedwhen an intersection does not exist, e.g. the line in Intersect(GeoPoint, GeoVector) is parallel to the plane.
- ProjectException.tExceptionType
The reasons for a ProjectException: InvalidModelIndex means that a model index is out of range.
- ProjectedModel.IntersectionMode
Selects which intersection points GetIntersectionParameters(ICurve, IntersectionMode) returns: OnlyInside only the intersections within the parameter range of the curve; BothExtensions also the intersections on the extension of the curve beyond its start and its end (for curves that can be extended, see IExtentedableCurve); StartExtension and EndExtension also use the extension, and for closed curves (arcs) count an intersection outside the curve as lying before the start resp. behind the end; InsideAndSelfIntersection like OnlyInside plus the self intersections of the curve.
- Projection.ArrowMode
Selects the kind of arrow made by MakeArrow(GeoPoint, GeoPoint, Plane, ArrowMode): circleArrow is an arrow with a circle at its start point and a head at its end point, twoArrows is intended for an arrow with heads at both ends. The current implementation makes the same arrow for both modes.
- Projection.StandardProjection
The standard parallel projections
- QuadTree<T>.IterateAction
The answer of Iterate(ref BoundingRect, HashSet<T>, bool) for a node: branchDone (do not descend into the sub nodes), goDeeper (continue with the sub nodes, if any) or goDeeperAndSplit (split the leaf into four sub nodes and continue with them, e.g. because it still holds too many objects to decide).
Delegates
- ActionStartedDelegate
Delegate for the ActionStartedEvent, which is raised when an action is started via SetAction(Action), after OnSetAction() has been called and before the action is activated.
- ActionTerminatedDelegate
Delegate for the ActionTerminatedEvent, which is raised when an action has been removed from the action stack, after OnRemoveAction() has been called.
- AnimatedView.GetTimeDelegate
Delegate for the GetTimeEvent. If not handeled the time is determined by the internal clock.
- AnimatedView.NextStepDelegate
Delegate for the NextStepEvent
- ControlCenterCreatedDelegate
Delegate for the ControlCenterCreatedEvent, which is raised when the control center (properties explorer) is assigned to the frame.
- DidModifyDelegate
Prototype for the notification of modifications. The project uses it for its IsModified flag, which is set whenever this event arrives from anywhere (GeoObjects, attribute lists).
- FrameImpl.DragDropDelegate
Delegate for handling a drag and drop event of the canvas. Currently not used by CADability.
- FrameImpl.DragGetDataDelegate
Delegate for providing the objects contained in data dragged onto the canvas. Currently not used by CADability.
- FrameImpl.FileNameChangedDelegate
Delegate for the FileNameChangedEvent.
- GaussNewtonMinimizer.CheckParameterFunction
Optional test whether the parameters computed by an iteration step are acceptable (e.g. a radius is positive). When it returns false, the GaussNewtonMinimizer.CurtailParameterFunction is applied to the parameters, and after more than three consecutive rejected steps the iteration stops.
- GaussNewtonMinimizer.CurtailParameterFunction
Optional correction applied in place to parameters which the GaussNewtonMinimizer.CheckParameterFunction rejected, e.g. clamping a value to its valid range or normalizing a direction, so that the iteration can continue from a valid point.
- GaussNewtonMinimizer.ErrorFunction
The residual function of the problem: computes for the given parameters the vector of error values whose sum of squares is minimized. The number of error values must be the same on every call.
- GaussNewtonMinimizer.JacobiFunction
Computes the Jacobi matrix of the GaussNewtonMinimizer.ErrorFunction at the given parameters: one row per error value and one column per parameter, holding the partial derivative of that error value with respect to that parameter.
- Grid.GridChangedDelegate
Signature of the handlers of GridChangedEvent, which is raised when the user changes the appearance, the visibility or the distances of the grid in the property page.
- HotspotChangedDelegate
Signature of the handlers of HotspotChangedEvent.
- JsonSerialize.ResolveTypeDelegate
Signature of the handlers of ResolveType: asked for the Type to instantiate when a type name read from a file cannot be resolved.
- LayoutView.RepaintActionDelegate
Handler for RepaintActionEvent.
- Model.AddingGeoObject
Delegate definition for the AddingGeoObjectEvent. Setting
cancelto true prevents the object beeing added to the model.
- Model.AddingGeoObjects
Delegate definition for the AddingGeoObjectsEvent.
- Model.CalculateExtentForZoomTotalDelegate
Delegate definition for CalculateExtentForZoomTotalEvent. If handeled must return the extent which is considered as the zoom total extent. Standard implementation will return
this.Extent.Project(pr)
- Model.ExtentChangedDelegate
Delegate definition for the ExtentChangedEvent.
- Model.GeoObjectAdded
Delegate definition for the GeoObjectAddedEvent.
- Model.GeoObjectRemoved
Delegate definition for the GeoObjectRemovedEvent.
- Model.GeoObjectsAdded
Delegate definition for the GeoObjectsAddedEvent.
- Model.GeoObjectsRemoved
Delegate definition for the GeoObjectsRemovedEvent.
- Model.ImportingObjectsDelegate
Delegate definition for the ImportingObjectsEvent. The handler may modify
importedObjects
- Model.NameChangedDelegate
Delegate definition for the NameChangedEvent.
- Model.RemovingGeoObject
Delegate definition for the RemovingGeoObjectEvent. Setting
cancelto true prevents the object beeing removed from the model.
- Model.RemovingGeoObjects
Delegate definition for the RemovingGeoObjectsEvent.
- ModelView.DisplayChangedDelegate
Handler for DisplayChangedEvent.
- ModelView.PaintBackgroundDelegate
Delegate definition for background painting event. The painting of the coordinate cross and arrows, the grid and the DrawingPlane can be modified using this event
- ModelView.ProjectionChangedDelegate
Delegate definition for notification of changes of the view position or direction
- MouseFilterDelegate
Filter mouse messages to the ModelView. return true, if you want to prevent further processing of the mouse message.
- OctTree<T>.Filter
Delegate definition of a filtering method restricting IOctTreeInsertable objects.
- OctTree<T>.FilterNode
Delegate definition of a filtering method restricting OctTree<T>.Node<TT>s.
- OctTree<T>.SplitTestFunction
Delegate definition of a criterion whether a node should be split when an object is added to it. When provided to the constructor it replaces the default criterion of SplitNode(Node<T>, T).
- OpenGlCustomize.SetProjectionDelegate
Delegate definition of SetProjectionEvent.
- PaintView
Handler for the paint events of a view (e.g. PaintBackgroundEvent or PaintSelectEvent), registered via SetPaintHandler(DrawingAspect, PaintView). The view calls it during its paint cycle after the model has been drawn, so that actions can draw additional objects (selection, feedback, active objects) with the paint engine of the view.
- ProcessCommandDelegate
Delegate definition for ProcessCommandEvent, which is raised when the user selects a menu command from the main menu.
- ProcessContextMenuDelegate
Delegate definition for ProcessContextMenuEvent, which is raised when a context menu is about to be executed.
- Project.BindToTypeDelegate
Delegate to enable the deserialization of objects that have been renamed or changed the version number.
- Project.ConstructionDelegate
Delegate for Constructor: creates a new, empty project, usually an object of a class derived from Project.
- Project.ModelsChangedDelegate
Delegate for ModelsChangedEvent.
- Project.ProjectModifiedDelegate
Delegate for ProjectModifiedEvent.
- Project.RefreshDelegate
Delegate for RefreshEvent.
- Project.ViewChangedDelegate
Delegate for ViewChangedEvent.
- ProjectClosedDelegate
Delegate for the ProjectClosedEvent, which is raised before the project in the frame is replaced by another one.
- ProjectOpenedDelegate
Delegate for the ProjectOpenedEvent, which is raised when a project has been set in the frame, before its views are connected and displayed.
- Projection.ProjectionChangedDelegate
Delegate definition for the ProjectionChangedEvent
- QuadTree<T>.CheckOne
Signature of the test passed to Check(IQuadTreeInsertable, CheckOne): called for the objects in the nodes which the reference object hits.
- RemovingFromListDelegate
List objects (e.g. HatchStyleList) raise this event, when an object is going to be removed. You may prevent this by setting the Refuse member in RemovingFromListEventArgs to true.
- ScrollPositionChanged
Handler for ScrollPositionChangedEvent: tells the host (typically the control that owns the scroll bars) which part of the total display extent of a view is currently visible. The view raises the event after zooming, scrolling or resizing.
- SettingChangedDelegate
A setting has been changed
- UIEventHandler
Delegate for notifications about a menu item or toolbar button becoming active or inactive. Currently not used by CADability.
- UndoRedoSystem.BeginContinousChangesDelegate
Signature of the handlers of BeginContinousChangesEvent, raised when a sequence of continuous changes starts, i.e. at the first change within a new context (see ContextFrame(object)), e.g. when the user starts dragging an object.
- UndoRedoSystem.ClosingUndoFrameDelegate
Signature of the handlers of ClosingUndoFrameEvent, raised when an undo frame is closed (see CloseUndoFrame(object)).
- UndoRedoSystem.EndContinousChangesDelegate
Signature of the handlers of EndContinousChangesEvent, raised when a sequence of continuous changes ends, i.e. when a change with a different context (see ContextFrame(object)) occurs or ClearContext() is called.
- UndoRedoSystem.OpeningUndoFrameDelegate
Signature of the handlers of OpeningUndoFrameEvent, raised when an undo frame is opened (see OpenUndoFrame() and UndoFrame); all changes until the frame is closed form a single undo step.
- UpdateCommandDelegate
Delegate for the UpdateCommandEvent, which is raised when the user interface wants to know the state (enabled, checked) of the menu item or toolbar button with the given id. A handler sets the flags in
CommandStateand setsProcessedto true to prevent the frame from determining the state itself.
- UpdateContextMenuDelegate
Delegate definition for UpdateContextMenuEvent, which is raised, when a context menu is about to be displayed.
- UserData.UserDataAddedDelegate
Signature of the handler of the UserDataAddedEvent.
- UserData.UserDataRemovedDelegate
Signature of the handler of the UserDataRemovedEvent.
- ValueChangedDelegate
Delegate for the notification of a change of a value
- ViewsChangedDelegate
Delegate for the ViewsChangedEvent, which is raised when views are created or removed, e.g. when a project is opened.