Open CASCADE Technology  7.7.0
Public Member Functions
BRepOffsetAPI_MakePipeShell Class Reference

This class provides for a framework to construct a shell or a solid along a spine consisting in a wire. To produce a solid, the initial wire must be closed. Two approaches are used: More...

#include <BRepOffsetAPI_MakePipeShell.hxx>

Inheritance diagram for BRepOffsetAPI_MakePipeShell:
Inheritance graph
[legend]

Public Member Functions

 BRepOffsetAPI_MakePipeShell (const TopoDS_Wire &Spine)
 Constructs the shell-generating framework defined by the wire Spine. Sets an sweep's mode If no mode are set, the mode use in MakePipe is used. More...
 
void SetMode (const Standard_Boolean IsFrenet=Standard_False)
 Sets a Frenet or a CorrectedFrenet trihedron to perform the sweeping If IsFrenet is false, a corrected Frenet trihedron is used. More...
 
void SetDiscreteMode ()
 Sets a Discrete trihedron to perform the sweeping. More...
 
void SetMode (const gp_Ax2 &Axe)
 Sets a fixed trihedron to perform the sweeping all sections will be parallel. More...
 
void SetMode (const gp_Dir &BiNormal)
 Sets a fixed BiNormal direction to perform the – sweeping. Angular relations between the section(s) and <BiNormal> will be constant. More...
 
Standard_Boolean SetMode (const TopoDS_Shape &SpineSupport)
 Sets support to the spine to define the BiNormal of the trihedron, like the normal to the surfaces. Warning: To be effective, Each edge of the <spine> must have a representation on one face of<SpineSupport> More...
 
void SetMode (const TopoDS_Wire &AuxiliarySpine, const Standard_Boolean CurvilinearEquivalence, const BRepFill_TypeOfContact KeepContact=BRepFill_NoContact)
 Sets an auxiliary spine to define the Normal For each Point of the Spine P, an Point Q is evalued on <AuxiliarySpine> If <CurvilinearEquivalence> Q split <AuxiliarySpine> with the same length ratio than P split <Spline>. Else the plan define by P and the tangent to the <Spine> intersect <AuxiliarySpine> in Q. If <KeepContact> equals BRepFill_NoContact: The Normal is defined by the vector PQ. If <KeepContact> equals BRepFill_Contact: The Normal is defined to achieve that the sweeped section is in contact to the auxiliarySpine. The width of section is constant all along the path. In other words, the auxiliary spine lies on the swept surface, but not necessarily is a boundary of this surface. However, the auxiliary spine has to be close enough to the main spine to provide intersection with any section all along the path. If <KeepContact> equals BRepFill_ContactOnBorder: The auxiliary spine becomes a boundary of the swept surface and the width of section varies along the path. Give section to sweep. Possibilities are : More...
 
void Add (const TopoDS_Shape &Profile, const Standard_Boolean WithContact=Standard_False, const Standard_Boolean WithCorrection=Standard_False)
 Adds the section Profile to this framework. First and last sections may be punctual, so the shape Profile may be both wire and vertex. Correspondent point on spine is computed automatically. If WithContact is true, the section is translated to be in contact with the spine. If WithCorrection is true, the section is rotated to be orthogonal to the spine?s tangent in the correspondent point. This option has no sense if the section is punctual (Profile is of type TopoDS_Vertex). More...
 
void Add (const TopoDS_Shape &Profile, const TopoDS_Vertex &Location, const Standard_Boolean WithContact=Standard_False, const Standard_Boolean WithCorrection=Standard_False)
 Adds the section Profile to this framework. Correspondent point on the spine is given by Location. Warning: To be effective, it is not recommended to combine methods Add and SetLaw. More...
 
void SetLaw (const TopoDS_Shape &Profile, const Handle< Law_Function > &L, const Standard_Boolean WithContact=Standard_False, const Standard_Boolean WithCorrection=Standard_False)
 Sets the evolution law defined by the wire Profile with its position (Location, WithContact, WithCorrection are the same options as in methods Add) and a homotetic law defined by the function L. Warning: To be effective, it is not recommended to combine methods Add and SetLaw. More...
 
void SetLaw (const TopoDS_Shape &Profile, const Handle< Law_Function > &L, const TopoDS_Vertex &Location, const Standard_Boolean WithContact=Standard_False, const Standard_Boolean WithCorrection=Standard_False)
 Sets the evolution law defined by the wire Profile with its position (Location, WithContact, WithCorrection are the same options as in methods Add) and a homotetic law defined by the function L. Warning: To be effective, it is not recommended to combine methods Add and SetLaw. More...
 
void Delete (const TopoDS_Shape &Profile)
 Removes the section Profile from this framework. More...
 
Standard_Boolean IsReady () const
 Returns true if this tool object is ready to build the shape, i.e. has a definition for the wire section Profile. More...
 
BRepBuilderAPI_PipeError GetStatus () const
 Get a status, when Simulate or Build failed. It can be BRepBuilderAPI_PipeDone, BRepBuilderAPI_PipeNotDone, BRepBuilderAPI_PlaneNotIntersectGuide, BRepBuilderAPI_ImpossibleContact. More...
 
void SetTolerance (const Standard_Real Tol3d=1.0e-4, const Standard_Real BoundTol=1.0e-4, const Standard_Real TolAngular=1.0e-2)
 Sets the following tolerance values. More...
 
void SetMaxDegree (const Standard_Integer NewMaxDegree)
 Define the maximum V degree of resulting surface. More...
 
void SetMaxSegments (const Standard_Integer NewMaxSegments)
 Define the maximum number of spans in V-direction on resulting surface. More...
 
void SetForceApproxC1 (const Standard_Boolean ForceApproxC1)
 Set the flag that indicates attempt to approximate a C1-continuous surface if a swept surface proved to be C0. More...
 
void SetTransitionMode (const BRepBuilderAPI_TransitionMode Mode=BRepBuilderAPI_Transformed)
 Sets the transition mode to manage discontinuities on the swept shape caused by fractures on the spine. The transition mode can be BRepBuilderAPI_Transformed (default value), BRepBuilderAPI_RightCorner, BRepBuilderAPI_RoundCorner: More...
 
void Simulate (const Standard_Integer NumberOfSection, TopTools_ListOfShape &Result)
 Simulates the resulting shape by calculating its cross-sections. The spine is divided by this cross-sections into (NumberOfSection - 1) equal parts, the number of cross-sections is NumberOfSection. The cross-sections are wires and they are returned in the list Result. This gives a rapid preview of the resulting shape, which will be obtained using the settings you have provided. Raises NotDone if <me> it is not Ready. More...
 
virtual void Build (const Message_ProgressRange &theRange=Message_ProgressRange()) override
 Builds the resulting shape (redefined from MakeShape). More...
 
Standard_Boolean MakeSolid ()
 Transforms the sweeping Shell in Solid. If a propfile is not closed returns False. More...
 
virtual TopoDS_Shape FirstShape () override
 Returns the TopoDS Shape of the bottom of the sweep. More...
 
virtual TopoDS_Shape LastShape () override
 Returns the TopoDS Shape of the top of the sweep. More...
 
virtual const TopTools_ListOfShapeGenerated (const TopoDS_Shape &S) override
 Returns a list of new shapes generated from the shape S by the shell-generating algorithm. This function is redefined from BRepOffsetAPI_MakeShape::Generated. S can be an edge or a vertex of a given Profile (see methods Add). More...
 
Standard_Real ErrorOnSurface () const
 
void Profiles (TopTools_ListOfShape &theProfiles)
 Returns the list of original profiles. More...
 
const TopoDS_WireSpine ()
 Returns the spine. More...
 
- Public Member Functions inherited from BRepBuilderAPI_MakeShape
virtual const TopoDS_ShapeShape ()
 Returns a shape built by the shape construction algorithm. Raises exception StdFail_NotDone if the shape was not built. More...
 
 operator TopoDS_Shape ()
 
virtual const TopTools_ListOfShapeModified (const TopoDS_Shape &S)
 Returns the list of shapes modified from the shape <S>. More...
 
