OpenCascade.js
API ReferenceModelingAlgorithmsTKTopAlgo

BRepCheck

OCCT package BRepCheck: BRepCheck, BRepCheck_Analyzer, BRepCheck_Edge, BRepCheck_Face, and 6 more bound classes.

BRepCheck

This package provides tools to check the validity of the BRep.

Constructors(1)

Static methods(4)

BRepCheck_Analyzer

A framework to check the overall validity of a shape. For a shape to be valid in Open CASCADE, it - or its component subshapes - must respect certain criteria. These criteria are checked by the function IsValid. Once you have determined whether a shape is valid or not, you can diagnose its specific anomalies and correct them using the services of the ShapeAnalysis, ShapeUpgrade, and ShapeFix packages.

Constructors(1)

  • constructor(S: TopoDS_Shape, GeomControls?: boolean, theIsParallel?: boolean, theIsExact?: boolean): BRepCheck_Analyzer

    Constructs a shape validation object defined by the shape S. is the shape to control. <GeomControls> If False only topological informaions are checked. The geometricals controls are For a Vertex: BRepCheck_InvalidToleranceValue NYI For an Edge: BRepCheck_InvalidCurveOnClosedSurface, BRepCheck_InvalidCurveOnSurface, BRepCheck_InvalidSameParameterFlag, BRepCheck_InvalidToleranceValue NYI For a face: BRepCheck_UnorientableShape, BRepCheck_IntersectingWires, BRepCheck_InvalidToleranceValue NYI For a wire: BRepCheck_SelfIntersectingWire.

    Parameters (4)
    • S
    • GeomControls
    • theIsParallel
    • theIsExact

Instance methods(8)

  • Init(S: TopoDS_Shape, GeomControls?: boolean): void

    is the shape to control. <GeomControls> If False only topological informaions are checked. The geometricals controls are For a Vertex: BRepCheck_InvalidTolerance NYI For an Edge: BRepCheck_InvalidCurveOnClosedSurface, BRepCheck_InvalidCurveOnSurface, BRepCheck_InvalidSameParameterFlag, BRepCheck_InvalidTolerance NYI For a face: BRepCheck_UnorientableShape, BRepCheck_IntersectingWires, BRepCheck_InvalidTolerance NYI For a wire: BRepCheck_SelfIntersectingWire

    Parameters (2)
    • S
    • GeomControls
  • SetExactMethod(theIsExact: boolean): void

    Sets method to calculate distance: Calculating in finite number of points (if theIsExact is false, faster, but possible not correct result) or exact calculating by using BRepLib_CheckCurveOnSurface class (if theIsExact is true, slowly, but more correctly). Exact method is used only when edge is SameParameter. Default method is calculating in finite number of points.

    Parameters (1)
    • theIsExact
  • IsExactMethod(): boolean

    Returns true if exact method selected.

  • SetParallel(theIsParallel: boolean): void

    Sets parallel flag.

    Parameters (1)
    • theIsParallel
  • IsParallel(): boolean

    Returns true if parallel flag is set.

  • IsValid(S: TopoDS_Shape): boolean

    is a subshape of the original shape. Returns <STandard_True> if no default has been detected on and any of its subshape.

    Parameters (1)
    • S
  • IsValid(): boolean

    Returns true if no defect is detected on the shape S or any of its subshapes. Returns true if the shape S is valid. This function checks whether a given shape is valid by checking that:

    • the topology is correct
    • parameterization of edges in particular is correct. For the topology to be correct, the following conditions must be satisfied:
    • edges should have at least two vertices if they are not degenerate edges. The vertices should be within the range of the bounding edges at the tolerance specified in the vertex,
    • edges should share at least one face. The representation of the edges should be within the tolerance criterion assigned to them.
    • wires defining a face should not self-intersect and should be closed,
    • there should be one wire which contains all other wires inside a face,
    • wires should be correctly oriented with respect to each of the edges,
    • faces should be correctly oriented, in particular with respect to adjacent faces if these faces define a solid,
    • shells defining a solid should be closed. There should be one enclosing shell if the shape is a solid; To check parameterization of edge, there are 2 approaches depending on the edge?s contextual situation.
    • if the edge is either single, or it is in the context of a wire or a compound, its parameterization is defined by the parameterization of its 3D curve and is considered as valid.
    • If the edge is in the context of a face, it should have SameParameter and SameRange flags set to true. To check these flags, you should call the function BRep_Tool::SameParameter and BRep_Tool::SameRange for an edge. If at least one of these flags is set to false, the edge is considered as invalid without any additional check.
      If the edge is contained by a face, and it has SameParameter and SameRange flags set to true, IsValid checks whether representation of the edge on face, in context of which the edge is considered, has the same parameterization up to the tolerance value coded on the edge.
      For a given parameter t on the edge having C as a 3D curve and one PCurve P on a surface S (base surface of the reference face), this checks that |C(t) - S(P(t))| is less than or equal to tolerance, where tolerance is the tolerance value coded on the edge.
  • Parameters (1)
    • theSubS

BRepCheck_Edge

Constructors(1)

Static methods(2)

Instance methods(11)

BRepCheck_Face

Constructors(1)

Static methods(2)

Instance methods(12)

BRepCheck_Result

Static methods(2)

Instance methods(18)

BRepCheck_Shell

Constructors(1)

Static methods(2)

Instance methods(9)

BRepCheck_Solid

The class is to check a solid.

Constructors(1)

Static methods(2)

Instance methods(4)

  • InContext(ContextShape: TopoDS_Shape): void

    Checks the solid in context of the shape <theContextShape>.

    Parameters (1)
    • ContextShape
  • Minimum(): void

    Checks the solid per se.
    The scan area is:

    1. Shells that overlaps each other Status: BRepCheck_InvalidImbricationOfShells
    2. Detached parts of the solid (vertices, edges) that have non-internal orientation Status: BRepCheck_BadOrientationOfSubshape
    3. For closed, non-internal shells: 3.1 Shells containing entities of the solid that are outside towards the shells Status: BRepCheck_SubshapeNotInShape
      3.2 Shells that encloses other Shells (for non-holes) Status: BRepCheck_EnclosedRegion
  • Blind(): void

    see the parent class for more details

BRepCheck_Status

Properties(37)

BRepCheck_Wire

Constructors(1)

Static methods(2)

Instance methods(11)

  • InContext(ContextShape: TopoDS_Shape): void

    if <ContextShape> is a face, consequently checks SelfIntersect(), Closed(), Orientation() and Closed2d until faulty is found

    Parameters (1)
    • ContextShape
  • Minimum(): void

    checks that the wire is not empty and "connex". Called by constructor

  • Blind(): void

    Does nothing.

  • Closed(Update?: boolean): BRepCheck_Status

    Checks if the oriented edges of the wire give a closed wire. If the wire is closed, returns BRepCheck_NoError. Warning: if the first and last edge are infinite, the wire will be considered as a closed one. If <Update> is set to true, registers the status in the list. May return (and registers): **BRepCheck_NotConnected, if wire is not topologically closed **BRepCheck_RedundantEdge, if an edge is in wire more than 3 times or in case of 2 occurrences if not with FORWARD and REVERSED orientation. **BRepCheck_NoError.

    Parameters (1)
    • Update
  • Closed2d(F: TopoDS_Face, Update?: boolean): BRepCheck_Status

    Checks if edges of the wire give a wire closed in 2d space. Returns BRepCheck_NoError, or BRepCheck_NotClosed If <Update> is set to true, registers the status in the list.

    Parameters (2)
    • F
    • Update
  • Checks if the oriented edges of the wire are correctly oriented. An internal call is made to the method Closed. If no face exists, call the method with a null face (TopoDS_face()). If <Update> is set to true, registers the status in the list. May return (and registers): BRepCheck_InvalidDegeneratedFlag, BRepCheck_BadOrientationOfSubshape, BRepCheck_NotClosed, BRepCheck_NoError.

    Parameters (2)
    • F
    • Update
  • Checks if the wire intersect itself on the face <F>. <E1> and <E2> are the first intersecting edges found. <E2> may be a null edge when a self-intersecting edge is found.If <Update> is set to true, registers the status in the list. May return (and register): BRepCheck_EmptyWire, BRepCheck_SelfIntersectingWire, BRepCheck_NoCurveOnSurface, BRepCheck_NoError.

    Parameters (4)
    • F
    • E1
      Mutated in place; read the updated value from this argument after the call.
    • E2
      Mutated in place; read the updated value from this argument after the call.
    • Update
  • report SelfIntersect() check would be (is) done

  • GeometricControls(B: boolean): void

    set SelfIntersect() to be checked

    Parameters (1)
    • B
  • SetStatus(theStatus: BRepCheck_Status): void

    Sets status of Wire;.

    Parameters (1)
    • theStatus