
Mon, 08/23/2004 - 16:22
Forums:
Hi
Is there a way to build a Geom_Curve from a Geom2d_Curve and a Geom_Surface?
Context:
We have a own 3D viewer which displays discretized Geom_Curves. As a result of HLRBRep_Algo I get a Compound containing edges. Thesee edges should be displayed in our viewer. Because the curve representation of these edges is of type BRep_CurveOnSurface I can not retrieve a Geom_Curve (Curve3D fails). But I can access a Geom2d_Curve and the surface where the curve lays in. So is there a way to build a Geom_Curve from this information?
Thanks in advance for any suggestions
Markus
Wed, 08/25/2004 - 18:15
Hi Markus,
Since you do some hidden line removal, I assume your Geom2d_Curve's all lie on some plane or other. So all you have to do is get the gp_Pln from the surface and call GeomAPI::To3d to get the corresponding Geom_Curve.
If your surfaces are non-planar, you have to use an approximation in order to compute your 3D curves, e.g. Approx_CurveOnSurface.
Regards, Kris.