virtual Standard_Boolean IsDeleted (const TopoDS_Shape &S)
 Returns true if the shape S has been deleted. More...
 
- Public Member Functions inherited from BRepBuilderAPI_Command
virtual ~BRepBuilderAPI_Command ()
 
virtual Standard_Boolean IsDone () const
 
void Check () const
 Raises NotDone if done is false. More...
 

Additional Inherited Members

- Protected Member Functions inherited from BRepBuilderAPI_MakeShape
 BRepBuilderAPI_MakeShape ()
 
- Protected Member Functions inherited from BRepBuilderAPI_Command
 BRepBuilderAPI_Command ()
 Set done to False. More...
 
void Done ()
 Set done to true. More...
 
void NotDone ()
 Set done to false. More...
 
- Protected Attributes inherited from BRepBuilderAPI_MakeShape
TopoDS_Shape myShape
 
TopTools_ListOfShape myGenerated
 

Detailed Description

This class provides for a framework to construct a shell or a solid along a spine consisting in a wire. To produce a solid, the initial wire must be closed. Two approaches are used:

Constructor & Destructor Documentation

◆ BRepOffsetAPI_MakePipeShell()

BRepOffsetAPI_MakePipeShell::BRepOffsetAPI_MakePipeShell ( const TopoDS_Wire Spine)

Constructs the shell-generating framework defined by the wire Spine. Sets an sweep's mode If no mode are set, the mode use in MakePipe is used.

Member Function Documentation

◆ Add() [1/2]

void BRepOffsetAPI_MakePipeShell::Add ( const TopoDS_Shape Profile,
const Standard_Boolean  WithContact = Standard_False,
const Standard_Boolean  WithCorrection = Standard_False 
)

Adds the section Profile to this framework. First and last sections may be punctual, so the shape Profile may be both wire and vertex. Correspondent point on spine is computed automatically. If WithContact is true, the section is translated to be in contact with the spine. If WithCorrection is true, the section is rotated to be orthogonal to the spine?s tangent in the correspondent point. This option has no sense if the section is punctual (Profile is of type TopoDS_Vertex).

◆ Add() [2/2]

void BRepOffsetAPI_MakePipeShell::Add ( const TopoDS_Shape Profile,
const TopoDS_Vertex Location,
const Standard_Boolean  WithContact = Standard_False,
const Standard_Boolean  WithCorrection = Standard_False 
)

Adds the section Profile to this framework. Correspondent point on the spine is given by Location. Warning: To be effective, it is not recommended to combine methods Add and SetLaw.

◆ Build()

virtual void BRepOffsetAPI_MakePipeShell::Build ( const Message_ProgressRange theRange = Message_ProgressRange())
overridevirtual

Builds the resulting shape (redefined from MakeShape).

Reimplemented from BRepBuilderAPI_MakeShape.

◆ Delete()

void BRepOffsetAPI_MakePipeShell::Delete ( const TopoDS_Shape Profile)

Removes the section Profile from this framework.

◆ ErrorOnSurface()

Standard_Real BRepOffsetAPI_MakePipeShell::ErrorOnSurface ( ) const

◆ FirstShape()

virtual TopoDS_Shape BRepOffsetAPI_MakePipeShell::FirstShape ( )
overridevirtual

Returns the TopoDS Shape of the bottom of the sweep.

Implements BRepPrimAPI_MakeSweep.

◆ Generated()

virtual const TopTools_ListOfShape& BRepOffsetAPI_MakePipeShell::Generated ( const TopoDS_Shape S)
overridevirtual

Returns a list of new shapes generated from the shape S by the shell-generating algorithm. This function is redefined from BRepOffsetAPI_MakeShape::Generated. S can be an edge or a vertex of a given Profile (see methods Add).

Reimplemented from BRepBuilderAPI_MakeShape.

◆ GetStatus()

BRepBuilderAPI_PipeError BRepOffsetAPI_MakePipeShell::GetStatus ( ) const

Get a status, when Simulate or Build failed. It can be BRepBuilderAPI_PipeDone, BRepBuilderAPI_PipeNotDone, BRepBuilderAPI_PlaneNotIntersectGuide, BRepBuilderAPI_ImpossibleContact.

