
Sun, 12/03/2023 - 06:27
Forums:
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
Attachments:
Mon, 12/04/2023 - 10:31
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.Mon, 12/04/2023 - 11:04
Thanks!