Re: [Pythonocc-users] Export Solid to STEP-File

2010-10-11 Thread Jens Cornelis
Hi Thomas,

i will give it a try. Exchange formats always cause pain, especially
when they are continuously evolving. I will let you know, what results i
had with AP203 using the svn-snapshot.

Thanks a lot!
Regards

JC

Thomas Paviot schrieb:
> Hello Marco,
>
> Of course I agree with you. I should have said : "Under
> the assumption that the vendors implement the standard and strictly
> comply with it, [blabla]". I confess it's a strong assumption! But
> necessary for anyone believing in the STEP standard and its potential
> to save time and money. There's still a huge amount of work to be
> achieved, but let's keep optimistic.
>
> All the best,
>
> Thomas
>
> 2010/10/11 M. Nawijn mailto:naw...@gmail.com>>
>
> Hello Thomas,
>
> I must agree with you that in general STEP would be the preferred
> option
> to exchange geometry. I have had this kind of discussion many
> times. There
> are however some subtleties. One is that it the enriched semantics
> of STEP is
> of no use when the target application does not support it. This is
> still the case with
> many industry standard FEA programs for example.
>
> In the end it really depends on the quality of the exporters and
> importers. We have
> had examples of very complex CAD (single part) models that provided a
> better quality
> for meshing purposes when imported through IGES than through STEP.
>
> Kind regards,
>
> Marco
>
>
> On Mon, Oct 11, 2010 at 2:36 PM, Thomas Paviot  > wrote:
> > Jens,
> > By default, pythonOCC exports STEP files using the AP214 schema.
> After you
> > export the step file with Abaqus, the schema used is not the
> AP214 anymore
> > but the AP203 : when dealing with standard files import/export
> issues, the
> > problems may arise from the exporter and/or the importer, and
> it's not
> > obvious to find out the responsible of the issue. Using the same
> STEP schema
> > for import/export ensures the semantics consistency of the
> exchange process.
> > Is there any option, in Abaqus, to use the AP214 instead of the
> AP203?
> > If you use the latest pythonOCC release (0.4), you can't change
> the default
> > behavior (AP214) of the STEP exporter. However, the latest
> revision of the
> > svn trunk makes it possible (see this
> >
> discussion: 
> http://www.mail-archive.com/pythonocc-users@gna.org/msg01462.html).
> > At last, I'm not sure whether or not the exchanges based upon
> the IGES
> > standard are still a good way to proceed. I would say 'no',
> since the STEP
> > scope is much wider than the IGES one (which is only intended to
> geometry)
> > and, as a consequence, more suitable for industrial processes.
> >
> > Regards,
> > Thomas
> >
> > 2010/10/11 Jens Cornelis  >
> >>
> >> Hi Jelle, hi Thomas,
> >>
> >> btw: exporting the same shape to a IGES file and imorting in Abaqus
> >> works fine. Abaqus imports it as a solid, just as expected. The
> issue is
> >> only when exporting to STEP (the preferred file format.)
> >>
> >> Maybe this information is somehow interesting for you?
> >>
> >> Cheers
> >>
> >> JC
> >>
> >> ___
> >> Pythonocc-users mailing list
> >> Pythonocc-users@gna.org 
> >> https://mail.gna.org/listinfo/pythonocc-users
> >
> >
> > ___
> > Pythonocc-users mailing list
> > Pythonocc-users@gna.org 
> > https://mail.gna.org/listinfo/pythonocc-users
> >
> >
>
> ___
> Pythonocc-users mailing list
> Pythonocc-users@gna.org 
> https://mail.gna.org/listinfo/pythonocc-users
>
>
> 
>
> ___
> Pythonocc-users mailing list
> Pythonocc-users@gna.org
> https://mail.gna.org/listinfo/pythonocc-users
>   


-- 

Jens Cornelis
Fraunhofer-Institut fuer Werkstoffmechanik IWM
Woehlerstr. 11
79108 Freiburg
Telefon +49 761 5142-280
Fax +49 761 5142-110
jens.corne...@iwm.fraunhofer.de
www.iwm.fraunhofer.de


___
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users


Re: [Pythonocc-users] Export Solid to STEP-File

2010-10-11 Thread Jelle Feringa
> If you use the latest pythonOCC release (0.4), you can't change the default 
> behavior (AP214) of the STEP exporter. However, the latest revision of the 
> svn trunk makes it possible (see this discussion: 
> http://www.mail-archive.com/pythonocc-users@gna.org/msg01462.html).

That's absolutely impressive.
We should add a "schema" argument to the STEPExport  .__init__

-jelle___
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users


Re: [Pythonocc-users] Export Solid to STEP-File

2010-10-11 Thread Thomas Paviot
Hello Marco,

Of course I agree with you. I should have said : "Under the assumption that
the vendors implement the standard and strictly comply with it, [blabla]". I
confess it's a strong assumption! But necessary for anyone believing in the
STEP standard and its potential to save time and money. There's still a huge
amount of work to be achieved, but let's keep optimistic.

All the best,

Thomas

2010/10/11 M. Nawijn 

> Hello Thomas,
>
> I must agree with you that in general STEP would be the preferred option
> to exchange geometry. I have had this kind of discussion many times. There
> are however some subtleties. One is that it the enriched semantics of STEP
> is
> of no use when the target application does not support it. This is
> still the case with
> many industry standard FEA programs for example.
>
> In the end it really depends on the quality of the exporters and
> importers. We have
> had examples of very complex CAD (single part) models that provided a
> better quality
> for meshing purposes when imported through IGES than through STEP.
>
> Kind regards,
>
> Marco
>
>
> On Mon, Oct 11, 2010 at 2:36 PM, Thomas Paviot  wrote:
> > Jens,
> > By default, pythonOCC exports STEP files using the AP214 schema. After
> you
> > export the step file with Abaqus, the schema used is not the AP214
> anymore
> > but the AP203 : when dealing with standard files import/export issues,
> the
> > problems may arise from the exporter and/or the importer, and it's not
> > obvious to find out the responsible of the issue. Using the same STEP
> schema
> > for import/export ensures the semantics consistency of the exchange
> process.
> > Is there any option, in Abaqus, to use the AP214 instead of the AP203?
> > If you use the latest pythonOCC release (0.4), you can't change the
> default
> > behavior (AP214) of the STEP exporter. However, the latest revision of
> the
> > svn trunk makes it possible (see this
> > discussion:
> http://www.mail-archive.com/pythonocc-users@gna.org/msg01462.html).
> > At last, I'm not sure whether or not the exchanges based upon the IGES
> > standard are still a good way to proceed. I would say 'no', since the
> STEP
> > scope is much wider than the IGES one (which is only intended to
> geometry)
> > and, as a consequence, more suitable for industrial processes.
> >
> > Regards,
> > Thomas
> >
> > 2010/10/11 Jens Cornelis 
> >>
> >> Hi Jelle, hi Thomas,
> >>
> >> btw: exporting the same shape to a IGES file and imorting in Abaqus
> >> works fine. Abaqus imports it as a solid, just as expected. The issue is
> >> only when exporting to STEP (the preferred file format.)
> >>
> >> Maybe this information is somehow interesting for you?
> >>
> >> Cheers
> >>
> >> JC
> >>
> >> ___
> >> Pythonocc-users mailing list
> >> Pythonocc-users@gna.org
> >> https://mail.gna.org/listinfo/pythonocc-users
> >
> >
> > ___
> > Pythonocc-users mailing list
> > Pythonocc-users@gna.org
> > https://mail.gna.org/listinfo/pythonocc-users
> >
> >
>
> ___
> Pythonocc-users mailing list
> Pythonocc-users@gna.org
> https://mail.gna.org/listinfo/pythonocc-users
>
___
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users


Re: [Pythonocc-users] Export Solid to STEP-File

2010-10-11 Thread M. Nawijn
Hello Thomas,

I must agree with you that in general STEP would be the preferred option
to exchange geometry. I have had this kind of discussion many times. There
are however some subtleties. One is that it the enriched semantics of STEP is
of no use when the target application does not support it. This is
still the case with
many industry standard FEA programs for example.

In the end it really depends on the quality of the exporters and
importers. We have
had examples of very complex CAD (single part) models that provided a
better quality
for meshing purposes when imported through IGES than through STEP.

Kind regards,

Marco


On Mon, Oct 11, 2010 at 2:36 PM, Thomas Paviot  wrote:
> Jens,
> By default, pythonOCC exports STEP files using the AP214 schema. After you
> export the step file with Abaqus, the schema used is not the AP214 anymore
> but the AP203 : when dealing with standard files import/export issues, the
> problems may arise from the exporter and/or the importer, and it's not
> obvious to find out the responsible of the issue. Using the same STEP schema
> for import/export ensures the semantics consistency of the exchange process.
> Is there any option, in Abaqus, to use the AP214 instead of the AP203?
> If you use the latest pythonOCC release (0.4), you can't change the default
> behavior (AP214) of the STEP exporter. However, the latest revision of the
> svn trunk makes it possible (see this
> discussion: http://www.mail-archive.com/pythonocc-users@gna.org/msg01462.html).
> At last, I'm not sure whether or not the exchanges based upon the IGES
> standard are still a good way to proceed. I would say 'no', since the STEP
> scope is much wider than the IGES one (which is only intended to geometry)
> and, as a consequence, more suitable for industrial processes.
>
> Regards,
> Thomas
>
> 2010/10/11 Jens Cornelis 
>>
>> Hi Jelle, hi Thomas,
>>
>> btw: exporting the same shape to a IGES file and imorting in Abaqus
>> works fine. Abaqus imports it as a solid, just as expected. The issue is
>> only when exporting to STEP (the preferred file format.)
>>
>> Maybe this information is somehow interesting for you?
>>
>> Cheers
>>
>> JC
>>
>> ___
>> Pythonocc-users mailing list
>> Pythonocc-users@gna.org
>> https://mail.gna.org/listinfo/pythonocc-users
>
>
> ___
> Pythonocc-users mailing list
> Pythonocc-users@gna.org
> https://mail.gna.org/listinfo/pythonocc-users
>
>

___
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users


Re: [Pythonocc-users] Export Solid to STEP-File

2010-10-11 Thread Thomas Paviot
Sorry : "responsible for the issue" is not the correct expression in my
previous message, and can lead to a misunderstanding (it's a bad translation
for the french word "responsable", which can have two meanings). I meant
that it can be very difficult to find whether the issue, in the information
exchange, comes from the importer or the exporter (or both), especially when
the importers/exporters are components of a closed source CAD software.

Thomas

2010/10/11 Thomas Paviot 

> Jens,
>
> By default, pythonOCC exports STEP files using the AP214 schema. After you
> export the step file with Abaqus, the schema used is not the AP214 anymore
> but the AP203 : when dealing with standard files import/export issues, the
> problems may arise from the exporter and/or the importer, and it's not
> obvious to find out the responsible of the issue. Using the same STEP schema
> for import/export ensures the semantics consistency of the exchange process.
> Is there any option, in Abaqus, to use the AP214 instead of the AP203?
>
> If you use the latest pythonOCC release (0.4), you can't change the default
> behavior (AP214) of the STEP exporter. However, the latest revision of the
> svn trunk makes it possible (see this discussion:
> http://www.mail-archive.com/pythonocc-users@gna.org/msg01462.html).
>
> At last, I'm not sure whether or not the exchanges based upon the IGES
> standard are still a good way to proceed. I would say 'no', since the STEP
> scope is much wider than the IGES one (which is only intended to geometry)
> and, as a consequence, more suitable for industrial processes.
>
> Regards,
>
> Thomas
>
> 2010/10/11 Jens Cornelis 
>
> Hi Jelle, hi Thomas,
>>
>> btw: exporting the same shape to a IGES file and imorting in Abaqus
>> works fine. Abaqus imports it as a solid, just as expected. The issue is
>> only when exporting to STEP (the preferred file format.)
>>
>> Maybe this information is somehow interesting for you?
>>
>> Cheers
>>
>> JC
>>
>> ___
>> Pythonocc-users mailing list
>> Pythonocc-users@gna.org
>> https://mail.gna.org/listinfo/pythonocc-users
>>
>
>
___
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users


Re: [Pythonocc-users] Export Solid to STEP-File

2010-10-11 Thread Thomas Paviot
Jens,

By default, pythonOCC exports STEP files using the AP214 schema. After you
export the step file with Abaqus, the schema used is not the AP214 anymore
but the AP203 : when dealing with standard files import/export issues, the
problems may arise from the exporter and/or the importer, and it's not
obvious to find out the responsible of the issue. Using the same STEP schema
for import/export ensures the semantics consistency of the exchange process.
Is there any option, in Abaqus, to use the AP214 instead of the AP203?

If you use the latest pythonOCC release (0.4), you can't change the default
behavior (AP214) of the STEP exporter. However, the latest revision of the
svn trunk makes it possible (see this discussion:
http://www.mail-archive.com/pythonocc-users@gna.org/msg01462.html).

At last, I'm not sure whether or not the exchanges based upon the IGES
standard are still a good way to proceed. I would say 'no', since the STEP
scope is much wider than the IGES one (which is only intended to geometry)
and, as a consequence, more suitable for industrial processes.

Regards,

Thomas

2010/10/11 Jens Cornelis 

> Hi Jelle, hi Thomas,
>
> btw: exporting the same shape to a IGES file and imorting in Abaqus
> works fine. Abaqus imports it as a solid, just as expected. The issue is
> only when exporting to STEP (the preferred file format.)
>
> Maybe this information is somehow interesting for you?
>
> Cheers
>
> JC
>
> ___
> Pythonocc-users mailing list
> Pythonocc-users@gna.org
> https://mail.gna.org/listinfo/pythonocc-users
>
___
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users


Re: [Pythonocc-users] Export Solid to STEP-File

2010-10-11 Thread Jens Cornelis
Hi Jelle,

yeah, it is confusing me too. Actually you can command Abaqus to import
IGES parts as solid. I guess it internally checks if the shells
boundaries are okay and treats it as a solid, as IGES itself does not
support solids.

I already sent the 2 step files at 1:25 pm. Didn't you receive them? I
checked the mailing list and they should be in your mail.

JC

jelle feringa schrieb:
>
> btw: exporting the same shape to a IGES file and imorting in Abaqus
> works fine. Abaqus imports it as a solid, just as expected. The
> issue is
> only when exporting to STEP (the preferred file format.)
>
> Maybe this information is somehow interesting for you?
>
>
> i'm flabbergasted; IGES does not support solids, STEP does.
> so, this is the inverse of what _should_ be happening...
> very peculiar... 
> again, can you send us the 2 step files?
>
> -jelle
> 
>
> ___
> Pythonocc-users mailing list
> Pythonocc-users@gna.org
> https://mail.gna.org/listinfo/pythonocc-users
>   


-- 

Jens Cornelis
Fraunhofer-Institut fuer Werkstoffmechanik IWM
Woehlerstr. 11
79108 Freiburg
Telefon +49 761 5142-280
Fax +49 761 5142-110
jens.corne...@iwm.fraunhofer.de
www.iwm.fraunhofer.de


___
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users


Re: [Pythonocc-users] Export Solid to STEP-File

2010-10-11 Thread M. Nawijn
Hi All,

IGES indeed does not support solids, however, many CAD/FEM programs
are smart enought to
detect if a set of surfaces encloses a closed volume. In that case, a
solid is generated by the
CAD/FEM software.

Marco

On Mon, Oct 11, 2010 at 1:49 PM, jelle feringa  wrote:
>> btw: exporting the same shape to a IGES file and imorting in Abaqus
>> works fine. Abaqus imports it as a solid, just as expected. The issue is
>> only when exporting to STEP (the preferred file format.)
>>
>> Maybe this information is somehow interesting for you?
>
> i'm flabbergasted; IGES does not support solids, STEP does.
> so, this is the inverse of what _should_ be happening...
> very peculiar...
> again, can you send us the 2 step files?
> -jelle
> ___
> Pythonocc-users mailing list
> Pythonocc-users@gna.org
> https://mail.gna.org/listinfo/pythonocc-users
>
>

___
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users


Re: [Pythonocc-users] Export Solid to STEP-File

2010-10-11 Thread jelle feringa
>
> btw: exporting the same shape to a IGES file and imorting in Abaqus
> works fine. Abaqus imports it as a solid, just as expected. The issue is
> only when exporting to STEP (the preferred file format.)
>
> Maybe this information is somehow interesting for you?
>

i'm flabbergasted; IGES does not support solids, STEP does.
so, this is the inverse of what _should_ be happening...
very peculiar...
again, can you send us the 2 step files?

-jelle
___
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users


Re: [Pythonocc-users] Export Solid to STEP-File

2010-10-11 Thread Jens Cornelis
Hi Jelle, hi Thomas,

btw: exporting the same shape to a IGES file and imorting in Abaqus
works fine. Abaqus imports it as a solid, just as expected. The issue is
only when exporting to STEP (the preferred file format.)

Maybe this information is somehow interesting for you?

Cheers

JC

___
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users


Re: [Pythonocc-users] Export Solid to STEP-File

2010-10-11 Thread Jens Cornelis
hi Jelle, Hi Thomas,

the files i sent some minutes ago were from another shape.

Here are the files for the pyramid. Problem is the same for both shapes.
Abaqus does not import them as solid, but as a shell. Converting to
solid in abaqus results in the attach abaqus.stp file.

JC

Jelle Feringa schrieb:
> Hi Jens,
>
> Could you send a file of the shape you've made (pyramid), and the abaqus file 
> ( pyocc.step / abaqus.step )?
> Thanks,
>
> -jelle
> ___
> Pythonocc-users mailing list
> Pythonocc-users@gna.org
> https://mail.gna.org/listinfo/pythonocc-users
>   


-- 

Jens Cornelis
Fraunhofer-Institut fuer Werkstoffmechanik IWM
Woehlerstr. 11
79108 Freiburg
Telefon +49 761 5142-280
Fax +49 761 5142-110
jens.corne...@iwm.fraunhofer.de
www.iwm.fraunhofer.de

from OCC.Utils.Construct import *
from OCC.Utils.Common import *
from OCC.Utils.DataExchange.STEP import STEPExporter
from OCC.KBE.TypesLookup import *
from OCC.Display.SimpleGui import init_display
display, start_display, add_menu, add_function_to_menu = init_display()

faces = {}
p1,p2,p3,p4 = gp_Pnt(0,0,0),gp_Pnt(-5,-5,-5),gp_Pnt(5,-5,-5),gp_Pnt(0,0,0)
faces[0] = make_face(make_polygon((p1,p2,p3,p4)))

p1,p2,p3,p4 = gp_Pnt(0,0,0),gp_Pnt(-5,-5,-5),gp_Pnt(-5,5,-5),gp_Pnt(0,0,0)
faces[1] = make_face(make_polygon((p1,p2,p3,p4)))

p1,p2,p3,p4 = gp_Pnt(0,0,0),gp_Pnt(-5,5,-5),gp_Pnt(5,5,-5),gp_Pnt(0,0,0)
faces[2] = make_face(make_polygon((p1,p2,p3,p4)))

p1,p2,p3,p4 = gp_Pnt(0,0,0),gp_Pnt(5,5,-5),gp_Pnt(5,-5,-5),gp_Pnt(0,0,0)
faces[3] = make_face(make_polygon((p1,p2,p3,p4)))

p1,p2,p3,p4,p5 = gp_Pnt(-5,-5,-5),gp_Pnt(-5,5,-5),gp_Pnt(5,5,-5),gp_Pnt(5,-5,-5), gp_Pnt(-5,-5,-5)
faces[4] = make_face(make_polygon((p1,p2,p3,p4,p5)))

sewing = sew_shapes(faces.values())
sewing = fix_shape(sewing)
stt = ShapeToTopology()
solid = make_solid(stt(sewing))
display.DisplayShape(solid)

# Export to STEP
my_step_exporter = STEPExporter("pyocc.stp")
my_step_exporter.AddShape(solid)
my_step_exporter.WriteFile()

start_display()ISO-10303-21;
HEADER;
FILE_DESCRIPTION(('STEP AP203'),'1');
FILE_NAME('/home/cor/abaqus.stp','2010-10-11T11:22:27',(' '),(' '),'Spatial 
InterOp 3D',' ',' ');
FILE_SCHEMA(('CONFIG_CONTROL_DESIGN'));
ENDSEC;
DATA;
#1=DESIGN_CONTEXT('',#27,'design');
#2=APPLICATION_PROTOCOL_DEFINITION('INTERNATIONAL 
STANDARD','config_control_design',1994,#27);
#3=PRODUCT_CATEGORY_RELATIONSHIP('NONE','NONE',#28,#29);
#4=DATE_AND_TIME(#30,#31);
#5=DATE_TIME_ROLE('creation_date');
#6=DATE_TIME_ROLE('classification_date');
#7=PERSON_AND_ORGANIZATION_ROLE('creator');
#8=PERSON_AND_ORGANIZATION_ROLE('design_supplier');
#9=PERSON_AND_ORGANIZATION_ROLE('classification_officer');
#10=PERSON_AND_ORGANIZATION_ROLE('design_owner');
#11=APPROVAL_PERSON_ORGANIZATION(#32,#33,#34);
#12=APPROVAL_DATE_TIME(#4,#33);
#13=CC_DESIGN_APPROVAL(#33,(#35,#36,#37));
#14=CC_DESIGN_DATE_AND_TIME_ASSIGNMENT(#4,#5,(#37));
#15=CC_DESIGN_DATE_AND_TIME_ASSIGNMENT(#4,#6,(#35));
#16=CC_DESIGN_PERSON_AND_ORGANIZATION_ASSIGNMENT(#32,#10,(#38));
#17=CC_DESIGN_PERSON_AND_ORGANIZATION_ASSIGNMENT(#32,#7,(#37));
#18=CC_DESIGN_PERSON_AND_ORGANIZATION_ASSIGNMENT(#32,#7,(#36));
#19=CC_DESIGN_PERSON_AND_ORGANIZATION_ASSIGNMENT(#32,#8,(#36));
#20=CC_DESIGN_SECURITY_CLASSIFICATION(#35,(#36));
#21=CC_DESIGN_PERSON_AND_ORGANIZATION_ASSIGNMENT(#32,#9,(#35));
#22=SHAPE_DEFINITION_REPRESENTATION(#39,#40);
#23= 
(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#43))GLOBAL_UNIT_ASSIGNED_CONTEXT((#45,#46,#47))REPRESENTATION_CONTEXT('NONE','WORKSPACE'));
#27=APPLICATION_CONTEXT('CONFIGURATION CONTROLLED 3D DESIGNS OF MECHANICAL 
PARTS AND ASSEMBLIES');
#28=PRODUCT_CATEGORY('part','NONE');
#29=PRODUCT_RELATED_PRODUCT_CATEGORY('detail',' ',(#38));
#30=CALENDAR_DATE(2010,11,9);
#31=LOCAL_TIME(13,22,27.0,#49);
#32=PERSON_AND_ORGANIZATION(#50,#51);
#33=APPROVAL(#52,'SOLID MODEL');
#34=APPROVAL_ROLE('APPROVED');
#35=SECURITY_CLASSIFICATION('','',#53);
#36=PRODUCT_DEFINITION_FORMATION_WITH_SPECIFIED_SOURCE(' 
','NONE',#38,.NOT_KNOWN.);
#37=PRODUCT_DEFINITION('NONE','NONE',#36,#1);
#38=PRODUCT('1','1','PART-1-DESC',(#54));
#39=PRODUCT_DEFINITION_SHAPE('NONE','NONE',#37);
#40=ADVANCED_BREP_SHAPE_REPRESENTATION('1',(#55,#56),#23);
#43=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-06),#45,'','');
#45= (CONVERSION_BASED_UNIT('MILLIMETRE',#59)LENGTH_UNIT()NAMED_UNIT(#62));
#46= (NAMED_UNIT(#64)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
#47= (NAMED_UNIT(#64)SOLID_ANGLE_UNIT()SI_UNIT($,.STERADIAN.));
#49=COORDINATED_UNIVERSAL_TIME_OFFSET(1,0,.AHEAD.);
#50=PERSON('','UNSPECIFIED',$,$,$,$);
#51=ORGANIZATION('UNSPECIFIED','UNSPECIFIED','UNSPECIFIED');
#52=APPROVAL_STATUS('approved');
#53=SECURITY_CLASSIFICATION_LEVEL('unclassified');
#54=MECHANICAL_CONTEXT('',#27,'mechanical');
#55=MANIFOLD_SOLID_BREP('1',#70);
#56=AXIS2_PLACEMENT_3D('',#71,#72,#73);
#59=LENGTH_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0),#74);
#62=DIMENSIONAL_EXPONENTS(1.0,0.0,0.0,0.0,0.0,0.0,0.0);
#64=DIMENSIONAL_EX

Re: [Pythonocc-users] Export Solid to STEP-File

2010-10-11 Thread Jelle Feringa
Hi Jens,

Could you send a file of the shape you've made (pyramid), and the abaqus file ( 
pyocc.step / abaqus.step )?
Thanks,

-jelle
___
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users


Re: [Pythonocc-users] Export Solid to STEP-File

2010-10-11 Thread Jens Cornelis
Hi Thomas,

i attached the script and the resulting step file. I also attached the
step file which is created by Abaqus after having converted the imported
shell to a solid.

Hope this gives you a clue. I have no idea what goes wrong. Maybe it is
something wrong with my topology, because creating a Cube using
BRepPrimAPI_MakeBox and converting it to a solid works like a charm when
importing in Abaqus.

Thanks a lot!!

JC

Thomas Paviot schrieb:
> Hi Jens,
>
> Could you post the code you use to cut the shape/export to STEP with
> pythonOCC? I'd like too see what the step file looks like (could be
> interesting that you also attach the Abaqus step file modified).
>
> Best Regards,
>
> Thomas
>
> 2010/10/11 jelle feringa  >
>
> Hi Jens,
>
> The materials lab at the Fraunhofer must be a cool place to work!
> Happy to hear you like PythonOCC!
>
> Regarding the shell issue, I don't really get it... perhaps Thomas
> ( who's the STEP expert! ) has an idea?
> Anyway, happy you're able to generate the shapes you need!
> Still, I do think its important to be able to see what you're doing ;)
>
> Take care,
>
> -jelle
>
>
> On Mon, Oct 11, 2010 at 11:44 AM, Jens Cornelis
>  > wrote:
>
> Hi Jelle,
>
> thanks for your reply. At first: i work as a student research
> assistant
> and i came across PyOCC just yesterday when i searched for
> libraries to
> create step format files, when i realized that PyOCC is much,
> much more.
> I am enrolled in a masters program for computer science and i
> doing the
> programming tasks for a department focusing on materials
> research.  It
> is very cool and i like very much, what i have seen so far.
> Thanks a lot
> for your great work!
>
> Actually, the file is still imported as a Shell, but not as a
> solid.
> This is what the skript looks like (without diplay
> instructions as i
> have no TK installed):
> 
> from OCC.Utils.Construct import *
> from OCC.Utils.Common import *
> from OCC.Utils.DataExchange.STEP import STEPExporter
> from OCC.KBE.TypesLookup import *
>
> faces = {}
> p1,p2,p3,p4 =
> gp_Pnt(0,0,0),gp_Pnt(-5,-5,-5),gp_Pnt(5,-5,-5),gp_Pnt(0,0,0)
> faces[0] = make_face(make_polygon((p1,p2,p3,p4)))
>
> p1,p2,p3,p4 =
> gp_Pnt(0,0,0),gp_Pnt(-5,-5,-5),gp_Pnt(-5,5,-5),gp_Pnt(0,0,0)
> faces[1] = make_face(make_polygon((p1,p2,p3,p4)))
>
> p1,p2,p3,p4 =
> gp_Pnt(0,0,0),gp_Pnt(-5,5,-5),gp_Pnt(5,5,-5),gp_Pnt(0,0,0)
> faces[2] = make_face(make_polygon((p1,p2,p3,p4)))
>
> p1,p2,p3,p4 =
> gp_Pnt(0,0,0),gp_Pnt(5,5,-5),gp_Pnt(5,-5,-5),gp_Pnt(0,0,0)
> faces[3] = make_face(make_polygon((p1,p2,p3,p4)))
>
> p1,p2,p3,p4,p5 =
> gp_Pnt(-5,-5,-5),gp_Pnt(-5,5,-5),gp_Pnt(5,5,-5),gp_Pnt(5,-5,-5),
> gp_Pnt(-5,-5,-5)
>
> poly = make_polygon([p1,p2,p3,p4,p5])
> faces[4] = make_face(poly)
>
> sewing = sew_shapes(faces.values())
> sewing = fix_shape(sewing)
> stt = ShapeToTopology()
> solid = make_solid(stt(sewing))
>
> # Export to STEP
> my_step_exporter = STEPExporter("pyramid.stp")
> my_step_exporter.AddShape(solid)
> my_step_exporter.WriteFile()
> _
>
> And this is what the console says:
> _
> n degenerated shapes 0
> n deleted faces: 0
> n free edges 0
> n multiple edges: 0
>
> ***
> **Statistics on Transfer (Write)
> **
>
> ***
> **Transfer Mode = 0  I.E.  As Is   **
> **Transferring Shape, ShapeType = 2  
>**
> ** WorkSession : Sending all data
>  Step File Name : vogon.stp(245 ents)  Write  Done
> STEP transfer successful
> 
>
> Seems as if everything worked fine. As you can see on the
> screenshots,
> the pyramid is imported without any errors (except the
> message, that it
> is imported as shell instead of solid).
>
> If i cut the Pyramid, you can see that it is hollow. Using
> Abaqus to
> "Create Solid from Shell" creates a solid. This just works
> fine, but i
> don't see, why it is not imported as a solid in the first
> step. When i
> export the solid from Abaqus and import this file once again,
> it is
> imported as solid.
>
> Any ideas? Maybe i still am doing something wro

Re: [Pythonocc-users] Export Solid to STEP-File

2010-10-11 Thread Jelle Feringa
> Could you post the code you use to cut the shape/export to STEP with 
> pythonOCC? I'd like too see what the step file looks like (could be 
> interesting that you also attach the Abaqus step file modified).

definitely best to send both ;)
thanks...
___
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users


Re: [Pythonocc-users] Export Solid to STEP-File

2010-10-11 Thread Thomas Paviot
Hi Jens,

Could you post the code you use to cut the shape/export to STEP with
pythonOCC? I'd like too see what the step file looks like (could be
interesting that you also attach the Abaqus step file modified).

Best Regards,

Thomas

2010/10/11 jelle feringa 

> Hi Jens,
>
> The materials lab at the Fraunhofer must be a cool place to work!
> Happy to hear you like PythonOCC!
>
> Regarding the shell issue, I don't really get it... perhaps Thomas ( who's
> the STEP expert! ) has an idea?
> Anyway, happy you're able to generate the shapes you need!
> Still, I do think its important to be able to see what you're doing ;)
>
> Take care,
>
> -jelle
>
>
> On Mon, Oct 11, 2010 at 11:44 AM, Jens Cornelis <
> jens.corne...@iwm.fraunhofer.de> wrote:
>
>> Hi Jelle,
>>
>> thanks for your reply. At first: i work as a student research assistant
>> and i came across PyOCC just yesterday when i searched for libraries to
>> create step format files, when i realized that PyOCC is much, much more.
>> I am enrolled in a masters program for computer science and i doing the
>> programming tasks for a department focusing on materials research.  It
>> is very cool and i like very much, what i have seen so far. Thanks a lot
>> for your great work!
>>
>> Actually, the file is still imported as a Shell, but not as a solid.
>> This is what the skript looks like (without diplay instructions as i
>> have no TK installed):
>> 
>> from OCC.Utils.Construct import *
>> from OCC.Utils.Common import *
>> from OCC.Utils.DataExchange.STEP import STEPExporter
>> from OCC.KBE.TypesLookup import *
>>
>> faces = {}
>> p1,p2,p3,p4 = gp_Pnt(0,0,0),gp_Pnt(-5,-5,-5),gp_Pnt(5,-5,-5),gp_Pnt(0,0,0)
>> faces[0] = make_face(make_polygon((p1,p2,p3,p4)))
>>
>> p1,p2,p3,p4 = gp_Pnt(0,0,0),gp_Pnt(-5,-5,-5),gp_Pnt(-5,5,-5),gp_Pnt(0,0,0)
>> faces[1] = make_face(make_polygon((p1,p2,p3,p4)))
>>
>> p1,p2,p3,p4 = gp_Pnt(0,0,0),gp_Pnt(-5,5,-5),gp_Pnt(5,5,-5),gp_Pnt(0,0,0)
>> faces[2] = make_face(make_polygon((p1,p2,p3,p4)))
>>
>> p1,p2,p3,p4 = gp_Pnt(0,0,0),gp_Pnt(5,5,-5),gp_Pnt(5,-5,-5),gp_Pnt(0,0,0)
>> faces[3] = make_face(make_polygon((p1,p2,p3,p4)))
>>
>> p1,p2,p3,p4,p5 =
>> gp_Pnt(-5,-5,-5),gp_Pnt(-5,5,-5),gp_Pnt(5,5,-5),gp_Pnt(5,-5,-5),
>> gp_Pnt(-5,-5,-5)
>>
>> poly = make_polygon([p1,p2,p3,p4,p5])
>> faces[4] = make_face(poly)
>>
>> sewing = sew_shapes(faces.values())
>> sewing = fix_shape(sewing)
>> stt = ShapeToTopology()
>> solid = make_solid(stt(sewing))
>>
>> # Export to STEP
>> my_step_exporter = STEPExporter("pyramid.stp")
>> my_step_exporter.AddShape(solid)
>> my_step_exporter.WriteFile()
>> _
>>
>> And this is what the console says:
>> _
>> n degenerated shapes 0
>> n deleted faces: 0
>> n free edges 0
>> n multiple edges: 0
>>
>> ***
>> **Statistics on Transfer (Write) **
>>
>> ***
>> **Transfer Mode = 0  I.E.  As Is   **
>> **Transferring Shape, ShapeType = 2
>>  **
>> ** WorkSession : Sending all data
>>  Step File Name : vogon.stp(245 ents)  Write  Done
>> STEP transfer successful
>> 
>>
>> Seems as if everything worked fine. As you can see on the screenshots,
>> the pyramid is imported without any errors (except the message, that it
>> is imported as shell instead of solid).
>>
>> If i cut the Pyramid, you can see that it is hollow. Using Abaqus to
>> "Create Solid from Shell" creates a solid. This just works fine, but i
>> don't see, why it is not imported as a solid in the first step. When i
>> export the solid from Abaqus and import this file once again, it is
>> imported as solid.
>>
>> Any ideas? Maybe i still am doing something wrong.  Oh, btw.: even using
>> make_polygon from OCC.Utils.Construct i have to repeat the last vertex.
>> Otherwise everything fix_shape is informing me about free edges.
>>
>> JC
>> > Hi Jens,
>> >
>> > This is probably due to the fact that your faces were not correctly
>> > oriented ( see screenshot, you see a pyramid in the fixed version ).
>> > I use "fix_shape" to produce a shape with well oriented faces.
>> > Also, I suggest you use the OCC.Utils.Construct module, saves a lot of
>> > time building geometry and produces insightful messages when things go
>> > wrong. ( make_polygon has a "closed" flag, let's you not repeat the
>> > last vertex ;)
>> >
>> > Finally, a great idea is to use the ipdb module.
>> > This way, you can just "import ipdb; ipdb.set_trace()" in your code,
>> > and you have an interactive () viewer and terminal to step through
>> > your code. This way it super easy to see what you're doing and what's
>> > going wrong.
>> >
>> > So cool folks from the Fraunhofer are interested in pythonocc!
>> > Can I ask for what research you use PyOCC Jens?
>> > Please let us know whether this fixes the issue.
>> >
>> > Best,
>> >
>> > -jelle
>> >
>> > On Mon, Oct 11, 2

Re: [Pythonocc-users] Export Solid to STEP-File

2010-10-11 Thread jelle feringa
Hi Jens,

The materials lab at the Fraunhofer must be a cool place to work!
Happy to hear you like PythonOCC!

Regarding the shell issue, I don't really get it... perhaps Thomas ( who's
the STEP expert! ) has an idea?
Anyway, happy you're able to generate the shapes you need!
Still, I do think its important to be able to see what you're doing ;)

Take care,

-jelle

On Mon, Oct 11, 2010 at 11:44 AM, Jens Cornelis <
jens.corne...@iwm.fraunhofer.de> wrote:

> Hi Jelle,
>
> thanks for your reply. At first: i work as a student research assistant
> and i came across PyOCC just yesterday when i searched for libraries to
> create step format files, when i realized that PyOCC is much, much more.
> I am enrolled in a masters program for computer science and i doing the
> programming tasks for a department focusing on materials research.  It
> is very cool and i like very much, what i have seen so far. Thanks a lot
> for your great work!
>
> Actually, the file is still imported as a Shell, but not as a solid.
> This is what the skript looks like (without diplay instructions as i
> have no TK installed):
> 
> from OCC.Utils.Construct import *
> from OCC.Utils.Common import *
> from OCC.Utils.DataExchange.STEP import STEPExporter
> from OCC.KBE.TypesLookup import *
>
> faces = {}
> p1,p2,p3,p4 = gp_Pnt(0,0,0),gp_Pnt(-5,-5,-5),gp_Pnt(5,-5,-5),gp_Pnt(0,0,0)
> faces[0] = make_face(make_polygon((p1,p2,p3,p4)))
>
> p1,p2,p3,p4 = gp_Pnt(0,0,0),gp_Pnt(-5,-5,-5),gp_Pnt(-5,5,-5),gp_Pnt(0,0,0)
> faces[1] = make_face(make_polygon((p1,p2,p3,p4)))
>
> p1,p2,p3,p4 = gp_Pnt(0,0,0),gp_Pnt(-5,5,-5),gp_Pnt(5,5,-5),gp_Pnt(0,0,0)
> faces[2] = make_face(make_polygon((p1,p2,p3,p4)))
>
> p1,p2,p3,p4 = gp_Pnt(0,0,0),gp_Pnt(5,5,-5),gp_Pnt(5,-5,-5),gp_Pnt(0,0,0)
> faces[3] = make_face(make_polygon((p1,p2,p3,p4)))
>
> p1,p2,p3,p4,p5 =
> gp_Pnt(-5,-5,-5),gp_Pnt(-5,5,-5),gp_Pnt(5,5,-5),gp_Pnt(5,-5,-5),
> gp_Pnt(-5,-5,-5)
>
> poly = make_polygon([p1,p2,p3,p4,p5])
> faces[4] = make_face(poly)
>
> sewing = sew_shapes(faces.values())
> sewing = fix_shape(sewing)
> stt = ShapeToTopology()
> solid = make_solid(stt(sewing))
>
> # Export to STEP
> my_step_exporter = STEPExporter("pyramid.stp")
> my_step_exporter.AddShape(solid)
> my_step_exporter.WriteFile()
> _
>
> And this is what the console says:
> _
> n degenerated shapes 0
> n deleted faces: 0
> n free edges 0
> n multiple edges: 0
>
> ***
> **Statistics on Transfer (Write) **
>
> ***
> **Transfer Mode = 0  I.E.  As Is   **
> **Transferring Shape, ShapeType = 2  **
> ** WorkSession : Sending all data
>  Step File Name : vogon.stp(245 ents)  Write  Done
> STEP transfer successful
> 
>
> Seems as if everything worked fine. As you can see on the screenshots,
> the pyramid is imported without any errors (except the message, that it
> is imported as shell instead of solid).
>
> If i cut the Pyramid, you can see that it is hollow. Using Abaqus to
> "Create Solid from Shell" creates a solid. This just works fine, but i
> don't see, why it is not imported as a solid in the first step. When i
> export the solid from Abaqus and import this file once again, it is
> imported as solid.
>
> Any ideas? Maybe i still am doing something wrong.  Oh, btw.: even using
> make_polygon from OCC.Utils.Construct i have to repeat the last vertex.
> Otherwise everything fix_shape is informing me about free edges.
>
> JC
> > Hi Jens,
> >
> > This is probably due to the fact that your faces were not correctly
> > oriented ( see screenshot, you see a pyramid in the fixed version ).
> > I use "fix_shape" to produce a shape with well oriented faces.
> > Also, I suggest you use the OCC.Utils.Construct module, saves a lot of
> > time building geometry and produces insightful messages when things go
> > wrong. ( make_polygon has a "closed" flag, let's you not repeat the
> > last vertex ;)
> >
> > Finally, a great idea is to use the ipdb module.
> > This way, you can just "import ipdb; ipdb.set_trace()" in your code,
> > and you have an interactive () viewer and terminal to step through
> > your code. This way it super easy to see what you're doing and what's
> > going wrong.
> >
> > So cool folks from the Fraunhofer are interested in pythonocc!
> > Can I ask for what research you use PyOCC Jens?
> > Please let us know whether this fixes the issue.
> >
> > Best,
> >
> > -jelle
> >
> > On Mon, Oct 11, 2010 at 9:54 AM, Jens Cornelis
> >  > > wrote:
> >
> > Hi,
> >
> > i use pythonOCC to create .stp files in order to import them in
> > Abaqus CAE.
> >
> > Somehow, i seem to not manage to export my example as a solid. When
> > importing in Abaqus, it says that it is imported as shell instead
> > of solid.
> >
> > An