◆ IsReady()

Standard_Boolean BRepOffsetAPI_MakePipeShell::IsReady ( ) const

Returns true if this tool object is ready to build the shape, i.e. has a definition for the wire section Profile.

◆ LastShape()

virtual TopoDS_Shape BRepOffsetAPI_MakePipeShell::LastShape ( )
overridevirtual

Returns the TopoDS Shape of the top of the sweep.

Implements BRepPrimAPI_MakeSweep.

◆ MakeSolid()

Standard_Boolean BRepOffsetAPI_MakePipeShell::MakeSolid ( )

Transforms the sweeping Shell in Solid. If a propfile is not closed returns False.

◆ Profiles()

void BRepOffsetAPI_MakePipeShell::Profiles ( TopTools_ListOfShape theProfiles)
inline

Returns the list of original profiles.

◆ SetDiscreteMode()

void BRepOffsetAPI_MakePipeShell::SetDiscreteMode ( )

Sets a Discrete trihedron to perform the sweeping.

◆ SetForceApproxC1()

void BRepOffsetAPI_MakePipeShell::SetForceApproxC1 ( const Standard_Boolean  ForceApproxC1)

Set the flag that indicates attempt to approximate a C1-continuous surface if a swept surface proved to be C0.

◆ SetLaw() [1/2]

void BRepOffsetAPI_MakePipeShell::SetLaw ( const TopoDS_Shape Profile,
const Handle< Law_Function > &  L,
const Standard_Boolean  WithContact = Standard_False,
const Standard_Boolean  WithCorrection = Standard_False 
)

Sets the evolution law defined by the wire Profile with its position (Location, WithContact, WithCorrection are the same options as in methods Add) and a homotetic law defined by the function L. Warning: To be effective, it is not recommended to combine methods Add and SetLaw.

◆ SetLaw() [2/2]

void BRepOffsetAPI_MakePipeShell::SetLaw ( const TopoDS_Shape Profile,
const Handle< Law_Function > &  L,
const TopoDS_Vertex Location,
const Standard_Boolean  WithContact = Standard_False,
const Standard_Boolean  WithCorrection = Standard_False 
)

Sets the evolution law defined by the wire Profile with its position (Location, WithContact, WithCorrection are the same options as in methods Add) and a homotetic law defined by the function L. Warning: To be effective, it is not recommended to combine methods Add and SetLaw.

◆ SetMaxDegree()

void BRepOffsetAPI_MakePipeShell::SetMaxDegree ( const Standard_Integer  NewMaxDegree)

Define the maximum V degree of resulting surface.

◆ SetMaxSegments()

void BRepOffsetAPI_MakePipeShell::SetMaxSegments ( const Standard_Integer  NewMaxSegments)

Define the maximum number of spans in V-direction on resulting surface.

◆ SetMode() [1/5]

void BRepOffsetAPI_MakePipeShell::SetMode ( const Standard_Boolean  IsFrenet = Standard_False)

Sets a Frenet or a CorrectedFrenet trihedron to perform the sweeping If IsFrenet is false, a corrected Frenet trihedron is used.

◆ SetMode() [2/5]

void BRepOffsetAPI_MakePipeShell::SetMode ( const gp_Ax2 Axe)

Sets a fixed trihedron to perform the sweeping all sections will be parallel.

◆ SetMode() [3/5]

void BRepOffsetAPI_MakePipeShell::SetMode ( const gp_Dir BiNormal)

Sets a fixed BiNormal direction to perform the – sweeping. Angular relations between the section(s) and <BiNormal> will be constant.

◆ SetMode() [4/5]

Standard_Boolean BRepOffsetAPI_MakePipeShell::SetMode ( const TopoDS_Shape SpineSupport)

Sets support to the spine to define the BiNormal of the trihedron, like the normal to the surfaces. Warning: To be effective, Each edge of the <spine> must have a representation on one face of<SpineSupport>

◆ SetMode() [5/5]

