1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +03:00

Compare commits

..

9 Commits

Author SHA1 Message Date
jgv
ee9138a859 Add test case 2022-08-15 13:08:17 +03:00
msv
fd5c113a03 0033100: Modeling Algorithms - XCAFDoc_Editor::RescaleGeometry does not rescale triangulations
Make XCAFDoc_Editor::RescaleGeometry to pass the flag theCopyMesh==true
in call to BRepBuilderAPI_Transform::Perform.

Correct the help of the command XRescaleGeometry.
2022-08-13 13:53:14 +03:00
ichesnok
f74f684b16 0032979: Data Exchange, RWGltf_CafWriter - support multi-threaded Draco compression
'MultiThread' field was added to structure RWGltf_DracoParameters for using multithreading.
Class CafWriter_DracoEncodingFunctor was added for multithreaded compression.
2022-08-12 19:04:03 +03:00
dpasukhi
621ed3bc36 0033095: Data Exchange, Step Import - Wrong PMI values when loading a *.stp file in m
Fixed problem with dimension tolerance values (upper/lower)
 - Update supported type for tolerance measure unit, now we can handle base class
2022-08-11 10:43:32 +03:00
mzernova
81d569625e 0033084: Visualization - Cylindrical prism is selectable only by its base when extruded in some directions
Fixed bounding boxes for Select3D_SensitiveCylinder.

Added display of Select3D_SensitiveCylinder presentation using the "vsensdis" command.
Added test vselect/bugs/bug33084.
2022-08-04 17:50:46 +03:00
ngavrilo
6072d3093c 0032992: Visualization - Font_TextFormatter should wrap words when possible 2022-08-02 17:13:03 +03:00
jgv
e1b097eb67 0033006: Modelling Algorithms - UnifySameDomain raises exception
Correct processing cases where a group of faces lies on U-periodic and V-periodic (torus-like) surface.

Add comments according to the remarks
2022-07-29 19:11:52 +03:00
jgv
92d22d7d62 0033080: Wrong projection point from ShapeAnalysis_Surface
Correct Draw command "projface" so that it really finds only projection points belonging to the face.
2022-07-29 19:10:37 +03:00
dpasukhi
1b423e3287 0033068: Draw Harness, XDEDRAW - improve XGetProperties command to work with all document labels
Upgrade DRAW function XGetProperties to work with all document labels or sequence of labels
2022-07-24 22:33:24 +03:00
36 changed files with 1096 additions and 665 deletions

View File

@@ -60,6 +60,7 @@ Font_TextFormatter::Font_TextFormatter()
myAlignY (Graphic3d_VTA_TOP),
myTabSize (8),
myWrappingWidth (0.0f),
myIsWordWrapping (true),
myLastSymbolWidth (0.0f),
myMaxSymbolWidth (0.0f),
//
@@ -249,6 +250,7 @@ void Font_TextFormatter::Format()
}
}
Standard_Utf32Char aCharPrev = 0;
for (Font_TextFormatter::Iterator aFormatterIt(*this);
aFormatterIt.More(); aFormatterIt.Next())
{
@@ -269,12 +271,30 @@ void Font_TextFormatter::Format()
Font_Rect aBndBox;
GlyphBoundingBox (aRectIter, aBndBox);
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
newLine (aLastRect, aMaxLineWidth);
}
}
aCharPrev = aCharThis;
}
myBndWidth = aMaxLineWidth;

View File

@@ -220,6 +220,12 @@ public:
//! Returns text maximum width, zero means that the text is not bounded by width
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.
inline Standard_ShortReal ResultWidth() const
{
@@ -274,6 +280,14 @@ public:
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)
protected: //! @name class auxiliary methods
@@ -288,6 +302,7 @@ protected: //! @name configuration
Graphic3d_VerticalTextAlignment myAlignY; //!< vertical alignment style
Standard_Integer myTabSize; //!< horizontal tabulation width (number of space symbols)
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 myMaxSymbolWidth; //!< maximum symbol width of the formatter string

View File

