routingElementReporter.AddNewLine ();
routingElementReporter.Add ("Default Routing Segment:");
routingElementReporter.SetTabCount (1);
routingElementReporter.Add (
"Table of dimensions ID", routingSegmentDefault.
GetPreferenceTableId ());
if (shape == ConnectorShape::Circular)
routingElementReporter.Add ("Cross Section Shape", shape);
routingElementReporter.Add (
"Wall thickness", routingSegmentDefault.
GetWallThickness ());
routingElementReporter.Add (
"Anchor", routingSegmentDefault.
GetAnchor ());
routingElementReporter.Add ("Connection style", style);
if (style == ConnectionStyle::Flanged)
routingElementReporter.Add (shape == ConnectorShape::Circular ? "Flange diameter" : "Flange width", *routingSegmentDefault.GetFlangeSize ());
routingElementReporter.AddNewLine ();
routingElementReporter.Add ("Default Rigid Segment:");
routingElementReporter.SetTabCount (2);
routingElementReporter.Add (
"Width", rigidSegmentDefault.
GetWidth ());
routingElementReporter.Add (
"Height", rigidSegmentDefault.
GetHeight ());
routingElementReporter.Add (
"Shape", rigidSegmentDefault.
GetShape ());
routingElementReporter.SetTabCount (0);
routingElementReporter.AddNewLine ();
routingElementReporter.Add ("Default Routing Node:");
routingElementReporter.SetTabCount (1);
routingElementReporter.AddNewLine ();
routingElementReporter.Add ("Default Bend:");
routingElementReporter.SetTabCount (2);
if (bendDefault.
GetDomain () != Domain::Piping)
routingElementReporter.Add (
"Factor Radius", *bendDefault.
GetFactorRadius ());
routingElementReporter.SetTabCount (1);
routingElementReporter.AddNewLine ();
routingElementReporter.Add ("Default Transition:");
routingElementReporter.SetTabCount (2);
if (transitionDefault.
GetDomain () != Domain::Piping)
routingElementReporter.Add (
"Angle", *transitionDefault.
GetAngle ());
routingElementReporter.Add (
"Offset Y", transitionDefault.
GetOffsetY ());
routingElementReporter.Add (
"Offset Z", transitionDefault.
GetOffsetZ ());
routingElementReporter.Write ();
The BendDefault contains the necessary non-geometric data for modifying a Bend.
Definition: MEPBendDefault.hpp:34
Result< double > GetFactorRadius() const
The radius of the Bend is calculated with the help of this value in the case of Duct and Cable Carrie...
The RigidSegmentDefault contains the necessary non-geometric data for creating a RigidSegment element...
Definition: MEPRigidSegmentDefault.hpp:33
ConnectorShape GetShape() const
The RoutingElementDefault contains the necessary non-geometric data for creating a Routing element.
Definition: MEPRoutingElementDefault.hpp:38
RoutingNodeDefault GetRoutingNodeDefault() const
RoutingSegmentDefault GetRoutingSegmentDefault() const
The RoutingNodeDefault contains the necessary non-geometric data for creating and modifying a Routing...
Definition: MEPRoutingNodeDefault.hpp:143
PreferredTransitionPlacement GetPreferredTransitionPlacement() const
BendDefault GetBendDefault() const
TransitionDefault GetTransitionDefault() const
The RoutingSegmentDefault contains the necessary non-geometric data for creating and modifying a Rout...
Definition: MEPRoutingSegmentDefault.hpp:33
Result< uint32_t > GetCrossSectionReferenceId() const
RigidSegmentDefault GetRigidSegmentDefault() const
double GetWallThickness() const
double GetCrossSectionHeight() const
ConnectionStyle GetConnectionStyle() const
double GetCrossSectionWidth() const
API_AnchorID GetAnchor() const
double GetReferenceLineOffsetY() const
UniqueID GetPreferenceTableId() const
double GetReferenceLineOffsetX() const
ConnectorShape GetCrossSectionShape() const
The TransitionDefault contains the necessary non-geometric data for creating and modifying a Transiti...
Definition: MEPTransitionDefault.hpp:139
double GetOffsetZ() const
double GetOffsetY() const
ConnectionStyle
Style of the connection.
Definition: MEPEnums.hpp:41
ConnectorShape
Shape of the connector.
Definition: MEPEnums.hpp:28
Assemble placement data std::vector<API_Coord3D> referenceCoords1;
referenceCoords1.push_back ({ 0.0, 0.0, 2.0 });
referenceCoords1.push_back ({ 5.0, 0.0, 2.0 });
referenceCoords1.push_back ({ 5.0, 5.0, 2.0 });
referenceCoords1.push_back ({ 10.0, 5.0, 2.0 });
referenceCoords1.push_back ({ 10.0, 10.0, 2.0 });
std::map<UInt32, ACAPI::MEP::RoutingSegmentRectangularCrossSectionData> rectangularCrossSectionData1;
std::map<UInt32, ACAPI::MEP::RoutingSegmentCircularCrossSectionData> circularCrossSectionData1;
std::vector<API_Coord3D> referenceCoords2;
referenceCoords2.push_back ({ 10.0, 10.0, 2.0 });
referenceCoords2.push_back ({ 15.0, 10.0, 2.0 });
referenceCoords2.push_back ({ 15.0, 15.0, 2.0 });
std::map<UInt32, ACAPI::MEP::RoutingSegmentRectangularCrossSectionData> rectangularCrossSectionData2;
std::map<UInt32, ACAPI::MEP::RoutingSegmentCircularCrossSectionData> circularCrossSectionData2;
return PlaceRoutesAndConnect ({ { referenceCoords1, std::make_pair (rectangularCrossSectionData1, circularCrossSectionData1) }, { referenceCoords2, std::make_pair (rectangularCrossSectionData2, circularCrossSectionData2) } }, Domain::Piping);
Defines the necessary data for placing CircularRoutingSegments of a RoutingElement.
Definition: MEPTypes.hpp:63
Placement std::vector<UniqueID> routeIds;
routeIds.reserve (placementData.size ());
if (routingElementDefault.
IsErr ())
for (const auto& [referenceCoords, crossSectionDataMaps] : placementData) {
ACAPI::Result<UniqueID> routingElemId = routingElementDefault->Place (referenceCoords, crossSectionDataMaps.first, crossSectionDataMaps.second);
if (routingElemId.
IsErr ())
routeIds.emplace_back (*routingElemId);
}
return ACAPI::Ok (std::move (routeIds));
friend Result< RoutingElementDefault > CreateRoutingElementDefault(Domain)
Creates a RoutingElementDefault.
Definition: MEPRoutingElementDefault.hpp:146
Result is the standard return type of API functions.
Definition: Result.hpp:845
E UnwrapErr() const
Unwraps the error value contained in the Result. Trying to UnwrapErr the value while it contains an O...
Definition: Result.hpp:1140
bool IsErr() const
Definition: Result.hpp:945
API_Token ACAPI_GetToken()
Returns the token associated with the AddOn.