QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
InfoAreaCentroid Class Reference

This action adds an area 2D Centroid marker and text labels for a selected entity. More...

Inheritance diagram for InfoAreaCentroid:
InfoCentroids MiscInformation EAction RActionAdapter RAction

Public Member Functions

void beginEvent ()
 This GUI action adds a 2D centroid marker and detail labels for a selected entity.
 
void getArcArea (void arc)
 Arc RShape enclosed signed area (+CCW, -CW).
 
void getArcAreaCentroid (void arc)
 Arc RShape centroid data, including signed area (+CCW, -CW).
 
void getArcSectorArea (void arc)
 Arc RShape sector enclosed signed area (+CCW, -CW).
 
void getArcSectorAreaCentroid (void arc)
 Arc RShape sector centroid data, including signed area (+CCW, -CW).
 
void getArcSegmentArea (void arc)
 Arc RShape segment enclosed signed area (+CCW, -CW).
 
void getArcSegmentAreaCentroid (void arc)
 Arc RShape segment centroid data, including signed area (+CCW, -CW).
 
void getCircleAreaCentroid (void circle)
 Circle RShape centroid data, including enclosed area (+).
 
void getContourArea (void items)
 Placeholder: A single contour of connected items enclosed area (+).
 
void getContourAreaCentroid (void items)
 Placeholder: A single contour of connected items centroid data, including the total enclosed area (+).
 
void getContoursArea (void loops)
 Placeholder: Contours of connected items enclosed area (+).
 
void getContoursAreaCentroid (void loops)
 Placeholder: Contours of connected items centroid data, including the total enclosed area (+).
 
void getEllipseArcSectorArea (void ellipse)
 Ellipse arc RShape sector enclosed signed area (+CCW, -CW).
 
void getEllipseArcSectorAreaCentroid (void ellipse)
 Ellipse arc RShape sector centroid data including, enclosed signed area (+CCW, -CW).
 
void getEllipseArcSegmentArea (void ellipse)
 Ellipse arc RShape segment enclosed signed area (+CCW, -CW).
 
void getEllipseArcSegmentAreaCentroid (void ellipse)
 Ellipse arc RShape segment centroid data, including enclosed signed area (+CCW, -CW).
 
void getEllipseArea (void ellipse)
 Ellipse RShape enclosed (signed) area.
 
void getEllipseAreaCentroid (void ellipse)
 Ellipse RShape centroid data, including enclosed (signed) area.
 
void getFullEllipseArea (void ellipse)
 Full ellipse RShape enclosed area (+).
 
void getFullEllipseAreaCentroid (void ellipse)
 Full ellipse RShape centroid data, including enclosed area (+).
 
void getHatchedArea (void entity)
 Hatched differential area of a hatch entity (+).
 
void getHatchedAreaCentroid (void entity)
 Hatched centroid data of a hatch entity, including the differential hatched area (+).
 
void getHatchPolyLoops (void hatchData)
 Hatch boundary loops as polylines with line and arc segments.
 
void getOrientedHatchBoundaries (void hatch)
 Pre-oriented hatch boundary loops as polylines with line and arc segments.
 
void getPolygonArea (void polygon)
 Closed or open polyline RShape with line segments enclosed signed area (+CCW, -CW).
 
void getPolygonAreaCentroid (void polygon)
 Closed or open polyline RShape with line segments centroid data, including enclosed signed area (+CCW, -CW).
 
void getPolylineArea (void polyline)
 Polyline RShape enclosed signed area (+CCW, -CW).
 
void getPolylineAreaCentroid (void polyline)
 Polyline RShape centroid data, including enclosed signed area (+CCW, -CW).
 
void getSplineArea (void spline)
 Spline RShape enclosed signed area (+CCW, -CW).
 
void getSplineAreaCentroid (void spline)
 Spline RShape centroid data, including enclosed signed area (+CCW, -CW).
 
void getSupportedAreaCentroidType (void entity)
 Diversifies uniform density area centroids supported entity type or -1 when not supported.
 
void InfoAreaCentroid (void guiAction)
 
