1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-16 10:08:36 +03:00

OCC22272 Small improvements in selection and presentation

This commit is contained in:
KGV 2011-05-19 10:41:36 +00:00 committed by bugmaster
parent 213cb88863
commit bbf32d01fd
5 changed files with 615 additions and 695 deletions

View File

@ -50,8 +50,6 @@ uses
HSequenceOfGroup from Graphic3d, HSequenceOfGroup from Graphic3d,
SequenceOfStructure from Graphic3d, SequenceOfStructure from Graphic3d,
HSequenceOfStructure from Graphic3d, HSequenceOfStructure from Graphic3d,
SetOfGroup from Graphic3d,
HSetOfGroup from Graphic3d,
MapOfStructure from Graphic3d, MapOfStructure from Graphic3d,
Plotter from Graphic3d, Plotter from Graphic3d,
StructureManager from Graphic3d, StructureManager from Graphic3d,
@ -495,10 +493,11 @@ is
---Category: Inquire methods ---Category: Inquire methods
Groups ( me ) Groups ( me )
returns HSetOfGroup from Graphic3d returns SequenceOfGroup from Graphic3d
is static; is static;
---C++: return const &
---Level: Internal ---Level: Internal
---Purpose: Returns the set of groups included in the structure <me>. ---Purpose: Returns the groups sequence included in the structure <me> (internal storage).
---Category: Inquire methods ---Category: Inquire methods
NumberOfGroups ( me ) NumberOfGroups ( me )

View File

@ -999,25 +999,12 @@ Graphic3d_MATERIAL_PHYSIC : Graphic3d_MATERIAL_ASPECT;
} }
Handle(Graphic3d_HSetOfGroup) Graphic3d_Structure::Groups () const { const Graphic3d_SequenceOfGroup& Graphic3d_Structure::Groups() const {
return MyGroups;
Handle (Graphic3d_HSetOfGroup) SG = new Graphic3d_HSetOfGroup ();
if (IsDeleted ()) return (SG);
Standard_Integer i, Length = MyGroups.Length ();
for (i=1; i<=Length; i++)
SG->Add (MyGroups.Value (i));
return (SG);
} }
Standard_Integer Graphic3d_Structure::NumberOfGroups () const { Standard_Integer Graphic3d_Structure::NumberOfGroups () const {
return (MyGroups.Length ()); return (MyGroups.Length ());
} }
void Graphic3d_Structure::SetPrimitivesAspect (const Handle(Graphic3d_AspectLine3d)& CTX) { void Graphic3d_Structure::SetPrimitivesAspect (const Handle(Graphic3d_AspectLine3d)& CTX) {
@ -1042,8 +1029,8 @@ void Graphic3d_Structure::SetPrimitivesAspect (const Handle(Graphic3d_AspectLine
MyGraphicDriver->ContextStructure (MyCStructure); MyGraphicDriver->ContextStructure (MyCStructure);
// CAL 14/04/95 // CAL 14/04/95
// attributes are "IsSet" during the first update // Attributes are "IsSet" during the first update
// of a context (line, marker...) // of context (line, marker...)
MyCStructure.ContextLine.IsSet = 1; MyCStructure.ContextLine.IsSet = 1;
MyCStructure.ContextFillArea.IsSet = 1; MyCStructure.ContextFillArea.IsSet = 1;
MyCStructure.ContextMarker.IsSet = 1; MyCStructure.ContextMarker.IsSet = 1;
@ -1602,7 +1589,7 @@ void Graphic3d_Structure::SetTransform (const TColStd_Array2OfReal& AMatrix, con
// Assign the new transformation in an array [0..3][0..3] // Assign the new transformation in an array [0..3][0..3]
// Avoid problemes if the user has defined matrice [1..4][1..4] // Avoid problemes if the user has defined matrice [1..4][1..4]
// ou [3..6][-1..2] !! // or [3..6][-1..2] !!
lr = AMatrix.LowerRow (); lr = AMatrix.LowerRow ();
ur = AMatrix.UpperRow (); ur = AMatrix.UpperRow ();
lc = AMatrix.LowerCol (); lc = AMatrix.LowerCol ();
@ -2079,7 +2066,7 @@ void Graphic3d_Structure::Network (const Handle(Graphic3d_Structure)& AStructure
while (IteratorA.More ()) { while (IteratorA.More ()) {
Graphic3d_Structure::Network Graphic3d_Structure::Network
(IteratorA.Key (), AType, ASet); (IteratorA.Key (), AType, ASet);
// IteratorD.Next () is located on the next structure // IteratorA.Next () is located on the next structure
IteratorA.Next (); IteratorA.Next ();
} }
break; break;

View File

@ -56,6 +56,8 @@ void PrsMgr_Presentation3d::Clear() {
// Consequence: // Consequence:
// 1. The memory zone of the group is reused // 1. The memory zone of the group is reused
// 2. The speed for animation is constant // 2. The speed for animation is constant
//myPresentableObject = NULL;
SetUpdateStatus(Standard_True);
myStructure->Clear(Standard_True); myStructure->Clear(Standard_True);
// myStructure->Clear(Standard_False); // myStructure->Clear(Standard_False);

View File

@ -1624,7 +1624,7 @@ Standard_Boolean ShapeAnalysis_Wire::CheckNotchedEdges(const Standard_Integer nu
ShapeAnalysis_Curve sac; ShapeAnalysis_Curve sac;
gp_Pnt Proj1, Proj2; gp_Pnt Proj1, Proj2;
Standard_Real param1, param2; Standard_Real param1 = 0., param2 = 0.;
p2d2=c2d2->Value(E2.Orientation()==TopAbs_FORWARD ? b2 : a2); p2d2=c2d2->Value(E2.Orientation()==TopAbs_FORWARD ? b2 : a2);
p2d1=c2d1->Value(E1.Orientation()==TopAbs_FORWARD ? a1 : b1); p2d1=c2d1->Value(E1.Orientation()==TopAbs_FORWARD ? a1 : b1);
Standard_Real dist1 = ProjectInside(Ad1,gp_Pnt(p2d2.X(),p2d2.Y(),0),Tolerance,Proj1,param1,Standard_False); Standard_Real dist1 = ProjectInside(Ad1,gp_Pnt(p2d2.X(),p2d2.Y(),0),Tolerance,Proj1,param1,Standard_False);

File diff suppressed because it is too large Load Diff