This class is intended to create a shell from the composite surface (grid of surfaces) and set of wires. It may be either division of the supporting surface of the face, or creating a shape corresponding to face on composite surface which is missing in CAS.CADE but exists in some other systems.
More...
|
| | ShapeFix_ComposeShell () |
| | Creates empty tool.
|
| |
| void | Init (const occ::handle< ShapeExtend_CompositeSurface > &Grid, const TopLoc_Location &L, const TopoDS_Face &Face, const double Prec) |
| | Initializes with composite surface, face and precision. Here face defines both set of wires and way of getting pcurves. Precision is used (together with tolerance of edges) for handling subtle cases, such as tangential intersections.
|
| |
| bool & | ClosedMode () |
| | Returns (modifiable) flag for special 'closed' mode which forces ComposeShell to consider all pcurves on closed surface as modulo period. This can reduce reliability, but allows to deal with wires closed in 3d but open in 2d (missing seam) Default is False.
|
| |
| virtual bool | Perform () |
| | Performs the work on already loaded data.
|
| |
| void | SplitEdges () |
| | Splits edges in the original shape by grid. This is a part of Perform() which does not produce any resulting shape; the only result is filled context where splittings are recorded.
|
| |
| const TopoDS_Shape & | Result () const |
| | Returns resulting shell or face (or Null shape if not done)
|
| |
| bool | Status (const ShapeExtend_Status status) const |
| | Queries status of last call to Perform() OK : nothing done (some kind of error) DONE1: splitting is done, at least one new face created DONE2: splitting is done, several new faces obtained FAIL1: misoriented wire encountered (handled) FAIL2: recoverable parity error FAIL3: edge with no pcurve on supporting face FAIL4: unrecoverable algorithm error (parity check)
|
| |
| void | DispatchWires (NCollection_Sequence< TopoDS_Shape > &faces, NCollection_Sequence< ShapeFix_WireSegment > &wires) const |
| | Creates new faces from the set of (closed) wires. Each wire is put on corresponding patch in the composite surface, and all pcurves on the initial (pseudo)face are reassigned to that surface. If several wires are one inside another, single face is created.
|
| |
| void | SetTransferParamTool (const occ::handle< ShapeAnalysis_TransferParameters > &TransferParam) |
| | Sets tool for transfer parameters from 3d to 2d and vice versa.
|
| |
| occ::handle< ShapeAnalysis_TransferParameters > | GetTransferParamTool () const |
| | Gets tool for transfer parameters from 3d to 2d and vice versa.
|
| |
| | ShapeFix_Root () |
| | Empty Constructor (no context is created)
|
| |
| virtual void | Set (const occ::handle< ShapeFix_Root > &Root) |
| | Copy all fields from another Root object.
|
| |
| virtual void | SetContext (const occ::handle< ShapeBuild_ReShape > &context) |
| | Sets context.
|
| |
| occ::handle< ShapeBuild_ReShape > | Context () const |
| | Returns context.
|
| |
| virtual void | SetMsgRegistrator (const occ::handle< ShapeExtend_BasicMsgRegistrator > &msgreg) |
| | Sets message registrator.
|
| |
| occ::handle< ShapeExtend_BasicMsgRegistrator > | MsgRegistrator () const |
| | Returns message registrator.
|
| |
| virtual void | SetPrecision (const double preci) |
| | Sets basic precision value.
|
| |
| double | Precision () const |
| | Returns basic precision value.
|
| |
| virtual void | SetMinTolerance (const double mintol) |
| | Sets minimal allowed tolerance.
|
| |
| double | MinTolerance () const |
| | Returns minimal allowed tolerance.
|
| |
| virtual void | SetMaxTolerance (const double maxtol) |
| | Sets maximal allowed tolerance.
|
| |
| double | MaxTolerance () const |
| | Returns maximal allowed tolerance.
|
| |
| double | LimitTolerance (const double toler) const |
| | Returns tolerance limited by [myMinTol,myMaxTol].
|
| |
| void | SendMsg (const TopoDS_Shape &shape, const Message_Msg &message, const Message_Gravity gravity=Message_Info) const |
| | Sends a message to be attached to the shape. Calls corresponding message of message registrator.
|
| |
| void | SendMsg (const Message_Msg &message, const Message_Gravity gravity=Message_Info) const |
| | Sends a message to be attached to myShape. Calls previous method.
|
| |
| void | SendWarning (const TopoDS_Shape &shape, const Message_Msg &message) const |
| | Sends a warning to be attached to the shape. Calls SendMsg with gravity set to Message_Warning.
|
| |
| void | SendWarning (const Message_Msg &message) const |
| | Calls previous method for myShape.
|
| |
| void | SendFail (const TopoDS_Shape &shape, const Message_Msg &message) const |
| | Sends a fail to be attached to the shape. Calls SendMsg with gravity set to Message_Fail.
|
| |
| void | SendFail (const Message_Msg &message) const |
| | Calls previous method for myShape.
|
| |
Public Member Functions inherited from Standard_Transient |
| | Standard_Transient () |
| | Empty constructor.
|
| |
| | Standard_Transient (const Standard_Transient &) |
| | Copy constructor – does nothing.
|
| |
| Standard_Transient & | operator= (const Standard_Transient &) |
| | Assignment operator, needed to avoid copying reference counter.
|
| |
| virtual | ~Standard_Transient ()=default |
| | Destructor must be virtual.
|
| |
| virtual const opencascade::handle< Standard_Type > & | DynamicType () const |
| | Returns a type descriptor about this object.
|
| |
| bool | IsInstance (const opencascade::handle< Standard_Type > &theType) const |
| | Returns a true value if this is an instance of Type.
|
| |
| bool | IsInstance (const char *const theTypeName) const |
| | Returns a true value if this is an instance of TypeName.
|
| |
| bool | IsKind (const opencascade::handle< Standard_Type > &theType) const |
| | Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
|
| |
| bool | IsKind (const char *const theTypeName) const |
| | Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
|
| |
| Standard_Transient * | This () const |
| | Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero.
|
| |
| int | GetRefCount () const noexcept |
| | Get the reference counter of this object.
|
| |
| void | IncrementRefCounter () noexcept |
| | Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations.
|
| |
| int | DecrementRefCounter () noexcept |
| | Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement.
|
| |
| virtual void | Delete () const |
| | Memory deallocator for transient classes.
|
| |
|
| void | LoadWires (NCollection_Sequence< ShapeFix_WireSegment > &seqw) const |
| | Fill sequence of wire segments by wires from myFace (pre-loaded). It performs reorder so that edges in segments are well-ordered. The context is applied to all wires before using them.
|
| |
| int | ComputeCode (const occ::handle< ShapeExtend_WireData > &wire, const gp_Lin2d &line, const int begInd, const int endInd, const double begPar, const double endPar, const bool IsInternal=false) |
| | Analyze tangencies and compute orientation code for wire segment between two intersections: tells if segment is on left or right side of cutting line, or tangent to it (by several points recomputed to 3d, distance is compared with tolerance of corresponding edge).
|
| |
| ShapeFix_WireSegment | SplitWire (ShapeFix_WireSegment &wire, NCollection_Sequence< int > &indexes, const NCollection_Sequence< double > &values, NCollection_Sequence< TopoDS_Shape > &vertices, const NCollection_Sequence< int > &segcodes, const bool cutbyu, const int cutindex) |
| | Splits edges in the wire by given indices of edges and parameters on them. Returns resulting wire and vertices corresponding to splitting parameters. If two consecutive splitting points are too near one to another (with tolerance of edge), edge is divided in single point. In the same way, splitting which is too near to end of edge, is not applied (end vertex is returned instead).
|
| |
| bool | SplitByLine (ShapeFix_WireSegment &wire, const gp_Lin2d &line, const bool cutbyu, const int cutindex, NCollection_Sequence< double > &SplitLinePar, NCollection_Sequence< int > &SplitLineCode, NCollection_Sequence< TopoDS_Shape > &SplitLineVertex) |
| | Split edges in the wire by cutting line. Wires with FORWARD or REVERSED orientation are considered as closed.
|
| |
| void | SplitByLine (NCollection_Sequence< ShapeFix_WireSegment > &seqw, const gp_Lin2d &line, const bool cutbyu, const int cutindex) |
| | Split edges in the sequence of wires by cutting line. Wires with FORWARD or REVERSED orientation are considered as closed.
|
| |
| void | SplitByGrid (NCollection_Sequence< ShapeFix_WireSegment > &seqw) |
| | Split initial set of (closed) wires by grid of lines corresponding to joints between patches on the composite surface. Parts of joint lines which get inside the face are also added into the sequence as wires with orientation EXTERNAL. They share common vertices with all wires they intersect. All modifications (splitting) are recorded in context, except splitting of joint edge itself and wires marked as EXTERNAL (they supposed to be another joint edges).
|
| |
| void | BreakWires (NCollection_Sequence< ShapeFix_WireSegment > &seqw) |
| | Break wires into open wire segments by common vertices (splitting points), so that each segment is either closed and not touching others, or touches others at ends (have common vertices). After that, each wire segment lies on its own patch of grid.
|
| |
| void | CollectWires (NCollection_Sequence< ShapeFix_WireSegment > &wires, NCollection_Sequence< ShapeFix_WireSegment > &seqw) |
| | Collect set of wire segments (already split) into closed wires. This is done by traversing all the segments in allowed directions, starting only from the REVERSED and FORWARD and taking EXTERNAL as necessary in fork points. Forks are detected by common vertices. In fork point, most left way is selected among all possible ways.
|
| |
| void | MakeFacesOnPatch (NCollection_Sequence< TopoDS_Shape > &faces, const occ::handle< Geom_Surface > &surf, NCollection_Sequence< TopoDS_Shape > &loops) const |
| | Creates new faces on one path of grid. It dispatches given loops (wires) into one or several faces depending on their mutual position.
|
| |
This class is intended to create a shell from the composite surface (grid of surfaces) and set of wires. It may be either division of the supporting surface of the face, or creating a shape corresponding to face on composite surface which is missing in CAS.CADE but exists in some other systems.
It splits (if necessary) original face to several ones by splitting lines which are joint lines on a supplied grid of surfaces (U- and V- isolines of the composite surface). There are two modes of work, which differ in the way of handling faces on periodic surfaces:
- if ClosedMode is False (default), when splitting itself is done as if surface were not periodic. The periodicity of the underlying surface is taken into account by duplicating splitting lines in the periodic direction, as necessary to split all the wires (whole parametrical range of a face) In this mode, some regularization procedures are performed (indexation of split segments by patch numbers), and it is expected to be more reliable and robust in case of bad shapes
- if ClosedMode is True, when everything on a periodic surfaces is considered as modulo period. This allows to deal with wires which are closed in 3d but not in 2d, with wires which may be shifted on several periods in 2d etc. However, this mode is less reliable since some regularizations do not work for it.
The work is made basing on pcurves of the edges. These pcurves should already exist (for example, in the case of division of existing face), then they are taken as is. The existing pcurves should be assigned to one surface (face) for all edges, this surface (face) will be used only for accessing pcurves, and it may have any geometry.
All the modifications are recorded in the context tool (ShapeBuild_ReShape).