void isSelfIntersectingPoly (void shape)
 Verifies if the given open/closed polyline shape is self-intersecting.
 
void selectionAreaCentroid (void di)
 Main InfoAreaCentroid loop.
 
- Public Member Functions inherited from InfoCentroids
void addCentroidMarker (void doc, void op, void dataC, void radius, void preview)
 Adding 2D Centroid marker to a given operation.
 
void addTextLabel (void doc, void op, void pos, void offset, void text)
 Adding text labels to a given operation.
 
void advanceSelection (void di, void transaction)
 Advance the selection to the added marker (polyline).
 
void beginEvent ()
 Called when the user starts this action by clicking a button, choosing a menu, entering a command, etc.
 
void formatCmdValue (void value, void digits)
 Format a value textual for reporting on the command History.
 
void formatCoordinate (void valueX, void valueY)
 Format a pair of values textual as coordinate.
 
void formatLabelValue (void value, void decPnt, void digits, void trailingZ)
 Format a value textual for a 2D Centroid label.
 
void formatPropValue (void value)
 Format a value textual for storing properties.
 
void getMarkerSize ()
 Defines a 2D Centroid marker size based on overall box and drawing font size.
 
void getRunningSumKBK (void list)
 Sums values in an array by 'A generalized Kahan–Babuška-Summation-Algorithm' proposed by Klein.
 
void getTitle ()
 
void InfoCentroids (void guiAction)
 
void mergeBoxWith (void item)
 Accumulate a given item to an overall box size.
 
- Public Member Functions inherited from MiscInformation
void getTitle ()
 
void MiscInformation (void guiAction)
 
- Public Member Functions inherited from EAction
void applyCommand (void event, void preview)
 High level event triggered when a command line command should be applied or previewed.
 
void applyOperation ()
 Applies the operation returned by this.getOperation().
 
void commandEvent (void event)
 Default implementation.
 
void commandEventPreview (void event)
 Default implementation.
 
void complementOperation (void op)
 Can be reimplemented to complement the operation of an action.
 
void coordinateEvent (void event)
 Default implementation.
 
void coordinateEventPreview (void event)
 Default implementation.
 
void createDialog (void uiFile, void parent)
 Creates a new dialog based on the given UI file with the given parent.
 
void createWidget (void uiFile, void parent)
 Creates a new widget based on the given UI file with the given parent.
 
void EAction (void guiAction)
 
void enterEvent ()
 Called when user presses enter.
 
void entityPickEvent (void event)
 Default implementation.
 
void entityPickEventPreview (void event)
 Default implementation.
 
void escapeEvent ()
 Called when the user presses Escape or clicks the right mouse button.
 
void finishEvent ()
 Called when this action is terminated.
 
void getAuxPreview ()
 Called by updatePreview.
 
void getClassName ()
 
void getDocumentInterface ()
 
void getEntityId (void event, void preview, void selectable)
 
void getGraphicsView ()
 
void getGraphicsViews ()
 
void getHighlightedEntities ()
 Called by updatePreview.
 
void getOperation (void preview)
 Called by updatePreview and applyOperation.
 
void getScales ()
 
void getToolTitle ()
 
void handlePreviewError ()
 Called by updatePreview.
 
void hideOptionsToolBarWidgets (void widgets, void noSyncWidgets)
 Hides all widgets in the options tool bar which are shown in the tool dialog instead.
 
void hideUiOptions (void saveToSettings)
 Hides the UI options of this action.
 
void initDialog (void dialog)
 Called before dialog is shown.
 
void initState ()
 Called to initialize a new state of this action.
 
void initUiOptions (void resume, void optionsToolBar, void forDialog)
 Overwrite to initialize combo boxes and other UI elements of the options tool bar.
 
void isEntityEditable (void e)
 
void isEntitySnappable (void e)
 
void keyPressEvent (void event)
 Called when the user presses a key.
 
void keyReleaseEvent (void event)
 Called when the user releases a key.
 
void mouseDoubleClickEvent (void event)
 
void mousePressEvent (void event)
 Does nothing.
 
