1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-29 14:00:49 +03:00

0023771: Writing offset-based surfaces of revolution to IGES

Parameter to write offset curves like b-splines was added
Change function, which convert offset curves to b-splines
Added test command "test_offset"
Added test cases bugs/xde/bug23771_1 bug23771_2
This commit is contained in:
ika
2013-05-16 11:14:51 +04:00
parent 2361d7e861
commit 1939140c23
5 changed files with 107 additions and 0 deletions

View File

@@ -79,6 +79,7 @@
#include <IGESGeom_TransformationMatrix.hxx>
#include <Interface_Macros.hxx>
#include <Interface_Static.hxx>
#include <Precision.hxx>
@@ -90,6 +91,8 @@
#include <BSplCLib.hxx>
#include <GeomConvert_ApproxCurve.hxx>
#include <ShapeCustom_BSplineRestriction.hxx>
// Pour toutes les courbes infinies soit
// Udeb <= -Precision::Infinite() et/ou Ufin >= Precision::Infinite()
// on choisit arbitrairement de les construire entre
@@ -827,6 +830,12 @@ Handle(IGESData_IGESEntity) GeomToIGES_GeomCurve::TransferCurve
if (Precision::IsNegativeInfinite(Udeb)) U1 = -Precision::Infinite();
if (Precision::IsPositiveInfinite(Ufin)) U2 = Precision::Infinite();
if (Interface_Static::IVal("write.iges.offset.mode") == 0)
{
res = TransferCurve(GeomConvert::CurveToBSplineCurve(start),U1,U2);
return res;
}
Handle(Geom_Curve) Curve = start->BasisCurve();
Standard_Real Deb = Curve->FirstParameter();
Standard_Real Fin = Curve->LastParameter();