1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0031773: Visualization - add Prs3d_ToolTorus

Added Prs3d_ToolTorus tool to create a torus

Added DRAW commands:
- vtorus
- vcylinder
- vsphere

Added test cases:
- v3d/quadric/torus
- v3d/quadric/cylinder
- v3d/quadric/sphere
This commit is contained in:
mzernova
2020-09-17 22:55:27 +03:00
parent b0b7668261
commit 113bda7072
21 changed files with 723 additions and 72 deletions

View File

@@ -41,18 +41,25 @@ public:
DEFINE_STANDARD_ALLOC
//! Make a cone of height H radius R1 in the plane z =
//! 0, R2 in the plane Z = H. R1 and R2 may be null.
//! Make a cone.
//! @param R1 [in] cone bottom radius, may be null (z = 0)
//! @param R2 [in] cone top radius, may be null (z = H)
//! @param H [in] cone height
Standard_EXPORT BRepPrimAPI_MakeCone(const Standard_Real R1, const Standard_Real R2, const Standard_Real H);
//! Make a cone of height H radius R1 in the plane z =
//! 0, R2 in the plane Z = H. R1 and R2 may be null.
//! Take a section of <angle>
//! Make a cone.
//! @param R1 [in] cone bottom radius, may be null (z = 0)
//! @param R2 [in] cone top radius, may be null (z = H)
//! @param H [in] cone height
//! @param angle [in] angle to create a part cone
Standard_EXPORT BRepPrimAPI_MakeCone(const Standard_Real R1, const Standard_Real R2, const Standard_Real H, const Standard_Real angle);
//! Make a cone of height H radius R1 in the plane z =
//! 0, R2 in the plane Z = H. R1 and R2 may be null.
//! Make a cone.
//! @param axes [in] coordinate system for the construction of the cone
//! @param R1 [in] cone bottom radius, may be null (z = 0)
//! @param R2 [in] cone top radius, may be null (z = H)
//! @param H [in] cone height
Standard_EXPORT BRepPrimAPI_MakeCone(const gp_Ax2& Axes, const Standard_Real R1, const Standard_Real R2, const Standard_Real H);
//! Make a cone of height H radius R1 in the plane z =

View File

@@ -41,17 +41,23 @@ public:
DEFINE_STANDARD_ALLOC
//! Make a cylinder of radius R and length H.
//! Make a cylinder.
//! @param R [in] cylinder radius
//! @param H [in] cylinder height
Standard_EXPORT BRepPrimAPI_MakeCylinder(const Standard_Real R, const Standard_Real H);
//! Make a cylinder of radius R and length H with
//! angle H.
//! Make a cylinder (part cylinder).
//! @param R [in] cylinder radius
//! @param H [in] cylinder height
//! @param Angle [in] defines the missing portion of the cylinder
Standard_EXPORT BRepPrimAPI_MakeCylinder(const Standard_Real R, const Standard_Real H, const Standard_Real Angle);
//! Make a cylinder of radius R and length H.
//! @param Axes [in] coordinate system for the construction of the cylinder
//! @param R [in] cylinder radius
//! @param H [in] cylinder height
Standard_EXPORT BRepPrimAPI_MakeCylinder(const gp_Ax2& Axes, const Standard_Real R, const Standard_Real H);
//! Make a cylinder of radius R and length H with
//! angle H.
//! Constructs

View File

@@ -43,39 +43,72 @@ public:
DEFINE_STANDARD_ALLOC
//! Make a sphere of radius R.
//! Make a sphere.
//! @param R [in] sphere radius
Standard_EXPORT BRepPrimAPI_MakeSphere(const Standard_Real R);
//! Make a sphere of radius R.
//! Make a sphere (spherical wedge).
//! @param R [in] sphere radius
//! @param angle [in] angle between the radii lying within the bounding semidisks
Standard_EXPORT BRepPrimAPI_MakeSphere(const Standard_Real R, const Standard_Real angle);
//! Make a sphere of radius R.
//! Make a sphere (spherical segment).
//! @param R [in] sphere radius
//! @param angle1 [in] first angle defining a spherical segment
//! @param angle2 [in] second angle defining a spherical segment
Standard_EXPORT BRepPrimAPI_MakeSphere(const Standard_Real R, const Standard_Real angle1, const Standard_Real angle2);
//! Make a sphere of radius R.
//! Make a sphere (spherical segment).
//! @param R [in] sphere radius
//! @param angle1 [in] first angle defining a spherical segment
//! @param angle2 [in] second angle defining a spherical segment
//! @param angle3 [in] angle between the radii lying within the bounding semidisks
Standard_EXPORT BRepPrimAPI_MakeSphere(const Standard_Real R, const Standard_Real angle1, const Standard_Real angle2, const Standard_Real angle3);
//! Make a sphere of radius R.
//! Make a sphere.
//! @param Center [in] sphere center coordinates
//! @param R [in] sphere radius
Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Pnt& Center, const Standard_Real R);
//! Make a sphere of radius R.
//! Make a sphere (spherical wedge).
//! @param Center [in] sphere center coordinates
//! @param R [in] sphere radius
//! @param angle [in] angle between the radii lying within the bounding semidisks
Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Pnt& Center, const Standard_Real R, const Standard_Real angle);
//! Make a sphere of radius R.
//! Make a sphere (spherical segment).
//! @param Center [in] sphere center coordinates
//! @param R [in] sphere radius
//! @param angle1 [in] first angle defining a spherical segment
//! @param angle2 [in] second angle defining a spherical segment
Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Pnt& Center, const Standard_Real R, const Standard_Real angle1, const Standard_Real angle2);
//! Make a sphere of radius R.
//! Make a sphere (spherical segment).
//! @param Center [in] sphere center coordinates
//! @param R [in] sphere radius
//! @param angle1 [in] first angle defining a spherical segment
//! @param angle2 [in] second angle defining a spherical segment
//! @param angle3 [in] angle between the radii lying within the bounding semidisks
Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Pnt& Center, const Standard_Real R, const Standard_Real angle1, const Standard_Real angle2, const Standard_Real angle3);
//! Make a sphere of radius R.
//! Make a sphere.
//! @param Axis [in] coordinate system for the construction of the sphere
//! @param R [in] sphere radius
Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Ax2& Axis, const Standard_Real R);
//! Make a sphere of radius R.
//! Make a sphere (spherical wedge).
//! @param Axis [in] coordinate system for the construction of the sphere
//! @param R [in] sphere radius
//! @param angle [in] angle between the radii lying within the bounding semidisks
Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Ax2& Axis, const Standard_Real R, const Standard_Real angle);
//! Make a sphere of radius R.
//! Make a sphere (spherical segment).
//! @param Axis [in] coordinate system for the construction of the sphere
//! @param R [in] sphere radius
//! @param angle1 [in] first angle defining a spherical segment
//! @param angle2 [in] second angle defining a spherical segment
Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Ax2& Axis, const Standard_Real R, const Standard_Real angle1, const Standard_Real angle2);
//! Make a sphere of radius R.
//! For all algorithms The resulting shape is composed of
//! - a lateral spherical face,

