ReadStep Have no lighting display effect,but use ReadObj have lighting display effect?

I use the following code to read the step file, and the result is no lighting display effect, but I use the following code to read the obj file, and the lighting display effect appears. What should I do if I want to read a display step file and have a lighting display? The STEP file and the OBJ file are the same file in different formats!

pload ALL
ReadStep D D:/maichongchuanganqi.step
XDisplay -dispMode 1 D
vfit

vinit
pload ALL
ReadObj DD D:/maichongchuanganqi.obj
XDisplay -dispMode 1 DD
vfit

gkv311 n's picture

OBJ file defines visual material properties (diffuse, specular, ambient, etc.), while STEP file defines only RGB colors assigned to shapes. Therefore, the appearance of STEP file will depend on a default material defined in application.

In Draw Harness you may work with visual material in XCAF document via commands like XGetAllVisMaterals, XGetVisMaterial, XAddVisMaterial, XSetVisMaterial. Note, however, that these materials will but be exported into STEP file.

TIAN DAJIANG's picture

Thanks!