Archicad 29 C++ API
Loading...
Searching...
No Matches
ACAPI::Element::OpeningDefault Class Referencefinal

The ElementDefault contains the necessary non-geometric data for creating a MEP element. More...

#include <OpeningDefault.hpp>

Inheritance diagram for ACAPI::Element::OpeningDefault:
ACAPI::ElementDefault ACAPI::Object

Classes

class  Modifier
 

Public Member Functions

Result< UniqueIDPlace (const UniqueID &parentElemId, const API_Coord3D &inputPoint) const
 Puts an opening in an element at a given point.
 
Result< UniqueIDPlacePolygonal (const UniqueID &parentElemId, const API_Coord3D &inputPoint, const Geometry::Polygon2D &polygon) const
 Puts an opening in an element at a given point.
 
OpeningFloorPlanParameters GetFloorPlanParameters () const
 
OpeningExtrusionParameters GetExtrusionParameters () const
 
template<class ModifierFunc >
Result< void > Modify (ModifierFunc &&modifierFunc)
 Executes the given modifier scope in a NotUndoable command.
 
- Public Member Functions inherited from ACAPI::ElementDefault
 ElementDefault (std::shared_ptr< Impl::ElementDefaultImpl > impl)
 Constructs a new ElementDefault.
 
Result< void > SetAsArchicadDefault () const
 Sets the locally prepared Default settings to the Archicad Default.
 
API_ElemType GetElemType () const
 
- Public Member Functions inherited from ACAPI::Object
 Object (std::shared_ptr< Impl::ObjectImpl > impl)
 Constructs a new object.
 
const API_TokenGetToken () const
 Get the token for this object.
 

Protected Member Functions

 OpeningDefault (std::shared_ptr< Impl::OpeningDefaultImpl > impl)
 Constructs an OpeningDefault with the given element default implementation.
 
- Protected Member Functions inherited from ACAPI::Object
 ~Object ()
 Default destructor.
 

Static Protected Member Functions

static Result< OpeningDefaultCreate (const API_Token &token)
 Creates an OpeningDefault with the given token.
 

Friends

class ACAPI::Impl::ObjectCreator
 
Result< OpeningDefaultCreateOpeningDefault ()
 Creates an OpeningDefault.
 
ARCHICADAPI_EXPORT Result< OpeningDefaultCreateOpeningDefault (const ACAPI::ElementDefault &defaultElem)
 Creates an OpeningDefault from the given base element default.
 

Additional Inherited Members

- Protected Attributes inherited from ACAPI::Object
std::shared_ptr< Impl::ObjectImplmImpl
 Impl object given by constructor.
 

Detailed Description

The ElementDefault contains the necessary non-geometric data for creating a MEP element.

Since
Archicad 29

Constructor & Destructor Documentation

◆ OpeningDefault()

ACAPI::Element::OpeningDefault::OpeningDefault ( std::shared_ptr< Impl::OpeningDefaultImpl > impl)
protected

Constructs an OpeningDefault with the given element default implementation.

Parameters
implThe OpeningDefault implementation.

Member Function Documentation

◆ Create()

static Result< OpeningDefault > ACAPI::Element::OpeningDefault::Create ( const API_Token & token)
staticprotected

Creates an OpeningDefault with the given token.

Parameters
tokenThe given token.
Returns
The result of the creation with the created OpeningDefault.

◆ GetExtrusionParameters()

OpeningExtrusionParameters ACAPI::Element::OpeningDefault::GetExtrusionParameters ( ) const
Returns
Returns the extrusion geometry of the opening.

◆ GetFloorPlanParameters()

OpeningFloorPlanParameters ACAPI::Element::OpeningDefault::GetFloorPlanParameters ( ) const
Returns
Returns the floorplan parameters of the opening.

◆ Modify()

template<class ModifierFunc >
Result< void > ACAPI::Element::OpeningDefault::Modify ( ModifierFunc && modifierFunc)

Executes the given modifier scope in a NotUndoable command.

Parameters
modifierFuncThe modifier scope (lambda, std::function or function pointer) the caller wants to execute.
Returns
Returns an error if the process of modification fails for some reason, otherwise nothing.

◆ Place()

Result< UniqueID > ACAPI::Element::OpeningDefault::Place ( const UniqueID & parentElemId,
const API_Coord3D & inputPoint ) const

Puts an opening in an element at a given point.

The implementation creates an Undoable Command Scope before executing the placement. This Command Scope is automatically closed after execution.

If the input point is not on the parent element's surface, the opening will be placed on the closest point on the surface, projected perpendicularly.

Parameters
parentElemIdThe parent element's unique ID.
inputPointThe point where the opening will be placed.
Returns
If executed with success, returns the newly placed opening's unique ID, otherwise Error.

◆ PlacePolygonal()

Result< UniqueID > ACAPI::Element::OpeningDefault::PlacePolygonal ( const UniqueID & parentElemId,
const API_Coord3D & inputPoint,
const Geometry::Polygon2D & polygon ) const

Puts an opening in an element at a given point.

The implementation creates an Undoable Command Scope before executing the placement. This Command Scope is automatically closed after execution.

If the input point is not on the parent element's surface, the opening will be placed on the closest point on the surface, projected perpendicularly.

The created opening will be custom, and use the polygon given as parameter even if the default was set to rectangular or circular.

Parameters
parentElemIdThe parent element's unique ID.
inputPointThe point where the opening will be placed.
polygonThe shape of the opening.
Returns
If executed with success, returns the newly placed opening's unique ID, otherwise Error.

Friends And Related Symbol Documentation

◆ CreateOpeningDefault [1/2]

Result< OpeningDefault > CreateOpeningDefault ( )
friend

Creates an OpeningDefault.

Since
Archicad 29
Returns
If able, returns a copy of Archicad's current Opening of the Opening tool, otherwise Error.

◆ CreateOpeningDefault [2/2]

ARCHICADAPI_EXPORT Result< OpeningDefault > CreateOpeningDefault ( const ACAPI::ElementDefault & defaultElem)
friend

Creates an OpeningDefault from the given base element default.

Parameters
defaultElemThe base element default which will be converted to an OpeningDefault.
Since
Archicad 29
Returns
If the given base element default refers to an Opening, returns a copy of the OpeningDefault, otherwise Error.