mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
1) Version of VRML format is added to VrmlAPI_Writer::Write() and VrmlAPI::Write() to allow use the both versions of the VRML by one writer. 2) Unification of the command to write VRML of both versions. Now "writevrml" command can write VRLM files of v1.0 and v2.0, with wireframe/shaded/both representations. Parameter "Deflection" was removed (next commit will remove meshing, so parameter will be useless). 3) Meshing is removed from writers of both (v1.0 and v2.0) versions. Shaded representation is skipped in case when a mesh does not exist. Wireframe representation checks the existence of a mesh before. If the mesh exists, a deflected edges are taken from the mesh, otherwise - are generated with the default deflection. 4) Drawing of redundant edges is removed in wireframe representation of VRML version 1.0 (a grid on non-plane surfaces does not match a real edges of TopoDS_Shape and does not match representation in version 2.0). Test case for issue CR25279
49 lines
1.8 KiB
Plaintext
49 lines
1.8 KiB
Plaintext
-- Created on: 2000-05-30
|
|
-- Created by: Sergey MOZOKHIN
|
|
-- Copyright (c) 2000-2014 OPEN CASCADE SAS
|
|
--
|
|
-- This file is part of Open CASCADE Technology software library.
|
|
--
|
|
-- This library is free software; you can redistribute it and/or modify it under
|
|
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
|
-- by the Free Software Foundation, with special exception defined in the file
|
|
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
|
-- distribution for complete text of the license and disclaimer of any warranty.
|
|
--
|
|
-- Alternatively, this file may be used under the terms of Open CASCADE
|
|
-- commercial license or contractual agreement.
|
|
|
|
package VrmlAPI
|
|
|
|
---Purpose: API for writing to VRML 1.0
|
|
|
|
uses
|
|
TopoDS,
|
|
VrmlConverter,
|
|
Vrml,
|
|
Quantity
|
|
is
|
|
enumeration RepresentationOfShape is
|
|
ShadedRepresentation,
|
|
WireFrameRepresentation,
|
|
BothRepresentation
|
|
end RepresentationOfShape;
|
|
---Purpose: Identifies the representation of the shape written
|
|
-- to a VRML file. The available options are :
|
|
-- - VrmlAPI_ShadedRepresentation :
|
|
-- the shape is translated with a shaded representation.
|
|
-- - VrmlAPI_WireFrameRepresentation :
|
|
-- the shape is translated with a wireframe representation.
|
|
-- - VrmlAPI_BothRepresentation : the shape is translated
|
|
-- to VRML format with both representations : shaded and
|
|
-- wireframe. This is the default option.
|
|
|
|
class Writer;
|
|
---Purpose: With help of this class user can change parameters of writing.
|
|
|
|
Write(aShape: Shape from TopoDS; aFileName: CString from Standard; aVersion: Integer = 2);
|
|
---Purpose: Converts the shape aShape to VRML format of the passed version and writes it
|
|
-- to the file identified by aFileName using default parameters.
|
|
|
|
end VrmlAPI;
|