Problem when use drape in rhino by python script

This problem confused me for a long time. I tried many many times but it didn’t work. When I used drape command in Rhino directly and draw the window by hand, it is OK. However, it failed when i use python script to create “drape”, it got strange drape surface like below pic. the python script is : rs.Command("_drape _AutoSpacing=Yes spacing=1 400,400 800,0 ") anything wrong?

Appreciate much if anyone can help.

Hi @Icelemon,

Can you provide a model what you are trying to drape over?

– Dale

Hi Dale,
Thank for your reply. I tried it on many models (both simple ones and completed ones) and failed all the times. I found out when I drape manually before the python script, it may succeed without strange shape occasionally by doing in rs.command.

Attached is one of tested models and the python script I drape model.3dm (1.5 MB) used is : rs.Command("_drape AutoSpacing=Yes Spacing=1 AutoDetectMaxDepth=Yes -150,-150 150,150").

Really appreciate if you can help.

This seems to work if I run the following with the Top view active:

_Drape _AutoSpacing=_Yes _Spacing=1 _AutoDetectMaxDepth=_Yes -150,-150,0 150,150,0

– Dale

Thanks for your reply. I noticed the difference between the two scripts is the z value for the defined point (-150,-150,0). I will have a try later.