1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +03:00

0024002: Overall code and build procedure refactoring -- automatic

Automatic upgrade of OCCT code by command "occt_upgrade . -nocdl":
- WOK-generated header files from inc and sources from drv are moved to src
- CDL files removed
- All packages are converted to nocdlpack
This commit is contained in:
abv
2015-07-12 07:42:38 +03:00
parent 543a996496
commit 42cf5bc1ca
15354 changed files with 623957 additions and 509844 deletions

View File

@@ -1,137 +0,0 @@
-- Created on: 1993-07-06
-- Created by: Remi LEQUETTE
-- Copyright (c) 1993-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
package BRepPrimAPI
---Purpose: The BRepBuilderAPI package provides an Application
-- Programming Interface for the BRep topology data
-- structure.
--
-- The API is a set of classes aiming to provide :
--
-- * High level and simple calls for the most common
-- operations.
--
-- * Keeping an access on the low-level
-- implementation of high-level calls.
--
-- * Examples of programming of high-level operations
-- from low-level operations.
--
-- * A complete coverage of modelling :
--
-- - Creating vertices ,edges, faces, solids.
--
-- - Sweeping operations.
--
-- - Boolean operations.
--
-- - Global properties computation.
--
--
-- The API provides classes to build objects:
--
-- * The constructors of the classes provides the
-- different constructions methods.
--
-- * The class keeps as fields the different tools
-- used to build the object.
--
-- * The class provides a casting method to get
-- automatically the result with a function-like
-- call.
--
-- For example to make a vertex <V> from a point <P>
-- one can writes :
--
-- V = BRepBuilderAPI_MakeVertex(P);
--
-- or
--
-- BRepBuilderAPI_MakeVertex MV(P);
-- V = MV.Vertex();
--
--
-- For tolerances a default precision is used which
-- can be changed by the packahe method
-- BRepBuilderAPI::Precision.
--
-- For error handling the BRepBuilderAPI commands raise only
-- the NotDone error. When Done is false on a command
-- the error description can be asked to the command.
--
-- In theory the comands can be called with any
-- arguments, argument checking is performed by the
-- command.
uses
StdFail,
gp,
TColgp,
Geom2d,
Geom,
GeomAbs,
TopAbs,
TopoDS,
TopTools,
TopLoc,
BRep,
BRepLib,
BRepTools,
BRepPrim,
BRepBuilderAPI,
BRepSweep
is
--
-- Primitives
--
class MakeHalfSpace; --- inherits MakeShape from BRepBuilderAPI
class MakeBox; --- inherits MakeShape from BRepBuilderAPI
class MakeWedge; --- inherits MakeShape from BRepBuilderAPI
deferred class MakeOneAxis; --- inherits MakeShape from BRepBuilderAPI
class MakeCylinder; --- inherits MakeShape from BRepBuilderAPI
class MakeCone; --- inherits MakeShape from BRepBuilderAPI
class MakeSphere; --- inherits MakeOneAxis from BRepPrimAPI
class MakeTorus; --- inherits MakeOneAxis from BRepPrimAPI
class MakeRevolution; --- inherits MakeOneAxis from BRepPrimAPI
--
-- Sweeping
--
deferred class MakeSweep; --- inherits MakeShape from BRepBuilderAPI
class MakePrism; --- inherits MakeSweep from BRepPrimAPI
class MakeRevol; --- inherits MakeSweep from BRepPrimAPI
end BRepPrimAPI;

View File

@@ -1,149 +0,0 @@
-- Created on: 1993-07-21
-- Created by: Remi LEQUETTE
-- Copyright (c) 1993-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class MakeBox from BRepPrimAPI inherits MakeShape from BRepBuilderAPI
---Purpose: Describes functions to build parallelepiped boxes.
-- A MakeBox object provides a framework for:
-- - defining the construction of a box,
-- - implementing the construction algorithm, and
-- - consulting the result.
uses
Ax2 from gp,
Pnt from gp,
Face from TopoDS,
Shell from TopoDS,
Solid from TopoDS,
Wedge from BRepPrim
raises
DomainError from Standard,
OutOfRange from Standard,
NotDone from StdFail
is
Create(dx, dy, dz : Real)
returns MakeBox from BRepPrimAPI
---Purpose: Make a box with a corner at 0,0,0 and the other dx,dy,dz
---Level: Public
raises
DomainError from Standard; -- if dx,dy,dz <= Precision::Confusion()
Create(P : Pnt from gp; dx, dy, dz : Real)
returns MakeBox from BRepPrimAPI
---Purpose: Make a box with a corner at P and size dx, dy, dz.
---Level: Public
raises
DomainError from Standard; -- if dx,dy,dz <= Precision::Confusion()
Create(P1,P2 : Pnt from gp)
returns MakeBox from BRepPrimAPI
---Purpose: Make a box with corners P1,P2.
---Level: Public
raises
DomainError from Standard; -- if dx,dy,dz <= Precision::Confusion()
Create(Axes : Ax2 from gp; dx, dy, dz : Real)
returns MakeBox from BRepPrimAPI
---Purpose: Ax2 is the left corner and the axis.
---Level: Public
raises
DomainError from Standard; -- if dx,dy,dz <= Precision::Confusion()
---Purpose: Constructs a box such that its sides are parallel to the axes of
-- - the global coordinate system, or
-- - the local coordinate system Axis. and
-- - with a corner at (0, 0, 0) and of size (dx, dy, dz), or
-- - with a corner at point P and of size (dx, dy, dz), or
-- - with corners at points P1 and P2.
-- Exceptions
-- Standard_DomainError if: dx, dy, dz are less than or equal to
-- Precision::Confusion(), or
-- - the vector joining the points P1 and P2 has a
-- component projected onto the global coordinate
-- system less than or equal to Precision::Confusion().
-- In these cases, the box would be flat.
Wedge(me : in out) returns Wedge from BRepPrim
---Purpose: Returns the internal algorithm.
--
---C++: return &
---Level: Public
is static;
----------------------------------------
-- Results
----------------------------------------
Build(me : in out)
---Purpose: Stores the solid in myShape.
---Level: Public
is redefined;
Shell(me : in out) returns Shell from TopoDS
---C++: return const &
---C++: alias "Standard_EXPORT operator TopoDS_Shell();"
---Purpose: Returns the constructed box as a shell.
is static;
Solid(me : in out) returns Solid from TopoDS
---C++: return const &
---C++: alias "Standard_EXPORT operator TopoDS_Solid();"
---Purpose: Returns the constructed box as a solid.
is static;
BottomFace (me : in out) returns Face from TopoDS;
---Purpose : Returns ZMin face
---C++: return const &
BackFace (me : in out) returns Face from TopoDS;
---Purpose : Returns XMin face
---C++: return const &
FrontFace (me : in out) returns Face from TopoDS;
---Purpose : Returns XMax face
---C++: return const &
LeftFace (me : in out) returns Face from TopoDS;
---Purpose : Returns YMin face
---C++: return const &
RightFace (me : in out) returns Face from TopoDS;
---Purpose : Returns YMax face
---C++: return const &
TopFace (me : in out) returns Face from TopoDS;
---Purpose : Returns ZMax face
---C++: return const &
fields
myWedge : Wedge from BRepPrim;
end MakeBox;

View File

