Difference between revisions of "VS:OffsetPoly"

From Vectorworks Developer
Jump to: navigation, search
m (1 revision)
(add remark: this is still unusable, correct introduction: public since 2012)
 
Line 60: Line 60:
  
 
-----------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------
<remark></remark>
+
<remark>
 +
([[User:Orso.b.schmid|Orso]], 2011): The routine was introduced undocumented by VW10 (2005), then made public by VW17 (2012).
 +
 
 +
OffsetPoly fails:
 +
* on holes, they are ignored
 +
* when by an offset less than 1 unit: it copies in place, instead of offsetting (tested from VW 2011 through 2014). For example:
 +
:* Units meter, offset 1m > succeeds
 +
:* Units meter, offset 0.9m > fails
 +
:* Units cm, offset 1cm > succeeds
 +
:* Units cm, offset 0.9cm > fails
 +
</remark>
  
 
-----------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------
Line 66: Line 76:
  
 
-----------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------
<seeAlso></seeAlso>
+
<seeAlso>
 +
Similar calls:
 +
* [[VS:OffsetPolyN]]
 +
* [[VS:OffsetHandle]]
 +
</seeAlso>
  
 
-----------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------
 
<version>
 
<version>
Availability: from Vectorworks 2014
+
Availability: from Vectorworks 2012
  
 
</version>
 
</version>

Latest revision as of 04:43, 25 March 2014

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

Description

Offsets a polygon or polyline. Must handle open & closed polys. A positive distance offsets to the outside; negative to the inside. Should remove self-intersecting segments from the result. Should support "smooth" vs. "sharp" offsets.
FUNCTION OffsetPoly(
h  :HANDLE;
offsetDistance  :REAL;
numberOfOffsets  :INTEGER;
consolidateVertices  :BOOLEAN;
sharpCorners  :BOOLEAN;
conversionRes  :INTEGER;
consolidationTolerance  :REAL) : HANDLE;
def vs.OffsetPoly(h, offsetDistance, numberOfOffsets, consolidateVertices, sharpCorners, conversionRes, consolidationTolerance):
    return HANDLE

Parameters

h HANDLE
offsetDistance REAL
numberOfOffsets INTEGER
consolidateVertices BOOLEAN
sharpCorners BOOLEAN
conversionRes INTEGER
consolidationTolerance REAL

Remarks

(Orso, 2011): The routine was introduced undocumented by VW10 (2005), then made public by VW17 (2012).

OffsetPoly fails:

  • on holes, they are ignored
  • when by an offset less than 1 unit: it copies in place, instead of offsetting (tested from VW 2011 through 2014). For example:
  • Units meter, offset 1m > succeeds
  • Units meter, offset 0.9m > fails
  • Units cm, offset 1cm > succeeds
  • Units cm, offset 0.9cm > fails

Version

Availability: from Vectorworks 2012

See Also

Similar calls:
Similar calls:
  • [[VS:OffsetPolyN]]
  • [[VS:OffsetHandle]]
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox