MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0025560Community[OCCT] OCCT:Documentationpublic2014-12-06 15:502016-12-09 16:39
ReporterRoman Lygin 
Assigned Toapn 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version[OCCT] 6.8.0 
Target Version[OCCT] 7.1.0Fixed in Version[OCCT] 7.1.0 
Summary0025560: Documentation - describe changes in AIS_InteractiveConnect and AIS_MultipleConnected introduced within 6.8.0
Description(Tracker per the respective post on the forum https://dev.opencascade.org/index.php?q=node/1019 [^])


Version 6.8.0 apparently introduced some signficant change about how the IO's can be connected.
The former use case as explained in my blog post (http://opencascade.blogspot.ru/2013/11/ais-connecting-objects.html [^]) has been broken.
In particular an exception is currently thrown in ConnectedInteractive:

void AIS_ConnectedInteractive::Connect (const Handle(AIS_InteractiveObject)& theAnotherObj)
{...
  else
  {
    Standard_ProgramError::Raise ("AIS_ConnectedInteractive::Connect() - object without own presentation can not be connected");
  }
}

The change seems to be introduced in #25371 (http://tracker.dev.opencascade.org/view.php?id=25371 [^]), to which access is denied for
community members to get further details.

The use case as explained in the above blog post is to create a hierarchy of AIS_IO's via connection of CI and MC. Here is
an excerpt as pseudo-code:

Handle_AIS_InteractiveObject CreateIO (const SceneGraphElement& e)
{
    Handle_AIS_InteractiveObject r;
    if (e is a Part (i.e. leaf of scene graph)) {
        r = create_concrete_interativeobject();
    } else if (e is Instance) {
        Handle_AIS_InteractiveObject ref_r = CreateIO (e->reference); //recursion
        Handle_AIS_ConnectedInteractive i = new AIS_ConnectedInteractive;
        i->Connect (ref_r, location);
        r = i;
    } else if (e is assembly) {
        Handle_AIS_MultipleConnected m = new AIS_MultipleConnected;
        for (all childs in assembly) {
            Handle_AIS_InteractiveObject c = CreateIO (child_i); //recursion
            m->Connect (c);
        }
        r = m;
    }
    return r;
}

Thus, there never exists a presentation for any IO which gets connected and any interim IO will ever be displayed itself.

Neither the Release Notes nor the Visualization User's Guide invalidate the formerly valid and working use case. So please do
restore the possibility existed before and meanwhile please advise on a proper work-around.
Steps To ReproduceNA
Additional information
and documentation updates
The only correction needed is related to Visualization User's Guide: it should be extended by a chapter describing the new design of connected interactive objects and the rules of their usage.
TagsNo tags attached.
Test case numberNot needed
Attached Files

- Relationships
related to 0024837closedbugmaster Open CASCADE Visualization - revise design and implementation of connected Interactive Objects 

-  Notes
(0035094)
kgv (developer)
2014-12-06 17:49

Dear Roman,

could you please describe in more detail exactly the use case that is no more working for you? Probably simple draw command would be sufficient to address your problem.

From current description I can not find the statement that was not documented.
(0035096)
Roman Lygin (developer)
2014-12-06 18:55

Dear Kirill,

Please find the reproducer below, made with the help of shape structure.
Apparently the exception gets raised on the combination of ConnectedInteractive referring to the MultipleConnectedInteractive. The method ::Connect() checks HasOwnRepresentations() which is set to false for MC.


static Handle_AIS_InteractiveObject CreateAIS (const TopoDS_Shape& theShape)
{
    Handle_AIS_InteractiveObject r;
    if (theShape.IsNull ())
        return r;

    const TopLoc_Location& aLoc = theShape.Location ();
    if (!aLoc.IsIdentity ()) { //instance
        Handle_AIS_ConnectedInteractive aCon = new AIS_ConnectedInteractive;
        TopoDS_Shape aRef = theShape.Located (TopLoc_Location ());
        Handle_AIS_InteractiveObject aRefAIS = CreateAIS (aRef);
        if (!aRefAIS.IsNull ()) {
            aCon->Connect (aRefAIS, aLoc);
        }
        r = aCon;
    } else if (theShape.ShapeType () == TopAbs_COMPOUND) { //assembly
        Handle_AIS_MultipleConnectedInteractive aM = new AIS_MultipleConnectedInteractive;
        for (TopoDS_Iterator i (theShape); i.More (); i.Next ()) {
            Handle_AIS_InteractiveObject aChildAIS = CreateAIS (i.Value ());
            if (!aChildAIS.IsNull ())
                aM->Connect (aChildAIS);
        }
        r = aM;
    } else { //part
        r = new AIS_Shape (theShape);
    }
    return r;
}

static void Test ()
{
    TopoDS_Vertex aV = BRepBuilderAPI_MakeVertex (gp_Pnt (0., 0., 0.));
    gp_Trsf aT;
    aT.SetTranslation (gp_Vec (1, 2, 3));
    TopoDS_Compound aC;
    BRep_Builder aB;
    aB.MakeCompound (aC);
    aB.Add (aC, aV.Located (TopLoc_Location (aT)));
    Handle_AIS_InteractiveObject anAIS = CreateAIS (aC.Located (aT));
}

(0035108)
kgv (developer)
2014-12-08 08:46

Severity has been lowered since this is expected behavior change.
(0036000)
kgv (developer)
2015-01-13 11:44

Dear Danila,

please update Visualization User's Guide as discussed on the forum.
(0058688)
san (developer)
2016-10-13 19:12

Dear YSN,

Can you please contact DUV and try to draft together the Visualization User's Guide section dedicated to connected interactive objects?
(0058689)
san (developer)
2016-10-13 19:19

Please contact me for some general explanations first of all.
(0059841)
git (administrator)
2016-11-03 13:06

Branch CR25560 has been created by ysn.

SHA-1: 568ee8291ac40d93de7c195d1edb15e80902a724


Detailed log of new commits:

Author: ysn
Date: Thu Nov 3 13:06:24 2016 +0300

    0025560: Regression on AIS_InteractiveConnect and AIS_MultipleConnected support in 6.8.0
    
    New section about Connected Interactive Objects.
    Proofreading of extended section about z-layers.
(0059846)
ysn (developer)
2016-11-03 13:14

Dear DUV,

Could you please review the implementation of your new text in Visualization manual.
I'd suggest explaining what each example shows.
(0060045)
duv (developer)
2016-11-08 17:30

Dear YSN,

Please consider changes committed to branch.
(0060075)
git (administrator)
2016-11-09 11:09

Branch CR25560 has been updated by duv.

SHA-1: 23b3d64aca282dbe914659d4f9987ef3630f4768


Detailed log of new commits:

Author: duv
Date: Tue Nov 8 17:28:39 2016 +0300

    Review of connected interactive section

(0060107)
git (administrator)
2016-11-09 13:52

Branch CR25560_1 has been created by ysn.

SHA-1: 3d62bafd3af919199b7c6d9e4d16c1622d3154f4


Detailed log of new commits:

Author: ysn
Date: Wed Nov 9 13:51:43 2016 +0300

    0025560: Regression on AIS_InteractiveConnect and AIS_MultipleConnected support in 6.8.0
    
     New section about scene-graph hierarchy and instancing.
     Proofreading of extended section about z-layers.
     Removal of obsolete information.
(0060108)
ysn (developer)
2016-11-09 13:53

Please, review.
(0060154)
san (developer)
2016-11-09 20:27
edited on: 2016-11-09 20:32

Branch CR25560_1 reviewed with the following remarks:

+The calculation of selection primitives (or sensitive entities) is done by the intermediary of a virtual 
function


Why not simply say "...is done in a virtual function..."?

+*      Instances project the selection (or to remove the hidden lines) based on the current view.


Is this statement relevant here? Anyway, instances do not "project the selection" as the selection algorithm is not based on 2D projections since 6.9.0 release.

+Classes *AIS_ConnectedInteractive* and *AIS_MultiplyConnectedInteractive*
...
+*AIS_MultiplyConnectedInteractive* represents an assembly...


The class name is AIS_MultipleConnectedInteractive - not AIS_MultiplyConnectedInteractive, please correct all occurrences.

(0060178)
vpa (developer)
2016-11-10 13:18
edited on: 2016-11-10 13:30

In addition to Sergey's remarks, I would say that usage of the term "scene graph" is incorrect and confusing here:

+@subsubsection occt_visu_3_2_7 Scene-graph hierarchy


In fact, OCCT does not have a scene graph in its original wide-spread meaning. The use case described in section occt_visu_3_2_7 should be referenced as single object hierarchy.

Please, correct the following:

+Scene hierarchy can be controlled by the following API calls:
Object hierarchy ...

+The conception of instancing (scene-graph level instancing) is separated from hierarchy.
The conception of instancing operates object's hierarchy principles along with the following

+The assemblies are able to participate in a scene hierarchy and are intended
The assemblies are able to participate in object's hierarchy and are intended

It is also necessary to add that AIS_ConnectedInteractive copies sensitive entities of origin object for selection, unlike AIS_MultipleConnectedInteractive that re-uses origin's entities.

(0060419)
git (administrator)
2016-11-16 13:05

Branch CR25560_1 has been updated by ysn.

SHA-1: 2d2a724a0c5c627afd8c82d92d08e5846c4f03d1


Detailed log of new commits:

Author: ysn
Date: Wed Nov 16 13:05:29 2016 +0300

    Remarks taken into account.

(0060613)
git (administrator)
2016-11-21 13:44

Branch CR25560_1 has been updated forcibly by san.

SHA-1: c706292cd9630536ccc5c5f163f1de8ccfcda33c
(0060614)
san (developer)
2016-11-21 13:46

Branch CR25560_1 reviewed without remarks, please test the updated Visualization User's Guide.
(0060623)
git (administrator)
2016-11-21 14:55

Branch CR25560_1 has been updated forcibly by apv.

SHA-1: a4a4b0e5fc4591d43970aa0d5a5eb3531419da78
(0060624)
apv (tester)
2016-11-21 14:55

Branch CR25560_1 has been rebased on the current master
(0061232)
git (administrator)
2016-12-07 11:30

Branch CR25560 has been deleted by kgv.

SHA-1: 23b3d64aca282dbe914659d4f9987ef3630f4768
(0061233)
git (administrator)
2016-12-07 11:30

Branch CR25560_1 has been deleted by kgv.

SHA-1: a4a4b0e5fc4591d43970aa0d5a5eb3531419da78

- Related Changesets
occt: master ebcbd824
Timestamp: 2016-11-23 09:57:32
Author: ysn
Committer: apn
Details ] Diff ]
0025560: Documentation - describe changes in AIS_InteractiveConnect and AIS_MultipleConnected introduced within 6.8.0

 New section about scene-graph hierarchy and instancing.
 Proofreading of extended section about z-layers.
 Removal of obsolete information.

Remarks taken into account.
add - dox/user_guides/visualization/images/visualization_image029.png Diff ] File ]
add - dox/user_guides/visualization/images/visualization_image030.png Diff ] File ]
mod - dox/user_guides/visualization/visualization.md Diff ] File ]

- Issue History
Date Modified Username Field Change
2014-12-06 15:50 Roman Lygin New Issue
2014-12-06 15:50 Roman Lygin Assigned To => kgv
2014-12-06 17:35 kgv Relationship added related to 0025371
2014-12-06 17:35 kgv Relationship added related to 0024837
2014-12-06 17:49 kgv Note Added: 0035094
2014-12-06 17:49 kgv Assigned To kgv => Roman Lygin
2014-12-06 17:49 kgv Status new => feedback
2014-12-06 18:55 Roman Lygin Note Added: 0035096
2014-12-06 18:55 Roman Lygin Assigned To Roman Lygin => kgv
2014-12-06 18:55 Roman Lygin Status feedback => assigned
2014-12-08 08:46 kgv Note Added: 0035108
2014-12-08 08:46 kgv Severity major => minor
2014-12-09 20:38 san Additional Information Updated View Revisions
2015-01-13 11:44 kgv Note Added: 0036000
2015-01-13 11:44 kgv Assigned To kgv => duv
2015-01-13 11:44 kgv Resolution open => documentation updated
2015-01-13 11:44 kgv Target Version => 6.9.0
2015-04-30 10:22 kgv Target Version 6.9.0 => 7.1.0
2016-10-13 19:12 san Note Added: 0058688
2016-10-13 19:12 san Assigned To duv => ysn
2016-10-13 19:12 san Status assigned => feedback
2016-10-13 19:15 san Description Updated View Revisions
2016-10-13 19:19 san Note Added: 0058689
2016-11-03 13:06 git Note Added: 0059841
2016-11-03 13:07 ysn Assigned To ysn => Roman Lygin
2016-11-03 13:09 ysn Assigned To Roman Lygin => duv
2016-11-03 13:14 ysn Note Added: 0059846
2016-11-08 17:30 duv Note Added: 0060045
2016-11-08 17:30 duv Assigned To duv => ysn
2016-11-08 17:30 duv Status feedback => assigned
2016-11-08 17:34 kgv Category OCCT:Visualization => OCCT:Documentation
2016-11-08 17:34 kgv Summary Regression on AIS_InteractiveConnect and AIS_MultipleConnected support in 6.8.0 => Documentation - describe changes in AIS_InteractiveConnect and AIS_MultipleConnected introduced within 6.8.0
2016-11-09 11:09 git Note Added: 0060075
2016-11-09 13:52 git Note Added: 0060107
2016-11-09 13:53 ysn Note Added: 0060108
2016-11-09 13:53 ysn Assigned To ysn => san
2016-11-09 13:53 ysn Status assigned => resolved
2016-11-09 13:53 ysn Steps to Reproduce Updated View Revisions
2016-11-09 20:27 san Note Added: 0060154
2016-11-09 20:27 san Assigned To san => ysn
2016-11-09 20:27 san Status resolved => assigned
2016-11-09 20:32 san Note Edited: 0060154 View Revisions
2016-11-10 13:18 vpa Note Added: 0060178
2016-11-10 13:19 vpa Note Edited: 0060178 View Revisions
2016-11-10 13:22 vpa Note Edited: 0060178 View Revisions
2016-11-10 13:30 vpa Note Edited: 0060178 View Revisions
2016-11-16 13:05 git Note Added: 0060419
2016-11-16 13:06 ysn Assigned To ysn => san
2016-11-16 13:06 ysn Status assigned => resolved
2016-11-21 13:44 git Note Added: 0060613
2016-11-21 13:46 san Note Added: 0060614
2016-11-21 13:46 san Assigned To san => bugmaster
2016-11-21 13:46 san Status resolved => reviewed
2016-11-21 14:39 apv Assigned To bugmaster => apv
2016-11-21 14:49 apv Test case number => Not needed
2016-11-21 14:55 git Note Added: 0060623
2016-11-21 14:55 apv Note Added: 0060624
2016-11-21 14:57 apv Assigned To apv => bugmaster
2016-11-21 14:57 apv Status reviewed => tested
2016-11-24 15:52 apn Changeset attached => occt master ebcbd824
2016-11-24 15:52 apn Assigned To bugmaster => apn
2016-11-24 15:52 apn Status tested => verified
2016-11-24 15:52 apn Resolution documentation updated => fixed
2016-12-07 11:30 git Note Added: 0061232
2016-12-07 11:30 git Note Added: 0061233
2016-12-09 16:30 aiv Status verified => closed
2016-12-09 16:39 aiv Fixed in Version => 7.1.0


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker