mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0024181: Text to BRep functionality
Introduce new class Font_BRepFont for conversion of font glyph in vector format into BRep representation. New text2brep Draw Harness command. bottle.tcl - draw text on the bottle side using new functionality. ViewerTest - process Delete key in 3D-Viewer to delete selected presentations. Font_FontMgr::FindFont - return correct font when font alias and not default aspect is requested. bottle.tcl - use prism instead of pipe TKViewerTest - add required FreeType dependency verase - display the list of erase objects TKViewerTest - add required FreeType dependency for projects generation
This commit is contained in:
@@ -35,6 +35,11 @@ uses
|
||||
|
||||
is
|
||||
|
||||
Create(Parameterisation : ParameterisationType from Convert = Convert_TgtThetaOver2);
|
||||
---Purpose: Initialize the algorithme
|
||||
-- - Parameterisation is used to convert
|
||||
|
||||
|
||||
Create (BasisCurve : BoundedCurve from Geom;
|
||||
Parameterisation : ParameterisationType from Convert
|
||||
= Convert_TgtThetaOver2)
|
||||
@@ -42,6 +47,7 @@ is
|
||||
-- - Parameterisation is used to convert
|
||||
returns CompCurveToBSplineCurve;
|
||||
|
||||
|
||||
Add (me : in out;
|
||||
NewCurve : BoundedCurve from Geom;
|
||||
Tolerance : Real from Standard;
|
||||
@@ -67,6 +73,9 @@ is
|
||||
|
||||
BSplineCurve(me) returns BSplineCurve from Geom;
|
||||
|
||||
Clear(me : in out);
|
||||
---Purpose: Clear a result curve
|
||||
|
||||
fields
|
||||
myCurve : BSplineCurve from Geom;
|
||||
myTol : Real;
|
||||
|
@@ -35,8 +35,21 @@
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <Precision.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : constructor
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
GeomConvert_CompCurveToBSplineCurve::GeomConvert_CompCurveToBSplineCurve (const Convert_ParameterisationType theParameterisation)
|
||||
: myTol (Precision::Confusion()),
|
||||
myType (theParameterisation)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : constructor
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
GeomConvert_CompCurveToBSplineCurve::
|
||||
GeomConvert_CompCurveToBSplineCurve(const Handle(Geom_BoundedCurve)& BasisCurve,
|
||||
const Convert_ParameterisationType Parameterisation) :
|
||||
@@ -55,7 +68,7 @@ GeomConvert_CompCurveToBSplineCurve(const Handle(Geom_BoundedCurve)& BasisCurve,
|
||||
|
||||
//=======================================================================
|
||||
//function : Add
|
||||
//purpose :
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean GeomConvert_CompCurveToBSplineCurve::
|
||||
@@ -65,17 +78,24 @@ Add(const Handle(Geom_BoundedCurve)& NewCurve,
|
||||
const Standard_Boolean WithRatio,
|
||||
const Standard_Integer MinM)
|
||||
{
|
||||
Standard_Boolean avant, apres;
|
||||
myTol = Tolerance;
|
||||
// Convertion
|
||||
Handle(Geom_BSplineCurve) Bs =
|
||||
Handle(Geom_BSplineCurve)::DownCast(NewCurve);
|
||||
if (!Bs.IsNull() ) {
|
||||
Bs = Handle(Geom_BSplineCurve)::DownCast(NewCurve->Copy());
|
||||
// conversion
|
||||
Handle(Geom_BSplineCurve) Bs = Handle(Geom_BSplineCurve)::DownCast (NewCurve);
|
||||
if (!Bs.IsNull())
|
||||
{
|
||||
Bs = Handle(Geom_BSplineCurve)::DownCast (NewCurve->Copy());
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
Bs = GeomConvert::CurveToBSplineCurve (NewCurve, myType);
|
||||
}
|
||||
if (myCurve.IsNull())
|
||||
{
|
||||
myCurve = Bs;
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
Standard_Boolean avant, apres;
|
||||
myTol = Tolerance;
|
||||
|
||||
Standard_Integer LBs = Bs->NbPoles(), LCb = myCurve->NbPoles();
|
||||
|
||||
@@ -216,12 +236,12 @@ void GeomConvert_CompCurveToBSplineCurve::Add(
|
||||
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : BSplineCurve
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(Geom_BSplineCurve) GeomConvert_CompCurveToBSplineCurve::BSplineCurve() const
|
||||
{
|
||||
return myCurve;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user