Jump to content
Developer Wiki and Function Reference Links ×

Objects disappear when using SubtractSolid


Recommended Posts

This issue has been happening repeatedly for a while, and I'm looking for a way to solve it.   I build some complex models in Vectorscript, and sometimes use SubtractSolid to build some shapes.  A simple example code is:

 

<object code>

s1:=LNewObj;
<object code>
s2:=LNewObj;
subtract:=SubtractSolid(s1,s2,s3); DelObject(s1); DelObject(s2);

 

I've posted an example below.  Moving the object causes the parts to come back, but they eventually disappear again.  What is the best practice for making these objects stay?  Should I convert them to generic solids?  Do I need to reset the object in the code?

 

 

image.png.045b5b059d484d5edcffcdeb8e41d0a4.pngimage.png.dcf0e195af39989b918ce9b05b215583.png

Link to comment
58 minutes ago, SamIWas said:

Should I convert them to generic solids?  Do I need to reset the object in the code?

Not sure but I do see this very occasionally when direct modelling and Convert to GS does the trick.

Link to comment
6 hours ago, Pat Stanford said:

Is this just a script or is this part of a PIO

 

Have you included a ResetObject call on the final subtraction in your script?

 

Have you included a Redraw/RedrawAll at the end of your script?

 

It is part of a PIO written in Vectorscript.   I do have a ResetObject(h) at the end, but I do not have a redraw.  The object does reset if I make any adjustment to it, but I'm wondering if the redraw would even happen if nothing triggers the plug-in to run again.  Might try the convert to generic solid.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...