found = Standard_True;
}
else if (start->IsKind(STANDARD_TYPE(StepShape_GeometricSet))) {
- myShapeBuilder.Init(GetCasted(StepShape_GeometricSet, start), TP);
+ myShapeBuilder.Init(GetCasted(StepShape_GeometricSet, start), TP, this, isManifold);
found = Standard_True;
}
else if (start->IsKind(STANDARD_TYPE(StepShape_EdgeBasedWireframeModel))) {
if (ent->IsKind(STANDARD_TYPE(StepGeom_Point))) return 1;
if (ent->IsKind(STANDARD_TYPE(StepGeom_Curve))) return 2;
if (ent->IsKind(STANDARD_TYPE(StepGeom_Surface))) return 3;
+ if (ent->IsKind(STANDARD_TYPE(StepGeom_GeometricRepresentationItem))) return 4;
return 0;
}
uses TopoDS, StdFail, TCollection, TColStd, BRep, Geom, Geom2d,
GeomAdaptor, Extrema, gp, Transfer, Geom2dAPI,
- StepRepr, StepGeom, StepShape, TopTools
+ StepRepr, StepGeom, StepShape, TopTools, STEPControl
is
Shape from TopoDS,
BuilderError from StepToTopoDS,
TransientProcess from Transfer,
- NMTool from StepToTopoDS
+ NMTool from StepToTopoDS,
+ ActorRead from STEPControl,
+ ActorOfTransientProcess from Transfer
raises NotDone from StdFail
-
+
is
Create returns Builder from StepToTopoDS;
Init (me : in out;
S : GeometricSet from StepShape;
- TP : TransientProcess from Transfer );
+ TP : TransientProcess from Transfer;
+ RA : ActorOfTransientProcess from Transfer = NULL;
+ isManifold : Boolean = Standard_False );
Value (me) returns Shape from TopoDS
raises NotDone
#include <StepToTopoDS_TranslateFace.hxx>
#include <StepShape_HArray1OfFace.hxx>
+#include <STEPControl_ActorRead.hxx>
+
#include <Message_ProgressSentry.hxx>
#include <Message_Messenger.hxx>
+#include <Transfer_ActorOfTransientProcess.hxx>
+#include <STEPControl_ActorRead.hxx>
static void ResetPreci (const TopoDS_Shape& S, Standard_Real maxtol)
{
void StepToTopoDS_Builder::Init
(const Handle(StepShape_GeometricSet)& GCS,
- const Handle(Transfer_TransientProcess)& TP)
+ const Handle(Transfer_TransientProcess)& TP,
+ const Handle(Transfer_ActorOfTransientProcess)& RA,
+ const Standard_Boolean isManifold)
{
// Initialisation of the Tool
// try other surfs
else res = TranslateBoundedSurf (aSurf, preci);
}
- else TP->AddWarning (ent," Entity is not a Curve, Point or Surface");
+ else if ( ent->IsKind(STANDARD_TYPE(StepGeom_GeometricRepresentationItem)) )
+ {
+ Handle(StepGeom_GeometricRepresentationItem) GRI =
+ Handle(StepGeom_GeometricRepresentationItem)::DownCast(ent);
+ if (!RA.IsNull())
+ {
+ Handle(STEPControl_ActorRead) anActor = Handle(STEPControl_ActorRead)::DownCast(RA);
+ Handle(Transfer_Binder) binder;
+ if( !anActor.IsNull())
+ binder = anActor->TransferShape(GRI, TP, isManifold);
+ if (!binder.IsNull())
+ {
+ res = TransferBRep::ShapeResult(binder);
+ }
+ }
+ }
+ else TP->AddWarning (ent," Entity is not a Curve, Point, Surface or GeometricRepresentationItem");
if ( ! res.IsNull() ) {
B.Add(S, res);
TransferBRep::SetShapeResult ( TP, ent, res );
--- /dev/null
+puts "============"
+puts "OCC25166"
+puts "============"
+puts ""
+#####################################################
+# STEP Reader - allow GEOMETRIC_SET entity to accept non-geometric children
+#####################################################
+
+stepread [locate_data_file bug25166_piston.stp] a *
+tpcompound result
+
+set square 46280.7
+
+set nb_v_good 176
+set nb_e_good 176
+set nb_w_good 176
+set nb_f_good 168
+set nb_sh_good 168
+set nb_sol_good 0
+set nb_compsol_good 0
+set nb_compound_good 2
+set nb_shape_good 866
+
+set 3dviewer 1