void mouseReleaseEvent (void event)
 
void pickCoordinate (void event, void preview)
 High level event triggered when a coordinate was specified by the user of a coordinate specification should be previewed.
 
void pickEntity (void event, void preview)
 High level event triggered when an entity was picked by the user or to preview picking an entity.
 
void postOperation (void transaction)
 Can be reimplemented to work with the transaction returned by the operation.
 
void propertyChangeEvent (void event)
 Allows all actions to handle property change events.
 
void resumeEvent ()
 Called whenever the action resumes its operation, for example after it was temporary suspended for another action.
 
void setArrowCursor ()
 Sets the current cursor of the current document interface (all views attached to it) to the normal arrow cursor.
 
void setCommandPrompt (void prompt)
 
void setCrosshairCursor ()
 Sets the current cursor of the current document interface (all views attached to it) to crosshair cursor.
 
void setCursor (void cursor, void name)
 
void setLeftMouseTip (void tip)
 
void setRightMouseTip (void tip)
 
void setState (void state)
 Set the state of this action.
 
void setUiOptions (void uiFile, void split)
 Sets the UI options toolbar content for this tool.
 
void showDialog ()
 Show dialog to enter some or all of the options.
 
void showUiOptions (void resume, void restoreFromSettings)
 Shows the UI options of this action if this.uiFile is set.
 
void simulateMouseMoveEvent ()
 
void slotReset ()
 Called if the user clicks the reset button of an action.
 
void suspendEvent ()
 Called whenever the action is suspended, for example if another action is started while this action is active.
 
void updatePreview (void clear)
 Updates the preview based on the operation returned by getOperation and the auxiliary construction returned be getAuxPreview.
 
- Public Member Functions inherited from RActionAdapter
virtual void commandEvent (RCommandEvent &)
 Called when a command is entered in the command line.
 
virtual void commandEventPreview (RCommandEvent &)
 Called when a command is being edited in the command line.
 
virtual void coordinateEvent (RCoordinateEvent &)
 Called for every coordinate event.
 
virtual void coordinateEventPreview (RCoordinateEvent &)
 Called if the action is in PickCoordinate mode and the mouse is moved around.
 
virtual void entityPickEvent (REntityPickEvent &)
 
virtual void entityPickEventPreview (REntityPickEvent &)
 
virtual void keyPressEvent (QKeyEvent &)
 
virtual void keyReleaseEvent (QKeyEvent &)
 
virtual void mouseDoubleClickEvent (RMouseEvent &)
 Called on mouse double click events.
 
virtual void mouseMoveEvent (RMouseEvent &)
 Called on mouse move events.
 
virtual void mousePressEvent (RMouseEvent &)
 Called on mouse press events.
 
virtual void mouseReleaseEvent (RMouseEvent &)
 Called on mouse release events.
 
virtual void panGestureEvent (QPanGesture &)
 Called on pan gesture events.
 
virtual void pinchGestureEvent (QPinchGesture &)
 Called on pinch gesture events.
 
virtual void propertyChangeEvent (RPropertyEvent &)
 Called when the value of a property is modified while this action is active.
 
 RActionAdapter (RGuiAction *guiAction=NULL)
 
virtual void setGraphicsView (RGraphicsView *)
 Called if this action is set as a navigation action of a graphics view.
 
virtual void swipeGestureEvent (QSwipeGesture &)
 Called on swipe gesture events.
 
virtual void tabletEvent (RTabletEvent &)
 Called on tablet events.
 
virtual void wheelEvent (RWheelEvent &)
 Called on mouse wheel events.
 
virtual void zoomChangeEvent (RGraphicsView &)
 Called when the zoom factor or offset changed in the given view.
 
virtual ~RActionAdapter ()
 
- Public Member Functions inherited from RAction
RAction::ClickMode getClickMode ()
 
virtual RDocumentgetDocument ()
 
QList< RGraphicsScene * > getGraphicsScenes ()
 
virtual RGuiActiongetGuiAction ()
 
RActiongetOverrideBase ()
 
RStoragegetStorage ()
 
QString getUniqueGroup ()
 
bool hasNoState ()
 
bool isOverride ()
 
bool isTerminated ()
 
 RAction (RGuiAction *guiAction=NULL)
 Copyright (c) 2011-2018 by Andrew Mustun.
 
void setClickMode (RAction::ClickMode m)
 Sets the current click mode.
 
virtual void setDocumentInterface (RDocumentInterface *di)
 
void setGuiAction (RGuiAction *guiAction)
 
void setNoState (bool on=true)
 
void setOverride ()
 
void setOverrideBase (RAction *base)
 
void setUniqueGroup (const QString &ug)
 
virtual RVector snap (RMouseEvent &event, bool preview=false)
 Uses the currently active snap function to snap to the closest object or grid point.
 
void terminate ()
 Terminates the action.
 
virtual ~RAction ()
 

Additional Inherited Members

- Public Types inherited from RAction
enum  ClickMode { PickCoordinate , PickCoordinateNoSnap , PickEntity , PickingDisabled }
 Current mouse click mode. More...
 
- Public Attributes inherited from EAction
int additionalOptionsToolBars
 
int delegate
 
int dialogUiFile
 
int guiAction
 
int includeBasePath
 
int optionsToolBarEnabled
 
int optOutRelativeZeroResume
 
int relativeZeroPos
 
int resuming
 
int settingsGroup
 
int splitUiOptions
 
int state
 
int uiFile
 
int useDialog
 
int waitingForContextMenu
 
- Protected Attributes inherited from RAction
RAction::ClickMode clickMode
 
RDocumentInterfacedocumentInterface
 
RGuiActionguiAction
 
