mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-27 15:20:33 +05:00
PR: packaging: from salome.geom import geomBuilder
This commit is contained in:
parent
d5ffe26ccb
commit
f7590bbf59
@ -34,9 +34,6 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
|||||||
# Scripts to be installed.
|
# Scripts to be installed.
|
||||||
dist_salomescript_DATA = \
|
dist_salomescript_DATA = \
|
||||||
geompy.py \
|
geompy.py \
|
||||||
geompyDC.py \
|
|
||||||
gsketcher.py \
|
|
||||||
batchmode_geompy.py \
|
|
||||||
GEOM_Spanner.py \
|
GEOM_Spanner.py \
|
||||||
GEOM_blocks.py \
|
GEOM_blocks.py \
|
||||||
GEOM_example.py \
|
GEOM_example.py \
|
||||||
@ -70,5 +67,13 @@ dist_salomescript_DATA = \
|
|||||||
PAL_MESH_033_geometry.py \
|
PAL_MESH_033_geometry.py \
|
||||||
PAL_MESH_035_geometry.py
|
PAL_MESH_035_geometry.py
|
||||||
|
|
||||||
|
mypkgpythondir = $(salomepythondir)/salome/geom
|
||||||
|
mypkgpython_PYTHON = \
|
||||||
|
geomBuilder.py \
|
||||||
|
gsketcher.py
|
||||||
|
# geompyDC.py
|
||||||
|
# batchmode_geompy.py
|
||||||
|
|
||||||
|
|
||||||
sharedpkgpython_PYTHON = \
|
sharedpkgpython_PYTHON = \
|
||||||
GEOM_shared_modules.py
|
GEOM_shared_modules.py
|
||||||
|
28
src/GEOM_SWIG/__init__.py
Normal file
28
src/GEOM_SWIG/__init__.py
Normal 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
11979
src/GEOM_SWIG/geomBuilder.py
Normal file
File diff suppressed because it is too large
Load Diff
@ -27,7 +27,7 @@
|
|||||||
# Module : GEOM
|
# Module : GEOM
|
||||||
#
|
#
|
||||||
import salome
|
import salome
|
||||||
import geompyDC
|
from salome.geom import geomBuilder
|
||||||
from salome import *
|
from salome import *
|
||||||
|
|
||||||
# retrieve GEOM engine in try/except block
|
# retrieve GEOM engine in try/except block
|
||||||
@ -35,15 +35,15 @@ from salome import *
|
|||||||
try:
|
try:
|
||||||
# get GEOM engine and initialize GEOM with current study
|
# get GEOM engine and initialize GEOM with current study
|
||||||
engineGeom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
|
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 ):
|
for k in dir( geom ):
|
||||||
if k[0] == '_': continue
|
if k[0] == '_': continue
|
||||||
globals()[k] = getattr( geom, k )
|
globals()[k] = getattr( geom, k )
|
||||||
pass
|
pass
|
||||||
del k
|
del k
|
||||||
from geompyDC import ShapeType, GEOM, kind, info, PackData, ReadTexture, EnumToLong
|
from geomBuilder import ShapeType, GEOM, kind, info, PackData, ReadTexture, EnumToLong
|
||||||
pass
|
pass
|
||||||
except:
|
except:
|
||||||
geom = None
|
geom = None
|
||||||
@ -66,8 +66,8 @@ geompy.init_geom(theStudy) |
|
|||||||
with |
|
with |
|
||||||
---- |
|
---- |
|
||||||
|
|
|
|
||||||
import geompyDC |
|
from salome.geom import geomBuilder |
|
||||||
geompy = geompyDC.geomInstance(theStudy) |
|
geompy = geomBuilder.New(theStudy) |
|
||||||
|
|
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
"""
|
"""
|
||||||
|
@ -275,7 +275,7 @@ class Sketcher3D:
|
|||||||
sk.addPointsRelative(0,0,130, 70,0,-130)
|
sk.addPointsRelative(0,0,130, 70,0,-130)
|
||||||
a3D_Sketcher_1 = sk.wire()
|
a3D_Sketcher_1 = sk.wire()
|
||||||
"""
|
"""
|
||||||
from geompyDC import ParseSketcherCommand, RaiseIfFailed
|
from geomBuilder import ParseSketcherCommand, RaiseIfFailed
|
||||||
Command,Parameters = ParseSketcherCommand(self.myCommand)
|
Command,Parameters = ParseSketcherCommand(self.myCommand)
|
||||||
wire = self.geompyD.CurvesOp.Make3DSketcherCommand(Command)
|
wire = self.geompyD.CurvesOp.Make3DSketcherCommand(Command)
|
||||||
self.myCommand = "3DSketcher"
|
self.myCommand = "3DSketcher"
|
||||||
|
Loading…
Reference in New Issue
Block a user