void BRepOffsetAPI_MakePipeShell::SetMode ( const TopoDS_Wire AuxiliarySpine,
const Standard_Boolean  CurvilinearEquivalence,
const BRepFill_TypeOfContact  KeepContact = BRepFill_NoContact 
)

Sets an auxiliary spine to define the Normal For each Point of the Spine P, an Point Q is evalued on <AuxiliarySpine> If <CurvilinearEquivalence> Q split <AuxiliarySpine> with the same length ratio than P split <Spline>. Else the plan define by P and the tangent to the <Spine> intersect <AuxiliarySpine> in Q. If <KeepContact> equals BRepFill_NoContact: The Normal is defined by the vector PQ. If <KeepContact> equals BRepFill_Contact: The Normal is defined to achieve that the sweeped section is in contact to the auxiliarySpine. The width of section is constant all along the path. In other words, the auxiliary spine lies on the swept surface, but not necessarily is a boundary of this surface. However, the auxiliary spine has to be close enough to the main spine to provide intersection with any section all along the path. If <KeepContact> equals BRepFill_ContactOnBorder: The auxiliary spine becomes a boundary of the swept surface and the width of section varies along the path. Give section to sweep. Possibilities are :

  • Give one or sevral section
  • Give one profile and an homotetic law.
  • Automatic compute of correspondence between spine, and section on the sweeped shape
  • correspondence between spine, and section on the sweeped shape defined by a vertex of the spine

◆ SetTolerance()

void BRepOffsetAPI_MakePipeShell::SetTolerance ( const Standard_Real  Tol3d = 1.0e-4,
const Standard_Real  BoundTol = 1.0e-4,
const Standard_Real  TolAngular = 1.0e-2 
)

Sets the following tolerance values.

  • 3D tolerance Tol3d
  • boundary tolerance BoundTol
  • angular tolerance TolAngular.

◆ SetTransitionMode()

void BRepOffsetAPI_MakePipeShell::SetTransitionMode ( const BRepBuilderAPI_TransitionMode  Mode = BRepBuilderAPI_Transformed)

Sets the transition mode to manage discontinuities on the swept shape caused by fractures on the spine. The transition mode can be BRepBuilderAPI_Transformed (default value), BRepBuilderAPI_RightCorner, BRepBuilderAPI_RoundCorner:

  • RepBuilderAPI_Transformed: discontinuities are treated by modification of the sweeping mode. The pipe is "transformed" at the fractures of the spine. This mode assumes building a self-intersected shell.
  • BRepBuilderAPI_RightCorner: discontinuities are treated like right corner. Two pieces of the pipe corresponding to two adjacent segments of the spine are extended and intersected at a fracture of the spine.
  • BRepBuilderAPI_RoundCorner: discontinuities are treated like round corner. The corner is treated as rotation of the profile around an axis which passes through the point of the spine's fracture. This axis is based on cross product of directions tangent to the adjacent segments of the spine at their common point. Warnings The mode BRepBuilderAPI_RightCorner provides a valid result if intersection of two pieces of the pipe (corresponding to two adjacent segments of the spine) in the neighborhood of the spine?s fracture is connected and planar. This condition can be violated if the spine is non-linear in some neighborhood of the fracture or if the profile was set with a scaling law. The last mode, BRepBuilderAPI_RoundCorner, will assuredly provide a good result only if a profile was set with option WithCorrection = True, i.e. it is strictly orthogonal to the spine.

◆ Simulate()

void BRepOffsetAPI_MakePipeShell::Simulate ( const Standard_Integer  NumberOfSection,
TopTools_ListOfShape Result 
)

Simulates the resulting shape by calculating its cross-sections. The spine is divided by this cross-sections into (NumberOfSection - 1) equal parts, the number of cross-sections is NumberOfSection. The cross-sections are wires and they are returned in the list Result. This gives a rapid preview of the resulting shape, which will be obtained using the settings you have provided. Raises NotDone if <me> it is not Ready.

◆ Spine()

const TopoDS_Wire& BRepOffsetAPI_MakePipeShell::Spine ( )
inline

Returns the spine.


The documentation for this class was generated from the following file: