1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366
|
import OCP.BRepClass
from typing import *
from typing import Iterable as iterable
from typing import Iterator as iterator
from numpy import float64
_Shape = Tuple[int, ...]
import OCP.TopTools
import OCP.Geom2dInt
import OCP.gp
import OCP.TopAbs
import OCP.TopoDS
import OCP.IntRes2d
__all__ = [
"BRepClass_Edge",
"BRepClass_FClass2dOfFClassifier",
"BRepClass_FClassifier",
"BRepClass_FaceClassifier",
"BRepClass_FaceExplorer",
"BRepClass_FacePassiveClassifier",
"BRepClass_Intersector"
]
class BRepClass_Edge():
"""
This class is used to send the description of an Edge to the classifier. It contains an Edge and a Face. So the PCurve of the Edge can be found.
"""
def Edge(self) -> OCP.TopoDS.TopoDS_Edge:
"""
Returns the current Edge
None
Returns the current Edge
None
"""
def Face(self) -> OCP.TopoDS.TopoDS_Face:
"""
Returns the Face for the current Edge
None
Returns the Face for the current Edge
None
"""
def MaxTolerance(self) -> float:
"""
Returns the maximum tolerance
"""
def NextEdge(self) -> OCP.TopoDS.TopoDS_Edge:
"""
Returns the next Edge
"""
def SetMaxTolerance(self,theValue : float) -> None:
"""
Sets the maximum tolerance at which to start checking in the intersector
"""
def SetNextEdge(self,theMapVE : OCP.TopTools.TopTools_IndexedDataMapOfShapeListOfShape) -> None:
"""
Finds and sets the next Edge for the current
"""
def SetUseBndBox(self,theValue : bool) -> None:
"""
Sets the status of whether we are using boxes or not
"""
def UseBndBox(self) -> bool:
"""
Returns true if we are using boxes in the intersector
"""
@overload
def __init__(self,E : OCP.TopoDS.TopoDS_Edge,F : OCP.TopoDS.TopoDS_Face) -> None: ...
@overload
def __init__(self) -> None: ...
pass
class BRepClass_FClass2dOfFClassifier():
"""
None
"""
def ClosestIntersection(self) -> int:
"""
Returns 0 if the last compared edge had no relevant intersection. Else returns the index of this intersection in the last intersection algorithm.
"""
def Compare(self,E : BRepClass_Edge,Or : OCP.TopAbs.TopAbs_Orientation) -> None:
"""
Updates the classification process with the edge <E> from the boundary.
"""
def Intersector(self) -> BRepClass_Intersector:
"""
Returns the intersecting algorithm.
"""
def IsHeadOrEnd(self) -> bool:
"""
Returns the Standard_True if the closest intersection point represents head or end of the edge. Returns Standard_False otherwise.
"""
def Parameter(self) -> float:
"""
Returns the current value of the parameter.
"""
def Reset(self,L : OCP.gp.gp_Lin2d,P : float,Tol : float) -> None:
"""
Starts a classification process. The point to classify is the origin of the line <L>. <P> is the original length of the segment on <L> used to compute intersections. <Tol> is the tolerance attached to the line segment in intersections.
"""
def State(self) -> OCP.TopAbs.TopAbs_State:
"""
Returns the current state of the point.
"""
def __init__(self) -> None: ...
pass
class BRepClass_FClassifier():
"""
None
"""
def Edge(self) -> BRepClass_Edge:
"""
Returns the Edge used to determine the classification. When the State is ON this is the Edge containing the point.
"""
def EdgeParameter(self) -> float:
"""
Returns the parameter on Edge() used to determine the classification.
"""
def NoWires(self) -> bool:
"""
Returns True if the face contains no wire. The state is IN.
"""
def Perform(self,F : BRepClass_FaceExplorer,P : OCP.gp.gp_Pnt2d,Tol : float) -> None:
"""
Classify the Point P with Tolerance <T> on the face described by <F>.
"""
def Position(self) -> OCP.IntRes2d.IntRes2d_Position:
"""
Returns the position of the point on the edge returned by Edge.
"""
def Rejected(self) -> bool:
"""
Returns True when the state was computed by a rejection. The state is OUT.
"""
def State(self) -> OCP.TopAbs.TopAbs_State:
"""
Returns the result of the classification.
"""
@overload
def __init__(self) -> None: ...
@overload
def __init__(self,F : BRepClass_FaceExplorer,P : OCP.gp.gp_Pnt2d,Tol : float) -> None: ...
pass
class BRepClass_FaceClassifier(BRepClass_FClassifier):
"""
Provides Constructors with a Face.
"""
def Edge(self) -> BRepClass_Edge:
"""
Returns the Edge used to determine the classification. When the State is ON this is the Edge containing the point.
"""
def EdgeParameter(self) -> float:
"""
Returns the parameter on Edge() used to determine the classification.
"""
def NoWires(self) -> bool:
"""
Returns True if the face contains no wire. The state is IN.
"""
@overload
def Perform(self,theF : OCP.TopoDS.TopoDS_Face,theP : OCP.gp.gp_Pnt2d,theTol : float,theUseBndBox : bool=False,theGapCheckTol : float=0.1) -> None:
"""
Classify the Point P with Tolerance <T> on the face described by <F>. Recommended to use Bnd_Box if the number of edges > 10 and the geometry is mostly spline
Classify the Point P with Tolerance <T> on the face described by <F>. Recommended to use Bnd_Box if the number of edges > 10 and the geometry is mostly spline
"""
@overload
def Perform(self,theF : OCP.TopoDS.TopoDS_Face,theP : OCP.gp.gp_Pnt,theTol : float,theUseBndBox : bool=False,theGapCheckTol : float=0.1) -> None: ...
def Position(self) -> OCP.IntRes2d.IntRes2d_Position:
"""
Returns the position of the point on the edge returned by Edge.
"""
def Rejected(self) -> bool:
"""
Returns True when the state was computed by a rejection. The state is OUT.
"""
def State(self) -> OCP.TopAbs.TopAbs_State:
"""
Returns the result of the classification.
"""
@overload
def __init__(self,theF : OCP.TopoDS.TopoDS_Face,theP : OCP.gp.gp_Pnt2d,theTol : float,theUseBndBox : bool=False,theGapCheckTol : float=0.1) -> None: ...
@overload
def __init__(self) -> None: ...
@overload
def __init__(self,theF : OCP.TopoDS.TopoDS_Face,theP : OCP.gp.gp_Pnt,theTol : float,theUseBndBox : bool=False,theGapCheckTol : float=0.1) -> None: ...
@overload
def __init__(self,F : BRepClass_FaceExplorer,P : OCP.gp.gp_Pnt2d,Tol : float) -> None: ...
pass
class BRepClass_FaceExplorer():
"""
Provide an exploration of a BRep Face for the classification. Return UV edges.
"""
def CheckPoint(self,thePoint : OCP.gp.gp_Pnt2d) -> bool:
"""
Checks the point and change its coords if it is located too far from the bounding box of the face. New Coordinates of the point will be on the line between the point and the center of the bounding box. Returns True if point was not changed.
"""
def CurrentEdge(self,E : BRepClass_Edge,Or : OCP.TopAbs.TopAbs_Orientation) -> None:
"""
Current edge in current wire and its orientation.
"""
def InitEdges(self) -> None:
"""
Starts an exploration of the edges of the current wire.
"""
def InitWires(self) -> None:
"""
Starts an exploration of the wires.
"""
def MaxTolerance(self) -> float:
"""
Returns the maximum tolerance
"""
def MoreEdges(self) -> bool:
"""
Returns True if there is a current edge.
Returns True if there is a current edge.
"""
def MoreWires(self) -> bool:
"""
Returns True if there is a current wire.
Returns True if there is a current wire.
"""
def NextEdge(self) -> None:
"""
Sets the explorer to the next edge.
Sets the explorer to the next edge.
"""
def NextWire(self) -> None:
"""
Sets the explorer to the next wire.
Sets the explorer to the next wire.
"""
def OtherSegment(self,P : OCP.gp.gp_Pnt2d,L : OCP.gp.gp_Lin2d,Par : float) -> bool:
"""
Returns in <L>, <Par> a segment having at least one intersection with the face boundary to compute intersections. Each call gives another segment.
"""
def Reject(self,P : OCP.gp.gp_Pnt2d) -> bool:
"""
Should return True if the point is outside a bounding volume of the face.
"""
def RejectEdge(self,L : OCP.gp.gp_Lin2d,Par : float) -> bool:
"""
Returns True if the edge bounding volume does not intersect the segment.
"""
def RejectWire(self,L : OCP.gp.gp_Lin2d,Par : float) -> bool:
"""
Returns True if the wire bounding volume does not intersect the segment.
"""
def Segment(self,P : OCP.gp.gp_Pnt2d,L : OCP.gp.gp_Lin2d,Par : float) -> bool:
"""
Returns in <L>, <Par> a segment having at least one intersection with the face boundary to compute intersections.
"""
def SetMaxTolerance(self,theValue : float) -> None:
"""
Sets the maximum tolerance at which to start checking in the intersector
"""
def SetUseBndBox(self,theValue : bool) -> None:
"""
Sets the status of whether we are using boxes or not
"""
def UseBndBox(self) -> bool:
"""
Returns true if we are using boxes in the intersector
"""
def __init__(self,F : OCP.TopoDS.TopoDS_Face) -> None: ...
pass
class BRepClass_FacePassiveClassifier():
"""
None
"""
def ClosestIntersection(self) -> int:
"""
Returns 0 if the last compared edge had no relevant intersection. Else returns the index of this intersection in the last intersection algorithm.
"""
def Compare(self,E : BRepClass_Edge,Or : OCP.TopAbs.TopAbs_Orientation) -> None:
"""
Updates the classification process with the edge <E> from the boundary.
"""
def Intersector(self) -> BRepClass_Intersector:
"""
Returns the intersecting algorithm.
"""
def IsHeadOrEnd(self) -> bool:
"""
Returns the Standard_True if the closest intersection point represents head or end of the edge. Returns Standard_False otherwise.
"""
def Parameter(self) -> float:
"""
Returns the current value of the parameter.
"""
def Reset(self,L : OCP.gp.gp_Lin2d,P : float,Tol : float) -> None:
"""
Starts a classification process. The point to classify is the origin of the line <L>. <P> is the original length of the segment on <L> used to compute intersections. <Tol> is the tolerance attached to the line segment in intersections.
"""
def State(self) -> OCP.TopAbs.TopAbs_State:
"""
Returns the current state of the point.
"""
def __init__(self) -> None: ...
pass
class BRepClass_Intersector(OCP.Geom2dInt.Geom2dInt_IntConicCurveOfGInter, OCP.IntRes2d.IntRes2d_Intersection):
"""
Intersect an Edge with a segment. Implement the Intersector2d required by the classifier.
"""
def IsDone(self) -> bool:
"""
returns TRUE when the computation was successful.
returns TRUE when the computation was successful.
"""
def IsEmpty(self) -> bool:
"""
Returns TRUE if there is no intersection between the given arguments. The exception NotDone is raised if IsDone returns FALSE.
Returns TRUE if there is no intersection between the given arguments. The exception NotDone is raised if IsDone returns FALSE.
"""
def LocalGeometry(self,E : BRepClass_Edge,U : float,T : OCP.gp.gp_Dir2d,N : OCP.gp.gp_Dir2d) -> tuple[float]:
"""
Returns in <T>, <N> and <C> the tangent, normal and curvature of the edge <E> at parameter value <U>.
"""
def NbPoints(self) -> int:
"""
This function returns the number of intersection points between the 2 curves. The exception NotDone is raised if IsDone returns FALSE.
This function returns the number of intersection points between the 2 curves. The exception NotDone is raised if IsDone returns FALSE.
"""
def NbSegments(self) -> int:
"""
This function returns the number of intersection segments between the two curves. The exception NotDone is raised if IsDone returns FALSE.
This function returns the number of intersection segments between the two curves. The exception NotDone is raised if IsDone returns FALSE.
"""
def Perform(self,L : OCP.gp.gp_Lin2d,P : float,Tol : float,E : BRepClass_Edge) -> None:
"""
Intersect the line segment and the edge.
"""
def Point(self,N : int) -> OCP.IntRes2d.IntRes2d_IntersectionPoint:
"""
This function returns the intersection point of range N; The exception NotDone is raised if IsDone returns FALSE. The exception OutOfRange is raised if (N <= 0) or (N > NbPoints).
This function returns the intersection point of range N; The exception NotDone is raised if IsDone returns FALSE. The exception OutOfRange is raised if (N <= 0) or (N > NbPoints).
"""
def Segment(self,N : int) -> OCP.IntRes2d.IntRes2d_IntersectionSegment:
"""
This function returns the intersection segment of range N; The exception NotDone is raised if IsDone returns FALSE. The exception OutOfRange is raised if (N <= 0) or (N > NbPoints).
This function returns the intersection segment of range N; The exception NotDone is raised if IsDone returns FALSE. The exception OutOfRange is raised if (N <= 0) or (N > NbPoints).
"""
@overload
def SetReversedParameters(self,flag : bool) -> None:
"""
None
None
"""
@overload
def SetReversedParameters(self,Reverseflag : bool) -> None: ...
def __init__(self) -> None: ...
pass
|