VS:ClipPolygon: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
No edit summary
 
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 5: Line 5:
-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<desc>
<desc>
Same as IntersectSurface, but improves performance by first checking to see if hClipper is within the bounding box of hPolygon before calling IntersectSurface.
Same as [[VS:IntersectSurface]], but improves performance by first checking to see if hClipper is within the bounding box of hPolygon before calling IntersectSurface.</desc>
 
Not sure what dFuzz does.
 
Returns the handle of the result. Beware: if the clipping operation should have returned more than one polygon, only the first polygon will be returned.
</desc>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<def>
<def>
<funcDef lang="vs">
<funcDef lang="vs">
FUNCTION ClipPolygon(hPolygon :HANDLE; hClipper :HANDLE; dFuzz :REAL) :HANDLE;
FUNCTION ClipPolygon(hPolygon:HANDLE; hClipper:HANDLE; dFuzz:REAL) : HANDLE;
</funcDef>
</funcDef>
<funcDef lang="py">
<funcDef lang="py">
Line 43: Line 38:
</lineList>
</lineList>
</params>
</params>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<return>
<remark></remark>
</return>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<remark>
<sample></sample>
I don't think that this works from inside Plug-in objects.
</remark>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<sample>
<seeAlso></seeAlso>
<code lang="pas">
PROCEDURE Example;
VAR
  h1, h2, h3 :HANDLE;
BEGIN
  CallTool(-204); h1 := FSActLayer;
  CallTool(-204); h2 := FSActLayer;
  h3 := ClipPolygon(h1, h2, 1);
END;
Run(Example);</code>
 
</sample>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<version>
<version>
Availability: from All Versions
Availability: from Vectorworks 2014


This is drop-in function.
</version>
</version>
-----------------------------------------------------------------------------------------------------------
<seeAlso>
</seeAlso>


</vwDoc>
</vwDoc>


[[Category:VS Function Reference|ClipPolygon]]
[[Category:VS Function Reference|ClipPolygon]]
[[Category:VS Function Reference:Objects - 2D|ClipPolygon]]
[[Category:VS Function Reference:Graphic Calculation|ClipPolygon]]

Latest revision as of 14:03, 13 March 2015

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Same as VS:IntersectSurface, but improves performance by first checking to see if hClipper is within the bounding box of hPolygon before calling IntersectSurface.

FUNCTION ClipPolygon(
hPolygon :HANDLE;
hClipper :HANDLE;
dFuzz :REAL) : HANDLE;
def vs.ClipPolygon(hPolygon, hClipper, dFuzz):
    return HANDLE

Parameters

hPolygon HANDLE
hClipper HANDLE
dFuzz REAL

Version

Availability: from Vectorworks 2014