Jump to content
Developer Wiki and Function Reference Links ×

Force Plug-in to draw independent of the current view.


steelydev

Recommended Posts

I have a plug-in point object defined in the Plug-in Manager.  It correctly draws the geometry I want (tapered pipe or tube) ONLY if i'm in top view or top/plan view.  If I change the Obj Info in any other view, I believe it is updating the geometry relative to my view instead of relative to layer plane.   Can't seem to locate the correct commands to tell the script to draw relative to the layer plane.

 

Any help would be appreciated and happy holidays!!!

 

ROCEDURE TaperedPipe;
VAR
    circle1, circle2, loftSurface, loftGroup : HANDLE;
    
BEGIN
    PushAttrs;
 
    SetWorkingPlane(0, 0, 0, 0, 0, 0);
    

    Oval(-PbottomDiameter/2, -PbottomDiameter/2, PbottomDiameter/2, PbottomDiameter/2);
    circle1 := LNewObj;
    Oval(-PtopDiameter/2, -PtopDiameter/2, PtopDiameter/2, PtopDiameter/2);
    circle2 := LNewObj;

    { Now group the selected objects }
    BeginGroup;
        circle1 := ConvertToNURBS(circle1, FALSE);
		circle2 := ConvertToNURBS(circle2, FALSE);
		Move3DObj(circle2, 0, 0, Pheight);
    EndGroup;
    loftGroup := LNewObj;
    
    { Create loft and shell }
    loftSurface := CreateLoftSurfaces(loftGroup, false, false, false);
    DelObject(loftGroup);
    
    IF (Ptube) THEN 
        loftSurface := CreateShell(loftSurface, Pthickness)
    ELSE 
        loftSurface := CreateShell(loftSurface, -Pthickness);
        
    PopAttrs;
	ResetOrientation3D;
END;
RUN(TaperedPipe);

 

Edited by steelydev
Link to comment
  • steelydev changed the title to Force Plug-in to draw independent of the current view.
2 hours ago, steelydev said:

I have a plug-in point object defined in the Plug-in Manager.  It correctly draws the geometry I want (tapered pipe or tube) ONLY if i'm in top view or top/plan view.  If I change the Obj Info in any other view, I believe it is updating the geometry relative to my view instead of relative to layer plane.   Can't seem to locate the correct commands to tell the script to draw relative to the layer plane.

 

SetObjectVariableBoolean(1160,HANDLE,FALSE) will set an object to the Layer Plane and SetObjectVariableBoolean(1160,HANDLE,TRUE) will set it to the Screen Plane.

 

Edited by C. Andrew Dunning
  • Like 1
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...