@@ -14,11 +14,20 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepPrimAPI_MakeBox.ixx>
#include <BRepBuilderAPI.hxx>
#include <TopoDS.hxx>
#include <BRepPrim_Direction.hxx>
#include <BRepBuilderAPI.hxx>
#include <BRepPrim_Direction.hxx>
#include <BRepPrim_Wedge.hxx>
#include <BRepPrimAPI_MakeBox.hxx>
#include <gp_Ax2.hxx>
#include <gp_Pnt.hxx>
#include <Standard_DomainError.hxx>
#include <Standard_OutOfRange.hxx>
#include <StdFail_NotDone.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Solid.hxx>
inline gp_Pnt pmin(const gp_Pnt& p,
const Standard_Real dx,

View File

@@ -0,0 +1,131 @@
// Created on: 1993-07-21
// Created by: Remi LEQUETTE
// Copyright (c) 1993-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepPrimAPI_MakeBox_HeaderFile
#define _BRepPrimAPI_MakeBox_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <BRepPrim_Wedge.hxx>
#include <BRepBuilderAPI_MakeShape.hxx>
#include <Standard_Real.hxx>
class Standard_DomainError;
class Standard_OutOfRange;
class StdFail_NotDone;
class gp_Pnt;
class gp_Ax2;
class BRepPrim_Wedge;
class TopoDS_Shell;
class TopoDS_Solid;
class TopoDS_Face;
//! Describes functions to build parallelepiped boxes.
//! A MakeBox object provides a framework for:
//! - defining the construction of a box,
//! - implementing the construction algorithm, and
//! - consulting the result.
class BRepPrimAPI_MakeBox : public BRepBuilderAPI_MakeShape
{
public:
DEFINE_STANDARD_ALLOC
//! Make a box with a corner at 0,0,0 and the other dx,dy,dz
Standard_EXPORT BRepPrimAPI_MakeBox(const Standard_Real dx, const Standard_Real dy, const Standard_Real dz);
//! Make a box with a corner at P and size dx, dy, dz.
Standard_EXPORT BRepPrimAPI_MakeBox(const gp_Pnt& P, const Standard_Real dx, const Standard_Real dy, const Standard_Real dz);
//! Make a box with corners P1,P2.
Standard_EXPORT BRepPrimAPI_MakeBox(const gp_Pnt& P1, const gp_Pnt& P2);
//! Ax2 is the left corner and the axis.
//! Constructs a box such that its sides are parallel to the axes of
//! - the global coordinate system, or
//! - the local coordinate system Axis. and
//! - with a corner at (0, 0, 0) and of size (dx, dy, dz), or
//! - with a corner at point P and of size (dx, dy, dz), or
//! - with corners at points P1 and P2.
//! Exceptions
//! Standard_DomainError if: dx, dy, dz are less than or equal to
//! Precision::Confusion(), or
//! - the vector joining the points P1 and P2 has a
//! component projected onto the global coordinate
//! system less than or equal to Precision::Confusion().
//! In these cases, the box would be flat.
Standard_EXPORT BRepPrimAPI_MakeBox(const gp_Ax2& Axes, const Standard_Real dx, const Standard_Real dy, const Standard_Real dz);
//! Returns the internal algorithm.
Standard_EXPORT BRepPrim_Wedge& Wedge();
//! Stores the solid in myShape.
Standard_EXPORT virtual void Build() Standard_OVERRIDE;
//! Returns the constructed box as a shell.
Standard_EXPORT const TopoDS_Shell& Shell();
Standard_EXPORT operator TopoDS_Shell();
//! Returns the constructed box as a solid.
Standard_EXPORT const TopoDS_Solid& Solid();
Standard_EXPORT operator TopoDS_Solid();
//! Returns ZMin face
Standard_EXPORT const TopoDS_Face& BottomFace();
//! Returns XMin face
Standard_EXPORT const TopoDS_Face& BackFace();
//! Returns XMax face
Standard_EXPORT const TopoDS_Face& FrontFace();
//! Returns YMin face
Standard_EXPORT const TopoDS_Face& LeftFace();
//! Returns YMax face
Standard_EXPORT const TopoDS_Face& RightFace();
//! Returns ZMax face
Standard_EXPORT const TopoDS_Face& TopFace();
protected:
private:
BRepPrim_Wedge myWedge;
};
#endif // _BRepPrimAPI_MakeBox_HeaderFile

View File

@@ -1,112 +0,0 @@
-- Created on: 1993-07-21
-- Created by: Remi LEQUETTE
-- Copyright (c) 1993-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class MakeCone from BRepPrimAPI inherits MakeOneAxis from BRepPrimAPI
---Purpose: Describes functions to build cones or portions of cones.
-- A MakeCone object provides a framework for:
-- - defining the construction of a cone,
-- - implementing the construction algorithm, and
-- - consulting the result.
uses
Ax2 from gp,
Cone from BRepPrim,
OneAxis from BRepPrim
raises
DomainError from Standard
is
Create(R1, R2, H : Real)
returns MakeCone from BRepPrimAPI
---Purpose: 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.
---Level: Public
raises
DomainError from Standard; -- if H <= Precision::Confusion()
Create(R1, R2, H, angle : Real)
returns MakeCone from BRepPrimAPI
---Purpose: 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>
---Level: Public
raises
DomainError from Standard; -- if H <= Precision::Confusion()
Create(Axes : Ax2 from gp; R1, R2, H : Real)
returns MakeCone from BRepPrimAPI
---Purpose: 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.
---Level: Public
raises
DomainError from Standard; -- if H <= Precision::Confusion()
Create(Axes : Ax2 from gp; R1, R2, H, angle : Real)
returns MakeCone from BRepPrimAPI
---Purpose: 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>
---Level: Public
raises
DomainError from Standard; -- if H <= Precision::Confusion()
---Purpose: Constructs a cone, or a portion of a cone, of height H,
-- and radius R1 in the plane z = 0 and R2 in the plane
-- z = H. The result is a sharp cone if R1 or R2 is equal to 0.
-- The cone is constructed about the "Z Axis" of either:
-- - the global coordinate system, or
-- - the local coordinate system Axes.
-- It is limited in these coordinate systems as follows:
-- - in the v parametric direction (the Z coordinate), by
-- the two parameter values 0 and H,
-- - and in the u parametric direction (defined by the
-- angle of rotation around the Z axis), in the case of a
-- portion of a cone, by the two parameter values 0 and
-- angle. Angle is given in radians.
-- The resulting shape is composed of:
-- - a lateral conical face
-- - two planar faces in the planes z = 0 and z = H,
-- or only one planar face in one of these two planes if a
-- radius value is null (in the case of a complete cone,
-- these faces are circles), and
-- - and in the case of a portion of a cone, two planar
-- faces to close the shape. (either two parallelograms or
-- two triangles, in the planes u = 0 and u = angle).
-- Exceptions
-- Standard_DomainError if:
-- - H is less than or equal to Precision::Confusion(), or
-- - the half-angle at the apex of the cone, defined by
-- R1, R2 and H, is less than Precision::Confusion()/H, or greater than
-- (Pi/2)-Precision::Confusion()/H.f
OneAxis(me : in out) returns Address;
---Purpose: Returns the algorithm.
---Level: Public
Cone(me : in out) returns Cone from BRepPrim
---Purpose: Returns the algorithm.
--
---C++: return &
---Level: Public
is static;
fields
myCone : Cone from BRepPrim;
end MakeCone;

View File

@@ -14,16 +14,14 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepPrimAPI_MakeCone.ixx>
#include <BRepBuilderAPI.hxx>
#include <BRepPrim_Cone.hxx>
#include <BRepPrimAPI_MakeCone.hxx>
#include <gp.hxx>
#include <gp_Dir.hxx>
#include <gp_Ax2.hxx>
#include <gp_Dir.hxx>
#include <Standard_DomainError.hxx>
static gp_Ax2 ConeComputeAxes() {
static Standard_Integer firsttime=1;

View File

@@ -0,0 +1,121 @@
// Created on: 1993-07-21
// Created by: Remi LEQUETTE
// Copyright (c) 1993-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepPrimAPI_MakeCone_HeaderFile
#define _BRepPrimAPI_MakeCone_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <BRepPrim_Cone.hxx>
#include <BRepPrimAPI_MakeOneAxis.hxx>
#include <Standard_Real.hxx>
#include <Standard_Address.hxx>
class Standard_DomainError;
class gp_Ax2;
class BRepPrim_Cone;
//! Describes functions to build cones or portions of cones.
//! A MakeCone object provides a framework for:
//! - defining the construction of a cone,
//! - implementing the construction algorithm, and
//! - consulting the result.
class BRepPrimAPI_MakeCone : public BRepPrimAPI_MakeOneAxis
{
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.
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>
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.
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 =
//! 0, R2 in the plane Z = H. R1 and R2 may be null.
//! Take a section of <angle>
//! Constructs a cone, or a portion of a cone, of height H,
//! and radius R1 in the plane z = 0 and R2 in the plane
//! z = H. The result is a sharp cone if R1 or R2 is equal to 0.
//! The cone is constructed about the "Z Axis" of either:
//! - the global coordinate system, or
//! - the local coordinate system Axes.
//! It is limited in these coordinate systems as follows:
//! - in the v parametric direction (the Z coordinate), by
//! the two parameter values 0 and H,
//! - and in the u parametric direction (defined by the
//! angle of rotation around the Z axis), in the case of a
//! portion of a cone, by the two parameter values 0 and
//! angle. Angle is given in radians.
//! The resulting shape is composed of:
//! - a lateral conical face
//! - two planar faces in the planes z = 0 and z = H,
//! or only one planar face in one of these two planes if a
//! radius value is null (in the case of a complete cone,
//! these faces are circles), and
//! - and in the case of a portion of a cone, two planar
//! faces to close the shape. (either two parallelograms or
//! two triangles, in the planes u = 0 and u = angle).
//! Exceptions
//! Standard_DomainError if:
//! - H is less than or equal to Precision::Confusion(), or
//! - the half-angle at the apex of the cone, defined by
//! R1, R2 and H, is less than Precision::Confusion()/H, or greater than
//! (Pi/2)-Precision::Confusion()/H.f
Standard_EXPORT BRepPrimAPI_MakeCone(const gp_Ax2& Axes, const Standard_Real R1, const Standard_Real R2, const Standard_Real H, const Standard_Real angle);
//! Returns the algorithm.
Standard_EXPORT Standard_Address OneAxis();
//! Returns the algorithm.
Standard_EXPORT BRepPrim_Cone& Cone();
protected:
private:
BRepPrim_Cone myCone;
};
#endif // _BRepPrimAPI_MakeCone_HeaderFile

View File

@@ -1,105 +0,0 @@
-- Created on: 1993-07-21
-- Created by: Remi LEQUETTE
-- Copyright (c) 1993-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class MakeCylinder from BRepPrimAPI inherits MakeOneAxis from BRepPrimAPI
---Purpose: Describes functions to build cylinders or portions of cylinders.
-- A MakeCylinder object provides a framework for:
-- - defining the construction of a cylinder,
-- - implementing the construction algorithm, and
-- - consulting the result.
uses
Ax2 from gp,
Cylinder from BRepPrim,
OneAxis from BRepPrim
raises
DomainError from Standard
is
Create(R, H : Real)
returns MakeCylinder from BRepPrimAPI
---Purpose: Make a cylinder of radius R and length H.
---Level: Public
raises
DomainError from Standard; -- if R or H <= Precision::Confusion()
Create(R, H, Angle : Real)
returns MakeCylinder from BRepPrimAPI
---Purpose: Make a cylinder of radius R and length H with
-- angle H.
---Level: Public
raises
DomainError from Standard; -- if R or H <= Precision::Confusion()
Create(Axes : Ax2 from gp; R, H : Real)
returns MakeCylinder from BRepPrimAPI
---Purpose: Make a cylinder of radius R and length H.
---Level: Public
raises
DomainError from Standard; -- if R or H <= Precision::Confusion()
Create(Axes : Ax2 from gp; R, H, Angle : Real)
returns MakeCylinder from BRepPrimAPI
---Purpose: Make a cylinder of radius R and length H with
-- angle H.
---Level: Public
raises
DomainError from Standard; -- if R or H <= Precision::Confusion()
---Purpose: Constructs
-- - a cylinder of radius R and height H, or
-- - a portion of cylinder of radius R and height H, and of
-- the angle Angle defining the missing portion of the cylinder.
-- The cylinder is constructed about the "Z Axis" of either:
-- - the global coordinate system, or
-- - the local coordinate system Axes.
-- It is limited in this coordinate system as follows:
-- - in the v parametric direction (the Z axis), by the two
-- parameter values 0 and H,
-- - and in the u parametric direction (the rotation angle
-- around the Z Axis), in the case of a portion of a
-- cylinder, by the two parameter values 0 and Angle.
-- Angle is given in radians.
-- The resulting shape is composed of:
-- - a lateral cylindrical face,
-- - two planar faces in the planes z = 0 and z = H
-- (in the case of a complete cylinder, these faces are circles), and
-- - in case of a portion of a cylinder, two additional
-- planar faces to close the shape.(two rectangles in the
-- planes u = 0 and u = Angle).
-- Exceptions Standard_DomainError if:
-- - R is less than or equal to Precision::Confusion(), or
-- - H is less than or equal to Precision::Confusion().
OneAxis(me : in out) returns Address;
---Purpose: Returns the algorithm.
---Level: Advanced
Cylinder(me : in out) returns Cylinder from BRepPrim
---Purpose: Returns the algorithm.
--
---C++: return &
---Level: Public
is static;
fields
myCylinder : Cylinder from BRepPrim;
end MakeCylinder;

View File

@@ -14,14 +14,14 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepPrimAPI_MakeCylinder.ixx>
#include <BRepBuilderAPI.hxx>
#include <BRepPrim_Cylinder.hxx>
#include <BRepPrimAPI_MakeCylinder.hxx>
#include <gp.hxx>
#include <gp_Dir.hxx>
#include <gp_Ax2.hxx>
#include <gp_Dir.hxx>
#include <Standard_DomainError.hxx>
static gp_Ax2 CylinderComputeAxes() {
static Standard_Integer firsttime=1;

View File

@@ -0,0 +1,113 @@
// Created on: 1993-07-21
// Created by: Remi LEQUETTE
// Copyright (c) 1993-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepPrimAPI_MakeCylinder_HeaderFile
#define _BRepPrimAPI_MakeCylinder_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <BRepPrim_Cylinder.hxx>
#include <BRepPrimAPI_MakeOneAxis.hxx>
#include <Standard_Real.hxx>
#include <Standard_Address.hxx>
class Standard_DomainError;
class gp_Ax2;
class BRepPrim_Cylinder;
//! Describes functions to build cylinders or portions of cylinders.
//! A MakeCylinder object provides a framework for:
//! - defining the construction of a cylinder,
//! - implementing the construction algorithm, and
//! - consulting the result.
class BRepPrimAPI_MakeCylinder : public BRepPrimAPI_MakeOneAxis
{
public:
DEFINE_STANDARD_ALLOC
//! Make a cylinder of radius R and length H.
Standard_EXPORT BRepPrimAPI_MakeCylinder(const Standard_Real R, const Standard_Real H);
//! Make a cylinder of radius R and length H with
//! angle H.
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.
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
//! - a cylinder of radius R and height H, or
//! - a portion of cylinder of radius R and height H, and of
//! the angle Angle defining the missing portion of the cylinder.
//! The cylinder is constructed about the "Z Axis" of either:
//! - the global coordinate system, or
//! - the local coordinate system Axes.
//! It is limited in this coordinate system as follows:
//! - in the v parametric direction (the Z axis), by the two
//! parameter values 0 and H,
//! - and in the u parametric direction (the rotation angle
//! around the Z Axis), in the case of a portion of a
//! cylinder, by the two parameter values 0 and Angle.
//! Angle is given in radians.
//! The resulting shape is composed of:
//! - a lateral cylindrical face,
//! - two planar faces in the planes z = 0 and z = H
//! (in the case of a complete cylinder, these faces are circles), and
//! - in case of a portion of a cylinder, two additional
//! planar faces to close the shape.(two rectangles in the
//! planes u = 0 and u = Angle).
//! Exceptions Standard_DomainError if:
//! - R is less than or equal to Precision::Confusion(), or
//! - H is less than or equal to Precision::Confusion().
Standard_EXPORT BRepPrimAPI_MakeCylinder(const gp_Ax2& Axes, const Standard_Real R, const Standard_Real H, const Standard_Real Angle);
//! Returns the algorithm.
Standard_EXPORT Standard_Address OneAxis();
//! Returns the algorithm.
Standard_EXPORT BRepPrim_Cylinder& Cylinder();
protected:
private:
BRepPrim_Cylinder myCylinder;
};
#endif // _BRepPrimAPI_MakeCylinder_HeaderFile

View File

@@ -1,72 +0,0 @@
-- Created on: 1995-03-08
-- Created by: Bruno DUMORTIER
-- Copyright (c) 1995-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class MakeHalfSpace from BRepPrimAPI inherits MakeShape from BRepBuilderAPI
---Purpose: Describes functions to build half-spaces.
-- A half-space is an infinite solid, limited by a surface. It
-- is built from a face or a shell, which bounds it, and with
-- a reference point, which specifies the side of the
-- surface where the matter of the half-space is located.
-- A half-space is a tool commonly used in topological
-- operations to cut another shape.
-- A MakeHalfSpace object provides a framework for:
-- - defining and implementing the construction of a half-space, and
-- - consulting the result.
uses
Shape from TopoDS,
Vertex from TopoDS,
Face from TopoDS,
Shell from TopoDS,
Solid from TopoDS,
Pnt from gp,
MakeShape from BRepBuilderAPI
raises
NotDone from StdFail
is
Create(Face : Face from TopoDS;
RefPnt : Pnt from gp)
returns MakeHalfSpace from BRepPrimAPI;
---Purpose: Make a HalfSpace defined with a Face and a Point.
---Level: Public
Create(Shell : Shell from TopoDS;
RefPnt : Pnt from gp)
returns MakeHalfSpace from BRepPrimAPI;
---Purpose: Make a HalfSpace defined with a Shell and a Point.
---Level: Public
----------------------------------------------
-- Results
----------------------------------------------
Solid(me) returns Solid from TopoDS
---Purpose: Returns the constructed half-space as a solid.
---C++: return const &
---C++: alias "Standard_EXPORT operator TopoDS_Solid() const;"
raises
NotDone from StdFail
is static;
fields
mySolid : Solid from TopoDS;
end MakeHalfSpace;

View File

@@ -14,18 +14,23 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepPrimAPI_MakeHalfSpace.ixx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRepBuilderAPI_MakeVertex.hxx>
#include <BRepExtrema_ExtPF.hxx>
#include <BRepLProp_SLProps.hxx>
#include <BRepPrimAPI_MakeHalfSpace.hxx>
#include <gp.hxx>
#include <gp_Dir.hxx>
#include <gp_Pnt.hxx>
#include <StdFail_NotDone.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Solid.hxx>
#include <TopoDS_Vertex.hxx>
#include <BRep_Tool.hxx>
//=======================================================================
//function : FindExtrema
@@ -37,7 +42,6 @@
// - anOppositePnt : The corresponding point lying on the face
// - U,V : The parameters of <anOppositePnt> on the face <aFace>
//=======================================================================
static Standard_Real FindExtrema(const gp_Pnt& aPnt,
const TopoDS_Face& aFace,
Standard_Real& Dist,

View File

@@ -0,0 +1,84 @@
// Created on: 1995-03-08
// Created by: Bruno DUMORTIER
// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepPrimAPI_MakeHalfSpace_HeaderFile
#define _BRepPrimAPI_MakeHalfSpace_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TopoDS_Solid.hxx>
#include <BRepBuilderAPI_MakeShape.hxx>
class StdFail_NotDone;
class TopoDS_Face;
class gp_Pnt;
class TopoDS_Shell;
class TopoDS_Solid;
//! Describes functions to build half-spaces.
//! A half-space is an infinite solid, limited by a surface. It
//! is built from a face or a shell, which bounds it, and with
//! a reference point, which specifies the side of the
//! surface where the matter of the half-space is located.
//! A half-space is a tool commonly used in topological
//! operations to cut another shape.
//! A MakeHalfSpace object provides a framework for:
//! - defining and implementing the construction of a half-space, and
//! - consulting the result.
class BRepPrimAPI_MakeHalfSpace : public BRepBuilderAPI_MakeShape
{
public:
DEFINE_STANDARD_ALLOC
//! Make a HalfSpace defined with a Face and a Point.
Standard_EXPORT BRepPrimAPI_MakeHalfSpace(const TopoDS_Face& Face, const gp_Pnt& RefPnt);
//! Make a HalfSpace defined with a Shell and a Point.
Standard_EXPORT BRepPrimAPI_MakeHalfSpace(const TopoDS_Shell& Shell, const gp_Pnt& RefPnt);
//! Returns the constructed half-space as a solid.
Standard_EXPORT const TopoDS_Solid& Solid() const;
Standard_EXPORT operator TopoDS_Solid() const;
protected:
private:
TopoDS_Solid mySolid;
};
#endif // _BRepPrimAPI_MakeHalfSpace_HeaderFile

View File

@@ -1,67 +0,0 @@
-- Created on: 1993-07-22
-- Created by: Remi LEQUETTE
-- Copyright (c) 1993-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
deferred class MakeOneAxis from BRepPrimAPI inherits MakeShape from BRepBuilderAPI
---Purpose: The abstract class MakeOneAxis is the root class of
-- algorithms used to construct rotational primitives.
uses
Address from Standard,
Face from TopoDS,
Shell from TopoDS,
Solid from TopoDS
raises
NotDone from StdFail
is
OneAxis(me : in out) returns Address from Standard
---Purpose: The inherited commands should provide the algorithm.
-- Returned as a pointer.
---Level: Public
is deferred;
Build(me : in out)
---Purpose: Stores the solid in myShape.
---Level: Public
is redefined;
Face(me : in out)
---Purpose: Returns the lateral face of the rotational primitive.
--
---C++: return const &
---C++: alias "Standard_EXPORT operator TopoDS_Face();"
---Level: Public
returns Face from TopoDS
is static;
Shell(me : in out)
---Purpose: Returns the constructed rotational primitive as a shell.
---C++: return const &
---C++: alias "Standard_EXPORT operator TopoDS_Shell();"
returns Shell from TopoDS
is static;
Solid(me : in out)
---Purpose: Returns the constructed rotational primitive as a solid.
---C++: return const &
---C++: alias "Standard_EXPORT operator TopoDS_Solid();"
returns Solid from TopoDS
is static;
end MakeOneAxis;

View File

@@ -14,16 +14,20 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepPrimAPI_MakeOneAxis.ixx>
#include <BRepBuilderAPI.hxx>
#include <BRepPrim_OneAxis.hxx>
#include <BRepPrimAPI_MakeOneAxis.hxx>
#include <StdFail_NotDone.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Solid.hxx>
//=======================================================================
//function : Face
//purpose :
//=======================================================================
const TopoDS_Face& BRepPrimAPI_MakeOneAxis::Face()
{
Build();

View File

@@ -0,0 +1,83 @@
// Created on: 1993-07-22
// Created by: Remi LEQUETTE
// Copyright (c) 1993-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepPrimAPI_MakeOneAxis_HeaderFile
#define _BRepPrimAPI_MakeOneAxis_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <BRepBuilderAPI_MakeShape.hxx>
#include <Standard_Address.hxx>
class StdFail_NotDone;
class TopoDS_Face;
class TopoDS_Shell;
class TopoDS_Solid;
//! The abstract class MakeOneAxis is the root class of
//! algorithms used to construct rotational primitives.
class BRepPrimAPI_MakeOneAxis : public BRepBuilderAPI_MakeShape
{
public:
DEFINE_STANDARD_ALLOC
//! The inherited commands should provide the algorithm.
//! Returned as a pointer.
Standard_EXPORT virtual Standard_Address OneAxis() = 0;
//! Stores the solid in myShape.
Standard_EXPORT virtual void Build() Standard_OVERRIDE;
//! Returns the lateral face of the rotational primitive.
Standard_EXPORT const TopoDS_Face& Face();
Standard_EXPORT operator TopoDS_Face();
//! Returns the constructed rotational primitive as a shell.
Standard_EXPORT const TopoDS_Shell& Shell();
Standard_EXPORT operator TopoDS_Shell();
//! Returns the constructed rotational primitive as a solid.
Standard_EXPORT const TopoDS_Solid& Solid();
Standard_EXPORT operator TopoDS_Solid();
protected:
private:
};
#endif // _BRepPrimAPI_MakeOneAxis_HeaderFile

View File

@@ -1,137 +0,0 @@
-- Created on: 1993-10-12
-- Created by: Remi LEQUETTE
-- Copyright (c) 1993-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
-- Modified by skv - Fri Mar 4 15:50:09 2005
-- Add methods for supporting history.
class MakePrism from BRepPrimAPI inherits MakeSweep from BRepPrimAPI
---Purpose: Describes functions to build linear swept topologies, called prisms.
-- A prism is defined by:
-- - a basis shape, which is swept, and
-- - a sweeping direction, which is:
-- - a vector for finite prisms, or
-- - a direction for infinite or semi-infinite prisms.
-- The basis shape must not contain any solids.
-- The profile generates objects according to the following rules:
-- - Vertices generate Edges
-- - Edges generate Faces.
-- - Wires generate Shells.
-- - Faces generate Solids.
-- - Shells generate Composite Solids
-- A MakePrism object provides a framework for:
-- - defining the construction of a prism,
-- - implementing the construction algorithm, and
-- - consulting the result.
uses
Prism from BRepSweep,
Shape from TopoDS,
ListOfShape from TopTools,
Edge from TopoDS,
Vec from gp,
Dir from gp
is
Create (S : Shape from TopoDS;
V : Vec from gp;
Copy : Boolean from Standard = Standard_False;
Canonize: Boolean from Standard = Standard_True)
---Purpose: Builds the prism of base S and vector V. If C is true,
-- S is copied. If Canonize is true then generated surfaces
-- are attempted to be canonized in simple types
---Level: Public
returns MakePrism from BRepPrimAPI;
Create (S : Shape from TopoDS;
D : Dir from gp;
Inf : Boolean from Standard = Standard_True;
Copy : Boolean from Standard = Standard_False;
Canonize : Boolean from Standard = Standard_True)
---Purpose: Builds a semi-infinite or an infinite prism of base S.
-- If Inf is true the prism is infinite, if Inf is false
-- the prism is semi-infinite (in the direction D). If C
-- is true S is copied (for semi-infinite prisms).
-- If Canonize is true then generated surfaces
-- are attempted to be canonized in simple types
---Level: Public
returns MakePrism from BRepPrimAPI;
Prism(me) returns Prism from BRepSweep
---Purpose: Returns the internal sweeping algorithm.
--
---C++: return const &
---Level: Advanced
is static;
Build(me : in out)
---Purpose: Builds the resulting shape (redefined from MakeShape).
---Level: Public
is redefined;
FirstShape (me : in out)
---Purpose: Returns the TopoDS Shape of the bottom of the prism.
returns Shape from TopoDS;
LastShape (me : in out)
---Purpose: Returns the TopoDS Shape of the top of the prism.
-- In the case of a finite prism, FirstShape returns the
-- basis of the prism, in other words, S if Copy is false;
-- otherwise, the copy of S belonging to the prism.
-- LastShape returns the copy of S translated by V at the
-- time of construction.
returns Shape from TopoDS;
Generated (me: in out; S : Shape from TopoDS)
---Purpose: Returns ListOfShape from TopTools.
---C++: return const &
returns ListOfShape from TopTools
is redefined;
-- Modified by skv - Fri Mar 4 15:50:09 2005 Begin
-- Add methods for supporting history.
FirstShape (me : in out; theShape : Shape from TopoDS)
---Purpose: Returns the TopoDS Shape of the bottom of the prism.
-- generated with theShape (subShape of the generating shape).
returns Shape from TopoDS
is static;
LastShape (me : in out; theShape : Shape from TopoDS)
---Purpose: Returns the TopoDS Shape of the top of the prism.
-- generated with theShape (subShape of the generating shape).
returns Shape from TopoDS
is static;
-- Modified by skv - Fri Mar 4 15:50:09 2005 End
fields
myPrism : Prism from BRepSweep;
end MakePrism;

View File

@@ -17,11 +17,14 @@
// Modified by skv - Fri Mar 4 15:50:09 2005
// Add methods for supporting history.
#include <BRepPrimAPI_MakePrism.ixx>
#include <BRepLib.hxx>
#include <BRepPrimAPI_MakePrism.hxx>
#include <BRepSweep_Prism.hxx>
#include <gp_Dir.hxx>
#include <gp_Vec.hxx>
#include <TopoDS_Shape.hxx>
// perform checks on the argument
static const TopoDS_Shape& check(const TopoDS_Shape& S)
{
BRepLib::BuildCurves3d(S);

View File

@@ -0,0 +1,123 @@
// Created on: 1993-10-12
// Created by: Remi LEQUETTE
// Copyright (c) 1993-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepPrimAPI_MakePrism_HeaderFile
#define _BRepPrimAPI_MakePrism_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <BRepSweep_Prism.hxx>
#include <BRepPrimAPI_MakeSweep.hxx>
#include <Standard_Boolean.hxx>
#include <TopTools_ListOfShape.hxx>
class TopoDS_Shape;
class gp_Vec;
class gp_Dir;
class BRepSweep_Prism;
//! Describes functions to build linear swept topologies, called prisms.
//! A prism is defined by:
//! - a basis shape, which is swept, and
//! - a sweeping direction, which is:
//! - a vector for finite prisms, or
//! - a direction for infinite or semi-infinite prisms.
//! The basis shape must not contain any solids.
//! The profile generates objects according to the following rules:
//! - Vertices generate Edges
//! - Edges generate Faces.
//! - Wires generate Shells.
//! - Faces generate Solids.
//! - Shells generate Composite Solids
//! A MakePrism object provides a framework for:
//! - defining the construction of a prism,
//! - implementing the construction algorithm, and
//! - consulting the result.
class BRepPrimAPI_MakePrism : public BRepPrimAPI_MakeSweep
{
public:
DEFINE_STANDARD_ALLOC
//! Builds the prism of base S and vector V. If C is true,
//! S is copied. If Canonize is true then generated surfaces
//! are attempted to be canonized in simple types
Standard_EXPORT BRepPrimAPI_MakePrism(const TopoDS_Shape& S, const gp_Vec& V, const Standard_Boolean Copy = Standard_False, const Standard_Boolean Canonize = Standard_True);
//! Builds a semi-infinite or an infinite prism of base S.
//! If Inf is true the prism is infinite, if Inf is false
//! the prism is semi-infinite (in the direction D). If C
//! is true S is copied (for semi-infinite prisms).
//! If Canonize is true then generated surfaces
//! are attempted to be canonized in simple types
Standard_EXPORT BRepPrimAPI_MakePrism(const TopoDS_Shape& S, const gp_Dir& D, const Standard_Boolean Inf = Standard_True, const Standard_Boolean Copy = Standard_False, const Standard_Boolean Canonize = Standard_True);
//! Returns the internal sweeping algorithm.
Standard_EXPORT const BRepSweep_Prism& Prism() const;
//! Builds the resulting shape (redefined from MakeShape).
Standard_EXPORT virtual void Build() Standard_OVERRIDE;
//! Returns the TopoDS Shape of the bottom of the prism.
Standard_EXPORT TopoDS_Shape FirstShape();
//! Returns the TopoDS Shape of the top of the prism.
//! In the case of a finite prism, FirstShape returns the
//! basis of the prism, in other words, S if Copy is false;
//! otherwise, the copy of S belonging to the prism.
//! LastShape returns the copy of S translated by V at the
//! time of construction.
Standard_EXPORT TopoDS_Shape LastShape();
//! Returns ListOfShape from TopTools.
Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& S) Standard_OVERRIDE;
//! Returns the TopoDS Shape of the bottom of the prism.
//! generated with theShape (subShape of the generating shape).
Standard_EXPORT TopoDS_Shape FirstShape (const TopoDS_Shape& theShape);
//! Returns the TopoDS Shape of the top of the prism.
//! generated with theShape (subShape of the generating shape).
Standard_EXPORT TopoDS_Shape LastShape (const TopoDS_Shape& theShape);
protected:
private:
BRepSweep_Prism myPrism;
};
#endif // _BRepPrimAPI_MakePrism_HeaderFile

View File

@@ -1,154 +0,0 @@
-- Created on: 1993-10-12
-- Created by: Remi LEQUETTE
-- Copyright (c) 1993-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
-- Modified by skv - Fri Mar 4 15:50:09 2005
-- Add methods for supporting history.
class MakeRevol from BRepPrimAPI inherits MakeSweep from BRepPrimAPI
---Purpose: Class to make revolved sweep topologies.
--
-- a revolved sweep is defined by :
--
-- * A basis topology which is swept.
--
-- The basis topology must not contain solids
-- (neither composite solids.).
--
-- The basis topology may be copied or shared in
-- the result.
--
-- * A rotation axis and angle :
--
-- - The axis is an Ax1 from gp.
--
-- - The angle is in [0, 2*Pi].
--
-- - The angle default value is 2*Pi.
--
--
-- The result is a topology with a higher dimension :
--
-- - Vertex -> Edge.
-- - Edge -> Face.
-- - Wire -> Shell.
-- - Face -> Solid.
-- - Shell -> CompSolid.
--
-- Sweeping a Compound sweeps the elements of the
-- compound and creates a compound with the
-- results.
--
uses
Revol from BRepSweep,
Shape from TopoDS,
ListOfShape from TopTools,
Edge from TopoDS,
Ax1 from gp
is
Create (S : Shape from TopoDS;
A : Ax1 from gp;
D : Real from Standard;
Copy : Boolean from Standard = Standard_False)
---Purpose: Builds the Revol of base S, axis A and angle D. If C
-- is true, S is copied.
---Level: Public
returns MakeRevol from BRepPrimAPI;
Create (S : Shape from TopoDS;
A : Ax1 from gp;
Copy : Boolean from Standard = Standard_False)
---Purpose: Builds the Revol of base S, axis A and angle 2*Pi. If
-- C is true, S is copied.
---Level: Public
returns MakeRevol from BRepPrimAPI;
Revol(me) returns Revol from BRepSweep
---Purpose: Returns the internal sweeping algorithm.
--
---C++: return const &
---Level: Public
is static;
Build(me : in out)
is redefined;
---Purpose: Builds the resulting shape (redefined from MakeShape).
---Level: Public
FirstShape (me : in out)
---Purpose: Returns the first shape of the revol (coinciding with
-- the generating shape).
returns Shape from TopoDS;
LastShape (me : in out)
---Purpose: Returns the TopoDS Shape of the end of the revol.
returns Shape from TopoDS;
Generated (me: in out; S : Shape from TopoDS)
---C++: return const &
---Level: Public
returns ListOfShape from TopTools
is redefined;
-- Modified by skv - Fri Mar 4 15:50:09 2005 Begin
-- Add methods for supporting history.
FirstShape (me : in out; theShape : Shape from TopoDS)
---Purpose: Returns the TopoDS Shape of the beginning of the revolution,
-- generated with theShape (subShape of the generating shape).
returns Shape from TopoDS
is static;
LastShape (me : in out; theShape : Shape from TopoDS)
---Purpose: Returns the TopoDS Shape of the end of the revolution,
-- generated with theShape (subShape of the generating shape).
returns Shape from TopoDS
is static;
HasDegenerated(me)
---Purpose: Check if there are degenerated edges in the result.
---Level: Public
returns Boolean from Standard
is static;
Degenerated(me)
---C++: return const &
---Level: Public
returns ListOfShape from TopTools
is static;
-- Modified by skv - Fri Mar 4 15:50:09 2005 End
fields
myRevol : Revol from BRepSweep;
myDegenerated: ListOfShape from TopTools; -- skv
end MakeRevol;

View File

@@ -17,13 +17,15 @@
// Modified by skv - Fri Mar 4 15:50:09 2005
// Add methods for supporting history.
#include <BRepPrimAPI_MakeRevol.ixx>
#include <BRepLib.hxx>
#include <TopExp_Explorer.hxx>
#include <BRep_TEdge.hxx>
#include <BRepLib.hxx>
#include <BRepPrimAPI_MakeRevol.hxx>
#include <BRepSweep_Revol.hxx>
#include <gp_Ax1.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Shape.hxx>
// perform checks on the argument
static const TopoDS_Shape& check(const TopoDS_Shape& S)
{
BRepLib::BuildCurves3d(S);

View File

@@ -0,0 +1,133 @@
// Created on: 1993-10-12
// Created by: Remi LEQUETTE
// Copyright (c) 1993-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepPrimAPI_MakeRevol_HeaderFile
#define _BRepPrimAPI_MakeRevol_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <BRepSweep_Revol.hxx>
#include <TopTools_ListOfShape.hxx>
#include <BRepPrimAPI_MakeSweep.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
class TopoDS_Shape;
class gp_Ax1;
class BRepSweep_Revol;
//! Class to make revolved sweep topologies.
//!
//! a revolved sweep is defined by :
//!
//! * A basis topology which is swept.
//!
//! The basis topology must not contain solids
//! (neither composite solids.).
//!
//! The basis topology may be copied or shared in
//! the result.
//!
//! * A rotation axis and angle :
//!
//! - The axis is an Ax1 from gp.
//!
//! - The angle is in [0, 2*Pi].
//!
//! - The angle default value is 2*Pi.
//!
//! The result is a topology with a higher dimension :
//!
//! - Vertex -> Edge.
//! - Edge -> Face.
//! - Wire -> Shell.
//! - Face -> Solid.
//! - Shell -> CompSolid.
//!
//! Sweeping a Compound sweeps the elements of the
//! compound and creates a compound with the
//! results.
class BRepPrimAPI_MakeRevol : public BRepPrimAPI_MakeSweep
{
public:
DEFINE_STANDARD_ALLOC
//! Builds the Revol of base S, axis A and angle D. If C
//! is true, S is copied.
Standard_EXPORT BRepPrimAPI_MakeRevol(const TopoDS_Shape& S, const gp_Ax1& A, const Standard_Real D, const Standard_Boolean Copy = Standard_False);
//! Builds the Revol of base S, axis A and angle 2*Pi. If
//! C is true, S is copied.
Standard_EXPORT BRepPrimAPI_MakeRevol(const TopoDS_Shape& S, const gp_Ax1& A, const Standard_Boolean Copy = Standard_False);
//! Returns the internal sweeping algorithm.
Standard_EXPORT const BRepSweep_Revol& Revol() const;
//! Builds the resulting shape (redefined from MakeShape).
Standard_EXPORT virtual void Build() Standard_OVERRIDE;
//! Returns the first shape of the revol (coinciding with
//! the generating shape).
Standard_EXPORT TopoDS_Shape FirstShape();
//! Returns the TopoDS Shape of the end of the revol.
Standard_EXPORT TopoDS_Shape LastShape();
Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& S) Standard_OVERRIDE;
//! Returns the TopoDS Shape of the beginning of the revolution,
//! generated with theShape (subShape of the generating shape).
Standard_EXPORT TopoDS_Shape FirstShape (const TopoDS_Shape& theShape);
//! Returns the TopoDS Shape of the end of the revolution,
//! generated with theShape (subShape of the generating shape).
Standard_EXPORT TopoDS_Shape LastShape (const TopoDS_Shape& theShape);
//! Check if there are degenerated edges in the result.
Standard_EXPORT Standard_Boolean HasDegenerated() const;
Standard_EXPORT const TopTools_ListOfShape& Degenerated() const;
protected:
private:
BRepSweep_Revol myRevol;
TopTools_ListOfShape myDegenerated;
};
#endif // _BRepPrimAPI_MakeRevol_HeaderFile

View File

@@ -1,114 +0,0 @@
-- Created on: 1993-07-22
-- Created by: Remi LEQUETTE
-- Copyright (c) 1993-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class MakeRevolution from BRepPrimAPI inherits MakeOneAxis from BRepPrimAPI
---Purpose: Describes functions to build revolved shapes.
-- A MakeRevolution object provides a framework for:
-- - defining the construction of a revolved shape,
-- - implementing the construction algorithm, and
-- - consulting the result.
uses
Ax2 from gp,
Curve from Geom,
OneAxis from BRepPrim,
Revolution from BRepPrim
raises
DomainError from Standard
is
Create(Meridian : Curve from Geom)
returns MakeRevolution from BRepPrimAPI
---Purpose: Make a revolution body by rotating a curve around Z.
---Level: Public
raises
DomainError from Standard; -- if M is not in a plane containing Z.
Create(Meridian : Curve from Geom; angle : Real)
returns MakeRevolution from BRepPrimAPI
---Purpose: Make a revolution body by rotating a curve around Z.
---Level: Public
raises
DomainError from Standard; -- if M is not in a plane containing Z.
Create(Meridian : Curve from Geom; VMin, VMax : Real)
returns MakeRevolution from BRepPrimAPI
---Purpose: Make a revolution body by rotating a curve around Z.
---Level: Public
raises
DomainError from Standard; -- if M is not in a plane containing Z.
Create(Meridian : Curve from Geom; VMin, VMax, angle : Real)
returns MakeRevolution from BRepPrimAPI
---Purpose: Make a revolution body by rotating a curve around Z.
---Level: Public
raises
DomainError from Standard; -- if M is not in a plane containing Z.
Create(Axes : Ax2 from gp; Meridian : Curve from Geom)
returns MakeRevolution from BRepPrimAPI
---Purpose: Make a revolution body by rotating a curve around Z.
---Level: Public
raises
DomainError from Standard; -- if M is not in a plane containing Z.
Create(Axes : Ax2 from gp; Meridian : Curve from Geom; angle : Real)
returns MakeRevolution from BRepPrimAPI
---Purpose: Make a revolution body by rotating a curve around Z.
---Level: Public
raises
DomainError from Standard; -- if M is not in a plane containing Z.
Create(Axes : Ax2 from gp; Meridian : Curve from Geom; VMin, VMax : Real)
returns MakeRevolution from BRepPrimAPI
---Purpose: Make a revolution body by rotating a curve around Z.
---Level: Public
raises
DomainError from Standard; -- if M is not in a plane containing Z.
Create(Axes : Ax2 from gp; Meridian : Curve from Geom; VMin, VMax, angle : Real)
returns MakeRevolution from BRepPrimAPI
---Purpose: Make a revolution body by rotating a curve around Z.
---Level: Public
raises
DomainError from Standard; -- if M is not in a plane containing Z.
---Purpose: For all algorithms the resulting shape is composed of
-- - a lateral revolved face,
-- - two planar faces in planes parallel to the plane z =
-- 0, and passing by the extremities of the revolved
-- portion of Meridian, if these points are not on the Z
-- axis (in case of a complete revolved shape, these faces are circles),
-- - and in the case of a portion of a revolved shape, two
-- planar faces to close the shape (in the planes u = 0 and u = angle).
OneAxis(me : in out) returns Address;
---Purpose: Returns the algorithm.
---Level: Advanced
Revolution(me : in out) returns Revolution from BRepPrim
---Purpose: Returns the algorithm.
--
---C++: return &
---Level: Public
is static;
fields
myRevolution : Revolution from BRepPrim;
end MakeRevolution;

View File

@@ -14,17 +14,21 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepPrimAPI_MakeRevolution.ixx>
#include <BRepBuilderAPI.hxx>
#include <GeomProjLib.hxx>
#include <BRepPrim_Revolution.hxx>
#include <BRepPrimAPI_MakeRevolution.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Plane.hxx>
#include <GeomProjLib.hxx>
#include <gp_Ax2.hxx>
#include <Standard_DomainError.hxx>
//=======================================================================
//function : Project
//purpose :
//=======================================================================
static Handle(Geom2d_Curve) Project(const Handle(Geom_Curve)& M,
const gp_Ax3 Axis)
{

View File

@@ -0,0 +1,108 @@
// Created on: 1993-07-22
// Created by: Remi LEQUETTE
// Copyright (c) 1993-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepPrimAPI_MakeRevolution_HeaderFile
#define _BRepPrimAPI_MakeRevolution_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <BRepPrim_Revolution.hxx>
#include <BRepPrimAPI_MakeOneAxis.hxx>
#include <Standard_Real.hxx>
#include <Standard_Address.hxx>
class Standard_DomainError;
class Geom_Curve;
class gp_Ax2;
class BRepPrim_Revolution;
//! Describes functions to build revolved shapes.
//! A MakeRevolution object provides a framework for:
//! - defining the construction of a revolved shape,
//! - implementing the construction algorithm, and
//! - consulting the result.
class BRepPrimAPI_MakeRevolution : public BRepPrimAPI_MakeOneAxis
{
public:
DEFINE_STANDARD_ALLOC
//! Make a revolution body by rotating a curve around Z.
Standard_EXPORT BRepPrimAPI_MakeRevolution(const Handle(Geom_Curve)& Meridian);
//! Make a revolution body by rotating a curve around Z.
Standard_EXPORT BRepPrimAPI_MakeRevolution(const Handle(Geom_Curve)& Meridian, const Standard_Real angle);
//! Make a revolution body by rotating a curve around Z.
Standard_EXPORT BRepPrimAPI_MakeRevolution(const Handle(Geom_Curve)& Meridian, const Standard_Real VMin, const Standard_Real VMax);
//! Make a revolution body by rotating a curve around Z.
Standard_EXPORT BRepPrimAPI_MakeRevolution(const Handle(Geom_Curve)& Meridian, const Standard_Real VMin, const Standard_Real VMax, const Standard_Real angle);
//! Make a revolution body by rotating a curve around Z.
Standard_EXPORT BRepPrimAPI_MakeRevolution(const gp_Ax2& Axes, const Handle(Geom_Curve)& Meridian);
//! Make a revolution body by rotating a curve around Z.
Standard_EXPORT BRepPrimAPI_MakeRevolution(const gp_Ax2& Axes, const Handle(Geom_Curve)& Meridian, const Standard_Real angle);
//! Make a revolution body by rotating a curve around Z.
Standard_EXPORT BRepPrimAPI_MakeRevolution(const gp_Ax2& Axes, const Handle(Geom_Curve)& Meridian, const Standard_Real VMin, const Standard_Real VMax);
//! Make a revolution body by rotating a curve around Z.
//! For all algorithms the resulting shape is composed of
//! - a lateral revolved face,
//! - two planar faces in planes parallel to the plane z =
//! 0, and passing by the extremities of the revolved
//! portion of Meridian, if these points are not on the Z
//! axis (in case of a complete revolved shape, these faces are circles),
//! - and in the case of a portion of a revolved shape, two
//! planar faces to close the shape (in the planes u = 0 and u = angle).
Standard_EXPORT BRepPrimAPI_MakeRevolution(const gp_Ax2& Axes, const Handle(Geom_Curve)& Meridian, const Standard_Real VMin, const Standard_Real VMax, const Standard_Real angle);
//! Returns the algorithm.
Standard_EXPORT Standard_Address OneAxis();
//! Returns the algorithm.
Standard_EXPORT BRepPrim_Revolution& Revolution();
protected:
private:
BRepPrim_Revolution myRevolution;
};
#endif // _BRepPrimAPI_MakeRevolution_HeaderFile

View File

@@ -1,145 +0,0 @@
-- Created on: 1993-07-22
-- Created by: Remi LEQUETTE
-- Copyright (c) 1993-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class MakeSphere from BRepPrimAPI inherits MakeOneAxis from BRepPrimAPI
---Purpose: Describes functions to build spheres or portions of spheres.
-- A MakeSphere object provides a framework for:
-- - defining the construction of a sphere,
-- - implementing the construction algorithm, and
-- - consulting the result.
uses
Pnt from gp,
Ax2 from gp,
Sphere from BRepPrim,
OneAxis from BRepPrim
raises
DomainError from Standard
is
Create(R : Real)
returns MakeSphere from BRepPrimAPI
---Purpose: Make a sphere of radius R.
---Level: Public
raises
DomainError from Standard; -- if R <= Precision::Confusion()
Create(R, angle : Real)
returns MakeSphere from BRepPrimAPI
---Purpose: Make a sphere of radius R.
---Level: Public
raises
DomainError from Standard; -- if R <= Precision::Confusion()
Create(R, angle1, angle2 : Real)
returns MakeSphere from BRepPrimAPI
---Purpose: Make a sphere of radius R.
---Level: Public
raises
DomainError from Standard; -- if R <= Precision::Confusion()
Create(R, angle1, angle2, angle3 : Real)
returns MakeSphere from BRepPrimAPI
---Purpose: Make a sphere of radius R.
---Level: Public
raises
DomainError from Standard; -- if R <= Precision::Confusion()
Create(Center : Pnt from gp; R : Real)
returns MakeSphere from BRepPrimAPI
---Purpose: Make a sphere of radius R.
---Level: Public
raises
DomainError from Standard; -- if R <= Precision::Confusion()
Create(Center : Pnt from gp; R, angle : Real)
returns MakeSphere from BRepPrimAPI
---Purpose: Make a sphere of radius R.
---Level: Public
raises
DomainError from Standard; -- if R <= Precision::Confusion()
Create(Center : Pnt from gp; R, angle1, angle2 : Real)
returns MakeSphere from BRepPrimAPI
---Purpose: Make a sphere of radius R.
---Level: Public
raises
DomainError from Standard; -- if R <= Precision::Confusion()
Create(Center : Pnt from gp; R, angle1, angle2, angle3 : Real)
returns MakeSphere from BRepPrimAPI
---Purpose: Make a sphere of radius R.
---Level: Public
raises
DomainError from Standard; -- if R <= Precision::Confusion()
Create(Axis : Ax2 from gp; R : Real)
returns MakeSphere from BRepPrimAPI
---Purpose: Make a sphere of radius R.
---Level: Public
raises
DomainError from Standard; -- if R <= Precision::Confusion()
Create(Axis : Ax2 from gp; R, angle : Real)
returns MakeSphere from BRepPrimAPI
---Purpose: Make a sphere of radius R.
---Level: Public
raises
DomainError from Standard; -- if R <= Precision::Confusion()
Create(Axis : Ax2 from gp; R, angle1, angle2 : Real)
returns MakeSphere from BRepPrimAPI
---Purpose: Make a sphere of radius R.
---Level: Public
raises
DomainError from Standard; -- if R <= Precision::Confusion()
Create(Axis : Ax2 from gp; R, angle1, angle2, angle3 : Real)
returns MakeSphere from BRepPrimAPI
---Purpose: Make a sphere of radius R.
---Level: Public
raises
DomainError from Standard; -- if R <= Precision::Confusion()
---Purpose: For all algorithms The resulting shape is composed of
-- - a lateral spherical face,
-- - two planar faces parallel to the plane z = 0 if the
-- sphere is truncated in the v parametric direction, or
-- only one planar face if angle1 is equal to -p/2 or if
-- angle2 is equal to p/2 (these faces are circles in
-- case of a complete truncated sphere),
-- - and in case of a portion of sphere, two planar faces
-- to shut the shape.(in the planes u = 0 and u = angle).
OneAxis(me : in out) returns Address;
---Purpose: Returns the algorithm.
---Level: Advanced
Sphere(me : in out) returns Sphere from BRepPrim
---Purpose: Returns the algorithm.
--
---C++: return &
---Level: Public
is static;
fields
mySphere : Sphere from BRepPrim;
end MakeSphere;

View File

@@ -14,14 +14,15 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepPrimAPI_MakeSphere.ixx>
#include <BRepBuilderAPI.hxx>
#include <BRepPrim_Sphere.hxx>
#include <BRepPrimAPI_MakeSphere.hxx>
#include <gp.hxx>
#include <gp_Dir.hxx>
#include <gp_Ax2.hxx>
#include <gp_Dir.hxx>
#include <gp_Pnt.hxx>
#include <Standard_DomainError.hxx>
static gp_Ax2 SphereComputeAxes() {
static Standard_Integer firsttime=1;

View File

@@ -0,0 +1,121 @@
// Created on: 1993-07-22
// Created by: Remi LEQUETTE
// Copyright (c) 1993-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepPrimAPI_MakeSphere_HeaderFile
#define _BRepPrimAPI_MakeSphere_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <BRepPrim_Sphere.hxx>
#include <BRepPrimAPI_MakeOneAxis.hxx>
#include <Standard_Real.hxx>
#include <Standard_Address.hxx>
class Standard_DomainError;
class gp_Pnt;
class gp_Ax2;
class BRepPrim_Sphere;
//! Describes functions to build spheres or portions of spheres.
//! A MakeSphere object provides a framework for:
//! - defining the construction of a sphere,
//! - implementing the construction algorithm, and
//! - consulting the result.
class BRepPrimAPI_MakeSphere : public BRepPrimAPI_MakeOneAxis
{
public:
DEFINE_STANDARD_ALLOC
//! Make a sphere of radius R.
Standard_EXPORT BRepPrimAPI_MakeSphere(const Standard_Real R);
//! Make a sphere of radius R.
Standard_EXPORT BRepPrimAPI_MakeSphere(const Standard_Real R, const Standard_Real angle);
//! Make a sphere of radius R.
Standard_EXPORT BRepPrimAPI_MakeSphere(const Standard_Real R, const Standard_Real angle1, const Standard_Real angle2);
//! Make a sphere of radius R.
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.
Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Pnt& Center, const Standard_Real R);
//! Make a sphere of radius R.
Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Pnt& Center, const Standard_Real R, const Standard_Real angle);
//! Make a sphere of radius R.
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.
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.
Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Ax2& Axis, const Standard_Real R);
//! Make a sphere of radius R.
Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Ax2& Axis, const Standard_Real R, const Standard_Real angle);
//! Make a sphere of radius R.
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,
//! - two planar faces parallel to the plane z = 0 if the
//! sphere is truncated in the v parametric direction, or
//! only one planar face if angle1 is equal to -p/2 or if
//! angle2 is equal to p/2 (these faces are circles in
//! case of a complete truncated sphere),
//! - and in case of a portion of sphere, two planar faces
//! to shut the shape.(in the planes u = 0 and u = angle).
Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Ax2& Axis, const Standard_Real R, const Standard_Real angle1, const Standard_Real angle2, const Standard_Real angle3);
//! Returns the algorithm.
Standard_EXPORT Standard_Address OneAxis();
//! Returns the algorithm.
Standard_EXPORT BRepPrim_Sphere& Sphere();
protected:
private:
BRepPrim_Sphere mySphere;
};
#endif // _BRepPrimAPI_MakeSphere_HeaderFile

View File

@@ -1,49 +0,0 @@
-- Created on: 1994-02-18
-- Created by: Remi LEQUETTE
-- Copyright (c) 1994-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
deferred class MakeSweep from BRepPrimAPI inherits MakeShape from BRepBuilderAPI
---Purpose: The abstract class MakeSweep is
-- the root class of swept primitives.
-- Sweeps are objects you obtain by sweeping a profile along a path.
-- The profile can be any topology and the path is usually a curve or
-- a wire. The profile generates objects according to the following rules:
-- - Vertices generate Edges
-- - Edges generate Faces.
-- - Wires generate Shells.
-- - Faces generate Solids.
-- - Shells generate Composite Solids.
-- You are not allowed to sweep Solids and Composite Solids.
-- Two kinds of sweeps are implemented in the BRepPrimAPI package:
-- - The linear sweep called a Prism
-- - The rotational sweep called a Revol
-- Swept constructions along complex profiles such as BSpline curves
-- are also available in the BRepOffsetAPI package..
uses Shape from TopoDS
is
FirstShape (me : in out)
---Purpose: Returns the TopoDS Shape of the bottom of the sweep.
returns Shape from TopoDS
is deferred;
LastShape (me : in out)
---Purpose: Returns the TopoDS Shape of the top of the sweep.
returns Shape from TopoDS
is deferred;
end MakeSweep;

View File

@@ -14,4 +14,6 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepPrimAPI_MakeSweep.ixx>
#include <BRepPrimAPI_MakeSweep.hxx>
#include <TopoDS_Shape.hxx>

View File

@@ -0,0 +1,80 @@
// Created on: 1994-02-18
// Created by: Remi LEQUETTE
// Copyright (c) 1994-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepPrimAPI_MakeSweep_HeaderFile
#define _BRepPrimAPI_MakeSweep_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <BRepBuilderAPI_MakeShape.hxx>
class TopoDS_Shape;
//! The abstract class MakeSweep is
//! the root class of swept primitives.
//! Sweeps are objects you obtain by sweeping a profile along a path.
//! The profile can be any topology and the path is usually a curve or
//! a wire. The profile generates objects according to the following rules:
//! - Vertices generate Edges
//! - Edges generate Faces.
//! - Wires generate Shells.
//! - Faces generate Solids.
//! - Shells generate Composite Solids.
//! You are not allowed to sweep Solids and Composite Solids.
//! Two kinds of sweeps are implemented in the BRepPrimAPI package:
//! - The linear sweep called a Prism
//! - The rotational sweep called a Revol
//! Swept constructions along complex profiles such as BSpline curves
//! are also available in the BRepOffsetAPI package..
class BRepPrimAPI_MakeSweep : public BRepBuilderAPI_MakeShape
{
public:
DEFINE_STANDARD_ALLOC
//! Returns the TopoDS Shape of the bottom of the sweep.
Standard_EXPORT virtual TopoDS_Shape FirstShape() = 0;
//! Returns the TopoDS Shape of the top of the sweep.
Standard_EXPORT virtual TopoDS_Shape LastShape() = 0;
protected:
private:
};
#endif // _BRepPrimAPI_MakeSweep_HeaderFile

View File

@@ -1,129 +0,0 @@
-- Created on: 1993-07-21
-- Created by: Remi LEQUETTE
-- Copyright (c) 1993-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class MakeTorus from BRepPrimAPI inherits MakeOneAxis from BRepPrimAPI
---Purpose: Describes functions to build tori or portions of tori.
-- A MakeTorus object provides a framework for:
-- - defining the construction of a torus,
-- - implementing the construction algorithm, and
-- - consulting the result.
uses
Ax2 from gp,
Torus from BRepPrim,
OneAxis from BRepPrim
raises
DomainError from Standard
is
Create(R1, R2 : Real)
returns MakeTorus from BRepPrimAPI
---Purpose: Make a torus of radii R1 R2.
---Level: Public
raises
DomainError from Standard; -- if R <= Precision::Confusion()
Create(R1, R2, angle : Real)
returns MakeTorus from BRepPrimAPI
---Purpose: Make a section of a torus of radii R1 R2.
---Level: Public
raises
DomainError from Standard; -- if R <= Precision::Confusion()
Create(R1, R2, angle1,angle2 : Real)
returns MakeTorus from BRepPrimAPI
---Purpose: Make a torus of radii R2, R2 with angles on the
-- small circle.
---Level: Public
raises
DomainError from Standard; -- if R <= Precision::Confusion()
Create(R1, R2, angle1,angle2,angle : Real)
returns MakeTorus from BRepPrimAPI
---Purpose: Make a torus of radii R2, R2 with angles on the
-- small circle.
---Level: Public
raises
DomainError from Standard; -- if R <= Precision::Confusion()
Create(Axes : Ax2 from gp; R1, R2 : Real)
returns MakeTorus from BRepPrimAPI
---Purpose: Make a torus of radii R1 R2.
---Level: Public
raises
DomainError from Standard; -- if H <= Precision::Confusion()
Create(Axes : Ax2 from gp; R1, R2, angle : Real)
returns MakeTorus from BRepPrimAPI
---Purpose: Make a section of a torus of radii R1 R2.
---Level: Public
raises
DomainError from Standard; -- if H <= Precision::Confusion()
Create(Axes : Ax2 from gp; R1, R2, angle1, angle2 : Real)
returns MakeTorus from BRepPrimAPI
---Purpose: Make a torus of radii R1 R2.
---Level: Public
raises
DomainError from Standard; -- if H <= Precision::Confusion()
Create(Axes : Ax2 from gp; R1, R2, angle1, angle2, angle : Real)
returns MakeTorus from BRepPrimAPI
---Purpose: Make a section of a torus of radii R1 R2.
---Level: Public
raises
DomainError from Standard; -- if H <= Precision::Confusion()
---Purpose: For all algorithms The resulting shape is composed of
-- - a lateral toroidal face,
-- - two conical faces (defined by the equation v = angle1 and
-- v = angle2) if the sphere is truncated in the v parametric
-- direction (they may be cylindrical faces in some
-- particular conditions), and in case of a portion
-- of torus, two planar faces to close the shape.(in the planes
-- u = 0 and u = angle).
-- Notes:
-- - The u parameter corresponds to a rotation angle around the Z axis.
-- - The circle whose radius is equal to the minor radius,
-- located in the plane defined by the X axis and the Z axis,
-- centered on the X axis, on its positive side, and positioned
-- at a distance from the origin equal to the major radius, is
-- the reference circle of the torus. The rotation around an
-- axis parallel to the Y axis and passing through the center
-- of the reference circle gives the v parameter on the
-- reference circle. The X axis gives the origin of the v
-- parameter. Near 0, as v increases, the Z coordinate decreases.
OneAxis(me : in out) returns Address;
---Purpose: Returns the algorithm.
---Level: Advanced
Torus(me : in out) returns Torus from BRepPrim
---Purpose: Returns the algorithm.
--
---C++: return &
---Level: Public
is static;
fields
myTorus : Torus from BRepPrim;
end MakeTorus;

View File

@@ -14,15 +14,17 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepPrimAPI_MakeTorus.ixx>
#include <BRepBuilderAPI.hxx>
#include <BRepBuilderAPI.hxx>
#include <BRepPrim_Torus.hxx>
#include <BRepPrimAPI_MakeTorus.hxx>
#include <gp_Ax2.hxx>
#include <Standard_DomainError.hxx>
//=======================================================================
//function : BRepPrimAPI_MakeTorus
//purpose :
//=======================================================================
BRepPrimAPI_MakeTorus::BRepPrimAPI_MakeTorus(const Standard_Real R1,
const Standard_Real R2) :
myTorus(R1, R2)

View File

@@ -0,0 +1,120 @@
// Created on: 1993-07-21
// Created by: Remi LEQUETTE
// Copyright (c) 1993-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepPrimAPI_MakeTorus_HeaderFile
#define _BRepPrimAPI_MakeTorus_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <BRepPrim_Torus.hxx>
#include <BRepPrimAPI_MakeOneAxis.hxx>
#include <Standard_Real.hxx>
#include <Standard_Address.hxx>
class Standard_DomainError;
class gp_Ax2;
class BRepPrim_Torus;
//! Describes functions to build tori or portions of tori.
//! A MakeTorus object provides a framework for:
//! - defining the construction of a torus,
//! - implementing the construction algorithm, and
//! - consulting the result.
class BRepPrimAPI_MakeTorus : public BRepPrimAPI_MakeOneAxis
{
public:
DEFINE_STANDARD_ALLOC
//! Make a torus of radii R1 R2.
Standard_EXPORT BRepPrimAPI_MakeTorus(const Standard_Real R1, const Standard_Real R2);
//! Make a section of a torus of radii R1 R2.
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.
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.
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.
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.
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.
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.
//! For all algorithms The resulting shape is composed of
//! - a lateral toroidal face,
//! - two conical faces (defined by the equation v = angle1 and
//! v = angle2) if the sphere is truncated in the v parametric
//! direction (they may be cylindrical faces in some
//! particular conditions), and in case of a portion
//! of torus, two planar faces to close the shape.(in the planes
//! u = 0 and u = angle).
//! Notes:
//! - The u parameter corresponds to a rotation angle around the Z axis.
//! - The circle whose radius is equal to the minor radius,
//! located in the plane defined by the X axis and the Z axis,
//! centered on the X axis, on its positive side, and positioned
//! at a distance from the origin equal to the major radius, is
//! the reference circle of the torus. The rotation around an
//! axis parallel to the Y axis and passing through the center
//! of the reference circle gives the v parameter on the
//! reference circle. The X axis gives the origin of the v
//! parameter. Near 0, as v increases, the Z coordinate decreases.
Standard_EXPORT BRepPrimAPI_MakeTorus(const gp_Ax2& Axes, const Standard_Real R1, const Standard_Real R2, const Standard_Real angle1, const Standard_Real angle2, const Standard_Real angle);
//! Returns the algorithm.
Standard_EXPORT Standard_Address OneAxis();
//! Returns the algorithm.
Standard_EXPORT BRepPrim_Torus& Torus();
protected:
private:
BRepPrim_Torus myTorus;
};
#endif // _BRepPrimAPI_MakeTorus_HeaderFile

View File

@@ -1,110 +0,0 @@
-- Created on: 1993-07-22
-- Created by: Remi LEQUETTE
-- Copyright (c) 1993-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class MakeWedge from BRepPrimAPI inherits MakeShape from BRepBuilderAPI
---Purpose: Describes functions to build wedges, i.e. boxes with inclined faces.
-- A MakeWedge object provides a framework for:
-- - defining the construction of a wedge,
-- - implementing the construction algorithm, and
-- - consulting the result.
uses
Ax2 from gp,
Pnt from gp,
Shell from TopoDS,
Solid from TopoDS,
Wedge from BRepPrim
raises
DomainError from Standard,
NotDone from StdFail
is
Create( dx, dy, dz, ltx : Real)
returns MakeWedge from BRepPrimAPI
---Purpose: Make a STEP right angular wedge. (ltx >= 0)
---Level: Public
raises
DomainError from Standard; -- if dx,dy,dz <= Precision::Confusion()
Create(Axes : Ax2 from gp; dx, dy, dz, ltx : Real)
returns MakeWedge from BRepPrimAPI
---Purpose: Make a STEP right angular wedge. (ltx >= 0)
---Level: Public
raises
DomainError from Standard; -- if dx,dy,dz <= Precision::Confusion()
Create(dx,dy,dz,xmin,zmin,xmax,zmax : Real)
returns MakeWedge from BRepPrimAPI
---Purpose: Make a wedge. The face at dy is xmin,zmin xmax,zmax
---Level: Public
raises
DomainError from Standard; -- if dx,dy,dz <= Precision::Confusion()
Create(Axes : Ax2 from gp; dx,dy,dz,xmin,zmin,xmax,zmax : Real)
returns MakeWedge from BRepPrimAPI
---Purpose: Make a wedge. The face at dy is xmin,zmin xmax,zmax
---Level: Public
raises
DomainError from Standard; -- if dx,dy,dz <= Precision::Confusion()
----------------------------------------
-- Auxiliary methods
----------------------------------------
Wedge(me : in out) returns Wedge from BRepPrim
---Purpose: Returns the internal algorithm.
--
---C++: return &
---Level: Public
is static;
----------------------------------------
-- Results
----------------------------------------
Build(me : in out)
---Purpose: Stores the solid in myShape.
---Level: Public
is redefined;
Shell(me : in out) returns Shell from TopoDS
---C++: return const &
---C++: alias "Standard_EXPORT operator TopoDS_Shell();"
---Purpose: Returns the constructed box in the form of a shell.
is static;
Solid(me : in out) returns Solid from TopoDS
---C++: return const &
---C++: alias "Standard_EXPORT operator TopoDS_Solid();"
---Purpose: Returns the constructed box in the form of a solid.
is static;
fields
myWedge : Wedge from BRepPrim;
end MakeWedge;

View File

@@ -14,15 +14,20 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepPrimAPI_MakeWedge.ixx>
#include <TopoDS.hxx>
#include <BRepPrim_Wedge.hxx>
#include <BRepPrimAPI_MakeWedge.hxx>
#include <gp_Ax2.hxx>
#include <Standard_DomainError.hxx>
#include <StdFail_NotDone.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Solid.hxx>
//=======================================================================
//function : BRepPrimAPI_MakeWedge
//purpose :
//=======================================================================
BRepPrimAPI_MakeWedge::BRepPrimAPI_MakeWedge(const Standard_Real dx,
const Standard_Real dy,
const Standard_Real dz,

View File

@@ -0,0 +1,97 @@
// Created on: 1993-07-22
// Created by: Remi LEQUETTE
// Copyright (c) 1993-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepPrimAPI_MakeWedge_HeaderFile
#define _BRepPrimAPI_MakeWedge_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <BRepPrim_Wedge.hxx>
#include <BRepBuilderAPI_MakeShape.hxx>
#include <Standard_Real.hxx>
class Standard_DomainError;
class StdFail_NotDone;
class gp_Ax2;
class BRepPrim_Wedge;
class TopoDS_Shell;
class TopoDS_Solid;
//! Describes functions to build wedges, i.e. boxes with inclined faces.
//! A MakeWedge object provides a framework for:
//! - defining the construction of a wedge,
//! - implementing the construction algorithm, and
//! - consulting the result.
class BRepPrimAPI_MakeWedge : public BRepBuilderAPI_MakeShape
{
public:
DEFINE_STANDARD_ALLOC
//! Make a STEP right angular wedge. (ltx >= 0)
Standard_EXPORT BRepPrimAPI_MakeWedge(const Standard_Real dx, const Standard_Real dy, const Standard_Real dz, const Standard_Real ltx);
//! Make a STEP right angular wedge. (ltx >= 0)
Standard_EXPORT BRepPrimAPI_MakeWedge(const gp_Ax2& Axes, const Standard_Real dx, const Standard_Real dy, const Standard_Real dz, const Standard_Real ltx);
//! Make a wedge. The face at dy is xmin,zmin xmax,zmax
Standard_EXPORT BRepPrimAPI_MakeWedge(const Standard_Real dx, const Standard_Real dy, const Standard_Real dz, const Standard_Real xmin, const Standard_Real zmin, const Standard_Real xmax, const Standard_Real zmax);
//! Make a wedge. The face at dy is xmin,zmin xmax,zmax
Standard_EXPORT BRepPrimAPI_MakeWedge(const gp_Ax2& Axes, const Standard_Real dx, const Standard_Real dy, const Standard_Real dz, const Standard_Real xmin, const Standard_Real zmin, const Standard_Real xmax, const Standard_Real zmax);
//! Returns the internal algorithm.
Standard_EXPORT BRepPrim_Wedge& Wedge();
//! Stores the solid in myShape.
Standard_EXPORT virtual void Build() Standard_OVERRIDE;
//! Returns the constructed box in the form of a shell.
Standard_EXPORT const TopoDS_Shell& Shell();
Standard_EXPORT operator TopoDS_Shell();
//! Returns the constructed box in the form of a solid.
Standard_EXPORT const TopoDS_Solid& Solid();
Standard_EXPORT operator TopoDS_Solid();
protected:
private:
BRepPrim_Wedge myWedge;
};
#endif // _BRepPrimAPI_MakeWedge_HeaderFile

24
src/BRepPrimAPI/FILES Normal file
View File

@@ -0,0 +1,24 @@
BRepPrimAPI_MakeBox.cxx
BRepPrimAPI_MakeBox.hxx
BRepPrimAPI_MakeCone.cxx
BRepPrimAPI_MakeCone.hxx
BRepPrimAPI_MakeCylinder.cxx
BRepPrimAPI_MakeCylinder.hxx
BRepPrimAPI_MakeHalfSpace.cxx
BRepPrimAPI_MakeHalfSpace.hxx
BRepPrimAPI_MakeOneAxis.cxx
BRepPrimAPI_MakeOneAxis.hxx
BRepPrimAPI_MakePrism.cxx
BRepPrimAPI_MakePrism.hxx
BRepPrimAPI_MakeRevol.cxx
BRepPrimAPI_MakeRevol.hxx
BRepPrimAPI_MakeRevolution.cxx
BRepPrimAPI_MakeRevolution.hxx
BRepPrimAPI_MakeSphere.cxx
BRepPrimAPI_MakeSphere.hxx
BRepPrimAPI_MakeSweep.cxx
BRepPrimAPI_MakeSweep.hxx
BRepPrimAPI_MakeTorus.cxx
BRepPrimAPI_MakeTorus.hxx
BRepPrimAPI_MakeWedge.cxx
BRepPrimAPI_MakeWedge.hxx