mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00:49 +03:00
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
96d4000f3b | ||
|
4b2a0e8e49 | ||
|
abd63556da | ||
|
ca97f1702d | ||
|
81d569625e | ||
|
6072d3093c |
@@ -389,13 +389,13 @@ static void TrimEdge (const TopoDS_Edge& CurrentEdge,
|
|||||||
|
|
||||||
|
|
||||||
static Standard_Boolean SearchRoot (const TopoDS_Vertex& V,
|
static Standard_Boolean SearchRoot (const TopoDS_Vertex& V,
|
||||||
const TopTools_DataMapOfShapeListOfShape& Map,
|
const TopTools_IndexedDataMapOfShapeListOfShape Map,
|
||||||
TopoDS_Vertex& VRoot)
|
TopoDS_Vertex& VRoot)
|
||||||
{
|
{
|
||||||
Standard_Boolean trouve = Standard_False;
|
Standard_Boolean trouve = Standard_False;
|
||||||
VRoot.Nullify();
|
VRoot.Nullify();
|
||||||
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape it;
|
TopTools_IndexedDataMapIteratorOfDataMapOfShapeListOfShape it(Map);
|
||||||
for (it.Initialize(Map); it.More(); it.Next()) {
|
for (; it.More(); it.Next()) {
|
||||||
const TopTools_ListOfShape & List = it.Value();
|
const TopTools_ListOfShape & List = it.Value();
|
||||||
TopTools_ListIteratorOfListOfShape itL;
|
TopTools_ListIteratorOfListOfShape itL;
|
||||||
Standard_Boolean ilyest = Standard_False;
|
Standard_Boolean ilyest = Standard_False;
|
||||||
@@ -447,7 +447,7 @@ static Standard_Boolean SearchVertex (const TopTools_ListOfShape& List,
|
|||||||
static Standard_Boolean EdgeIntersectOnWire (const gp_Pnt& P1,
|
static Standard_Boolean EdgeIntersectOnWire (const gp_Pnt& P1,
|
||||||
const gp_Pnt& P2,
|
const gp_Pnt& P2,
|
||||||
Standard_Real percent,
|
Standard_Real percent,
|
||||||
const TopTools_DataMapOfShapeListOfShape& Map,
|
const TopTools_IndexedDataMapOfShapeListOfShape& Map,
|
||||||
const TopoDS_Wire& W,
|
const TopoDS_Wire& W,
|
||||||
TopoDS_Vertex& Vsol,
|
TopoDS_Vertex& Vsol,
|
||||||
TopoDS_Wire& newW,
|
TopoDS_Wire& newW,
|
||||||
@@ -976,7 +976,7 @@ void BRepFill_CompatibleWires::
|
|||||||
}
|
}
|
||||||
|
|
||||||
// construction of RMap, map of reports of wire i to wire i-1
|
// construction of RMap, map of reports of wire i to wire i-1
|
||||||
TopTools_DataMapOfShapeListOfShape RMap;
|
TopTools_IndexedDataMapOfShapeListOfShape RMap;
|
||||||
RMap.Clear();
|
RMap.Clear();
|
||||||
|
|
||||||
// loop on i
|
// loop on i
|
||||||
@@ -997,7 +997,10 @@ void BRepFill_CompatibleWires::
|
|||||||
// init of RMap for Vi
|
// init of RMap for Vi
|
||||||
TopTools_ListOfShape Init;
|
TopTools_ListOfShape Init;
|
||||||
Init.Clear();
|
Init.Clear();
|
||||||
RMap.Bind(Vi,Init);
|
TopTools_ListOfShape* aShapeList = RMap.ChangeSeek(Vi);
|
||||||
|
if (!aShapeList)
|
||||||
|
aShapeList = &RMap(RMap.Add(Vi, Init));
|
||||||
|
aShapeList->Append(Init);
|
||||||
|
|
||||||
// it is required to find intersection Vi - wire2
|
// it is required to find intersection Vi - wire2
|
||||||
gp_Pnt Pi = BRep_Tool::Pnt(Vi);
|
gp_Pnt Pi = BRep_Tool::Pnt(Vi);
|
||||||
@@ -1019,14 +1022,14 @@ void BRepFill_CompatibleWires::
|
|||||||
RMap,TopoDS::Wire(myWork(i-1)),
|
RMap,TopoDS::Wire(myWork(i-1)),
|
||||||
Vsol,newwire,EdgeNewEdges);
|
Vsol,newwire,EdgeNewEdges);
|
||||||
if (NewVertex) myWork(i-1) = newwire;
|
if (NewVertex) myWork(i-1) = newwire;
|
||||||
RMap(Vi).Append(Vsol);
|
RMap.ChangeFromKey(Vi).Append(Vsol);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // loop on ii
|
} // loop on ii
|
||||||
} // loop on i
|
} // loop on i
|
||||||
|
|
||||||
// initialisation of MapVLV, map of correspondences vertex - list of vertices
|
// initialisation of MapVLV, map of correspondences vertex - list of vertices
|
||||||
TopTools_DataMapOfShapeListOfShape MapVLV;
|
TopTools_IndexedDataMapOfShapeListOfShape MapVLV;
|
||||||
SeqOfVertices(TopoDS::Wire(myWork(ideb)),SeqV);
|
SeqOfVertices(TopoDS::Wire(myWork(ideb)),SeqV);
|
||||||
Standard_Integer SizeMap = SeqV.Length();
|
Standard_Integer SizeMap = SeqV.Length();
|
||||||
MapVLV.Clear();
|
MapVLV.Clear();
|
||||||
@@ -1035,13 +1038,16 @@ void BRepFill_CompatibleWires::
|
|||||||
TopTools_ListOfShape Init;
|
TopTools_ListOfShape Init;
|
||||||
Init.Clear();
|
Init.Clear();
|
||||||
Init.Append(Vi);
|
Init.Append(Vi);
|
||||||
MapVLV.Bind(Vi,Init);
|
TopTools_ListOfShape* aShapeList = MapVLV.ChangeSeek(Vi);
|
||||||
|
if (!aShapeList)
|
||||||
|
aShapeList = &MapVLV(MapVLV.Add(Vi, Init));
|
||||||
|
aShapeList->Append(Init);
|
||||||
Standard_Integer NbV = 1;
|
Standard_Integer NbV = 1;
|
||||||
TopoDS_Vertex V0,V1;
|
TopoDS_Vertex V0,V1;
|
||||||
V0 = Vi;
|
V0 = Vi;
|
||||||
Standard_Boolean tantque = SearchRoot(V0,RMap,V1);
|
Standard_Boolean tantque = SearchRoot(V0,RMap,V1);
|
||||||
while (tantque) {
|
while (tantque) {
|
||||||
MapVLV(Vi).Append(V1);
|
MapVLV.ChangeFromKey(Vi).Append(V1);
|
||||||
NbV++;
|
NbV++;
|
||||||
// test on NbV required for looping sections
|
// test on NbV required for looping sections
|
||||||
if (V1.IsSame(Vi) || NbV >= myWork.Length()) {
|
if (V1.IsSame(Vi) || NbV >= myWork.Length()) {
|
||||||
@@ -1076,7 +1082,7 @@ void BRepFill_CompatibleWires::
|
|||||||
VRoot.Nullify();
|
VRoot.Nullify();
|
||||||
Standard_Boolean intersect = Standard_True;
|
Standard_Boolean intersect = Standard_True;
|
||||||
if (SearchRoot(Vi,MapVLV,VRoot)) {
|
if (SearchRoot(Vi,MapVLV,VRoot)) {
|
||||||
const TopTools_ListOfShape& LVi = MapVLV(VRoot);
|
const TopTools_ListOfShape& LVi = MapVLV.FindFromKey(VRoot);
|
||||||
TopoDS_Vertex VonW;
|
TopoDS_Vertex VonW;
|
||||||
VonW.Nullify();
|
VonW.Nullify();
|
||||||
intersect = (!SearchVertex(LVi,wire2,VonW));
|
intersect = (!SearchVertex(LVi,wire2,VonW));
|
||||||
@@ -1102,7 +1108,7 @@ void BRepFill_CompatibleWires::
|
|||||||
NewVertex = EdgeIntersectOnWire(Pos->Value(i+1),Pnew,percent,
|
NewVertex = EdgeIntersectOnWire(Pos->Value(i+1),Pnew,percent,
|
||||||
MapVLV,TopoDS::Wire(myWork(i+1)),
|
MapVLV,TopoDS::Wire(myWork(i+1)),
|
||||||
Vsol,newwire,EdgeNewEdges);
|
Vsol,newwire,EdgeNewEdges);
|
||||||
MapVLV(VRoot).Append(Vsol);
|
MapVLV.ChangeFromKey(VRoot).Append(Vsol);
|
||||||
if (NewVertex) myWork(i+1) = newwire;
|
if (NewVertex) myWork(i+1) = newwire;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1129,7 +1135,7 @@ void BRepFill_CompatibleWires::
|
|||||||
Standard_Real U2 = BRep_Tool::Parameter(VL,ECur);
|
Standard_Real U2 = BRep_Tool::Parameter(VL,ECur);
|
||||||
BRepAdaptor_Curve Curve(ECur);
|
BRepAdaptor_Curve Curve(ECur);
|
||||||
gp_Pnt PPs = Curve.Value(0.1*(U1+9*U2));
|
gp_Pnt PPs = Curve.Value(0.1*(U1+9*U2));
|
||||||
TopTools_ListIteratorOfListOfShape itF(MapVLV(VF)),itL(MapVLV(VL));
|
TopTools_ListIteratorOfListOfShape itF(MapVLV.FindFromKey(VF)),itL(MapVLV.FindFromKey(VL));
|
||||||
Standard_Integer rang = ideb;
|
Standard_Integer rang = ideb;
|
||||||
while (rang < i) {
|
while (rang < i) {
|
||||||
itF.Next();
|
itF.Next();
|
||||||
@@ -1149,7 +1155,24 @@ void BRepFill_CompatibleWires::
|
|||||||
|
|
||||||
// parse candidate edges
|
// parse candidate edges
|
||||||
Standard_Real scal1,scal2;
|
Standard_Real scal1,scal2;
|
||||||
if ( (V1.IsSame(VVF)&&V2.IsSame(VVL)) || (V2.IsSame(VVF)&&V1.IsSame(VVL)) ) {
|
|
||||||
|
Standard_Boolean isEqual = (V1.IsSame(VVF) && V2.IsSame(VVL)) || (V2.IsSame(VVF) && V1.IsSame(VVL));
|
||||||
|
|
||||||
|
if (!isEqual)
|
||||||
|
{
|
||||||
|
itF = (MapVLV.FindFromKey(VF));
|
||||||
|
itL = (MapVLV.FindFromKey(VL));
|
||||||
|
rang = ideb - 1;
|
||||||
|
while (rang < i) {
|
||||||
|
itF.Next();
|
||||||
|
itL.Next();
|
||||||
|
rang++;
|
||||||
|
}
|
||||||
|
V1 = TopoDS::Vertex(itF.Value()), V2 = TopoDS::Vertex(itL.Value());
|
||||||
|
isEqual = (V1.IsSame(VVF) && V2.IsSame(VVL)) || (V2.IsSame(VVF) && V1.IsSame(VVL));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isEqual) {
|
||||||
Standard_Real U1param = BRep_Tool::Parameter(VVF,E);
|
Standard_Real U1param = BRep_Tool::Parameter(VVF,E);
|
||||||
Standard_Real U2param = BRep_Tool::Parameter(VVL,E);
|
Standard_Real U2param = BRep_Tool::Parameter(VVL,E);
|
||||||
BRepAdaptor_Curve CurveE(E);
|
BRepAdaptor_Curve CurveE(E);
|
||||||
|
@@ -1024,11 +1024,13 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape,
|
|||||||
// place the initial section at the final position
|
// place the initial section at the final position
|
||||||
Param.Append(V2);
|
Param.Append(V2);
|
||||||
WSeq.Append(WSeq(ideb));
|
WSeq.Append(WSeq(ideb));
|
||||||
|
IndSec.Append(WSeq.Length());
|
||||||
}
|
}
|
||||||
else if (ifin>0) {
|
else if (ifin>0) {
|
||||||
// place the final section at the initial position
|
// place the final section at the initial position
|
||||||
Param.Append(V1);
|
Param.Append(V1);
|
||||||
WSeq.Append(WSeq(ifin));
|
WSeq.Append(WSeq(ifin));
|
||||||
|
IndSec.Append(WSeq.Length());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// it is necessary to find a medium section to impose by V1 and by V2
|
// it is necessary to find a medium section to impose by V1 and by V2
|
||||||
|
@@ -837,7 +837,9 @@ void Extrema_ExtCC::PrepareResults(const Extrema_ExtElC& AlgExt,
|
|||||||
if (myIsParallel) {
|
if (myIsParallel) {
|
||||||
PrepareParallelResult(Ut11, Ut12, Ut21, Ut22, AlgExt.SquareDistance());
|
PrepareParallelResult(Ut11, Ut12, Ut21, Ut22, AlgExt.SquareDistance());
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
|
if(mypoints.IsEmpty())
|
||||||
|
{
|
||||||
NbExt = AlgExt.NbExt();
|
NbExt = AlgExt.NbExt();
|
||||||
for (i = 1; i <= NbExt; i++) {
|
for (i = 1; i <= NbExt; i++) {
|
||||||
// Verification de la validite des parametres
|
// Verification de la validite des parametres
|
||||||
@@ -866,6 +868,8 @@ void Extrema_ExtCC::PrepareResults(const Extrema_ExtElC& AlgExt,
|
|||||||
(U2 >= Ut21 - RealEpsilon()) &&
|
(U2 >= Ut21 - RealEpsilon()) &&
|
||||||
(U2 <= Ut22 + RealEpsilon())) {
|
(U2 <= Ut22 + RealEpsilon())) {
|
||||||
Val = AlgExt.SquareDistance(i);
|
Val = AlgExt.SquareDistance(i);
|
||||||
|
if (mypoints.IsEmpty())
|
||||||
|
mySqDist.Clear();
|
||||||
mySqDist.Append(Val);
|
mySqDist.Append(Val);
|
||||||
if (!theIsInverse)
|
if (!theIsInverse)
|
||||||
{
|
{
|
||||||
@@ -911,7 +915,7 @@ void Extrema_ExtCC::PrepareResults(const Extrema_ECC& AlgExt,
|
|||||||
{
|
{
|
||||||
PrepareParallelResult(Ut11, Ut12, Ut21, Ut22, AlgExt.SquareDistance());
|
PrepareParallelResult(Ut11, Ut12, Ut21, Ut22, AlgExt.SquareDistance());
|
||||||
}
|
}
|
||||||
else
|
if(mypoints.IsEmpty())
|
||||||
{
|
{
|
||||||
NbExt = AlgExt.NbExt();
|
NbExt = AlgExt.NbExt();
|
||||||
for (i = 1; i <= NbExt; i++)
|
for (i = 1; i <= NbExt; i++)
|
||||||
@@ -935,6 +939,8 @@ void Extrema_ExtCC::PrepareResults(const Extrema_ECC& AlgExt,
|
|||||||
(U2 >= Ut21 - RealEpsilon()) &&
|
(U2 >= Ut21 - RealEpsilon()) &&
|
||||||
(U2 <= Ut22 + RealEpsilon()))
|
(U2 <= Ut22 + RealEpsilon()))
|
||||||
{
|
{
|
||||||
|
if(mypoints.IsEmpty())
|
||||||
|
mySqDist.Clear();
|
||||||
Val = AlgExt.SquareDistance(i);
|
Val = AlgExt.SquareDistance(i);
|
||||||
mySqDist.Append(Val);
|
mySqDist.Append(Val);
|
||||||
P1.SetValues(U, P1.Value());
|
P1.SetValues(U, P1.Value());
|
||||||
|
@@ -60,6 +60,7 @@ Font_TextFormatter::Font_TextFormatter()
|
|||||||
myAlignY (Graphic3d_VTA_TOP),
|
myAlignY (Graphic3d_VTA_TOP),
|
||||||
myTabSize (8),
|
myTabSize (8),
|
||||||
myWrappingWidth (0.0f),
|
myWrappingWidth (0.0f),
|
||||||
|
myIsWordWrapping (true),
|
||||||
myLastSymbolWidth (0.0f),
|
myLastSymbolWidth (0.0f),
|
||||||
myMaxSymbolWidth (0.0f),
|
myMaxSymbolWidth (0.0f),
|
||||||
//
|
//
|
||||||
@@ -249,6 +250,7 @@ void Font_TextFormatter::Format()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Standard_Utf32Char aCharPrev = 0;
|
||||||
for (Font_TextFormatter::Iterator aFormatterIt(*this);
|
for (Font_TextFormatter::Iterator aFormatterIt(*this);
|
||||||
aFormatterIt.More(); aFormatterIt.Next())
|
aFormatterIt.More(); aFormatterIt.Next())
|
||||||
{
|
{
|
||||||
@@ -269,12 +271,30 @@ void Font_TextFormatter::Format()
|
|||||||
Font_Rect aBndBox;
|
Font_Rect aBndBox;
|
||||||
GlyphBoundingBox (aRectIter, aBndBox);
|
GlyphBoundingBox (aRectIter, aBndBox);
|
||||||
const Standard_ShortReal aNextXPos = aBndBox.Right - BottomLeft (aFirstCornerId).x();
|
const Standard_ShortReal aNextXPos = aBndBox.Right - BottomLeft (aFirstCornerId).x();
|
||||||
if (aNextXPos > aMaxLineWidth) // wrap the line and do processing of the symbol
|
Standard_Boolean isCurWordFits = true;
|
||||||
|
if(myIsWordWrapping && IsSeparatorSymbol(aCharPrev))
|
||||||
|
{
|
||||||
|
for (Font_TextFormatter::Iterator aWordIt = aFormatterIt; aWordIt.More(); aWordIt.Next())
|
||||||
|
{
|
||||||
|
if (IsSeparatorSymbol(aWordIt.Symbol()))
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
float aWordWidthPx = myCorners[aWordIt.SymbolPosition()].x() - myCorners[aRectIter].x();
|
||||||
|
if (aNextXPos + aWordWidthPx > aMaxLineWidth)
|
||||||
|
{
|
||||||
|
isCurWordFits = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (aNextXPos > aMaxLineWidth || !isCurWordFits) // wrap the line and do processing of the symbol
|
||||||
{
|
{
|
||||||
const Standard_Integer aLastRect = aRectIter - 1; // last rect on current line
|
const Standard_Integer aLastRect = aRectIter - 1; // last rect on current line
|
||||||
newLine (aLastRect, aMaxLineWidth);
|
newLine (aLastRect, aMaxLineWidth);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
aCharPrev = aCharThis;
|
||||||
}
|
}
|
||||||
|
|
||||||
myBndWidth = aMaxLineWidth;
|
myBndWidth = aMaxLineWidth;
|
||||||
|
@@ -220,6 +220,12 @@ public:
|
|||||||
//! Returns text maximum width, zero means that the text is not bounded by width
|
//! Returns text maximum width, zero means that the text is not bounded by width
|
||||||
Standard_ShortReal Wrapping() const { return myWrappingWidth; }
|
Standard_ShortReal Wrapping() const { return myWrappingWidth; }
|
||||||
|
|
||||||
|
//! returns TRUE when trying not to break words when wrapping text
|
||||||
|
Standard_Boolean WordWrapping () const { return myIsWordWrapping; }
|
||||||
|
|
||||||
|
//! returns TRUE when trying not to break words when wrapping text
|
||||||
|
void SetWordWrapping (const Standard_Boolean theIsWordWrapping) { myIsWordWrapping = theIsWordWrapping; }
|
||||||
|
|
||||||
//! @return width of formatted text.
|
//! @return width of formatted text.
|
||||||
inline Standard_ShortReal ResultWidth() const
|
inline Standard_ShortReal ResultWidth() const
|
||||||
{
|
{
|
||||||
@@ -274,6 +280,14 @@ public:
|
|||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Returns true if the symbol separates words when wrapping is enabled
|
||||||
|
static Standard_Boolean IsSeparatorSymbol (const Standard_Utf32Char& theSymbol)
|
||||||
|
{
|
||||||
|
return theSymbol == '\x0A' // new line
|
||||||
|
|| theSymbol == ' ' // space
|
||||||
|
|| theSymbol == '\x09'; // tab
|
||||||
|
}
|
||||||
|
|
||||||
DEFINE_STANDARD_RTTIEXT (Font_TextFormatter, Standard_Transient)
|
DEFINE_STANDARD_RTTIEXT (Font_TextFormatter, Standard_Transient)
|
||||||
|
|
||||||
protected: //! @name class auxiliary methods
|
protected: //! @name class auxiliary methods
|
||||||
@@ -288,6 +302,7 @@ protected: //! @name configuration
|
|||||||
Graphic3d_VerticalTextAlignment myAlignY; //!< vertical alignment style
|
Graphic3d_VerticalTextAlignment myAlignY; //!< vertical alignment style
|
||||||
Standard_Integer myTabSize; //!< horizontal tabulation width (number of space symbols)
|
Standard_Integer myTabSize; //!< horizontal tabulation width (number of space symbols)
|
||||||
Standard_ShortReal myWrappingWidth; //!< text is wrapped by the width if defined (more 0)
|
Standard_ShortReal myWrappingWidth; //!< text is wrapped by the width if defined (more 0)
|
||||||
|
Standard_Boolean myIsWordWrapping; //!< if TRUE try not to break words when wrapping text (true by default)
|
||||||
Standard_ShortReal myLastSymbolWidth; //!< width of the last symbol
|
Standard_ShortReal myLastSymbolWidth; //!< width of the last symbol
|
||||||
Standard_ShortReal myMaxSymbolWidth; //!< maximum symbol width of the formatter string
|
Standard_ShortReal myMaxSymbolWidth; //!< maximum symbol width of the formatter string
|
||||||
|
|
||||||
|
@@ -23,6 +23,7 @@
|
|||||||
#include <NCollection_IndexedDataMap.hxx>
|
#include <NCollection_IndexedDataMap.hxx>
|
||||||
|
|
||||||
typedef NCollection_IndexedDataMap<TopoDS_Shape,TopTools_ListOfShape,TopTools_ShapeMapHasher> TopTools_IndexedDataMapOfShapeListOfShape;
|
typedef NCollection_IndexedDataMap<TopoDS_Shape,TopTools_ListOfShape,TopTools_ShapeMapHasher> TopTools_IndexedDataMapOfShapeListOfShape;
|
||||||
|
typedef NCollection_IndexedDataMap<TopoDS_Shape, TopTools_ListOfShape, TopTools_ShapeMapHasher>::Iterator TopTools_IndexedDataMapIteratorOfDataMapOfShapeListOfShape;
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -2500,6 +2500,11 @@ static int VDrawText (Draw_Interpretor& theDI,
|
|||||||
}
|
}
|
||||||
aTextFormatter->SetWrapping ((Standard_ShortReal)Draw::Atof(theArgVec[++anArgIt]));
|
aTextFormatter->SetWrapping ((Standard_ShortReal)Draw::Atof(theArgVec[++anArgIt]));
|
||||||
}
|
}
|
||||||
|
else if (aParam == "-wordwrapping")
|
||||||
|
{
|
||||||
|
const bool isWordWrapping = Draw::ParseOnOffNoIterator(theArgsNb, theArgVec, anArgIt);
|
||||||
|
aTextFormatter->SetWordWrapping(isWordWrapping);
|
||||||
|
}
|
||||||
else if (aParam == "-aspect"
|
else if (aParam == "-aspect"
|
||||||
&& anArgIt + 1 < theArgsNb)
|
&& anArgIt + 1 < theArgsNb)
|
||||||
{
|
{
|
||||||
@@ -6925,6 +6930,7 @@ vdrawtext name text
|
|||||||
[-zoom {0|1}]=0
|
[-zoom {0|1}]=0
|
||||||
[-height height]=16
|
[-height height]=16
|
||||||
[-wrapping width]=40
|
[-wrapping width]=40
|
||||||
|
[-wordwrapping {0|1}]=1
|
||||||
[-aspect {regular|bold|italic|boldItalic}]=regular
|
[-aspect {regular|bold|italic|boldItalic}]=regular
|
||||||
[-font font]=Times
|
[-font font]=Times
|
||||||
[-2d] [-perspos {X Y Z}]={0 0 0}
|
[-2d] [-perspos {X Y Z}]={0 0 0}
|
||||||
|
22
tests/bugs/modalg_7/bug24909_1
Normal file
22
tests/bugs/modalg_7/bug24909_1
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
puts "========"
|
||||||
|
puts "0024909: Modeling Algorithms - SIGSEGV in buildsweep"
|
||||||
|
puts "========"
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
pload MODELING
|
||||||
|
circle c1 0 0 0 40
|
||||||
|
mkedge e1 c1
|
||||||
|
wire w1 e1
|
||||||
|
tcopy w1 Sketch002
|
||||||
|
tcopy w1 Sketch001
|
||||||
|
renamevar w1 Sketch
|
||||||
|
trotate Sketch 0 0 0 0. 1. 0. 90
|
||||||
|
ttranslate Sketch 0. 0. 75.
|
||||||
|
trotate Sketch001 0 0 0 0. 1. 0. 90
|
||||||
|
ttranslate Sketch001 0. 0. -75.
|
||||||
|
ttranslate Sketch002 50. 0. 0.
|
||||||
|
mksweep Sketch002
|
||||||
|
setsweep -CF
|
||||||
|
addsweep Sketch001
|
||||||
|
addsweep Sketch
|
||||||
|
buildsweep Sweep
|
26
tests/bugs/modalg_7/bug24909_2
Normal file
26
tests/bugs/modalg_7/bug24909_2
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
puts "========"
|
||||||
|
puts "0024909: Modeling Algorithms - SIGSEGV in buildsweep"
|
||||||
|
puts "========"
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
pload MODELING
|
||||||
|
restore [locate_data_file bug24909_BezCurve.brep] BezCurve
|
||||||
|
ttranslate BezCurve 0 -8 0
|
||||||
|
explode BezCurve E
|
||||||
|
wire Sweep001-0-spine BezCurve_1
|
||||||
|
mksweep Sweep001-0-spine
|
||||||
|
setsweep -CF
|
||||||
|
circle Circle-curve 0 0 0 18
|
||||||
|
mkedge Circle-edge Circle-curve 0 0
|
||||||
|
wire Circle Circle-edge
|
||||||
|
trotate Circle 0 0 0 0.577350269189625731 0.577350269189625731 0.577350269189625731 120
|
||||||
|
ttranslate Circle 0 -71 203.5
|
||||||
|
addsweep Circle
|
||||||
|
circle Circle001-curve 0 0 0 16
|
||||||
|
mkedge Circle001-edge Circle001-curve 0 0
|
||||||
|
wire Circle001 Circle001-edge
|
||||||
|
trotate Circle001 0 0 0 0.577350269189625731 0.577350269189625731 0.577350269189625731 120
|
||||||
|
ttranslate Circle001 0 -71 203.5
|
||||||
|
addsweep Circle001
|
||||||
|
buildsweep Sweep001 -C -S
|
||||||
|
|
17
tests/bugs/modalg_7/bug24909_3
Normal file
17
tests/bugs/modalg_7/bug24909_3
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
puts "========"
|
||||||
|
puts "0024909: Modeling Algorithms - SIGSEGV in buildsweep"
|
||||||
|
puts "========"
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
pload MODELING
|
||||||
|
restore [locate_data_file bug24909_spine.brep]
|
||||||
|
renamevar bug24909_spine Sweep-0-spine
|
||||||
|
mksweep Sweep-0-spine
|
||||||
|
setsweep -CF
|
||||||
|
restore [locate_data_file bug24909_Sketch.brep]
|
||||||
|
renamevar bug24909_Sketch Sweep-0-section-00-Sketch
|
||||||
|
addsweep Sweep-0-section-00-Sketch
|
||||||
|
restore [locate_data_file bug24909_Sketch001.brep]
|
||||||
|
renamevar bug24909_Sketch001 Sweep-0-section-01-Sketch001
|
||||||
|
addsweep Sweep-0-section-01-Sketch001
|
||||||
|
buildsweep Sweep
|
15
tests/bugs/modalg_7/bug24909_4
Normal file
15
tests/bugs/modalg_7/bug24909_4
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
puts "========"
|
||||||
|
puts "0024909: Modeling Algorithms - SIGSEGV in buildsweep"
|
||||||
|
puts "========"
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
pload ALL
|
||||||
|
circle c1 0 0 0 40
|
||||||
|
mkedge e1 c1
|
||||||
|
wire w1 e1
|
||||||
|
line l1 0 0 0 0 0 20
|
||||||
|
mkedge e2 l1 0 10
|
||||||
|
wire w2 e2
|
||||||
|
mksweep w1
|
||||||
|
addsweep w2
|
||||||
|
buildsweep sw1
|
@@ -4,21 +4,30 @@ puts ""
|
|||||||
puts "==========="
|
puts "==========="
|
||||||
|
|
||||||
pload MODELING VISUALIZATION
|
pload MODELING VISUALIZATION
|
||||||
vinit View1
|
vinit View1 -width 500
|
||||||
vclear
|
vclear
|
||||||
vaxo
|
vaxo
|
||||||
|
|
||||||
box b1 10 0 360 10 180 40
|
box b1 10 0 460 10 180 40
|
||||||
vdisplay b1
|
vdisplay b1
|
||||||
vdrawtext t1 "Top text on plane yOz\n(not wrapped)" -pos 10 5 400 -color green -plane 1 0 0 0 1 0 -valign top -font SansFont -zoom 1
|
vdrawtext t1 "Top text on plane yOz\n(not wrapped)" -pos 10 5 500 -color green -plane 1 0 0 0 1 0 -valign top -font SansFont -zoom 1
|
||||||
|
|
||||||
box b2 10 0 240 10 130 60
|
box b2 10 0 340 10 130 60
|
||||||
vdisplay b2
|
vdisplay b2
|
||||||
vdrawtext t2 "Top text on plane yOz\n(wrapping=120)" -pos 10 5 300 -color green -wrapping 120 -plane 1 0 0 0 1 0 -valign top -font SansFont -zoom 1
|
vdrawtext t2 "Top text on plane yOz\n(wrapping=120)" -pos 10 5 400 -color green -wrapping 120 -plane 1 0 0 0 1 0 -valign top -font SansFont -zoom 1
|
||||||
|
|
||||||
box b3 10 0 60 10 60 150
|
box b3 10 0 160 10 60 150
|
||||||
vdisplay b3
|
vdisplay b3
|
||||||
vdrawtext t3 "Top text on plane yOz\n(wrapping=50)" -pos 10 5 200 -color green -wrapping 50 -plane 1 0 0 0 1 0 -valign top -font SansFont -zoom 1
|
vdrawtext t3 "Top text on plane yOz\n(wrapping=50)" -pos 10 5 300 -color green -wrapping 50 -plane 1 0 0 0 1 0 -valign top -font SansFont -zoom 1
|
||||||
|
|
||||||
|
box b4 10 200 400 10 130 100
|
||||||
|
vdisplay b4
|
||||||
|
vdrawtext t4 "Top text on plane yOz\n(wrapping=120, word wrapping disabled)" -pos 10 205 500 -color green -wrapping 120 -plane 1 0 0 0 1 0 -valign top -font SansFont -zoom 1 -wordwrapping 0
|
||||||
|
|
||||||
|
box b5 10 200 160 10 60 200
|
||||||
|
vdisplay b5
|
||||||
|
vdrawtext t5 "Top text on plane yOz\n(wrapping=50, word wrapping disabled)" -pos 10 205 350 -color green -wrapping 50 -plane 1 0 0 0 1 0 -valign top -font SansFont -zoom 1 -wordwrapping 0
|
||||||
|
|
||||||
|
|
||||||
vright
|
vright
|
||||||
vfit
|
vfit
|
||||||
|
Reference in New Issue
Block a user