Jump to content
Developer Wiki and Function Reference Links ×

Subtraction Solids.


Assembly

Recommended Posts

currently I am trying to use the subtractsolid tool to subtract one PIO from another PIO.

I have a simple PIO Extrude:

------------

PROCEDURE SetObjectParameter;

Begin;

SetRField(HObject,ObjectName,'FrameWidth',Num2Str(1,FrameWidth));

SetRField(HObject,ObjectName,'FrameDepth',Num2Str(1,FrameDepth));

SetRField(HObject,ObjectName,'ExtrudeStart',Num2Str(1,ExtrudeStart));

SetRField(HObject,ObjectName,'ExtrudeFinish',Num2Str(1,ExtrudeFinish));

ObjectName:='0 ASHFRAMEPIO';

HObject:= CreateCustomObjectN(ObjectName,0,0,0,False);

SetObjectParameter;

------------

Then within Vectorworks I have created a solid box extrusion that intersects the PIO.

By using the Subtract Solids function within vectorworks, I am able to subtract the box from the PIO.

---converting the result to a symbol and exporting as vectorscript allows me to see what process vectorworks uses to carry out this procedure.

--------------

tempHandle2 := CreateCustomObject('0 ASHFRAMEPIO',0,0,#0.0000000000000d);

ResetOrientation3D;

Rotate3D(#0.0000000000000d,#-0.0000000000000d,#0.0000000000000d);

Move3D(-5020.000000000000909,300.000000000000057,0);

Record(LNewObj,'0 ASHFRAMEPIO');

Field(LNewObj,'0 ASHFRAMEPIO','LineLength','1320.000000000000227');

Field(LNewObj,'0 ASHFRAMEPIO','FrameWidth','45');

Field(LNewObj,'0 ASHFRAMEPIO','FrameDepth','90');

Field(LNewObj,'0 ASHFRAMEPIO','WallH','2400');

Field(LNewObj,'0 ASHFRAMEPIO','Spacing','450');

Field(LNewObj,'0 ASHFRAMEPIO','TopPlateFalls','0');

Field(LNewObj,'0 ASHFRAMEPIO','DwangSpacing','800');

BeginXtrd(0,1560.000000000000455);

Rect(-4280.000000000000909,900.000000000000227,-3120.000000000000909,-440.000000000000114);

EndXtrd;

ResetOrientation3D;

Rotate3D(#-0.0000000000000d,#0.0000000000000d,#-0.0000000000000d);

Move3D(0,0,240.000000000000057);

tempHandle1 := LObject;

tempHandle := PrevObj(tempHandle1);

result := SubtractSolid(tempHandle, tempHandle1, tempHandle2);

ResetOrientation3D;

Rotate3D(#0.0000000000000d,#-0.0000000000000d,#0.0000000000000d);

Move3D(4360.000000000000909,-345.000000000000057,-1155.000000000000227);

--------------

My problem is, by simply copying this code to a new vectorscript, the result from the subtraction process returns -20- (meaning a bad input).

---Is there a way through script, to subtractsolid from PIO's? I would like to end up subtracting one PIO from another PIO.

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