Daily update on 20251020-041041 by Nitload Youmu. Additional Message : Code cleanup and new design of parallel (maybe THE THENTH VERSION? Tough work!).
Signed-off-by: Nitload <YoumuLiu_NSI@whv0t.onmicrosoft.com>
This commit is contained in:
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepAdvancedFace.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepAdvancedFace"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
|
||||
using StgSharp.Script;
|
||||
@@ -40,34 +37,34 @@ namespace StgSharp.Model.Step
|
||||
public class StepAdvancedFace : StepFaceSurface, IExpConvertableFrom<StepAdvancedFace>
|
||||
{
|
||||
|
||||
public StepAdvancedFace( StepModel model ) : base( model ) { }
|
||||
public StepAdvancedFace(StepModel model) : base(model) { }
|
||||
|
||||
public override StepItemType ItemType => StepItemType.AdvancedFace;
|
||||
|
||||
public void FromInstance( StepAdvancedFace entity )
|
||||
public void FromInstance(StepAdvancedFace entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
}
|
||||
|
||||
internal static StepAdvancedFace FromSyntax( StepModel binder, ExpSyntaxNode syntaxList )
|
||||
internal static StepAdvancedFace FromSyntax(StepModel binder, ExpSyntaxNode syntaxList)
|
||||
{
|
||||
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator( syntaxList );
|
||||
StepAdvancedFace face = new StepAdvancedFace( binder );
|
||||
enumerator.AssertEnumeratorCount( 4 );
|
||||
face.Name = ( enumerator[ 0 ]as ExpStringNode )!.Value;
|
||||
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator(syntaxList);
|
||||
StepAdvancedFace face = new StepAdvancedFace(binder);
|
||||
enumerator.AssertEnumeratorCount(4);
|
||||
face.Name = (enumerator[0]as ExpStringNode)!.Value;
|
||||
|
||||
ExpNodePresidentEnumerator boundsList = enumerator[ 1 ].TupleToPresidentEnumerator();
|
||||
ExpNodePresidentEnumerator boundsList = enumerator[1].TupleToPresidentEnumerator();
|
||||
face.Bounds.Clear();
|
||||
face.Bounds
|
||||
.AddRange(
|
||||
Enumerable.Range( 0, enumerator.Count ).Select( _ => ( StepFaceBound )null ) );
|
||||
for( int i = 0; i < boundsList.Count; i++ )
|
||||
Enumerable.Range(0, enumerator.Count).Select(_ => (StepFaceBound)null));
|
||||
for (int i = 0; i < boundsList.Count; i++)
|
||||
{
|
||||
int j = i; // capture to avoid rebinding
|
||||
face.Bounds[ j ] = binder[ boundsList[ j ] ] as StepFaceBound;
|
||||
face.Bounds[j] = binder[boundsList[j]] as StepFaceBound;
|
||||
}
|
||||
face.FaceGeometry = binder[ enumerator[ 2 ] ] as StepSurface;
|
||||
face.SameSense = ( enumerator[ 3 ] as ExpBoolNode )!.Value;
|
||||
face.FaceGeometry = binder[enumerator[2]] as StepSurface;
|
||||
face.SameSense = (enumerator[3] as ExpBoolNode)!.Value;
|
||||
|
||||
return face;
|
||||
}
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepAxis2Placement.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepAxis2Placement"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
using StgSharp.Script;
|
||||
|
||||
@@ -40,21 +37,21 @@ namespace StgSharp.Model.Step
|
||||
|
||||
private StepDirection _refDirection;
|
||||
|
||||
protected StepAxis2Placement( StepModel model ) : base( model ) { }
|
||||
protected StepAxis2Placement(StepModel model) : base(model) { }
|
||||
|
||||
public StepDirection RefDirection
|
||||
{
|
||||
get { return _refDirection; }
|
||||
set
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull( value );
|
||||
ArgumentNullException.ThrowIfNull(value);
|
||||
_refDirection = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool IsConvertableTo( string entityName )
|
||||
public override bool IsConvertableTo(string entityName)
|
||||
{
|
||||
return base.IsConvertableTo( entityName ) || entityName == "StepAxis2Placement";
|
||||
return base.IsConvertableTo(entityName) || entityName == "StepAxis2Placement";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepAxis2Placement2D.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepAxis2Placement2D"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
|
||||
using StgSharp.Script;
|
||||
@@ -40,13 +37,10 @@ namespace StgSharp.Model.Step
|
||||
public class StepAxis2Placement2D : StepAxis2Placement, IExpConvertableFrom<StepAxis2Placement2D>
|
||||
{
|
||||
|
||||
private StepAxis2Placement2D( StepModel model ) : base( model ) { }
|
||||
private StepAxis2Placement2D(StepModel model) : base(model) { }
|
||||
|
||||
public StepAxis2Placement2D(
|
||||
StepModel model,
|
||||
StepCartesianPoint location,
|
||||
StepDirection direction )
|
||||
: base( model )
|
||||
public StepAxis2Placement2D(StepModel model, StepCartesianPoint location, StepDirection direction)
|
||||
: base(model)
|
||||
{
|
||||
Location = location;
|
||||
RefDirection = direction;
|
||||
@@ -54,23 +48,21 @@ namespace StgSharp.Model.Step
|
||||
|
||||
public override StepItemType ItemType => StepItemType.AxisPlacement2D;
|
||||
|
||||
public void FromInstance( StepAxis2Placement2D entity )
|
||||
public void FromInstance(StepAxis2Placement2D entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
Location = entity.Location;
|
||||
RefDirection = entity.RefDirection;
|
||||
}
|
||||
|
||||
internal static StepAxis2Placement2D FromSyntax(
|
||||
StepModel binder,
|
||||
ExpSyntaxNode syntaxList )
|
||||
internal static StepAxis2Placement2D FromSyntax(StepModel binder, ExpSyntaxNode syntaxList)
|
||||
{
|
||||
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator( syntaxList );
|
||||
StepAxis2Placement2D axis = new StepAxis2Placement2D( binder );
|
||||
enumerator.AssertEnumeratorCount( 3 );
|
||||
axis.Name = ( enumerator[ 0 ]as ExpStringNode )!.Value;
|
||||
axis.Location = binder[ enumerator[ 1 ] ] as StepCartesianPoint;
|
||||
axis.RefDirection = binder[ enumerator[ 2 ] ] as StepDirection;
|
||||
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator(syntaxList);
|
||||
StepAxis2Placement2D axis = new StepAxis2Placement2D(binder);
|
||||
enumerator.AssertEnumeratorCount(3);
|
||||
axis.Name = (enumerator[0]as ExpStringNode)!.Value;
|
||||
axis.Location = binder[enumerator[1]] as StepCartesianPoint;
|
||||
axis.RefDirection = binder[enumerator[2]] as StepDirection;
|
||||
return axis;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepAxis2Placement3D.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepAxis2Placement3D"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
using StgSharp.Script;
|
||||
using StgSharp.Script.Express;
|
||||
@@ -42,14 +39,14 @@ namespace StgSharp.Model.Step
|
||||
|
||||
private StepDirection _axis;
|
||||
|
||||
private StepAxis2Placement3D( StepModel model ) : base( model ) { }
|
||||
private StepAxis2Placement3D(StepModel model) : base(model) { }
|
||||
|
||||
public StepAxis2Placement3D(
|
||||
StepModel model,
|
||||
StepCartesianPoint location,
|
||||
StepDirection axis,
|
||||
StepDirection refDirection )
|
||||
: base( model )
|
||||
StepDirection refDirection)
|
||||
: base(model)
|
||||
{
|
||||
Location = location;
|
||||
Axis = axis;
|
||||
@@ -61,33 +58,31 @@ namespace StgSharp.Model.Step
|
||||
get { return _axis; }
|
||||
set
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull( value );
|
||||
ArgumentNullException.ThrowIfNull(value);
|
||||
_axis = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override StepItemType ItemType => StepItemType.AxisPlacement3D;
|
||||
|
||||
public override bool IsConvertableTo( string entityTypeName )
|
||||
public override bool IsConvertableTo(string entityTypeName)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
internal static StepAxis2Placement3D FromSyntax(
|
||||
StepModel binder,
|
||||
ExpSyntaxNode syntaxList )
|
||||
internal static StepAxis2Placement3D FromSyntax(StepModel binder, ExpSyntaxNode syntaxList)
|
||||
{
|
||||
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator( syntaxList );
|
||||
StepAxis2Placement3D axis = new StepAxis2Placement3D( binder );
|
||||
enumerator.AssertEnumeratorCount( 4 );
|
||||
axis.Name = ( enumerator[ 0 ]as ExpStringNode )!.Value;
|
||||
axis.Location = binder[ enumerator[ 1 ] ] as StepCartesianPoint;
|
||||
axis.Axis = binder[ enumerator[ 2 ] ] as StepDirection;
|
||||
axis.RefDirection = binder[ enumerator[ 3 ] ] as StepDirection;
|
||||
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator(syntaxList);
|
||||
StepAxis2Placement3D axis = new StepAxis2Placement3D(binder);
|
||||
enumerator.AssertEnumeratorCount(4);
|
||||
axis.Name = (enumerator[0]as ExpStringNode)!.Value;
|
||||
axis.Location = binder[enumerator[1]] as StepCartesianPoint;
|
||||
axis.Axis = binder[enumerator[2]] as StepDirection;
|
||||
axis.RefDirection = binder[enumerator[3]] as StepDirection;
|
||||
return axis;
|
||||
}
|
||||
|
||||
void IExpConvertableFrom<StepAxis2Placement3D>.FromInstance( StepAxis2Placement3D entity )
|
||||
void IExpConvertableFrom<StepAxis2Placement3D>.FromInstance(StepAxis2Placement3D entity)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepBSplineCurve.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepBSplineCurve"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
using StgSharp.Script;
|
||||
using StgSharp.Script.Express;
|
||||
@@ -61,27 +58,20 @@ namespace StgSharp.Model.Step
|
||||
internal const string POLYLINE_FORM = "POLYLINE_FORM";
|
||||
internal const string UNSPECIFIED = "UNSPECIFIED";
|
||||
|
||||
internal static HashSet<string> AllPossibleValue { get; } = [
|
||||
CIRCULAR_ARC,
|
||||
ELLIPTIC_ARC,
|
||||
HYPERBOLIC_ARC,
|
||||
PARABOLIC_ARC,
|
||||
POLYLINE_FORM,
|
||||
UNSPECIFIED,
|
||||
];
|
||||
internal static HashSet<string> AllPossibleValue { get; } = [ CIRCULAR_ARC, ELLIPTIC_ARC, HYPERBOLIC_ARC, PARABOLIC_ARC, POLYLINE_FORM, UNSPECIFIED, ];
|
||||
|
||||
}
|
||||
|
||||
public class StepBSplineCurve : StepBoundedCurve, IExpConvertableFrom<StepBSplineCurve>
|
||||
{
|
||||
|
||||
public StepBSplineCurve( StepModel model, params StepCartesianPoint[] controlPoints )
|
||||
: this( model, ( IEnumerable<StepCartesianPoint> )controlPoints ) { }
|
||||
public StepBSplineCurve(StepModel model, params StepCartesianPoint[] controlPoints)
|
||||
: this(model, (IEnumerable<StepCartesianPoint>)controlPoints) { }
|
||||
|
||||
public StepBSplineCurve( StepModel model, IEnumerable<StepCartesianPoint> controlPoints )
|
||||
: base( model )
|
||||
public StepBSplineCurve(StepModel model, IEnumerable<StepCartesianPoint> controlPoints)
|
||||
: base(model)
|
||||
{
|
||||
ControlPointsList.AddRange( controlPoints );
|
||||
ControlPointsList.AddRange(controlPoints);
|
||||
}
|
||||
|
||||
public bool ClosedCurve { get; set; }
|
||||
@@ -95,21 +85,21 @@ namespace StgSharp.Model.Step
|
||||
|
||||
public StepBSplineCurveForm CurveForm { get; set; } = StepBSplineCurveForm.Unspecified;
|
||||
|
||||
public void FromInstance( StepBSplineCurve entity )
|
||||
public void FromInstance(StepBSplineCurve entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
this.Degree = entity.Degree;
|
||||
this.ClosedCurve = entity.ClosedCurve;
|
||||
this.ControlPointsList = entity.ControlPointsList;
|
||||
this.SelfIntersect = entity.SelfIntersect;
|
||||
}
|
||||
|
||||
public override bool IsConvertableTo( string entityName )
|
||||
public override bool IsConvertableTo(string entityName)
|
||||
{
|
||||
return base.IsConvertableTo( entityName ) || entityName == "StepBSplineCurve";
|
||||
return base.IsConvertableTo(entityName) || entityName == "StepBSplineCurve";
|
||||
}
|
||||
|
||||
protected static string GetCurveFormString( StepBSplineCurveForm form )
|
||||
protected static string GetCurveFormString(StepBSplineCurveForm form)
|
||||
{
|
||||
return form switch
|
||||
{
|
||||
@@ -123,7 +113,7 @@ namespace StgSharp.Model.Step
|
||||
};
|
||||
}
|
||||
|
||||
protected static StepBSplineCurveForm ParseCurveForm( string enumerationValue )
|
||||
protected static StepBSplineCurveForm ParseCurveForm(string enumerationValue)
|
||||
{
|
||||
return enumerationValue.ToUpperInvariant() switch
|
||||
{
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepBSplineCurveWithKnots.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepBSplineCurveWithKnots"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
using StgSharp.Script;
|
||||
using StgSharp.Script.Express;
|
||||
@@ -60,15 +57,11 @@ namespace StgSharp.Model.Step
|
||||
private const string UNIFORM_KNOTS = "UNIFORM_KNOTS";
|
||||
private const string UNSPECIFIED = "UNSPECIFIED";
|
||||
|
||||
public StepBSplineCurveWithKnots(
|
||||
StepModel model,
|
||||
IEnumerable<StepCartesianPoint> controlPoints )
|
||||
: base( model, controlPoints ) { }
|
||||
public StepBSplineCurveWithKnots(StepModel model, IEnumerable<StepCartesianPoint> controlPoints)
|
||||
: base(model, controlPoints) { }
|
||||
|
||||
public StepBSplineCurveWithKnots(
|
||||
StepModel model,
|
||||
params StepCartesianPoint[] controlPoints )
|
||||
: base( model, controlPoints ) { }
|
||||
public StepBSplineCurveWithKnots(StepModel model, params StepCartesianPoint[] controlPoints)
|
||||
: base(model, controlPoints) { }
|
||||
|
||||
public List<int> KnotMultiplicities { get; } = new List<int>();
|
||||
|
||||
@@ -78,59 +71,57 @@ namespace StgSharp.Model.Step
|
||||
|
||||
public StepKnotType KnotSpec { get; set; } = StepKnotType.Unspecified;
|
||||
|
||||
public void FromInstance( StepBSplineCurveWithKnots entity )
|
||||
public void FromInstance(StepBSplineCurveWithKnots entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
KnotSpec = entity.KnotSpec;
|
||||
KnotMultiplicities.Clear();
|
||||
KnotMultiplicities.AddRange( entity.KnotMultiplicities );
|
||||
KnotMultiplicities.AddRange(entity.KnotMultiplicities);
|
||||
Knots.Clear();
|
||||
Knots.AddRange( entity.Knots );
|
||||
Knots.AddRange(entity.Knots);
|
||||
}
|
||||
|
||||
internal static StepBSplineCurveWithKnots FromSyntax(
|
||||
StepModel binder,
|
||||
ExpSyntaxNode syntaxList )
|
||||
internal static StepBSplineCurveWithKnots FromSyntax(StepModel binder, ExpSyntaxNode syntaxList)
|
||||
{
|
||||
ExpNodePresidentEnumerator enumerator = syntaxList .ToPresidentEnumerator();
|
||||
enumerator.AssertEnumeratorCount( 9 );
|
||||
ExpNodePresidentEnumerator controlPointsList = enumerator[ 2 ].TupleToPresidentEnumerator(
|
||||
enumerator.AssertEnumeratorCount(9);
|
||||
ExpNodePresidentEnumerator controlPointsList = enumerator[2].TupleToPresidentEnumerator(
|
||||
);
|
||||
|
||||
StepBSplineCurveWithKnots spline = new StepBSplineCurveWithKnots(
|
||||
binder, new StepCartesianPoint[controlPointsList.Count] );
|
||||
spline.Name = ( enumerator[ 0 ]as ExpStringNode )!.Value;
|
||||
spline.Degree = ( enumerator[ 1 ] as ExpIntNode )!.Value;
|
||||
binder, new StepCartesianPoint[controlPointsList.Count]);
|
||||
spline.Name = (enumerator[0]as ExpStringNode)!.Value;
|
||||
spline.Degree = (enumerator[1] as ExpIntNode)!.Value;
|
||||
|
||||
for( int i = 0; i < controlPointsList.Count; i++ )
|
||||
for (int i = 0; i < controlPointsList.Count; i++)
|
||||
{
|
||||
int j = i; // capture to avoid rebinding
|
||||
spline.ControlPointsList[ j ] = binder[ controlPointsList[ j ] ]as StepCartesianPoint;
|
||||
spline.ControlPointsList[j] = binder[controlPointsList[j]]as StepCartesianPoint;
|
||||
}
|
||||
|
||||
spline.CurveForm = ParseCurveForm( enumerator[ 3 ].CodeConvertTemplate );
|
||||
spline.ClosedCurve = ( enumerator[ 4 ] as ExpBoolNode )!.Value;
|
||||
spline.SelfIntersect = ( enumerator[ 5 ]as ExpBoolNode )!.Value;
|
||||
spline.CurveForm = ParseCurveForm(enumerator[3].CodeConvertTemplate);
|
||||
spline.ClosedCurve = (enumerator[4] as ExpBoolNode)!.Value;
|
||||
spline.SelfIntersect = (enumerator[5]as ExpBoolNode)!.Value;
|
||||
|
||||
ExpNodePresidentEnumerator knotMultiplicitiesList = enumerator[ 6 ].TupleToPresidentEnumerator(
|
||||
ExpNodePresidentEnumerator knotMultiplicitiesList = enumerator[6].TupleToPresidentEnumerator(
|
||||
);
|
||||
spline.KnotMultiplicities.Clear();
|
||||
for( int i = 0; i < knotMultiplicitiesList.Count; i++ ) {
|
||||
spline.KnotMultiplicities.Add( ( knotMultiplicitiesList[ i ]as ExpIntNode )!.Value );
|
||||
for (int i = 0; i < knotMultiplicitiesList.Count; i++) {
|
||||
spline.KnotMultiplicities.Add((knotMultiplicitiesList[i]as ExpIntNode)!.Value);
|
||||
}
|
||||
|
||||
ExpNodePresidentEnumerator knotsList = enumerator[ 7 ].TupleToPresidentEnumerator();
|
||||
ExpNodePresidentEnumerator knotsList = enumerator[7].TupleToPresidentEnumerator();
|
||||
spline.Knots.Clear();
|
||||
for( int i = 0; i < knotsList.Count; i++ ) {
|
||||
spline.Knots.Add( ( knotsList[ i ]as ExpRealNumberNode )!.Value );
|
||||
for (int i = 0; i < knotsList.Count; i++) {
|
||||
spline.Knots.Add((knotsList[i]as ExpRealNumberNode)!.Value);
|
||||
}
|
||||
|
||||
spline.KnotSpec = ParseKnotSpec( enumerator[ 8 ].CodeConvertTemplate );
|
||||
spline.KnotSpec = ParseKnotSpec(enumerator[8].CodeConvertTemplate);
|
||||
|
||||
return spline;
|
||||
}
|
||||
|
||||
private static string GetKnotSpec( StepKnotType spec )
|
||||
private static string GetKnotSpec(StepKnotType spec)
|
||||
{
|
||||
return spec switch
|
||||
{
|
||||
@@ -142,7 +133,7 @@ namespace StgSharp.Model.Step
|
||||
};
|
||||
}
|
||||
|
||||
private static StepKnotType ParseKnotSpec( string enumerationValue )
|
||||
private static StepKnotType ParseKnotSpec(string enumerationValue)
|
||||
{
|
||||
return enumerationValue.ToUpperInvariant() switch
|
||||
{
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepBSplineSurface.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepBSplineSurface"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the “Software”), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED “AS IS”,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using CommunityToolkit.HighPerformance;
|
||||
|
||||
using StgSharp.Script.Express;
|
||||
@@ -74,7 +71,7 @@ namespace StgSharp.Model.Step
|
||||
public const string TOROIDAL_SURF_TEXT = "TOROIDAL_SURF";
|
||||
public const string UNSPECIFIED_TEXT = "UNSPECIFIED";
|
||||
|
||||
public StepBSplineSurface( StepModel model ) : base( model ) { }
|
||||
public StepBSplineSurface(StepModel model) : base(model) { }
|
||||
|
||||
public bool UClosed { get; set; }
|
||||
|
||||
@@ -88,62 +85,62 @@ namespace StgSharp.Model.Step
|
||||
|
||||
public int UUpper => ControlPointsList.Count - 1;
|
||||
|
||||
public int VUpper => ControlPointsList[ 0 ].Count - 1;
|
||||
public int VUpper => ControlPointsList[0].Count - 1;
|
||||
|
||||
public List<List<StepCartesianPoint>> ControlPointsList { get; set; }
|
||||
= new List<List<StepCartesianPoint>>();
|
||||
|
||||
public StepBSplineSurfaceForm SurfaceForm { get; set; }
|
||||
|
||||
public static StepBSplineSurface CreateFromSyntax( StepModel binder, ExpSyntaxNode syntax )
|
||||
public static StepBSplineSurface CreateFromSyntax(StepModel binder, ExpSyntaxNode syntax)
|
||||
{
|
||||
ExpNodePresidentEnumerator enumerator = syntax.ToPresidentEnumerator();
|
||||
enumerator.AssertEnumeratorCount( 7 );
|
||||
StepBSplineSurface ret = new StepBSplineSurface( binder );
|
||||
enumerator.AssertEnumeratorCount(7);
|
||||
StepBSplineSurface ret = new StepBSplineSurface(binder);
|
||||
|
||||
ret.UDegree = ( enumerator[ 0 ] as ExpIntNode ).Value;
|
||||
ret.VDegree = ( enumerator[ 1 ] as ExpIntNode ).Value;
|
||||
ret.UDegree = (enumerator[0] as ExpIntNode).Value;
|
||||
ret.VDegree = (enumerator[1] as ExpIntNode).Value;
|
||||
|
||||
ExpNodePresidentEnumerator pointList = enumerator[ 2 ].TupleToPresidentEnumerator();
|
||||
pointList.AssertEnumeratorCount( 2, int.MaxValue );
|
||||
for( int i = 0; i < pointList.Count; i++ )
|
||||
ExpNodePresidentEnumerator pointList = enumerator[2].TupleToPresidentEnumerator();
|
||||
pointList.AssertEnumeratorCount(2, int.MaxValue);
|
||||
for (int i = 0; i < pointList.Count; i++)
|
||||
{
|
||||
ExpNodePresidentEnumerator points = pointList[ i ].TupleToPresidentEnumerator();
|
||||
points.AssertEnumeratorCount( 2, int.MaxValue );
|
||||
List<StepCartesianPoint> pList = new List<StepCartesianPoint>( points.Count );
|
||||
CollectionsMarshal.SetCount( pList, points.Count );
|
||||
Span<StepCartesianPoint> ls = CollectionsMarshal.AsSpan( pList );
|
||||
ExpNodePresidentEnumerator points = pointList[i].TupleToPresidentEnumerator();
|
||||
points.AssertEnumeratorCount(2, int.MaxValue);
|
||||
List<StepCartesianPoint> pList = new List<StepCartesianPoint>(points.Count);
|
||||
CollectionsMarshal.SetCount(pList, points.Count);
|
||||
Span<StepCartesianPoint> ls = CollectionsMarshal.AsSpan(pList);
|
||||
Span<ExpSyntaxNode> aspan = points.AsSpan();
|
||||
for( int j = 0; j < points.Count; j++ )
|
||||
for (int j = 0; j < points.Count; j++)
|
||||
{
|
||||
StepCartesianPoint p = binder[ aspan[ i ] as StepEntityInstanceNode ] as StepCartesianPoint;
|
||||
ls[ j ] = p;
|
||||
StepCartesianPoint p = binder[aspan[i] as StepEntityInstanceNode] as StepCartesianPoint;
|
||||
ls[j] = p;
|
||||
}
|
||||
ret.ControlPointsList.Add( pList );
|
||||
ret.ControlPointsList.Add(pList);
|
||||
}
|
||||
|
||||
ret.SurfaceForm = GetSurfaceForm( enumerator[ 3 ].CodeConvertTemplate );
|
||||
ret.UClosed = ( enumerator[ 4 ] as ExpBoolNode ).Value;
|
||||
ret.VClosed = ( enumerator[ 5 ] as ExpBoolNode ).Value;
|
||||
ret.SelfIntersections = ( enumerator[ 6 ] as ExpBoolNode ).Value;
|
||||
ret.SurfaceForm = GetSurfaceForm(enumerator[3].CodeConvertTemplate);
|
||||
ret.UClosed = (enumerator[4] as ExpBoolNode).Value;
|
||||
ret.VClosed = (enumerator[5] as ExpBoolNode).Value;
|
||||
ret.SelfIntersections = (enumerator[6] as ExpBoolNode).Value;
|
||||
return ret;
|
||||
}
|
||||
|
||||
public void FromInstance( StepBSplineSurface entity )
|
||||
public void FromInstance(StepBSplineSurface entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
UClosed = entity.UClosed;
|
||||
VClosed = entity.VClosed;
|
||||
UDegree = entity.UDegree;
|
||||
VDegree = entity.VDegree;
|
||||
ControlPointsList.Clear();
|
||||
foreach( List<StepCartesianPoint> list in entity.ControlPointsList ) {
|
||||
ControlPointsList.Add( new List<StepCartesianPoint>( list ) );
|
||||
foreach (List<StepCartesianPoint> list in entity.ControlPointsList) {
|
||||
ControlPointsList.Add(new List<StepCartesianPoint>(list));
|
||||
}
|
||||
SurfaceForm = entity.SurfaceForm;
|
||||
}
|
||||
|
||||
protected static StepBSplineSurfaceForm GetSurfaceForm( string literal )
|
||||
protected static StepBSplineSurfaceForm GetSurfaceForm(string literal)
|
||||
{
|
||||
return literal switch
|
||||
{
|
||||
@@ -162,7 +159,7 @@ namespace StgSharp.Model.Step
|
||||
};
|
||||
}
|
||||
|
||||
protected static string GetSurfaceFormString( StepBSplineSurfaceForm form )
|
||||
protected static string GetSurfaceFormString(StepBSplineSurfaceForm form)
|
||||
{
|
||||
return form switch
|
||||
{
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepBoundedCurve.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepBoundedCurve"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
using StgSharp.Script;
|
||||
using StgSharp.Script.Express;
|
||||
@@ -37,21 +34,21 @@ namespace StgSharp.Model.Step
|
||||
public class StepBoundedCurve : StepCurve, IExpConvertableFrom<StepBoundedCurve>
|
||||
{
|
||||
|
||||
public StepBoundedCurve( StepModel model ) : base( model ) { }
|
||||
public StepBoundedCurve(StepModel model) : base(model) { }
|
||||
|
||||
public void FromInstance( StepBoundedCurve entity )
|
||||
public void FromInstance(StepBoundedCurve entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
}
|
||||
|
||||
public override bool IsConvertableTo( string entityName )
|
||||
public override bool IsConvertableTo(string entityName)
|
||||
{
|
||||
return base.IsConvertableTo( entityName ) || entityName == "StepBoundedCurve";
|
||||
return base.IsConvertableTo(entityName) || entityName == "StepBoundedCurve";
|
||||
}
|
||||
|
||||
internal static StepBoundedCurve FromSyntax( StepModel binder, ExpSyntaxNode syntax )
|
||||
internal static StepBoundedCurve FromSyntax(StepModel binder, ExpSyntaxNode syntax)
|
||||
{
|
||||
return new StepBoundedCurve( binder );
|
||||
return new StepBoundedCurve(binder);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepBoundedSurface.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepBoundedSurface"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the “Software”), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED “AS IS”,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Script.Express;
|
||||
|
||||
using System;
|
||||
@@ -41,13 +38,13 @@ namespace StgSharp.Model.Step
|
||||
public class StepBoundedSurface : StepSurface, IExpConvertableFrom<StepBoundedSurface>
|
||||
{
|
||||
|
||||
public StepBoundedSurface( StepModel model ) : base( model ) { }
|
||||
public StepBoundedSurface(StepModel model) : base(model) { }
|
||||
|
||||
public override StepItemType ItemType => StepItemType.BoundedSurface;
|
||||
|
||||
public void FromInstance( StepBoundedSurface entity )
|
||||
public void FromInstance(StepBoundedSurface entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepBoundedSurfaceCurve.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepBoundedSurfaceCurve"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the “Software”), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED “AS IS”,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Script.Express;
|
||||
|
||||
using System;
|
||||
@@ -41,18 +38,18 @@ namespace StgSharp.Model.Step
|
||||
internal class StepBoundedSurfaceCurve : StepBoundedCurve, IExpConvertableFrom<StepBoundedSurfaceCurve, StepSurfaceCurve>
|
||||
{
|
||||
|
||||
public StepBoundedSurfaceCurve( StepModel model ) : base( model ) { }
|
||||
public StepBoundedSurfaceCurve(StepModel model) : base(model) { }
|
||||
|
||||
public StepCurve Parent { get; set; } = null!;
|
||||
|
||||
public void FromInstance( StepSurfaceCurve entity )
|
||||
public void FromInstance(StepSurfaceCurve entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
}
|
||||
|
||||
public void FromInstance( StepBoundedSurfaceCurve entity )
|
||||
public void FromInstance(StepBoundedSurfaceCurve entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepCartesianPoint.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepCartesianPoint"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
using StgSharp.Script;
|
||||
using StgSharp.Script.Express;
|
||||
@@ -37,23 +34,22 @@ namespace StgSharp.Model.Step
|
||||
public class StepCartesianPoint : StepTriple, IExpConvertableFrom<StepCartesianPoint>
|
||||
{
|
||||
|
||||
private StepCartesianPoint( StepModel model ) : base( model ) { }
|
||||
private StepCartesianPoint(StepModel model) : base(model) { }
|
||||
|
||||
public StepCartesianPoint( StepModel model, float x, float y, float z )
|
||||
: base( model, x, y, z ) { }
|
||||
public StepCartesianPoint(StepModel model, float x, float y, float z) : base(model, x, y, z) { }
|
||||
|
||||
public override StepItemType ItemType => StepItemType.CartesianPoint;
|
||||
|
||||
protected override int MinimumValueCount => 1;
|
||||
|
||||
public void FromInstance( StepCartesianPoint entity )
|
||||
public void FromInstance(StepCartesianPoint entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
}
|
||||
|
||||
internal static StepCartesianPoint FromSyntax( StepModel binder, ExpSyntaxNode syntaxList )
|
||||
internal static StepCartesianPoint FromSyntax(StepModel binder, ExpSyntaxNode syntaxList)
|
||||
{
|
||||
return AssignTo( new StepCartesianPoint( binder ), syntaxList );
|
||||
return AssignTo(new StepCartesianPoint(binder), syntaxList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepCircle.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepCircle"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
using StgSharp.Script;
|
||||
using StgSharp.Script.Express;
|
||||
@@ -42,10 +39,10 @@ namespace StgSharp.Model.Step
|
||||
|
||||
private StepAxis2Placement _position;
|
||||
|
||||
public StepCircle( StepModel model ) : base( model ) { }
|
||||
public StepCircle(StepModel model) : base(model) { }
|
||||
|
||||
public StepCircle( StepModel model, StepAxis2Placement position, float radius )
|
||||
: base( model )
|
||||
public StepCircle(StepModel model, StepAxis2Placement position, float radius)
|
||||
: base(model)
|
||||
{
|
||||
Position = position;
|
||||
Radius = radius;
|
||||
@@ -58,7 +55,7 @@ namespace StgSharp.Model.Step
|
||||
get { return _position; }
|
||||
set
|
||||
{
|
||||
if( value == null ) {
|
||||
if (value == null) {
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
|
||||
@@ -68,20 +65,20 @@ namespace StgSharp.Model.Step
|
||||
|
||||
public override StepItemType ItemType => StepItemType.Circle;
|
||||
|
||||
public void FromInstance( StepCircle entity )
|
||||
public void FromInstance(StepCircle entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
this._position = entity.Position;
|
||||
}
|
||||
|
||||
internal static StepCircle FromSyntax( StepModel binder, ExpSyntaxNode syntaxList )
|
||||
internal static StepCircle FromSyntax(StepModel binder, ExpSyntaxNode syntaxList)
|
||||
{
|
||||
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator( syntaxList );
|
||||
StepCircle circle = new StepCircle( binder );
|
||||
enumerator.AssertEnumeratorCount( 3 );
|
||||
circle.Name = ( enumerator[ 0 ]as ExpStringNode )!.Value;
|
||||
circle.Position = binder[ enumerator[ 1 ] ] as StepAxis2Placement;
|
||||
circle.Radius = ( enumerator[ 2 ]as ExpRealNumberNode )!.Value;
|
||||
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator(syntaxList);
|
||||
StepCircle circle = new StepCircle(binder);
|
||||
enumerator.AssertEnumeratorCount(3);
|
||||
circle.Name = (enumerator[0]as ExpStringNode)!.Value;
|
||||
circle.Position = binder[enumerator[1]] as StepAxis2Placement;
|
||||
circle.Radius = (enumerator[2]as ExpRealNumberNode)!.Value;
|
||||
return circle;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepConic.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepConic"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
using StgSharp.Script;
|
||||
using StgSharp.Script.Express;
|
||||
@@ -37,18 +34,18 @@ namespace StgSharp.Model.Step
|
||||
public class StepConic : StepCurve, IExpConvertableFrom<StepConic>
|
||||
{
|
||||
|
||||
public StepConic( StepModel model ) : base( model ) { }
|
||||
public StepConic(StepModel model) : base(model) { }
|
||||
|
||||
public override StepItemType ItemType => StepItemType.Conic;
|
||||
|
||||
public override bool IsConvertableTo( string entityTypeName )
|
||||
public override bool IsConvertableTo(string entityTypeName)
|
||||
{
|
||||
return base.IsConvertableTo( entityTypeName ) || entityTypeName == "StepConic";
|
||||
return base.IsConvertableTo(entityTypeName) || entityTypeName == "StepConic";
|
||||
}
|
||||
|
||||
void IExpConvertableFrom<StepConic>.FromInstance( StepConic entity )
|
||||
void IExpConvertableFrom<StepConic>.FromInstance(StepConic entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepCurve.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepCurve"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
using StgSharp.Script;
|
||||
using StgSharp.Script.Express;
|
||||
@@ -37,18 +34,18 @@ namespace StgSharp.Model.Step
|
||||
public class StepCurve : StepGeometricRepresentationItem, IExpConvertableFrom<StepCurve>
|
||||
{
|
||||
|
||||
public StepCurve( StepModel model ) : base( model ) { }
|
||||
public StepCurve(StepModel model) : base(model) { }
|
||||
|
||||
public override StepItemType ItemType => StepItemType.Curve;
|
||||
|
||||
public void FromInstance( StepCurve entity )
|
||||
public void FromInstance(StepCurve entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
}
|
||||
|
||||
public override bool IsConvertableTo( string entityName )
|
||||
public override bool IsConvertableTo(string entityName)
|
||||
{
|
||||
return base.IsConvertableTo( entityName ) || entityName == "StepCurve";
|
||||
return base.IsConvertableTo(entityName) || entityName == "StepCurve";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepCylindricalSurface.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepCylindricalSurface"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
|
||||
using StgSharp.Script;
|
||||
@@ -40,13 +37,10 @@ namespace StgSharp.Model.Step
|
||||
public class StepCylindricalSurface : StepElementarySurface, IExpConvertableFrom<StepCylindricalSurface>
|
||||
{
|
||||
|
||||
public StepCylindricalSurface( StepModel model ) : base( model ) { }
|
||||
public StepCylindricalSurface(StepModel model) : base(model) { }
|
||||
|
||||
public StepCylindricalSurface(
|
||||
StepModel model,
|
||||
StepAxis2Placement3D position,
|
||||
float radius )
|
||||
: base( model, position )
|
||||
public StepCylindricalSurface(StepModel model, StepAxis2Placement3D position, float radius)
|
||||
: base(model, position)
|
||||
{
|
||||
Radius = radius;
|
||||
}
|
||||
@@ -55,22 +49,20 @@ namespace StgSharp.Model.Step
|
||||
|
||||
public override StepItemType ItemType => StepItemType.CylindricalSurface;
|
||||
|
||||
public void FromInstance( StepCylindricalSurface entity )
|
||||
public void FromInstance(StepCylindricalSurface entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
Radius = entity.Radius;
|
||||
}
|
||||
|
||||
internal static StepRepresentationItem FromSyntax(
|
||||
StepModel binder,
|
||||
ExpSyntaxNode syntaxList )
|
||||
internal static StepRepresentationItem FromSyntax(StepModel binder, ExpSyntaxNode syntaxList)
|
||||
{
|
||||
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator( syntaxList );
|
||||
enumerator.AssertEnumeratorCount( 3 );
|
||||
StepCylindricalSurface surface = new StepCylindricalSurface( binder );
|
||||
surface.Name = ( enumerator[ 0 ] as ExpStringNode )!.Value;
|
||||
surface.Position = binder[ enumerator[ 1 ] ]as StepAxis2Placement3D;
|
||||
surface.Radius = ( enumerator[ 2 ]as ExpRealNumberNode )!.Value;
|
||||
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator(syntaxList);
|
||||
enumerator.AssertEnumeratorCount(3);
|
||||
StepCylindricalSurface surface = new StepCylindricalSurface(binder);
|
||||
surface.Name = (enumerator[0] as ExpStringNode)!.Value;
|
||||
surface.Position = binder[enumerator[1]]as StepAxis2Placement3D;
|
||||
surface.Radius = (enumerator[2]as ExpRealNumberNode)!.Value;
|
||||
return surface;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepDirection.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepDirection"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the “Software”), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED “AS IS”,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
using StgSharp.Script;
|
||||
using StgSharp.Script.Express;
|
||||
@@ -37,23 +34,22 @@ namespace StgSharp.Model.Step
|
||||
public class StepDirection : StepTriple, IExpConvertableFrom<StepDirection>
|
||||
{
|
||||
|
||||
private StepDirection( StepModel model ) : base( model ) { }
|
||||
private StepDirection(StepModel model) : base(model) { }
|
||||
|
||||
public StepDirection( StepModel model, float x, float y, float z )
|
||||
: base( model, x, y, z ) { }
|
||||
public StepDirection(StepModel model, float x, float y, float z) : base(model, x, y, z) { }
|
||||
|
||||
public override StepItemType ItemType => StepItemType.Direction;
|
||||
|
||||
protected override int MinimumValueCount => 2;
|
||||
|
||||
public void FromInstance( StepDirection entity )
|
||||
public void FromInstance(StepDirection entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
}
|
||||
|
||||
internal static StepDirection FromSyntax( StepModel binder, ExpSyntaxNode syntaxList )
|
||||
internal static StepDirection FromSyntax(StepModel binder, ExpSyntaxNode syntaxList)
|
||||
{
|
||||
return AssignTo( new StepDirection( binder ), syntaxList );
|
||||
return AssignTo(new StepDirection(binder), syntaxList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepEdge.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepEdge"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
|
||||
using StgSharp.Script;
|
||||
@@ -40,10 +37,10 @@ namespace StgSharp.Model.Step
|
||||
public class StepEdge : StepTopologicalRepresentationItem, IExpConvertableFrom<StepEdge>
|
||||
{
|
||||
|
||||
protected StepEdge( StepModel model ) : base( model ) { }
|
||||
protected StepEdge(StepModel model) : base(model) { }
|
||||
|
||||
protected StepEdge( StepModel model, StepVertex edgeStart, StepVertex edgeEnd )
|
||||
: base( model )
|
||||
protected StepEdge(StepModel model, StepVertex edgeStart, StepVertex edgeEnd)
|
||||
: base(model)
|
||||
{
|
||||
EdgeStart = edgeStart;
|
||||
EdgeEnd = edgeEnd;
|
||||
@@ -53,16 +50,16 @@ namespace StgSharp.Model.Step
|
||||
|
||||
public StepVertex EdgeEnd { get; set; }
|
||||
|
||||
public void FromInstance( StepEdge entity )
|
||||
public void FromInstance(StepEdge entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
EdgeStart = entity.EdgeStart;
|
||||
EdgeEnd = entity.EdgeEnd;
|
||||
}
|
||||
|
||||
public override bool IsConvertableTo( string entityName )
|
||||
public override bool IsConvertableTo(string entityName)
|
||||
{
|
||||
return base.IsConvertableTo( entityName ) || entityName == "StepEdge";
|
||||
return base.IsConvertableTo(entityName) || entityName == "StepEdge";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepEdgeCurve.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepEdgeCurve"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
using StgSharp.Script;
|
||||
using StgSharp.Script.Express;
|
||||
@@ -42,15 +39,15 @@ namespace StgSharp.Model.Step
|
||||
|
||||
private StepCurve _edgeGeometry;
|
||||
|
||||
private StepEdgeCurve( StepModel model ) : base( model ) { }
|
||||
private StepEdgeCurve(StepModel model) : base(model) { }
|
||||
|
||||
public StepEdgeCurve(
|
||||
StepModel model,
|
||||
StepVertex edgeStart,
|
||||
StepVertex edgeEnd,
|
||||
StepCurve edgeGeometry,
|
||||
bool isSameSense )
|
||||
: base( model, edgeStart, edgeEnd )
|
||||
bool isSameSense)
|
||||
: base(model, edgeStart, edgeEnd)
|
||||
{
|
||||
EdgeGeometry = edgeGeometry;
|
||||
IsSameSense = isSameSense;
|
||||
@@ -63,29 +60,29 @@ namespace StgSharp.Model.Step
|
||||
get { return _edgeGeometry; }
|
||||
set
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull( value );
|
||||
ArgumentNullException.ThrowIfNull(value);
|
||||
_edgeGeometry = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override StepItemType ItemType => StepItemType.EdgeCurve;
|
||||
|
||||
public void FromInstance( StepEdgeCurve entity )
|
||||
public void FromInstance(StepEdgeCurve entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
EdgeGeometry = entity.EdgeGeometry;
|
||||
}
|
||||
|
||||
internal static StepEdgeCurve FromSyntax( StepModel binder, ExpSyntaxNode syntaxList )
|
||||
internal static StepEdgeCurve FromSyntax(StepModel binder, ExpSyntaxNode syntaxList)
|
||||
{
|
||||
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator( syntaxList );
|
||||
StepEdgeCurve edgeCurve = new StepEdgeCurve( binder );
|
||||
enumerator.AssertEnumeratorCount( 5 );
|
||||
edgeCurve.Name = ( enumerator[ 0 ]as ExpStringNode )!.Value;
|
||||
edgeCurve.EdgeStart = binder[ enumerator[ 1 ] ] as StepVertex;
|
||||
edgeCurve.EdgeEnd = binder[ enumerator[ 2 ] ] as StepVertex;
|
||||
edgeCurve.EdgeGeometry = binder[ enumerator[ 3 ] ] as StepCurve;
|
||||
edgeCurve.IsSameSense = ( enumerator[ 4 ]as ExpBoolNode )!.Value;
|
||||
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator(syntaxList);
|
||||
StepEdgeCurve edgeCurve = new StepEdgeCurve(binder);
|
||||
enumerator.AssertEnumeratorCount(5);
|
||||
edgeCurve.Name = (enumerator[0]as ExpStringNode)!.Value;
|
||||
edgeCurve.EdgeStart = binder[enumerator[1]] as StepVertex;
|
||||
edgeCurve.EdgeEnd = binder[enumerator[2]] as StepVertex;
|
||||
edgeCurve.EdgeGeometry = binder[enumerator[3]] as StepCurve;
|
||||
edgeCurve.IsSameSense = (enumerator[4]as ExpBoolNode)!.Value;
|
||||
return edgeCurve;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepEdgeLoop.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepEdgeLoop"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
using StgSharp.Script;
|
||||
using StgSharp.Script.Express;
|
||||
@@ -40,36 +37,36 @@ namespace StgSharp.Model.Step
|
||||
public class StepEdgeLoop : StepLoop, IExpConvertableFrom<StepEdgeCurve>
|
||||
{
|
||||
|
||||
public StepEdgeLoop( StepModel model, params StepOrientedEdge[] edgeList )
|
||||
: this( model, ( IEnumerable<StepOrientedEdge> )edgeList ) { }
|
||||
public StepEdgeLoop(StepModel model, params StepOrientedEdge[] edgeList)
|
||||
: this(model, (IEnumerable<StepOrientedEdge>)edgeList) { }
|
||||
|
||||
public StepEdgeLoop( StepModel model, IEnumerable<StepOrientedEdge> edgeList )
|
||||
: base( model )
|
||||
public StepEdgeLoop(StepModel model, IEnumerable<StepOrientedEdge> edgeList)
|
||||
: base(model)
|
||||
{
|
||||
EdgeList = new List<StepOrientedEdge>( edgeList );
|
||||
EdgeList = new List<StepOrientedEdge>(edgeList);
|
||||
}
|
||||
|
||||
public List<StepOrientedEdge> EdgeList { get; private set; }
|
||||
|
||||
public override StepItemType ItemType => StepItemType.EdgeLoop;
|
||||
|
||||
public void FromInstance( StepEdgeCurve entity )
|
||||
public void FromInstance(StepEdgeCurve entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
}
|
||||
|
||||
internal static StepEdgeLoop FromSyntax( StepModel binder, ExpSyntaxNode syntaxList )
|
||||
internal static StepEdgeLoop FromSyntax(StepModel binder, ExpSyntaxNode syntaxList)
|
||||
{
|
||||
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator( syntaxList );
|
||||
enumerator.AssertEnumeratorCount( 2 );
|
||||
ExpNodePresidentEnumerator edgeSyntaxList = enumerator[ 1 ].TupleToPresidentEnumerator();
|
||||
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator(syntaxList);
|
||||
enumerator.AssertEnumeratorCount(2);
|
||||
ExpNodePresidentEnumerator edgeSyntaxList = enumerator[1].TupleToPresidentEnumerator();
|
||||
StepEdgeLoop edgeLoop = new StepEdgeLoop(
|
||||
binder, new StepOrientedEdge[edgeSyntaxList.Count] );
|
||||
edgeLoop.Name = ( enumerator[ 0 ]as ExpStringNode )!.Value;
|
||||
for( int i = 0; i < edgeSyntaxList.Count; i++ )
|
||||
binder, new StepOrientedEdge[edgeSyntaxList.Count]);
|
||||
edgeLoop.Name = (enumerator[0]as ExpStringNode)!.Value;
|
||||
for (int i = 0; i < edgeSyntaxList.Count; i++)
|
||||
{
|
||||
int j = i; // capture to avoid rebinding
|
||||
edgeLoop.EdgeList[ j ] = binder[ edgeSyntaxList[ j ] ] as StepOrientedEdge;
|
||||
edgeLoop.EdgeList[j] = binder[edgeSyntaxList[j]] as StepOrientedEdge;
|
||||
}
|
||||
|
||||
return edgeLoop;
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepElementarySurface.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepElementarySurface"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
using StgSharp.Script;
|
||||
using StgSharp.Script.Express;
|
||||
@@ -42,10 +39,10 @@ namespace StgSharp.Model.Step
|
||||
|
||||
private StepAxis2Placement3D _position;
|
||||
|
||||
public StepElementarySurface( StepModel model ) : base( model ) { }
|
||||
public StepElementarySurface(StepModel model) : base(model) { }
|
||||
|
||||
public StepElementarySurface( StepModel model, StepAxis2Placement3D position )
|
||||
: base( model )
|
||||
public StepElementarySurface(StepModel model, StepAxis2Placement3D position)
|
||||
: base(model)
|
||||
{
|
||||
Position = position;
|
||||
}
|
||||
@@ -55,14 +52,14 @@ namespace StgSharp.Model.Step
|
||||
get { return _position; }
|
||||
set
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull( value );
|
||||
ArgumentNullException.ThrowIfNull(value);
|
||||
_position = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void FromInstance( StepElementarySurface entity )
|
||||
public void FromInstance(StepElementarySurface entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
_position = entity.Position;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepEllipse.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepEllipse"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
using StgSharp.Script;
|
||||
using StgSharp.Script.Express;
|
||||
@@ -42,15 +39,10 @@ namespace StgSharp.Model.Step
|
||||
|
||||
private StepAxis2Placement _position;
|
||||
|
||||
private StepEllipse( StepModel model ) : base( model ) { }
|
||||
private StepEllipse(StepModel model) : base(model) { }
|
||||
|
||||
public StepEllipse(
|
||||
StepModel model,
|
||||
string name,
|
||||
StepAxis2Placement position,
|
||||
float semiAxis1,
|
||||
float semiAxis2 )
|
||||
: base( model )
|
||||
public StepEllipse(StepModel model, string name, StepAxis2Placement position, float semiAxis1, float semiAxis2)
|
||||
: base(model)
|
||||
{
|
||||
Position = position;
|
||||
SemiAxis1 = semiAxis1;
|
||||
@@ -66,7 +58,7 @@ namespace StgSharp.Model.Step
|
||||
get { return _position; }
|
||||
set
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull( value );
|
||||
ArgumentNullException.ThrowIfNull(value);
|
||||
|
||||
_position = value;
|
||||
}
|
||||
@@ -74,22 +66,22 @@ namespace StgSharp.Model.Step
|
||||
|
||||
public override StepItemType ItemType => StepItemType.Ellipse;
|
||||
|
||||
public void FromInstance( StepEllipse entity )
|
||||
public void FromInstance(StepEllipse entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
SemiAxis1 = entity.SemiAxis1;
|
||||
SemiAxis2 = entity.SemiAxis2;
|
||||
}
|
||||
|
||||
internal static StepEllipse FromSyntax( StepModel binder, ExpSyntaxNode syntaxList )
|
||||
internal static StepEllipse FromSyntax(StepModel binder, ExpSyntaxNode syntaxList)
|
||||
{
|
||||
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator( syntaxList );
|
||||
StepEllipse ellipse = new StepEllipse( binder );
|
||||
enumerator.AssertEnumeratorCount( 4 );
|
||||
ellipse.Name = ( enumerator[ 0 ]as ExpStringNode )!.Value;
|
||||
ellipse.Position = binder[ ( enumerator[ 1 ] as StepEntityInstanceNode )!.Id ]as StepAxis2Placement2D;
|
||||
ellipse.SemiAxis1 = ( enumerator[ 2 ] as ExpRealNumberNode )!.Value;
|
||||
ellipse.SemiAxis2 = ( enumerator[ 3 ] as ExpRealNumberNode )!.Value;
|
||||
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator(syntaxList);
|
||||
StepEllipse ellipse = new StepEllipse(binder);
|
||||
enumerator.AssertEnumeratorCount(4);
|
||||
ellipse.Name = (enumerator[0]as ExpStringNode)!.Value;
|
||||
ellipse.Position = binder[(enumerator[1] as StepEntityInstanceNode)!.Id]as StepAxis2Placement2D;
|
||||
ellipse.SemiAxis1 = (enumerator[2] as ExpRealNumberNode)!.Value;
|
||||
ellipse.SemiAxis2 = (enumerator[3] as ExpRealNumberNode)!.Value;
|
||||
return ellipse;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepFace.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepFace"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
using StgSharp.Script;
|
||||
using StgSharp.Script.Express;
|
||||
@@ -40,21 +37,21 @@ namespace StgSharp.Model.Step
|
||||
public class StepFace : StepTopologicalRepresentationItem, IExpConvertableFrom<StepFace>
|
||||
{
|
||||
|
||||
public StepFace( StepModel model ) : base( model ) { }
|
||||
public StepFace(StepModel model) : base(model) { }
|
||||
|
||||
public List<StepFaceBound> Bounds { get; private set; } = new List<StepFaceBound>();
|
||||
|
||||
public override StepItemType ItemType => StepItemType.Face;
|
||||
|
||||
public void FromInstance( StepFace entity )
|
||||
public void FromInstance(StepFace entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
Bounds = entity.Bounds;
|
||||
}
|
||||
|
||||
public override bool IsConvertableTo( string entityName )
|
||||
public override bool IsConvertableTo(string entityName)
|
||||
{
|
||||
return base.IsConvertableTo( entityName ) || entityName == "StepFace";
|
||||
return base.IsConvertableTo(entityName) || entityName == "StepFace";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepFaceBound.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepFaceBound"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
|
||||
using StgSharp.Script;
|
||||
@@ -40,10 +37,10 @@ namespace StgSharp.Model.Step
|
||||
public class StepFaceBound : StepTopologicalRepresentationItem, IExpConvertableFrom<StepFaceBound>
|
||||
{
|
||||
|
||||
public StepFaceBound( StepModel model ) : base( model ) { }
|
||||
public StepFaceBound(StepModel model) : base(model) { }
|
||||
|
||||
public StepFaceBound( StepModel model, StepLoop bound, bool orientation )
|
||||
: base( model )
|
||||
public StepFaceBound(StepModel model, StepLoop bound, bool orientation)
|
||||
: base(model)
|
||||
{
|
||||
Bound = bound;
|
||||
Orientation = orientation;
|
||||
@@ -55,21 +52,21 @@ namespace StgSharp.Model.Step
|
||||
|
||||
public StepLoop Bound { get; set; }
|
||||
|
||||
public void FromInstance( StepFaceBound entity )
|
||||
public void FromInstance(StepFaceBound entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
Bound = entity.Bound;
|
||||
Orientation = entity.Orientation;
|
||||
}
|
||||
|
||||
internal static StepFaceBound FromSyntax( StepModel binder, ExpSyntaxNode syntaxList )
|
||||
internal static StepFaceBound FromSyntax(StepModel binder, ExpSyntaxNode syntaxList)
|
||||
{
|
||||
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator( syntaxList );
|
||||
enumerator.AssertEnumeratorCount( 3 );
|
||||
StepFaceBound faceBound = new StepFaceBound( binder );
|
||||
faceBound.Name = ( enumerator[ 0 ]as ExpStringNode )!.Value;
|
||||
faceBound.Bound = binder[ enumerator[ 1 ] ] as StepLoop;
|
||||
faceBound.Orientation = ( enumerator[ 2 ]as ExpBoolNode )!.Value;
|
||||
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator(syntaxList);
|
||||
enumerator.AssertEnumeratorCount(3);
|
||||
StepFaceBound faceBound = new StepFaceBound(binder);
|
||||
faceBound.Name = (enumerator[0]as ExpStringNode)!.Value;
|
||||
faceBound.Bound = binder[enumerator[1]] as StepLoop;
|
||||
faceBound.Orientation = (enumerator[2]as ExpBoolNode)!.Value;
|
||||
return faceBound;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepFaceOuterBound.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepFaceOuterBound"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
using StgSharp.Script;
|
||||
using StgSharp.Script.Express;
|
||||
@@ -37,28 +34,26 @@ namespace StgSharp.Model.Step
|
||||
public class StepFaceOuterBound : StepFaceBound, IExpConvertableFrom<StepFaceOuterBound>
|
||||
{
|
||||
|
||||
private StepFaceOuterBound( StepModel model ) : base( model ) { }
|
||||
private StepFaceOuterBound(StepModel model) : base(model) { }
|
||||
|
||||
public StepFaceOuterBound( StepModel model, StepLoop bound, bool orientation )
|
||||
: base( model, bound, orientation ) { }
|
||||
public StepFaceOuterBound(StepModel model, StepLoop bound, bool orientation)
|
||||
: base(model, bound, orientation) { }
|
||||
|
||||
public override StepItemType ItemType => StepItemType.FaceOuterBound;
|
||||
|
||||
public void FromInstance( StepFaceOuterBound entity )
|
||||
public void FromInstance(StepFaceOuterBound entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
}
|
||||
|
||||
internal static new StepFaceOuterBound FromSyntax(
|
||||
StepModel binder,
|
||||
ExpSyntaxNode syntaxList )
|
||||
internal static new StepFaceOuterBound FromSyntax(StepModel binder, ExpSyntaxNode syntaxList)
|
||||
{
|
||||
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator( syntaxList );
|
||||
enumerator.AssertEnumeratorCount( 3 );
|
||||
StepFaceOuterBound faceOuterBound = new StepFaceOuterBound( binder );
|
||||
faceOuterBound.Name = ( enumerator[ 0 ]as ExpStringNode )!.Value;
|
||||
faceOuterBound.Bound = binder[ enumerator[ 1 ] ] as StepLoop;
|
||||
faceOuterBound.Orientation = ( enumerator[ 2 ]as ExpBoolNode )!.Value;
|
||||
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator(syntaxList);
|
||||
enumerator.AssertEnumeratorCount(3);
|
||||
StepFaceOuterBound faceOuterBound = new StepFaceOuterBound(binder);
|
||||
faceOuterBound.Name = (enumerator[0]as ExpStringNode)!.Value;
|
||||
faceOuterBound.Bound = binder[enumerator[1]] as StepLoop;
|
||||
faceOuterBound.Orientation = (enumerator[2]as ExpBoolNode)!.Value;
|
||||
return faceOuterBound;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepFaceSurface.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepFaceSurface"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
|
||||
using StgSharp.Script;
|
||||
@@ -40,15 +37,15 @@ namespace StgSharp.Model.Step
|
||||
public class StepFaceSurface : StepFace, IExpConvertableFrom<StepFaceSurface>
|
||||
{
|
||||
|
||||
public StepFaceSurface( StepModel model ) : base( model ) { }
|
||||
public StepFaceSurface(StepModel model) : base(model) { }
|
||||
|
||||
public bool SameSense { get; set; }
|
||||
|
||||
public StepSurface FaceGeometry { get; set; }
|
||||
|
||||
public void FromInstance( StepFaceSurface entity )
|
||||
public void FromInstance(StepFaceSurface entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
SameSense = entity.SameSense;
|
||||
FaceGeometry = entity.FaceGeometry;
|
||||
}
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepGeometricRepresentationItem.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepGeometricRepresentationItem"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
using StgSharp.Script;
|
||||
using StgSharp.Script.Express;
|
||||
@@ -37,17 +34,16 @@ namespace StgSharp.Model.Step
|
||||
public class StepGeometricRepresentationItem : StepRepresentationItem, IExpConvertableFrom<StepGeometricRepresentationItem>
|
||||
{
|
||||
|
||||
public StepGeometricRepresentationItem( StepModel model ) : base( model ) { }
|
||||
public StepGeometricRepresentationItem(StepModel model) : base(model) { }
|
||||
|
||||
public void FromInstance( StepGeometricRepresentationItem entity )
|
||||
public void FromInstance(StepGeometricRepresentationItem entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
}
|
||||
|
||||
public override bool IsConvertableTo( string entityName )
|
||||
public override bool IsConvertableTo(string entityName)
|
||||
{
|
||||
return base.IsConvertableTo( entityName ) ||
|
||||
entityName is "StepGeometricRepresentationItem";
|
||||
return base.IsConvertableTo(entityName) || entityName is "StepGeometricRepresentationItem";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,30 +1,27 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepLine.cs"
|
||||
// file="StepLine"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
@@ -82,14 +79,7 @@ namespace StgSharp.Model.Step
|
||||
Vector = entity.Vector;
|
||||
}
|
||||
|
||||
public static StepLine FromPoints(
|
||||
StepModel model,
|
||||
float x1,
|
||||
float y1,
|
||||
float z1,
|
||||
float x2,
|
||||
float y2,
|
||||
float z2)
|
||||
public static StepLine FromPoints(StepModel model, float x1, float y1, float z1, float x2, float y2, float z2)
|
||||
{
|
||||
StepCartesianPoint start = new StepCartesianPoint(model, x1, y1, z1);
|
||||
float dx = x2 - x1;
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepLoop.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepLoop"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
using StgSharp.Script;
|
||||
using StgSharp.Script.Express;
|
||||
@@ -37,11 +34,11 @@ namespace StgSharp.Model.Step
|
||||
public abstract class StepLoop : StepTopologicalRepresentationItem, IExpConvertableFrom<StepLoop>
|
||||
{
|
||||
|
||||
protected StepLoop( StepModel model ) : base( model ) { }
|
||||
protected StepLoop(StepModel model) : base(model) { }
|
||||
|
||||
public void FromInstance( StepLoop entity )
|
||||
public void FromInstance(StepLoop entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepOrientedEdge.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepOrientedEdge"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using Microsoft.Win32.SafeHandles;
|
||||
|
||||
using StgSharp.Model.Step;
|
||||
@@ -44,15 +41,15 @@ namespace StgSharp.Model.Step
|
||||
|
||||
private StepEdge _edgeElement;
|
||||
|
||||
private StepOrientedEdge( StepModel model ) : base( model ) { }
|
||||
private StepOrientedEdge(StepModel model) : base(model) { }
|
||||
|
||||
public StepOrientedEdge(
|
||||
StepModel model,
|
||||
StepVertex edgeStart,
|
||||
StepVertex edgeEnd,
|
||||
StepEdge edgeElement,
|
||||
bool orientation )
|
||||
: base( model, edgeStart, edgeEnd )
|
||||
bool orientation)
|
||||
: base(model, edgeStart, edgeEnd)
|
||||
{
|
||||
EdgeElement = edgeElement;
|
||||
Orientation = orientation;
|
||||
@@ -65,7 +62,7 @@ namespace StgSharp.Model.Step
|
||||
get { return _edgeElement; }
|
||||
set
|
||||
{
|
||||
if( value == null ) {
|
||||
if (value == null) {
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
|
||||
@@ -75,23 +72,23 @@ namespace StgSharp.Model.Step
|
||||
|
||||
public override StepItemType ItemType => StepItemType.OrientedEdge;
|
||||
|
||||
public void FromInstance( StepOrientedEdge entity )
|
||||
public void FromInstance(StepOrientedEdge entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
EdgeElement = entity.EdgeElement;
|
||||
Orientation = entity.Orientation;
|
||||
}
|
||||
|
||||
internal static StepOrientedEdge FromSyntax( StepModel binder, ExpSyntaxNode syntaxList )
|
||||
internal static StepOrientedEdge FromSyntax(StepModel binder, ExpSyntaxNode syntaxList)
|
||||
{
|
||||
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator( syntaxList );
|
||||
StepOrientedEdge orientedEdge = new StepOrientedEdge( binder );
|
||||
enumerator.AssertEnumeratorCount( 5 );
|
||||
orientedEdge.Name = ( enumerator[ 0 ]as ExpStringNode )!.Value;
|
||||
orientedEdge.EdgeStart = binder[ enumerator[ 1 ] ]as StepVertex;
|
||||
orientedEdge.EdgeEnd = binder[ enumerator[ 2 ] ] as StepVertex;
|
||||
orientedEdge.EdgeElement = binder[ enumerator[ 3 ] ] as StepEdge;
|
||||
orientedEdge.Orientation = ( enumerator[ 4 ]as ExpBoolNode )!.Value;
|
||||
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator(syntaxList);
|
||||
StepOrientedEdge orientedEdge = new StepOrientedEdge(binder);
|
||||
enumerator.AssertEnumeratorCount(5);
|
||||
orientedEdge.Name = (enumerator[0]as ExpStringNode)!.Value;
|
||||
orientedEdge.EdgeStart = binder[enumerator[1]]as StepVertex;
|
||||
orientedEdge.EdgeEnd = binder[enumerator[2]] as StepVertex;
|
||||
orientedEdge.EdgeElement = binder[enumerator[3]] as StepEdge;
|
||||
orientedEdge.Orientation = (enumerator[4]as ExpBoolNode)!.Value;
|
||||
return orientedEdge;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepPcurveOrSurface.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepPcurveOrSurface"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the “Software”), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED “AS IS”,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Script.Express;
|
||||
|
||||
using System;
|
||||
@@ -41,11 +38,11 @@ namespace StgSharp.Model.Step.Items
|
||||
public class StepPCurveOrSurface : StepGeometricRepresentationItem, IExpConvertableFrom<StepPCurveOrSurface>
|
||||
{
|
||||
|
||||
public StepPCurveOrSurface( StepModel model ) : base( model ) { }
|
||||
public StepPCurveOrSurface(StepModel model) : base(model) { }
|
||||
|
||||
public void FromInstance( StepPCurveOrSurface entity )
|
||||
public void FromInstance(StepPCurveOrSurface entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepPlacement.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepPlacement"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
using StgSharp.Script;
|
||||
using StgSharp.Script.Express;
|
||||
@@ -41,10 +38,10 @@ namespace StgSharp.Model.Step
|
||||
|
||||
private StepCartesianPoint _location;
|
||||
|
||||
public StepPlacement( StepModel model ) : base( model ) { }
|
||||
public StepPlacement(StepModel model) : base(model) { }
|
||||
|
||||
public StepPlacement( StepModel model, StepCartesianPoint location )
|
||||
: base( model )
|
||||
public StepPlacement(StepModel model, StepCartesianPoint location)
|
||||
: base(model)
|
||||
{
|
||||
_location = location;
|
||||
}
|
||||
@@ -54,20 +51,20 @@ namespace StgSharp.Model.Step
|
||||
get { return _location; }
|
||||
set
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull( value );
|
||||
ArgumentNullException.ThrowIfNull(value);
|
||||
_location = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void FromInstance( StepPlacement entity )
|
||||
public void FromInstance(StepPlacement entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
this.Location = entity.Location;
|
||||
}
|
||||
|
||||
public override bool IsConvertableTo( string entityName )
|
||||
public override bool IsConvertableTo(string entityName)
|
||||
{
|
||||
return base.IsConvertableTo( entityName ) || entityName == "StepPlacement";
|
||||
return base.IsConvertableTo(entityName) || entityName == "StepPlacement";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepPlane.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepPlane"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Geometries;
|
||||
using StgSharp.Model.Step;
|
||||
using StgSharp.Script;
|
||||
@@ -38,25 +35,24 @@ namespace StgSharp.Model.Step
|
||||
public class StepPlane : StepElementarySurface, IExpConvertableFrom<StepPlane>
|
||||
{
|
||||
|
||||
public StepPlane( StepModel model ) : base( model ) { }
|
||||
public StepPlane(StepModel model) : base(model) { }
|
||||
|
||||
public StepPlane( StepModel model, StepAxis2Placement3D position )
|
||||
: base( model, position ) { }
|
||||
public StepPlane(StepModel model, StepAxis2Placement3D position) : base(model, position) { }
|
||||
|
||||
public override StepItemType ItemType => StepItemType.Plane;
|
||||
|
||||
public void FromInstance( StepPlane entity )
|
||||
public void FromInstance(StepPlane entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
}
|
||||
|
||||
internal static StepPlane FromSyntax( StepModel binder, ExpSyntaxNode syntaxList )
|
||||
internal static StepPlane FromSyntax(StepModel binder, ExpSyntaxNode syntaxList)
|
||||
{
|
||||
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator( syntaxList );
|
||||
StepPlane plane = new StepPlane( binder );
|
||||
enumerator.AssertEnumeratorCount( 2 );
|
||||
plane.Name = ( enumerator[ 0 ]as ExpStringNode )!.Value;
|
||||
plane.Position = binder[ enumerator[ 1 ] ] as StepAxis2Placement3D;
|
||||
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator(syntaxList);
|
||||
StepPlane plane = new StepPlane(binder);
|
||||
enumerator.AssertEnumeratorCount(2);
|
||||
plane.Name = (enumerator[0]as ExpStringNode)!.Value;
|
||||
plane.Position = binder[enumerator[1]] as StepAxis2Placement3D;
|
||||
return plane;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepPoint.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepPoint"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
using StgSharp.Script;
|
||||
using StgSharp.Script.Express;
|
||||
@@ -39,18 +36,18 @@ namespace StgSharp.Model.Step
|
||||
public class StepPoint : StepGeometricRepresentationItem, IExpConvertableFrom<StepPoint>
|
||||
{
|
||||
|
||||
public StepPoint( StepModel model ) : base( model ) { }
|
||||
public StepPoint(StepModel model) : base(model) { }
|
||||
|
||||
public override StepItemType ItemType => StepItemType.Point;
|
||||
|
||||
public void FromInstance( StepPoint entity )
|
||||
public void FromInstance(StepPoint entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
}
|
||||
|
||||
public override bool IsConvertableTo( string entityName )
|
||||
public override bool IsConvertableTo(string entityName)
|
||||
{
|
||||
return base.IsConvertableTo( entityName ) || entityName == "StepPoint";
|
||||
return base.IsConvertableTo(entityName) || entityName == "StepPoint";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepRepresentationItem.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepRepresentationItem"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
||||
|
||||
using StgSharp.Model.Step;
|
||||
@@ -42,19 +39,19 @@ namespace StgSharp.Model.Step
|
||||
public class StepRepresentationItem : StepEntityBase, IExpConvertableFrom<StepRepresentationItem>
|
||||
{
|
||||
|
||||
protected StepRepresentationItem( StepModel model )
|
||||
protected StepRepresentationItem(StepModel model)
|
||||
{
|
||||
Context = model;
|
||||
}
|
||||
|
||||
public override StepItemType ItemType => StepItemType.PresentationItem;
|
||||
|
||||
public void FromInstance( StepRepresentationItem entity )
|
||||
public void FromInstance(StepRepresentationItem entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
}
|
||||
|
||||
public virtual bool IsConvertableTo( string entityName )
|
||||
public virtual bool IsConvertableTo(string entityName)
|
||||
{
|
||||
return entityName == "StepRepresentationItem";
|
||||
}
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepSurface.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepSurface"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
using StgSharp.Script;
|
||||
using StgSharp.Script.Express;
|
||||
@@ -37,16 +34,16 @@ namespace StgSharp.Model.Step
|
||||
public class StepSurface : StepGeometricRepresentationItem, IExpConvertableFrom<StepSurface>
|
||||
{
|
||||
|
||||
protected StepSurface( StepModel model ) : base( model ) { }
|
||||
protected StepSurface(StepModel model) : base(model) { }
|
||||
|
||||
public void FromInstance( StepSurface entity )
|
||||
public void FromInstance(StepSurface entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
}
|
||||
|
||||
public override bool IsConvertableTo( string entityName )
|
||||
public override bool IsConvertableTo(string entityName)
|
||||
{
|
||||
return base.IsConvertableTo( entityName ) || entityName == "StepSurface";
|
||||
return base.IsConvertableTo(entityName) || entityName == "StepSurface";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepSurfaceCurve.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepSurfaceCurve"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the “Software”), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED “AS IS”,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Script.Express;
|
||||
|
||||
using System;
|
||||
@@ -41,11 +38,11 @@ namespace StgSharp.Model.Step
|
||||
public class StepSurfaceCurve : StepCurve, IExpConvertableFrom<StepSurfaceCurve>
|
||||
{
|
||||
|
||||
public StepSurfaceCurve( StepModel model ) : base( model ) { }
|
||||
public StepSurfaceCurve(StepModel model) : base(model) { }
|
||||
|
||||
public StepCurve Curve3D { get; set; }
|
||||
|
||||
public void FromInstance( StepSurfaceCurve entity )
|
||||
public void FromInstance(StepSurfaceCurve entity)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepTopologicalRepresentationItem.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepTopologicalRepresentationItem"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
using StgSharp.Script;
|
||||
using StgSharp.Script.Express;
|
||||
@@ -39,17 +36,16 @@ namespace StgSharp.Model.Step
|
||||
public class StepTopologicalRepresentationItem : StepRepresentationItem, IExpConvertableFrom<StepTopologicalRepresentationItem>
|
||||
{
|
||||
|
||||
protected StepTopologicalRepresentationItem( StepModel model ) : base( model ) { }
|
||||
protected StepTopologicalRepresentationItem(StepModel model) : base(model) { }
|
||||
|
||||
public void FromInstance( StepTopologicalRepresentationItem entity )
|
||||
public void FromInstance(StepTopologicalRepresentationItem entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
}
|
||||
|
||||
public override bool IsConvertableTo( string entityName )
|
||||
public override bool IsConvertableTo(string entityName)
|
||||
{
|
||||
return base.IsConvertableTo( entityName ) ||
|
||||
entityName == "StepTopologicalRepresentationItem";
|
||||
return base.IsConvertableTo(entityName) || entityName == "StepTopologicalRepresentationItem";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,30 +1,27 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepTriple.cs"
|
||||
// file="StepTriple"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepVector.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepVector"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
using StgSharp.Script;
|
||||
using StgSharp.Script.Express;
|
||||
@@ -42,10 +39,10 @@ namespace StgSharp.Model.Step
|
||||
|
||||
private StepDirection _direction;
|
||||
|
||||
private StepVector( StepModel model ) : base( model ) { }
|
||||
private StepVector(StepModel model) : base(model) { }
|
||||
|
||||
public StepVector( StepModel model, StepDirection direction, double length )
|
||||
: base( model )
|
||||
public StepVector(StepModel model, StepDirection direction, double length)
|
||||
: base(model)
|
||||
{
|
||||
Direction = direction;
|
||||
Length = length;
|
||||
@@ -58,7 +55,7 @@ namespace StgSharp.Model.Step
|
||||
get { return _direction; }
|
||||
set
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull( value );
|
||||
ArgumentNullException.ThrowIfNull(value);
|
||||
|
||||
_direction = value;
|
||||
}
|
||||
@@ -66,20 +63,20 @@ namespace StgSharp.Model.Step
|
||||
|
||||
public override StepItemType ItemType => StepItemType.Vector;
|
||||
|
||||
public void FromInstance( StepVector entity )
|
||||
public void FromInstance(StepVector entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
_direction = entity.Direction;
|
||||
}
|
||||
|
||||
internal static StepVector FromSyntax( StepModel binder, ExpSyntaxNode syntaxList )
|
||||
internal static StepVector FromSyntax(StepModel binder, ExpSyntaxNode syntaxList)
|
||||
{
|
||||
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator( syntaxList );
|
||||
StepVector vector = new StepVector( binder );
|
||||
enumerator.AssertEnumeratorCount( 3 );
|
||||
vector.Name = ( enumerator[ 0 ]as ExpStringNode )!.Value;
|
||||
vector.Direction = binder[ enumerator[ 1 ] ] as StepDirection;
|
||||
vector.Length = ( enumerator[ 2 ]as ExpRealNumberNode )!.Value;
|
||||
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator(syntaxList);
|
||||
StepVector vector = new StepVector(binder);
|
||||
enumerator.AssertEnumeratorCount(3);
|
||||
vector.Name = (enumerator[0]as ExpStringNode)!.Value;
|
||||
vector.Direction = binder[enumerator[1]] as StepDirection;
|
||||
vector.Length = (enumerator[2]as ExpRealNumberNode)!.Value;
|
||||
return vector;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,30 +1,27 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepVertex.cs"
|
||||
// file="StepVertex"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepVertexPoint.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// -----------------------------------------------------------------------
|
||||
// file="StepVertexPoint"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
using StgSharp.Script;
|
||||
using StgSharp.Script.Express;
|
||||
@@ -42,10 +39,10 @@ namespace StgSharp.Model.Step
|
||||
|
||||
private StepCartesianPoint _location;
|
||||
|
||||
public StepVertexPoint( StepModel model ) : base( model ) { }
|
||||
public StepVertexPoint(StepModel model) : base(model) { }
|
||||
|
||||
public StepVertexPoint( StepModel model, StepCartesianPoint location )
|
||||
: base( model )
|
||||
public StepVertexPoint(StepModel model, StepCartesianPoint location)
|
||||
: base(model)
|
||||
{
|
||||
Location = location;
|
||||
}
|
||||
@@ -55,26 +52,26 @@ namespace StgSharp.Model.Step
|
||||
get { return _location; }
|
||||
set
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull( value );
|
||||
ArgumentNullException.ThrowIfNull(value);
|
||||
_location = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override StepItemType ItemType => StepItemType.VertexPoint;
|
||||
|
||||
public void FromInstance( StepVertexPoint entity )
|
||||
public void FromInstance(StepVertexPoint entity)
|
||||
{
|
||||
base.FromInstance( entity );
|
||||
base.FromInstance(entity);
|
||||
this.Location = entity.Location;
|
||||
}
|
||||
|
||||
internal static StepVertexPoint FromSyntax( StepModel binder, ExpSyntaxNode syntaxList )
|
||||
internal static StepVertexPoint FromSyntax(StepModel binder, ExpSyntaxNode syntaxList)
|
||||
{
|
||||
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator( syntaxList );
|
||||
StepVertexPoint vertex = new StepVertexPoint( binder );
|
||||
enumerator.AssertEnumeratorCount( 2 );
|
||||
vertex.Name = ( enumerator[ 0 ]as ExpStringNode )!.Value;
|
||||
vertex.Location = binder[ enumerator[ 1 ] ] as StepCartesianPoint;
|
||||
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator(syntaxList);
|
||||
StepVertexPoint vertex = new StepVertexPoint(binder);
|
||||
enumerator.AssertEnumeratorCount(2);
|
||||
vertex.Name = (enumerator[0]as ExpStringNode)!.Value;
|
||||
vertex.Location = binder[enumerator[1]] as StepCartesianPoint;
|
||||
return vertex;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user