@@ -432,10 +432,8 @@ static Standard_Integer intersect(Draw_Interpretor& di, Standard_Integer n, cons
Standard_Integer aNbSegments = Intersector.NbSegments();
for (Standard_Integer i = 1; i <= aNbSegments; i++)
{
Intersector.Segment(i,S1,S2);
di << "Segment #" << i << " found.\n";
di << "Curve 1 first parameter: " << S1->FirstParameter() << " last parameter: " << S1->LastParameter() <<"\n";
di << "Curve 2 first parameter: " << S2->FirstParameter() << " last parameter: " << S2->LastParameter() <<"\n";
Intersector.Segment(i,S1,S2);
CD = new DrawTrSurf_Curve2d(S1, Draw_bleu, 30);
dout << CD;
CD = new DrawTrSurf_Curve2d(S2, Draw_violet, 30);

View File

@@ -392,7 +392,6 @@ void LineCircleGeometricIntersection(const gp_Lin2d& Line,
Standard_Real dO1O2=Line.Distance(Circle.Location());
Standard_Real R=Circle.Radius();
Standard_Real RmTol=R-Tol;
Standard_Real RpTol = R + Tol;
Standard_Real binf1,binf2=0,bsup1,bsup2=0;
//----------------------------------------------------------------
@@ -426,7 +425,7 @@ void LineCircleGeometricIntersection(const gp_Lin2d& Line,
if(dO1O2 > RmTol && !b2Sol) {
//if(dO1O2 > RmTol) {
Standard_Real dx=dO1O2;
Standard_Real dy = RpTol * RpTol - dx * dx;
Standard_Real dy=0.0; //(RpTol*RpTol-dx*dx); //Patch !!!
dy=(dy>=0.0)? Sqrt(dy) : 0.0;
dAlpha1=ATan2(dy,dx);
@@ -440,7 +439,7 @@ void LineCircleGeometricIntersection(const gp_Lin2d& Line,
else {
//------------------- Intersection Line Circle+ --------------------------
Standard_Real dx=dO1O2;
Standard_Real dy = RpTol * RpTol - dx * dx;
Standard_Real dy=R*R-dx*dx; //(RpTol*RpTol-dx*dx); //Patch !!!
dy=(dy>=0.0)? Sqrt(dy) : 0.0;
dAlpha1=ATan2(dy,dx);

View File

@@ -21,6 +21,7 @@
#include <NCollection_DataMap.hxx>
#include <OSD_FileSystem.hxx>
#include <OSD_File.hxx>
#include <OSD_Parallel.hxx>
#include <OSD_Path.hxx>
#include <OSD_Timer.hxx>
#include <RWGltf_GltfAccessorLayout.hxx>
@@ -170,6 +171,72 @@ namespace
#endif
}
#ifdef HAVE_DRACO
//! Functor for parallel execution of encoding meshes to Draco buffers.
class DracoEncodingFunctor
{
public:
DracoEncodingFunctor (const Message_ProgressRange& theProgress,
draco::Encoder& theDracoEncoder,
const std::vector<std::shared_ptr<RWGltf_CafWriter::Mesh>>& theMeshes,
std::vector<std::shared_ptr<draco::EncoderBuffer>>& theEncoderBuffers)
: myProgress(theProgress, "Draco compression", Max(1, int(theMeshes.size()))),
myDracoEncoder(&theDracoEncoder),
myRanges(0, int(theMeshes.size()) - 1),
myMeshes(&theMeshes),
myEncoderBuffers(&theEncoderBuffers)
{
for (int anIndex = 0; anIndex != int(theMeshes.size()); ++anIndex)
{
myRanges.SetValue(anIndex, myProgress.Next());
}
}
void operator () (int theMeshIndex) const
{
const std::shared_ptr<RWGltf_CafWriter::Mesh>& aCurrentMesh = myMeshes->at(theMeshIndex);
if (aCurrentMesh->NodesVec.empty())
{
return;
}
Message_ProgressScope aScope(myRanges[theMeshIndex], NULL, 1);
draco::Mesh aMesh;
writeNodesToDracoMesh (aMesh, aCurrentMesh->NodesVec);
if (!aCurrentMesh->NormalsVec.empty())
{
writeNormalsToDracoMesh (aMesh, aCurrentMesh->NormalsVec);
}
if (!aCurrentMesh->TexCoordsVec.empty())
{
writeTexCoordsToDracoMesh (aMesh, aCurrentMesh->TexCoordsVec);
}
writeIndicesToDracoMesh (aMesh, aCurrentMesh->IndicesVec);
std::shared_ptr<draco::EncoderBuffer> anEncoderBuffer = std::make_shared<draco::EncoderBuffer>();
draco::Status aStatus = myDracoEncoder->EncodeMeshToBuffer (aMesh, anEncoderBuffer.get());
if (aStatus.ok())
{
myEncoderBuffers->at(theMeshIndex) = anEncoderBuffer;
}
aScope.Next();
}
private:
Message_ProgressScope myProgress;
draco::Encoder* myDracoEncoder;
NCollection_Array1<Message_ProgressRange> myRanges;
const std::vector<std::shared_ptr<RWGltf_CafWriter::Mesh>>* myMeshes;
std::vector<std::shared_ptr<draco::EncoderBuffer>>* myEncoderBuffers;
};
#endif
//================================================================
// Function : Constructor
// Purpose :
@@ -185,7 +252,8 @@ RWGltf_CafWriter::RWGltf_CafWriter (const TCollection_AsciiString& theFile,
myToEmbedTexturesInGlb (true),
myToMergeFaces (false),
myToSplitIndices16 (false),
myBinDataLen64 (0)
myBinDataLen64 (0),
myToParallel (false)
{
myCSTrsf.SetOutputLengthUnit (1.0); // meters
myCSTrsf.SetOutputCoordinateSystem (RWMesh_CoordinateSystem_glTF);
@@ -537,6 +605,8 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument
myBinDataMap.Clear();
myBinDataLen64 = 0;
Message_ProgressScope aScope(theProgress, "Write binary data", myDracoParameters.DracoCompression ? 2 : 1);
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
std::shared_ptr<std::ostream> aBinFile = aFileSystem->OpenOStream (myBinFileNameFull, std::ios::out | std::ios::binary);
if (aBinFile.get() == NULL
@@ -546,7 +616,7 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument
return false;
}
Message_ProgressScope aPSentryBin (theProgress, "Binary data", 4);
Message_ProgressScope aPSentryBin (aScope.Next(), "Binary data", 4);
const RWGltf_GltfArrayType anArrTypes[4] =
{
RWGltf_GltfArrayType_Position,
@@ -797,7 +867,6 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument
#ifdef HAVE_DRACO
OSD_Timer aDracoTimer;
aDracoTimer.Start();
int aBuffId = 0;
draco::Encoder aDracoEncoder;
aDracoEncoder.SetAttributeQuantization (draco::GeometryAttribute::POSITION, myDracoParameters.QuantizePositionBits);
aDracoEncoder.SetAttributeQuantization (draco::GeometryAttribute::NORMAL, myDracoParameters.QuantizeNormalBits);
@@ -805,38 +874,23 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument
aDracoEncoder.SetAttributeQuantization (draco::GeometryAttribute::COLOR, myDracoParameters.QuantizeColorBits);
aDracoEncoder.SetAttributeQuantization (draco::GeometryAttribute::GENERIC, myDracoParameters.QuantizeGenericBits);
aDracoEncoder.SetSpeedOptions (myDracoParameters.CompressionLevel, myDracoParameters.CompressionLevel);
for (size_t aMeshInd = 0; aMeshInd != aMeshes.size(); ++aMeshInd)
std::vector<std::shared_ptr<draco::EncoderBuffer>> anEncoderBuffers(aMeshes.size());
DracoEncodingFunctor aFunctor (aScope.Next(), aDracoEncoder, aMeshes, anEncoderBuffers);
OSD_Parallel::For (0, int(aMeshes.size()), aFunctor, !myToParallel);
for (size_t aBuffInd = 0; aBuffInd != anEncoderBuffers.size(); ++aBuffInd)
{
const std::shared_ptr<RWGltf_CafWriter::Mesh>& aCurrentMesh = aMeshes[aMeshInd];
if (aCurrentMesh->NodesVec.empty())
if (anEncoderBuffers.at(aBuffInd).get() == nullptr)
{
continue;
}
draco::Mesh aDracoMesh;
writeNodesToDracoMesh (aDracoMesh, aCurrentMesh->NodesVec);
if (!aCurrentMesh->NormalsVec.empty())
{
writeNormalsToDracoMesh (aDracoMesh, aCurrentMesh->NormalsVec);
}
if (!aCurrentMesh->TexCoordsVec.empty())
{
writeTexCoordsToDracoMesh (aDracoMesh, aCurrentMesh->TexCoordsVec);
}
writeIndicesToDracoMesh (aDracoMesh, aCurrentMesh->IndicesVec);
draco::EncoderBuffer anEncoderBuff;
draco::Status aStatus = aDracoEncoder.EncodeMeshToBuffer (aDracoMesh, &anEncoderBuff);
if (!aStatus.ok())
{
Message::SendFail (TCollection_AsciiString("Error: mesh cannot be encoded in draco buffer."));
Message::SendFail(TCollection_AsciiString("Error: mesh not encoded in draco buffer."));
return false;
}
RWGltf_GltfBufferView aBuffViewDraco;
aBuffViewDraco.Id = aBuffId++;
aBuffViewDraco.Id = (int)aBuffInd;
aBuffViewDraco.ByteOffset = aBinFile->tellp();
aBinFile->write (anEncoderBuff.data(), std::streamsize(anEncoderBuff.size()));
const draco::EncoderBuffer& anEncoderBuff = *anEncoderBuffers.at(aBuffInd);
aBinFile->write(anEncoderBuff.data(), std::streamsize(anEncoderBuff.size()));
if (!aBinFile->good())
{
Message::SendFail (TCollection_AsciiString("File '") + myBinFileNameFull + "' cannot be written");

View File

@@ -125,6 +125,12 @@ public:
//! May reduce binary data size thanks to smaller triangle indexes.
void SetSplitIndices16 (bool theToSplit) { myToSplitIndices16 = theToSplit; }
//! Return TRUE if multithreaded optimizations are allowed; FALSE by default.
bool ToParallel() const { return myToParallel; }
//! Setup multithreaded execution.
void SetParallel (bool theToParallel) { myToParallel = theToParallel; }
//! Return Draco parameters
const RWGltf_DracoParameters& CompressionParameters() const { return myDracoParameters; }
@@ -397,6 +403,7 @@ protected:
int64_t myBinDataLen64; //!< length of binary file
std::vector<RWGltf_GltfBufferView> myBuffViewsDraco; //!< vector of buffers view with compression data
Standard_Boolean myToParallel; //!< flag to use multithreading; FALSE by default
RWGltf_DracoParameters myDracoParameters; //!< Draco parameters
};

View File

@@ -3365,17 +3365,17 @@ static void setDimObjectToXCAF(const Handle(Standard_Transient)& theEnt,
if (anUnit.IsNull()) continue;
if (!(anUnit.CaseNum(anUnit.Value()) == 1)) continue;
Handle(StepBasic_NamedUnit) NU = anUnit.NamedUnit();
STEPConstruct_UnitContext anUnitCtx;
anUnitCtx.ComputeFactors(NU);
if (aMWU->IsKind(STANDARD_TYPE(StepBasic_LengthMeasureWithUnit)) ||
aMWU->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndLengthMeasureWithUnitAndQRI)))
{
aVal = aVal * anUnitCtx.LengthFactor();
}
else if (aMWU->IsKind(STANDARD_TYPE(StepBasic_PlaneAngleMeasureWithUnit)) ||
STEPConstruct_UnitContext anUnitCtxUpperBound;
anUnitCtxUpperBound.ComputeFactors(NU);
if (aMWU->IsKind(STANDARD_TYPE(StepBasic_PlaneAngleMeasureWithUnit)) ||
aMWU->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndPlaneAngleMeasureWithUnitAndQRI)))
{
convertAngleValue(anUnitCtx, aVal);
convertAngleValue(anUnitCtxUpperBound, aVal);
}
else if ((aMWU->IsKind(STANDARD_TYPE(StepBasic_MeasureWithUnit)) && anUnitCtxUpperBound.LengthFactor() > 0.) ||
aMWU->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndLengthMeasureWithUnitAndQRI)))
{
aVal = aVal * anUnitCtxUpperBound.LengthFactor();
}
aDim3 = aVal;
@@ -3401,16 +3401,17 @@ static void setDimObjectToXCAF(const Handle(Standard_Transient)& theEnt,
if (anUnit.IsNull()) continue;
if (!(anUnit.CaseNum(anUnit.Value()) == 1)) continue;
NU = anUnit.NamedUnit();
anUnitCtx.ComputeFactors(NU);
if (aMWU->IsKind(STANDARD_TYPE(StepBasic_LengthMeasureWithUnit)) ||
aMWU->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndLengthMeasureWithUnitAndQRI)))
{
aVal = aVal * anUnitCtx.LengthFactor();
}
else if (aMWU->IsKind(STANDARD_TYPE(StepBasic_PlaneAngleMeasureWithUnit)) ||
STEPConstruct_UnitContext anUnitCtxLowerBound;
anUnitCtxLowerBound.ComputeFactors(NU);
if (aMWU->IsKind(STANDARD_TYPE(StepBasic_PlaneAngleMeasureWithUnit)) ||
aMWU->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndPlaneAngleMeasureWithUnitAndQRI)))
{
convertAngleValue(anUnitCtx, aVal);
convertAngleValue(anUnitCtxLowerBound, aVal);
}
else if ((aMWU->IsKind(STANDARD_TYPE(StepBasic_MeasureWithUnit)) && anUnitCtxLowerBound.LengthFactor() > 0.) ||
aMWU->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndLengthMeasureWithUnitAndQRI)))
{
aVal = aVal * anUnitCtxLowerBound.LengthFactor();
}
aDim2 = Abs(aVal);
}

View File

@@ -141,13 +141,18 @@ static Standard_Integer tolerance
static Standard_Integer projface
(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc < 4) { di<<"Give FACE name and X Y [Z]\n"; return 1 /* Error */; }
if (argc < 4)
{
di << "Give FACE name and X Y [Z]\n";
return 1;
}
Standard_CString arg1 = argv[1];
TopoDS_Shape Shape = DBRep::Get(arg1);
if (Shape.IsNull()) { di<<"Shape unknown : "<<arg1<<"\n"; return 1 /* Error */; }
if (Shape.ShapeType() != TopAbs_FACE) { di<<"Not a face\n"; return 1 /* Error */; }
TopoDS_Face F = TopoDS::Face (Shape);
Handle(Geom_Surface) thesurf = BRep_Tool::Surface (F); // pas locface
BRepTopAdaptor_FClass2d aClassifier (F, Precision::Confusion());
// On y va
Standard_Real X,Y,Z,U,V;
X = U = Draw::Atof (argv[2]);
@@ -167,28 +172,52 @@ static Standard_Integer projface
GeomAPI_ProjectPointOnSurf proj(P3D, thesurf, uf-du, ul+du, vf-dv, vl+dv);
Standard_Integer sol, nPSurf = proj.NbPoints();
di<<" Found "<<nPSurf<<" Points\n";
Standard_Integer anIndSol = 0, anIndMin = 0;
Standard_Real aMinDist = RealLast();
for (sol = 1; sol <= nPSurf; sol ++) {
di<<"n0 "<<sol<<" Distance "<<proj.Distance(sol);
proj.Parameters(sol, U,V);
di<<" U = "<<U<<" V = "<<V<<"\n";
TopAbs_State aStatus = aClassifier.Perform (gp_Pnt2d (U,V));
if (aStatus == TopAbs_OUT)
continue;
anIndSol++;
Standard_Real aDist = proj.Distance(sol);
di << "n0 " << anIndSol << " Distance " << aDist;
di << " U = " << U << " V = " << V << "\n";
if (aDist < aMinDist)
{
aMinDist = aDist;
anIndMin = sol;
}
// reprojection
P3D = thesurf->Value (U,V);
di<<" => reproj X = "<<P3D.X()<<" Y = "<<P3D.Y()<<" Z = "<<P3D.Z()<<"\n";
}
// Que donne ShapeTool ?
P3D.SetCoord (X,Y,Z);
Handle(ShapeAnalysis_Surface) su = new ShapeAnalysis_Surface(thesurf);
gp_Pnt2d suval = su->ValueOfUV (P3D,BRep_Tool::Tolerance(F));
suval.Coord(U,V);
di<<"** ShapeAnalysis_Surface gives U = "<<U<<" V = "<<V<<"\n";
P3D = thesurf->Value(U,V);
di<<" => reproj X = "<<P3D.X()<<" Y = "<<P3D.Y()<<" Z = "<<P3D.Z()<<"\n";
di<<" Found "<<anIndSol<<" Points\n";
} else {
di<<" Point UV U = "<<U<<" V = "<<V<<"\n";
gp_Pnt P3D = thesurf->Value(U,V);
di<<" => proj X = "<<P3D.X()<<" Y = "<<P3D.Y()<<" Z = "<<P3D.Z()<<"\n";
if (anIndMin != 0) //there is at least one suitable solution
{
di << "** Minimal distance to face = " << aMinDist << "\n";
proj.Parameters(anIndMin, U,V);
di << "** Solution of minimal distance: U = " << U << " V = " << V << "\n";
P3D = thesurf->Value(U,V);
di<<" => reproj X = "<<P3D.X()<<" Y = "<<P3D.Y()<<" Z = "<<P3D.Z()<<"\n";
}
}
else //Check 2D point
{
di << " Point UV U = " << U << " V = " << V << "\n";
TopAbs_State aStatus = aClassifier.Perform (gp_Pnt2d (U,V));
if (aStatus == TopAbs_OUT)
di << "does not belong to the face" << "\n";
else
{
gp_Pnt P3D = thesurf->Value(U,V);
di << " => proj X = " << P3D.X() << " Y = " << P3D.Y() << " Z = " << P3D.Z() << "\n";
}
}
return 0;
}
@@ -1199,7 +1228,7 @@ Standard_Integer getanacurve(Draw_Interpretor& di,
Standard_CString g = SWDRAW::GroupName();
theCommands.Add ("tolerance","shape [tolmin tolmax:real]", __FILE__,tolerance,g);
theCommands.Add ("projface","nom_face X Y [Z]", __FILE__,projface,g);
theCommands.Add ("projface","nom_face X Y [Z] - returns the closest orthogonal projection if exists", __FILE__,projface,g);
theCommands.Add ("projcurve","nom_edge | curve3d | curve3d first last + X Y Z",
__FILE__,projcurve,g);
theCommands.Add("projpcurve", "edge face tol x y z [start_param]",

View File

@@ -81,17 +81,14 @@ Handle(Select3D_SensitiveEntity) Select3D_SensitiveCylinder::GetConnected()
Select3D_BndBox3d Select3D_SensitiveCylinder::BoundingBox()
{
Standard_Real aMaxRad = Max (myBottomRadius, myTopRadius);
gp_Pnt aCenterBottom (0, 0, 0);
gp_Pnt aCenterTop (0, 0, myHeight);
aCenterBottom.Transform (myTrsf);
aCenterTop.Transform (myTrsf);
const SelectMgr_Vec3 aMinPnt (Min (aCenterBottom.X(), aCenterTop.X()) - aMaxRad,
Min (aCenterBottom.Y(), aCenterTop.Y()) - aMaxRad,
Min (aCenterBottom.Z(), aCenterTop.Z()) - aMaxRad);
const SelectMgr_Vec3 aMaxPnt (Max (aCenterBottom.X(), aCenterTop.X()) + aMaxRad,
Max (aCenterBottom.Y(), aCenterTop.Y()) + aMaxRad,
Max (aCenterBottom.Z(), aCenterTop.Z()) + aMaxRad);
return Select3D_BndBox3d (aMinPnt, aMaxPnt);
Graphic3d_Mat4d aTrsf;
myTrsf.GetMat4 (aTrsf);
Select3D_BndBox3d aBox (SelectMgr_Vec3 (-aMaxRad, -aMaxRad, 0),
SelectMgr_Vec3 (aMaxRad, aMaxRad, myHeight));
aBox.Transform (aTrsf);
return aBox;
}
//==================================================

View File

@@ -54,6 +54,18 @@ public:
//! Returns center of the cylinder with transformation applied
Standard_EXPORT virtual gp_Pnt CenterOfGeometry() const Standard_OVERRIDE;
//! Returns cylinder transformation
const gp_Trsf& Transformation() const { return myTrsf; }
//! Returns cylinder top radius
Standard_Real TopRadius() const { return myTopRadius; }
//! Returns cylinder bottom radius
Standard_Real BottomRadius() const { return myBottomRadius; }
//! Returns cylinder height
Standard_Real Height() const { return myHeight; }
protected:
gp_Trsf myTrsf; //!< cylinder transformation to apply
Standard_Real myBottomRadius; //!< cylinder bottom radius

View File

@@ -13,6 +13,7 @@
#include <SelectMgr.hxx>
#include <Geom_Circle.hxx>
#include <Graphic3d_ArrayOfPoints.hxx>
#include <Graphic3d_AspectMarker3d.hxx>
#include <Poly_Triangulation.hxx>
@@ -22,6 +23,7 @@
#include <TColgp_HArray1OfPnt.hxx>
#include <TColgp_SequenceOfPnt.hxx>
#include <Select3D_SensitiveBox.hxx>
#include <Select3D_SensitiveCylinder.hxx>
#include <Select3D_SensitiveEntity.hxx>
#include <Select3D_SensitiveFace.hxx>
#include <Select3D_SensitivePoint.hxx>
@@ -130,6 +132,43 @@ namespace
theSeqLines.Append (aPoints);
}
}
//! Fill in cylinder polylines.
static void addCylinder (Prs3d_NListOfSequenceOfPnt& theSeqLines,
const Handle(Select3D_SensitiveCylinder)& theSensCyl)
{
Handle(TColgp_HSequenceOfPnt) aVertLines[2];
aVertLines[0] = new TColgp_HSequenceOfPnt();
aVertLines[1] = new TColgp_HSequenceOfPnt();
const gp_Trsf& aTrsf = theSensCyl->Transformation();
const Standard_Real aHeight = theSensCyl->Height();
const Standard_Real anUStep = 0.1;
for (int aCircNum = 0; aCircNum < 3; aCircNum++)
{
Standard_Real aRadius = 0.5 * (2 - aCircNum) * theSensCyl->BottomRadius()
+ 0.5 * aCircNum * theSensCyl->TopRadius();
Geom_Circle aGeom (gp_Ax2(), aRadius);
Handle(TColgp_HSequenceOfPnt) aPoints = new TColgp_HSequenceOfPnt();
gp_XYZ aVec (0, 0, aHeight * 0.5 * aCircNum);
if (aCircNum != 1)
{
aVertLines[0]->Append (gp_Pnt(aGeom.Value (0).Coord() + aVec).Transformed (aTrsf));
aVertLines[1]->Append (gp_Pnt(aGeom.Value (M_PI).Coord() + aVec).Transformed (aTrsf));
}
for (Standard_Real anU = 0.0f; anU < (2.0 * M_PI + anUStep); anU += anUStep)
{
gp_Pnt aCircPnt = aGeom.Value (anU).Coord() + aVec;
aCircPnt.Transform (aTrsf);
aPoints->Append (aCircPnt);
}
theSeqLines.Append (aPoints);
}
theSeqLines.Append (aVertLines[0]);
theSeqLines.Append (aVertLines[1]);
}
}
//=======================================================================
@@ -152,6 +191,10 @@ void SelectMgr::ComputeSensitivePrs (const Handle(Graphic3d_Structure)& thePrs,
{
addBoundingBox (aSeqLines, aSensBox, theLoc);
}
else if (Handle(Select3D_SensitiveCylinder) aSensCyl = Handle(Select3D_SensitiveCylinder)::DownCast (anEnt))
{
addCylinder (aSeqLines, aSensCyl);
}
else if (Handle(Select3D_SensitiveFace) aFace = Handle(Select3D_SensitiveFace)::DownCast(anEnt))
{
Handle(TColgp_HArray1OfPnt) aSensPnts;

File diff suppressed because it is too large Load Diff

View File

@@ -390,15 +390,23 @@ void StdSelect_BRepSelectionTool::ComputeSensitive (const TopoDS_Shape& theShape
{
if (!aGeomPlanes[0].IsNull()
&& !aGeomPlanes[1].IsNull()
&& aGeomPlanes[0]->Position().Direction().IsEqual (aGeomCyl->Position().Direction(), Precision::Angular())
&& aGeomPlanes[1]->Position().Direction().IsEqual (aGeomCyl->Position().Direction(), Precision::Angular()))
&& aGeomPlanes[0]->Position().Direction().IsParallel (aGeomCyl->Position().Direction(), Precision::Angular())
&& aGeomPlanes[1]->Position().Direction().IsParallel (aGeomCyl->Position().Direction(), Precision::Angular()))
{
const gp_Cylinder aCyl = BRepAdaptor_Surface (*aFaces[aConIndex]).Cylinder();
const Standard_Real aRad = aCyl.Radius();
const Standard_Real aHeight = aGeomPlanes[0]->Location().Transformed (*aGeomPlanesLoc[0])
.Distance (aGeomPlanes[1]->Location().Transformed (*aGeomPlanesLoc[1]));
gp_Trsf aTrsf;
aTrsf.SetTransformation (aCyl.Position(), gp_Ax3());
gp_Ax3 aPos = aCyl.Position();
if (aGeomPlanes[0]->Position().IsCoplanar (aGeomPlanes[1]->Position(), Precision::Angular(), Precision::Angular()))
{
// cylinders created as a prism have an inverse vector of the cylindrical surface
aPos.SetDirection (aPos.Direction().Reversed());
}
aTrsf.SetTransformation (aPos, gp_Ax3());
Handle(Select3D_SensitiveCylinder) aSensSCyl = new Select3D_SensitiveCylinder (theOwner, aRad, aRad, aHeight, aTrsf);
theSelection->Add (aSensSCyl);
break;

View File

@@ -2500,6 +2500,11 @@ static int VDrawText (Draw_Interpretor& theDI,
}
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"
&& anArgIt + 1 < theArgsNb)
{
@@ -6925,6 +6930,7 @@ vdrawtext name text
[-zoom {0|1}]=0
[-height height]=16
[-wrapping width]=40
[-wordwrapping {0|1}]=1
[-aspect {regular|bold|italic|boldItalic}]=regular
[-font font]=Times
[-2d] [-perspos {X Y Z}]={0 0 0}

View File

@@ -515,7 +515,7 @@ static void rescaleDimensionRefLabels(const TDF_LabelSequence& theRefLabels,
if (aL.FindAttribute(TNaming_NamedShape::GetID(), aNS))
{
TopoDS_Shape aShape = aNS->Get();
theBRepTrsf.Perform(aShape, Standard_True);
theBRepTrsf.Perform(aShape, Standard_True, Standard_True);
if (!theBRepTrsf.IsDone())
{
Standard_SStream aSS;
@@ -664,7 +664,7 @@ Standard_Boolean XCAFDoc_Editor::RescaleGeometry(const TDF_Label& theLabel,
if (aNodeType == XCAFDoc_AssemblyGraph::NodeType_Part)
{
const TopoDS_Shape aShape = aShapeTool->GetShape(aLabel);
aBRepTrsf.Perform(aShape, Standard_True);
aBRepTrsf.Perform(aShape, Standard_True, Standard_True);
if (!aBRepTrsf.IsDone())
{
Standard_SStream aSS;

View File

@@ -1836,7 +1836,7 @@ void XDEDRAW::Init(Draw_Interpretor& di)
"Doc [-names]: Prints number of assembly instances",
__FILE__, XDumpNomenclature, g);
di.Add("XRescaleGeometry",
"Doc -scale factor [-root label]: Applies geometrical scale to assembly",
"Doc factor [-root label] [-force]: Applies geometrical scale to assembly",
__FILE__, XRescaleGeometry, g);
// Specialized commands

View File

@@ -19,7 +19,10 @@
#include <DDocStd.hxx>
#include <Draw.hxx>
#include <gp_Trsf.hxx>
#include <Message.hxx>
#include <NCollection_DataMap.hxx>
#include <TCollection_AsciiString.hxx>
#include <TDF_ChildIterator.hxx>
#include <TDF_Tool.hxx>
#include <TDocStd_Document.hxx>
#include <TopoDS_Compound.hxx>
@@ -934,59 +937,140 @@ static Standard_Integer updateAssemblies(Draw_Interpretor& di, Standard_Integer
return 0;
}
static Standard_Integer XGetProperties(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
static Standard_Integer XGetProperties(Draw_Interpretor& theDI,
Standard_Integer theArgc,
const char** theArgv)
{
if (argc != 3)
if (theArgc < 2)
{
di << "Syntax error: wrong number of arguments\nUse: " << argv[0] << " Doc Label\n";
theDI.PrintHelp(theArgv[0]);
return 1;
}
Handle(TDocStd_Document) aDoc;
DDocStd::GetDocument(argv[1], aDoc);
DDocStd::GetDocument(theArgv[1], aDoc);
if (aDoc.IsNull())
{
di << "Syntax error: " << argv[1] << " is not a document\n";
theDI << "Syntax error: " << theArgv[1] << " is not a document\n";
return 1;
}
TDF_Label aLabel;
TDF_Tool::Label(aDoc->GetData(), argv[2], aLabel);
// Get XDE shape tool
Handle(XCAFDoc_ShapeTool) aShapeTool = XCAFDoc_DocumentTool::ShapeTool(aDoc->Main());
Handle(TDataStd_NamedData) aNamedData = aShapeTool->GetNamedProperties(aLabel);
if (aNamedData.IsNull())
NCollection_IndexedDataMap<TCollection_AsciiString, Handle(TDataStd_NamedData)> aNameDataMap;
for (Standard_Integer anInd = 2; anInd < theArgc; anInd++)
{
di << argv[2] << " has no properties\n";
return 0;
}
aNamedData->LoadDeferredData();
if (aNamedData->HasIntegers())
{
TColStd_DataMapOfStringInteger anIntProperties = aNamedData->GetIntegersContainer();
for (TColStd_DataMapIteratorOfDataMapOfStringInteger anIter(anIntProperties); anIter.More(); anIter.Next())
TDF_Label aLabel;
const TCollection_AsciiString anEntry = theArgv[anInd];
TDF_Tool::Label(aDoc->GetData(), anEntry, aLabel);
if (aLabel.IsNull())
{
di << anIter.Key() << " : " << anIter.Value() << "\n";
TopoDS_Shape aShape = DBRep::Get(theArgv[anInd]);
if (!aShape.IsNull())
{
aLabel = aShapeTool->FindShape(aShape);
}
}
if (!aLabel.IsNull())
{
Handle(TDataStd_NamedData) aNamedData = aShapeTool->GetNamedProperties(aLabel);
if (!aNamedData.IsNull())
{
aNameDataMap.Add(anEntry, aNamedData);
}
}
else
{
Message::SendWarning() << "Warning: incorrect argument [" << theArgv[anInd] << "]" << " is not a label";
}
}
if (aNamedData->HasReals())
if (theArgc == 2)
{
TDataStd_DataMapOfStringReal aRealProperties = aNamedData->GetRealsContainer();
for (TDataStd_DataMapIteratorOfDataMapOfStringReal anIter(aRealProperties); anIter.More(); anIter.Next())
for (TDF_ChildIterator anIter(aShapeTool->Label(), Standard_True);
anIter.More(); anIter.Next())
{
di << anIter.Key() << " : " << anIter.Value() << "\n";
const TDF_Label& aLabel = anIter.Value();
TCollection_AsciiString anEntry;
TDF_Tool::Entry(aLabel, anEntry);
Handle(TDataStd_NamedData) aNamedData = aShapeTool->GetNamedProperties(aLabel);
if (!aNamedData.IsNull())
{
aNameDataMap.Add(anEntry, aNamedData);
}
}
}
if (aNamedData->HasStrings())
for (NCollection_IndexedDataMap<TCollection_AsciiString, Handle(TDataStd_NamedData)>::Iterator aNamedDataIter(aNameDataMap);
aNamedDataIter.More(); aNamedDataIter.Next())
{
TDataStd_DataMapOfStringString aStringProperties = aNamedData->GetStringsContainer();
for (TDataStd_DataMapIteratorOfDataMapOfStringString anIter(aStringProperties); anIter.More(); anIter.Next())
if (theArgc != 3)
{
di << anIter.Key() << " : " << anIter.Value() << "\n";
theDI << "Property for [" << aNamedDataIter.Key() << "]:\n";
}
const Handle(TDataStd_NamedData)& aNamedData = aNamedDataIter.Value();
aNamedData->LoadDeferredData();
if (aNamedData->HasIntegers())
{
const TColStd_DataMapOfStringInteger& anIntProperties = aNamedData->GetIntegersContainer();
for (TColStd_DataMapIteratorOfDataMapOfStringInteger anIter(anIntProperties); anIter.More(); anIter.Next())
{
theDI << anIter.Key() << " : " << anIter.Value() << "\n";
}
}
if (aNamedData->HasReals())
{
const TDataStd_DataMapOfStringReal& aRealProperties = aNamedData->GetRealsContainer();
for (TDataStd_DataMapIteratorOfDataMapOfStringReal anIter(aRealProperties); anIter.More(); anIter.Next())
{
theDI << anIter.Key() << " : " << anIter.Value() << "\n";
}
}
if (aNamedData->HasStrings())
{
const TDataStd_DataMapOfStringString& aStringProperties = aNamedData->GetStringsContainer();
for (TDataStd_DataMapIteratorOfDataMapOfStringString anIter(aStringProperties); anIter.More(); anIter.Next())
{
theDI << anIter.Key() << " : " << anIter.Value() << "\n";
}
}
if (aNamedData->HasBytes())
{
const TDataStd_DataMapOfStringByte& aByteProperties = aNamedData->GetBytesContainer();
for (TDataStd_DataMapOfStringByte::Iterator anIter(aByteProperties); anIter.More(); anIter.Next())
{
theDI << anIter.Key() << " : " << anIter.Value() << "\n";
}
}
if (aNamedData->HasArraysOfIntegers())
{
const TDataStd_DataMapOfStringHArray1OfInteger& anArrayIntegerProperties =
aNamedData->GetArraysOfIntegersContainer();
for (TDataStd_DataMapOfStringHArray1OfInteger::Iterator anIter(anArrayIntegerProperties);
anIter.More(); anIter.Next())
{
TCollection_AsciiString aMessage(anIter.Key() + " : ");
for (TColStd_HArray1OfInteger::Iterator anSubIter(anIter.Value()->Array1());
anSubIter.More(); anSubIter.Next())
{
aMessage += " ";
aMessage += anSubIter.Value();
}
theDI << aMessage << "\n";
}
}
if (aNamedData->HasArraysOfReals())
{
const TDataStd_DataMapOfStringHArray1OfReal& anArrayRealsProperties =
aNamedData->GetArraysOfRealsContainer();
for (TDataStd_DataMapOfStringHArray1OfReal::Iterator anIter(anArrayRealsProperties);
anIter.More(); anIter.Next())
{
TCollection_AsciiString aMessage(anIter.Key() + " : ");
for (TColStd_HArray1OfReal::Iterator anSubIter(anIter.Value()->Array1());
anSubIter.More(); anSubIter.Next())
{
aMessage += " ";
aMessage += anSubIter.Value();
}
theDI << aMessage << "\n";
}
}
}
@@ -1142,7 +1226,7 @@ void XDEDRAW_Shapes::InitCommands(Draw_Interpretor& di)
di.Add ("XUpdateAssemblies","Doc \t: updates assembly compounds",
__FILE__, updateAssemblies, g);
di.Add("XGetProperties", "Doc Label \t: prints named properties assigned to the Label",
di.Add("XGetProperties", "Doc [label1, label2, ...] [shape1, shape2, ...]\t: prints named properties assigned to the all document's shape labels or chosen labels of shapes",
__FILE__, XGetProperties, g);
di.Add ("XAutoNaming","Doc [0|1]\t: Disable/enable autonaming to Document",

View File

@@ -383,6 +383,7 @@ static Standard_Integer WriteGltf (Draw_Interpretor& theDI,
RWMesh_CoordinateSystem aSystemCoordSys = RWMesh_CoordinateSystem_Zup;
bool toForceUVExport = false, toEmbedTexturesInGlb = true;
bool toMergeFaces = false, toSplitIndices16 = false;
bool isParallel = false;
RWMesh_NameFormat aNodeNameFormat = RWMesh_NameFormat_InstanceOrProduct;
RWMesh_NameFormat aMeshNameFormat = RWMesh_NameFormat_Product;
RWGltf_DracoParameters aDracoParameters;
@@ -556,6 +557,10 @@ static Standard_Integer WriteGltf (Draw_Interpretor& theDI,
{
aDracoParameters.UnifiedQuantization = Draw::ParseOnOffIterator(theNbArgs, theArgVec, anArgIter);
}
else if (anArgCase == "-parallel")
{
isParallel = Draw::ParseOnOffIterator(theNbArgs, theArgVec, anArgIter);
}
else
{
Message::SendFail() << "Syntax error at '" << theArgVec[anArgIter] << "'";
@@ -587,6 +592,7 @@ static Standard_Integer WriteGltf (Draw_Interpretor& theDI,
aWriter.SetToEmbedTexturesInGlb (toEmbedTexturesInGlb);
aWriter.SetMergeFaces (toMergeFaces);
aWriter.SetSplitIndices16 (toSplitIndices16);
aWriter.SetParallel(isParallel);
aWriter.SetCompressionParameters(aDracoParameters);
aWriter.ChangeCoordinateSystemConverter().SetInputLengthUnit (aScaleFactorM);
aWriter.ChangeCoordinateSystemConverter().SetInputCoordinateSystem (aSystemCoordSys);
@@ -2450,7 +2456,7 @@ void XSDRAWSTLVRML::InitCommands (Draw_Interpretor& theCommands)
"\n\t\t: [-meshNameFormat {empty|product|instance|instOrProd|prodOrInst|prodAndInst|verbose}]=product"
"\n\t\t: [-draco]=0 [-compressionLevel {0-10}]=7 [-quantizePositionBits Value]=14 [-quantizeNormalBits Value]=10"
"\n\t\t: [-quantizeTexcoordBits Value]=12 [-quantizeColorBits Value]=8 [-quantizeGenericBits Value]=12"
"\n\t\t: [-unifiedQuantization]=0"
"\n\t\t: [-unifiedQuantization]=0 [-parallel]=0"
"\n\t\t: Write XDE document into glTF file."
"\n\t\t: -trsfFormat preferred transformation format"
"\n\t\t: -systemCoordSys system coordinate system; Zup when not specified"
@@ -2460,7 +2466,7 @@ void XSDRAWSTLVRML::InitCommands (Draw_Interpretor& theCommands)
"\n\t\t: -texturesSeparate write textures to separate files"
"\n\t\t: -nodeNameFormat name format for Nodes"
"\n\t\t: -meshNameFormat name format for Meshes"
"\n\t\t: -draco use Draco compression 3D geometric meshes"
"\n\t\t: -draco use Draco compression 3D geometric meshes"
"\n\t\t: -compressionLevel draco compression level [0-10] (by default 7), a value of 0 will apply sequential encoding and preserve face order"
"\n\t\t: -quantizePositionBits quantization bits for position attribute when using Draco compression (by default 14)"
"\n\t\t: -quantizeNormalBits quantization bits for normal attribute when using Draco compression (by default 10)"
@@ -2468,7 +2474,8 @@ void XSDRAWSTLVRML::InitCommands (Draw_Interpretor& theCommands)
"\n\t\t: -quantizeColorBits quantization bits for color attribute when using Draco compression (by default 8)"
"\n\t\t: -quantizeGenericBits quantization bits for skinning attribute (joint indices and joint weights)"
"\n and custom attributes when using Draco compression (by default 12)"
"\n\t\t: -unifiedQuantization quantization is applied on each primitive separately if this option is false",
"\n\t\t: -unifiedQuantization quantization is applied on each primitive separately if this option is false"
"\n\t\t: -parallel use multithreading for Draco compression",
__FILE__, WriteGltf, g);
theCommands.Add ("writegltf",
"writegltf shape file",

View File

@@ -10,7 +10,7 @@ stepread [locate_data_file bug27894_usd_raises_Standard_NullObject.stp] a *
renamevar a_1 a
unifysamedom result a
checknbshapes result -m UnifySameDomain -face 12 -edge 29
checknbshapes result -m UnifySameDomain -face 12 -edge 30
checkshape result

View File

@@ -9,7 +9,7 @@ unifysamedom result a
checkshape result
checknbshapes result -solid 1 -shell 1 -face 21 -wire 22 -edge 58 -vertex 38
checknbshapes result -solid 1 -shell 1 -face 21 -wire 22 -edge 57 -vertex 37
set tolres [checkmaxtol result]

22
tests/bugs/heal/bug33006 Normal file
View File

@@ -0,0 +1,22 @@
puts "========================================="
puts "OCC33006: UnifySameDomain raises exceptio"
puts "========================================="
puts ""
restore [locate_data_file bug33006.brep] a
unifysamedom result a
checkshape result
checknbshapes result -t -solid 1 -shell 1 -face 3 -wire 4 -edge 11 -vertex 4
set tolres [checkmaxtol result]
if { ${tolres} > 0.004416} {
puts "Error: bad tolerance of result"
}
checkprops result -s 77917.5 -v 195647
checkview -display result -2d -path ${imagedir}/${test_image}.png

View File

@@ -1,29 +0,0 @@
puts "============"
puts "OCC30217_1"
puts "============"
puts ""
#########################################################################
# Intersection between a circle and a line not detected (2d)
#########################################################################
2ddrseg s2 -80.461134694338 53.07587187722 -31.501464018476 67.029737602069
circle c2 -18.339655323916 20.849340929486 48.019394466707
# Set tolerance.
set tol_abs 1.0e-7
set tol_rel 1.0e-2
# Set reference data.
set param11 1.8484218380721342
set param12 1.8484627151687805
set param21 50.908401295062035
set param22 50.909328431594709
set info [2dintersect c2 s2 -tol 1e-8]
regexp {Curve 1 first parameter: +([-0-9.+eE]+) last parameter: +([-0-9.+eE]+)} ${info} full curve1p1 curve1p2
regexp {Curve 2 first parameter: +([-0-9.+eE]+) last parameter: +([-0-9.+eE]+)} ${info} full curve2p1 curve2p2
checkreal "Curve 1 param 1" ${curve1p1} ${param11} ${tol_abs} ${tol_rel}
checkreal "Curve 1 param 2" ${curve1p2} ${param12} ${tol_abs} ${tol_rel}
checkreal "Curve 2 param 1" ${curve2p1} ${param21} ${tol_abs} ${tol_rel}
checkreal "Curve 2 param 2" ${curve2p2} ${param22} ${tol_abs} ${tol_rel}

View File

@@ -1,26 +0,0 @@
puts "============"
puts "OCC30217_2"
puts "============"
puts ""
#########################################################################
# Intersection between a circle and a line not detected (3d)
#########################################################################
set tol_abs 2.e-7
drseg s -80.461134694338 53.07587187722 0.0 -31.501464018476 67.029737602069 0.0
circle c -18.339655323916 20.849340929486 0.0 48.019394466707
set info1 [extrema c s]
if {[regexp "ext" ${info1}] != 1} {
puts "Error : No intersection detected"
} else {
puts "OK: Intersection are detected"
}
# Distance check
set info2 [dump ext_1]
regexp "Parameters : 0 +(\[-0-9*\.+eE\]+)" $info2 full extLength
if { ${extLength} > $tol_abs } {
puts "Error: bad distance poins obtained"
} else {
puts "OK: good distance between obtained points"
}

View File

@@ -1,28 +0,0 @@
puts "============"
puts "OCC30217_3"
puts "============"
puts ""
#########################################################################
# Intersection between a circle and a line not detected (3d)
#########################################################################
set tol_abs 2.e-7
drseg s -31.501464018476 67.029737602069 -10.0 -31.501464018476 67.029737602069 0.0
circle c -18.339655323916 20.849340929486 0.0 48.019394466707
set info1 [extrema c s]
if {[regexp "ext" ${info1}] != 1} {
puts "Error : No intersection detected"
} else {
puts "OK: Intersection are detected"
}
# Distance check
set infoext1 [dump ext_1]
regexp "Parameters : 0 +(\[-0-9*\.+eE\]+)" $infoext1 full ext1Length ext2Length
if { $ext1Length > $tol_abs || $ext2Length > $tol_abs } {
puts "Error: bad distance poins obtained"
} else {
puts "OK: good distance between obtained points"
}

View File

@@ -1,20 +0,0 @@
puts "============"
puts "OCC30217_4"
puts "============"
puts ""
#########################################################################
# Intersection between a circle and a line not detected (3d)
#########################################################################
set ExpDist 5
circle c1 0 0 0 0 0 1 5
line c2 0 0 0 0 0 1
trim c2 c2 -1 -5e-8
regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c1 c2] full aDist1
checkreal Distance $aDist1 $ExpDist 1.0e-7 0.0
regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c2 c1] full aDist2
checkreal Distance $aDist2 $ExpDist 1.0e-7 0.0

View File

@@ -0,0 +1,30 @@
puts "=================================="
puts "OCC32670: BOP fuse unstable result"
puts "=================================="
puts ""
restore [locate_data_file bug32670.brep] Curve_parabolic
ellipse ell 0 0 0 0 0 1 1.6285714285714286 1.6285714285714286
mkedge ee ell
wire ww ee
pipe Pipe_1 ww Curve_parabolic
ssolid Pipe_1 a
pcylinder b 7 10
explode a f
explode b f
donly a_7 b_1
bop a_7 b_1
bopsection result
checknbshapes result -t -vertex 10 -edge 7
set tolres [checkmaxtol result]
if { ${tolres} > 0.0016} {
puts "Error: bad tolerance of result"
}
checkprops result -l 26.7184
checkview -display result -2d -path ${imagedir}/${test_image}.png

View File

@@ -0,0 +1,30 @@
puts "================================"
puts "OCC33080: Wrong projection point"
puts "================================"
puts ""
restore [locate_data_file bug33080.brep] a
set log [projface a -0.21115 1.17515 1.4504]
regexp {n0 1 Distance ([0-9+-.eE]*)} $log full dist
if { $dist > 0.1240364 } {
puts "Error distance: projection is wrong"
}
regexp {U = ([0-9+-.eE]*)} $log full uparam
if { $uparam < 869.174321 || $uparam > 869.174322 } {
puts "Error point: projection is wrong"
}
regexp {V = ([0-9+-.eE]*)} $log full vparam
if { $vparam < 732.602489 || $vparam > 732.602490 } {
puts "Error point: projection is wrong"
}
if {![regexp "Found 1 Points" $log]} {
puts "Error number of points: projection is wrong"
}

32
tests/bugs/step/bug33095 Normal file
View File

@@ -0,0 +1,32 @@
puts "======="
puts "0033095: Data Exchange, Step Import - Wrong PMI values when loading a *.stp file in m"
puts "======="
pload OCAF
catch { Close D_mm }
catch { Close D_m }
# Read file in mm
ReadStep D_mm [locate_data_file bug33095_cad_with_pmi.stp]
set plusMinusTol_mm [XGetDimensionPlusMinusTol D_mm 0:1:4:77]
# Read file in m
XNewDoc D_m
XSetLengthUnit D_m m
ReadStep D_m [locate_data_file bug33095_cad_with_pmi.stp]
set plusMinusTol_m [XGetDimensionPlusMinusTol D_m 0:1:4:77]
# Checking
regexp {lower +([-0-9.+eE]+) +upper +([-0-9.+eE]+)} $plusMinusTol_m full lower_m upper_m
regexp {lower +([-0-9.+eE]+) +upper +([-0-9.+eE]+)} $plusMinusTol_mm full lower_mm upper_mm
set lower_m_to_mm [expr {$lower_m * 1000}]
set upper_m_to_mm [expr {$upper_m * 1000}]
if {[expr {abs($lower_m_to_mm - $lower_mm)}] > 1e-2} {
puts "Error: incorrect scaling lower toleranse value"
}
if {[expr {abs($upper_m_to_mm - $upper_mm)}] > 1e-2} {
puts "Error: incorrect scaling upper toleranse value"
}

15
tests/bugs/xde/bug33100 Normal file
View File

@@ -0,0 +1,15 @@
puts "0033100: Modeling Algorithms - XCAFDoc_Editor::RescaleGeometry does not rescale triangulations"
pload DCAF
Close d -silent
ReadStep d [locate_data_file "bug33100_window.step"]
XGetOneShape a d
set ref_diag [eval distpp [bounding a]]
XRescaleGeometry d 1000
XGetOneShape a d
set diag [eval distpp [bounding a]]
checkreal "bounding box diagonal" $diag [expr $ref_diag * 1000] 0 0.001

View File

@@ -0,0 +1,13 @@
puts "========"
puts "0032867: Data Exchange - Implement Draco compression for writing glTF"
puts "Test case exporting model into glb (binary glTF) file."
puts "========"
Close D0 -silent
ReadGltf D0 [locate_data_file bug32867_bull.glb]
set aGltfFile1 "${imagedir}/${casename}_tmp1.glb"
WriteGltf D0 "$aGltfFile1" -draco on -parallel
ReadGltf D "$aGltfFile1"

View File

@@ -12,45 +12,45 @@ set ref_data {
0:1:1:2:2 Shape.5
0:1:4:1 GeomTolerance.5.1 ( N "Feature Control Frame (4)" T 12 TV 0, V 0.254 )
0:1:1:2:7 Shape.10
0:1:4:6 Dimension.10.1 ( N "linear distance" T 2, V 20.827999999999996, VL 2.54, VU 2.54, P 0 )
0:1:4:6 Dimension.10.1 ( N "linear distance" T 2, V 20.827999999999996, VL 64.515999999999991, VU 64.515999999999991, P 0 )
0:1:1:2:19 Shape.22
0:1:4:39 Dimension.22.1 ( N "diameter" T 15, V 11.1252, VL 2.54, VU 2.54, P 0 )
0:1:4:39 Dimension.22.1 ( N "diameter" T 15, V 11.1252, VL 64.515999999999991, VU 64.515999999999991, P 0 )
0:1:4:35 GeomTolerance.22.1 ( N "Feature Control Frame (40)" T 10 TV 1, V 1.27, MR 1 )
0:1:4:36 Datum.22.1.1 ( N "Feature Control Frame (40)" )
0:1:4:37 Datum.22.1.2 ( N "Feature Control Frame (40)", M 15 )
0:1:4:38 Datum.22.1.3 ( N "Feature Control Frame (40)", M 15 )
0:1:1:2:20 Shape.23
0:1:4:39 Dimension.23.1 ( N "diameter" T 15, V 11.1252, VL 2.54, VU 2.54, P 0 )
0:1:4:39 Dimension.23.1 ( N "diameter" T 15, V 11.1252, VL 64.515999999999991, VU 64.515999999999991, P 0 )
0:1:4:35 GeomTolerance.23.1 ( N "Feature Control Frame (40)" T 10 TV 1, V 1.27, MR 1 )
0:1:4:36 Datum.23.1.1 ( N "Feature Control Frame (40)" )
0:1:4:37 Datum.23.1.2 ( N "Feature Control Frame (40)", M 15 )
0:1:4:38 Datum.23.1.3 ( N "Feature Control Frame (40)", M 15 )
0:1:1:2:21 Shape.24
0:1:4:39 Dimension.24.1 ( N "diameter" T 15, V 11.1252, VL 2.54, VU 2.54, P 0 )
0:1:4:39 Dimension.24.1 ( N "diameter" T 15, V 11.1252, VL 64.515999999999991, VU 64.515999999999991, P 0 )
0:1:4:35 GeomTolerance.24.1 ( N "Feature Control Frame (40)" T 10 TV 1, V 1.27, MR 1 )
0:1:4:36 Datum.24.1.1 ( N "Feature Control Frame (40)" )
0:1:4:37 Datum.24.1.2 ( N "Feature Control Frame (40)", M 15 )
0:1:4:38 Datum.24.1.3 ( N "Feature Control Frame (40)", M 15 )
0:1:1:2:22 Shape.25
0:1:4:39 Dimension.25.1 ( N "diameter" T 15, V 11.1252, VL 2.54, VU 2.54, P 0 )
0:1:4:39 Dimension.25.1 ( N "diameter" T 15, V 11.1252, VL 64.515999999999991, VU 64.515999999999991, P 0 )
0:1:4:35 GeomTolerance.25.1 ( N "Feature Control Frame (40)" T 10 TV 1, V 1.27, MR 1 )
0:1:4:36 Datum.25.1.1 ( N "Feature Control Frame (40)" )
0:1:4:37 Datum.25.1.2 ( N "Feature Control Frame (40)", M 15 )
0:1:4:38 Datum.25.1.3 ( N "Feature Control Frame (40)", M 15 )
0:1:1:2:28 Shape.31
0:1:4:6 Dimension.31.1 ( N "linear distance" T 2, V 20.827999999999996, VL 2.54, VU 2.54, P 0 )
0:1:4:6 Dimension.31.1 ( N "linear distance" T 2, V 20.827999999999996, VL 64.515999999999991, VU 64.515999999999991, P 0 )
0:1:4:2 GeomTolerance.31.1 ( N "Feature Control Frame (24)" T 12 TV 0, V 0.76200000000000001 )
0:1:4:3 Datum.31.1.1 ( N "Feature Control Frame (24)" )
0:1:4:4 Datum.31.1.2 ( N "Feature Control Frame (24)" )
0:1:4:5 Datum.31.1.3 ( N "Feature Control Frame (24)" )
0:1:1:2:39 Shape.42
0:1:4:14 Dimension.42.1 ( N "diameter" T 15, V 50.799999999999997, VL 2.54, VU 2.54, P 0 )
0:1:4:14 Dimension.42.1 ( N "diameter" T 15, V 50.799999999999997, VL 64.515999999999991, VU 64.515999999999991, P 0 )
0:1:4:15 GeomTolerance.42.1 ( N "Feature Control Frame (16)" T 10 TV 1, V 1.524 )
0:1:4:16 Datum.42.1.1 ( N "Feature Control Frame (16)" )
0:1:4:17 Datum.42.1.2 ( N "Feature Control Frame (16)" )
0:1:4:18 Datum.42.1.3 ( N "Feature Control Frame (16)" )
0:1:1:2:40 Shape.43
0:1:4:14 Dimension.43.1 ( N "diameter" T 15, V 50.799999999999997, VL 2.54, VU 2.54, P 0 )
0:1:4:14 Dimension.43.1 ( N "diameter" T 15, V 50.799999999999997, VL 64.515999999999991, VU 64.515999999999991, P 0 )
0:1:4:15 GeomTolerance.43.1 ( N "Feature Control Frame (16)" T 10 TV 1, V 1.524 )
0:1:4:16 Datum.43.1.1 ( N "Feature Control Frame (16)" )
0:1:4:17 Datum.43.1.2 ( N "Feature Control Frame (16)" )
@@ -58,7 +58,7 @@ set ref_data {
0:1:1:2:48 Shape.51
0:1:4:30 Dimension.51.1 ( N "linear distance" T 2, V 19.049999999999997, P 0 )
0:1:1:2:49 Shape.52
0:1:4:19 Dimension.52.1 ( N "diameter" T 15, V 38.099999999999994, VL 2.54, VU 2.54, P 0 )
0:1:4:19 Dimension.52.1 ( N "diameter" T 15, V 38.099999999999994, VL 64.515999999999991, VU 64.515999999999991, P 0 )
0:1:4:20 GeomTolerance.52.1 ( N "Feature Control Frame (18)" T 10 TV 1, V 2.032 )
0:1:4:21 Datum.52.1.1 ( N "Feature Control Frame (18)" )
0:1:4:22 Datum.52.1.2 ( N "Feature Control Frame (18)" )
@@ -68,7 +68,7 @@ set ref_data {
0:1:4:27 Datum.52.2.2 ( N "Feature Control Frame (20)" )
0:1:4:28 Datum.52.2.3 ( N "Feature Control Frame (20)" )
0:1:1:2:50 Shape.53
0:1:4:19 Dimension.53.1 ( N "diameter" T 15, V 38.099999999999994, VL 2.54, VU 2.54, P 0 )
0:1:4:19 Dimension.53.1 ( N "diameter" T 15, V 38.099999999999994, VL 64.515999999999991, VU 64.515999999999991, P 0 )
0:1:4:24 Dimension.53.2 ( N "linear distance" T 2, V 38.099999999999994, P 0 )
0:1:4:20 GeomTolerance.53.1 ( N "Feature Control Frame (18)" T 10 TV 1, V 2.032 )
0:1:4:21 Datum.53.1.1 ( N "Feature Control Frame (18)" )
@@ -79,49 +79,49 @@ set ref_data {
0:1:4:27 Datum.53.2.2 ( N "Feature Control Frame (20)" )
0:1:4:28 Datum.53.2.3 ( N "Feature Control Frame (20)" )
0:1:1:2:51 Shape.54
0:1:4:29 Dimension.54.1 ( N "diameter" T 15, V 15.875, VL 2.54, VU 2.54, P 0 )
0:1:4:29 Dimension.54.1 ( N "diameter" T 15, V 15.875, VL 64.515999999999991, VU 64.515999999999991, P 0 )
0:1:4:31 GeomTolerance.54.1 ( N "Feature Control Frame (36)" T 10 TV 1, V 1.27, MR 1 )
0:1:4:32 Datum.54.1.1 ( N "Feature Control Frame (36)" )
0:1:4:33 Datum.54.1.2 ( N "Feature Control Frame (36)" )
0:1:4:34 Datum.54.1.3 ( N "Feature Control Frame (36)" )
0:1:1:2:52 Shape.55
0:1:4:29 Dimension.55.1 ( N "diameter" T 15, V 15.875, VL 2.54, VU 2.54, P 0 )
0:1:4:29 Dimension.55.1 ( N "diameter" T 15, V 15.875, VL 64.515999999999991, VU 64.515999999999991, P 0 )
0:1:4:31 GeomTolerance.55.1 ( N "Feature Control Frame (36)" T 10 TV 1, V 1.27, MR 1 )
0:1:4:32 Datum.55.1.1 ( N "Feature Control Frame (36)" )
0:1:4:33 Datum.55.1.2 ( N "Feature Control Frame (36)" )
0:1:4:34 Datum.55.1.3 ( N "Feature Control Frame (36)" )
0:1:1:2:53 Shape.56
0:1:4:29 Dimension.56.1 ( N "diameter" T 15, V 15.875, VL 2.54, VU 2.54, P 0 )
0:1:4:29 Dimension.56.1 ( N "diameter" T 15, V 15.875, VL 64.515999999999991, VU 64.515999999999991, P 0 )
0:1:4:31 GeomTolerance.56.1 ( N "Feature Control Frame (36)" T 10 TV 1, V 1.27, MR 1 )
0:1:4:32 Datum.56.1.1 ( N "Feature Control Frame (36)" )
0:1:4:33 Datum.56.1.2 ( N "Feature Control Frame (36)" )
0:1:4:34 Datum.56.1.3 ( N "Feature Control Frame (36)" )
0:1:1:2:54 Shape.57
0:1:4:29 Dimension.57.1 ( N "diameter" T 15, V 15.875, VL 2.54, VU 2.54, P 0 )
0:1:4:29 Dimension.57.1 ( N "diameter" T 15, V 15.875, VL 64.515999999999991, VU 64.515999999999991, P 0 )
0:1:4:31 GeomTolerance.57.1 ( N "Feature Control Frame (36)" T 10 TV 1, V 1.27, MR 1 )
0:1:4:32 Datum.57.1.1 ( N "Feature Control Frame (36)" )
0:1:4:33 Datum.57.1.2 ( N "Feature Control Frame (36)" )
0:1:4:34 Datum.57.1.3 ( N "Feature Control Frame (36)" )
0:1:1:2:55 Shape.58
0:1:4:29 Dimension.58.1 ( N "diameter" T 15, V 15.875, VL 2.54, VU 2.54, P 0 )
0:1:4:29 Dimension.58.1 ( N "diameter" T 15, V 15.875, VL 64.515999999999991, VU 64.515999999999991, P 0 )
0:1:4:31 GeomTolerance.58.1 ( N "Feature Control Frame (36)" T 10 TV 1, V 1.27, MR 1 )
0:1:4:32 Datum.58.1.1 ( N "Feature Control Frame (36)" )
0:1:4:33 Datum.58.1.2 ( N "Feature Control Frame (36)" )
0:1:4:34 Datum.58.1.3 ( N "Feature Control Frame (36)" )
0:1:1:2:56 Shape.59
0:1:4:29 Dimension.59.1 ( N "diameter" T 15, V 15.875, VL 2.54, VU 2.54, P 0 )
0:1:4:29 Dimension.59.1 ( N "diameter" T 15, V 15.875, VL 64.515999999999991, VU 64.515999999999991, P 0 )
0:1:4:31 GeomTolerance.59.1 ( N "Feature Control Frame (36)" T 10 TV 1, V 1.27, MR 1 )
0:1:4:32 Datum.59.1.1 ( N "Feature Control Frame (36)" )
0:1:4:33 Datum.59.1.2 ( N "Feature Control Frame (36)" )
0:1:4:34 Datum.59.1.3 ( N "Feature Control Frame (36)" )
0:1:1:2:57 Shape.60
0:1:4:29 Dimension.60.1 ( N "diameter" T 15, V 15.875, VL 2.54, VU 2.54, P 0 )
0:1:4:29 Dimension.60.1 ( N "diameter" T 15, V 15.875, VL 64.515999999999991, VU 64.515999999999991, P 0 )
0:1:4:31 GeomTolerance.60.1 ( N "Feature Control Frame (36)" T 10 TV 1, V 1.27, MR 1 )
0:1:4:32 Datum.60.1.1 ( N "Feature Control Frame (36)" )
0:1:4:33 Datum.60.1.2 ( N "Feature Control Frame (36)" )
0:1:4:34 Datum.60.1.3 ( N "Feature Control Frame (36)" )
0:1:1:2:58 Shape.61
0:1:4:29 Dimension.61.1 ( N "diameter" T 15, V 15.875, VL 2.54, VU 2.54, P 0 )
0:1:4:29 Dimension.61.1 ( N "diameter" T 15, V 15.875, VL 64.515999999999991, VU 64.515999999999991, P 0 )
0:1:4:31 GeomTolerance.61.1 ( N "Feature Control Frame (36)" T 10 TV 1, V 1.27, MR 1 )
0:1:4:32 Datum.61.1.1 ( N "Feature Control Frame (36)" )
0:1:4:33 Datum.61.1.2 ( N "Feature Control Frame (36)" )
@@ -137,28 +137,28 @@ set ref_data {
0:1:1:2:129 Shape.132
0:1:4:1 GeomTolerance.132.1 ( N "Feature Control Frame (4)" T 12 TV 0, V 0.254 )
0:1:1:2:134 Shape.137
0:1:4:40 Dimension.137.1 ( N "diameter" T 15, V 27.050999999999998, VL 2.54, VU 2.54, P 0 )
0:1:4:40 Dimension.137.1 ( N "diameter" T 15, V 27.050999999999998, VL 64.515999999999991, VU 64.515999999999991, P 0 )
0:1:4:41 GeomTolerance.137.1 ( N "Feature Control Frame (30)" T 9 TV 1, V 0.254 )
0:1:4:42 Datum.137.1.1 ( N "Feature Control Frame (30)" )
0:1:1:2:135 Shape.138
0:1:4:40 Dimension.138.1 ( N "diameter" T 15, V 27.050999999999998, VL 2.54, VU 2.54, P 0 )
0:1:4:40 Dimension.138.1 ( N "diameter" T 15, V 27.050999999999998, VL 64.515999999999991, VU 64.515999999999991, P 0 )
0:1:4:41 GeomTolerance.138.1 ( N "Feature Control Frame (30)" T 9 TV 1, V 0.254 )
0:1:4:42 Datum.138.1.1 ( N "Feature Control Frame (30)" )
0:1:1:2:153 Shape.156
0:1:4:7 Dimension.156.1 ( N "diameter" T 15, V 11.1252, VL 2.54, VU 2.54, P 0 )
0:1:4:7 Dimension.156.1 ( N "diameter" T 15, V 11.1252, VL 64.515999999999991, VU 64.515999999999991, P 0 )
0:1:4:9 GeomTolerance.156.1 ( N "Feature Control Frame (10)" T 9 TV 1, V 0.254 )
0:1:4:10 Datum.156.1.1 ( N "Feature Control Frame (10)" )
0:1:1:2:154 Shape.157
0:1:4:7 Dimension.157.1 ( N "diameter" T 15, V 11.1252, VL 2.54, VU 2.54, P 0 )
0:1:4:7 Dimension.157.1 ( N "diameter" T 15, V 11.1252, VL 64.515999999999991, VU 64.515999999999991, P 0 )
0:1:4:9 GeomTolerance.157.1 ( N "Feature Control Frame (10)" T 9 TV 1, V 0.254 )
0:1:4:10 Datum.157.1.1 ( N "Feature Control Frame (10)" )
0:1:1:2:155 Shape.158
0:1:4:8 Dimension.158.1 ( N "diameter" T 15, V 11.1252, VL 2.54, VU 2.54, P 0 )
0:1:4:8 Dimension.158.1 ( N "diameter" T 15, V 11.1252, VL 64.515999999999991, VU 64.515999999999991, P 0 )
0:1:4:11 GeomTolerance.158.1 ( N "Feature Control Frame (11)" T 10 TV 1, V 0.50800000000000001 )
0:1:4:12 Datum.158.1.1 ( N "Feature Control Frame (11)" )
0:1:4:13 Datum.158.1.2 ( N "Feature Control Frame (11)" )
0:1:1:2:156 Shape.159
0:1:4:8 Dimension.159.1 ( N "diameter" T 15, V 11.1252, VL 2.54, VU 2.54, P 0 )
0:1:4:8 Dimension.159.1 ( N "diameter" T 15, V 11.1252, VL 64.515999999999991, VU 64.515999999999991, P 0 )
0:1:4:11 GeomTolerance.159.1 ( N "Feature Control Frame (11)" T 10 TV 1, V 0.50800000000000001 )
0:1:4:12 Datum.159.1.1 ( N "Feature Control Frame (11)" )
0:1:4:13 Datum.159.1.2 ( N "Feature Control Frame (11)" )

View File

@@ -10,9 +10,9 @@ set ref_data {
NbOfDatumTarget : 2
0:1:1:2:2 Shape.5
0:1:4:14 Dimension.5.1 ( N "linear distance" T 2, V 127, VL 2.54, VU 2.54, P 0 )
0:1:4:14 Dimension.5.1 ( N "linear distance" T 2, V 127, VL 64.515999999999991, VU 64.515999999999991, P 0 )
0:1:1:2:8 Shape.11
0:1:4:14 Dimension.11.1 ( N "linear distance" T 2, V 127, VL 2.54, VU 2.54, P 0 )
0:1:4:14 Dimension.11.1 ( N "linear distance" T 2, V 127, VL 64.515999999999991, VU 64.515999999999991, P 0 )
0:1:1:2:9 Shape.12
0:1:4:1 GeomTolerance.12.1 ( N "Feature Control Frame (11)" T 13 TV 0, V 0.127 )
0:1:1:2:66 Shape.69
@@ -57,9 +57,9 @@ set ref_data {
0:1:4:7 GeomTolerance.203.1 ( N "Feature Control Frame (4)" T 2 TV 0, V 0.050799999999999998 )
0:1:4:8 Datum.203.1.1 ( N "Feature Control Frame (4)" )
0:1:1:2:206 Shape.209
0:1:4:11 Dimension.209.1 ( N "linear distance" T 2, V 254, VL 2.54, VU 2.54, P 0 )
0:1:4:11 Dimension.209.1 ( N "linear distance" T 2, V 254, VL 64.515999999999991, VU 64.515999999999991, P 0 )
0:1:1:2:207 Shape.210
0:1:4:11 Dimension.210.1 ( N "linear distance" T 2, V 254, VL 2.54, VU 2.54, P 0 )
0:1:4:11 Dimension.210.1 ( N "linear distance" T 2, V 254, VL 64.515999999999991, VU 64.515999999999991, P 0 )
0:1:1:3:1 Shape.211
0:1:4:1 GeomTolerance.211.1 ( N "Feature Control Frame (11)" T 13 TV 0, V 0.127 )
}

View File

@@ -1,5 +1,3 @@
puts "TODO OCC29040 ALL: Error: the history of the removed edges is incorrect"
puts "======="
puts "0028913"
puts "======="

View File

@@ -1,5 +1,3 @@
puts "TODO OCC29040 ALL: Error: the history of the removed edges is incorrect"
puts "======="
puts "0028913"
puts "======="

View File

@@ -4,21 +4,30 @@ puts ""
puts "==========="
pload MODELING VISUALIZATION
vinit View1
vinit View1 -width 500
vclear
vaxo
box b1 10 0 360 10 180 40
box b1 10 0 460 10 180 40
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
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
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
vfit

View File

@@ -0,0 +1,26 @@
puts "============="
puts "0033084: Visualization - Cylindrical prism is selectable only by its base when extruded in some directions"
puts "============="
pload MODELING VISUALIZATION
profile p1 c 1 360 ww
mkplane f p1
prism pr1 f 0 0 2
prism pr2 f 0 0 -2
ttranslate pr1 1 1 1
ttranslate pr2 -1 -1 -1
vinit View1
vclear
vaxo
vdisplay -dispmode 1 pr1 pr2
vfit
vsensdis
vdump $imagedir/${casename}_prism_sensitive_prs.png
vmoveto 130 330
if { ![string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cylinder should be detected" }
vmoveto 270 130
if { ![string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cylinder should be detected" }