Strange apperance of a cylinder

Forum for reporting problems
Post Reply
Luke McGee
Posts: 0
Joined: Thu Jul 30, 2015 9:57 am

Strange apperance of a cylinder

Post by Luke McGee »

Hi
I am evaluating v5.0. Some shapes created via IStdShape have dark parts on it, which do not reflect light. See the picture
Is it a bug?
Thank You
Luke
Attachments
Inverted.jpg
Inverted.jpg (16.82 KiB) Viewed 8073 times

nickz
Site Admin
Posts: 236
Joined: Fri Jul 26, 2013 3:58 am

Re: Strange apperance of a cylinder

Post by nickz »

Hi Luke
We have fixed this in update 3972

Generally dark unlighted surfaces like this most mean the path or whole surface is displayed inside out. You can try in Modeling Studio v4 (v5 does not work yet, but you can have two KC versions side by side) “Current Object”>Modify>”Swap positive side” to check it is improves appearance for the patch.

You could also turn on normal in context menu or in Modelign Studio. Correct normal are looking outside.

V4 handles the situation and shows the same correct picture even if the surface is inverted. V5 does not do it for performance and other reasons

There is a way to swap side programmatically for a single object using IMeshMods.SwapSide(). You would need to write a small piece of code to do it for all objects like:

Code: Select all

_iModel = axKernCADnet1.GetModel();
 // List all objects in the model ignoring parent/child relations
 IPropertyArray iPropArray = (IPropertyArray)_iModel;
 // Flat array of all objects in the model
 IArray _iArrObjects = (IArray)iPropArray.GetProperty("FlatObjectArray");
 int nObjectCount = _iArrObjects.GetCount();
 for(int i=0; i<nObjectCount; i++)
 {
         ISection iSect = (ISection)_iArrObjects.GetAt(i);
         IMeshMods iMeshMod = (IMeshMods)iSect;
         iMeshMod.SwapSide();
 }
Thanks for reporting

Post Reply