Andrew who?
On 4/13/06, brad <brad(at)cg-soup.com> wrote:
> Interesting... it looks to me like the XSICollection is changing the object type as a result of dumping it into the collection:
>
> SelectObj("cube", null, true);
> obj = Selection(0);
>
> // Get a pointer to the object Facets
> oFacets = obj.ActivePrimitive.Geometry.Facets;
>
> LogMessage(oFacets(0))
> LogMessage(oFacets(1).type)
>
> // Dump the objects into an XSICollection
> XSIColl = new ActiveXObject('XSI.Collection')
> XSIColl.AddItems(oFacets)
> LogMessage(XSIColl(0))
> LogMessage(XSIColl(1).type)
>
>
> This looks like a job for Andrew!
> -Brad
>
> > -------Original Message-------
> > Stephen,
> > Thanks, this worked perfecly for my oFilter.Subset input, however I am
> > now more confused than ever. I have two pieces of code that are supposed
> > to select all the edges of a particular facet, one works, one doesnt,
> > they are:
> >
> >
> > //1.DOES NOT WORK
> > SelectObj("cube", null, true);
> > var oColl = XSIFactory.CreateActiveXObject("XSI.Collection")
> > oColl.AddItems(Selection(0).ActivePrimitive.Geometry.Facets);
> > SelectGeometryComponents(oColl(0).Edges);
> >
> > //2.WORKS
> > SelectObj("cube", null, true);
> > var oSelList = Selection(0).ActivePrimitive.Geometry.Facets;
> > SelectGeometryComponents(oSelList(1).Edges);
> >
> >
> >
> > If Selection(0).ActivePrimitive.Geometry.Facets is a facet collection,
> > how does it differ from an XSI Collection? In this case it would seem
> > that the XSI Collection is being passed to SelectGeometryComponents in
> > example 1 and a Facet Collection is being sent to
> > SelectGeometryComponents in example 2. Why would the XSI Collection work
> > in the case of filter.subset but not here?
> >
> >
> > --
> >
> > Joey Ponthieux
> > NCI Information Systems Inc.
> > NASA Langley Research Center
> > ____________________________________________________________
> > Opinions stated here-in are strictly those of the author and
> > do not represent the opinions of NASA or any other party.
> >
> >
> >
> > Stephen Blair wrote:
> > >
> > > Hi Joey
> > >
> > > Instead of messing about with the selection, just get all the edges into
> > > a collection and then filter the collection.
> > >
> > > Here's an example, but with polygons and the Quad filter:
> > >
> > > var oCone = ActiveSceneRoot.AddGeometry("Cone","MeshSurface");
> > > var oPolygons = oCone.ActivePrimitive.Geometry.Polygons;
> > >
> > > var oColl = XSIFactory.CreateActiveXObject("XSI.Collection");
> > > oColl.AddItems(oPolygons);
> > > LogMessage( oColl.Count );
> > >
> > > var oFilter = Application.Filters("Quad");
> > > var oQuads = oFilter.Subset( oColl );
> > > LogMessage( oQuads.Count );
> > >
> > > Also
> > >
> > > Application.Selection is a Selection object
> > > Selection(0).ActivePrimitive.Geometry.Segments is a SegmentCollection
> > >
> > > that's why you get the error
> > >
> > ---
> > Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
> > unsubscribe xsi
> >
>
> ---
> Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
> unsubscribe xsi
>
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi