SHAPER  9.12.0
GeomAlgoAPI_ShapeInfo Class Reference

Provides information about shapes in textual (HTML for Information Panel) or a list of parameters order (for python "shapeInfo" command). More...

Data Structures

class  Translator
 A translator to the current language is needed for HTML export. More...
 

Public Member Functions

 GeomAlgoAPI_ShapeInfo (const std::shared_ptr< GeomAPI_Shape > theShape)
 Initializes a parameters input by an input shape. More...
 
std::string html (Translator *theTranslator)
 Returns an HTML text of a shape info. More...
 
const std::string & shapeType ()
 Returns the detected shape type, or empty string. More...
 
void setShapeType (const std::string theType)
 Sets the shape type. More...
 
std::list< GeomAlgoAPI_InfoValuevalues ()
 Returns a list of shape information values. More...
 

Detailed Description

Provides information about shapes in textual (HTML for Information Panel) or a list of parameters order (for python "shapeInfo" command).

At least the following geometrical items are supported: 0D: Vertex, 1D : Line segment, Polygon, Circle, Arc, Ellipse, Arc of ellipse, 2D : Rectangle, Polygon, Disc with circular or elliptical base, Sphere, Cylinder, Cone, Torus

It is initialized by a shape and fors the needed output depending on the requested format.

Constructor & Destructor Documentation

◆ GeomAlgoAPI_ShapeInfo()

GeomAlgoAPI_ShapeInfo::GeomAlgoAPI_ShapeInfo ( const std::shared_ptr< GeomAPI_Shape theShape)
inline

Initializes a parameters input by an input shape.

Member Function Documentation

◆ html()

std::string GeomAlgoAPI_ShapeInfo::html ( Translator theTranslator)

Returns an HTML text of a shape info.

◆ shapeType()

const std::string& GeomAlgoAPI_ShapeInfo::shapeType ( )
inline

Returns the detected shape type, or empty string.

◆ setShapeType()

void GeomAlgoAPI_ShapeInfo::setShapeType ( const std::string  theType)
inline

Sets the shape type.

◆ values()

std::list< GeomAlgoAPI_InfoValue > GeomAlgoAPI_ShapeInfo::values ( )

Returns a list of shape information values.