mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +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:
@@ -33,13 +33,17 @@ uses
|
||||
|
||||
is
|
||||
|
||||
Create(Parameterisation : ParameterisationType from Convert = Convert_TgtThetaOver2);
|
||||
---Purpose: Initialize the algorithme
|
||||
-- - Parameterisation is used to convert
|
||||
|
||||
Create (BasisCurve : BoundedCurve from Geom2d;
|
||||
Parameterisation : ParameterisationType from Convert
|
||||
= Convert_TgtThetaOver2)
|
||||
---Purpose: Initialize the algorithme with one curve
|
||||
-- - Parameterisation is used to convert
|
||||
returns CompCurveToBSplineCurve;
|
||||
|
||||
|
||||
Add (me : in out;
|
||||
NewCurve : BoundedCurve from Geom2d;
|
||||
Tolerance: Real from Standard;
|
||||
@@ -61,6 +65,9 @@ is
|
||||
|
||||
BSplineCurve(me) returns BSplineCurve from Geom2d;
|
||||
|
||||
Clear(me : in out);
|
||||
---Purpose: Clear result curve
|
||||
|
||||
fields
|
||||
myCurve : BSplineCurve from Geom2d;
|
||||
myTol : Real;
|
||||
|
@@ -18,8 +18,6 @@
|
||||
// purpose or non-infringement. Please see the License for the specific terms
|
||||
// and conditions governing the rights and limitations under the License.
|
||||
|
||||
|
||||
|
||||
#include <Geom2dConvert_CompCurveToBSplineCurve.ixx>
|
||||
|
||||
#include <Geom2d_BSplineCurve.hxx>
|
||||
@@ -33,7 +31,21 @@
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <Precision.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : constructor
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Geom2dConvert_CompCurveToBSplineCurve::Geom2dConvert_CompCurveToBSplineCurve (const Convert_ParameterisationType theParameterisation)
|
||||
: myTol (Precision::Confusion()),
|
||||
myType (theParameterisation)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : constructor
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Geom2dConvert_CompCurveToBSplineCurve::
|
||||
Geom2dConvert_CompCurveToBSplineCurve(const Handle(Geom2d_BoundedCurve)& BasisCurve,
|
||||
const Convert_ParameterisationType Parameterisation) :
|
||||
@@ -52,7 +64,7 @@ Geom2dConvert_CompCurveToBSplineCurve(const Handle(Geom2d_BoundedCurve)& BasisCu
|
||||
|
||||
//=======================================================================
|
||||
//function : Add
|
||||
//purpose :
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean Geom2dConvert_CompCurveToBSplineCurve::
|
||||
@@ -60,16 +72,23 @@ Add(const Handle(Geom2d_BoundedCurve)& NewCurve,
|
||||
const Standard_Real Tolerance,
|
||||
const Standard_Boolean After)
|
||||
{
|
||||
myTol = Tolerance;
|
||||
// Convertion
|
||||
Handle(Geom2d_BSplineCurve) Bs =
|
||||
Handle(Geom2d_BSplineCurve)::DownCast(NewCurve);
|
||||
if (!Bs.IsNull() ) {
|
||||
Bs = Handle(Geom2d_BSplineCurve)::DownCast(NewCurve->Copy());
|
||||
// conversion
|
||||
Handle(Geom2d_BSplineCurve) Bs = Handle(Geom2d_BSplineCurve)::DownCast (NewCurve);
|
||||
if (!Bs.IsNull())
|
||||
{
|
||||
Bs = Handle(Geom2d_BSplineCurve)::DownCast (NewCurve->Copy());
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
Bs = Geom2dConvert::CurveToBSplineCurve (NewCurve, myType);
|
||||
}
|
||||
if (myCurve.IsNull())
|
||||
{
|
||||
myCurve = Bs;
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
myTol = Tolerance;
|
||||
|
||||
Standard_Integer LBs = Bs->NbPoles(), LCb = myCurve->NbPoles();
|
||||
|
||||
@@ -116,6 +135,11 @@ Add(const Handle(Geom2d_BoundedCurve)& NewCurve,
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Add
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Geom2dConvert_CompCurveToBSplineCurve::Add(
|
||||
Handle(Geom2d_BSplineCurve)& FirstCurve,
|
||||
Handle(Geom2d_BSplineCurve)& SecondCurve,
|
||||
@@ -203,8 +227,22 @@ void Geom2dConvert_CompCurveToBSplineCurve::Add(
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : BSplineCurve
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(Geom2d_BSplineCurve) Geom2dConvert_CompCurveToBSplineCurve::BSplineCurve() const
|
||||
{
|
||||
return myCurve;
|
||||
return myCurve;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Clear
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Geom2dConvert_CompCurveToBSplineCurve::Clear()
|
||||
{
|
||||
myCurve.Nullify();
|
||||
}
|
||||
|
Reference in New Issue
Block a user