Quantcast
Channel: Rhino Developer - McNeel Forum
Viewing all articles
Browse latest Browse all 8561

Saving the data of Display Conduits C#

$
0
0

Hi all,

I am still working on my custom clipping box(just like Revit has) which is attached with 6 clipping planes on each face using Rhino.Display.DisplayConduit class.
The clipping box needs to be save as user file, but as far as I went through example programs, I could not find the way to solve it.
If anyone has good example or any clue, please give me some advises.

A part of the DisplayConduit Class is;

     protected override void CalculateBoundingBox(CalculateBoundingBoxEventArgs e)
     { 
        if (d_box != null) //d_box is geometry Box object
        {
            BoundingBox m_bbox = d_box.box.BoundingBox;
            base.CalculateBoundingBox(e);
            e.IncludeBoundingBox(m_bbox); 
        }
    }
    protected override void PreDrawObjects( DrawEventArgs e)
    {
        base.PreDrawObjects(e);
        e.Display.AddClippingPlane(XplusCenter, XplusVec);
        e.Display.AddClippingPlane(XminusCenter, XminusVec);
        //and... each sides of Y and Z. 
    }
    protected override void DrawOverlay(DrawEventArgs e)
    {
        base.DrawOverlay(e);    
    }     

Thank you

Kato

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 8561

Trending Articles