The best way to triangulate a surface

Hey everyone,

I'm new to OCC and I have a quick question. If I get a shape either by making it (with the BRep Builder API) or loading a STEP or IGES file, I assume I can always either use BRepAdaptor_CompCurve to get the entire boundary of a face or get the individual edge curves with BRepAdaptor_Curve. Either way, I want to reparameterize the entire curve by it's length (to t = [0,1]) so that uniformly sampling [0,1] will uniformly sample the curve. Is there an easy to compute the length of a curve? I'm sure there has to be, this framework seems to do everything...but I can't find it! Beyond that, is there perhaps a better built in way to do what I want more easily?

kjcamann's picture

er, I should note there's a reason the topic is called "the best way to triangulate a surface"...I originally had quite a few more questions that relate to this one, which come from my implementation of a triangulation algorithm. But I don't want to post a million questions right away, this one will help me get started, and hopefully my questions will answer themselves along the way

Thanks

Jan Brüninghaus's picture

Have a look at ChFiDS_Map (Modeling Algorithms -> TKFillet -> ChFiDS) for getting a map between faces and curves and GCPnts_AbscissaPoint (Modeling -> TKGeomBase -> GCPnts) for getting the length of a curve.