Jump to content
Developer Wiki and Function Reference Links ×

SolidSubtraction from Loft


Recommended Posts

Greetings!

In a larger script (a point PIO), I am trying to subtract an extruded rectangle from a lofted surface, but am not having any luck. Below is a snippet of the code. Can one of you give me some direction?

Thanks!

LftCurtHnd := CreateLoftSurfaces (PreLftCurtHnd, False, True, True);

BeginXtrd (ScreenBottom-PIOZ,(ScreenBottom+ScreenHeight-PIOZ));

Rect (-(ScreenWidth/2),6",(ScreenWidth/2),-6");

EndXtrd;

ScrnRectHnd := LNewObj;

SubStractOutcome := SubtractSolid (LftCurtHnd,ScrnRectHnd,FinalDrapeHnd);

Link to comment

If you comment out the subtraction, let the script draw the objects and then do the subtraction manually does it work?

What is the value being returned by SubStractOutcome?

Are you getting a valid handle in LNewObj? I've found that in some circumstances this doesn't always work as expected.

Charles

Link to comment

Charles -

1) If I REM out the subtraction, I can do the subtraction manually.

2) The value returned is "0" (success).

3) I believe the LNewObj handle is valid.

I've built a stand-alone script to seperate this block from the rest. Here are 2 observations and a question I have when trying different things w. the "test mule:"

1) If I REM out the subtraction and if I explode the 3D part of the object and look at the curtain part it is a solid addition (according to the OI box). If I ungroup the addition it is 3 parts: a large central panel and 2, smaller "sliver" ends. Their widths seem to correspond to the width of the "tail" I add to "wrap up" the curtain creation. This leads me to wonder if I'm creating the curve correctly.

2) If I "unREM" the subtraction line, explode the PIO, and look at the resulting objects, I get 2: One is a solid addition that is in-essence the 3-part group mentioned above. The other is a solid subtraction that "contains" my extruded rectangle and the left-hand "sliver" of curtain.

Question:

As a workaround, how can I "get at" just the central panel and subtract from that? The rest of my code dictates that my subtraction window will never get out as far as the 2 "sliver sections.

Thanks!

Link to comment

I'm sorry, but I'm speechless. I have no experience with solids operations. I just had a couple standard de-bug ideas.

Along those lines I would test the handle by maybe changing the color of the rectangle, just to be sure. Maybe you've already done that sort of thing.

charles

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...