AddSolid Objects - Solids 

Declaration:

FUNCTION   AddSolid
(   obj1 :HANDLE;
    obj2 :HANDLE;
  VAR  newSolid :HANDLE
) :INTEGER ;

Description:

Function AddSolid creates a new solid addition object from the referenced source objects. If the operation succeeds, the source objects will then be contained within the newSolid object, as the primitives which define the CSG.

Table - Solids Operation Result Codes

Operation Result Result Code
Success 0
Null geometry error 1
Geometry error 2
Out of memory error 4
Bad group error 5
Invalid object type 6
Bad input 20

Parameters:

obj1 Handle to source object for add operation.
obj2 Handle to source object for add operation.
newSolid Handle to resultant object from add operation.

Example:

PROCEDURE Example;
VAR
   h1, h2, h3 :HANDLE;
   int :INTEGER;
BEGIN
   DSelectAll; BeginXtrd(0, 1); CallTool(-203); h1 := FSActLayer; EndXtrd;
   DSelectAll; BeginXtrd(0, 1); CallTool(-203); h2 := FSActLayer; EndXtrd;
   int := AddSolid(h1, h2, h3);
END;
RUN(Example);



  CalcSurfaceArea Objects - Solids 

Declaration:

FUNCTION   CalcSurfaceArea
( solidObject:HANDLE ) :REAL ;

Special Notes:

CalcSurfaceArea is obsolete as of VectorWorks12.5

Description:

Function CalcSurfaceArea calculates the surface area of the referenced solid object. The function supports only valid solids objects.

Parameters:

solidObject Handle to solids object.

Example:

PROCEDURE Example;
VAR
        volume, area: REAL;
BEGIN
        IF FSActLayer <> NIL THEN BEGIN
                volume := CalcVolume(FSActLayer);
                area := CalcSurfaceArea(FSActLayer);
                Message('Volume ', volume, ', surface area ', area);
        END;
END;
RUN(Example);



  CalcVolume Objects - Solids 

Declaration:

FUNCTION   CalcVolume
( solidObject:HANDLE ) :REAL ;

Special Notes:

CalcVolume is obsolete as of VectorWorks12.5

Description:

Function CalcVolume calculates the volume of the referenced solid object. The function supports only valid solids objects.

Parameters:

solidObject Handle to solids object.

Example:

PROCEDURE Example;
VAR
        volume, area: REAL;
BEGIN
        IF FSActLayer <> NIL THEN BEGIN
                volume := CalcVolume(FSActLayer);
                area := CalcSurfaceArea(FSActLayer);
                Message('Volume ', volume, ', surface area ', area);
        END;
END;
RUN(Example);



  CreateCone Objects - Solids 

Declaration:

FUNCTION   CreateCone
(   centerX :REAL;
    centerY :REAL;
    centerZ :REAL;
    tipX :REAL;
    tipY :REAL;
    tipZ :REAL;
    radiusDistance :REAL
) :HANDLE ;

Description:

Creates a 3D cone object in a Vectorworks document.

Parameters:

center Center point of cone.
tip Tip point of cone.
radiusDistance Radius of cone base.

Result:

The function returns a handle to the new cone object.



  CreateHemisphere Objects - Solids 

Declaration:

FUNCTION   CreateHemisphere
(   centerX :REAL;
    centerY :REAL;
    centerZ :REAL;
    topX :REAL;
    topY :REAL;
    topZ :REAL
) :HANDLE ;

Description:

Function CreateHemisphere creates a new hemisphere object in a Vectorworks document.

Parameters:

center Center point of hemisphere.
top Top point of hemisphere.

Result:

The function returns a handle to the new hemisphere object.



  CreateSphere Objects - Solids 

Declaration:

FUNCTION   CreateSphere
(   centerX :REAL;
    centerY :REAL;
    centerZ :REAL;
    radiusDistance :REAL
) :HANDLE ;

Description:

Function CreateSphere creates a new sphere object in a Vectorworks document.

Parameters:

center Center point of sphere.
radiusDistance Radius of sphere.

Result:

The function returns a handle to the new sphere object.



  IntersectSolid Objects - Solids 

Declaration:

FUNCTION   IntersectSolid
(   obj1 :HANDLE;
    obj2 :HANDLE;
  VAR  newSolid :HANDLE
) :INTEGER ;

Description:

Function IntersectSolid creates a new solid intersection object from the referenced source objects.

Table - Solids Operation Result Codes

Operation Result Result Code
Success 0
Null geometry error 1
Geometry error 2
Out of memory error 4
Bad group error 5
Invalid object type 6
Bad input 20

Parameters:

obj1 Handle to source object for intersect operation.
obj2 Handle to source object for intersect operation.
newSolid Handle to resultant object from intersect operation.



  ObjSurfaceArea Objects - Solids 

Declaration:

FUNCTION   ObjSurfaceArea
( solidObject:HANDLE ) :REAL ;

Description:

Function ObjSurfaceArea calculates the surface area of the referenced solid object. The function supports only valid solids objects.

Parameters:

solidObject Handle to solids object.

Example:

PROCEDURE Example;
VAR
        volume, area: REAL;
BEGIN
        IF FSActLayer <> NIL THEN BEGIN
                volume := CalcVolume(FSActLayer);
                area := CalcSurfaceArea(FSActLayer);
                Message('Volume ', volume, ', surface area ', area);
        END;
END;
RUN(Example);



  ObjVolume Objects - Solids 

Declaration:

FUNCTION   ObjVolume
( solidObject:HANDLE ) :REAL ;

Description:

Function ObjVolume calculates the volume of the referenced solid object. The function supports only valid solids objects.

Parameters:

solidObject Handle to solids object.

Example:

PROCEDURE Example;
VAR
        volume, area: REAL;
BEGIN
        IF FSActLayer <> NIL THEN BEGIN
                volume := CalcVolume(FSActLayer);
                area := CalcSurfaceArea(FSActLayer);
                Message('Volume ', volume, ', surface area ', area);
        END;
END;
RUN(Example);



  SubtractSolid Objects - Solids 

Declaration:

FUNCTION   SubtractSolid
(   obj1 :HANDLE;
    obj2 :HANDLE;
  VAR  newSolid :HANDLE
) :INTEGER ;

Description:

Function SubtractSolid creates a new solid subtraction object from the referenced source objects.

Table - Solids Operation Result Codes

Operation Result Result Code
Success 0
Null geometry error 1
Geometry error 2
Out of memory error 4
Bad group error 5
Invalid object type 6
Bad input 20

Parameters:

obj1 Handle to source object for subtract operation.
obj2 Handle to source object for subtract operation.
newSolid Handle to resultant object from subtract operation.