Esempio n. 1
0
        private InvWorkPoint(Point point, IObjectBinder binder)
        {
            this.point = point;
            this.binder = binder;

            if (binder.DocumentManager.ActiveAssemblyDoc != null)
            {
                this.binder.ContextManager.BindingContextManager = binder.DocumentManager.ActiveAssemblyDoc.ReferenceKeyManager;
            }
            else if (binder.DocumentManager.ActivePartDoc != null)
            {
                this.binder.ContextManager.BindingContextManager = binder.DocumentManager.ActivePartDoc.ReferenceKeyManager;
            }
            this.binder.ContextManager.BindingContextManager = binder.DocumentManager.ActiveAssemblyDoc.ReferenceKeyManager;
            Inventor.WorkPoint wp;
            if (this.binder.GetObjectFromTrace<Inventor.WorkPoint>(out wp))
            {
                InternalWorkPoint = wp;
                AssemblyWorkPointDef wpDef = (AssemblyWorkPointDef)wp.Definition;
                wpDef.Point = point.ToPoint();
            }

            else
            {
                wp = binder.DocumentManager.ActiveAssemblyDoc.ComponentDefinition.WorkPoints.AddFixed(point.ToPoint(), false);
                InternalWorkPoint = wp;
                this.binder.SetObjectForTrace<InvWorkPoint>(this.InternalWorkPoint);
            }
        }
Esempio n. 2
0
        private InvWorkPoint(Point point, IObjectBinder binder)
        {
            this.point  = point;
            this.binder = binder;

            if (binder.DocumentManager.ActiveAssemblyDoc != null)
            {
                this.binder.ContextManager.BindingContextManager = binder.DocumentManager.ActiveAssemblyDoc.ReferenceKeyManager;
            }
            else if (binder.DocumentManager.ActivePartDoc != null)
            {
                this.binder.ContextManager.BindingContextManager = binder.DocumentManager.ActivePartDoc.ReferenceKeyManager;
            }
            this.binder.ContextManager.BindingContextManager = binder.DocumentManager.ActiveAssemblyDoc.ReferenceKeyManager;
            Inventor.WorkPoint wp;
            if (this.binder.GetObjectFromTrace <Inventor.WorkPoint>(out wp))
            {
                InternalWorkPoint = wp;
                AssemblyWorkPointDef wpDef = (AssemblyWorkPointDef)wp.Definition;
                wpDef.Point = point.ToPoint();
            }

            else
            {
                wp = binder.DocumentManager.ActiveAssemblyDoc.ComponentDefinition.WorkPoints.AddFixed(point.ToPoint(), false);
                InternalWorkPoint = wp;
                this.binder.SetObjectForTrace <InvWorkPoint>(this.InternalWorkPoint);
            }
        }
Esempio n. 3
0
        private InvWorkPoint(Point point, IObjectBinder binder)
        {
            _binder = binder;
            Inventor.WorkPoint wp;
            if (_binder.GetObjectFromTrace <Inventor.WorkPoint>(out wp))
            {
                InternalWorkPoint = wp;
                AssemblyWorkPointDef wpDef = (AssemblyWorkPointDef)wp.Definition;
                wpDef.Point = point.ToPoint();
            }

            else
            {
                wp = PersistenceManager.ActiveAssemblyDoc.ComponentDefinition.WorkPoints.AddFixed(point.ToPoint(), false);
                InternalWorkPoint = wp;
                _binder.SetObjectForTrace <WorkPoint>(this.InternalWorkPoint);
            }
        }
Esempio n. 4
0
 private bool InternalIsEqualTo(Point point, double tolerance)
 {
     return(PointInstance.IsEqualTo(point.ToPoint(), tolerance));
 }
Esempio n. 5
0
 private double InternalDistanceTo(Point point)
 {
     return(PointInstance.DistanceTo(point.ToPoint()));
 }
Esempio n. 6
0
 private InvPoint(Point invPoint)
 {
     InternalPoint = invPoint.ToPoint();
 }
Esempio n. 7
0
 private void InternalSetFixed(Point point)
 {
     WorkPointInstance.SetFixed( point.ToPoint());
 }
Esempio n. 8
0
        private InvWorkPoint(Point point, IObjectBinder binder)
        {
            _binder = binder;
            Inventor.WorkPoint wp;
            if (_binder.GetObjectFromTrace<Inventor.WorkPoint>(out wp))
            {
                InternalWorkPoint = wp;
                AssemblyWorkPointDef wpDef = (AssemblyWorkPointDef)wp.Definition;               
                wpDef.Point = point.ToPoint();
            }

            else
            {
                wp = PersistenceManager.ActiveAssemblyDoc.ComponentDefinition.WorkPoints.AddFixed(point.ToPoint(), false);
                InternalWorkPoint = wp;
                _binder.SetObjectForTrace<WorkPoint>(this.InternalWorkPoint);
            }
        }
Esempio n. 9
0
 private bool InternalIsEqualTo(Point point, double tolerance)
 {
     return PointInstance.IsEqualTo(point.ToPoint(), tolerance);
 }
Esempio n. 10
0
 private double InternalDistanceTo(Point point)
 {
     return PointInstance.DistanceTo(point.ToPoint());
 }
Esempio n. 11
0
 private InvPoint(Point invPoint)
 {
     InternalPoint = invPoint.ToPoint();
 }
Esempio n. 12
0
 private ObjectsEnumerator InternalFindUsingVector(Point originPoint, UnitVector direction, SelectionFilterEnum[] objectTypes, bool useCylinder, Object proximityTolerance, bool visibleObjectsOnly, out Object locationPoints)
 {
     return(ComponentDefinitionInstance.FindUsingVector(originPoint.ToPoint(), direction, objectTypes, useCylinder, proximityTolerance, visibleObjectsOnly, out locationPoints));
 }
Esempio n. 13
0
 private ObjectsEnumerator InternalFindUsingPoint(Point point, SelectionFilterEnum[] objectTypes, Object proximityTolerance, bool visibleObjectsOnly)
 {
     return(ComponentDefinitionInstance.FindUsingPoint(point.ToPoint(), objectTypes, proximityTolerance, visibleObjectsOnly));
 }
Esempio n. 14
0
 private void InternalSetFixed(Point point)
 {
     WorkPointInstance.SetFixed(point.ToPoint());
 }
 private ObjectsEnumerator InternalFindUsingVector(Point originPoint, UnitVector direction, SelectionFilterEnum[] objectTypes, bool useCylinder, Object proximityTolerance, bool visibleObjectsOnly, out Object locationPoints)
 {
     return ComponentDefinitionInstance.FindUsingVector( originPoint.ToPoint(),  direction,  objectTypes,  useCylinder,  proximityTolerance,  visibleObjectsOnly, out  locationPoints);
 }
 private ObjectsEnumerator InternalFindUsingPoint(Point point, SelectionFilterEnum[] objectTypes, Object proximityTolerance, bool visibleObjectsOnly)
 {
     return ComponentDefinitionInstance.FindUsingPoint( point.ToPoint(),  objectTypes,  proximityTolerance,  visibleObjectsOnly);
 }