mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-06-07 05:37:56 +08:00
Modeling Data - Add BRepProp package for modern BRep differential properties (#1116)
Add new BRepProp package to TKBRep as a thin wrapper over GeomProp:: free functions for computing local differential properties of BRep edges and faces without exceptions. Replaces the legacy BRepLProp macro-based (.gxx) pattern. New package BRepProp (TKBRep) provides: - BRepProp_Curve: Local curve property evaluator for BRep edges. Delegates derivative computation to BRepAdaptor_Curve and passes results to GeomProp::ComputeTangent, ComputeCurvature, ComputeNormal, ComputeCentreOfCurvature. Three Initialize overloads: from TopoDS_Edge (owning), from BRepAdaptor_Curve reference (non-owning), and from occ::handle<BRepAdaptor_Curve> (shared ownership). Includes static Continuity() methods for regularity analysis at curve junctions (replaces BRepLProp::Continuity). - BRepProp_Surface: Local surface property evaluator for BRep faces. Delegates derivative computation to BRepAdaptor_Surface and passes results to GeomProp::ComputeSurfaceNormal, ComputeSurfaceCurvatures, ComputeMeanGaussian. Same three Initialize overloads as BRepProp_Curve. Key design decisions: - No variant dispatch needed: BRepAdaptor_Curve/Surface handle geometry-type dispatch internally via virtual methods, so BRepProp is a thin wrapper calling adaptor D1/D2/D3 then GeomProp:: free functions. - Ownership pattern: occ::handle for owning case + raw const pointer for non-owning case, consistent with GeomProp_Curve/Surface. - Returns result structs with IsDefined flags instead of throwing exceptions. 18 GTests: 11 unit tests (line, circle, box, cylinder, sphere) and 7 cross-validation tests against BRepLProp_CLProps/BRepLProp_SLProps.
This commit is contained in:
@@ -5,6 +5,7 @@ set(OCCT_TKBRep_LIST_OF_PACKAGES
|
||||
TopTools
|
||||
BRep
|
||||
BRepLProp
|
||||
BRepProp
|
||||
BRepAdaptor
|
||||
BRepTools
|
||||
BinTools
|
||||
|
||||
Reference in New Issue
Block a user