bool noState
 Indicates whether this action is stateless (i.e.
 
bool override
 
RActionoverrideBase
 
bool terminated
 
QString uniqueGroup
 

Detailed Description

This action adds an area 2D Centroid marker and text labels for a selected entity.

Author
CVH © 2021

Constructor & Destructor Documentation

◆ InfoAreaCentroid()

void InfoAreaCentroid::InfoAreaCentroid ( void guiAction)
inline

Member Function Documentation

◆ beginEvent()

void InfoAreaCentroid::beginEvent ( )
inlinevirtual

This GUI action adds a 2D centroid marker and detail labels for a selected entity.

Calculates centroid position and enclosed area assuming a uniform density surface. Casts additional details as text labels and reports them on the Command History. Stores full floating point data as marker custom properties. 2D Centroid markers are generated with a default density of 1.00 per unit. Supports selected enclosed area of:

  • Arc entity as an arc segment.
  • Circle entity.
  • Ellipse entity, full or as arc segment, autoClosed with a line segment.
  • Polyline entity, autoClosed with a line segment.
  • Spline entity as approximated polyline & autoClosed with a line segment.
  • Optional as arc and ellipse arc sector by a hidden switch. Supports Hatch entity total/differential hatched area. Not interpolating with line segments, the methods sum areas and centroids by shapes.

Included are various methods for area and area 2D centroids for RShapes.

Reimplemented from EAction.

◆ getArcArea()

void InfoAreaCentroid::getArcArea ( void arc)
inline

Arc RShape enclosed signed area (+CCW, -CW).

Diversifies between an arc segment or an arc sector.

Author
CVH © 2021
Parameters
arcAn arc RShape.
Returns
Signed area or 'undefined'.

◆ getArcAreaCentroid()

void InfoAreaCentroid::getArcAreaCentroid ( void arc)
inline

Arc RShape centroid data, including signed area (+CCW, -CW).

Diversifies between an arc segment or an arc sector. Considering a uniform density in 2D.

Author
CVH © 2021
Parameters
arcAn arc RShape.
Returns
[centroid.x, centroid.y, centroid, signed area] or 'undefined'.

◆ getArcSectorArea()

void InfoAreaCentroid::getArcSectorArea ( void arc)
inline

Arc RShape sector enclosed signed area (+CCW, -CW).

Author
CVH © 2021
Parameters
arcAn arc RShape.
Returns
Signed area or 'undefined'.

◆ getArcSectorAreaCentroid()

void InfoAreaCentroid::getArcSectorAreaCentroid ( void arc)
inline

Arc RShape sector centroid data, including signed area (+CCW, -CW).

Considering a uniform density in 2D.

Author
CVH © 2021
Parameters
arcAn arc RShape.
Returns
[centroid.x, centroid.y, centroid, signed area] or 'undefined'.

◆ getArcSegmentArea()

void InfoAreaCentroid::getArcSegmentArea ( void arc)
inline

Arc RShape segment enclosed signed area (+CCW, -CW).

Not to be confused with an arc shape itself.

Author
CVH © 2021
Parameters
arcAn arc RShape.
Returns
Signed area or 'undefined'.

◆ getArcSegmentAreaCentroid()

void InfoAreaCentroid::getArcSegmentAreaCentroid ( void arc)
inline

Arc RShape segment centroid data, including signed area (+CCW, -CW).

Not to be confused with an arc shape itself. Considering a uniform density in 2D.

Author
CVH © 2021
Parameters
arcAn arc RShape.
Returns
[centroid.x, centroid.y, centroid, signed area] or 'undefined'.

◆ getCircleAreaCentroid()

void InfoAreaCentroid::getCircleAreaCentroid ( void circle)
inline

Circle RShape centroid data, including enclosed area (+).

Considering a uniform density in 2D.

Author
CVH © 2021
Parameters
circleAn circle RShape.
Returns
[centroid.x, centroid.y, centroid, unsigned area] or 'undefined'.

◆ getContourArea()

void InfoAreaCentroid::getContourArea ( void items)
inline

Placeholder: A single contour of connected items enclosed area (+).

As merged polygon + shapes, ifso approximated with polylines given the XP method settings. Incorrect for self-intersecting shapes.

Author
CVH © 2021
Parameters
itemsA collection of multiple RShape.
Returns
Total area or 'undefined'.

◆ getContourAreaCentroid()

void InfoAreaCentroid::getContourAreaCentroid ( void items)
inline

Placeholder: A single contour of connected items centroid data, including the total enclosed area (+).

Considering a uniform density in 2D. As merged polygon + shapes, ifso approximated with polylines given the XP method settings. Incorrect for self-intersecting shapes.

Author
CVH © 2021
Parameters
itemsA collection of multiple RShape or REntity.
Returns
[centroid.x, centroid.y, centroid, total area] or 'undefined'.

◆ getContoursArea()

void InfoAreaCentroid::getContoursArea ( void loops)
inline

Placeholder: Contours of connected items enclosed area (+).

As merged polygons + shapes, ifso approximated with polylines given the XP method settings. Incorrect for nested, intersecting or self-intersecting shapes.

Author
CVH © 2021
Parameters
loopsCollections of multiple RShape or REntity.
Returns
Total area or 'undefined'.

◆ getContoursAreaCentroid()

void InfoAreaCentroid::getContoursAreaCentroid ( void loops)
inline

Placeholder: Contours of connected items centroid data, including the total enclosed area (+).

Considering a uniform density in 2D. As merged polygons + shapes, ifso approximated with polylines given the XP method settings. Incorrect for nested, intersecting or self-intersecting shapes.

Author
CVH © 2021
Parameters
loopsCollections of multiple RShape or REntity.
Returns
[centroid.x, centroid.y, centroid, total area] or 'undefined'.

◆ getEllipseArcSectorArea()

void InfoAreaCentroid::getEllipseArcSectorArea ( void ellipse)
inline

Ellipse arc RShape sector enclosed signed area (+CCW, -CW).

Closed format equation.

Author
CVH © 2021
Parameters
ellipseAn ellipse arc RShape.
Returns
Area or 'undefined'.

◆ getEllipseArcSectorAreaCentroid()

void InfoAreaCentroid::getEllipseArcSectorAreaCentroid ( void ellipse)
inline

Ellipse arc RShape sector centroid data including, enclosed signed area (+CCW, -CW).

Considering a uniform density in 2D. Closed format equation.

Author
CVH © 2021
Parameters
ellipseAn ellipse arc RShape.
Returns
[centroid.x, centroid.y, centroid, signed area] or 'undefined'.

◆ getEllipseArcSegmentArea()

void InfoAreaCentroid::getEllipseArcSegmentArea ( void ellipse)
inline

Ellipse arc RShape segment enclosed signed area (+CCW, -CW).

Not to be confused with an ellipse arc shape itself. Closed format equation.

Author
CVH © 2021
Parameters
ellipseAn ellipse arc RShape.
Returns
Signed area or 'undefined'.

◆ getEllipseArcSegmentAreaCentroid()

void InfoAreaCentroid::getEllipseArcSegmentAreaCentroid ( void ellipse)
inline

Ellipse arc RShape segment centroid data, including enclosed signed area (+CCW, -CW).

Not to be confused with an ellipse arc shape itself. Considering a uniform density in 2D. Approximated with an auto closed polyline given the XP method number of arc segments.

Author
CVH © 2021
Parameters
ellipseAn ellipse arc RShape.
Returns
[centroid.x, centroid.y, centroid, signed area] or 'undefined'.

◆ getEllipseArea()

void InfoAreaCentroid::getEllipseArea ( void ellipse)
inline

Ellipse RShape enclosed (signed) area.

Diversifies between a full ellipse (+) or an ellipse arc segment or sector (+CCW, -CW). Closed format equation.

Author
CVH © 2021
Parameters
ellipseAn ellipse RShape.
Returns
Unsigned or signed area or 'undefined'.

◆ getEllipseAreaCentroid()

void InfoAreaCentroid::getEllipseAreaCentroid ( void ellipse)
inline

Ellipse RShape centroid data, including enclosed (signed) area.

Diversifies between a full ellipse (+) or an ellipse arc segment or sector (+CCW, -CW). Considering a uniform density in 2D.

Author
CVH © 2021
Parameters
ellipseAn ellipse RShape.
Returns
[centroid.x, centroid.y, centroid, (un)signed area] or 'undefined'.

◆ getFullEllipseArea()

void InfoAreaCentroid::getFullEllipseArea ( void ellipse)
inline

Full ellipse RShape enclosed area (+).

Closed format equation.

Author
CVH © 2021
Parameters
ellipseA full ellipse RShape.
Returns
Unsigned area or 'undefined'.

◆ getFullEllipseAreaCentroid()

void InfoAreaCentroid::getFullEllipseAreaCentroid ( void ellipse)
inline

Full ellipse RShape centroid data, including enclosed area (+).

Considering a uniform density in 2D. Closed format equation.

Author
CVH © 2021
Parameters
ellipseA full ellipse RShape.
Returns
[centroid.x, centroid.y, centroid, unsigned area] or 'undefined'.

◆ getHatchedArea()

void InfoAreaCentroid::getHatchedArea ( void entity)
inline

Hatched differential area of a hatch entity (+).

Ifso approximated with polylines given the XP method settings, handled in situ.

Author
CVH © 2021
Parameters
entityA hatch REntity.
Returns
The differential area (+) or 'undefined'.

◆ getHatchedAreaCentroid()

void InfoAreaCentroid::getHatchedAreaCentroid ( void entity)
inline

Hatched centroid data of a hatch entity, including the differential hatched area (+).

Considering a uniform density in 2D. Ifso approximated with polylines given the XP method settings, handled in situ.

Author
CVH © 2021
Parameters
entityA hatch REntity.
Returns
[centroid.x, centroid.y, centroid, differential area] or 'undefined'.

◆ getHatchPolyLoops()

void InfoAreaCentroid::getHatchPolyLoops ( void hatchData)
inline

Hatch boundary loops as polylines with line and arc segments.

Replacement for .getBoundaryAsPolylines(val) that interpolates with line segments.

Unsolvable # Can't guarantee how correct RShapes from boundaries are merged.

Author
CVH © 2021
Parameters
hatchDataA hatch RHatchData.
Returns
A list of boundary loops as polylines, can be empty.

◆ getOrientedHatchBoundaries()

void InfoAreaCentroid::getOrientedHatchBoundaries ( void hatch)
inline

Pre-oriented hatch boundary loops as polylines with line and arc segments.

Is hatched = CCW = positive area Is voided = CW = negative area

Issue Unsolved # Can't guarantee how correct RShapes from boundaries are merged.

Author
CVH © 2021
Parameters
hatchA hatch REntity.
Returns
A list (>=1) of pre-oriented boundary loops as polylines or 'undefined'.

◆ getPolygonArea()

void InfoAreaCentroid::getPolygonArea ( void polygon)
inline

Closed or open polyline RShape with line segments enclosed signed area (+CCW, -CW).

Auto closed with line segment, elides bulge factors. Unverified and incorrect for self-intersecting shapes.

Author
CVH © 2021
Parameters
polygonA polyline RShape.
Returns
Signed area or 'undefined'.

◆ getPolygonAreaCentroid()

void InfoAreaCentroid::getPolygonAreaCentroid ( void polygon)
inline

Closed or open polyline RShape with line segments centroid data, including enclosed signed area (+CCW, -CW).

Considering a uniform density in 2D. Auto closed with line segment, elides bulge factors. Unverified and incorrect for self-intersecting shapes.

Author
CVH © 2021
Parameters
polygonA polyline RShape.
Returns
[centroid.x, centroid.y, centroid, signed area] or 'undefined'.

◆ getPolylineArea()

void InfoAreaCentroid::getPolylineArea ( void polyline)
inline

Polyline RShape enclosed signed area (+CCW, -CW).

Auto closed with line segment. Unverified and incorrect for self-intersecting shapes.

Author
CVH © 2021
Parameters
polylineA polyline RShape.
Returns
Signed area or 'undefined'.

◆ getPolylineAreaCentroid()

void InfoAreaCentroid::getPolylineAreaCentroid ( void polyline)
inline

Polyline RShape centroid data, including enclosed signed area (+CCW, -CW).

Considering a uniform density in 2D. Auto closed with line segment. Unverified and incorrect for self-intersecting shapes.

Author
CVH © 2021
Parameters
polylineA polyline RShape.
Returns
[centroid.x, centroid.y, centroid, signed area] or 'undefined'.

◆ getSplineArea()

void InfoAreaCentroid::getSplineArea ( void spline)
inline

Spline RShape enclosed signed area (+CCW, -CW).

Approximated with an auto closed polyline given XP method tolerance. Unverified and incorrect for self-intersecting shapes.

Author
CVH © 2021
Parameters
splineA spline RShape.
Returns
Signed area or 'undefined'.

◆ getSplineAreaCentroid()

void InfoAreaCentroid::getSplineAreaCentroid ( void spline)
inline

Spline RShape centroid data, including enclosed signed area (+CCW, -CW).

Considering a uniform density in 2D. Approximated with an auto closed polyline given XP method tolerance. Unverified and incorrect for self-intersecting shapes.

Author
CVH © 2021
Parameters
splineA spline RShape.
Returns
[centroid.x, centroid.y, centroid, signed area] or 'undefined'.

◆ getSupportedAreaCentroidType()

void InfoAreaCentroid::getSupportedAreaCentroidType ( void entity)
inline

Diversifies uniform density area centroids supported entity type or -1 when not supported.

REntity based (Excludes RSolids and so).

◆ isSelfIntersectingPoly()

void InfoAreaCentroid::isSelfIntersectingPoly ( void shape)
inline

Verifies if the given open/closed polyline shape is self-intersecting.

Specific for area methods including an autoClose line segment.

Author
CVH © 2021
Parameters
shapeA polyline RShape.
Returns
True or false, assumed false when not a polyline RShape.

◆ selectionAreaCentroid()

void InfoAreaCentroid::selectionAreaCentroid ( void di)
inline

Main InfoAreaCentroid loop.

Author
CVH © 2021
Parameters
diA document interface.
Returns
Nothing. Casts 2D Centroid marker and text labels, reports on Command History.

The documentation for this class was generated from the following file: