VS:ClipPolygon: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
m (1 revision)
No edit summary
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 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]]

Revision as of 17:35, 18 September 2013

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

Description

Same as 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