Jump to content
Developer Wiki and Function Reference Links ×

ConsolidatePlanar


BillW

Recommended Posts

Has anyone managed to get procedure "ConsolidatePlanar(obj1,obj2) : BOOLEAN" to work. In the attached VW2020 file I have a polygon (named "testpoly") which is rotated in 3D by 45degrees around the X axis. In the script palette I have a script "test consolidateplanar" which when run shows new/old objects are planar but ConsolidatePlanar fails. The new locus is in the correct X/Y position but not aligned with the rotated polygon ie Z direction is vertical.  I can do what I want with vector routines but thought ConsolidatePlanar might be easier. I tried reseting the new object, bounding box or 3DOrientation with now luck. As an aside, I noted when I used an oval it wasn't in the correct position when viewed from Top/Plan.

 

Anyone had any luck??

 

procedure test;
Var
  objH : HANDLE;
  refID	:LONGINT;
  x1,y1,x2,y2,z2 : REAL;
  consolidated,planar1,planar2,btest : BOOLEAN;

begin
  objH := getobject('testpoly');
  dselectall;
  setselect(objH);

  if objH <> NIL then begin
	  refID := GetPlanarRef(objH);
	  GetPolyPt(objH,1,x1,y1);
	  btest := PlanarPtTo3DModelPt(refID,x1,y1,x2,y2,z2);

	  locus(x2,y2);
	  {OvalN(x2,y2, 1, 0, 50, 50);}
	  consolidated := ConsolidatePlanar(objH,LNewobj); {align new object with existing object??}
	  
	  planar1 := getObjectVariableBoolean(objH,1161);
	  planar2 := getObjectVariableBoolean(LNewobj,1161);
	  message(planar1,'  ',planar2,' consolidated ',consolidated);
  end;
end;
run(test);

 

consolidate planar.png

consolidate planar test VW2020.vwx

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