DiscussionsIssue archiveOther usage issues

Archived discussion

Wire Approximation

Other usage issuesSat, 01/22/2005 - 10:002 replies

Browse this forum
QuestionAuthor

Hi All,
Is there any way to approximate a closed TopoDS_Wire with a smooth curve?
Regards,
Akbari

Discussion

2 archived replies

Posts are displayed in their archived order.

01Commenter-1

Hi Akbari,

I would consider using Approx_Curve3d and feeding it with an adaptor based on BRepAdaptor_CompCurve() that accepts your wire.

HTH.
Commenter-1

02Author

Hi Roman,
Thank you for your response.
I use the following code to convert two wire to closed bspline-curve.
and one of them is inside the other one.
I want to make a parametric ruled surface between them, But it makes an unexpected face. Its due to their parametrization. I reverse the parametrization of one curve but it dont do any good.
I mean the first point(u=0) of them are too far from each other.
Is there any way to change the parametrization of one curve so that the first point of them be close to each other?
Regards,
Akbari

------------------------------
TopoDS_Wire F;
TopLoc_Location location;
BRepAdaptor_CompCurve AdaptedWire(F);
Standard_Real First,Last;
First=AdaptedWire.FirstParameter() ;
Last=AdaptedWire.LastParameter ();
Handle_Adaptor3d_HCurve AdaptedCurve=AdaptedWire.Trim(First,Last,0.000001);
Approx_Curve3d ApproxCurve(AdaptedCurve,0.000001,GeomAbs_C2,10000,8);
Handle_Geom_BSplineCurve myCurve1=ApproxCurve.Curve();
// my curve2 will made by above procedure

//now make a ruled surface
Handle(Geom_Surface) Surface =GeomFill::Surface(myCurve1,myCurve2);