Create Basic Shape
Basic shape include box, cylinder, cone/frustum, sphere, and torus.
Box
AMCAX::MakeBox class provides functionality to create a box.
Class of making a box.
Definition MakeBox.hpp:20
Base class of shape, containing an underlying shape with a location and an orientation.
Definition TopoShape.hpp:15
PointT< double, 3 > Point3
3D point
Definition PointT.hpp:459
Cylinder
AMCAX::MakeCylinder class provides functionality to create a cylinder.
Class of making a cylinder.
Definition MakeCylinder.hpp:18
DirectionT< double, 3 > Direction3
3D direction
Definition DirectionT.hpp:566
FrameT< double, 3 > Frame3
3D frame
Definition FrameT.hpp:887
Cone/Frustum
AMCAX::MakeCone class provides functionality to create a cone or frustum.
Class of making a cone.
Definition MakeCone.hpp:18
Sphere
AMCAX::MakeSphere class provides functionality to create a sphere.
Class of making a sphere.
Definition MakeSphere.hpp:18
Torus
AMCAX::MakeTorus class provides functionality to create a torus.
Class of making a torus.
Definition MakeTorus.hpp:21
Boolean Operation
Boolean operation functionalities include union, intersection, cut, split, and section.
Union
AMCAX::BoolBRepFuse class provides the union functionality.
The class of fuse operation.
Definition BoolBRepFuse.hpp:15
Intersection
AMCAX::BoolBRepCommon class provides the intersection functionality.
The class of common operation.
Definition BoolBRepCommon.hpp:14
Cut
AMCAX::BoolBRepCut class provides the cut functionality.
The class of cut operation.
Definition BoolBRepCut.hpp:15
Split
AMCAX::BoolBRepSplitter class provides the split functionality.
auto tool_shape = std::list{ shape1 };
auto tool_argument = std::list{ shape2 };
The class of splitter operation.
Definition BoolBRepSplitter.hpp:16
AMCAX_API void SetTools(const std::list< TopoShape > &ls)
Set the tool shapes.
AMCAX_API void SetArguments(const std::list< TopoShape > &listargs)
Set the shapes to be processed.
virtual AMCAX_API const TopoShape & Shape()
Get the resulting shape.
Section
The AMCAX::BoolBRepSection class provides functionality to compute intersection curves, with the results stored as a TopoCompound.
The class of section operation.
Definition BoolBRepSection.hpp:17
Calling the interface directly as shown above will not compute the parametric curves within the shapes. To compute parametric curves, you must first initialize the operation and then compute the intersection.
section.Init1(cone);
section.ComputePCurveOn1(true);
section.Init2(sphere);
section.ComputePCurveOn2(true);
section.Build();
# Sweep Operation
Extrude
AMCAX::MakePrism provides the extrude (sweep) functionality.
std::shared_ptr<AMCAX::Geom3Curve> curve = makeEllipse.Value();
Class of making an edge.
Definition MakeEdge.hpp:26
Class of making a face.
Definition MakeFace.hpp:24
Class of making 3D geometric ellipses.
Definition MakeGeom3Ellipse.hpp:13
Class of making a prism or an extrusion shape.
Definition MakePrism.hpp:18
Class of making a wire.
Definition MakeWire.hpp:19
Class of edge.
Definition TopoEdge.hpp:12
Class of face.
Definition TopoFace.hpp:12
Class of wire.
Definition TopoWire.hpp:12
VectorT< double, 3 > Vector3
3D vector
Definition VectorT.hpp:707
Rotation
AMCAX::MakeRevol class provides the rotation (sweep) functionality.
auto bz = std::make_shared<AMCAX::Geom3BezierCurve>(poles);
static AMCAX_API const Axis3 & OZ() noexcept
Get the z-axis in 3D, including the origin and the z-direction.
Class of making a revolved shape.
Definition MakeRevol.hpp:20
Pipe
The pipe is created by specifying the spine (wire) and profile (shape). This can be done using AMCAX::MakePipe or AMCAX::MakePipeShell. MakePipe is for simpler pipe algorithms, suitable for a single section (planar shape) and a smooth path. MakePipeShell is a more complete pipe algorithm, supporting multiple sections and non-smooth paths, but the path must intersect with the section plane. Note that Add can only be TopoWire or TopoVertex.
double radius = 0.1;
std::vector<AMCAX::Point3> pointSet;
ps.Add(aWire, false, false);
ps.Build();
Class of make pipe algorithm.
Definition MakePipe.hpp:22
Class of making pipe shell algorithm.
Definition MakePipeShell.hpp:38
static AMCAX_API std::shared_ptr< Geom3BSplineCurve > InterpolatePoints(const std::vector< Point3 > &points, int degree=3, bool isClosed=false, ApproxParameterizationType ptype=ApproxParameterizationType::ChordLength)
The curve which interpolate the points is constructed.
CircleS< 3 > Circle3
3D circle
Definition CircleT.hpp:187
@ Centripetal
Parameters of points are proportional to square roots of distances between them.
Definition ApproxParameterizationType.hpp:17
Loft Operation
AMCAX::MakeLoft class provides loft functionality. By adding multiple wires, a shell or solid can be lofted.
aMakeLoft.AddWire(bottomWire);
aMakeLoft.AddWire(topWire);
aMakeLoft.Build();
Class of making a lofting shape.
Definition MakeLoft.hpp:33
Class of making a polygon.
Definition MakePolygon.hpp:20
static AMCAX_API const TopoWire & Wire(const TopoShape &s)
Cast shape to wire.
constexpr double pi
Mathematical constant Pi, ratio of a circle's circumference to its diameter.
Definition Constants.hpp:42
TransformationT< double, 3 > Transformation3
3D transformation
Definition TransformationT.hpp:1115
Edge Processing
Fillet
Fillet replaces sharp edges with smooth surfaces. The AMCAX::MakeFillet class and the AMCAX::MakeFillet2d class provide fillet functionality.
MakeFillet
mf.Build();
Template class of indexed set.
Definition IndexSet.hpp:20
The class of fillet.
Definition MakeFillet.hpp:25
static AMCAX_API const TopoEdge & Edge(const TopoShape &s)
Cast shape to edge.
MakeFillet2d
mf2d.Build();
Class of make fillet and chamfer on a vertex of a planar face.
Definition MakeFillet2d.hpp:22
static AMCAX_API const TopoVertex & Vertex(const TopoShape &s)
Cast shape to vertex.
static AMCAX_API const TopoFace & Face(const TopoShape &s)
Cast shape to face.
Chamfer
AMCAX::MakeChamfer class provides the chamfer functionality.
mc.Build();
The class of chamfer.
Definition MakeChamfer.hpp:22
Shape Deformation
Shape Offset
The AMCAX::MakeOffset class and AMCAX::MakeOffsetShape class provide the functionality for shape offset.
MakeOffset (Offset for 2D Shapes)
The input is a wire for offset, and for a face, the boundary of the face is offset, returning the wire after offset.
double offset = 1.5;
bool isOpenResult = false;
MakeOffset.Perform(offset);
MakeOffset2.Perform(offset);
Class of making offset wires.
Definition MakeOffset.hpp:21
JoinType
Type of join.
Definition GeometryMacros.hpp:74
@ Arc
Build arc blend.
Definition GeometryMacros.hpp:76
MakeOffsetShape (Offset for 3D Shapes)
Offset the input face. If the input is a shell, offset the entire solid of it. Finally, return the offset face or solid. For the gaps caused by offsetting, you can choose to use extension to find intersections or fillets for connection. The self - intersecting parts caused by offsetting will be deleted. Additionally, modeling tracking can be performed through Modified and Generated.
double offsetvalue = 1.2;
MakeOffsetShape2.
Build();
Class of build a shell out of a shape algorithm.
Definition MakeOffsetShape.hpp:20
AMCAX_API void PerformBySimple(const TopoShape &s, double offsetValue)
Construct an offset shape using the simple algorithm without intersections computation.
AMCAX_API void Build() override
Perform the algorithm.
MakeOffsetWire
This function also offsets a wire in a plane but supports topological changes. It allows for extending and intersecting at disconnected areas or creating arc transitions. It also supports tracking through the Generated function.
std::vector<AMCAX::Point3> points1;
for (const auto& p : points1)
{
}
const auto& outerWire = mp1.
Wire();
std::vector<AMCAX::Point3> points2;
for (const auto& p : points2)
{
}
const auto& innerWire = mp2.
Wire();
auto surf = std::make_shared<AMCAX::Geom3Plane>();
double offset = 0.1;
{
const auto& result = mow.Shape();
}
{
const auto& result = mow.Shape();
}
{
const auto& result = mow.Shape();
}
{
const auto& result = mow.Shape();
}
Class of making offset wires, it support wire offset on the plane or parameter domain.
Definition MakeOffsetWire.hpp:21
AMCAX_API void Close()
Close the polygon.
AMCAX_API void Add(const Point3 &p)
Add a new point to the polygon.
AMCAX_API const TopoWire & Wire()
Get the polygon result.
static constexpr double Confusion() noexcept
Get the confusion tolerance.
Definition Precision.hpp:122
Class of a tool for building B-Rep structure.
Definition TopoBuilder.hpp:39
AMCAX_API void MakeFace(TopoFace &f) const
Make an empty face.
AMCAX_API void Add(TopoShape &s, const TopoShape &c) const
Add a sub-shape to a shape.
@ Intersection
Build two tangent lines at the end of the edges and intersect the lines.
Definition GeometryMacros.hpp:79
Example of topological structure changes: (Blue-black lines represent input geometry, Blue lines indicate the desired final result, Red lines show intermediate construction elements that require removal)
Shape Thicken
AMCAX::MakeThickSolid class provides the functionality to thicken shape.
double offsetvalue = 1.5;
Class of making a thick solid shape.
Definition MakeThickSolid.hpp:12
AMCAX_API void Build() override
Perform the algorithm.
AMCAX_API void MakeThickBySimple(const TopoShape &s, double offsetValue)
Make a thick solid using simple algorithm, only for a non-closed single face or shell which contain t...
Replace Face
The AMCAX::BoolBRepReplaceFace class provides the functionality to replace a face. This allows you to select a face from a solid and replace it with another surface. The basic logic involves extending the surrounding faces of the replaced face, intersecting them with the new surface, and reconstructing the topology. If the surface cannot cover the replaced face, the replacement will fail.
std::shared_ptr<AMCAX::Geom3Plane> surf = std::make_shared<AMCAX::Geom3Plane>(plane);
{
}
The class of replace the feature faces in solid with surface. The input surface must be large enough ...
Definition BoolBRepReplaceFace.hpp:17
AMCAX_API void SetShape(const TopoShape &shape) noexcept
Set the shape for replace face feature algorithm.
AMCAX_API void SetReplaceSurface(const std::shared_ptr< Geom3Surface > &surface) noexcept
Set the surface with which the feature face is replaced.
AMCAX_API void AddFaceToReplace(const TopoShape &face)
Adds the face to be replaced from the input shape;.
AMCAX_API void Build() override
Perform the algorithm.
virtual AMCAX_API bool IsDone() const noexcept
Is the construction algorithm done.
Class of Plane.
Definition Plane.hpp:13
Some images are sourced from: https://dev.opencascade.org/doc/overview/html/index.html , the copyright belongs to its owner.