C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2
action_mesh.h File Reference

Functions for construction of the polygonal geometric object. More...

#include <mb_cart_point.h>
#include <mb_cart_point3d.h>
#include <mesh.h>
#include <mb_enum.h>
#include <mb_operation_result.h>
#include <curve3d.h>
#include <vector>

Classes

struct  MeshInfo
 Diagnostic data of a polygonal object. More...
 

Functions

void CalculatePolygon (const MbCurve &curve, const MbPlacement3D &plane, double sag, MbPolygon3D &polygon)
 Calculation of polygon of curve. More...
 
void CalculateWire (const MbPlaneItem &obj, const MbPlacement3D &plane, double sag, MbMesh &mesh)
 Create a polygonal two-dimensional object. More...
 
MbResultType CreateIcosahedron (const MbPlacement3D &place, double radius, const MbFormNote &fn, MbMesh *&result)
 Construct an icosahedron mesh. More...
 
MbResultType CreateBoxMesh (const MbMatrix3D &trans, SPtr< MbMesh > &result)
 Construct a parallepiped mesh. More...
 
MbResultType CreateBoxWire (const MbMatrix3D &trans, SPtr< MbMesh > &result)
 Construct an parallepiped wireframe. More...
 
void MakeSpaceWireFrame (const MbItem &item, RPArray< MbCurve3D > &wire, bool isVisibleOnly=false)
 Create a spatial wireframe by a mesh. More...
 
void MakePlaneWireFrame (const MbItem &item, const MbPlacement3D &place, RPArray< MbCurve3D > &wire)
 Create a planar wireframe by a mesh. More...
 
void MakePlaneVistaWireFrame (const MbItem &item, const MbPlacement3D &place, const MbCartPoint3D &vista, RPArray< MbCurve3D > &wire)
 Create a planar wireframe by a mesh in perspective. More...
 
void MakePlaneWireFrame (const MbItem &item, const MbPlacement3D &place, RPArray< MbCurve > &wire)
 Create a planar wireframe by a mesh. More...
 
void MakePlaneVistaWireFrame (const MbItem &item, const MbPlacement3D &place, const MbCartPoint3D &vista, RPArray< MbCurve > &wire)
 Create a planar wireframe by a mesh in perspective. More...
 
MbResultType CreateSpherePolyhedron (const MbPlacement3D &place, double radius, double &epsilon, MbMesh *&result)
 Construct an spherical mesh. More...
 
MbResultType CreateConvexPolyhedron (const SArray< MbFloatPoint3D > &points, MbMesh *&result)
 Calculate a convex hull of a point set. More...
 
MbResultType CreateConvexPolyhedron (const std::vector< MbFloatPoint3D > &points, MbMesh *&result)
 Calculate a convex hull of a point set. More...
 
MbResultType CreateConvexPolyhedron (const SArray< MbCartPoint3D > &points, MbMesh *&result)
 Calculate a convex hull of a point set. More...
 
MbResultType CreateConvexPolyhedron (const std::vector< MbCartPoint3D > &points, MbMesh *&result)
 Calculate a convex hull of a point set. More...
 
MbResultType CreateConvexPolyhedron (const MbMesh &mesh, double offset, MbMesh *&result)
 Construct the convex hull of triangulation grid. More...
 
MbResultType CreateConvexPolygon (const MbConvexHullParams &params, MbConvexHullResults &result)
 Construct the convex hull of 2D points array. More...
 
MbResultType CreateConvexPolyhedron (const MbConvexHullParams3D &params, SPtr< MbMesh > &result)
 Calculate a convex hull of a point set. More...
 
bool AreIntersectConvexPolyhedrons (const MbMesh &mesh1, const MbMesh &mesh2)
 Whether there is intersection of convex grids. More...
 
MbResultType MeshCutting (MbMesh &mesh, MbeCopyMode sameShell, const MbPlacement3D &place, int part, const MbSNameMaker &names, bool onlySection, MbMesh *&result)
 Cut a part of a polygonal object by a plane. More...
 
MbResultType MeshSection (const MbMesh &mesh, const MbPlacement3D &place, c3d::SpaceCurvesSPtrVector &polylines)
 Create a section contour of a polygon figure. More...
 
MbResultType MeshMeshIntersection (const MbMesh &mesh1, const MbMesh &mesh2, c3d::SpaceCurvesSPtrVector &polylines)
 Create an intersection contour of two polygon objects. More...
 
MbResultType CreateBoolean (const MbMesh &mesh1, const MbMesh &mesh2, OperationType operation, c3d::MeshSPtr &newMesh)
 Create a polygon object of Boolean operation. More...
 
MbResultType CalculateBallPivotingGrid (const MbCollection &collection, double radius, double radiusMin, double angle, MbMesh *&result)
 Build a triangulation by point cloud with Ball Pivoting algorithm. More...
 
MbOrientedBox CalculateBoundingBox (const MbMesh &mesh)
 Calculate a volume-minimized oriented bounding box (OBB) containing a polygonal object. More...
 
MbResultType RepairInconsistentMesh (MbMesh &mesh)
 Repair inconsistent orientation of mesh polygons with respect to each other. More...
 
MbResultType ConvertMeshToInstance (const c3d::ItemsSPtrVector &meshContainer, const MbMeshToInstanceParams &params, MbMeshToInstanceResults &results)
 Search an array of objects to replace repeating polygonal objects (MbMesh) with MbInstance, which are linked to the first in the set. It is recommended to use relative accuracy for large objects which size exceeds ~1e6. More...
 
bool CheckMeshClosure (const MbMesh &mesh, MeshInfo &info)
 Check the object closeness and provide information about the boundary edges. More...
 
bool InspectMeshClosure (const MbMesh &mesh, MeshInfo &info)
 Check the object closeness and provide detailed information about boundaries. More...
 
MbResultType SimplifyTriangularMesh (const MbMesh &mesh, const MbMeshSimplificationParams &params, c3d::MeshesSPtrVector &simplifiedMeshes)
 Simplify triangulation. More...
 
MbResultType SimplifyTriangularMesh (const MbMeshSimplificationParams &params, MbMesh &mesh)
 Simplify triangulation. More...
 
MbResultType UnwrapMesh (const MbMeshUnwrapParams &params, MbMeshUnwrapResult &results)
 Construct a unwrapping the mesh on a plane. More...
 
MbResultType AlignObjects (const MbItem &fixed, const MbItem &moving, const MbObjectAlignmentParams &params, MbObjectAlignmentResult &result)
 Align objects. More...
 

Detailed Description

Functions for construction of the polygonal geometric object.

Polygonal geometric objects can be constructed using a set of point or on the basis of other objects.

Function Documentation

◆ AlignObjects()

MbResultType AlignObjects ( const MbItem fixed,
const MbItem moving,
const MbObjectAlignmentParams params,
MbObjectAlignmentResult result 
)

Align objects.

Align two objects: moving to fixed.

Parameters
[in]fixed- Object to which another object is aligned.
[in]moving- Object which is being aligned.
[in]params- Parameters of object alignment.
[out]result- Result of object alignment.
Returns
Returns the operation result code.
Warning
Under development.