|
|
| BOPAlgo_MakePeriodic () |
| Empty constructor. More...
|
|
|
void | SetShape (const TopoDS_Shape &theShape) |
| Sets the shape to make it periodic. More...
|
|
|
void | SetPeriodicityParameters (const PeriodicityParams &theParams) |
| Sets the periodicity parameters. More...
|
|
const PeriodicityParams & | PeriodicityParameters () const |
| Sets the periodicity parameters. More...
|
|
|
void | MakePeriodic (const Standard_Integer theDirectionID, const Standard_Boolean theIsPeriodic, const Standard_Real thePeriod=0.0) |
| Sets the flag to make the shape periodic in specified direction: More...
|
|
Standard_Boolean | IsPeriodic (const Standard_Integer theDirectionID) const |
| Returns the info about Periodicity of the shape in specified direction. More...
|
|
Standard_Real | Period (const Standard_Integer theDirectionID) const |
| Returns the Period of the shape in specified direction. More...
|
|
|
void | MakeXPeriodic (const Standard_Boolean theIsPeriodic, const Standard_Real thePeriod=0.0) |
| Sets the flag to make the shape periodic in X direction. More...
|
|
Standard_Boolean | IsXPeriodic () const |
| Returns the info about periodicity of the shape in X direction. More...
|
|
Standard_Real | XPeriod () const |
| Returns the XPeriod of the shape. More...
|
|
void | MakeYPeriodic (const Standard_Boolean theIsPeriodic, const Standard_Real thePeriod=0.0) |
| Sets the flag to make the shape periodic in Y direction. More...
|
|
Standard_Boolean | IsYPeriodic () const |
| Returns the info about periodicity of the shape in Y direction. More...
|
|
Standard_Real | YPeriod () const |
| Returns the YPeriod of the shape. More...
|
|
void | MakeZPeriodic (const Standard_Boolean theIsPeriodic, const Standard_Real thePeriod=0.0) |
| Sets the flag to make the shape periodic in Z direction. More...
|
|
Standard_Boolean | IsZPeriodic () const |
| Returns the info about periodicity of the shape in Z direction. More...
|
|
Standard_Real | ZPeriod () const |
| Returns the ZPeriod of the shape. More...
|
|
|
void | SetTrimmed (const Standard_Integer theDirectionID, const Standard_Boolean theIsTrimmed, const Standard_Real theFirst=0.0) |
| Defines whether the input shape is already trimmed in specified direction to fit the period in this direction. Direction is defined by an ID: More...
|
|
Standard_Boolean | IsInputTrimmed (const Standard_Integer theDirectionID) const |
| Returns whether the input shape was trimmed in the specified direction. More...
|
|
Standard_Real | PeriodFirst (const Standard_Integer theDirectionID) const |
| Returns the first periodic parameter in the specified direction. More...
|
|
|
void | SetXTrimmed (const Standard_Boolean theIsTrimmed, const Standard_Boolean theFirst=0.0) |
| Defines whether the input shape is already trimmed in X direction to fit the X period. If the shape is not trimmed it is required to set the first parameter for the X period. The algorithm will make the shape fit into the period. More...
|
|
Standard_Boolean | IsInputXTrimmed () const |
| Returns whether the input shape was already trimmed for X period. More...
|
|
Standard_Real | XPeriodFirst () const |
| Returns the first parameter for the X period. More...
|
|
void | SetYTrimmed (const Standard_Boolean theIsTrimmed, const Standard_Boolean theFirst=0.0) |
| Defines whether the input shape is already trimmed in Y direction to fit the Y period. If the shape is not trimmed it is required to set the first parameter for the Y period. The algorithm will make the shape fit into the period. More...
|
|
Standard_Boolean | IsInputYTrimmed () const |
| Returns whether the input shape was already trimmed for Y period. More...
|
|
Standard_Real | YPeriodFirst () const |
| Returns the first parameter for the Y period. More...
|
|
void | SetZTrimmed (const Standard_Boolean theIsTrimmed, const Standard_Boolean theFirst=0.0) |
| Defines whether the input shape is already trimmed in Z direction to fit the Z period. If the shape is not trimmed it is required to set the first parameter for the Z period. The algorithm will make the shape fit into the period. More...
|
|
Standard_Boolean | IsInputZTrimmed () const |
| Returns whether the input shape was already trimmed for Z period. More...
|
|
Standard_Real | ZPeriodFirst () const |
| Returns the first parameter for the Z period. More...
|
|
|
void | Perform () |
| Makes the shape periodic in necessary directions. More...
|
|
|
const TopoDS_Shape & | RepeatShape (const Standard_Integer theDirectionID, const Standard_Integer theTimes) |
| Performs repetition of the shape in specified direction required number of times. Negative value of times means that the repetition should be perform in negative direction. Makes the repeated shape a base for following repetitions. More...
|
|
const TopoDS_Shape & | XRepeat (const Standard_Integer theTimes) |
| Repeats the shape in X direction specified number of times. Negative value of times means that the repetition should be perform in negative X direction. Makes the repeated shape a base for following repetitions. More...
|
|
const TopoDS_Shape & | YRepeat (const Standard_Integer theTimes) |
| Repeats the shape in Y direction specified number of times. Negative value of times means that the repetition should be perform in negative Y direction. Makes the repeated shape a base for following repetitions. More...
|
|
const TopoDS_Shape & | ZRepeat (const Standard_Integer theTimes) |
| Repeats the shape in Z direction specified number of times. Negative value of times means that the repetition should be perform in negative Z direction. Makes the repeated shape a base for following repetitions. More...
|
|
|
const TopoDS_Shape & | RepeatedShape () const |
| Returns the repeated shape. More...
|
|
void | ClearRepetitions () |
| Clears all performed repetitions. The next repetition will be performed on the base shape. More...
|
|
|
const TopoDS_Shape & | Shape () const |
| Returns the resulting periodic shape. More...
|
|
|
const TopTools_ListOfShape & | GetTwins (const TopoDS_Shape &theS) const |
| Returns the identical shapes for the given shape located on the opposite periodic side. Returns empty list in case the shape has no twin. More...
|
|
|
const Handle< BRepTools_History > & | History () const |
| Returns the History of the algorithm. More...
|
|
|
void | Clear () |
| Clears the algorithm from previous runs. More...
|
|
| BOPAlgo_Options () |
| Empty constructor. More...
|
|
| BOPAlgo_Options (const Handle< NCollection_BaseAllocator > &theAllocator) |
| Constructor with allocator. More...
|
|
virtual | ~BOPAlgo_Options () |
| Destructor. More...
|
|
const Handle< NCollection_BaseAllocator > & | Allocator () const |
| Returns allocator. More...
|
|
void | AddError (const Handle< Message_Alert > &theAlert) |
| Adds the alert as error (fail) More...
|
|
void | AddWarning (const Handle< Message_Alert > &theAlert) |
| Adds the alert as warning. More...
|
|
Standard_Boolean | HasErrors () const |
| Returns true if algorithm has failed. More...
|
|
Standard_Boolean | HasError (const Handle< Standard_Type > &theType) const |
| Returns true if algorithm has generated error of specified type. More...
|
|
Standard_Boolean | HasWarnings () const |
| Returns true if algorithm has generated some warning alerts. More...
|
|
Standard_Boolean | HasWarning (const Handle< Standard_Type > &theType) const |
| Returns true if algorithm has generated warning of specified type. More...
|
|
const Handle< Message_Report > & | GetReport () const |
| Returns report collecting all errors and warnings. More...
|
|
void | DumpErrors (Standard_OStream &theOS) const |
| Dumps the error status into the given stream. More...
|
|
void | DumpWarnings (Standard_OStream &theOS) const |
| Dumps the warning statuses into the given stream. More...
|
|
void | ClearWarnings () |
| Clears the warnings of the algorithm. More...
|
|
void | SetFuzzyValue (const Standard_Real theFuzz) |
| Sets the additional tolerance. More...
|
|
Standard_Real | FuzzyValue () const |
| Returns the additional tolerance. More...
|
|
void | SetUseOBB (const Standard_Boolean theUseOBB) |
| Enables/Disables the usage of OBB. More...
|
|
Standard_Boolean | UseOBB () const |
| Returns the flag defining usage of OBB. More...
|
|
void | SetRunParallel (const Standard_Boolean theFlag) |
| Set the flag of parallel processing if <theFlag> is true the parallel processing is switched on if <theFlag> is false the parallel processing is switched off. More...
|
|
Standard_Boolean | RunParallel () const |
| Returns the flag of parallel processing. More...
|
|
BOPAlgo_MakePeriodic is the tool for making an arbitrary shape periodic in 3D space in specified directions.
Periodicity of the shape means that the shape can be repeated in any periodic direction any number of times without creation of the new geometry or splits.
The idea is to make the shape look identical on the opposite sides of the periodic directions, so when translating the copy of a shape on the period there will be no coinciding parts of different dimensions.
If necessary the algorithm will trim the shape to fit it into the requested period by splitting it by the planes limiting the shape's requested period.
For making the shape periodic in certain direction the algorithm performs the following steps:
- Creates the copy of the shape and moves it on the period into negative side of the requested direction;
- Splits the negative side of the shape by the moved copy, ensuring copying of the geometry from positive side to negative;
- Creates the copy of the shape (with already split negative side) and moves it on the period into the positive side of the requested direction;
- Splits the positive side of the shape by the moved copy, ensuring copying of the geometry from negative side to positive.
The algorithm also associates the identical (or twin) shapes located on the opposite sides of the result shape. Using the GetTwins() method it is possible to get the twin shapes from the opposite sides.
Algorithm also provides the methods to repeat the periodic shape in periodic directions. The subsequent repetitions are performed on the repeated shape, thus repeating the shape two times in X direction will create result in three shapes (original plus two copies). Single subsequent repetition will result already in 6 shapes. The repetitions can be cleared and started over.
The algorithm supports History of shapes modifications, thus it is possible to track how the shape has been changed to make it periodic and what new shapes have been created during repetitions.
The algorithm supports the parallel processing mode, which allows faster completion of the operations.
The algorithm supports the Error/Warning system and returns the following alerts:
- BOPAlgo_AlertNoPeriodicityRequired - Error alert is given if no periodicity has been requested in any direction;
- BOPAlgo_AlertUnableToTrim - Error alert is given if the trimming of the shape for fitting it into requested period has failed;
- BOPAlgo_AlertUnableToMakeIdentical - Error alert is given if splitting of the shape by its moved copies has failed;
- BOPAlgo_AlertUnableToRepeat - Warning alert is given if the gluing of the repeated shapes has failed.
Example of usage of the algorithm:
aPeriodicityMaker.
SetTrimmed(isXTrimmed, aXFirst);
{
return;
}
{
}
std::stringstream Standard_SStream
Defines Standard_SStream as typedef to C++ string stream.
Definition: Standard_SStream.hxx:22
bool Standard_Boolean
Definition: Standard_TypeDef.hxx:77
double Standard_Real
Definition: Standard_TypeDef.hxx:76
BOPAlgo_MakePeriodic is the tool for making an arbitrary shape periodic in 3D space in specified dire...
Definition: BOPAlgo_MakePeriodic.hxx:124
void MakeXPeriodic(const Standard_Boolean theIsPeriodic, const Standard_Real thePeriod=0.0)
Sets the flag to make the shape periodic in X direction.
Definition: BOPAlgo_MakePeriodic.hxx:233
const TopoDS_Shape & Shape() const
Returns the resulting periodic shape.
Definition: BOPAlgo_MakePeriodic.hxx:484
void SetShape(const TopoDS_Shape &theShape)
Sets the shape to make it periodic.
Definition: BOPAlgo_MakePeriodic.hxx:142
const TopoDS_Shape & RepeatedShape() const
Returns the repeated shape.
Definition: BOPAlgo_MakePeriodic.hxx:464
void Perform()
Makes the shape periodic in necessary directions.
void SetTrimmed(const Standard_Integer theDirectionID, const Standard_Boolean theIsTrimmed, const Standard_Real theFirst=0.0)
Defines whether the input shape is already trimmed in specified direction to fit the period in this d...
Definition: BOPAlgo_MakePeriodic.hxx:294
void ClearRepetitions()
Clears all performed repetitions. The next repetition will be performed on the base shape.
Definition: BOPAlgo_MakePeriodic.hxx:468
const TopoDS_Shape & XRepeat(const Standard_Integer theTimes)
Repeats the shape in X direction specified number of times. Negative value of times means that the re...
Definition: BOPAlgo_MakePeriodic.hxx:433
void SetRunParallel(const Standard_Boolean theFlag)
Set the flag of parallel processing if <theFlag> is true the parallel processing is switched on if <t...
Definition: BOPAlgo_Options.hxx:130
void DumpErrors(Standard_OStream &theOS) const
Dumps the error status into the given stream.
Standard_Boolean HasWarnings() const
Returns true if algorithm has generated some warning alerts.
Definition: BOPAlgo_Options.hxx:92
Standard_Boolean HasErrors() const
Returns true if algorithm has failed.
Definition: BOPAlgo_Options.hxx:80
void DumpWarnings(Standard_OStream &theOS) const
Dumps the warning statuses into the given stream.
Describes a shape which.
Definition: TopoDS_Shape.hxx:43