Infinity Bounds
Marcellus Zebra
2/21/2012 11:00 AM
|
---|
Hi,
I don't understand why I obtain infinity bound for a lot (not all!) entities using this code:
WW.Cad.Drawing.BoundsCalculator bc;
foreach (WW.Cad.Model.Entities.DxfEntity e in mModel.Entities){
 bc = new WW.Cad.Drawing.BoundsCalculator();
 bc.GetBounds(mModel, e);
 if(double.IsNaN(bc.Bounds.Center.X))
   return; //stop in tis point
}
What is the possible causes for this problem? Perhaps not all entities is correctly loadeds at this time?
Thank's marc.
|
Wout
2/21/2012 11:10 AM
|
---|
They might not be visible, check property DxfEntity.Visible.
- Wout
|
Marcellus Zebra
2/21/2012 2:38 PM
|
---|
Hi,
yes it is! Thank's.
marc.
|
Wout
2/21/2012 2:45 PM
|
---|
Also you could check bounds.Initialized to see if it is initialized at all.
- Wout
|
Marcellus Zebra
2/21/2012 2:49 PM
|
---|
No sorry,
your first solution have solved my problem.
marc.
|