PR: packaging: from salome.geom import geomBuilder

This commit is contained in:
prascle 2013-02-24 20:53:18 +00:00
parent d5ffe26ccb
commit f7590bbf59
5 changed files with 12022 additions and 10 deletions

View File

@ -34,9 +34,6 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am
# Scripts to be installed.
dist_salomescript_DATA = \
geompy.py \
geompyDC.py \
gsketcher.py \
batchmode_geompy.py \
GEOM_Spanner.py \
GEOM_blocks.py \
GEOM_example.py \
@ -70,5 +67,13 @@ dist_salomescript_DATA = \
PAL_MESH_033_geometry.py \
PAL_MESH_035_geometry.py
mypkgpythondir = $(salomepythondir)/salome/geom
mypkgpython_PYTHON = \
geomBuilder.py \
gsketcher.py
# geompyDC.py
# batchmode_geompy.py
sharedpkgpython_PYTHON = \
GEOM_shared_modules.py

28
src/GEOM_SWIG/__init__.py Normal file
View File

@ -0,0 +1,28 @@
# -*- coding: iso-8859-1 -*-
# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
# GEOM GEOM_SWIG : binding of C++ omplementaion with Python
# File : __init__.py
# Author : Paul RASCLE, EDF
# Module : GEOM
#

11979
src/GEOM_SWIG/geomBuilder.py Normal file

File diff suppressed because it is too large Load Diff

View File

@ -27,7 +27,7 @@
# Module : GEOM
#
import salome
import geompyDC
from salome.geom import geomBuilder
from salome import *
# retrieve GEOM engine in try/except block
@ -35,15 +35,15 @@ from salome import *
try:
# get GEOM engine and initialize GEOM with current study
engineGeom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
geom = geompyDC.geomInstance(salome.myStudy, engineGeom)
geom = geomBuilder.geomInstance(salome.myStudy, engineGeom)
# export the methods of geompyDC
# export the methods of geomBuilder
for k in dir( geom ):
if k[0] == '_': continue
globals()[k] = getattr( geom, k )
pass
del k
from geompyDC import ShapeType, GEOM, kind, info, PackData, ReadTexture, EnumToLong
from geomBuilder import ShapeType, GEOM, kind, info, PackData, ReadTexture, EnumToLong
pass
except:
geom = None
@ -66,8 +66,8 @@ geompy.init_geom(theStudy) |
with |
---- |
|
import geompyDC |
geompy = geompyDC.geomInstance(theStudy) |
from salome.geom import geomBuilder |
geompy = geomBuilder.New(theStudy) |
|
===============================================================================
"""

View File

@ -275,7 +275,7 @@ class Sketcher3D:
sk.addPointsRelative(0,0,130, 70,0,-130)
a3D_Sketcher_1 = sk.wire()
"""
from geompyDC import ParseSketcherCommand, RaiseIfFailed
from geomBuilder import ParseSketcherCommand, RaiseIfFailed
Command,Parameters = ParseSketcherCommand(self.myCommand)
wire = self.geompyD.CurvesOp.Make3DSketcherCommand(Command)
self.myCommand = "3DSketcher"