View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0029670 | Community | OCCT:DRAW | public | 2018-04-03 14:31 | 2019-01-28 10:54 |
Reporter | eryar | Assigned To | bugmaster | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Platform | Windows | OS | VC++ 2013 | ||
Product Version | 7.2.0 | ||||
Target Version | 7.4.0 | Fixed in Version | 7.4.0 | ||
Summary | 0029670: Draw Harness - vtrihedron xaxis zaxis is wrong | ||||
Description | When I use the command "vtrihedron" to show a frenet frame, it is wrong in the occ7.2.0, but is correct in occ6.9.1. | ||||
Steps To Reproduce | #include <TColgp_Array1OfPnt.hxx> #include <math_BullardGenerator.hxx> #include <GCPnts_UniformAbscissa.hxx> #include <GCPnts_UniformDeflection.hxx> #include <GCPnts_TangentialDeflection.hxx> #include <GCPnts_QuasiUniformDeflection.hxx> #include <Geom_BSplineCurve.hxx> #include <GeomAdaptor_HCurve.hxx> #include <GeomAPI_PointsToBSpline.hxx> #include <GeomFill_Fixed.hxx> #include <GeomFill_Frenet.hxx> #include <GeomFill_ConstantBiNormal.hxx> #include <GeomFill_CorrectedFrenet.hxx> #include <GeomFill_Darboux.hxx> #include <GeomFill_DiscreteTrihedron.hxx> #include <GeomFill_GuideTrihedronAC.hxx> #include <GeomFill_GuideTrihedronPlan.hxx> #include <BRepBuilderAPI_MakeEdge.hxx> #include <BRepTools.hxx> #pragma comment(lib, "TKernel.lib") #pragma comment(lib, "TKMath.lib") #pragma comment(lib, "TKG2d.lib") #pragma comment(lib, "TKG3d.lib") #pragma comment(lib, "TKGeomBase.lib") #pragma comment(lib, "TKGeomAlgo.lib") #pragma comment(lib, "TKBRep.lib") #pragma comment(lib, "TKTopAlgo.lib") void test() { TColgp_Array1OfPnt aPoints(1, 6); math_BullardGenerator aBullardGenerator; for (Standard_Integer i = aPoints.Lower(); i <= aPoints.Upper(); ++i) { Standard_Real aX = aBullardGenerator.NextReal() * 50.0; Standard_Real aY = aBullardGenerator.NextReal() * 50.0; Standard_Real aZ = aBullardGenerator.NextReal() * 50.0; aPoints.SetValue(i, gp_Pnt(aX, aY, aZ)); } GeomAPI_PointsToBSpline aBSplineFitter(aPoints); if (!aBSplineFitter.IsDone()) { return; } std::ofstream aTclFile("d:/tcl/trihedron.tcl"); aTclFile << std::fixed; aTclFile << "vclear" << std::endl; Handle(Geom_BSplineCurve) aBSplineCurve = aBSplineFitter.Curve(); Handle(GeomAdaptor_HCurve) aCurveAdaptor = new GeomAdaptor_HCurve(aBSplineCurve); BRepBuilderAPI_MakeEdge anEdgeMaker(aBSplineCurve); BRepTools::Write(anEdgeMaker, "d:/edge.brep"); aTclFile << "restore " << " d:/edge.brep e" << std::endl; aTclFile << "incmesh e " << " 0.01" << std::endl; aTclFile << "vdisplay e " << std::endl; Handle(GeomFill_Frenet) aFrenet = new GeomFill_Frenet(); aFrenet->SetCurve(aCurveAdaptor); GCPnts_UniformAbscissa aPointSampler(aCurveAdaptor->Curve(), 5.0); for (Standard_Integer i = 1; i <= aPointSampler.NbPoints(); ++i) { Standard_Real aParam = aPointSampler.Parameter(i); gp_Pnt aP = aCurveAdaptor->Value(aParam); gp_Vec aT; gp_Vec aN; gp_Vec aB; aFrenet->D0(aParam, aT, aN, aB); // vtrihedron in opencascade draw 6.9.1 aTclFile << "vtrihedron vt" << i << " " << aP.X() << " " << aP.Y() << " " << aP.Z() << " " << " " << aB.X() << " " << aB.Y() << " " << aB.Z() << " " << " " << aT.X() << " " << aT.Y() << " " << aT.Z() << std::endl; // vtrihedron in opencascade draw 7.1.0 has bug. /*aTclFile << "vtrihedron vt" << i << " -origin " << aP.X() << " " << aP.Y() << " " << aP.Z() << " " << " -zaxis " << aB.X() << " " << aB.Y() << " " << aB.Z() << " " << " -xaxis " << aT.X() << " " << aT.Y() << " " << aT.Z() << std::endl;*/ // vtrihedron in opencascade draw 7.2.0 /*aTclFile << "vtrihedron vt" << i << " -origin " << aP.X() << " " << aP.Y() << " " << aP.Z() << " " << " -zaxis " << aB.X() << " " << aB.Y() << " " << aB.Z() << " " << " -xaxis " << aT.X() << " " << aT.Y() << " " << aT.Z() << std::endl; aTclFile << "vtrihedron vt" << i << " -labels xaxis T 1" << std::endl; aTclFile << "vtrihedron vt" << i << " -labels yaxis N 1" << std::endl; aTclFile << "vtrihedron vt" << i << " -labels zaxis B 1" << std::endl;*/ aTclFile << "vsize vt" << i << " 2" << std::endl; } } int main(int argc, char* argv[]) { test(); return 0; } | ||||
Tags | No tags attached. | ||||
Test case number | bugs/vis/bug27958 | ||||
|
frenet-occ6.9.1.png (67,661 bytes) |
|
frenet-occ7.2.0.png (63,791 bytes) |
|
The different is the following: // 6.9.1 ViewerTest_ObjectCommands.cxx Handle(Geom_Axis2Placement) aPlacement = new Geom_Axis2Placement (anOrigin, aDirZ, aDirX); Handle(AIS_Trihedron) aShape = new AIS_Trihedron (aPlacement); // 7.2.0 ViewerTest_ObjectCommands.cxx Handle(TColStd_HSequenceOfAsciiString) aValues; Handle(Geom_Axis2Placement) aComponent = theTrihedron->Component(); if (aMapOfArgs.Find ("origin", aValues)) { aComponent->SetLocation (gp_Pnt (aValues->Value (1).RealValue(), aValues->Value (2).RealValue(), aValues->Value (3).RealValue())); } Handle(TColStd_HSequenceOfAsciiString) aXValues, aZValues; if (aMapOfArgs.Find ("xaxis", aXValues) && aMapOfArgs.Find ("zaxis", aZValues)) { gp_Dir aXDir (aXValues->Value (1).RealValue(), aXValues->Value (2).RealValue(), aXValues->Value (3).RealValue()); gp_Dir aZDir (aZValues->Value (1).RealValue(), aZValues->Value (2).RealValue(), aZValues->Value (3).RealValue()); if (!aZDir.IsNormal (aXDir, M_PI / 180.0)) { std::cout << "Syntax error - parameters 'xaxis' and 'zaxis' are not applied as VectorX is not normal to VectorZ\n"; return Standard_False; } aComponent->SetXDirection(aXDir); aComponent->SetDirection (aZDir); } |
|
trih_691.png (6,511 bytes) |
|
trih_master.png (8,042 bytes) |
|
edge.brep (789 bytes) |
|
trihedron.tcl (6,106 bytes) |
|
Branch CR29670 has been created by kgv. SHA-1: fee617a347ff463b33af161be4d7a1061ec53447 Detailed log of new commits: Author: kgv Date: Thu Jan 10 15:36:23 2019 +0300 0029670: Draw Harness - vtrihedron xaxis zaxis is wrong Fixed gp_Ax2 initialization by two vectors. |
|
Patch is ready for review. Existing test case bugs/vis/bug2795 reflects changes in the patch. http://jenkins-test-12.nnov.opencascade.com:8080/view/CR29670-master-KGV/ |
|
Branch CR29670 has been updated forcibly by kgv. SHA-1: 0bc7fed82cee06f84e8c35c007502a4bae0e53c1 |
|
Branch CR29670 reviewed without remarks. Actually, the affected test case is bugs/vis/bug27958. |
|
fantastic! |
|
Combination - OCCT branch : CR29670 SHA - 0bc7fed82cee06f84e8c35c007502a4bae0e53c1 Products branch : master SHA - 0b9df64a156abd5cbfbfccb15967b46cdabfe1f8 was compiled on Linux, MacOS and Windows platforms and tested in optimize mode. Number of compiler warnings: No new/fixed warnings Regressions/Differences/Improvements: No regressions/differences CPU differences: Debian80-64: OCCT Total CPU difference: 16353.230000000067 / 16388.860000000008 [-0.22%] Products Total CPU difference: 7181.130000000038 / 7172.62000000003 [+0.12%] Windows-64-VC14: OCCT Total CPU difference: 17743.46875 / 17753.9375 [-0.06%] Products Total CPU difference: 8596.71875 / 8592.53125 [+0.05%] Image differences : No differences that require special attention Memory differences : No differences that require special attention |
|
Branch CR29670 has been deleted by inv. SHA-1: 0bc7fed82cee06f84e8c35c007502a4bae0e53c1 |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-04-03 14:31 | eryar | New Issue | |
2018-04-03 14:31 | eryar | Assigned To | => apn |
2018-04-03 14:31 | eryar | File Added: frenet-occ6.9.1.png | |
2018-04-03 14:32 | eryar | File Added: frenet-occ7.2.0.png | |
2018-04-03 14:36 | eryar | Note Added: 0075149 | |
2018-04-03 14:44 | eryar | Relationship added | related to 0029671 |
2019-01-10 14:30 | kgv | Relationship added | child of 0027958 |
2019-01-10 15:31 | kgv | File Added: trih_691.png | |
2019-01-10 15:31 | kgv | File Added: trih_master.png | |
2019-01-10 15:32 | kgv | File Added: edge.brep | |
2019-01-10 15:32 | kgv | File Added: trihedron.tcl | |
2019-01-10 15:39 | kgv | Summary | vtrihedron xaxis zaxis is wrong => Draw Harness - vtrihedron xaxis zaxis is wrong |
2019-01-10 15:39 | kgv | Steps to Reproduce Updated | |
2019-01-10 15:40 | git | Note Added: 0081717 | |
2019-01-10 16:53 | kgv | Note Added: 0081724 | |
2019-01-10 16:53 | kgv | Assigned To | apn => san |
2019-01-10 16:53 | kgv | Status | new => resolved |
2019-01-10 21:37 | git | Note Added: 0081737 | |
2019-01-11 19:39 |
|
Note Added: 0081755 | |
2019-01-11 19:39 |
|
Assigned To | san => bugmaster |
2019-01-11 19:39 |
|
Status | resolved => reviewed |
2019-01-12 08:29 | eryar | Note Added: 0081759 | |
2019-01-15 14:54 | bugmaster | Note Added: 0081782 | |
2019-01-15 14:54 | bugmaster | Status | reviewed => tested |
2019-01-15 14:57 | bugmaster | Test case number | => bugs/vis/bug27958 |
2019-01-27 11:24 | bugmaster | Changeset attached | => occt master 169c944c |
2019-01-27 11:24 | bugmaster | Status | tested => verified |
2019-01-27 11:24 | bugmaster | Resolution | open => fixed |
2019-01-28 10:54 | git | Note Added: 0081889 |