View File

@@ -41,28 +41,52 @@ public:
DEFINE_STANDARD_ALLOC
//! Make a torus of radii R1 R2.
//! Make a torus.
//! @param R1 [in] distance from the center of the pipe to the center of the torus
//! @param R2 [in] radius of the pipe
Standard_EXPORT BRepPrimAPI_MakeTorus(const Standard_Real R1, const Standard_Real R2);
//! Make a section of a torus of radii R1 R2.
//! Make a section of a torus.
//! @param R1 [in] distance from the center of the pipe to the center of the torus
//! @param R2 [in] radius of the pipe
//! @param angle [in] angle to create a torus pipe segment
Standard_EXPORT BRepPrimAPI_MakeTorus(const Standard_Real R1, const Standard_Real R2, const Standard_Real angle);
//! Make a torus of radii R2, R2 with angles on the
//! small circle.
//! Make a torus with angles on the small circle.
//! @param R1 [in] distance from the center of the pipe to the center of the torus
//! @param R2 [in] radius of the pipe
//! @param angle1 [in] first angle to create a torus ring segment
//! @param angle2 [in] second angle to create a torus ring segment
Standard_EXPORT BRepPrimAPI_MakeTorus(const Standard_Real R1, const Standard_Real R2, const Standard_Real angle1, const Standard_Real angle2);
//! Make a torus of radii R2, R2 with angles on the
//! small circle.
//! Make a torus with angles on the small circle.
//! @param R1 [in] distance from the center of the pipe to the center of the torus
//! @param R2 [in] radius of the pipe
//! @param angle1 [in] first angle to create a torus ring segment
//! @param angle2 [in] second angle to create a torus ring segment
//! @param angle [in] angle to create a torus pipe segment
Standard_EXPORT BRepPrimAPI_MakeTorus(const Standard_Real R1, const Standard_Real R2, const Standard_Real angle1, const Standard_Real angle2, const Standard_Real angle);
//! Make a torus of radii R1 R2.
//! Make a torus.
//! @param Axes [in] coordinate system for the construction of the sphere
//! @param R1 [in] distance from the center of the pipe to the center of the torus
//! @param R2 [in] radius of the pipe
Standard_EXPORT BRepPrimAPI_MakeTorus(const gp_Ax2& Axes, const Standard_Real R1, const Standard_Real R2);
//! Make a section of a torus of radii R1 R2.
//! Make a section of a torus.
//! @param Axes [in] coordinate system for the construction of the sphere
//! @param R1 [in] distance from the center of the pipe to the center of the torus
//! @param R2 [in] radius of the pipe
//! @param angle [in] angle to create a torus pipe segment
Standard_EXPORT BRepPrimAPI_MakeTorus(const gp_Ax2& Axes, const Standard_Real R1, const Standard_Real R2, const Standard_Real angle);
//! Make a torus of radii R1 R2.
//! Make a torus.
//! @param Axes [in] coordinate system for the construction of the sphere
//! @param R1 [in] distance from the center of the pipe to the center of the torus
//! @param R2 [in] radius of the pipe
//! @param angle1 [in] first angle to create a torus ring segment
//! @param angle2 [in] second angle to create a torus ring segment
Standard_EXPORT BRepPrimAPI_MakeTorus(const gp_Ax2& Axes, const Standard_Real R1, const Standard_Real R2, const Standard_Real angle1, const Standard_Real angle2);
//! Make a section of a torus of radii R1 R2.